/* Kadraj Studio
   Layout: a camera-monitor feel. Deep ink ground, panels like monitor bezels,
   amber "tally light" for the one action that creates something, viewfinder
   blue for frame guides. Steps on the left, the work on the right. */
:root {
  --ink: #0e1117;
  --panel: #161a22;
  --panel-2: #1d222c;
  --line: #2a303c;
  --text: #ece8e1;
  --muted: #98a1ad;
  --tally: #f2a33a;
  --tally-ink: #1a1206;
  --frame: #7db4cf;
  --ok: #5cc28a;
  --warn: #e7b84a;
  --bad: #ef6a5b;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px rgba(0, 0, 0, .28);

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --r: 14px;
  --r-sm: 9px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink: #eceff3; --panel: #ffffff; --panel-2: #f5f7fa; --line: #d5dbe3;
    --text: #151a21; --muted: #5a6573; --tally: #c76b00; --tally-ink: #ffffff;
    --frame: #2d6d8c; --ok: #1f8a52; --warn: #9a6a00; --bad: #c2392b;
    --shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 8px 24px rgba(20, 30, 45, .07);
    color-scheme: light;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] {
  --ink: #eceff3; --panel: #ffffff; --panel-2: #f5f7fa; --line: #d5dbe3;
  --text: #151a21; --muted: #5a6573; --tally: #c76b00; --tally-ink: #ffffff;
  --frame: #2d6d8c; --ok: #1f8a52; --warn: #9a6a00; --bad: #c2392b;
  --shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 8px 24px rgba(20, 30, 45, .07);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--panel); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0; }
a { color: var(--frame); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--frame); outline-offset: 2px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { font: 600 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1440px; margin: 0 auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; }
.brand-mark { width: 26px; height: 26px; position: relative; }
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; width: 10px; height: 10px; border-color: var(--tally); border-style: solid;
}
.brand-mark::before { top: 0; left: 0; border-width: 2.5px 0 0 2.5px; }
.brand-mark::after { bottom: 0; right: 0; border-width: 0 2.5px 2.5px 0; }
.brand-mark i { position: absolute; inset: 8px; border-radius: 50%; background: var(--tally); }
.brand-name { font: 700 1.2rem/1 var(--display); letter-spacing: -.02em; }
.brand-name span { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav button {
  background: none; border: 0; padding: 7px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; font-weight: 600;
}
.nav button[aria-current="page"] { color: var(--text); background: var(--panel-2); }
.nav button:hover { color: var(--text); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.credits-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2); font: 600 .85rem/1 var(--mono); cursor: pointer;
}
.credits-pill b { color: var(--tally); }
.credits-pill .usd { color: var(--muted); font-weight: 500; }
/* The top bar keeps one height: a job starting (the activity pill) never pushes the page down. */
.act-wrap { min-width: 8.5rem; display: flex; justify-content: flex-end; }
@media (min-width: 861px) {
  .nav { min-width: 0; }
  .nav button { white-space: nowrap; }
  .top-right { flex-shrink: 0; }
  .brand-name { white-space: nowrap; }
  .nav .nav-credits { display: none; }   /* the credits pill opens the same page */
}
@media (min-width: 861px) and (max-width: 1100px) {
  .brand-name span { display: none; }   /* "Kadraj" alone: room for the menu */
  .top-in { gap: 12px; }
  .nav button { padding: 7px 9px; }
}
.theme-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 1rem; line-height: 1; cursor: pointer; }
.theme-btn:hover { border-color: var(--tally); color: var(--tally); }
.lang-switch button { padding: 5px 10px; font: 600 .78rem/1 var(--mono); }
.demo-band {
  background: color-mix(in srgb, var(--warn) 14%, var(--panel)); border-bottom: 1px solid var(--line); font-size: .86rem;
}
.demo-band div {
  max-width: 1160px; margin: 0 auto; padding-block: 7px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- page ---------- */
main {
  max-width: 1160px; margin: 0 auto; padding-block: 28px 64px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2);
  font-weight: 650; cursor: pointer; text-decoration: none; color: var(--text); white-space: nowrap;
}
.btn:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--line)); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-go { background: var(--tally); color: var(--tally-ink); border-color: transparent; }
.btn-go:hover { filter: brightness(1.06); border-color: transparent; }
.btn-go .rec { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .8; }
.btn-quiet { background: none; border-color: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--text); }
.btn-sm { padding: 6px 11px; font-size: .86rem; border-radius: 8px; }
.btn-danger { color: var(--bad); }

/* ---------- home ---------- */
.home-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 26px; max-width: 62ch; }
/* Home: four groups of modules, drafts to continue, finished results with a next step */
.home-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 32px; }
.home-group { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.home-group h2, .home-group h3 { font-size: 1.1rem; }
.home-about { font-size: .85rem; margin-top: 2px; }
.home-mods { display: flex; flex-direction: column; gap: 6px; }
.home-mod {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%;
  background: var(--panel-2); border: 1px solid transparent; border-radius: 9px; padding: 10px 12px; color: var(--text); cursor: pointer;
}
.home-mod:hover { border-color: var(--tally); }
.home-mod b { font-weight: 600; }
.home-mod span { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.home-mod small { color: var(--muted); font: 500 .74rem/1.3 var(--mono); margin-top: 3px; }
body:has(.home-groups) main { max-width: 1320px; }
.home-head-2 { margin-bottom: 16px; }
.home-work { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 12px; margin-bottom: 32px; }
.home-work-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; align-items: flex-start; min-width: 0; }
.home-work-card .w-run { color: var(--tally); }
.home-work-card .w-ok { color: var(--ok); }
.home-work-card .act-list { width: 100%; }
.home-work-row { display: flex; flex-direction: column; gap: 3px; width: 100%; min-width: 0; align-items: flex-start; }
.home-work-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.work-title { background: none; border: 0; padding: 0; color: var(--text); font-weight: 600; text-align: left; cursor: pointer; }
.work-link { background: none; border: 0; padding: 2px 0; color: var(--tally); font-weight: 600; font-size: .88rem; text-align: left; cursor: pointer; }
.work-title:hover, .work-link:hover { text-decoration: underline; }
/* The owner's pages under one menu; on a phone simply listed */
.owner-menu { position: relative; }
.owner-btn { background: none; border: 0; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.owner-btn:hover { color: var(--text); }
.owner-btn[aria-current="page"] { color: var(--text); background: var(--panel-2); }
.owner-list { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 150px; flex-direction: column; gap: 2px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.owner-list.open { display: flex; }
.owner-list button { width: 100%; text-align: left; }
@media (max-width: 860px) {
  .owner-btn { display: none; }
  .owner-list { display: flex; position: static; padding: 0; background: none; border: 0; box-shadow: none; }
}
.home-sub { font-size: 1.15rem; margin-top: 8px; }
.home-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.home-detail { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.home-finished { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 28px; }
.home-done { display: flex; flex-direction: column; gap: 8px; }
.home-done .row { gap: 6px; }
@media (max-width: 1100px) { .home-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* A duet's / music video's pieces on the progress card */
.parts { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 640px; margin: 4px auto 0; text-align: left; }
.parts-head { display: flex; flex-direction: column; gap: 6px; }
.parts-bar { width: 100%; }
.parts-row { display: flex; align-items: center; gap: 10px; }
.parts-who { width: 72px; flex: none; font-weight: 600; font-size: .85rem; }
.parts-line { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.part {
  flex: 1 1 64px; min-width: 56px; display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 6px 8px; border-radius: 8px; font-size: .72rem; line-height: 1.2; border: 1px solid transparent;
}
.part small { font: 600 .68rem/1 var(--mono); opacity: .8; }
.part.p-done { background: color-mix(in srgb, #3ecf8e 22%, var(--panel)); color: var(--text); }
.part.p-making { background: var(--tally); color: var(--tally-ink); }
.part.p-again { background: color-mix(in srgb, #6fa8ff 14%, var(--panel)); border: 1px dashed #6fa8ff; color: var(--text); }
.part.p-wait { background: var(--panel-2); color: var(--muted); }
.part.p-bad { background: color-mix(in srgb, #ff6b6b 22%, var(--panel)); color: var(--text); }
.parts-note { border: 1px solid color-mix(in srgb, #6fa8ff 50%, var(--line)); border-radius: 10px; padding: 10px 12px; }
/* Credits page: this month's spending and your limit */
.spending { margin-bottom: 18px; }
.spend-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: .9rem; }
.spend-bar { grid-column: 1 / -1; width: 100%; }
.budget-usd, .consent input.budget-usd { width: 7em; height: auto; min-height: 40px; display: inline-block; padding: 6px 10px; margin: 0 6px; font-size: 1rem; }
.history-day td { padding-top: 14px; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .home-groups { grid-template-columns: minmax(0, 1fr); } }
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.path {
  display: flex; flex-direction: column; gap: 14px; text-align: left; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow);
}
.path:hover { border-color: var(--tally); }
.path-art { aspect-ratio: 16 / 9; border-radius: 10px; position: relative; overflow: hidden; background: var(--panel-2); max-width: 100%; }
.path h2 { font-size: 1.3rem; }
.path ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: .9rem; }
.path ul b { color: var(--text); font-weight: 600; }
.path .btn { align-self: flex-start; margin-top: auto; }
.path-later { margin-top: 16px; display: flex; gap: 14px; align-items: center; padding: 14px 18px; border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); }
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 36px 0 14px; }

/* path illustrations: built from frame guides, no images */
.art-picture { background: linear-gradient(160deg, #2b3b57, #b8743c 70%, #e7c98e); }
.art-picture::after { content: ""; position: absolute; inset: 14% 10%; border: 1.5px solid rgba(255, 255, 255, .55); }
.art-motion { background: linear-gradient(160deg, #1f3b3f, #3f7f7a 60%, #d8b06a); }
.art-motion::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.0) 0 22%, rgba(255,255,255,.18) 22% 23%); animation: slide 6s linear infinite; }
.art-story { background: #1c1f26; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 10px; }
.art-story span { border-radius: 4px; }
.art-story span:nth-child(1) { background: linear-gradient(150deg, #3b4a6b, #c27c3a); }
.art-story span:nth-child(2) { background: linear-gradient(150deg, #4b4d45, #d9cfae); }
.art-story span:nth-child(3) { background: linear-gradient(150deg, #16232b, #e3a25b); }
.art-story i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--tally) 40%, rgba(255,255,255,.15) 40%); align-self: end; }
@keyframes slide { to { transform: translateX(23%); } }
@media (prefers-reduced-motion: reduce) { .art-motion::before, .kb { animation: none !important; } }

/* ---------- wizard ---------- */
.wizard { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.steps { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); display: flex; flex-direction: column; gap: 2px; }
.steps .eyebrow { margin-bottom: 10px; }
.step-link {
  display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; text-align: left;
  background: none; border: 0; padding: 8px 6px; border-radius: 8px; color: var(--muted); cursor: pointer;
}
.step-link:disabled { cursor: default; }
.step-link .n {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line); font: 600 .78rem/1 var(--mono);
}
.step-link.done .n { border-color: var(--ok); color: var(--ok); }
.step-link[aria-current="step"] { color: var(--text); background: var(--panel); }
.step-link[aria-current="step"] .n { border-color: var(--tally); background: var(--tally); color: var(--tally-ink); }
.work { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.work-head { display: flex; flex-direction: column; gap: 6px; }
.work-head p { max-width: 62ch; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.footer-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px;
}
.cost { display: inline-flex; align-items: center; gap: 8px; font: 500 .86rem/1.3 var(--mono); color: var(--muted); }
.cost b { color: var(--text); font-weight: 700; }
.cost .owner { color: var(--ok); }
.cost .usd-note, .usd-note { color: var(--muted); font-weight: 500; white-space: nowrap; }

label.field { display: flex; flex-direction: column; gap: 7px; font-weight: 600; }
label.field small { font-weight: 400; color: var(--muted); }
input[type="text"], textarea, select {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
}
textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
textarea.big { min-height: 120px; font-size: 1.05rem; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--frame); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: none; border-radius: 999px; padding: 6px 12px; font-size: .86rem; cursor: pointer; color: var(--muted);
}
.chip:hover { color: var(--text); border-color: var(--frame); }
.chip[aria-pressed="true"] { color: var(--tally-ink); background: var(--tally); border-color: var(--tally); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: .88rem; }
.tab-sm { padding: 4px 11px; font-size: .8rem; }
.idea-box { gap: 10px; }
.tab[aria-selected="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }

/* style cards */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.style-card {
  text-align: left; background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 12px; padding: 0; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
}
.style-card[aria-pressed="true"] { border-color: var(--tally); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tally) 25%, transparent); }
.style-swatch { aspect-ratio: 16 / 9; position: relative; max-width: 100%; overflow: hidden; }
/* (2 Dec 2026) the same kite scene drawn in this look (public/img/looks, tools/make-look-previews.mjs); the colour band stays if it is missing */
.style-swatch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.style-swatch:has(img)::after { display: none; }
.style-swatch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 0 48%, rgba(255,255,255,.12) 48% 52%, transparent 52%), linear-gradient(65deg, transparent 0 60%, rgba(0,0,0,.18) 60%); }
.style-card .meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.style-card .meta b { font-size: .95rem; }
.style-card .meta span { font-size: .82rem; color: var(--muted); line-height: 1.4; }

/* aspect tiles */
.aspects { display: flex; gap: 10px; flex-wrap: wrap; }
.aspect {
  display: grid; grid-template-columns: 54px auto; gap: 12px; align-items: center; text-align: left;
  background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px 10px 10px; cursor: pointer;
}
.aspect[aria-pressed="true"] { border-color: var(--frame); }
.aspect .box { width: 54px; height: 40px; display: grid; place-items: center; }
.aspect .box i { display: block; border: 2px solid var(--frame); border-radius: 3px; }
.aspect small { display: block; color: var(--muted); font-size: .8rem; }

/* option cards (engines, voices, motion) */
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.option {
  text-align: left; background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px;
}
.option[aria-pressed="true"] { border-color: var(--tally); }
/* The name and the price sit side by side, but the price drops to its own line
   when the card is too narrow for both: a card can be as narrow as 220px and
   "Sharp lips" next to "80 credits / 5 s · $0.40" does not fit, so it used to
   spill out of the box. min-width keeps a long name from pushing it out too. */
.option .top-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; align-items: baseline; }
.option .top-line b { min-width: 0; overflow-wrap: anywhere; }
.option .price { font: 600 .8rem/1 var(--mono); color: var(--muted); white-space: nowrap; }
.option p { font-size: .86rem; color: var(--muted); }

.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.segmented button { background: none; border: 0; padding: 8px 14px; cursor: pointer; color: var(--muted); font-weight: 600; }
.segmented button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--tally); }

.prompt-box { font-size: .95rem; }
.note { font-size: .86rem; color: var(--muted); }
.error { color: var(--bad); font-weight: 600; }

/* ---------- media + jobs ---------- */
.monitor { position: relative; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); max-width: 100%; }
.monitor img, .monitor video { display: block; width: 100%; height: 100%; object-fit: contain; }
.monitor .tag { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.6); color: #fff; font: 600 .7rem/1 var(--mono); padding: 5px 7px; border-radius: 5px; letter-spacing: .08em; }
.monitor .tc { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font: 600 .72rem/1 var(--mono); padding: 5px 7px; border-radius: 5px; }
.monitor.r169 { aspect-ratio: 16 / 9; } .monitor.r916 { aspect-ratio: 9 / 16; max-height: 70vh; margin: 0 auto; } .monitor.r11 { aspect-ratio: 1 / 1; max-height: 70vh; margin: 0 auto; }
.kb { animation: kb 9s ease-in-out infinite alternate; transform-origin: 50% 45%; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
.progress-wrap { display: grid; place-items: center; gap: 14px; padding: 32px 16px; text-align: center; }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--bad); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.bar { width: min(360px, 100%); height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--tally); width: 30%; animation: indet 1.6s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-110%); } 100% { transform: translateX(340%); } }

/* ---------- library ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; display: flex; flex-direction: column; }
.tile:hover { border-color: var(--frame); }
.tile .thumb { aspect-ratio: 16 / 10; background: var(--panel-2); position: relative; overflow: hidden; max-width: 100%; }
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .thumb .kind { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.62); color: #fff; font: 600 .66rem/1 var(--mono); letter-spacing: .08em; padding: 4px 6px; border-radius: 4px; }
.tile .cap { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .cap b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .cap span { font-size: .78rem; color: var(--muted); }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font: 600 .72rem/1 var(--mono); padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); }
.status-pill.ok { color: var(--ok); } .status-pill.run { color: var(--warn); } .status-pill.bad { color: var(--bad); }

/* ---------- story ---------- */
.scene-list { display: flex; flex-direction: column; gap: 12px; }
.scene { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.scene .slate { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.scene .slate .num { font: 700 1.3rem/1 var(--display); }
.scene .slate .tc { font: 500 .7rem/1 var(--mono); color: var(--muted); }
.scene .fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.scene .tools { display: flex; gap: 4px; flex-wrap: wrap; }
.scene textarea { min-height: 64px; }
.board { display: flex; flex-direction: column; gap: 10px; }
.board-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.board-row .thumb { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--panel-2); max-width: 100%; }
.board-row .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.parts { display: flex; gap: 8px; flex-wrap: wrap; }
.summary-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.summary-table td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.summary-table td:last-child { text-align: right; }
.summary-table.num td:last-child { font-family: var(--mono); }
.summary-table tr.total td { font-weight: 700; border-bottom: 0; padding-top: 12px; }
.caption-bar { position: absolute; left: 6%; right: 6%; bottom: 7%; text-align: center; color: #fff; font-weight: 600; font-size: clamp(.85rem, 2vw, 1.15rem); text-shadow: 0 2px 6px rgba(0,0,0,.9); }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(5, 8, 12, .72); z-index: 40; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal { width: min(920px, 100%); max-height: 100%; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--text); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 50; max-width: calc(100% - 32px); }

.signin { max-width: 460px; margin: 8vh auto 0; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .paths { grid-template-columns: 1fr; }
  .wizard { grid-template-columns: 1fr; gap: 16px; }
  .steps { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .steps .eyebrow { display: none; }
  .step-link { grid-template-columns: 26px auto; white-space: nowrap; }
  .step-link:not([aria-current="step"]) .label { display: none; }
  .board-row { grid-template-columns: 90px minmax(0, 1fr); }
  .board-row > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .nav { order: 3; width: 100%; margin-left: 0; }
  .scene { grid-template-columns: 1fr; }
  .scene .slate { flex-direction: row; }
  .footer-bar .btn-go { width: 100%; }
}

/* ---------- users (owner) ---------- */
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--bad); color: #fff; font: 700 .7rem/1 var(--mono); }
.invite-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 2fr) auto; gap: 12px; align-items: end; }
.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 90px 110px auto; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.user-row .avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); font: 700 1rem/1 var(--display); color: var(--tally); }
.user-row .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-row .who b, .user-row .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .stat { display: flex; flex-direction: column; align-items: flex-end; }
.user-row .actions { justify-content: flex-end; gap: 6px; }
/* ---------- packs + history ---------- */
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pack { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 12px; padding: 18px 16px 16px; }
.pack-tag { border-color: var(--tally); }
.pack b { font-size: 1.8rem; line-height: 1; }
.pack .pack-price { font: 650 1.15rem/1.4 var(--display); margin-top: 6px; }
.pack .btn { margin-top: 10px; align-self: stretch; }
.pack-badge { position: absolute; top: -10px; right: 12px; background: var(--tally); color: var(--tally-ink); font: 700 .68rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; }
.table-scroll { overflow-x: auto; }
.history td.plus { color: var(--ok); }
.history td.minus { color: var(--text); }
@media (max-width: 860px) {
  .invite-form { grid-template-columns: 1fr; }
  .user-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .user-row .stat { display: none; }
  .user-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .packs { grid-template-columns: 1fr; }
}

/* ---------- character swap ---------- */
.art-swap { background: linear-gradient(150deg, #2a2140, #6b3d7a 55%, #e0a35e); display: flex; align-items: center; justify-content: center; gap: 14px; }
.art-swap .who { width: 22%; aspect-ratio: 3 / 4; border-radius: 40% 40% 12px 12px; border: 2px solid rgba(255,255,255,.75); }
.art-swap .who.a { background: rgba(255,255,255,.12); }
.art-swap .who.b { background: rgba(242,163,58,.55); }
.art-swap .arrow { color: #fff; font: 700 1.6rem/1 var(--display); }
.tips { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.char-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.char { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.char img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; }
.consent { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; line-height: 1.5; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--tally); flex: none; }
.option:disabled { opacity: .5; cursor: not-allowed; }

.real-ok { border-color: var(--warn); }

.chip-more { border-style: dashed; color: var(--muted, #9aa3b2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line, #2a2f3a); font-size: 14px; }

/* ---------- storage countdown ---------- */
.soon { color: var(--warn); }
.mono { font-family: var(--mono); font-size: .82rem; }

/* ---------- drag and drop ---------- */
.dropzone { position: relative; border: 1.5px dashed var(--line); border-radius: var(--r-sm); padding: 14px; transition: border-color .15s, background .15s; }
.dropzone .drop-hint { display: block; font-size: .82rem; color: var(--muted); }
body.dragging .dropzone { border-color: var(--frame); }
.dropzone.over { border-color: var(--tally); background: color-mix(in srgb, var(--tally) 9%, transparent); }

/* ---------- owner: content ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat span { font: 600 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat b { font: 700 1.5rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: .75rem; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 240px) 1fr auto; gap: 12px; align-items: center; }
.sbar { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.sbar i { display: block; height: 100%; background: var(--frame); border-radius: 99px; }
.link { background: none; border: 0; padding: 0; color: var(--text); text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; }
.link:hover { color: var(--tally); }
.filters { flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.filters .field { min-width: 150px; }
.sel-bar { min-height: 40px; padding: 6px 10px; border-radius: var(--r-sm); flex-wrap: wrap; }
.sel-bar.on { background: var(--panel-2); }
.table-wrap { overflow-x: auto; }
.content-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.content-table th { text-align: left; font: 600 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.content-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.content-table tr.picked td { background: color-mix(in srgb, var(--tally) 7%, transparent); }
.content-table .r { text-align: right; }
.ct-thumb { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--panel-2); display: block; }
.ct-title { max-width: 280px; }
.ct-title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-title span { color: var(--muted); font-size: .78rem; }
.ct-act { white-space: nowrap; text-align: right; }
.ct-act .on { color: var(--tally); }
.pill-sm { font: 600 .72rem/1 var(--mono); padding: 4px 7px; border-radius: 99px; border: 1px solid var(--line); }
.pill-sm.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }

/* ---------- sign-in landing ---------- */
.landing { max-width: 1120px; margin: 0 auto; padding: 4vh 0 48px; display: flex; flex-direction: column; gap: 22px; }
.lp-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.lp-copy { display: flex; flex-direction: column; gap: 16px; }
.lp-copy h1 { font: 800 clamp(2rem, 4.4vw, 3.2rem)/1.05 var(--display); letter-spacing: -.02em; margin: 0; }
.lp-lead { font-size: 1.12rem; line-height: 1.55; color: var(--muted); margin: 0; max-width: 34em; }
.btn-lg { padding: 14px 22px; font-size: 1.02rem; }
.lp-wall { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lp-frame { position: relative; margin: 0; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; box-shadow: var(--shadow); }
.lp-frame:nth-child(2) { transform: translateY(18px); }
.lp-frame:nth-child(4) { transform: translateY(18px); }
.lp-frame img, .lp-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-frame .kind { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.62); color: #fff; font: 600 .62rem/1 var(--mono); letter-spacing: .08em; padding: 4px 6px; border-radius: 4px; }
.lp-frame .tc { position: absolute; top: 8px; right: 8px; color: #fff; font: 600 .62rem/1 var(--mono); padding: 4px 6px; border-radius: 4px; background: rgba(0,0,0,.45); }
.lp-frame .tc::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--bad); margin-right: 5px; vertical-align: 1px; }
.lp-frame figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: .78rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-art { position: absolute; inset: 0; background: linear-gradient(160deg, var(--h1), var(--h2)); }
.lp-art .sun { position: absolute; width: 22%; aspect-ratio: 1; border-radius: 50%; right: 16%; top: 16%; background: rgba(255, 230, 180, .85); box-shadow: 0 0 40px rgba(255, 210, 140, .6); }
.lp-art .hill { position: absolute; left: -10%; right: -10%; bottom: -30%; height: 70%; border-radius: 50% 50% 0 0; }
.lp-art .hill.a { background: rgba(0, 0, 0, .28); transform: translateX(-18%); }
.lp-art .hill.b { background: rgba(0, 0, 0, .45); transform: translateX(28%); bottom: -42%; }
.lp-note { text-align: right; margin: 6px 0 0; }
.lp-h { font: 700 1.4rem/1.2 var(--display); margin: 26px 0 0; }
.lp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lp-card { display: flex; flex-direction: column; gap: 8px; }
.lp-card h3 { margin: 0; }
.lp-card p { margin: 0; line-height: 1.5; }
.lp-ico { width: 34px; height: 34px; border-radius: 9px; border: 1.5px solid var(--tally); position: relative; }
.lp-ico::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--tally); }
.lp-ico.move::after { border-radius: 2px; clip-path: polygon(15% 0, 100% 50%, 15% 100%); }
.lp-ico.story::after { border-radius: 2px; inset: 9px 7px; background: repeating-linear-gradient(var(--tally) 0 3px, transparent 3px 6px); }
.lp-ico.swap::after { inset: 8px; background: none; border: 2px solid var(--tally); border-radius: 50%; box-shadow: 6px 0 0 -2px var(--tally); }
.lp-two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.lp-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 14px; }
.lp-steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 2px 12px; }
.lp-steps li::before { content: counter(s); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--tally); color: var(--tally-ink); font: 700 .85rem/28px var(--mono); text-align: center; }
.lp-steps span { color: var(--muted); line-height: 1.5; }
.lp-who { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; line-height: 1.45; }
.lp-who li::marker { color: var(--tally); }
.lp-rules h3 { margin: 0 0 8px; }
.lp-rules ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); line-height: 1.5; }
.lp-end { display: flex; justify-content: center; padding-top: 8px; }
@media (max-width: 960px) {
  .lp-hero { grid-template-columns: 1fr; }
  .lp-grid { grid-template-columns: 1fr 1fr; }
  .lp-two { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .lp-grid { grid-template-columns: 1fr; }
  .lp-frame:nth-child(2), .lp-frame:nth-child(4) { transform: none; }
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-row .sbar { display: none; }
}
.trim input[type=range] { width: 100%; accent-color: var(--tally); }

/* ---------- owner: fal.ai balance warning ---------- */
.owner-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 18px; padding: 12px 16px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 12%, var(--panel)); }
.owner-alert span { color: var(--muted); flex: 1 1 260px; }
.owner-alert.stop { border-color: color-mix(in srgb, var(--bad) 60%, transparent); background: color-mix(in srgb, var(--bad) 14%, var(--panel)); }

/* ---------- owner: profit calculator ---------- */
.calc-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; }
.calc-inputs input[type=number] { padding: 7px 9px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: 500 .9rem var(--mono); }
.calc input[type=range] { accent-color: var(--tally); }
.calc-h { margin: 10px 0 0; font: 700 1rem var(--display); }
.calc-table td, .calc-table th { white-space: nowrap; }
.calc-apply { border-left: 3px solid var(--tally); padding-left: 10px; }

/* ---------- legal pages and footer ---------- */
.legal { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; line-height: 1.65; }
.legal > .btn { align-self: flex-start; }
.legal h1 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); }
.legal h2 { font-size: 1.15rem; margin: 18px 0 6px; }
.legal p, .legal li { color: var(--text); margin: 0 0 8px; }
.legal ul { margin: 0 0 8px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.legal li::marker { color: var(--tally); }
.legal a, .site-foot a, .lp-copy .note a { color: var(--frame); }
.legal-lead { font-size: 1.05rem; color: var(--muted) !important; }
.legal-nav { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px; }
.site-foot { max-width: 1120px; margin: 40px auto 0; padding: 18px 0 30px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .84rem; color: var(--muted); }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--text); text-decoration: underline; }

/* ---------- edit a picture ---------- */
.art-edit { position: relative; display: block; overflow: hidden; }
.art-edit .half { position: absolute; top: 0; bottom: 0; width: 50%; }
.art-edit .half.a { left: 0; background: linear-gradient(160deg, #8fb6d4, #4f6f8f 55%, #2c3e52); }
.art-edit .half.b { right: 0; background: linear-gradient(160deg, #f6c46a, #c0603a 55%, #3a1f2c); }
.art-edit i { position: absolute; top: 8%; bottom: 8%; left: 50%; width: 3px; margin-left: -1.5px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 4px rgba(0,0,0,.18); }
.art-edit i::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #1a1206; font: 700 15px/30px var(--body); text-align: center; }
.edit-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.edit-grid .monitor { display: flex; align-items: center; justify-content: center; }
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.before-after figure { margin: 0; position: relative; background: #000; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 200px; }
.before-after img { width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.before-after figcaption { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.62); color: #fff; font: 600 .66rem/1 var(--mono); letter-spacing: .08em; padding: 5px 7px; border-radius: 4px; text-transform: uppercase; }
@media (max-width: 760px) { .edit-grid, .before-after { grid-template-columns: 1fr; } }

/* ---------- saved characters ---------- */
.char-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; }
.char-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; }
.char-chip[aria-pressed="true"] img { box-shadow: 0 0 0 2px var(--tally-ink); }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 22px; }
.char-card { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: 1fr auto; gap: 10px 12px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 150px; }
.char-card > img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
/* The main picture with the whole-body one under it (two pictures per character). */
.char-card .char-pics { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.char-card .char-pics img:first-child { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.char-card .char-pics .char-body { width: 52px; height: 78px; border-radius: 8px; object-fit: contain; background: var(--bg); border: 1px solid var(--line); }
.char-card .char-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.char-card .char-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Every card is the same size: the description shows two lines (all of it on hover). */
.char-card .char-desc { font-size: .8rem; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.char-card .char-voice-line { display: flex; align-items: center; gap: 4px; font-size: .8rem; min-width: 0; height: 30px; }
.char-card .char-voice-line > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char-card .char-voice-line .btn { padding: 2px 8px; min-height: 0; }
.char-card .char-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; align-self: end; }
.char-lib { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-height: 260px; overflow: auto; }
.char-lib .thumb { aspect-ratio: 1; }
/* My pictures for a whole-body picture or a face to cut: tall tiles, the whole picture shown. */
.body-lib { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; max-height: 460px; overflow: auto; }
.body-lib .thumb { aspect-ratio: 3 / 4; background: var(--bg); }
.body-lib .thumb img { object-fit: contain; }
.char-preview { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--tally); }

/* ---------- ✦ story helper ---------- */
.scene-ai { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0 2px; }
.scene-ai .eyebrow { color: var(--tally); margin-right: 2px; }
.scene-ai .chip { padding: 4px 10px; font-size: .8rem; }
.ai-suggest { border-color: color-mix(in srgb, var(--tally) 35%, var(--line)); background: color-mix(in srgb, var(--tally) 5%, var(--panel)); margin-bottom: 16px; }
.ai-suggest .row > span:first-child { color: var(--muted); }
.ai-suggest .note { margin: 8px 0 0; }
.motion-list { display: flex; flex-direction: column; gap: 10px; }
.motion-list .field > span:first-child { font-size: .85rem; color: var(--muted); }

/* ---------- AI label corner choice ---------- */
.corner-card .corners { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cbtn { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; font-size: .82rem; color: var(--muted); background: var(--panel-2); cursor: pointer; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.cbtn[aria-pressed="true"] { border-color: var(--tally); color: var(--text); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tally) 30%, transparent); }
.cbtn .mini { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 6px; background: linear-gradient(160deg, #4f6f8f, #2c3e52); position: relative; }
.cbtn .mini i { position: absolute; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 5px; border-radius: 999px; background: rgba(17,19,26,.6); border: 1px solid rgba(255,255,255,.35); font: 700 11px/1 system-ui, sans-serif; font-style: normal; color: #fff; letter-spacing: .02em; }
.cbtn .mini i::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--tally); }
.cbtn .mini i::after { content: "AI"; }
.cbtn .mini.tl i { left: 5px; top: 5px; } .cbtn .mini.tr i { right: 5px; top: 5px; } .cbtn .mini.bl i { left: 5px; bottom: 5px; } .cbtn .mini.br i { right: 5px; bottom: 5px; }
@media (max-width: 560px) { .corner-card .corners { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Video scripts */
.script-box { min-height: 140px; resize: vertical; font-size: .95rem; line-height: 1.5; }
.script-help { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--panel-2); font-size: .88rem; }
.script-help summary { cursor: pointer; font-weight: 600; }
.script-help ul { margin: 8px 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); }
.script-help ul b { color: var(--text); }
.script-sample { white-space: pre-wrap; margin: 6px 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--bg, #0d1017); border: 1px dashed var(--line); font-size: .85rem; }
.script-preview { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .88rem; }
.script-preview li { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); }
.script-preview li.act { color: var(--muted); font-style: italic; border-style: dashed; }
.script-preview .tag { display: inline-block; font-size: .7rem; font-style: normal; text-transform: uppercase; letter-spacing: .04em; margin-right: 8px; padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, var(--tally) 22%, transparent); color: var(--text); }
.script-preview li.act .tag { background: color-mix(in srgb, var(--muted) 25%, transparent); }
.note.warn { color: var(--tally); }
.chip-script { white-space: pre-line; text-align: left; border-radius: 12px; }

/* Story from your photos */
.source-switch { align-self: flex-start; margin-bottom: 4px; }
.photo-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.photo-modes > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: var(--muted); }
.photo-modes > div b { color: var(--text); }
.photo-modes > div.on { border-color: var(--tally); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tally) 25%, transparent); }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-strip .ph { margin: 0; position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.photo-strip .ph img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-strip .ph .num { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.65); color: #fff; font: 700 .8rem/1 var(--mono); padding: 4px 7px; border-radius: 6px; }
.photo-strip figcaption { display: flex; justify-content: space-between; gap: 4px; padding: 6px; }
.scene-photo { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.tag-photo { font-size: .66rem; text-align: center; color: var(--tally); line-height: 1.2; }
.tag-photo.new { color: var(--muted); }
@media (max-width: 560px) { .photo-modes { grid-template-columns: 1fr; } .scene { grid-template-columns: 1fr; } }
.note-box { border: 1px solid var(--line); border-left: 3px solid var(--tally); border-radius: 8px; padding: 10px 12px; background: var(--panel-2); font-size: .88rem; color: var(--muted); line-height: 1.5; }

/* In progress, on every page */
.act-wrap { position: relative; }
.act-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 999px; padding: 6px 12px; font: 600 .82rem/1 var(--mono, monospace); cursor: pointer; white-space: nowrap; }
.act-pill .act-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tally); }
.act-pill.run .act-dot { animation: actpulse 1.2s ease-in-out infinite; }
.act-pill.ok .act-dot { background: #3ecf8e; }
@keyframes actpulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.act-pill .act-count { display: none; }
@media (max-width: 1100px) {
  .act-pill .act-text { display: none; }
  .act-pill .act-count { display: inline; }
  .act-wrap { min-width: 3.5rem; }
}
.act-tray { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; box-shadow: 0 18px 40px rgba(0,0,0,.45); z-index: 60; display: flex; flex-direction: column; gap: 4px; max-height: 70vh; overflow: auto; }
.act-tray h4 { margin: 6px 6px 2px; font: 600 .7rem/1 var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.act-tray .note { margin: 6px; }
.act-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: 8px; padding: 8px; color: var(--text); cursor: pointer; }
.act-row:hover { background: var(--panel-2); border-color: var(--line); }
.act-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.act-txt b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-txt small { color: var(--muted); font-size: .78rem; }
.act-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.act-ic.run { border: 2px solid var(--line); border-top-color: var(--tally); animation: actspin .9s linear infinite; }
.act-ic.ok { background: color-mix(in srgb, #3ecf8e 25%, transparent); color: #3ecf8e; }
.act-ic.bad { background: color-mix(in srgb, #ff6b6b 25%, transparent); color: #ff6b6b; }
@keyframes actspin { to { transform: rotate(360deg); } }
.inprog .act-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.inprog { margin-bottom: 18px; }
.toast-btn { margin-left: 10px; background: var(--tally); color: #111; border: 0; border-radius: 6px; padding: 4px 10px; font-weight: 700; cursor: pointer; }
@media (max-width: 720px) { .act-pill { padding: 6px 9px; font-size: .74rem; } }
.pick-grid .tile.picked { outline: 2px solid var(--tally); outline-offset: 2px; }
.pick-grid .tile.picked .kind { background: var(--tally); color: #111; }

/* Story check stop */
.review-switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.review-switch input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--tally); }
.check-list { display: flex; flex-direction: column; gap: 12px; }
.check-scene { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.check-media img, .check-media video { width: 100%; border-radius: 8px; display: block; background: #000; }
.check-media .ph-empty { aspect-ratio: 16 / 9; border-radius: 8px; background: var(--panel-2); }
.check-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.check-part { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.check-part audio { width: 100%; max-width: 420px; height: 36px; }
.redo-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.redo-tools small { opacity: .7; margin-left: 4px; }
.redo-edit { display: flex; flex-direction: column; gap: 6px; }
.redo-edit textarea { width: 100%; }
@media (max-width: 720px) { .check-scene { grid-template-columns: 1fr; } }

/* ---- sign-in page: feature illustrations */
.lp-svg { width: 100%; height: auto; display: block; border-radius: 10px; }
.lp-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lp-feature { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.lp-feature h3 { margin: 0 0 4px; font-size: 1.05rem; }
.lp-feature p { margin: 0; color: var(--muted); line-height: 1.5; font-size: .93rem; }
.lp-band { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 22px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
@media (max-width: 900px) { .lp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .lp-features { grid-template-columns: 1fr; } .lp-band { grid-template-columns: 1fr; } }

/* ---- tools page */
.tool-nav { display: flex; flex-direction: column; gap: 6px; }
.tool-tab { display: flex; gap: 10px; align-items: flex-start; text-align: left; background: none; border: 1px solid transparent; border-radius: 10px; padding: 10px; color: var(--text); cursor: pointer; }
.tool-tab[aria-pressed="true"] { background: var(--panel); border-color: var(--tally); }
.tool-tab .ti { font-size: 1.2rem; width: 26px; text-align: center; }
.tool-tab small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.35; margin-top: 2px; }
.tool-src { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 14px; align-items: start; }
.tool-src img, .tool-src video { width: 100%; border-radius: 8px; background: #000; }
.tool-row { flex-wrap: wrap; gap: 6px; }
.path-art.art-tools { display: grid; grid-template-columns: repeat(5, 1fr); place-items: center; font-size: 1.5rem; background: linear-gradient(135deg, #22304a, #3b2a4f); }
@media (max-width: 720px) { .tool-src { grid-template-columns: 1fr; } }

/* ---- templates */
.tpl-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tpl { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s; }
.tpl:hover { border-color: var(--tally); transform: translateY(-2px); }
.tpl b { font-size: .98rem; }
.tpl > span:last-child { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.tpl-art { aspect-ratio: 16 / 9; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h) 55% 40%), hsl(calc(var(--h) + 50) 55% 22%)); }
.tpl-ico { font-size: 2.2rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }

/* ---- share */
.share-url { width: 100%; font: 500 .9rem/1.4 var(--mono); padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.share-page { max-width: 1100px; margin: 0 auto; padding: 4vh 0 30px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.share-media img, .share-media video { width: 100%; border-radius: 12px; background: #000; display: block; }
.share-media.tall { max-width: 420px; margin: 0 auto; }
.share-page.card { display: flex; grid-template-columns: none; max-width: 560px; }
@media (max-width: 760px) { .share-page { grid-template-columns: 1fr; } }

/* ---- guide */
.guide { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 20px; align-items: center; margin-bottom: 22px; border-color: var(--tally); }
.guide h2 { margin: 4px 0 10px; }
.guide-steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); line-height: 1.45; }
.guide-art { position: relative; height: 150px; }
.guide-art span { position: absolute; border-radius: 12px; box-shadow: var(--shadow); }
.guide-art .g1 { inset: 10px 60px 40px 0; background: linear-gradient(160deg, #2b2a6b, #e2725b); }
.guide-art .g2 { inset: 40px 20px 10px 50px; background: linear-gradient(160deg, #103c4f, #e3c27a); }
.guide-art .g3 { width: 40px; height: 40px; right: 0; top: 0; border-radius: 50%; background: var(--tally); }
@media (max-width: 640px) { .guide { grid-template-columns: 1fr; } .guide-art { display: none; } }

/* ---- owner settings + usage */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card { display: flex; flex-direction: column; gap: 4px; }
.stat-card b { font-size: 1.6rem; }
.day-bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; overflow-x: auto; }
.day-bar { flex: 1 0 18px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.day-bar i { width: 100%; background: var(--tally); border-radius: 4px 4px 0 0; min-height: 2px; }
.day-bar span { font: 500 .6rem/1 var(--mono); color: var(--muted); }
.usage-table thead td { color: var(--muted); font-size: .8rem; }
.fail-list { display: flex; flex-direction: column; gap: 8px; }
.fail-row { display: grid; grid-template-columns: 90px 190px 190px 1fr; gap: 10px; font-size: .85rem; align-items: baseline; }
@media (max-width: 760px) { .fail-row { grid-template-columns: 1fr; } }
.site-foot .spacer { flex: 1; }
.home-paths { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .home-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .home-paths { grid-template-columns: 1fr; } }

/* ---- music */
.music-card { display: flex; flex-direction: column; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.music-card audio { width: 100%; }
.music-art { height: 70px; display: flex; align-items: center; gap: 4px; }
.music-art i { flex: 1; border-radius: 3px; background: var(--tally); opacity: .85; }
.music-art i:nth-child(3n) { height: 70%; } .music-art i:nth-child(3n+1) { height: 40%; } .music-art i:nth-child(3n+2) { height: 95%; } .music-art i:nth-child(5n) { height: 25%; }
.thumb-music { background: linear-gradient(135deg, #3b2a63, #b85d6e); display: grid; place-items: center; }
.thumb-music .note-ico { font-size: 2.4rem; color: #fff; opacity: .9; }
.music-pick { display: grid; gap: 8px; }
.music-pick .option { display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: left; }
.music-pick audio { width: 100%; height: 34px; }
/* ---- narration switch */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 22px; background: var(--line); transition: background .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--tally); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--tally); outline-offset: 2px; }
.nar-field.off textarea { opacity: .45; text-decoration: line-through; }

/* Quick studio: one page for one picture */
.quick { display: flex; flex-direction: column; gap: 16px; }
.quick textarea { min-height: 140px; font-family: var(--mono); font-size: .86rem; line-height: 1.55; }
.quick .footer-bar { margin-top: 0; }
.quick-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.quick-tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); font-size: .82rem; }
.quick-tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.quick-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.quick-banner { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 16px; cursor: pointer; color: var(--text); font: inherit; border-color: color-mix(in srgb, var(--tally) 45%, var(--line)); }
.quick-banner:hover { border-color: var(--tally); }
.qb-icon { font-size: 1.5rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--tally) 18%, transparent); }
@media (max-width: 600px) { .quick-banner .btn { display: none; } }

/* Content page: thumbnails and titles open a viewer */
.ct-thumb-btn { position: relative; padding: 0; border: 0; background: none; cursor: pointer; display: inline-block; line-height: 0; border-radius: 8px; }
.ct-thumb-btn:hover .ct-thumb { outline: 2px solid var(--tally); }
.ct-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1rem; line-height: 1; text-shadow: 0 1px 6px rgba(0,0,0,.8); pointer-events: none; }
.ct-title { width: 300px; max-width: 300px; }
.ct-title .link { display: block; width: 100%; max-width: 300px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.ct-title .link b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-title > span { display: block; max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
@media (max-width: 900px) { .ct-title, .ct-title .link, .ct-title > span { width: auto; max-width: 180px; } }
.ct-title .link:hover b { color: var(--tally); text-decoration: underline; }
.modal .monitor img, .modal .monitor video { width: 100%; max-height: 70vh; object-fit: contain; background: #000; border-radius: var(--r-sm); }
.content-table td.r { white-space: nowrap; }

.ct-when { white-space: nowrap; }
.ct-when span { display: block; }
.ct-when small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.check-out { max-height: 320px; overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; font: 500 .76rem/1.45 var(--mono); white-space: pre-wrap; word-break: break-all; }

/* Dialogue video card art: two speech bubbles */
.art-dialogue { background: linear-gradient(150deg, #13324a, #2f6b78 55%, #e7b45a); position: relative; }
.art-dialogue .bub { position: absolute; padding: 8px 16px; border-radius: 18px; font-weight: 700; font-size: 1.1rem; color: #fff; border: 2px solid rgba(255,255,255,.8); background: rgba(255,255,255,.14); }
.art-dialogue .bub.a { left: 18%; top: 22%; border-bottom-left-radius: 4px; }
.art-dialogue .bub.b { right: 18%; bottom: 22%; border-bottom-right-radius: 4px; background: rgba(0,0,0,.18); }
.dlg-pic img { display: block; }
.note.ok { color: var(--ok, #5fbf7f); }
.board-row.dlg-row { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 640px) { .board-row.dlg-row { grid-template-columns: minmax(0, 1fr); } }

/* Model facts on every model choice: what it is good and not so good at. */
.option .facts { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; text-align: left; }
.option .fact { margin: 0; font-size: .8rem; line-height: 1.35; color: var(--muted); }
.option .fact span { display: inline-block; width: 1.1em; font-weight: 700; }
.option .fact.good span { color: var(--ok, #5fbf7f); }
.option .fact.weak span { color: var(--tally, #f2a33a); }
.option .fact.cost { font-family: var(--mono, monospace); font-size: .75rem; }
.warn-chars { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent, #f0a23a) 12%, transparent); color: var(--text); }

.sizes-menu { flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.sizes-list { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; }
.size-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 6px 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
.size-row:last-of-type { border-bottom: 0; }
.choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.choice-row .size-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 12px; cursor: pointer; }
.choice-row .size-opt.on { border-color: var(--accent, #f0a23a); }

/* A tall popup scrolls; its parts never shrink (pictures stay full size). */
.modal > * { flex-shrink: 0; }

/* ---------- phones: menu behind one button, nothing wider than the screen ---------- */
.menu-btn { display: none; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-weight: 700; cursor: pointer; }
.modal-back { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.modal { min-width: 0; max-width: 100%; }
.tpl-row, .tool-nav, .steps, .chips { max-width: 100%; }
main, .work, .wizard > * { min-width: 0; }
img, video, audio, canvas, iframe { max-width: 100%; }
@media (max-width: 860px) {
  .top-in { gap: 10px; }
  .brand { order: 1; }
  .menu-btn { display: inline-flex; order: 2; margin-left: auto; }
  .top-right { order: 3; width: 100%; margin-left: 0; flex-wrap: nowrap; justify-content: flex-start; gap: 8px; }
  .act-wrap { min-width: 0; flex: 1; justify-content: flex-start; }
  .nav { display: none; order: 4; width: 100%; margin: 0; flex-direction: column; gap: 2px; padding: 6px 0 4px; border-top: 1px solid var(--line); }
  .menu-open .nav { display: flex; }
  .nav button { text-align: left; padding: 12px 14px; font-size: 1.02rem; border-radius: 10px; }
  .nav button[aria-current="page"] { background: var(--panel-2); color: var(--text); box-shadow: inset 3px 0 0 var(--tally); }
}
@media (max-width: 560px) {
  .brand-name { font-size: 1.05rem; }
  .credits-pill { padding: 6px 10px; font-size: .78rem; }
  .menu-btn span { display: none; }
}
/* (1 Dec 2026) Phones 360-420 px: the activity pill overlapped the theme button by 18 px (its box
   shrank to nothing while the pill kept its width). The pill keeps its own width now; the row gets
   tighter, the dollars next to the credits are left out and the owner's two balances stack. */
@media (max-width: 860px) {
  .act-wrap { flex: 1 0 auto; }
  .top-right > .credits-pill { min-width: 0; flex: 0 1 auto; overflow: hidden; }
}
@media (max-width: 420px) {
  .top-right { gap: 6px; }
  .act-pill { padding: 6px 7px; gap: 5px; }
  .theme-btn { width: 30px; height: 30px; }
  .lang-switch button { padding: 5px 7px; }
  .credits-pill { padding: 5px 8px; gap: 6px; }
  .credits-pill .usd { display: none; }
  .top-right .bal-btn { flex-direction: column; align-items: flex-start; gap: 1px; font-size: .72rem; line-height: 1.1; }
  .top-right .bal-btn > b, .top-right .bal-btn > i { display: none; }
}

.music-tags { display: flex; flex-direction: column; gap: 10px; }
.music-tags summary { cursor: pointer; }
.music-tags .tag-group { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

.song-row { gap: 10px; flex-wrap: wrap; align-items: center; }
.song-row audio { max-width: 280px; height: 36px; }

/* Duet: who sings when */
.duet-box { gap: 10px; border: 1px dashed var(--line); border-radius: 12px; padding: 12px; }
.duet-bar { position: relative; height: 14px; border-radius: 7px; background: var(--line); overflow: hidden; }
.duet-bar span { position: absolute; top: 0; bottom: 0; border-radius: 4px; opacity: .9; }
.duet-row { gap: 6px; flex-wrap: wrap; align-items: center; }
.duet-row input[type=number] { width: 84px; }
.duet-row .chips { gap: 4px; }
.duet-text { flex-basis: 100%; font-size: .85rem; }

/* Choosing characters (duet singers, music singers, scene pictures) */
.char-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.char-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; font: inherit; }
.char-chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.char-chip[aria-pressed="true"] { border-color: var(--accent, #f2a33a); background: color-mix(in srgb, var(--accent, #f2a33a) 18%, transparent); }

/* Music video scenes */
.mv-scene { gap: 10px; }
.mv-thumb { width: 96px; height: 72px; flex: none; border-radius: 10px; overflow: hidden; background: var(--line); display: grid; place-items: center; font-size: 1.6rem; }
.mv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mv-thumb { position: relative; }
.mv-badge { position: absolute; bottom: 3px; font-size: .7rem; font-weight: 700; line-height: 1; color: #111; padding: 2px 5px; border-radius: 4px; pointer-events: none; }
.mv-lyrics { gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.mv-line { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: .92rem; line-height: 1.35; }
.mv-line .btn { padding: 0 8px; min-height: 26px; align-self: center; }
.mv-who { flex: none; background: none; border: 1.5px solid; border-radius: 999px; padding: 1px 8px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }

/* ---------- one studio layout for every module ----------
   Modules on the left, the steps in the middle, price + Create on the right
   (a bar at the bottom on a phone). Built by studioFrame() in app.js. */
main:has(.studio), body:has(.studio) .top-in, body:has(.studio) .demo-band div { max-width: 1440px; }
.studio { display: grid; grid-template-columns: 200px minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.mod-rail {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); max-height: calc(100vh - 96px); overflow: auto;
  display: flex; flex-direction: column; gap: 16px; padding-right: 12px; border-right: 1px solid var(--line);
}
.mod-group { display: flex; flex-direction: column; gap: 2px; }
.mod-group .eyebrow { margin: 0 0 4px 10px; }
.mod-link { text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; cursor: pointer; }
.mod-link:hover { color: var(--text); background: var(--panel); }
.mod-link[aria-current="page"] { color: var(--text); background: var(--panel-2); box-shadow: inset 3px 0 0 var(--tally); }
.studio-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.studio-main > .steps { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
.studio-main > .steps .eyebrow { width: 100%; margin-bottom: 2px; }
.studio-main > .steps .step-link { grid-template-columns: 26px auto; white-space: nowrap; }
.studio-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.studio-side .footer-bar {
  flex-direction: column; align-items: stretch; gap: 10px; margin: 0;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 16px; box-shadow: var(--shadow);
}
.studio-side .footer-bar .spacer { display: none; }
.studio-side .footer-bar .cost { order: 1; flex-wrap: wrap; }
.studio-side .footer-bar .btn-go { order: 2; width: 100%; justify-content: center; }
.studio-side .footer-bar > .btn:not(.btn-go) { order: 3; align-self: flex-start; }
.studio-side .inprog { padding: 14px; }
.studio-side .inprog h3 { font-size: .95rem; }

@media (max-width: 1180px) {
  .studio { grid-template-columns: minmax(0, 1fr) 280px; }
  .mod-rail {
    grid-column: 1 / -1; position: static; max-height: none; flex-direction: row; gap: 4px; overflow-x: auto;
    padding: 0 0 8px; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: thin;
  }
  .mod-group { flex-direction: row; gap: 4px; }
  .mod-group .eyebrow { display: none; }
  .mod-link { white-space: nowrap; }
  .mod-link[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--tally); }
}
@media (max-width: 860px) {
  /* Reserve space so the fixed bottom action bar can't cover the last card.
     This is a safe fallback; app.js refines it to the bar's exact height. */
  .studio { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px)); }
  .studio-side {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 30; gap: 0;
    background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(0, 0, 0, .3);
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }
  .studio-side:not(:has(.footer-bar)) { display: none; }
  .studio-side .inprog { display: none; }
  .studio-side .footer-bar { flex-direction: row; flex-wrap: wrap; border: 0; box-shadow: none; padding: 0; background: none; }
  .studio-side .footer-bar .cost { flex-basis: 100%; font-size: .8rem; }
  .studio-side .footer-bar .btn-go { flex: 1; width: auto; }
  .studio-side .footer-bar > .btn:not(.btn-go) { order: 2; }
}

/* Make music, duet: which chosen character is Singer 1 / Singer 2 */
.char-num { font-style: normal; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--tally); color: var(--tally-ink, #fff); white-space: nowrap; }
/* Content page: a song has no picture */
.ct-sound { display: grid; place-items: center; font-size: 1.3rem; line-height: 1; color: var(--muted, inherit); }

/* ---------- sign-in page (lp2): dark and cinematic, in both themes ---------- */
main:has(> .lp2), main:has(.lp2) { max-width: none; padding-top: 0; padding-left: 0; padding-right: 0; }
.lp2 {
  --lp-bg: #07090d; --lp-panel: #0f131a; --lp-line: rgba(255, 255, 255, .09); --lp-text: #f3efe7; --lp-muted: #a7afba;
  --lp-gold: #f2a33a; --lp-gold-2: #ffd27a;
  background: var(--lp-bg); color: var(--lp-text); color-scheme: dark;
  display: flex; flex-direction: column; overflow-x: clip; margin-bottom: -64px;
}
.lp2 a { color: var(--lp-gold-2); }
.lp2 h2 { font: 800 clamp(1.9rem, 4.2vw, 3.1rem)/1.04 var(--display); letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.lp2-eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 .74rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--lp-gold); }
.lp2-small { font-size: .86rem; color: var(--lp-muted); line-height: 1.55; margin: 0; }

/* the opening: clips take turns behind the title */
.lp2-hero { position: relative; min-height: min(92svh, 860px); display: grid; align-items: end; isolation: isolate; overflow: hidden; }
.lp2-hero-media, .lp2-hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp2-hero-media { z-index: -3; background: #000; }
.lp2-hero-media video { object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1.4s ease, transform 8s ease-out; }
.lp2-hero-media video.on { opacity: 1; transform: scale(1); }
.lp2-hero-shade { position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, rgba(7,9,13,.55) 0%, rgba(7,9,13,.05) 30%, rgba(7,9,13,.35) 58%, rgba(7,9,13,.96) 100%),
              radial-gradient(120% 90% at 20% 80%, rgba(7,9,13,.75), transparent 60%); }
.lp2-grain { position: absolute; inset: -50%; z-index: -1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: lp2-grain 1.2s steps(6) infinite; }
@keyframes lp2-grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-4%, 3%); } 66% { transform: translate(3%, -5%); } 100% { transform: translate(0, 0); } }
.lp2-hero-in { width: min(1160px, 100%); margin: 0 auto; padding: 120px max(16px, 4vw) 88px; display: flex; flex-direction: column; gap: 18px; }
.lp2-rec { width: 9px; height: 9px; border-radius: 50%; background: #ff4d3d; box-shadow: 0 0 0 4px rgba(255, 77, 61, .2); animation: lp2-blink 1.6s ease-in-out infinite; }
@keyframes lp2-blink { 50% { opacity: .25; } }
.lp2-title { margin: 0; font: 800 clamp(2.9rem, 9vw, 7.2rem)/.92 var(--display); letter-spacing: -.045em; display: flex; flex-direction: column; text-shadow: 0 4px 40px rgba(0, 0, 0, .45); }
.lp2-gold { background: linear-gradient(100deg, var(--lp-gold) 10%, var(--lp-gold-2) 45%, #fff3d6 55%, var(--lp-gold) 90%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: lp2-shine 7s ease-in-out infinite; }
@keyframes lp2-shine { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.lp2-lead { margin: 0; max-width: 36em; font-size: clamp(1.02rem, 1.6vw, 1.22rem); line-height: 1.55; color: #e4e0d8; text-shadow: 0 2px 16px rgba(0, 0, 0, .6); }
.lp2-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.lp2-cta { box-shadow: 0 10px 40px rgba(242, 163, 58, .35); }
.lp2-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 48px rgba(242, 163, 58, .5); }
.lp2-g { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #1a1206; font: 800 .8rem/1 var(--body); }
.lp2-ghost { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(8px); }
.lp2-ghost:hover { background: rgba(255, 255, 255, .16); }
.lp2-fine { margin: 0; max-width: 46em; font-size: .8rem; line-height: 1.5; color: rgba(255, 255, 255, .7); }
.lp2-hero-foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 16px; padding: 14px max(16px, 4vw); font: 500 .74rem/1.3 var(--mono); color: rgba(255, 255, 255, .78); }
.lp2-hero-cap { position: relative; flex: 1; margin: 0; min-height: 1.3em; }
.lp2-hero-cap > span { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .8s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lp2-hero-cap > span.on { opacity: 1; }
.lp2-hero-cap b { color: #fff; }
.lp2-hero-dots { display: flex; gap: 8px; }
.lp2-hero-dots button { width: 30px; height: 4px; border: 0; padding: 0; border-radius: 4px; background: rgba(255, 255, 255, .3); cursor: pointer; }
.lp2-hero-dots button.on { background: var(--lp-gold); }
.lp2-hero-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* a moving strip of facts */
.lp2-strip { border-block: 1px solid var(--lp-line); overflow: hidden; background: #0b0e13; }
.lp2-strip > div { display: flex; width: max-content; animation: lp2-marquee 38s linear infinite; }
.lp2-strip span { padding: 14px 28px; font: 600 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lp-muted); white-space: nowrap; }
.lp2-strip span::before { content: "◆"; color: var(--lp-gold); margin-right: 28px; font-size: .6rem; vertical-align: 1px; }
@keyframes lp2-marquee { to { transform: translateX(-50%); } }
.lp2-made { margin: 14px auto 0; padding: 0 16px; font-size: .82rem; color: var(--lp-muted); text-align: center; }

/* sections */
.lp2-sec { width: min(1160px, 100%); margin: 0 auto; padding: clamp(56px, 9vw, 110px) max(16px, 4vw) 0; display: flex; flex-direction: column; gap: 28px; }
.lp2-sec-head { display: flex; flex-direction: column; gap: 14px; max-width: 40em; }
.lp2-sec-head > p { margin: 0; font-size: 1.06rem; line-height: 1.6; color: var(--lp-muted); }
.lp2-center { align-items: center; text-align: center; margin: 0 auto; }
@supports (animation-timeline: view()) {
  .lp2-reveal { animation: lp2-in linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  @keyframes lp2-in { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
}

/* one idea, many looks */
.lp2-look { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.lp2-look-stage { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--lp-line); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.lp2-look-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .9s ease, transform 4s ease-out; }
.lp2-look-stage > img.on { opacity: 1; transform: scale(1); }
.lp2-look-stage figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 20px 18px; display: flex; flex-direction: column; gap: 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); }
.lp2-look-name { font: 800 1.4rem/1.1 var(--display); }
.lp2-look-feel { color: #d9d4ca; font-size: .92rem; }
.lp2-look-side { display: flex; flex-direction: column; gap: 18px; }
.lp2-look-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lp2-look-tabs button { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; border: 1px solid var(--lp-line); background: var(--lp-panel); color: var(--lp-text); font: 600 .84rem/1.2 var(--body); text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.lp2-look-tabs button:hover { transform: translateY(-1px); border-color: rgba(242, 163, 58, .5); }
.lp2-look-tabs button[aria-selected="true"] { border-color: var(--lp-gold); background: rgba(242, 163, 58, .12); }
.lp2-look-tabs img { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; flex: none; }
.lp2-quote { margin: 0; padding: 16px 18px; border-left: 3px solid var(--lp-gold); background: var(--lp-panel); border-radius: 0 12px 12px 0; font: 500 1rem/1.5 var(--body); color: var(--lp-text); }
.lp2-quote span { display: block; font: 600 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--lp-muted); margin-bottom: 8px; }

/* side-by-side sections */
.lp2-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.lp2-rev { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.lp2-ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; color: var(--lp-muted); }
.lp2-ticks li { padding-left: 26px; position: relative; line-height: 1.5; }
.lp2-ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--lp-gold); font-weight: 800; }
.lp2-ticks b { color: var(--lp-text); }

/* before / after */
.lp2-ba { --ba: 50%; position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; border: 1px solid var(--lp-line); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); user-select: none; touch-action: pan-y; }
.lp2-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.lp2-ba-top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--ba)) 0 0); }
.lp2-ba-line { position: absolute; top: 0; bottom: 0; left: var(--ba); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 16px rgba(0, 0, 0, .5); pointer-events: none; }
.lp2-ba-line i { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }
.lp2-ba-line i::before, .lp2-ba-line i::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -6px; border: 6px solid transparent; }
.lp2-ba-line i::before { left: 7px; border-right-color: #1a1206; }
.lp2-ba-line i::after { right: 7px; border-left-color: #1a1206; }
.lp2-ba-tag { position: absolute; top: 14px; padding: 6px 10px; border-radius: 6px; background: rgba(0, 0, 0, .62); font: 600 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
.lp2-ba-tag.l { left: 14px; } .lp2-ba-tag.r { right: 14px; color: var(--lp-gold-2); }
.lp2-ba input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.lp2-ba:has(input:focus-visible) .lp2-ba-line i { outline: 3px solid var(--lp-gold); outline-offset: 3px; }

/* the singing character */
.lp2-sing-stage { position: relative; aspect-ratio: 1; max-width: 560px; width: 100%; justify-self: center; border-radius: 22px; overflow: hidden; border: 1px solid var(--lp-line); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(242, 163, 58, .15); background: #000; }
.lp2-sing-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp2-play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border: 0; background: radial-gradient(circle at center, rgba(0, 0, 0, .1), rgba(0, 0, 0, .45)); color: #fff; cursor: pointer; font: 700 1rem/1 var(--body); transition: background .3s, opacity .3s; }
.lp2-play-ico { width: 78px; height: 78px; border-radius: 50%; background: var(--lp-gold); box-shadow: 0 0 0 10px rgba(242, 163, 58, .22), 0 12px 40px rgba(0, 0, 0, .5); position: relative; animation: lp2-pulse 2.4s ease-in-out infinite; }
.lp2-play-ico::after { content: ""; position: absolute; left: 31px; top: 24px; border: 15px solid transparent; border-left: 24px solid #1a1206; border-right: 0; }
@keyframes lp2-pulse { 50% { box-shadow: 0 0 0 18px rgba(242, 163, 58, .08), 0 12px 40px rgba(0, 0, 0, .5); } }
.lp2-sing-stage.playing .lp2-play { background: transparent; opacity: 0; }
.lp2-sing-stage.playing .lp2-play:hover { opacity: 1; }
.lp2-sing-stage.playing .lp2-play-ico::after { left: 27px; top: 26px; width: 8px; height: 26px; border: 0; background: #1a1206; box-shadow: 16px 0 0 #1a1206; }
.lp2-sing-note { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 28px 16px 12px; font-size: .8rem; color: #ddd; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); pointer-events: none; }
.lp2-pipe { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lp2-pipe li { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--lp-line); border-radius: 14px; background: var(--lp-panel); }
.lp2-pipe i { grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(242, 163, 58, .14); font-style: normal; font-size: 1.2rem; }
.lp2-pipe b { font-size: 1rem; }
.lp2-pipe span { color: var(--lp-muted); font-size: .9rem; }

/* features */
.lp2-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lp2-feature { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 16px; background: var(--lp-panel); border: 1px solid var(--lp-line); transition: transform .25s, border-color .25s; }
.lp2-feature:hover { transform: translateY(-3px); border-color: rgba(242, 163, 58, .45); }
.lp2-feature h3 { margin: 0 0 4px; font: 700 1.05rem/1.25 var(--display); }
.lp2-feature p { margin: 0; color: var(--lp-muted); line-height: 1.5; font-size: .92rem; }

/* how / who, rules */
.lp2-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
.lp2-panel { display: flex; flex-direction: column; gap: 18px; padding: 22px; border-radius: 18px; background: var(--lp-panel); border: 1px solid var(--lp-line); }
.lp2-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 16px; }
.lp2-steps li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; gap: 2px 14px; }
.lp2-steps li::before { content: counter(s); grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; background: var(--lp-gold); color: #1a1206; font: 800 .95rem/36px var(--mono); text-align: center; }
.lp2-steps b { font-size: 1.02rem; }
.lp2-steps span { color: var(--lp-muted); line-height: 1.5; }
.lp2-who { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; line-height: 1.45; }
.lp2-who li::marker { color: var(--lp-gold); }
.lp2-rules { gap: 12px; }
.lp2-rules h3 { margin: 0; font: 700 1.1rem/1.2 var(--display); }
.lp2-rules ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--lp-muted); line-height: 1.55; }

/* the last call */
.lp2-end { position: relative; margin-top: clamp(56px, 9vw, 110px); min-height: 460px; display: grid; place-items: center; text-align: center; overflow: hidden; isolation: isolate; }
.lp2-end video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.lp2-end::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--lp-bg) 0%, rgba(7, 9, 13, .55) 30%, rgba(7, 9, 13, .7) 100%); }
.lp2-end-in { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 64px 16px 96px; max-width: 40em; }
.lp2-end-in p { margin: 0; color: #e4e0d8; line-height: 1.55; }

@media (max-width: 900px) {
  .lp2-look, .lp2-split, .lp2-rev, .lp2-two { grid-template-columns: minmax(0, 1fr); }
  .lp2-rev .lp2-sing-stage { order: -1; }
  .lp2-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp2-look-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lp2-look-tabs button { flex-direction: column; text-align: center; font-size: .74rem; padding: 6px 4px; }
  .lp2-look-tabs img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
}
@media (max-width: 600px) {
  .lp2-hero { min-height: 88svh; }
  .lp2-hero-in { padding-bottom: 72px; gap: 14px; }
  .lp2-actions .btn { width: 100%; }
  .lp2-features { grid-template-columns: minmax(0, 1fr); }
  .lp2-feature { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 12px; }
  .lp2-feature .lp-svg { border-radius: 8px; }
  .lp2-hero-cap { font-size: .66rem; }
  .lp2-look-tabs span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .lp2 *, .lp2 *::before, .lp2 *::after { animation: none !important; transition: none !important; }
  .lp2-strip > div { flex-wrap: wrap; width: auto; justify-content: center; }
}

/* ---------- Academy (ac) ---------- */
.ac { display: flex; flex-direction: column; gap: 22px; }
.ac h1 { font: 800 clamp(1.8rem, 4vw, 2.7rem)/1.05 var(--display); letter-spacing: -.02em; margin: 4px 0 8px; text-wrap: balance; }
.ac-kicker { font: 600 .72rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tally); }
.ac-ok { color: var(--ok); font-weight: 700; }
.ac-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: clamp(22px, 4vw, 40px); border-radius: 20px; border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 0% 0%, rgba(242, 163, 58, .16), transparent 55%), linear-gradient(135deg, var(--panel), var(--panel-2)); box-shadow: var(--shadow); }
.ac-hero-copy { display: flex; flex-direction: column; gap: 10px; max-width: 40em; }
.ac-hero-copy p { margin: 0 0 6px; line-height: 1.55; }
.ac-ring { --p: 0; width: 150px; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center; gap: 2px;
  background: radial-gradient(closest-side, var(--panel) 78%, transparent 79% 100%), conic-gradient(var(--tally) calc(var(--p) * 1%), var(--line) 0); }
.ac-ring b { font: 800 1.9rem/1 var(--display); }
.ac-ring span { font-size: .78rem; color: var(--muted); }
.ac-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.ac-card { position: relative; display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 18px 16px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; }
.ac-card:hover { transform: translateY(-3px); border-color: var(--tally); box-shadow: 0 14px 34px rgba(0, 0, 0, .25); }
.ac-card b { font: 700 1.08rem/1.25 var(--display); }
.ac-card .note { line-height: 1.45; }
.ac-card.done { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.ac-num { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 .8rem/1 var(--mono); background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.ac-card.done .ac-num { background: var(--ok); color: #06140c; border-color: transparent; }
.ac-icon { font-size: 1.7rem; line-height: 1; }
.ac-mins { margin-top: auto; font: 600 .72rem/1 var(--mono); color: var(--muted); }

.ac-lesson-head { display: flex; gap: 18px; align-items: flex-start; }
.ac-lesson-head .ac-icon { font-size: 2.6rem; width: 72px; height: 72px; flex: none; display: grid; place-items: center; border-radius: 20px; background: color-mix(in srgb, var(--tally) 16%, var(--panel)); border: 1px solid var(--line); }
.ac-lesson-head p { margin: 0; }
.ac-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 22px; align-items: start; }
.ac-read { display: flex; flex-direction: column; gap: 14px; font-size: 1.04rem; line-height: 1.65; }
.ac-read p { margin: 0; }
.ac-tips { padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--tally); font-size: .96rem; }
.ac-tips ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.ac-side { display: flex; flex-direction: column; gap: 16px; }
.ac-box { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ac-box h3 { margin: 0; font: 700 1.1rem/1.3 var(--display); }
.ac-opts { display: flex; flex-direction: column; gap: 8px; }
.ac-opt { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; line-height: 1.45; cursor: pointer; transition: border-color .2s, background .2s; }
.ac-opt:hover { border-color: var(--tally); }
.ac-opt.right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--panel-2)); }
.ac-opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--panel-2)); }
.ac-why { margin: 0; padding: 10px 12px; border-radius: 10px; line-height: 1.5; animation: ac-pop .35s ease; }
.ac-why.right { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.ac-why.wrong { background: color-mix(in srgb, var(--bad) 12%, transparent); }
@keyframes ac-pop { from { opacity: 0; transform: translateY(6px); } }
.ac-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-look { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: #000; }
.ac-look img { width: 100%; height: 100%; object-fit: cover; display: block; animation: ac-fade .5s ease; }
.ac-look b { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); font: 700 1.05rem/1.2 var(--display); }
@keyframes ac-fade { from { opacity: .3; } }
.ac-ba { --ba: 50%; position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; user-select: none; touch-action: pan-y; }
.ac-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ac-ba-top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--ba)) 0 0); }
.ac-ba-line { position: absolute; top: 0; bottom: 0; left: var(--ba); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .5); pointer-events: none; }
.ac-ba-line::after { content: "⇆"; position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: #fff; color: #1a1206; display: grid; place-items: center; font-weight: 800; }
.ac-ba input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ac-mv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ac-mv video { width: 100%; border-radius: 12px; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.ac-price { margin: 4px 0 0; font: 800 1.5rem/1.1 var(--display); color: var(--tally); }
.ac-lyrics { margin: 0; min-height: 120px; padding: 14px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); font: 500 .9rem/1.6 var(--mono); white-space: pre-wrap; }
.ac-lyrics .who { color: var(--tally); font-weight: 700; }
.ac-lyrics .mark { color: var(--frame); }
.ac-sing { width: 100%; max-width: 420px; align-self: center; border-radius: 14px; aspect-ratio: 1; background: #000; }
.ac-try { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 18px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--tally) 45%, var(--line)); background: color-mix(in srgb, var(--tally) 9%, var(--panel)); }
.ac-try > div { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.ac-pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .ac-grid { grid-template-columns: minmax(0, 1fr); }
  .ac-hero { grid-template-columns: minmax(0, 1fr); }
  .ac-ring { width: 110px; }
}
@media (max-width: 600px) {
  .ac-lesson-head .ac-icon { width: 56px; height: 56px; font-size: 2rem; }
  .ac-try .btn { width: 100%; }
  .ac-pager .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .ac * { animation: none !important; transition: none !important; } }
.ac > .btn-quiet { align-self: flex-start; }

/* ---------- profile menu (top right) ---------- */
.profile-menu { position: relative; flex: none; }
.profile-btn { position: relative; width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 2px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; display: grid; place-items: center; font: 700 1rem/1 var(--display); overflow: visible; transition: border-color .2s; }
.profile-btn:hover, .profile-btn[aria-expanded="true"] { border-color: var(--tally); }
.profile-btn img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.profile-btn .badge { position: absolute; top: -4px; right: -6px; }
.profile-list { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; min-width: 230px; flex-direction: column; gap: 2px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px rgba(0, 0, 0, .45); }
.profile-list.open { display: flex; }
.profile-list button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 9px; color: var(--text); font: 600 .95rem/1.2 var(--body); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.profile-list button:hover, .profile-list button[aria-current="page"] { background: var(--panel-2); }
.profile-list button[data-act="signout"] { color: var(--bad); }
.profile-list hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.profile-who { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.profile-who b { font-size: .98rem; }
.profile-who span { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
@media (max-width: 860px) { .profile-menu { margin-left: auto; } }

/* ---------- Create page (cr) ---------- */
.cr-head { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 8px; }
.cr-head h1 { font: 800 clamp(1.9rem, 4.4vw, 3rem)/1.05 var(--display); letter-spacing: -.02em; margin: 0; }
.cr-head p { margin: 0; max-width: 62ch; }
.cr-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.cr-jump .chip { text-decoration: none; color: var(--text); }
.cr-group { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; scroll-margin-top: 80px; }
.cr-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.cr-group-head h2 { margin: 0; font: 800 1.45rem/1.15 var(--display); }
.cr-group-head p { margin: 0; }
.cr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cr-card { display: flex; flex-direction: column; text-align: left; padding: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; box-shadow: var(--shadow); transition: transform .2s, border-color .2s, box-shadow .2s; }
.cr-card:hover { transform: translateY(-3px); border-color: var(--tally); box-shadow: 0 16px 36px rgba(0, 0, 0, .3); }
.cr-card:focus-visible { outline: 3px solid var(--tally); outline-offset: 2px; }
.cr-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0e13; }
.cr-media > img, .cr-media > video, .cr-media > .lp-svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .6s ease; }
.cr-media > .sq { object-position: center 30%; }
.cr-card:hover .cr-media > img, .cr-card:hover .cr-media > video, .cr-card:hover .cr-media > .lp-svg { transform: scale(1.05); }
.cr-play { position: absolute; left: 10px; bottom: 10px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; color: #1a1206; background: rgba(255, 255, 255, .85); transition: opacity .2s; }
.cr-card:hover .cr-play { opacity: 0; }
.cr-price { position: absolute; right: 8px; bottom: 8px; max-width: calc(100% - 50px); padding: 5px 9px; border-radius: 999px; background: rgba(0, 0, 0, .7); color: #fff; font: 600 .72rem/1.2 var(--mono); backdrop-filter: blur(6px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-new { position: absolute; left: 8px; top: 8px; padding: 4px 9px; border-radius: 999px; background: var(--tally); color: var(--tally-ink); font: 700 .7rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.cr-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.cr-body b { font: 700 1.05rem/1.25 var(--display); }
.cr-body span { color: var(--muted); font-size: .88rem; line-height: 1.45; }
@media (max-width: 560px) {
  .cr-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .cr-body { padding: 10px; }
  .cr-body b { font-size: .95rem; }
  .cr-body span { font-size: .8rem; }
  .cr-price { font-size: .64rem; }
}
@media (prefers-reduced-motion: reduce) { .cr-card, .cr-media > * { transition: none !important; } }

/* a song's tile: the characters who sing it */
.thumb-music { position: relative; }
.thumb-singers { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.thumb-singers img { position: static !important; width: 46% !important; height: auto !important; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .85); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.thumb-singers img + img { margin-left: -12%; }
.thumb-music:has(.thumb-singers) .note-ico { position: absolute; right: 10px; bottom: 6px; font-size: 1.4rem; }
.cr-body { flex: 1; }
.cr-body .cr-cost { margin-top: auto; padding-top: 8px; color: var(--tally); font: 600 .74rem/1.35 var(--mono); }
.cr-play { left: auto; right: 10px; top: 10px; bottom: auto; }
.cr-group + .home-head-2, .cr-group ~ .home-head-2 { margin-top: 38px; }
.credits-pill { white-space: nowrap; }
@media (max-width: 420px) { .credits-pill .usd { display: none; } }
@media (max-width: 560px) { .cr-body .cr-cost { font-size: .68rem; } }
.cr-tpl { margin-top: 40px; }
.cr-sub { margin: 8px 0 -2px; font: 700 1rem/1.2 var(--display); color: var(--muted); }
span.credits-pill { cursor: default; }
.acct-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
@media (max-width: 760px) { .acct-grid { grid-template-columns: minmax(0, 1fr); } }

/* Tap a result picture to see it big. */
.before-after img, .monitor img, .job-result img, .char-preview, .mv-thumb img, img.zoomable { cursor: zoom-in; }
.viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; cursor: zoom-out; }
.viewer img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.viewer-bar { display: flex; gap: 8px; }
body.viewer-open { overflow: hidden; }
/* Fields side by side: the boxes line up even when a label wraps to more lines. */
.settings-grid > label.field > :is(input, select, span.row):last-child, .calc-inputs > label.field > :is(input, select, span.row):last-child { margin-top: auto; }
/* fal.ai and WaveSpeed next to each other on the Credits page. */
.si-accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.si-acct { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.zip-ready { flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---- Studio assistant (assistant.js) */
.as { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.as-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.as-head h1 { margin: 0; }
.as-log { display: flex; flex-direction: column; gap: 10px; }
.as-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.as-msg p { margin: 0; overflow-wrap: anywhere; }
.as-msg p + p, .as-msg p + .as-chips, .as-chips + p { margin-top: 8px; }
.as-me { align-self: flex-end; background: var(--panel-2); }
.as-bot { align-self: flex-start; }
.as-intro { max-width: 100%; }
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.as-card { align-self: stretch; display: flex; flex-direction: column; gap: 10px; }
.as-card-top { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.as-card-top > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.as-thumb { width: 96px; height: 64px; object-fit: cover; border-radius: var(--r-sm); flex: none; background: var(--panel-2); }
.as-words { margin: 0; color: var(--muted); font-style: italic; overflow-wrap: anywhere; }
.as-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.as-steps li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.as-steps li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.as-clip { flex: none; padding-left: 10px; padding-right: 10px; }
.as-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.as-pick { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.as-pick .as-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.as-pick span { font-size: .85em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-attach-chip, .as-attached { display: flex; align-items: center; gap: 8px; min-width: 0; }
.as-attach-chip .note, .as-attached .note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.as-attached { margin-bottom: 6px; }
.as-attached .as-thumb { width: 72px; height: 48px; }
.end-thumb { width: 160px; max-width: 100%; border-radius: var(--r-sm); }
.shot-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: start; }
.shot-row textarea { min-width: 0; resize: vertical; }
.shot-secs { display: flex; flex-direction: column; font-size: .85em; gap: 2px; }
.shot-secs input { width: 64px; }
@media (max-width: 600px) { .shot-row { grid-template-columns: auto 1fr auto; } .shot-row .shot-secs { grid-column: 2; flex-direction: row; align-items: center; gap: 6px; } }
.as-upload { align-items: center; justify-content: center; font-size: 1.4em; border-style: dashed; min-height: 84px; }
.as-upload span { font-size: .6em; white-space: normal; text-align: center; }
.as-chats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow: auto; }
.as-chat { width: 100%; display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--text); font: inherit; cursor: pointer; min-width: 0; }
.as-chat b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-chat:hover, .as-chat[aria-current="true"] { border-color: var(--line); background: var(--panel-2); }
.as-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.as-item { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.as-item img, .as-item video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-sm); background: var(--panel-2); }
.as-item figcaption { font-size: .85em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-form { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: 0; padding: 10px 0; background: var(--ink); }
.as-form textarea { flex: 1; min-width: 0; resize: vertical; }
.as-help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.as-help-card { display: flex; flex-direction: column; gap: 6px; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.as-later { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.as-later li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 600px) { .as-msg { max-width: 100%; } .as-thumb { width: 72px; height: 48px; } }

/* ---------- the new Create (create.js, flows.js) ----------
   Phone: one column, one question per screen, the price and the one orange
   button in a bar at the bottom. Computer: steps on the left, the question in
   the middle, the price and the button in a panel on the right. */
.mk, .mk-home { max-width: 1240px; margin: 0 auto; }
.mk-head { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.mk-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mk-head h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
.mk-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 6px 0 0; background: none; border: 0; color: var(--muted); cursor: pointer; font-weight: 500; }
.mk-back:hover { color: var(--text); }
.mk-count { font-size: .86rem; color: var(--muted); }
.mk-count.ok { color: var(--ok); font-weight: 600; }
.mk-bar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.mk-bar i { height: 4px; border-radius: 4px; background: var(--line); }
.mk-bar i.on { background: var(--tally); }
.mk-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.mk-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.mk-steps { display: none; }
.mk-field { display: flex; flex-direction: column; gap: 8px; }
.mk-label { font-weight: 650; font-size: .98rem; }
.mk-hint { font-size: .82rem; color: var(--muted); }
.mk-text, .mk-input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: 400 1rem/1.5 var(--body); resize: vertical; min-height: 48px; }
.mk-text:focus, .mk-input:focus { outline: none; border-color: var(--tally); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tally) 25%, transparent); }
.mk-chip-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--tally); font-weight: 500; cursor: pointer; }
.mk-chips { gap: 6px; }
.mk-si { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; color: var(--muted); }
.mk-si svg { color: var(--tally); flex: none; margin-top: 4px; }
.mk-calm { color: var(--muted); font-size: .92rem; }
.mk-warn { color: var(--warn); font-size: .92rem; }
.mk-center { align-self: center; }
/* a picked thing */
.mk-picked { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.mk-thumb { width: 52px; height: 52px; flex: none; border-radius: 9px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; }
.mk-thumb img, .mk-thumb video { width: 100%; height: 100%; object-fit: cover; }
.mk-thumb-ph { color: var(--muted); font-size: 1.3rem; }
.mk-picked-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mk-picked-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-picked-txt span { font-size: .82rem; color: var(--muted); }
.mk-x { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.mk-x:hover { color: var(--text); background: var(--panel-2); }
.mk-add { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--text) 22%, var(--line)); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.mk-add:hover { border-color: var(--tally); }
.mk-add svg { color: var(--tally); flex: none; }
.mk-add > span { display: flex; flex-direction: column; }
.mk-add > span > span { font-size: .82rem; color: var(--muted); }
/* big choices */
.mk-opts { display: flex; flex-direction: column; gap: 8px; }
.mk-opt { position: relative; width: 100%; display: flex; flex-direction: column; gap: 2px; min-height: 58px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-align: left; cursor: pointer; justify-content: center; }
.mk-opt b { font-size: 1rem; padding-right: 90px; }
.mk-opt > span { font-size: .86rem; color: var(--muted); }
.mk-opt:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--line)); }
.mk-opt[aria-pressed="true"] { border-color: var(--tally); background: color-mix(in srgb, var(--tally) 9%, var(--panel)); }
.mk-opt > svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.mk-optcost { position: absolute; right: 12px; top: 12px; font-size: .8rem; color: var(--muted); }
.mk-optbox { border-radius: 12px; }
.mk-optbox.on { border: 2px solid var(--tally); background: color-mix(in srgb, var(--tally) 6%, var(--panel)); }
.mk-optbox.on > .mk-opt { border: 0; background: transparent; }
.mk-optbox-in { display: flex; flex-direction: column; gap: 12px; padding: 0 14px 14px; }
.mk-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-seg button { flex: 1 1 0; min-width: 72px; min-height: 46px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 500; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.mk-seg button small { font-size: .74rem; color: var(--muted); font-weight: 400; }
.mk-seg button[aria-pressed="true"] { border-color: var(--tally); background: color-mix(in srgb, var(--tally) 14%, var(--panel)); color: var(--text); font-weight: 650; }
.mk-check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; font-size: .94rem; }
.mk-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--tally); flex: none; }
.mk-more { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--panel); }
.mk-more > summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; color: var(--muted); font-size: .92rem; }
.mk-more[open] { padding-bottom: 14px; }
.mk-more[open] > summary { color: var(--text); }
.mk-rows { display: flex; flex-direction: column; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.mk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.mk-row:last-child { border-bottom: 0; }
.mk-row > span { display: flex; flex-direction: column; min-width: 0; }
.mk-row small { color: var(--muted); font-size: .8rem; }
.mk-row b { font-weight: 600; overflow-wrap: anywhere; }
.mk-big2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.mk-big { display: flex; flex-direction: column; gap: 4px; padding: 0 0 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-align: left; overflow: hidden; cursor: pointer; }
.mk-big[aria-pressed="true"] { border: 2px solid var(--tally); }
.mk-big > b, .mk-big > span:not(.mk-big-img) { padding: 0 14px; }
.mk-big > b { margin-top: 10px; font-size: 1.08rem; }
.mk-big > span:not(.mk-big-img) { font-size: .88rem; color: var(--muted); }
.mk-big-img { height: 130px; }
.mk-g1 { background: linear-gradient(150deg, #c77d3a, #5b3a7a); }
.mk-g2 { background: linear-gradient(150deg, #3a7a8a, #1f2d4a); }
.mk-g3 { background: linear-gradient(150deg, #3d6b3a, #2a3a1f); }
.mk-g4 { background: linear-gradient(150deg, #b0803a, #6b2a4a); }
.mk-g5 { background: linear-gradient(150deg, #6b4a3a, #2a1f3a); }
.mk-song { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.mk-song audio { width: 100%; }
.mk-song-run { flex-direction: row; align-items: center; color: var(--muted); }
.mk-song-run i { width: 10px; height: 10px; border-radius: 50%; background: var(--tally); animation: mkpulse 1.2s ease-in-out infinite; flex: none; }
.mk-song-bad { color: var(--bad); }
@keyframes mkpulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .mk-song-run i { animation: none; } }
/* the price and the one button */
.mk-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mk-price { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mk-price > span { font-size: .8rem; color: var(--muted); }
.mk-price b { font-size: 1rem; }
.mk-price b small { font-weight: 400; color: var(--muted); }
.mk-go { min-height: 50px; padding: 0 22px; }
.mk-why { flex-basis: 100%; font-size: .84rem; color: var(--warn); }
@media (max-width: 899px) {
  .mk { padding-bottom: 120px; }
  .mk-side { display: contents; }
  .mk-side > .mk-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0; padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--panel) 96%, transparent); backdrop-filter: blur(8px); border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
}
@media (min-width: 900px) {
  .mk-head { padding-left: 238px; }
  .mk-body { grid-template-columns: 220px minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
  .mk-steps { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 84px; }
  .mk-steps .eyebrow { margin-bottom: 6px; }
  .mk-step { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); text-align: left; cursor: pointer; }
  .mk-step:disabled { cursor: default; opacity: .7; }
  .mk-step > span:last-child { display: flex; flex-direction: column; min-width: 0; }
  .mk-step small { font-size: .76rem; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mk-step.done { color: var(--text); }
  .mk-step[aria-current="step"] { color: var(--text); background: var(--panel); border-color: var(--line); font-weight: 650; }
  .mk-n { width: 26px; height: 26px; flex: none; border-radius: 999px; display: grid; place-items: center; font-size: .8rem; border: 2px solid var(--line); }
  .mk-step.done .mk-n { border: 0; background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
  .mk-step[aria-current="step"] .mk-n { border: 0; background: var(--tally); color: var(--tally-ink); }
  .mk-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
  .mk-side > .mk-foot { flex-direction: column; align-items: stretch; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); margin: 0; }
  .mk-side .mk-go { width: 100%; }
  .mk-bar { max-width: 520px; }
}
/* the picker panel */
.mk-sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(4, 6, 10, .6); }
.mk-sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 86vh; display: flex; flex-direction: column; gap: 12px; padding: 8px max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); background: var(--panel); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; box-shadow: 0 -20px 40px rgba(0, 0, 0, .4); }
.mk-grip { align-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line); }
.mk-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.mk-sheet-head h2 { font-size: 1.25rem; }
.mk-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.mk-tabs button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; font-weight: 500; }
.mk-tabs button[aria-selected="true"] { background: var(--tally); color: var(--tally-ink); border-color: var(--tally); font-weight: 650; }
.mk-sheet-body { overflow: auto; padding-bottom: 16px; min-height: 160px; }
.mk-sheet-foot { padding: 12px 0 calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.mk-sheet-foot .btn { width: 100%; justify-content: center; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.mk-tile { padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--ink); color: var(--text); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; text-align: left; }
.mk-tile[aria-pressed="true"] { border: 2px solid var(--tally); }
.mk-tile-img { position: relative; aspect-ratio: 1; background: var(--panel-2); display: grid; place-items: center; }
.mk-tile-img img, .mk-tile-img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-tile-img small { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 5px; background: rgba(14, 17, 23, .78); color: #ece8e1; font-size: .72rem; }
.mk-tile-name { padding: 6px 8px; font-size: .8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-tick { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 999px; background: var(--tally); color: var(--tally-ink); display: grid; place-items: center; }
.mk-bg-moods { flex-wrap: wrap; }
.mk-bg-mood { display: inline-flex; align-items: center; gap: 2px; }
.mk-play.mk-play-sm, .mk-seg .mk-play.mk-play-sm { flex: none; width: 28px; height: 28px; min-width: 0; min-height: 0; padding: 0; border-radius: 50%; font-size: .7rem; }
.mk-bg-row { display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; flex-wrap: wrap; }
.mk-bg-row.on { border: 2px solid var(--tally); }
/* Background music page (27 Nov) */
.mk-bgp-row { display: flex; align-items: center; gap: 10px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; flex-wrap: wrap; background: var(--panel); }
.mk-bgp-txt { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mk-bgp-txt b { overflow-wrap: anywhere; }
.mk-bgp-txt span { font-size: .88rem; color: var(--muted); }
.mk-bgp-row audio { flex: 1 1 220px; min-width: 0; width: 100%; height: 36px; }
.mk-bgp-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mk-bgp .mk-field { margin-top: 18px; }
.mk-bg-row audio { flex: 1; min-width: 180px; height: 36px; }
.mk-bg-used { color: var(--tally); font-size: .86rem; }
.slg-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.slg-tile { padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--ink); color: var(--text); cursor: pointer; overflow: hidden; display: flex; flex-direction: column; }
.slg-tile[aria-pressed="true"] { border: 2px solid var(--tally); }
.slg-tile small { padding: 4px 6px; font-size: .74rem; font-weight: 600; text-align: center; }
.slg-prev { height: 64px; display: grid; place-items: center; background: linear-gradient(160deg, #3b4a5c, #9aa7b4 70%, #d9d2c3); background-size: 300% 300%; background-position: 100% 100%; padding: 0 4px; }
.slg { font: 800 .95rem/1.1 "DejaVu Sans", Verdana, sans-serif; color: #fff; text-align: center; overflow-wrap: anywhere; }
.slg-bold { -webkit-text-stroke: 1px #000; text-shadow: 1px 2px 0 rgba(0,0,0,.5); }
.slg-yellow { color: #ffe100; -webkit-text-stroke: 1.2px #000; text-shadow: 1px 2px 0 rgba(0,0,0,.5); }
.slg-box { background: rgba(0,0,0,.6); padding: 3px 6px; }
.slg-label { background: #fff; color: #141414; padding: 3px 6px; }
.slg-neon { color: #fff; text-shadow: 0 0 4px #00e1ff, 0 0 9px #00e1ff, 0 0 14px #00e1ff; }
.slg-pop { color: #ffe100; -webkit-text-stroke: 1.2px #000; transform: scale(1.08); }
.slg-cinema { font-weight: 700; font-size: .7rem; letter-spacing: .28em; text-shadow: 0 2px 4px rgba(0,0,0,.6); }
.mk-ad-draws { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 8px; }
.mk-ad-draws figure { margin: 0; display: grid; gap: 6px; }
.mk-ad-draws img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); }
.mk-sounds { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mk-sounds li { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink); }
.mk-sounds li.on { border: 2px solid var(--tally); }
.mk-play { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.mk-play[aria-pressed="true"] { background: var(--tally); color: var(--tally-ink); border-color: var(--tally); }
.mk-sound-pick { flex: 1; min-width: 0; padding: 4px 28px 4px 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.mk-sound-pick b { font-size: .92rem; line-height: 1.3; overflow-wrap: anywhere; }
.mk-sound-pick span { font-size: .78rem; color: var(--muted); }
.mk-sounds .mk-tick { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.mk-tile-new { border-style: dashed; align-items: center; justify-content: center; gap: 6px; color: var(--tally); min-height: 100px; font-weight: 600; font-size: .86rem; text-align: center; }
.mk-drop { width: 100%; min-height: 150px; border-radius: 16px; border: 2px dashed color-mix(in srgb, var(--text) 20%, var(--line)); background: var(--ink); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 16px; cursor: pointer; }
.mk-drop svg { color: var(--tally); }
.mk-drop > span { font-size: .86rem; color: var(--muted); }
.mk-drop.over { border-color: var(--tally); }
.mk-empty { color: var(--muted); padding: 20px 0; }
@media (min-width: 900px) {
  .mk-sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(720px, 92vw); max-height: 82vh; border-radius: 20px; border: 1px solid var(--line); padding: 14px 20px 0; }
  .mk-grip { display: none; }
}
/* progress and result */
.mk-run-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.mk-run-side { display: flex; flex-direction: column; gap: 16px; }
.mk-run-links { display: flex; flex-direction: column; gap: 8px; }
.mk-run-links .btn { justify-content: center; }
.mk-next-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-align: left; cursor: pointer; }
.mk-next-row > span { flex: 1; }
.mk-next-row small { color: var(--muted); }
.mk-next-row svg { color: var(--muted); }
.mk-next-row:hover { border-color: var(--tally); }
@media (min-width: 900px) { .mk-run-body { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
/* the new home */
.mk-home { display: flex; flex-direction: column; gap: 22px; }
.mk-home-top { display: grid; gap: 16px; }
.mk-home-top h1 { font-size: clamp(2rem, 5vw, 3rem); }
.mk-ask { display: flex; flex-direction: column; gap: 6px; }
.mk-ask label { font-size: .88rem; color: var(--muted); }
.mk-ask-row { display: flex; gap: 8px; }
.mk-ask-row input { flex: 1; min-width: 0; min-height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 1rem; }
.mk-ask-row .btn { min-height: 50px; gap: 6px; }
.mk-goals { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.mk-goal { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; min-height: 72px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-align: left; cursor: pointer; }
.mk-goal:hover { border-color: var(--tally); }
.mk-goal-img { width: 60px; height: 60px; flex: none; border-radius: 11px; overflow: hidden; }
.mk-goal-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-goal-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mk-goal-txt b { font-size: 1.05rem; }
.mk-goal-txt span { font-size: .88rem; color: var(--muted); }
.mk-goal > svg { color: var(--muted); flex: none; }
.mk-home-work { display: flex; flex-direction: column; gap: 8px; }
.mk-draft { display: flex; align-items: center; gap: 4px; padding-left: 12px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--tally) 45%, var(--line)); }
.mk-draft > i { width: 8px; height: 8px; border-radius: 50%; background: var(--tally); flex: none; }
.mk-draft-run > i { background: var(--frame); }
.mk-draft-go { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 8px; background: none; border: 0; color: var(--text); text-align: left; cursor: pointer; }
.mk-draft-c { color: var(--tally); font-weight: 650; flex: none; }
.mk-recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mk-recent-head h2 { font-size: 1.15rem; }
.mk-recent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mk-recent-item { position: relative; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel-2); cursor: pointer; }
.mk-recent-item img, .mk-recent-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-recent-item small { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 5px; background: rgba(14, 17, 23, .78); color: #ece8e1; font-size: .72rem; }
.mk-recent-item .mk-thumb-ph { display: grid; place-items: center; height: 100%; }
.mk-old { border-top: 1px solid var(--line); padding-top: 14px; }
.mk-old > summary { cursor: pointer; color: var(--muted); min-height: 44px; display: flex; align-items: center; }
@media (min-width: 900px) {
  .mk-home-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 24px 48px; }
  .mk-goals { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
  .mk-goal { flex-direction: column; align-items: stretch; padding: 0; gap: 0; overflow: hidden; }
  .mk-goal-img { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; }
  .mk-goal-txt { padding: 12px 14px 14px; }
  .mk-goal > svg { display: none; }
  .mk-recent-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
/* the new Characters page, and My voices in the same look */
.mk-page { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.mk-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.mk-page-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.mk-page-head p { margin-top: 6px; max-width: 60ch; }
.mk-chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.mk-char { display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.mk-char-pic { position: relative; aspect-ratio: 1; background: var(--panel-2); }
.mk-char-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-char-pic .mk-char-body { position: absolute; right: 10px; bottom: 10px; width: 64px; height: 96px; border-radius: 10px; border: 2px solid var(--panel); object-fit: cover; }
.mk-char-txt { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 4px; }
.mk-char-txt h2 { font-size: 1.2rem; }
.mk-char-txt p { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-char-voice { display: flex; align-items: center; gap: 4px; min-height: 44px; font-size: .9rem; color: var(--muted); }
.mk-char-use { padding: 6px 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.mk-char-use .mk-label { font-size: .84rem; color: var(--muted); font-weight: 600; }
.mk-char-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mk-char-btns .btn { justify-content: center; min-height: 40px; }
.mk-char-edit { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 10px; border-top: 1px solid var(--line); }
.mk-emptybig { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 48px 20px; border-radius: 16px; border: 1px dashed var(--line); background: var(--panel); }
.mk-emptybig b { font-size: 1.2rem; }
.mk-voices > .work { max-width: none !important; margin: 0 !important; }
.mk-voices .work-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.mk-voices .work-head .eyebrow { display: none; }
.mk-voices .card { border-radius: 16px; box-shadow: none; }
.mk-voices .tabs .tab { min-height: 44px; }
/* the music video scenes in the new Create */
.mk-strip { display: flex; gap: 4px; height: 8px; }
.mk-strip i { border-radius: 4px; background: var(--line); min-width: 6px; }
.mk-strip i.m-sing { background: color-mix(in srgb, var(--tally) 70%, var(--line)); }
.mk-strip i.m-move { background: color-mix(in srgb, var(--frame) 75%, var(--line)); }
.mk-strip i.m-live { background: linear-gradient(90deg, color-mix(in srgb, var(--tally) 70%, var(--line)), color-mix(in srgb, var(--frame) 75%, var(--line))); }
.mk-strip i.m-zoom { background: color-mix(in srgb, #b07de8 65%, var(--line)); }
.mk-strip i.on { outline: 2px solid var(--text); outline-offset: 1px; }
.mk-scenes { display: flex; flex-direction: column; gap: 8px; }
.mk-scene { border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.mk-scene.on { border: 2px solid var(--tally); }
.mk-scene-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; background: none; border: 0; color: var(--text); text-align: left; cursor: pointer; min-height: 64px; }
.mk-scene-in { display: flex; flex-direction: column; gap: 14px; padding: 4px 12px 14px; }
.mk-tag { flex: none; font-size: .76rem; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.mk-tag.m-sing { background: color-mix(in srgb, var(--tally) 18%, transparent); color: var(--tally); }
.mk-tag.m-move { background: color-mix(in srgb, var(--frame) 18%, transparent); color: var(--frame); }
.mk-tag.m-live { background: color-mix(in srgb, var(--tally) 14%, color-mix(in srgb, var(--frame) 14%, transparent)); color: var(--tally); }
/* Music video scene: place and mood (23 Nov) */
.mk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mk-chips button { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 5px 10px; font-size: .84rem; cursor: pointer; }
.mk-chips button[aria-pressed="true"] { border-color: var(--tally); background: color-mix(in srgb, var(--tally) 14%, var(--panel)); font-weight: 600; }
.mk-look { display: block; font-size: .8rem; color: var(--muted); }
/* A long tag ("Sings, everything moves") wraps instead of squeezing the scene's text (24 Nov). */
.mk-scene-row .mk-picked-txt { flex: 1 1 auto; min-width: 0; }
.mk-scene-row .mk-tag { flex: 0 1 auto; max-width: 38%; white-space: normal; text-align: center; line-height: 1.25; }
.mk-look-btns { flex-wrap: wrap; }
/* Music video: the singing map (25 Nov) */
.mk-vmap { align-self: stretch; position: relative; height: 34px; margin-top: 8px; border-radius: 8px; background: color-mix(in srgb, var(--line) 55%, transparent); overflow: hidden; }
.mk-vmap button { position: absolute; top: 5px; bottom: 5px; min-width: 4px; padding: 0; border: 0; border-radius: 4px; cursor: pointer; background: color-mix(in srgb, var(--frame) 80%, var(--line)); }
.mk-vmap button.q { background: repeating-linear-gradient(135deg, var(--muted) 0 3px, transparent 3px 7px); outline: 1px solid var(--muted); }
.mk-vmap-t { align-self: stretch; display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 2px; }
.mk-look-btns .btn { white-space: normal; max-width: 100%; text-align: left; }
.mk-tag.m-zoom { background: color-mix(in srgb, #b07de8 18%, transparent); color: #b07de8; }
.mk-stepper { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; align-self: flex-start; }
.mk-stepper b { min-width: 56px; text-align: center; }
.mk-stepper .mk-x { font-size: 1.2rem; }
.mk-scene-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mk-scene-tools .mk-add { flex: 1 1 220px; }
.mk-note-box { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
/* an old screen part shown inside the new frame (talking photo voice, duet) */
.mk-old-part > .card { padding: 0; background: none; border: 0; box-shadow: none; }
.mk-old-part .tabs { flex-wrap: wrap; }
/* the old editor screens (story, dialogue, swap, tools) inside the New Create frame */
.studio.mk-studio { grid-template-columns: minmax(0, 1fr) 320px; max-width: 1240px; margin: 0 auto; }
.mk-studio-back { grid-column: 1 / -1; margin-bottom: -10px; }
.mk-studio .studio-main > .steps { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mk-studio .step-link[aria-current="step"] .n { background: var(--tally); color: var(--tally-ink); border-color: var(--tally); }
.mk-old-part .btn-go, .mk-studio .studio-main .btn-go { background: var(--panel-2); color: var(--text); border-color: var(--line); }
@media (max-width: 860px) { .studio.mk-studio { grid-template-columns: minmax(0, 1fr); } }
/* New Create: story scenes one line each */
.mk-thumb.mk-num { font: 700 1.2rem var(--display); color: var(--muted); }
.mk-scene-in > .scene { border: 0; padding: 0; background: none; box-shadow: none; }
.scene-list:has(.mk-scene) { display: flex; flex-direction: column; gap: 8px; }
/* New Create: the Library in the same look */
.mk-lib .work-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.mk-lib .work-head .eyebrow { display: none; }
.mk-lib .work-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.modal .mk-field { margin: 12px 0; }
/* New Create: duet picture, dialogue lines and preview */
.mk-bigpic { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-2); }
.mk-bigpic img { width: 100%; height: auto; display: block; max-height: 420px; object-fit: contain; }
.mk-lines { display: flex; flex-direction: column; gap: 8px; }
.mk-line { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr) 44px; gap: 8px; align-items: start; }
@media (max-width: 560px) { .mk-line { grid-template-columns: minmax(0, 1fr) 44px; } .mk-line select { grid-column: 1 / -1; } }
.mk-chat { display: flex; flex-direction: column; gap: 8px; }
.mk-bubble { align-self: flex-start; max-width: 85%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--panel-2); font-size: .94rem; }
.mk-bubble.r { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: color-mix(in srgb, var(--tally) 12%, var(--panel)); }
.mk-bubble b { display: block; font-size: .78rem; color: var(--muted); }
/* the new Library */
.mk-lib-running { display: flex; flex-direction: column; gap: 6px; }
.mk-lib-running .mk-draft { width: 100%; text-align: left; background: none; color: var(--text); cursor: pointer; font: inherit; }
.mk-lib-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.mk-lib-bar .mk-tabs small { opacity: .7; font-weight: 500; margin-left: 2px; }
.mk-lib-q { max-width: 260px; min-height: 42px; padding: 8px 14px; }
@media (max-width: 600px) { .mk-lib-q { max-width: none; } .mk-lib-bar .mk-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .mk-lib-bar .mk-tabs button { flex: none; } }
.mk-lib-group h2 { font-size: 1.05rem; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.mk-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 180px), 1fr)); gap: 12px; }
.mk-lib-card { display: flex; flex-direction: column; padding: 0; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-align: left; overflow: hidden; cursor: pointer; }
.mk-lib-card:hover { border-color: var(--tally); }
.mk-lib-pic { position: relative; aspect-ratio: 1; background: var(--panel-2); display: grid; place-items: center; }
.mk-lib-pic img, .mk-lib-pic video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-lib-ph { font-size: 2rem; color: var(--muted); }
.mk-lib-kind { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(14, 17, 23, .78); color: #ece8e1; font-size: .72rem; font-weight: 600; }
.mk-lib-pic small { position: absolute; right: 8px; bottom: 8px; padding: 1px 6px; border-radius: 5px; background: rgba(14, 17, 23, .78); color: #ece8e1; font-size: .72rem; }
.mk-lib-st { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.mk-lib-st.run { background: color-mix(in srgb, var(--frame) 85%, #000); color: #fff; }
.mk-lib-st.bad { background: color-mix(in srgb, var(--bad) 85%, #000); color: #fff; }
.mk-lib-txt { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; min-width: 0; }
.mk-lib-txt b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-lib-txt span { font-size: .78rem; color: var(--muted); }
.mk-library .mk-center { align-self: center; }
/* the new Account page */
.mk-acct-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.mk-acct-tabs button { flex: none; }
.mk-acct-body { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.mk-acct-body > .card { border-radius: 16px; box-shadow: none; }
.mk-acct-hero { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.mk-acct-big { font: 700 clamp(1.8rem, 5vw, 2.6rem)/1.1 var(--display); }
/* the Assistant in the New Create look */
.as.as2 { max-width: 1240px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.as2-side { display: none; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.as2-side.open { display: flex; }
.as2-new { justify-content: center; }
.as2-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow: auto; }
.as2-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.as2-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.as2-head h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
.as2-hello { display: flex; flex-direction: column; gap: 12px; padding: 24px 4px 8px; }
.as2-hello h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
.as2-hello .as-chips .chip { min-height: 44px; padding: 8px 14px; }
.as2 .as-msg { border-radius: 16px; }
.as2 .as-me { background: color-mix(in srgb, var(--tally) 14%, var(--panel)); border-color: color-mix(in srgb, var(--tally) 30%, var(--line)); border-bottom-right-radius: 4px; }
.as2 .as-bot { border-bottom-left-radius: 4px; }
.as2 .as-card { border-radius: 16px; }
.as2 .as-form { align-items: flex-end; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); bottom: 8px; box-shadow: 0 -8px 24px var(--ink); }
.as2 .as-form textarea { border: 0; background: transparent; resize: none; min-height: 44px; max-height: 180px; padding: 10px 6px; outline: none; field-sizing: content; }
.as2 .as-form textarea:focus { box-shadow: none; }
.as2 .as-clip { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 999px; }
.as2-send { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 999px; flex: none; }
@media (min-width: 900px) {
  .as.as2 { grid-template-columns: 260px minmax(0, 1fr); }
  .as2-side { display: flex; position: sticky; top: 84px; }
  .as2-chats-btn, .as2-new-sm { display: none; }
}
/* Library: the whole picture in the frame, bigger cards, selecting and deleting */
.mk-lib-pic { background: var(--ink); }
.mk-lib-pic img, .mk-lib-pic video { object-fit: contain; }
.mk-lib-grid { grid-template-columns: repeat(auto-fill, minmax(min(46%, 210px), 1fr)); }
.mk-library.big .mk-lib-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.mk-library.big .mk-lib-pic { aspect-ratio: 4 / 3; }
.mk-lib-tools { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; min-width: 0; }
.mk-lib-tools .mk-lib-q { flex: 1 1 200px; min-width: 110px; }
.mk-lib-tools .btn { white-space: nowrap; flex: none; }
.mk-lib-card { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mk-lib-card.on { border: 2px solid var(--tally); }
.mk-lib-card.off { opacity: .45; cursor: default; }
.mk-lib-check { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 999px; border: 2px solid #fff; background: rgba(14, 17, 23, .55); display: grid; place-items: center; color: var(--tally-ink); z-index: 1; }
.mk-lib-card.on .mk-lib-check { background: var(--tally); border-color: var(--tally); }
.mk-library.selecting { padding-bottom: 96px; }
.mk-selbar { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: min(720px, calc(100% - 24px)); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.mk-selbar > span { flex: 1 1 140px; }
.mk-selbar.warn { border-color: color-mix(in srgb, var(--bad) 60%, var(--line)); }

/* Erase: draw boxes on the video's first frame (flows.js boxer). */
.mk-boxer-wrap { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.mk-boxer { position: relative; align-self: flex-start; width: 100%; max-width: 100%; border-radius: 12px; overflow: hidden; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; background: #000; }
.mk-boxer video { display: block; width: 100%; height: auto; pointer-events: none; }
.mk-box { position: absolute; border: 3px solid #ff4d4d; background: rgba(255, 77, 77, .18); border-radius: 4px; pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.mk-box b { position: absolute; top: -2px; left: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 0 0 6px 0; background: #ff4d4d; color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.mk-box.live { border-style: dashed; }
.mk-boxer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mk-boxer-bar span { margin-right: auto; color: var(--muted, #98a1ad); font-size: .9rem; }

/* Story scenes: "SI yazsın" by each part (flows.js aiFor). */
.mk-label:has(.mk-ai-row) { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mk-ai-row { margin-left: auto; display: inline-flex; gap: 6px; }
.mk-ai { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--accent, #f2a33a); background: transparent; color: var(--accent, #f2a33a); font: 600 .82rem inherit; font-family: inherit; cursor: pointer; white-space: nowrap; }
.mk-ai:hover:not([disabled]) { background: color-mix(in srgb, var(--accent, #f2a33a) 14%, transparent); }
.mk-ai[disabled] { opacity: .55; cursor: default; }
.mk-ai.quiet { border-color: var(--line, #2a303c); color: var(--muted, #98a1ad); }
.mk-ai-talk { display: flex; margin-top: 8px; }
.mk-ai-talk .mk-ai-row { margin-left: 0; }

/* Talking photo: the words are longer than the chosen length. */
.warn-txt { color: var(--warn, #e7b84a); font-weight: 600; }

/* Drawn covers for things without a picture (music, voices, drafts, things being made) - js/art.js, 22 Nov. */
.cov { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; color: #fff;
  background: radial-gradient(120% 90% at 15% 10%, hsl(var(--a) 62% 46%), transparent 60%), linear-gradient(140deg, hsl(var(--a) 52% 30%), hsl(var(--b) 58% 38%)); }
.cov-wave { position: absolute; left: 8%; right: 8%; top: 22%; height: 56%; width: 84%; fill: rgba(255, 255, 255, .28); }
.cov-ico { position: relative; width: 34%; max-width: 64px; height: auto; aspect-ratio: 1; padding: 6%; border-radius: 50%;
  background: rgba(10, 12, 18, .38); box-shadow: 0 4px 18px rgba(0, 0, 0, .25); backdrop-filter: blur(3px); }
.cov-image .cov-ico, .cov-video .cov-ico, .cov-story .cov-ico, .cov-dialogue .cov-ico { opacity: .85; }
.cov-faces .cov-ico { position: absolute; right: 7%; bottom: 7%; width: 22%; max-width: 40px; padding: 4%; }
.cov .cov-pics { position: relative; display: flex; }
.cov .cov-pics img { position: static; inset: auto; width: clamp(28px, 34%, 86px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.cov .cov-pics { width: 100%; justify-content: center; }
.cov .cov-pics img + img { margin-left: -9%; }
.mk-thumb .cov-wave { top: 15%; height: 70%; }
.mk-thumb .cov-ico { width: 52%; padding: 10%; }
.mk-thumb { position: relative; }

/* Academy: a lesson's cheat sheet (25 Nov) */
.ac-cheat ul { margin: 6px 0 10px; padding-left: 1.1em; }
.ac-cheat li { margin: 5px 0; }

/* "SI writes 3 versions" under a text box (25 Nov) */
.mk-var { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.mk-var-row { display: flex; gap: 6px; flex-wrap: wrap; }
.mk-var-row .mk-ai { white-space: normal; text-align: left; }
.mk-var-list { display: grid; gap: 8px; }
.mk-var-card { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: .92rem; line-height: 1.4; cursor: pointer; }
.mk-var-card:hover, .mk-var-card.on { border-color: var(--tally); background: color-mix(in srgb, var(--tally) 10%, var(--panel)); }

/* "Ne yanlış gitti?" and the publishing pack (25 Nov 2026) */
.wrong-answer ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.pub-card { border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.pub-text { margin: 0; white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .92rem; line-height: 1.45; }

/* Ad studio (25 Nov 2026): nine shots and the storyboard */
.mk-ad-shots { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: shot; }
.mk-ad-shots li { display: grid; grid-template-columns: 54px 1fr 150px; gap: 6px; align-items: center; counter-increment: shot; }
.mk-ad-sec { font-size: .82rem; color: var(--muted); text-align: right; white-space: nowrap; }
.mk-ad-sec::before { content: counter(shot) ". "; font-weight: 650; color: var(--text); }
.mk-ad-board { width: 100%; max-width: 520px; border-radius: 12px; display: block; }
@media (max-width: 560px) {
  .mk-ad-shots li { grid-template-columns: 46px 1fr; }
  .mk-ad-cam { grid-column: 2; }
}

/* The check of a finished video (26 Nov 2026) */
.check-card summary { cursor: pointer; }
.check-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.check-list .link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; text-decoration: underline; }

/* Mini edit (26 Nov 2026): the videos to join, each with from / to */
.mk-join-list { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 8px; }
.mk-join-clip { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.mk-join-clip .mk-thumb { width: 56px; height: 56px; }
.mk-join-in { min-width: 0; display: grid; gap: 6px; }
.mk-join-in b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-join-times { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; }
.mk-join-times label { display: flex; gap: 4px; align-items: center; }
.mk-join-times .mk-input { width: 76px; padding: 6px 8px; }
.mk-join-tools { display: flex; gap: 2px; }
@media (max-width: 560px) {
  .mk-join-clip { grid-template-columns: 44px 1fr; }
  .mk-join-clip .mk-thumb { width: 44px; height: 44px; }
  .mk-join-tools { grid-column: 1 / -1; justify-content: flex-end; }
}

/* Projects (27 Nov): project cards with a menu, the project page, the delete choices */
.mk-lib-wrap { position: relative; display: flex; flex-direction: column; }
.mk-lib-wrap > .mk-lib-card { flex: 1; }
.mk-lib-more { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 1.1rem; line-height: 1; cursor: pointer; z-index: 2; }
.mk-lib-menu { position: absolute; top: 44px; right: 8px; z-index: 3; min-width: 180px; display: flex; flex-direction: column; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.mk-lib-menu button { text-align: left; padding: 9px 10px; border: 0; border-radius: 7px; background: none; color: var(--text); cursor: pointer; font: inherit; }
.mk-lib-menu button:hover { background: var(--panel-2); }
.mk-lib-menu button.danger { color: var(--danger, #e5534b); }
.mk-work-tile { display: flex; flex-direction: column; gap: 4px; }
.mk-work-tile > .mk-lib-card { flex: 1; }
.mk-used { font-size: .78rem; color: var(--tally); }
.mk-work-sub { margin: 10px 0 6px; }
.mk-work-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); text-align: left; font: inherit; cursor: pointer; flex-wrap: wrap; }
.mk-work-bar { align-items: center; }
.mk-work-bar h2 { margin: 0; }
.mk-work-pen { width: 32px; height: 32px; font-size: 1rem; vertical-align: middle; }
.mk-work-name { gap: 8px; margin: 6px 0 2px; }
.mk-work-name input { flex: 1 1 220px; min-width: 0; }
.mk-work-del { margin: 12px 0; padding: 14px 16px; border: 1px solid var(--tally); border-radius: 14px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.mk-work-del p { margin: 0; }
.mk-work-opt { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.mk-work-opt span { font-size: .86rem; color: var(--muted); }
.mk-work-opt.on { border: 2px solid var(--tally); }
.mk-crumb { margin: 0 0 10px; color: var(--muted); }
.mk-work-mini { display: block; }
.mk-work-mini b { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: .78rem; font-weight: 600; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-work-mini small.run { top: 6px; bottom: auto; }
.mk-work-noimg { display: grid; place-items: center; height: 100%; font-size: 1.6rem; color: var(--muted); }

/* Editor (27 Nov) */
.ed-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 18px; align-items: start; margin-top: 12px; }
@media (max-width: 860px) { .ed-body { grid-template-columns: minmax(0, 1fr); } }
.ed-empty { padding: 28px 18px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ed-stage { display: flex; justify-content: center; background: #0b0d12; border-radius: 14px; padding: 10px; }
.ed-frame { position: relative; width: 100%; max-height: 62vh; max-width: 100%; touch-action: none; }
.ed-frame img, .ed-frame video { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.ed-crop { position: absolute; border: 2px solid #5dcaa5; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45); cursor: move; touch-action: none; }
.ed-frame { overflow: hidden; }
.ed-h { position: absolute; width: 18px; height: 18px; background: #5dcaa5; border-radius: 4px; touch-action: none; }
.ed-nw { left: -9px; top: -9px; cursor: nwse-resize; } .ed-ne { right: -9px; top: -9px; cursor: nesw-resize; }
.ed-sw { left: -9px; bottom: -9px; cursor: nesw-resize; } .ed-se { right: -9px; bottom: -9px; cursor: nwse-resize; }
.ed-audio { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.ed-audio audio { width: 100%; }
.ed-bar { position: relative; height: 14px; margin-top: 10px; border-radius: 7px; background: var(--panel-2); overflow: hidden; }
.ed-sel { position: absolute; top: 0; bottom: 0; background: rgba(93, 202, 165, .55); border-left: 3px solid #1d9e75; border-right: 3px solid #1d9e75; }
.ed-src { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ed-src span { color: var(--muted); font-size: .88rem; flex: 1; }
.ed-panel { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--panel); }
.ed-panel h3 { margin: 0 0 8px; font-size: .98rem; }
.ed-note { margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
.ed-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ed-chip { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
.ed-chip[aria-pressed="true"] { border: 2px solid #1d9e75; color: var(--text); background: rgba(93, 202, 165, .12); }
.ed-range { display: flex; flex-direction: column; gap: 2px; font-size: .86rem; color: var(--muted); margin-top: 6px; }
.ed-range input[type=range], .ed-slider input[type=range] { width: 100%; }
.ed-slider { display: flex; align-items: center; gap: 10px; }
.ed-slider b { min-width: 52px; text-align: right; font-size: .86rem; }
.ed-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ed-row > span { min-width: 54px; color: var(--muted); font-size: .86rem; }
.ed-trimlab { margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.ed-save { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.ed-result { margin-top: 14px; }

/* Story clothes and places (27 Nov) */
.mk-look-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.mk-look-place { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.mk-look-place .row { flex-wrap: nowrap; }
.mk-look-place input { flex: 1; min-width: 0; }
.mk-look-outfit { display: flex; flex-direction: column; gap: 4px; }

/* Projects as folders (27 Nov) */
.mk-newwork { gap: 8px; margin: 6px 0 12px; flex-wrap: wrap; align-items: center; }
.mk-newwork input { flex: 1 1 200px; min-width: 0; }
.mk-newwork .mk-calm { flex: 1 1 260px; font-size: .86rem; }
.mk-lib-wrap.drop > .mk-lib-card { outline: 3px dashed var(--tally); outline-offset: 2px; }
.mk-move-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; margin-top: 8px; }
.mk-move-row { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.mk-move-row:hover { border-color: var(--tally); }
.mk-move-row small { display: block; color: var(--muted); font-size: .8rem; }
.mk-move-pic { width: 44px; height: 44px; flex: none; border-radius: 8px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; }
.mk-move-pic img { width: 100%; height: 100%; object-fit: cover; }
.mk-section { border-left: 3px solid var(--tally); padding-left: 10px; border-radius: 0; }

/* The owner's service balances at the top (27 Nov) */
.bal-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.bal-btn i { font-style: normal; color: var(--muted); }
.bal { white-space: nowrap; }
.bal.warn { color: #e8a33d; }
.bal.bad { color: var(--danger, #e5534b); }
.bal-short { display: none; }
@media (max-width: 700px) { .bal-btn { font-size: .82rem; gap: 4px; } .bal-long { display: none; } .bal-short { display: inline; } }

/* A new version is ready (27 Nov) */
.update-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--tally); border-radius: 12px; background: var(--panel); }

.mk-dim { opacity: .55; }

/* ---------- the character studio (charstudio.js, 1 Dec 2026) ----------
   The same frame as the new Create: steps on the left (a row of numbers at the
   top on a phone), the step in the middle, the price and the one button on the right. */
.mk-char-assets { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; }
.mk-char-assets img { width: 52px; height: 36px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); background: var(--panel-2); }
.mk-char-assets span { font-size: .84rem; color: var(--muted); }
.cs-stepbar { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.cs-stepbar::-webkit-scrollbar { display: none; }
.cs-sb { flex: 1 0 34px; min-width: 34px; max-width: 48px; min-height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.cs-sb:disabled { cursor: default; opacity: .5; }
.cs-sb .mk-n, .cs .mk-n { width: 26px; height: 26px; flex: none; border-radius: 999px; display: grid; place-items: center; font-size: .8rem; border: 2px solid var(--line); }
.cs-sb.done .mk-n { border: 0; background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.cs-sb[aria-current="step"] .mk-n { border: 0; background: var(--tally); color: var(--tally-ink); }
.cs-chips button { min-height: 38px; padding: 6px 12px; font-size: .9rem; }
.cs-photo { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.cs-photo > img { width: 140px; max-width: 45%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); }
.cs-photo > .mk-add { flex: 1 1 100%; }
.cs-concepts { display: flex; flex-direction: column; gap: 10px; }
.cs-concept { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.cs-concept.on { border: 2px solid var(--tally); background: color-mix(in srgb, var(--tally) 6%, var(--panel)); }
.cs-concept-head { width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; }
.cs-concept-head b { font-size: 1rem; }
.cs-saved-concept { margin: 0; white-space: pre-line; line-height: 1.5; color: var(--text); }
.cs-concept-head span { font-size: .88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cs-concept-edit { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }
.cs-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.cs-cands:empty { display: none; }
.cs-cands.cs-one { grid-template-columns: minmax(0, 1fr); }
.cs-pic { margin: 0; display: flex; flex-direction: column; gap: 8px; position: relative; min-width: 0; }
.cs-pic img { width: 100%; max-height: 520px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); cursor: zoom-in; }
.cs-pic figcaption { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-pic figcaption .btn { flex: 1 1 auto; justify-content: center; }
.cs-now { display: flex; flex-direction: column; gap: 8px; }
.cs-now .cs-pic { max-width: 320px; }
.cs-now .cs-shape-16-9 { max-width: 100%; }
.cs-face { position: absolute; right: 8px; bottom: 8px; width: 72px !important; height: 72px; object-fit: cover !important; border: 2px solid var(--panel) !important; }
.cs-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 180px; padding: 16px; border-radius: 12px; border: 1px dashed var(--line); background: var(--panel); text-align: center; color: var(--muted); }
.cs-wait span { color: var(--text); font-weight: 600; }
.cs-wait small { font-size: .8rem; }
.cs-wait i { width: 12px; height: 12px; border-radius: 50%; background: var(--tally); animation: mkpulse 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .cs-wait i { animation: none; } }
.cs-fail { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--line)); background: var(--panel); }
.cs-check { font-size: .86rem; margin: 0; }
.cs-check.ok { color: var(--ok); }
.cs-check.warn { color: var(--warn); }
.cs-note { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--warn) 50%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, var(--panel)); }
.cs-outfits { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.cs-outfit { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.cs-outfit.on { border: 2px solid var(--tally); }
.cs-outfit img { aspect-ratio: 9 / 16; max-height: 260px; object-fit: cover; }
.cs-outfit b { overflow-wrap: anywhere; }
.cs-outfit-btns { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cs-tag { font-size: .84rem; color: var(--ok); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.cs-add-outfit { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--text) 22%, var(--line)); }
.cs-voice .char-voice select { max-width: 100%; }
.cs-file-top { display: flex; gap: 14px; align-items: center; }
.cs-file-top h2 { font-size: 1.4rem; overflow-wrap: anywhere; }
.cs-face-big { width: 96px; height: 96px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); cursor: zoom-in; }
.cs-make { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.cs-secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.cs-sec { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.cs-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cs-sec-head h2 { font-size: 1rem; }
.cs-sec .cs-pic img { max-height: 240px; }
.cs-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cs-thumb { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); }
.cs-thumb.on { border: 2px solid var(--tally); }
.cs-thumb img, .cs-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-go2 { justify-content: center; }
/* Everything of the old character dialog (1 Dec 2026 parity): small secondary buttons, a photo to check
   before it is saved, the face square, the whole body, "match the look of my character" chips. */
.cs-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cs-tools .btn { max-width: 100%; white-space: normal; text-align: left; }
/* a button whose call is running says what is happening (1 Dec 2026): the words may take two lines */
.cs .mk-foot .btn { white-space: normal; height: auto; line-height: 1.25; }
.cs .btn.cs-busy { white-space: normal; height: auto; line-height: 1.25; text-align: center; }
/* step 8: a new voice described in words */
.cs-vd { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cs-vd .mk-chips { flex-wrap: wrap; }
.cs-vd-open { margin-top: 10px; }
.cs-plain { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: .9rem; }
.cs-sub { display: flex; flex-direction: column; gap: 8px; }
.cs-face-cands { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 220px)); }
.cs-swap, .cs-crop { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--tally); background: var(--panel); min-width: 0; }
.cs-swap .cs-photo p { flex: 1 1 160px; margin: 0; }
.cs-crop-box { position: relative; display: inline-block; align-self: center; max-width: 100%; touch-action: manipulation; cursor: crosshair; }
.cs-crop-box img { display: block; max-width: 100%; max-height: 420px; border-radius: 8px; user-select: none; }
#cs-crop-frame { position: absolute; border: 3px solid var(--tally); border-radius: 6px; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); pointer-events: none; }
.cs-crop-box { overflow: hidden; border-radius: 8px; }
.cs-body-thumb { width: 120px; max-width: 45%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); cursor: zoom-in; }
.cs-match button { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.cs-match img { width: 26px; height: 26px; flex: none; border-radius: 50%; object-fit: cover; }
.cs-go3 { font-size: .9rem; }
@media (max-width: 899px) {
  .cs .mk-foot .mk-go, .cs .mk-foot .cs-go2 { flex: 1 1 100%; }
  .cs .mk-foot .mk-price:empty { display: none; }
  .cs { padding-bottom: 170px; }
  .cs:has(.cs-go3) { padding-bottom: 220px; }   /* three buttons: "Done, back to what I was making" too */
}
@media (min-width: 900px) {
  .cs-stepbar { display: none; }
  .cs .mk-side .cs-go2 { width: 100%; }
}
