@font-face {
  font-family: "TikTok Sans";
  src: url("assets/TikTokSans.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "TikTok Sans", sans-serif;
  --ink: #151515;
  --muted: #706f6a;
  --body-text: #3d3c38;
  --paper: #f2f1ed;
  --panel: #fbfaf7;
  --line: #d8d6cf;
  --soft-line: #e7e5de;
  --white: #fff;
  --cyan: #25f4ee;
  --red: #fe2c55;
  --danger: #a7213a;
  --danger-line: #d7a7ae;
  --grid-line: rgba(21, 21, 21, 0.025);
  --header-bg: rgba(242, 241, 237, 0.88);
  --rail-bg: rgba(251, 250, 247, 0.84);
  --quiet-bg: rgba(255, 255, 255, 0.52);
  --icon-bg: rgba(255, 255, 255, 0.7);
  --card-wash: rgba(251, 250, 247, 0.52);
  --hover-wash: rgba(21, 21, 21, 0.04);
  --menu-hover: rgba(21, 21, 21, 0.06);
  --workspace-center: rgba(255, 255, 255, 0.88);
  --workspace-edge: rgba(238, 237, 231, 0.82);
  --workspace-dot: rgba(21, 21, 21, 0.22);
  --canvas-action-bg: rgba(251, 250, 247, 0.94);
  --canvas-action-border: rgba(21, 21, 21, 0.22);
  --canvas-action-shadow: rgba(21, 21, 21, 0.1);
  --empty-bg: rgba(251, 250, 247, 0.72);
  --editor-ink: #151515;
  --editor-white: #fff;
  --radius: 14px;
  --shadow: 0 20px 54px rgba(26, 24, 20, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

input,
textarea {
  color: inherit;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button--primary {
  color: var(--white);
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--cyan), -2px -2px 0 var(--red);
}

.button--primary:hover {
  box-shadow: 6px 6px 0 var(--cyan), -3px -3px 0 var(--red);
}

.button--quiet {
  border-color: var(--line);
  background: var(--quiet-bg);
}

.button--danger {
  border-color: var(--danger-line);
  color: var(--danger);
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--icon-bg);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.icon-button:hover {
  border-color: var(--ink);
  background: var(--white);
  transform: translateY(-1px);
}

.icon-button svg,
.button svg {
  width: 18px;
  height: 18px;
}

.github-link {
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}

.github-mark {
  display: block;
  width: 18px;
  height: 18px;
}

.airdrop-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
}

.app-header {
  display: flex;
  height: 72px;
  padding: 0 26px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.not-found-brand {
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 29px;
  height: 34px;
  border-radius: 6px;
  background: var(--ink);
  transform: rotate(-4deg);
  box-shadow: 4px 2px 0 var(--cyan), -3px -2px 0 var(--red);
}

.brand-mark::after {
  position: absolute;
  top: 8px;
  right: -5px;
  width: 11px;
  height: 18px;
  border-radius: 3px;
  background: var(--ink);
  content: "";
}

.brand-copy {
  display: grid;
  text-align: left;
  line-height: 0.9;
}

.brand-copy strong {
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.header-actions,
.project-identity {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-actions .button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.project-identity {
  position: static;
  flex-direction: column;
  gap: 1px;
}

.project-image-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 18px; margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.project-image-scope .application-field { flex: 0 1 340px; margin: 0; }
.project-image-scope p { flex: 1 1 250px; margin: 0; color: var(--muted); font-size: 14px; }
.image-library-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; }
.image-folder-list { display: flex; flex-direction: column; gap: 8px; align-self: start; }
.image-folder-list > button { justify-content: space-between; text-align: left; white-space: normal; }
.image-folder-list form { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.image-folder-list input { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); }
.image-library-content { min-width: 0; }
.image-library-content h2 { margin-top: 0; }
.image-library-content .section-heading { gap: 16px; }
.image-library-content .section-heading p, .image-library-note { color: var(--muted); font-size: 14px; max-width: 650px; }
.image-library-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 20px 0 12px; }
.image-library-toolbar .application-field { flex: 1 1 180px; margin: 0; }
.image-library-status { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.image-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin: 16px 0 24px; }
.image-library-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); cursor: pointer; }
.image-library-card:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.image-library-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; border-radius: 8px; background: var(--paper); }
.image-library-card input { position: absolute; top: 14px; left: 14px; width: 20px; height: 20px; accent-color: var(--ink); }
.image-library-card span, .image-library-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-library-card span { font-size: 13px; }
.image-library-card small { color: var(--muted); font-size: 12px; }
@media (max-width: 700px) {
  .image-library-layout { grid-template-columns: 1fr; gap: 22px; }
  .image-folder-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-folder-list form { grid-column: 1 / -1; }
  .image-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .project-image-scope .application-field { flex-basis: 100%; }
  .image-library-page > .section-heading { flex-direction: column; align-items: flex-start; }
  .image-library-page > .section-heading > button { white-space: nowrap; }
  .app-header:not(.app-header--editor) { height: auto; min-height: 72px; flex-wrap: wrap; padding-block: 12px; }
  .app-header:not(.app-header--editor) .header-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .app-header:not(.app-header--editor) .header-actions > * { flex-shrink: 0; }
}

.app-header.app-header--editor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 61px 50px;
  column-gap: 16px;
  row-gap: 0;
  height: 112px;
}

.app-header--editor > .brand { grid-row: 1; grid-column: 1; }
.app-header--editor > .header-actions {
  grid-row: 1;
  grid-column: 2;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  justify-content: flex-start;
}
.app-header--editor > .header-actions > * { flex-shrink: 0; }
.app-header--editor > .project-identity {
  display: flex;
  grid-row: 2;
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
  height: 50px;
  border-top: 1px solid var(--soft-line);
}
.project-identity-copy {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 1px;
}
.app-header--editor .project-title-input {
  width: 100%;
  min-width: 0;
  padding: 3px 0;
  text-align: left;
}
.canvas-format-selector {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 8px;
  align-items: center;
  border: 0;
}
.canvas-format-selector legend {
  padding: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.canvas-format-options {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--quiet-bg);
}
.canvas-format-option {
  display: inline-flex;
  min-width: 57px;
  height: 28px;
  padding: 0 8px;
  gap: 6px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.canvas-format-option:hover {
  color: var(--ink);
  background: var(--hover-wash);
}
.canvas-format-option.is-active {
  color: var(--white);
  background: var(--ink);
  box-shadow: 2px 2px 0 var(--cyan);
}
.canvas-format-option:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.canvas-format-option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.canvas-format-shape {
  display: block;
  height: 12px;
  flex: 0 0 auto;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}
.canvas-format-shape[data-format-shape="9:16"] { width: 7px; }
.canvas-format-shape[data-format-shape="4:5"] { width: 10px; }
.app-header--editor + .editor-shell { height: calc(100vh - 112px); }
@media (max-width: 1100px) {
  .app-header--editor > .header-actions { justify-content: flex-start; }
}

body { overflow-x: hidden; }

.project-application-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-title-input {
  width: min(320px, 32vw);
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-weight: 750;
  text-align: center;
  text-overflow: ellipsis;
}

.project-title-input:hover,
.project-title-input:focus {
  border-color: var(--line);
  background: var(--panel);
}

.dashboard {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 82px 0 100px;
}

.not-found {
  min-height: calc(100vh - 72px);
  display: grid;
  align-content: center;
  justify-items: start;
  padding-top: 40px;
}

.not-found h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(48px, 9vw, 108px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.not-found > p:not(.eyebrow) {
  margin: 24px 0 30px;
  color: var(--muted);
  font-size: 18px;
}

.not-found-action {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.dashboard-hero {
  display: flex;
  margin-bottom: 58px;
  align-items: end;
  justify-content: space-between;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  margin: 0 0 16px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 8px 0 0 var(--cyan);
  content: "";
}

.dashboard h1 {
  max-width: 670px;
  margin: 0;
  font-size: clamp(46px, 7vw, 86px);
  font-weight: 820;
  line-height: 0.93;
  letter-spacing: -0.072em;
}

.dashboard h1 em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: var(--cyan);
  text-decoration-thickness: 9px;
  text-underline-offset: -2px;
}

.dashboard-intro {
  max-width: 300px;
  margin: 0 0 7px 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.public-footer {
  display: flex;
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 36px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.public-footer nav,
.legal-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.public-footer a,
.legal-nav > a:not(.button) {
  color: inherit;
  text-underline-offset: 4px;
}

.public-footer a:hover,
.legal-nav > a:not(.button):hover,
.legal-nav > a[aria-current="page"] {
  color: var(--ink);
}

.legal-page {
  min-height: 100vh;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 10;
}

.legal-nav a {
  font-size: 13px;
  font-weight: 700;
}

.legal-nav .button {
  display: inline-grid;
  place-items: center;
  color: var(--white);
  text-decoration: none;
}

.legal-shell {
  display: grid;
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 86px 0 104px;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(54px, 9vw, 128px);
  align-items: start;
}

.legal-intro {
  position: sticky;
  top: 136px;
}

.legal-intro h1 {
  margin: 0;
  font-size: clamp(44px, 4.2vw, 60px);
  font-weight: 850;
  letter-spacing: -0.07em;
  line-height: 0.92;
}

.legal-intro > p:not(.eyebrow) {
  max-width: 430px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.legal-meta {
  display: grid;
  margin: 36px 0 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.legal-meta div {
  display: grid;
  gap: 5px;
  padding: 16px 0;
}

.legal-meta div + div {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.legal-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.legal-meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
}

.legal-content {
  counter-reset: legal-section;
}

.legal-content section {
  padding: 0 0 36px;
  border-bottom: 1px solid var(--line);
}

.legal-content section + section {
  padding-top: 36px;
}

.legal-content h2,
.legal-summary h2 {
  margin: 0 0 16px;
  font-size: 21px;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.legal-content p,
.legal-content li {
  max-width: 72ch;
  color: var(--body-text);
  font-size: 15px;
  line-height: 1.72;
}

.legal-content p {
  margin: 0;
}

.legal-content p + p {
  margin-top: 14px;
}

.legal-content ul {
  margin: 14px 0;
  padding-left: 22px;
}

.legal-content li + li {
  margin-top: 7px;
}

.legal-summary {
  margin-top: 36px;
  padding: 26px 28px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--cyan), -2px -2px 0 var(--red);
}

.legal-summary p {
  color: var(--ink);
}

.legal-footer {
  margin-top: 0;
}

.application-workspace {
  margin: -18px 0 46px;
  padding: 18px;
  border: 1px solid var(--ink);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 6px 6px 0 var(--cyan);
}

.application-switcher-row {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
}

.application-switcher-row label {
  display: grid;
  gap: 7px;
  min-width: min(360px, 100%);
}

.application-switcher-row label > span,
.application-field > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.application-switcher-row select,
.application-field select {
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-weight: 700;
}

.application-switcher-row > div {
  display: flex;
  gap: 9px;
}

.application-summary {
  display: grid;
  margin-top: 17px;
  grid-template-columns: minmax(240px, 1fr) repeat(4, minmax(88px, auto));
  border-top: 1px solid var(--line);
}

.application-summary > div,
.application-summary > span {
  display: grid;
  min-height: 92px;
  padding: 16px 14px 0;
  align-content: start;
  border-left: 1px solid var(--line);
}

.application-summary > div {
  padding-left: 0;
  border-left: 0;
}

.application-summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.application-summary strong {
  margin-top: 6px;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.application-summary p {
  max-width: 520px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.section-heading {
  display: flex;
  margin: 0 0 18px;
  align-items: center;
  justify-content: space-between;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card,
.new-project-card {
  position: relative;
  min-height: 250px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  text-align: left;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.project-card-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 18px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.project-card-open:focus-visible {
  z-index: 1;
  outline: 2px solid var(--cyan);
  outline-offset: -5px;
}

.project-card-duplicate,
.project-card-delete,
.project-card-analytics,
.project-card-add-group {
  position: absolute;
  z-index: 2;
  top: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 5px 12px rgba(26, 24, 20, 0.12);
  opacity: 1;
  cursor: pointer;
  transform: none;
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.project-card-duplicate {
  right: 54px;
}

.project-card-analytics {
  right: 96px;
  width: auto;
  min-width: 94px;
  padding: 0 9px;
  display: inline-flex;
  gap: 5px;
  color: var(--ink);
}

.project-card-delete {
  right: 12px;
}

.project-card-add-group {
  right: 12px;
  top: 54px;
  width: auto;
  min-width: 142px;
  padding: 0 9px;
  display: inline-flex;
  gap: 5px;
}

.project-card:hover .project-card-duplicate,
.project-card:hover .project-card-delete,
.project-card:hover .project-card-analytics,
.project-card:hover .project-card-add-group,
.project-card:focus-within .project-card-duplicate,
.project-card:focus-within .project-card-delete,
.project-card:focus-within .project-card-analytics {
  opacity: 1;
  transform: translateY(0);
}

.project-card:focus-within .project-card-add-group { opacity: 1; transform: none; }

.project-card-duplicate:hover {
  background: var(--white);
}

.project-card-analytics:hover {
  color: var(--red);
  background: var(--white);
}

.project-card-add-group:hover { color: var(--red); background: var(--white); }

.project-card-delete:hover {
  color: var(--danger);
  border-color: var(--danger-line);
  background: var(--white);
}

.project-card-duplicate:focus-visible,
.project-card-delete:focus-visible,
.project-card-analytics:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.project-card-add-group:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.project-card-duplicate svg,
.project-card-delete svg,
.project-card-analytics svg {
  width: 17px;
  height: 17px;
}

.project-card-add-group svg { width: 17px; height: 17px; }

@media (hover: none) {
  .project-card-duplicate,
  .project-card-delete,
  .project-card-analytics {
    opacity: 1;
    transform: none;
  }
}

.project-card:hover,
.new-project-card:hover {
  border-color: #aaa8a0;
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.project-preview {
  position: absolute;
  inset: 0 0 74px;
  overflow: hidden;
  background: #dad8d1;
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-preview-empty {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #aaa8a0;
  background:
    linear-gradient(135deg, transparent 49.5%, rgba(21, 21, 21, 0.08) 50%, transparent 50.5%),
    #e6e4dd;
}

.project-meta {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 3px;
}

.project-meta strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-meta span {
  color: var(--muted);
  font-size: 12px;
}

.new-project-card {
  display: grid;
  border-style: dashed;
  place-items: center;
  color: var(--muted);
  background: var(--card-wash);
  text-align: center;
}

.new-project-card span:first-child {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font-size: 30px;
  font-weight: 300;
}

.new-project-card strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.new-project-card small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
}

.editor-shell {
  display: grid;
  height: calc(100vh - 72px);
  grid-template-columns: 190px 168px minmax(300px, 1fr) 294px;
}

.slide-rail,
.asset-rail,
.inspector {
  min-height: 0;
  background: var(--rail-bg);
  backdrop-filter: blur(18px);
}

.slide-rail,
.asset-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--line);
}

.slide-rail.is-file-drop-target {
  z-index: 9;
  background: color-mix(in srgb, var(--cyan) 14%, var(--panel));
  box-shadow: inset 0 0 0 3px var(--cyan), inset 0 0 0 5px var(--ink);
}

.slide-rail.is-file-drop-target::after {
  position: absolute;
  z-index: 4;
  right: 14px;
  bottom: 76px;
  left: 14px;
  padding: 12px 8px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  color: var(--white);
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--cyan);
  content: "Drop to add slides";
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
}

.rail-heading {
  display: flex;
  padding: 20px 16px 12px;
  align-items: center;
  justify-content: space-between;
}

.rail-heading h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.rail-heading span {
  color: var(--muted);
  font-size: 11px;
}

.slide-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 4px 12px 18px;
  overflow-y: auto;
}

.slide-thumb {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  padding: 8px;
  align-items: start;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  cursor: grab;
  text-align: left;
}

.slide-thumb:hover {
  background: var(--hover-wash);
}

.slide-thumb.is-active {
  border-color: var(--ink);
  background: var(--white);
  box-shadow: 3px 3px 0 var(--cyan);
}

.slide-thumb.is-dragging {
  opacity: 0.42;
  cursor: grabbing;
}

.slide-thumb.is-drop-before::before,
.slide-thumb.is-drop-after::after {
  position: absolute;
  z-index: 5;
  right: 4px;
  left: 4px;
  height: 3px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 0 1px var(--ink);
  content: "";
  pointer-events: none;
}

.slide-thumb.is-drop-before::before {
  top: -6px;
}

.slide-thumb.is-drop-after::after {
  bottom: -6px;
}

.slide-number {
  padding-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.thumb-image {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 7px;
  background: #dedcd5;
  aspect-ratio: 9 / 16;
  pointer-events: none;
}

.thumb-rendered {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.thumb-rendering-placeholder {
  position: absolute;
  display: grid;
  inset: 0;
  overflow: hidden;
  place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 78%, var(--ink)), var(--panel));
}

.thumb-rendering-placeholder span {
  width: 22px;
  height: 22px;
  border: 2px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: thumb-spin 700ms linear infinite;
}

.slide-drag-ghost {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: 9px;
  box-shadow: 4px 4px 0 var(--cyan), 0 12px 28px rgba(0, 0, 0, 0.28);
  opacity: 1;
  pointer-events: none;
  transform: translateX(-200vw);
}

@keyframes thumb-spin {
  to { transform: rotate(360deg); }
}

.rail-upload {
  padding: 12px;
  border-top: 1px solid var(--soft-line);
}

.rail-upload .button {
  display: inline-flex;
  width: 100%;
  gap: 8px;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  white-space: nowrap;
}

.rail-upload .button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.asset-grid {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: max-content;
  gap: 8px;
  align-content: start;
  padding: 4px 12px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.asset-empty {
  grid-column: 1 / -1;
  margin: 4px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.asset-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  cursor: grab;
}

.asset-item:hover {
  border-color: var(--ink);
}

.asset-item.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.asset-hover-preview {
  position: fixed;
  z-index: 90;
  width: auto;
  height: auto;
  max-width: 240px;
  max-height: 240px;
  border: 0;
  background: none;
  box-shadow: none;
  pointer-events: none;
  object-fit: contain;
}

.asset-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.asset-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(21, 21, 21, 0.72);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
}

.asset-item:hover .asset-remove,
.asset-remove:focus-visible {
  opacity: 1;
}

.overlay-asset-name {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-trash {
  display: flex;
  gap: 7px;
  min-height: 38px;
  margin: 0 12px 8px;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #b7b4ab;
  border-radius: 10px;
  color: #7a7872;
  background: #dddcd6;
  font-size: 11px;
  font-weight: 750;
}

.asset-trash svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.asset-trash.is-hot {
  border-color: #5f5d57;
  color: #2b2b2b;
  background: #b8b6ae;
}

.workspace {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 50% 48%, var(--workspace-center), var(--workspace-edge) 45%, transparent 72%);
}

.workspace.is-file-drop-target {
  z-index: 7;
  box-shadow: inset 0 0 0 3px var(--cyan), inset 0 0 0 5px var(--ink);
}

.workspace.is-file-drop-target::after {
  position: absolute;
  z-index: 12;
  top: 58px;
  left: 50%;
  padding: 9px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--cyan);
  content: "Drop to add asset";
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  transform: translateX(-50%);
}

.canvas-composition {
  display: flex;
  gap: 18px;
  align-items: center;
}

.canvas-actions {
  position: relative;
  z-index: 8;
  display: grid;
  width: 132px;
  flex: 0 0 132px;
  gap: 8px;
}

.canvas-action {
  display: flex;
  min-width: 0;
  min-height: 42px;
  gap: 9px;
  padding: 0 12px;
  align-items: center;
  border: 1px solid var(--canvas-action-border);
  border-radius: 12px;
  color: var(--ink);
  background: var(--canvas-action-bg);
  box-shadow: 0 6px 18px var(--canvas-action-shadow);
  backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.canvas-action:hover,
.canvas-action.is-active {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.canvas-action.is-active {
  color: var(--white);
  background: var(--ink);
  box-shadow: 2px 2px 0 var(--cyan);
}

.canvas-action svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.canvas-action span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace::before {
  position: absolute;
  inset: 0;
  opacity: 0.26;
  background-image: radial-gradient(var(--workspace-dot) 0.55px, transparent 0.55px);
  background-size: 8px 8px;
  content: "";
  pointer-events: none;
}

.workspace-inner {
  position: relative;
  display: grid;
  width: max-content;
  min-width: 100%;
  min-height: 100%;
  padding: 30px;
  overflow: visible;
  place-items: center;
}

.stage-wrap {
  position: relative;
  filter: drop-shadow(0 24px 30px rgba(26, 24, 20, 0.18));
}

.stage-frame {
  position: relative;
}

.stage-image-ghost {
  position: absolute;
  z-index: 0;
  display: none;
  max-width: none;
  filter: grayscale(1) saturate(0) brightness(0.92) contrast(0.76);
  opacity: 0.52;
  pointer-events: none;
  user-select: none;
}

.stage-frame.is-adjusting-photo .stage-image-ghost {
  display: block;
}

.selection-marquee {
  position: absolute;
  z-index: 20;
  display: none;
  border: 1px solid var(--cyan);
  background: rgba(37, 244, 238, 0.14);
  box-shadow: 0 0 0 1px rgba(21, 21, 21, 0.62), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.selection-marquee.is-visible {
  display: block;
}

.stage {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: #232323;
  user-select: none;
  touch-action: none;
}

.stage-image {
  position: absolute;
  display: block;
  pointer-events: none;
  max-width: none;
  user-select: none;
}

.stage.is-adjusting,
.stage.is-moving-photo {
  cursor: grab;
}

.stage.is-moving-photo {
  cursor: grabbing;
}

.stage-frame.is-adjusting-photo .layer-stack {
  opacity: 0.7;
  pointer-events: none;
}

.stage-frame.is-adjusting-photo .text-box,
.stage-frame.is-adjusting-photo .overlay-box {
  pointer-events: none;
}

.stage-frame.is-adjusting-photo .resize-handle,
.stage-frame.is-adjusting-photo .edge-resize-handle,
.stage-frame.is-adjusting-photo .rotate-handle {
  display: none;
}

.stage.is-drop-target,
.stage-frame.is-drop-target .stage {
  outline: 3px solid var(--cyan);
  outline-offset: -3px;
  box-shadow: inset 0 0 0 2px var(--ink);
}

.stage-dimensions {
  position: absolute;
  right: 0;
  bottom: -25px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.canvas-zoom-controls {
  display: inline-flex;
  overflow: hidden;
  align-items: center;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  border-radius: 999px;
  letter-spacing: normal;
}

.canvas-zoom-button,
.canvas-zoom-level {
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--canvas-action-bg);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}

.canvas-zoom-button {
  width: 24px;
}

.canvas-zoom-level {
  min-width: 42px;
  border-right: 0;
  border-left: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.canvas-zoom-button:hover,
.canvas-zoom-level:hover {
  background: var(--white);
}

.tiktok-overlay {
  position: absolute;
  z-index: 5;
  inset: 0;
  overflow: hidden;
  opacity: 0.66;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.tiktok-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.tiktok-overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--tiktok-canvas-width, 1080px);
  height: var(--tiktok-canvas-height, 1920px);
  color: #fff;
  font-family: "TikTok Sans", sans-serif;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.9);
  transform: scale(var(--stage-scale, 0.5));
  transform-origin: top left;
}

.tt-preview-label {
  position: absolute;
  top: 24px;
  left: 24px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.48);
  font-size: 15px;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-shadow: none;
}

.tt-topbar {
  position: absolute;
  top: 54px;
  left: 50%;
  display: flex;
  gap: 38px;
  align-items: center;
  font-size: 36px;
  transform: translateX(-50%);
}

.tt-topbar span:first-child {
  opacity: 0.74;
}

.tt-topbar strong {
  position: relative;
}

.tt-topbar strong::after {
  position: absolute;
  right: 12px;
  bottom: -12px;
  left: 12px;
  height: 5px;
  border-radius: 999px;
  background: #fff;
  content: "";
}

.tt-search {
  position: absolute;
  top: -20px;
  left: calc(100% + 250px);
  font-size: 62px;
  font-weight: 400;
}

.tt-side-actions {
  position: absolute;
  right: 22px;
  bottom: 312px;
  display: flex;
  width: 98px;
  flex-direction: column;
  gap: 28px;
  align-items: center;
}

.tt-avatar {
  position: relative;
  width: 78px;
  height: 78px;
  margin-bottom: 6px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
}

.tt-avatar b {
  position: absolute;
  right: 15px;
  bottom: -14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #fe2c55;
  font-size: 30px;
  line-height: 1;
  text-shadow: none;
}

.tt-action {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.tt-action > span {
  display: grid;
  width: 78px;
  height: 68px;
  place-items: center;
  font-size: 66px;
  font-weight: 760;
  line-height: 1;
}

.tt-action small {
  font-size: 25px;
  font-weight: 700;
}

.tt-bubble {
  position: relative;
  -webkit-text-stroke: 6px #fff;
  color: transparent;
}

.tt-bookmark {
  font-size: 70px !important;
}

.tt-share {
  font-size: 72px !important;
}

.tt-disc {
  display: grid;
  width: 80px;
  height: 80px;
  margin-top: 3px;
  place-items: center;
  border: 18px solid #252525;
  border-radius: 50%;
  background: #777;
  font-size: 24px;
}

.tt-caption {
  position: absolute;
  right: 158px;
  bottom: 158px;
  left: 24px;
  font-size: 31px;
  line-height: 1.32;
}

.tt-caption strong {
  font-size: 34px;
}

.tt-caption p {
  margin: 10px 0;
}

.tt-caption span {
  font-weight: 650;
}

.tt-bottom-nav {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  height: 115px;
  padding: 11px 25px 9px;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: rgba(0, 0, 0, 0.86);
  text-shadow: none;
}

.tt-bottom-nav span {
  display: grid;
  gap: 3px;
  place-items: center;
  font-size: 21px;
  font-weight: 650;
}

.tt-bottom-nav b {
  font-size: 44px;
  line-height: 1;
}

.tt-bottom-nav .tt-create {
  display: grid;
  width: 90px;
  height: 55px;
  justify-self: center;
  border-radius: 12px;
  color: #111;
  background: #fff;
  box-shadow: -10px 0 0 #25f4ee, 10px 0 0 #fe2c55;
  font-size: 48px;
  line-height: 1;
}

.project-meta .project-performance {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.project-meta .project-performance.is-success {
  color: var(--red);
}

.alignment-guides {
  position: absolute;
  z-index: 3;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.stage-frame.has-alignment-guides .alignment-guides {
  opacity: 1;
}

.alignment-guide {
  position: absolute;
  display: block;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 0 1px rgba(20, 20, 20, 0.2), 0 0 12px rgba(0, 0, 0, 0.32);
}

.alignment-guide--vertical {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
}

.alignment-guide--horizontal {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  transform: translateY(-50%);
}

.stage-frame.is-snapped-x .alignment-guide--vertical,
.stage-frame.is-snapped-y .alignment-guide--horizontal {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(20, 20, 20, 0.28), 0 0 18px rgba(255, 255, 255, 0.78);
}

.project-card-select {
  position: absolute;
  z-index: 3;
  top: 13px;
  left: 13px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

.project-card-select input { width: 18px; height: 18px; accent-color: var(--red); }

.carousel-selection-bar {
  display: flex;
  min-height: 48px;
  margin: -8px 0 16px;
  padding: 7px 8px 7px 14px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--soft-line);
  border-radius: 13px;
  color: var(--muted);
  background: var(--card-wash);
}

.carousel-selection-bar.is-active { border-color: var(--cyan); color: var(--ink); }

.content-projects-page { padding-bottom: 64px; }
.carousel-date-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: 100%; padding: 4px 4px 20px; }
.carousel-date-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 0 0 12px; margin-bottom: 16px; }
.carousel-date-heading h3 { margin: 0; font-size: 20px; }
.carousel-date-heading > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.carousel-date-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 18px; }
.carousel-date-column { min-width: 0; }
.carousel-date-columns:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 780px) {
  .carousel-date-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .carousel-date-cards { grid-template-columns: minmax(0, 1fr); }
}
.content-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 24px; }
.content-project-grid .content-project-folder { padding: 0; overflow: hidden; box-shadow: none; }
.content-project-open { display: grid; width: 100%; border: 0; padding: 0 0 18px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.content-project-cover { display: grid; place-items: center; height: 210px; overflow: hidden; background: var(--card-wash); }
.content-project-cover img { width: 100%; height: 100%; object-fit: contain; }
.content-project-cover svg { width: 48px; height: 48px; }
.content-project-folder-name { padding: 18px 18px 4px; font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.content-project-count { padding: 0 18px; color: var(--muted); }
.content-project-folder > .content-project-actions { padding: 0 18px 18px; }
.content-project-open:hover { background: var(--hover-wash); }
.content-project-open:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.content-project-heading { margin-top: 24px; flex-wrap: wrap; }
.content-project-heading h1 { overflow-wrap: anywhere; }
.content-project-detail { padding-bottom: 64px; }
.content-project-list { display: grid; gap: 22px; }
.content-project-card { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 5px 5px 0 var(--cyan); }
.content-project-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.content-project-card h2 { margin: 5px 0 2px; font-size: 26px; letter-spacing: -.05em; }
.content-project-card header p { margin: 0; color: var(--muted); font-size: 12px; }
.content-project-id { color: var(--muted); font-family: ui-monospace, monospace; font-size: 10px; }
.content-project-carousels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.content-project-carousel { overflow: hidden; border: 1px solid var(--soft-line); border-radius: 14px; background: var(--card-wash); }
.content-project-carousel.is-reference { border: 2px solid var(--red); }
.content-project-carousel.is-posted { border: 2px solid #168044; }
.forecast-badge { font-size: 12px; max-width: 100%; }
.carousel-stats-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
.carousel-stats-row > .button { flex-shrink: 0; }
.stats-entry-button.needs-stats { border: 2px solid var(--danger); color: var(--danger); background: var(--panel); }
.stats-entry-button.has-stats { border-color: #168044; color: #146b3a; background: var(--panel); }
.stats-entry-button.stats-button--project { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 12px; }
.stats-button--project small { font-size: 11px; line-height: 1.2; font-weight: 700; }
.stats-entry-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 750; }
.project-meta .stats-entry-status.needs-stats { color: var(--danger); }
.project-meta .stats-entry-status.has-stats { color: #146b3a; }
.stats-entry-status > span { font-size: 13px; font-weight: 900; }
:root[data-theme="dark"] .stats-entry-button.has-stats,
:root[data-theme="dark"] .project-meta .stats-entry-status.has-stats { color: #8adca7; border-color: #66bf87; }
.forecast-badge summary { font-weight: 700; white-space: nowrap; background: var(--quiet-bg); }
.forecast-badge summary { cursor: pointer; padding: 8px; border: 1px solid var(--soft-line); border-radius: 8px; }
.forecast-badge[open] { flex-basis: 100%; }
.forecast-badge > div { padding: 10px; overflow-wrap: anywhere; }
.forecast-empty { font-size: 11px; opacity: .7; align-self: center; padding: 5px; }
.carousel-posted-toggle { display: flex; align-items: center; gap: 9px; margin: 0 10px 12px; padding: 10px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 700; background: var(--quiet-bg); }
.carousel-posted-toggle input { width: 18px; height: 18px; margin: 0; accent-color: #168044; }
.is-posted .carousel-posted-toggle { background: #168044; color: white; }
.carousel-posted-toggle:focus-within { outline: 2px solid currentColor; outline-offset: 2px; }
.content-project-carousel-preview { display: grid; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.content-project-carousel-preview img { width: 100%; aspect-ratio: 9 / 12; object-fit: contain; }
.content-project-carousel-preview > span { display: grid; gap: 7px; padding: 12px; }
.content-project-carousel-preview strong { font-size: 13px; }
.content-project-carousel-preview em { width: max-content; padding: 4px 7px; border-radius: 999px; color: white; background: var(--red); font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.content-project-carousel > div { display: flex; gap: 6px; padding: 0 10px 10px; flex-wrap: wrap; }
.content-project-ready, .content-project-warning { margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 12px; }
.content-project-ready { background: rgba(37, 244, 238, .18); }
.content-project-warning { background: rgba(254, 44, 85, .1); color: var(--danger); }
.content-project-modal { position: relative; width: min(620px, 100%); max-height: calc(100vh - 42px); overflow: auto; }
.content-project-picker { display: grid; max-height: 320px; margin: 0; padding: 12px; overflow: auto; gap: 8px; border: 1px solid var(--line); border-radius: 12px; }
.content-project-picker legend { padding: 0 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.content-project-picker label { display: flex; gap: 9px; align-items: center; font-size: 13px; }

.quick-stats-modal { width: min(620px, 100%); }
.quick-stats-preview { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: center; padding-right: 34px; }
.quick-stats-preview img, .quick-stats-preview > span { width: 92px; height: 120px; border-radius: 12px; object-fit: cover; background: var(--quiet-bg); }
.quick-stats-preview > span { display: grid; place-items: center; color: var(--muted); font-size: 10px; }
.quick-stats-preview h2 { margin: 3px 0 8px; font-size: 34px; }
.quick-stats-preview strong { display: block; color: var(--muted); font-size: 12px; }
.quick-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-top: 20px; }
.watch-time-fields { min-width: 0; margin: 16px 0; padding: 12px; border: 1px solid var(--border, #ddd); border-radius: 12px; }
.watch-time-fields .quick-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.watch-time-fields input { min-width: 0; width: 100%; box-sizing: border-box; }
.watch-time-fields output { display: block; margin-top: 8px; }
.quick-stats-empty { color: var(--muted); font-size: 11px; }

@media (max-width: 760px) {
  .content-project-carousels { grid-template-columns: 1fr; }
  .content-project-card > header { display: grid; }
  .quick-stats-grid { grid-template-columns: 1fr; }
  .quick-stats-preview { grid-template-columns: 72px 1fr; }
  .quick-stats-preview img, .quick-stats-preview > span { width: 72px; height: 96px; }
  .project-card-analytics { right: 96px; min-width: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  .alignment-guides {
    transition: none;
  }
}

/* Connexion locale au MCP d'édition visuelle. */
.agent-connect-button { position: relative; gap: 8px; }
.agent-connect-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.agent-connect-button[data-mcp-status="connecting"] .agent-connect-dot { background: #e3a008; animation: agent-dot-pulse 900ms ease-in-out infinite alternate; }
.agent-connect-button[data-mcp-status="connected"] { border-color: color-mix(in srgb, #24a148 32%, var(--line)); }
.agent-connect-button[data-mcp-status="connected"] .agent-connect-dot { background: #24a148; }
@keyframes agent-dot-pulse { to { transform: scale(1.35); } }
.agent-modal-backdrop { position: fixed; z-index: 10000; inset: 0; display: grid; padding: 24px; overflow-y: auto; place-items: center; background: rgba(11, 11, 10, 0.54); backdrop-filter: blur(8px); }
.agent-modal-backdrop[hidden] { display: none; }
.agent-modal { position: relative; width: min(560px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: 0 30px 90px rgba(0, 0, 0, .28); }
.agent-modal-header { padding: 31px 34px 18px; }
.agent-modal h2 { padding-right: 52px; margin: 0; font-size: clamp(30px, 5vw, 40px); line-height: .96; }
.agent-modal-intro, .agent-client-icons, .agent-step-heading, .agent-connection-status { display: flex; align-items: center; }
.agent-modal-intro { margin-top: 14px; gap: 10px; }
.agent-modal-agent-label { margin: 0; font-size: 14px; font-weight: 750; }
.agent-client-icons span { display: grid; width: 34px; height: 34px; margin-left: -8px; place-items: center; }
.agent-client-icons span:first-child { margin-left: 0; }
.agent-client-icons img { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; }
.agent-modal-close { position: absolute; top: 20px; right: 20px; z-index: 1; }
.agent-modal-body { padding: 4px 34px 30px; }
.agent-steps { display: grid; padding: 0; margin: 0; gap: 24px; list-style: none; counter-reset: agent-step; }
.agent-steps li { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 14px; color: var(--muted); font-size: 14px; counter-increment: agent-step; }
.agent-steps li::before { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--paper); content: counter(agent-step); font-size: 12px; font-weight: 850; }
.agent-steps strong { display: block; color: var(--ink); }
.agent-step-heading { min-height: 31px; gap: 12px; justify-content: space-between; }
.agent-prompt-box { margin-top: 6px; padding: 11px 12px; border: 1px solid var(--soft-line); border-radius: 10px; background: var(--paper); }
.agent-prompt-box p { margin: 0; font-family: ui-monospace, monospace; font-size: 12px; overflow-wrap: anywhere; }
.agent-copy-prompt { display: inline-flex; padding: 6px 9px; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); cursor: pointer; }
.agent-connect-actions { display: grid; margin-top: 12px; gap: 12px; justify-items: center; }
.agent-how-it-works { margin: 24px 0 0 45px; color: var(--muted); font-size: 12px; }
.agent-activity-stack { position: fixed; right: 18px; bottom: 18px; z-index: 1200; display: grid; width: min(360px, calc(100vw - 36px)); gap: 8px; pointer-events: none; }
.agent-activity { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); box-shadow: 0 12px 32px rgb(0 0 0 / 18%); opacity: 0; transform: translateY(8px); transition: 180ms ease; }
.agent-activity.is-visible { opacity: 1; transform: translateY(0); }
.agent-activity-icon { display: grid; width: 30px; height: 30px; overflow: hidden; place-items: center; border-radius: 50%; }
.agent-activity-icon img { width: 100%; height: 100%; object-fit: cover; }
.agent-activity-icon--generic { color: #fff; background: #4d7cfe; font-size: 10px; font-weight: 850; }
.agent-connection-status { gap: 9px; color: var(--muted); font-size: 12px; }
.agent-connection-status::before { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); content: ""; }
.agent-connection-status[data-status="connected"]::before { background: #24a148; }
.agent-connection-status[data-status="connecting"]::before { background: #e3a008; }
.agent-modal-connect { width: min(100%, 280px); }

.text-layer,
.overlay-layer,
.layer-stack {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.overlay-box {
  position: absolute;
  border: 1px solid transparent;
  outline: none;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  transform-origin: center center;
}

.overlay-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.overlay-image-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.overlay-image-clip img {
  position: absolute;
  max-width: none;
}

.overlay-image-clip--outside img {
  filter: grayscale(1) saturate(0) brightness(1.08) contrast(0.82);
  opacity: 0.72;
}

.overlay-image-clip--outside {
  display: none;
}

.overlay-box.is-selected .overlay-image-clip--outside,
.overlay-box.is-cropping .overlay-image-clip--outside {
  display: block;
}

.overlay-box--line .overlay-image-clip--outside,
.overlay-box--line.is-selected .overlay-image-clip--outside {
  display: none;
}

.overlay-box--line [data-edge="n"],
.overlay-box--line [data-edge="s"],
.overlay-box--line [data-corner] {
  display: none !important;
}

.line-color-picker {
  width: 58px;
  height: 42px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
}

.overlay-image-clip--inside {
  z-index: 1;
}

.overlay-box.is-cropping {
  overflow: hidden;
  cursor: default;
}

.crop-rect {
  position: absolute;
  z-index: 3;
  border: 1px solid #fff;
  box-shadow: 0 0 0 9999px rgba(15, 15, 15, 0.5);
  cursor: move;
  touch-action: none;
}

.crop-handle {
  position: absolute;
  z-index: 4;
  width: 11px;
  height: 11px;
  border: 2px solid var(--editor-ink);
  background: var(--cyan);
  box-shadow: 0 0 0 1px var(--editor-white);
}

.crop-handle[data-crop="nw"] { top: -6px; left: -6px; cursor: nwse-resize; }
.crop-handle[data-crop="ne"] { top: -6px; right: -6px; cursor: nesw-resize; }
.crop-handle[data-crop="sw"] { bottom: -6px; left: -6px; cursor: nesw-resize; }
.crop-handle[data-crop="se"] { right: -6px; bottom: -6px; cursor: nwse-resize; }
.crop-handle[data-crop="n"] { top: -6px; left: 50%; cursor: ns-resize; transform: translateX(-50%); }
.crop-handle[data-crop="s"] { bottom: -6px; left: 50%; cursor: ns-resize; transform: translateX(-50%); }
.crop-handle[data-crop="e"] { top: 50%; right: -6px; cursor: ew-resize; transform: translateY(-50%); }
.crop-handle[data-crop="w"] { top: 50%; left: -6px; cursor: ew-resize; transform: translateY(-50%); }

.overlay-box:hover {
  border-color: rgba(255, 255, 255, 0.52);
}

.overlay-box.is-selected {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(21, 21, 21, 0.75);
}

.overlay-box.is-dragging {
  cursor: grabbing;
}

.rotate-handle {
  position: absolute;
  top: -30px;
  left: 50%;
  z-index: 3;
  display: none;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid var(--editor-ink);
  border-radius: 50%;
  color: var(--editor-ink);
  background: var(--editor-white);
  box-shadow: 0 0 0 1px var(--editor-white);
  transform: translateX(-50%);
  cursor: grab;
}

.rotate-handle svg {
  width: 12px;
  height: 12px;
}

.rotate-handle::after {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 1px;
  height: 10px;
  background: var(--cyan);
  content: "";
  transform: translateX(-50%);
}

.is-selected .rotate-handle {
  display: grid;
}

.text-box {
  position: absolute;
  display: grid;
  min-width: 40px;
  min-height: 26px;
  place-items: center;
  border: 1px solid transparent;
  outline: none;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}

.text-box:hover {
  border-color: rgba(255, 255, 255, 0.52);
}

.text-box.is-selected {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(21, 21, 21, 0.75);
}

.text-box.is-dragging {
  cursor: grabbing;
}

.text-visual {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.text-visual--outside {
  display: none;
  filter: grayscale(1) saturate(0) brightness(0.9) contrast(0.78);
  opacity: 0.56;
  pointer-events: none;
}

.text-box.is-selected .text-visual--outside {
  display: grid;
}

.text-visual--inside {
  z-index: 1;
}

.text-content-wrap {
  width: 100%;
  max-height: 100%;
  padding: 0.14em 0.3em;
  overflow: hidden;
  color: var(--text-color, #fff);
  font-family: var(--text-font, "TikTok Sans", sans-serif);
  font-weight: 500;
  line-height: 1.12;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.text-box[data-align="left"] .text-content-wrap,
.text-box[data-align="left"] .text-content,
.text-box[data-align="left"] .text-line {
  text-align: left;
}

.text-box[data-align="right"] .text-content-wrap,
.text-box[data-align="right"] .text-content,
.text-box[data-align="right"] .text-line {
  text-align: right;
}

.text-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  outline: 0;
  font: inherit;
  line-height: inherit;
}

.text-box.is-selected:not(.is-editing) .text-visual--inside .text-content {
  cursor: text;
  pointer-events: auto;
}

.text-line {
  position: relative;
  z-index: 1;
  display: block;
  flex: 0 0 auto;
  height: 1.12em;
  line-height: 1.12;
  text-align: center;
  white-space: nowrap;
}

.text-emoji {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin: 0 0.025em;
  vertical-align: -0.12em;
  object-fit: contain;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1em;
  line-height: 1;
}

.text-box.is-editing {
  cursor: grab;
}

.text-box.is-editing .text-content-wrap,
.text-box.is-editing .text-content {
  pointer-events: auto;
  user-select: text;
}

.text-box.is-editing .text-content {
  cursor: text;
}

.text-box.is-editing .text-content {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.text-box[data-style="outline"] .text-content-wrap {
  overflow: visible;
}

.text-box[data-style="outline"].is-editing .text-content {
  -webkit-text-stroke: 0.18em var(--outline-color, #111);
  paint-order: stroke fill;
}

.outline-line {
  display: block;
  width: 100%;
  overflow: visible;
}

.text-box[data-style="boxed"] .text-content-wrap {
  overflow: visible;
}

.text-box[data-style="boxed"] .text-content {
  color: var(--text-color, #fff);
  background: transparent;
  padding: 0;
}

.text-box[data-style="boxed"][data-box-shape="lines"] .text-line {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1.12em;
  margin: 0;
  padding: 0;
  color: var(--text-color, #fff);
  background: transparent;
  line-height: 1.12;
}

.text-box[data-style="boxed"][data-box-shape="lines"][data-align="left"] .text-line {
  justify-content: flex-start;
}

.text-box[data-style="boxed"][data-box-shape="lines"][data-align="right"] .text-line {
  justify-content: flex-end;
}

.text-box[data-style="boxed"][data-box-shape="lines"][data-background="black"] .text-line {
  color: var(--text-color, #fff);
}

.text-background {
  position: absolute;
  left: 0;
  z-index: 0;
  display: block;
  width: 100%;
  overflow: visible;
  pointer-events: none;
}

.text-box[data-style="boxed"][data-box-shape="full"] .text-visual {
  border-radius: 0.18em;
  background: #fff;
}

.text-box[data-style="boxed"][data-box-shape="full"] .text-content {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.text-box[data-style="boxed"][data-background="black"] .text-content {
  color: var(--text-color, #fff);
  background: transparent;
}

.text-box[data-style="boxed"][data-box-shape="full"][data-background="black"] .text-visual {
  background: #111;
}

.text-box[data-style="boxed"][data-box-shape="full"][data-background="black"] .text-content {
  background: transparent;
}

.resize-handle {
  position: absolute;
  z-index: 2;
  display: none;
  width: 12px;
  height: 12px;
  border: 2px solid var(--editor-ink);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 1px var(--editor-white);
}

.edge-resize-handle {
  position: absolute;
  z-index: 2;
  display: none;
  border: 2px solid var(--editor-ink);
  border-radius: 4px;
  background: var(--cyan);
  box-shadow: 0 0 0 1px var(--editor-white);
}

.is-selected .edge-resize-handle {
  display: block;
}

.edge-resize-handle[data-edge="n"],
.edge-resize-handle[data-edge="s"] {
  left: 50%;
  width: 18px;
  height: 8px;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.edge-resize-handle[data-edge="n"] { top: -5px; }
.edge-resize-handle[data-edge="s"] { bottom: -5px; }

.edge-resize-handle[data-edge="e"],
.edge-resize-handle[data-edge="w"] {
  top: 50%;
  width: 8px;
  height: 18px;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.edge-resize-handle[data-edge="e"] { right: -5px; }
.edge-resize-handle[data-edge="w"] { left: -5px; }

.is-selected .resize-handle {
  display: block;
}

.stage-frame.has-multi-selection .is-selected .resize-handle,
.stage-frame.has-multi-selection .is-selected .edge-resize-handle,
.stage-frame.has-multi-selection .is-selected .rotate-handle {
  display: none;
}

.resize-handle[data-corner="nw"] {
  top: -7px;
  left: -7px;
  cursor: nwse-resize;
}

.resize-handle[data-corner="ne"] {
  top: -7px;
  right: -7px;
  cursor: nesw-resize;
}

.resize-handle[data-corner="sw"] {
  bottom: -7px;
  left: -7px;
  cursor: nesw-resize;
}

.resize-handle[data-corner="se"] {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}

.empty-stage {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(420px, 88%);
  min-height: 300px;
  padding: 40px;
  place-items: center;
  border: 1px dashed #aaa8a0;
  border-radius: 20px;
  color: var(--muted);
  background: var(--empty-bg);
  text-align: center;
}

.empty-stage-graphic {
  position: relative;
  width: 94px;
  height: 112px;
  margin: 0 auto 28px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #ddd9ce;
  box-shadow: 10px 9px 0 var(--cyan), -7px -5px 0 var(--red);
  transform: rotate(3deg);
}

.empty-stage-graphic::after {
  position: absolute;
  right: 14px;
  bottom: 15px;
  left: 14px;
  height: 44px;
  background: linear-gradient(145deg, transparent 49%, var(--ink) 50% 53%, transparent 54%);
  content: "";
}

.empty-stage h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -0.035em;
}

.empty-stage p {
  max-width: 270px;
  margin: 0 auto 22px;
  font-size: 13px;
  line-height: 1.5;
}

.inspector {
  overflow-y: auto;
  border-left: 1px solid var(--line);
}

.inspector-header {
  display: flex;
  min-height: 62px;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--soft-line);
}

.inspector-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.inspector-body {
  padding: 18px 16px;
}

.control-group {
  margin: 0 0 24px;
}

.control-label {
  display: flex;
  margin: 0 0 9px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.control-label output {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.text-input {
  width: 100%;
  min-height: 104px;
  padding: 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--white);
  font-size: 15px;
  line-height: 1.35;
}

.text-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.22);
}

.emoji-picker {
  display: grid;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--quiet-bg);
  overflow: hidden;
}

.emoji-picker-toggle {
  display: grid;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.emoji-picker-toggle:hover {
  background: var(--hover-wash);
}

.emoji-picker-toggle-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--white);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 20px;
}

.emoji-picker-toggle-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.emoji-picker-toggle-copy strong {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.emoji-picker-toggle-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emoji-picker-toggle-chevron {
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  text-align: center;
}

.emoji-picker-panel {
  display: grid;
  gap: 9px;
  padding: 0 10px 10px;
}

.emoji-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.emoji-search-icon {
  position: absolute;
  left: 10px;
  color: var(--muted);
  font-size: 17px;
  pointer-events: none;
}

.emoji-search {
  width: 100%;
  min-height: 38px;
  padding: 0 32px 0 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
}

.emoji-search:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.22);
}

.emoji-search-clear {
  position: absolute;
  right: 5px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.emoji-search-clear:hover {
  background: var(--hover-wash);
  color: var(--ink);
}

.emoji-catalog {
  display: grid;
  max-height: min(420px, 45vh);
  gap: 5px;
  overflow-y: auto;
  padding-right: 3px;
  overscroll-behavior: contain;
}

.emoji-category {
  border-bottom: 1px solid var(--soft-line);
}

.emoji-category:last-child {
  border-bottom: 0;
}

.emoji-category summary {
  display: flex;
  min-height: 32px;
  padding: 5px 2px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.emoji-category summary::-webkit-details-marker {
  display: none;
}

.emoji-category summary::after {
  margin-left: auto;
  color: var(--muted);
  content: "＋";
  font-size: 14px;
}

.emoji-category[open] summary::after {
  content: "−";
}

.emoji-category summary small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 2px;
  padding: 0 0 7px;
}

.emoji-button {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 29px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 19px;
  line-height: 1;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.emoji-button-image {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.emoji-button-fallback {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 19px;
  line-height: 1;
}

.emoji-button:hover,
.emoji-button:focus-visible {
  border-color: var(--ink);
  background: var(--white);
  transform: translateY(-1px) scale(1.08);
}

.emoji-button:active {
  transform: scale(0.94);
}

.emoji-picker-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.emoji-empty {
  margin: 12px 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.style-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.style-option {
  display: grid;
  min-width: 0;
  min-height: 76px;
  padding: 8px 5px 7px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
}

.style-option:hover {
  border-color: #97958e;
}

.style-option.is-active {
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--cyan);
}

.style-preview {
  display: grid;
  min-width: 47px;
  min-height: 31px;
  padding: 3px 5px;
  place-items: center;
  color: #fff;
  background: #929089;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.style-preview--outline {
  -webkit-text-stroke: 2.4px #111;
  paint-order: stroke fill;
}

.style-preview--boxed {
  border-radius: 5px;
  color: #111;
  background: #fff;
  box-shadow: inset 0 0 0 1px #dad8d1;
}

.style-option small {
  align-self: end;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.font-select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--white);
  font-size: 14px;
  cursor: pointer;
}

.font-select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.color-presets {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 7px;
  margin-bottom: 10px;
}

.color-preset {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgba(21, 21, 21, 0.22);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.color-preset--white { background: #fff; }
.color-preset--black { background: #111; }
.color-preset--yellow { background: #ffe45e; }
.color-preset--pink { background: #fe2c55; }
.color-preset--cyan { background: #25f4ee; }
.color-preset--blue { background: #4d7cfe; }
.color-preset--green { background: #35d07f; }
.color-preset--purple { background: #a855f7; }

.color-preset:hover {
  transform: scale(1.08);
}

.color-preset.is-active::after {
  position: absolute;
  inset: -4px;
  border: 2px solid var(--ink);
  border-radius: inherit;
  content: "";
}

.color-custom {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 9px;
}

.color-picker-wrap {
  display: grid;
  min-width: 0;
  padding: 6px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
}

.color-picker-wrap:focus-within {
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--cyan);
}

#text-color-picker {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}

#text-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

#text-color-picker::-webkit-color-swatch {
  border: 1px solid var(--line);
  border-radius: 50%;
}

#text-color-picker::-moz-color-swatch {
  border: 1px solid var(--line);
  border-radius: 50%;
}

.color-values {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.color-value-row {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  min-width: 0;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.color-value-row:focus-within {
  border-color: var(--ink);
}

.color-value-row > label {
  padding-left: 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
  cursor: text;
}

.color-value-row input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 4px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.color-value-row button {
  align-self: stretch;
  padding: 0 7px;
  border: 0;
  border-left: 1px solid var(--soft-line);
  background: #f4f3ee;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  cursor: pointer;
}

.color-value-row button:hover {
  color: var(--ink);
  background: #eceae3;
}

.alignment-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.alignment-option {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--white);
  cursor: pointer;
}

.alignment-option:hover,
.alignment-option.is-active {
  border-color: var(--ink);
  color: var(--ink);
}

.alignment-option.is-active {
  box-shadow: 2px 2px 0 var(--cyan);
}

.alignment-option svg {
  width: 20px;
  height: 20px;
}

.tone-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tone-option {
  display: flex;
  min-height: 48px;
  gap: 8px;
  padding: 6px 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.tone-option:hover,
.tone-option.is-active {
  border-color: var(--ink);
}

.tone-option.is-active {
  box-shadow: 2px 2px 0 var(--cyan);
}

.tone-swatch {
  display: grid;
  width: 34px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 760;
}

.tone-swatch--white {
  border: 1px solid var(--line);
  color: #111;
  background: #fff;
}

.tone-swatch--black {
  color: #fff;
  background: #111;
}

.shape-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.shape-option {
  display: grid;
  min-height: 88px;
  padding: 9px 7px 7px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
}

.shape-option:hover,
.shape-option.is-active {
  border-color: var(--ink);
}

.shape-option.is-active {
  box-shadow: 2px 2px 0 var(--cyan);
}

.shape-option small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.shape-preview {
  display: grid;
  place-items: center;
  color: #111;
  font-size: 11px;
  font-weight: 760;
}

.shape-preview--lines {
  gap: 2px;
}

.shape-preview--lines i {
  padding: 3px 5px;
  border-radius: 3px;
  background: #e5e3dc;
  font-style: normal;
}

.shape-preview--full {
  width: 76px;
  height: 42px;
  border-radius: 6px;
  background: #e5e3dc;
}

.reset-photo-button {
  width: 100%;
  margin: -6px 0 18px;
}

.range-wrap {
  display: grid;
  grid-template-columns: 1fr 50px;
  gap: 10px;
  align-items: center;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 0;
  appearance: none;
  border-radius: 999px;
  outline: none;
  background: var(--line);
}

input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--cyan);
  cursor: ew-resize;
}

.number-input {
  width: 50px;
  height: 34px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--white);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.inspector-empty {
  padding: 34px 22px;
  color: var(--muted);
  text-align: center;
}

.inspector-empty span {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 20px;
}

.inspector-empty p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(21, 21, 21, 0.48);
  backdrop-filter: blur(8px);
  animation: fade-in 160ms ease both;
}

.modal {
  width: min(440px, 100%);
  padding: 26px;
  border: 1px solid var(--ink);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 9px 9px 0 var(--cyan), -6px -5px 0 var(--red), var(--shadow);
  animation: modal-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal h2 {
  margin: 0 0 7px;
  font-size: 28px;
  letter-spacing: -0.045em;
}

.modal p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.modal input {
  width: 100%;
  height: 49px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--white);
  font-size: 16px;
}

.modal input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.24);
}

.modal textarea,
.modal select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.modal select {
  height: 49px;
  padding-block: 0;
}

.modal textarea:focus,
.modal select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.24);
}

.modal-actions {
  display: flex;
  gap: 9px;
  margin-top: 20px;
  justify-content: flex-end;
}

.paste-destination-modal {
  width: min(520px, 100%);
}

.paste-destination-heading {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.paste-destination-heading .eyebrow {
  margin-bottom: 7px;
}

.paste-destination-options {
  display: grid;
  gap: 10px;
}

.paste-destination-option {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.paste-destination-option:hover,
.paste-destination-option:focus-visible {
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--cyan);
  outline: 0;
  transform: translate(-1px, -1px);
}

.paste-destination-option--primary {
  border-color: var(--ink);
  background: var(--surface);
}

.paste-destination-option strong {
  font-size: 15px;
}

.paste-destination-option span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.application-modal {
  width: min(760px, 100%);
  max-height: min(880px, calc(100vh - 36px));
  overflow: auto;
}

.application-modal-heading {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.application-modal-heading .eyebrow {
  margin-bottom: 7px;
}

.application-form,
.application-field {
  display: grid;
  gap: 7px;
}

.application-form {
  gap: 18px;
}

.application-field small {
  margin-top: -3px;
  color: var(--muted);
  font-size: 11px;
}

.application-field--system {
  padding: 15px;
  border: 1px solid var(--cyan);
  border-radius: 14px;
  background: rgba(37, 244, 238, 0.08);
}

.application-rights-note {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 12px;
  line-height: 1.45;
}

.application-rights-note span {
  color: var(--muted);
}

.inspirations-page {
  padding-top: 54px;
}

.inspirations-hero {
  display: flex;
  gap: 28px;
  margin-bottom: 38px;
  align-items: end;
  justify-content: space-between;
}

.inspirations-hero .button--small {
  margin-bottom: 28px;
}

.inspirations-hero .eyebrow {
  display: flex;
  width: fit-content;
}

.inspirations-hero h1 {
  font-size: clamp(48px, 7vw, 82px);
}

.inspirations-hero p:not(.eyebrow) {
  max-width: 610px;
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.inspiration-folder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.inspiration-folder-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--ink);
  border-radius: 8px 20px 20px 20px;
  background: var(--panel);
  box-shadow: 5px 5px 0 rgba(37, 244, 238, 0.65);
}

.inspiration-folder-tab {
  position: absolute;
  bottom: 100%;
  left: -1px;
  padding: 7px 16px 5px;
  border: 1px solid var(--ink);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: var(--panel);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.inspiration-slide-stack {
  display: grid;
  min-height: 210px;
  padding: 12px;
  place-items: center;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-radius: 14px;
  background: var(--surface);
}

.inspiration-slide-stack img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border: 2px solid var(--panel);
  border-radius: 8px;
  box-shadow: 0 7px 18px rgba(21, 21, 21, 0.18);
  transform: rotate(calc((var(--slide-index, 0) - 2) * 1deg));
}

.inspiration-slide-stack img + img {
  margin-left: -12px;
}

.inspiration-folder-meta {
  display: flex;
  gap: 16px;
  margin-top: 17px;
  align-items: start;
  justify-content: space-between;
}

.inspiration-folder-meta small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.inspiration-folder-meta h2 {
  margin: 5px 0 4px;
  font-size: 22px;
  letter-spacing: -0.045em;
}

.inspiration-folder-meta p,
.inspiration-notes {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.inspiration-folder-meta a {
  color: inherit;
  font-weight: 800;
}

.inspiration-delete {
  flex: 0 0 auto;
}

.inspiration-open { margin-top: 16px; width: 100%; }
.inspiration-notes summary { cursor: pointer; font-weight: 700; }
.inspiration-notes > p { margin: 10px 0 0; }
.inspiration-viewer { width: min(1120px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; }
.inspiration-viewer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.inspiration-viewer-heading .icon-button { flex: 0 0 auto; }
.inspiration-viewer a { color: var(--ink); }
.inspiration-viewer .inspiration-viewer-help { color: var(--muted); font-size: 13px; }
.inspiration-viewer-slides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; }
.inspiration-viewer-slides figure { min-width: 0; margin: 0; }
.inspiration-viewer-slides img { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--surface); }
.inspiration-viewer-slides figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-size: 12px; }
@media (max-width: 640px) {
  .inspiration-viewer-backdrop { padding: 10px; }
  .inspiration-viewer { padding: 18px; max-height: calc(100dvh - 20px); }
  .inspiration-viewer-slides { grid-template-columns: 1fr; }
}

.inspiration-notes {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}

.inspiration-empty,
.inspiration-loading {
  display: grid;
  min-height: 280px;
  padding: 36px;
  place-items: center;
  align-content: center;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.inspiration-empty strong {
  color: var(--ink);
  font-size: 22px;
}

.inspiration-empty p {
  max-width: 430px;
  margin: 8px 0 20px;
}

.inspiration-upload-modal {
  width: min(720px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  overflow: auto;
}

.app-screen-upload-modal {
  width: min(720px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  overflow: auto;
}

.app-screen-category-grid {
  display: grid;
  gap: 22px;
}

.app-screen-category-card {
  padding: 20px;
  border: 1px solid var(--ink);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 5px 5px 0 rgba(254, 44, 85, 0.42);
}

.app-screen-category-card > header {
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
}

.app-screen-category-card header small,
.app-screen-item small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.app-screen-category-card h2 {
  margin: 4px 0 0;
  font-size: 23px;
  letter-spacing: -.04em;
}

.app-screen-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.app-screen-item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.app-screen-item img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: var(--white);
}

.app-screen-item > div {
  display: grid;
  gap: 5px;
  padding: 11px;
}

.app-screen-item strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.app-screen-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.app-screen-item > .icon-button {
  position: absolute;
  top: 7px;
  right: 7px;
  background: rgba(255, 255, 255, .92);
}

.app-screen-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.inspiration-form-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}

.inspiration-file-preview {
  display: grid;
  gap: 5px;
  max-height: 150px;
  padding: 12px 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
}

.inspiration-file-preview strong {
  color: var(--ink);
}

.telegram-button svg {
  width: 17px;
  height: 17px;
}

.analytics-button svg {
  width: 17px;
  height: 17px;
}

.button--small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.tiktok-local-modal { width: min(760px, 100%); max-height: 90vh; overflow-y: auto; }
.tiktok-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.tiktok-field { display: grid; gap: 6px; margin: 12px 0; font-size: 13px; }
.tiktok-form { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 8px; }
.tiktok-notice { padding: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.tiktok-connection p { margin: 8px 0; }
.tiktok-connection .button { margin: 4px 6px 4px 0; }
.tiktok-account-state { padding: 12px; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.tiktok-account-state[data-state="connected"] { color: #116b3e; background: #e9f8ef; border-color: #a4d7b8; }
.tiktok-account-state[data-state="needs_check"] { color: #80521a; background: #fff5e5; border-color: #e6c48f; }
.tiktok-field select { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--paper); font: inherit; }
.tiktok-job { border: 1px solid var(--line); border-radius: 12px; padding: 15px; margin-top: 12px; }
.tiktok-job p { margin: 8px 0; }
.tiktok-job .button { margin: 6px 6px 6px 0; }
.tiktok-job-state { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.tiktok-check { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0; font-size: 13px; }
.tiktok-check input { width: 18px; height: 18px; flex-shrink: 0; }
.tiktok-local-modal [data-status] { margin-top: 14px; }
.telegram-modal {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
}

.telegram-modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.telegram-modal-heading .eyebrow {
  margin-bottom: 6px;
}

.telegram-modal-heading h2 {
  margin-bottom: 0;
}

.analytics-modal {
  position: relative;
  width: min(760px, 100%);
  max-height: min(820px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 22px;
  box-shadow: 12px 12px 0 var(--cyan), -7px -6px 0 var(--red), var(--shadow);
}

.analytics-entry-modal {
  width: min(720px, 100%);
}

.analytics-close {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  font-size: 23px;
  line-height: 1;
}

.analytics-modal-intro {
  display: flex;
  margin-bottom: 24px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-right: 34px;
}

.analytics-modal-intro .eyebrow {
  margin-bottom: 8px;
}

.analytics-modal-intro h2 {
  max-width: 520px;
  margin: 0 0 9px;
  font-size: clamp(27px, 5vw, 42px);
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.analytics-modal-intro p:not(.eyebrow) {
  max-width: 540px;
  margin: 0;
}

.analytics-target {
  display: grid;
  min-width: 86px;
  padding: 11px 10px 9px;
  border: 1px solid var(--ink);
  border-radius: 13px;
  background: var(--cyan);
  color: #111;
  text-align: center;
  transform: rotate(2deg);
}

.analytics-target strong {
  font-size: 29px;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.analytics-target span {
  margin-top: 5px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.analytics-campaign-form {
  padding: 14px 16px 13px;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: var(--card-wash);
}

.analytics-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.analytics-campaign-form .analytics-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-campaign-form .modal-actions {
  margin-top: 9px;
}

.analytics-campaign-form .button {
  border-color: transparent;
  background: transparent;
}

.analytics-manual-note {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}

.analytics-analysis-note {
  display: grid;
  gap: 4px;
  margin: 0 0 24px;
  padding: 12px 14px;
  border-left: 4px solid var(--cyan);
  border-radius: 0 12px 12px 0;
  background: var(--quiet-bg);
}

.analytics-analysis-note strong { font-size: 13px; }
.analytics-analysis-note span,
.analytics-analysis-note small { color: var(--muted); font-size: 11px; }

.analytics-variant-list {
  display: grid;
  gap: 10px;
}

.analytics-variant {
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: var(--card-wash);
}

.analytics-variant.is-reference { border-color: var(--cyan); }
.analytics-variant > p { margin: 11px 0; color: var(--muted); font-size: 12px; }
.analytics-history-heading { margin-top: 28px; }

.analytics-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 22px;
}

.analytics-overview-card {
  min-height: 94px;
  padding: 13px 14px;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: var(--panel);
}

.analytics-overview-card small,
.analytics-overview-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.analytics-overview-card strong {
  display: inline-block;
  margin: 8px 4px 1px 0;
  font-size: 25px;
  letter-spacing: -0.06em;
}

.analytics-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
}

.analytics-actions .button svg,
.analytics-inline-link svg {
  width: 15px;
  height: 15px;
}

.analytics-section-heading {
  display: flex;
  margin-bottom: 10px;
  align-items: end;
  justify-content: space-between;
  border-bottom: 1px solid var(--soft-line);
}

.analytics-section-heading .eyebrow {
  margin-bottom: 6px;
}

.analytics-section-heading h3 {
  margin: 0 0 11px;
  font-size: 18px;
  letter-spacing: -0.04em;
}

.analytics-section-heading > span {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.analytics-publication-list {
  display: grid;
  gap: 10px;
}

.analytics-publication {
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: var(--card-wash);
}

.analytics-publication-heading,
.analytics-publication-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.analytics-publication-heading > div {
  display: grid;
  gap: 3px;
}

.analytics-publication-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.analytics-publication-heading strong {
  font-size: 14px;
}

.analytics-publication-heading small,
.analytics-publication-footer > span {
  color: var(--muted);
  font-size: 11px;
}

.analytics-status {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.analytics-status.is-success {
  border-color: var(--red);
  color: var(--red);
}

.analytics-status.is-learning {
  border-color: var(--cyan);
  color: var(--ink);
}

.analytics-publication-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.analytics-publication-metrics span {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border-radius: 9px;
  background: var(--quiet-bg);
}

.analytics-publication-metrics strong {
  font-size: 17px;
  letter-spacing: -0.04em;
}

.analytics-publication-metrics small {
  color: var(--muted);
  font-size: 10px;
}

.analytics-publication-footer {
  align-items: center;
}

.analytics-publication-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-snapshot-history {
  margin-top: 12px;
  border-top: 1px solid var(--soft-line);
  padding-top: 10px;
}

.analytics-snapshot-history summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.analytics-snapshot-history ol {
  display: grid;
  margin: 10px 0 0;
  padding-left: 18px;
  gap: 7px;
}

.analytics-snapshot-history li {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 2px 12px;
  font-size: 11px;
}

.analytics-snapshot-history li small { grid-column: 1 / -1; color: var(--muted); }

.analytics-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.analytics-inline-link:hover {
  color: var(--red);
}

.analytics-empty {
  display: grid;
  padding: 28px 20px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  text-align: center;
}

.analytics-empty-mark {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: var(--cyan);
  font-size: 22px;
  transform: rotate(-8deg);
}

.analytics-empty strong {
  font-size: 15px;
}

.analytics-empty p {
  max-width: 420px;
  margin: 7px 0 16px;
}

.analytics-report-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.analytics-report-stat {
  display: grid;
  gap: 4px;
  padding: 13px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: var(--quiet-bg);
}

.analytics-report-stat strong {
  font-size: 22px;
  letter-spacing: -0.06em;
}

.analytics-report-stat span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.analytics-report-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 11px;
}

.analytics-slide-report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.analytics-slide-report {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 13px;
  background: var(--card-wash);
}

.analytics-slide-report img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: var(--quiet-bg);
}

.analytics-slide-report figcaption {
  display: grid;
  gap: 3px;
  padding: 9px 10px 10px;
}

.analytics-slide-report figcaption span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.analytics-slide-report figcaption strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-entry-form textarea,
.analytics-entry-form input,
.analytics-entry-form select,
.analytics-campaign-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 14px;
}

.analytics-entry-form textarea {
  min-height: 78px;
  resize: vertical;
}

.analytics-entry-form input:focus,
.analytics-entry-form textarea:focus,
.analytics-entry-form select:focus,
.analytics-campaign-form input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.24);
}

.analytics-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 10px;
}

.analytics-metric-grid .telegram-field span {
  min-height: 28px;
}

.analytics-import-preview {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--cyan);
  border-radius: 12px;
  background: var(--quiet-bg);
}

.analytics-import-preview strong,
.analytics-import-preview span {
  display: block;
}

.analytics-import-preview p {
  margin: 7px 0;
}

.analytics-import-preview ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--danger);
  font-size: 12px;
}

.analytics-import-preview .button {
  margin-top: 12px;
}

.telegram-field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.telegram-field input,
.telegram-field select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
}

.telegram-field input:focus,
.telegram-field select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.24);
}

.telegram-connected {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 16px;
  color: var(--ink);
  font-size: 13px;
}

.telegram-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green, #35d07f);
  box-shadow: 0 0 0 4px rgba(53, 208, 127, 0.16);
}

.telegram-steps {
  display: grid;
  gap: 9px;
  margin: 0 0 4px;
  padding-left: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.telegram-steps code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--ink);
  font-size: 12px;
}

.telegram-discover-actions {
  justify-content: flex-start;
}

.telegram-candidates {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}

.telegram-candidates strong {
  color: var(--ink);
}

.telegram-candidates ul {
  display: grid;
  gap: 4px;
  margin: 7px 0 0;
  padding-left: 16px;
}

.telegram-file-note,
.telegram-send-status {
  margin: 14px 0 0 !important;
  font-size: 12px !important;
}

.telegram-send-status {
  min-height: 18px;
  color: var(--ink) !important;
}

.layer-menu {
  position: fixed;
  z-index: 80;
  display: grid;
  min-width: 214px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.layer-menu--confirm {
  min-width: 132px;
}

.layer-menu-item {
  display: flex;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  align-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.layer-menu-item:hover {
  background: var(--menu-hover);
}

.layer-menu-item svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.layer-menu-item.is-danger {
  color: var(--danger);
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  max-width: min(380px, calc(100vw - 44px));
  padding: 12px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--cyan);
  font-size: 12px;
  font-weight: 650;
  animation: toast-in 220ms ease both;
}

.hidden-input {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

.theme-select {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 8px;
  font: inherit;
  max-width: 100px;
}

.content-project-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.content-project-actions .button svg,
.content-project-empty-actions .button svg { width: 15px; height: 15px; }
.content-project-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.content-project-actions .button--danger { color: var(--danger); }

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #f4f5f0;
    --muted: #b9bbb3;
    --body-text: #d6d8d0;
    --paper: #121310;
    --panel: #1c1d19;
    --line: #72756c;
    --soft-line: #3b3d37;
    --white: #242520;
    --danger: #ff9caf;
    --danger-line: #995463;
    --grid-line: rgba(255, 255, 255, 0.04);
    --header-bg: rgba(18, 19, 16, 0.9);
    --rail-bg: rgba(28, 29, 25, 0.88);
    --quiet-bg: rgba(255, 255, 255, 0.06);
    --icon-bg: rgba(255, 255, 255, 0.08);
    --card-wash: rgba(28, 29, 25, 0.7);
    --hover-wash: rgba(255, 255, 255, 0.08);
    --menu-hover: rgba(255, 255, 255, 0.09);
    --workspace-center: rgba(55, 57, 51, 0.74);
    --workspace-edge: rgba(25, 26, 23, 0.9);
    --workspace-dot: rgba(255, 255, 255, 0.22);
    --canvas-action-bg: rgba(31, 32, 28, 0.95);
    --canvas-action-border: rgba(255, 255, 255, 0.28);
    --canvas-action-shadow: rgba(0, 0, 0, 0.38);
    --empty-bg: rgba(28, 29, 25, 0.78);
    --shadow: 0 20px 58px rgba(0, 0, 0, 0.44);
  }

  :root[data-theme="dark"] .project-card:hover,
  :root[data-theme="dark"] .new-project-card:hover,
  :root[data-theme="dark"] .style-option:hover {
    border-color: #9a9d92;
  }

  :root[data-theme="dark"] .github-mark {
    filter: invert(1);
  }

  :root[data-theme="dark"] .project-preview,
  :root[data-theme="dark"] .thumb-image {
    background: #2c2e29;
  }

  :root[data-theme="dark"] .project-preview-empty {
    color: var(--muted);
    background:
      linear-gradient(135deg, transparent 49.5%, rgba(255, 255, 255, 0.11) 50%, transparent 50.5%),
      #30322d;
  }

  :root[data-theme="dark"] .asset-trash {
    border-color: #777a71;
    color: var(--muted);
    background: #2c2e29;
  }

  :root[data-theme="dark"] .asset-trash.is-hot {
    border-color: var(--ink);
    color: var(--ink);
    background: #45483f;
  }

  :root[data-theme="dark"] .stage-wrap {
    filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.48));
  }

  :root[data-theme="dark"] .empty-stage {
    border-color: #777a71;
  }

  :root[data-theme="dark"] .empty-stage-graphic {
    background: #3b3d36;
  }

  :root[data-theme="dark"] .color-value-row button {
    background: #30312c;
  }

  :root[data-theme="dark"] .color-value-row button:hover {
    background: #3b3d36;
  }

  :root[data-theme="dark"] .color-preset {
    border-color: rgba(255, 255, 255, 0.52);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28);
  }

  :root[data-theme="dark"] .tone-swatch--black {
    border: 1px solid #777a71;
  }

  :root[data-theme="dark"] .modal-backdrop {
    background: rgba(0, 0, 0, 0.7);
  }

  :root[data-theme="dark"] .inspector.is-mobile-open {
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.42);
  }

@media (max-width: 1040px) {
  .editor-shell {
    grid-template-columns: 148px 132px minmax(280px, 1fr) 250px;
  }

  .canvas-composition {
    gap: 12px;
  }

  .canvas-actions {
    width: 112px;
    flex-basis: 112px;
  }

  .dashboard-hero {
    display: block;
  }

  .dashboard-intro {
    margin: 28px 0 0;
  }
}

@media (max-width: 780px) {
  .app-header {
    height: 62px;
    padding: 0 14px;
  }

  .brand-copy small,
  .project-identity {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .share-button,
  .header-actions .telegram-button,
  .header-actions .analytics-button {
    width: 42px;
    padding: 0;
  }

  .legal-shell {
    display: block;
    width: min(100% - 32px, 680px);
    padding: 54px 0 72px;
  }

  .legal-intro {
    position: static;
    margin-bottom: 58px;
  }

  .legal-header .brand-copy small,
  .legal-nav > a,
  .legal-nav > .button {
    display: none;
  }

  .legal-meta dd {
    overflow-wrap: anywhere;
  }

  .public-footer {
    display: grid;
    width: min(100% - 32px, 1160px);
    gap: 16px;
  }

  .public-footer nav {
    flex-wrap: wrap;
    gap: 10px 20px;
  }

  .header-actions .share-button span,
  .header-actions .telegram-button span,
  .header-actions .analytics-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .editor-shell {
    height: calc(100vh - 62px);
    grid-template-columns: 68px 64px minmax(200px, 1fr);
  }

  .slide-rail,
  .asset-rail {
    grid-column: auto;
  }

  .rail-heading {
    justify-content: center;
  }

  .rail-heading h2,
  .rail-heading span,
  .slide-number,
  .rail-upload .button,
  .asset-empty {
    font-size: 0;
  }

  .asset-grid {
    grid-template-columns: 1fr;
    padding: 4px 6px 10px;
  }

  .asset-remove {
    opacity: 1;
  }

  .asset-trash {
    min-height: 32px;
    margin: 0 6px 8px;
    padding: 0;
  }

  .asset-trash span {
    display: none;
  }

  .slide-thumb {
    display: block;
    padding: 5px;
  }

  .inspector {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 132px;
    display: none;
    max-height: 62vh;
    border-top: 1px solid var(--line);
    box-shadow: 0 -20px 40px rgba(21, 21, 21, 0.16);
  }

  .inspector.is-mobile-open {
    display: block;
  }

  .workspace-inner {
    padding: 20px 14px 72px;
  }

  .canvas-composition {
    gap: 10px;
  }

  .canvas-actions {
    width: 44px;
    flex-basis: 44px;
  }

  .canvas-action {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .canvas-action span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .mobile-edit-button {
    display: inline-flex !important;
  }

  .project-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard {
    width: min(100% - 28px, 1160px);
    padding-top: 54px;
  }

  .application-summary {
    grid-template-columns: repeat(4, 1fr);
  }

  .application-summary > div {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
  }

  .inspiration-folder-grid {
    grid-template-columns: 1fr;
  }

  .app-screen-thumbnails {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-form-grid,
  .analytics-campaign-form .analytics-form-grid {
    grid-template-columns: 1fr;
  }

  .analytics-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-report-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 781px) {
  .mobile-edit-button {
    display: none !important;
  }
}

@media (max-width: 430px) {
  .app-header--editor .brand-copy {
    display: none;
  }
}

@media (max-width: 560px) {
  .theme-select { max-width: 76px; padding: 6px 3px; font-size: 11px; }
  .app-header { gap: 6px; padding-inline: 10px; }
  .app-header--editor > .project-identity { gap: 7px; }
  .canvas-format-selector { gap: 5px; }
  .canvas-format-selector legend { font-size: 9px; }
  .canvas-format-options { padding: 2px; }
  .canvas-format-option { min-width: 48px; height: 27px; padding-inline: 5px; gap: 4px; }
  .brand { gap: 7px; flex: 0 0 auto; }
  .brand-mark { width: 24px; height: 29px; }
  .brand-copy strong { font-size: 12px; }
  .header-actions { min-width: 0; gap: 5px; justify-content: flex-end; }
  .header-actions > .button { min-width: 0; padding-inline: 12px; font-size: 11px; }
  .header-actions [data-action="new-project"] { display: none; }
  .agent-connect-button { max-width: 118px; }
  .header-actions [data-action="export"] {
    width: 42px;
    padding: 0;
  }

  .header-actions [data-action="export"] span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .analytics-modal {
    padding: 20px 16px;
  }

  .analytics-modal-intro {
    display: block;
  }

  .analytics-target {
    display: inline-grid;
    margin-top: 12px;
  }

  .analytics-overview-grid,
  .analytics-publication-metrics {
    gap: 6px;
  }

  .analytics-report-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-slide-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-report-meta {
    display: grid;
  }

  .analytics-overview-card {
    min-height: 82px;
    padding: 10px;
  }

  .analytics-overview-card strong {
    font-size: 20px;
  }

  .analytics-publication-heading,
  .analytics-publication-footer {
    display: block;
  }

  .analytics-status {
    margin-top: 9px;
  }

  .analytics-publication-footer > div {
    margin-top: 10px;
    justify-content: space-between;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .application-switcher-row,
  .application-switcher-row > div {
    display: grid;
  }

  .application-switcher-row > div {
    grid-template-columns: 1fr 1fr;
  }

  .application-summary {
    grid-template-columns: 1fr 1fr;
  }

  .application-summary > span {
    min-height: 76px;
  }

  .application-summary > span:nth-of-type(odd) {
    border-left: 0;
  }

  .inspirations-hero,
  .inspiration-form-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .inspiration-slide-stack {
    min-height: 160px;
  }

  .dashboard h1 {
    font-size: 48px;
  }

  .dashboard-intro {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Editorial language and manual account assignment, independent of posting. */
.carousel-audience-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.carousel-audience-controls label { display: grid; gap: 4px; flex: 1 1 110px; min-width: 0; font-size: 12px; }
.carousel-audience-controls select, .audience-toolbar select { width: 100%; min-width: 0; max-width: 100%; border: 1px solid #d8d5ce; border-radius: 8px; background: #fff; color: #242323; padding: 8px; font: inherit; }
.carousel-audience-selection { display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 12px; }
.audience-toolbar { padding: 14px; margin: 14px 0; border: 1px solid #ddd9d0; border-radius: 12px; }
.audience-toolbar > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.audience-toolbar label { display: flex; align-items: center; gap: 6px; }
.audience-toolbar select { width: auto; max-width: 230px; }
.audience-toolbar p { margin: 0; font-size: 12px; color: #605d56; }
.project-options { margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.project-options > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 14px 18px; cursor: pointer; list-style: none; }
.project-options > summary::-webkit-details-marker { display: none; }
.project-options > summary::before { content: "›"; font-size: 22px; line-height: 1; transition: transform .15s ease; }
.project-options[open] > summary::before { transform: rotate(90deg); }
.project-options > summary > span { color: var(--muted); font-size: 12px; }
.project-options > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: var(--radius); }
.project-options-content { padding: 0 14px 14px; }
.project-options-content .project-image-scope { margin-bottom: 12px; }
.project-options-content .audience-toolbar { margin-bottom: 0; }

.project-account-selector { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 18px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.project-account-selector label { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.project-account-selector select { max-width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: inherit; font: inherit; font-weight: 600; }
.project-account-selector p, .inherited-history-note { color: var(--muted); font-size: 12px; }
