/* Studio — dark, content-first. Violet accent from the Flipped Motion mark. */
:root {
  --bg: #0b0a10;
  --panel: #13121a;
  --panel-2: #1a1823;
  --line: #262331;
  --line-2: #332f42;
  --text: #ecebf2;
  --muted: #9894a8;
  --faint: #6b6780;
  --accent: #aa69f9;
  --accent-2: #c296ff;
  --accent-ink: #0b0a10;
  --accent-soft: rgba(170, 105, 249, .14);
  --you: #ffb547;
  --you-soft: rgba(255, 181, 71, .13);
  --ok: #3ddc97;
  --ok-soft: rgba(61, 220, 151, .13);
  --err: #ff6b7a;
  --err-soft: rgba(255, 107, 122, .13);
  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: 26px; line-height: 1.2; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.hide { display: none !important; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(180deg, rgba(157,107,255,.06), transparent 240px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand b { font-size: 15px; letter-spacing: -.01em; }
.brand span:not(.wordmark) { margin-top: 3px; }
.brand span { display: block; font-size: 12px; color: var(--muted); margin-top: -2px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 10px; color: var(--muted); font-weight: 550;
}
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--text); }
.nav a.on svg { color: var(--accent-2); }
.nav svg { width: 19px; height: 19px; flex: none; }
.nav .count {
  margin-left: auto; background: var(--you); color: #1a1205;
  font-size: 11px; font-weight: 750; border-radius: 99px; padding: 1px 7px;
}
.side .grow { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); margin-top: 8px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--accent-2);
}
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who a { font-size: 12px; color: var(--muted); }

.main { min-width: 0; padding: 28px 36px 80px; max-width: 1180px; width: 100%; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.head .sub { color: var(--muted); margin-top: 4px; }
.crumb { color: var(--muted); font-size: 13px; margin-bottom: 8px; display: inline-flex; gap: 6px; align-items: center; }
.crumb:hover { color: var(--text); }

/* mobile tab bar */
.tabs { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding: 18px 16px 110px; }
  h1 { font-size: 22px; }
  .tabs {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: rgba(11,10,16,.92); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--faint); padding: 6px 0; position: relative; }
  .tabs a.on { color: var(--text); }
  .tabs a.on svg { color: var(--accent-2); }
  .tabs svg { width: 22px; height: 22px; }
  .tabs .dot { position: absolute; top: 4px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--you); }
  .head { flex-wrap: wrap; align-items: flex-start; }
}

/* ---------- buttons + forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 11px;
  font: 600 14px/1 var(--font); cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: #463f5c; background: #211e2c; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.danger { color: var(--err); }
.btn.big { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .price { font-weight: 500; opacity: .75; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.stack { display: grid; gap: 14px; }

label.f { display: grid; gap: 7px; }
label.f > span { font-size: 13px; font-weight: 600; color: var(--muted); }
label.f > span em { font-style: normal; color: var(--faint); font-weight: 500; }
input[type=text], input[type=password], input[type=url], textarea, select {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 11px;
  font: 15px/1.45 var(--font); padding: 11px 13px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.hint { font-size: 13px; color: var(--faint); }

/* segmented length picker */
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 8px; text-align: center; cursor: pointer;
  background: var(--bg); transition: border-color .15s, background .15s;
}
.seg label b { display: block; font-size: 18px; }
.seg label span { font-size: 12px; color: var(--faint); }
.seg input:checked + label { border-color: var(--accent); background: var(--accent-soft); }
.seg input:checked + label span { color: var(--accent-2); }
.seg input:focus-visible + label { box-shadow: 0 0 0 3px var(--accent-soft); }

/* chips (pick characters / cars) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip label {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 99px; padding: 4px 12px 4px 4px; background: var(--bg);
  font-size: 13px; font-weight: 550;
}
.chip label img, .chip label .ph { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: 12% 20%; background: var(--panel-2); }
.chip input:checked + label { border-color: var(--accent); background: var(--accent-soft); }

/* file drop */
.drop {
  border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 22px; text-align: center; cursor: pointer;
  background: var(--bg); color: var(--muted); transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { display: none; }
.drop .thumbs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.drop .thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 9px; }

/* ---------- surfaces */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.card.pad { padding: 20px; }
.section { margin-top: 30px; }
.section > .label svg { width: 15px; height: 15px; }
.section > .label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
.empty { text-align: center; padding: 56px 20px; }
.empty .art { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.empty .art svg { width: 30px; height: 30px; }
.empty h2 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 380px; margin: 0 auto 18px; }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.you { color: var(--you); background: var(--you-soft); }
.pill.work { color: var(--accent-2); background: var(--accent-soft); }
.pill.work::before { animation: pulse 1.2s ease-in-out infinite; }
.pill.done { color: var(--ok); background: var(--ok-soft); }
.pill.err { color: var(--err); background: var(--err-soft); }
.pill.plain { color: var(--muted); background: var(--panel-2); }
.pill.plain::before { display: none; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- video grid */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 16px; }
.vcard { display: block; border-radius: var(--r); overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.vcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.vthumb { aspect-ratio: 9/16; background: radial-gradient(120% 70% at 50% 0%, #241c3a 0%, var(--panel-2) 60%); position: relative; display: grid; place-items: center; overflow: hidden; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; }
.vthumb .len { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.vthumb .glyph { color: var(--faint); text-align: center; padding: 16px; font-size: 13px; }
.vthumb .glyph svg { width: 28px; height: 28px; margin: 0 auto 8px; color: var(--accent-2); }
.vthumb .spin { width: 26px; height: 26px; margin: 0 auto 10px; }
.vbody { padding: 10px 12px 12px; display: grid; gap: 6px; }
.vbody b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vbody .meta { font-size: 12px; color: var(--faint); }

/* waiting list (needs you) */
.todo { display: grid; gap: 10px; }
.todo a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.todo a:hover { border-color: var(--line-2); }
.todo .tmb { width: 44px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--panel-2); flex: none; display: grid; place-items: center; color: var(--accent-2); }
.todo .tmb img { width: 100%; height: 100%; object-fit: cover; }
.todo .tmb svg { width: 20px; height: 20px; }
.todo .txt { min-width: 0; flex: 1; }
.todo .txt b { display: block; }
.todo .txt span { color: var(--muted); font-size: 13px; }
.todo .go { color: var(--faint); }

/* ---------- people/things grid (characters, cars) */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pcard { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pimg { aspect-ratio: 16/10; background: #d9d9de; position: relative; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pimg.dark { background: var(--panel-2); display: grid; place-items: center; color: var(--faint); }
.pimg .tag { position: absolute; left: 8px; top: 8px; }
.pimg .tag .pill { background: rgba(11,10,16,.86); backdrop-filter: blur(6px); }
.pimg.dark svg { width: 40px; height: 40px; }
.crumb svg { width: 16px; height: 16px; }
.pbody { padding: 12px 14px 14px; display: grid; gap: 4px; }
.pbody .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--faint); margin-top: 4px; }
.pbody .meta svg { width: 14px; height: 14px; }
.addcard { display: grid; place-items: center; text-align: center; gap: 8px; min-height: 220px; border: 1.5px dashed var(--line-2); border-radius: var(--r); color: var(--muted); transition: border-color .15s, color .15s; }
.addcard:hover { border-color: var(--accent); color: var(--text); }
.addcard svg { display: block; width: 26px; height: 26px; color: var(--accent-2); margin: 0 auto 6px; }

/* ---------- detail layouts */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.split.vid { grid-template-columns: 340px minmax(0, 1fr); }
@media (max-width: 1000px) { .split, .split.vid { grid-template-columns: minmax(0, 1fr); } }
.player { aspect-ratio: 9/16; width: 100%; background: #000; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.player video { width: 100%; height: 100%; object-fit: contain; }
.sticky { position: sticky; top: 24px; }
@media (max-width: 1000px) { .sticky { position: static; } .player { max-width: 360px; margin: 0 auto; } }

.sheet { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #d9d9de; }
.sheet img { width: 100%; }
.sheet.pending { outline: 2px solid var(--accent); outline-offset: 3px; }

/* script */
.script { white-space: pre-wrap; font-size: 15px; line-height: 1.65; }
.script .shotline { display: block; padding: 7px 0; border-bottom: 1px solid var(--line); }
.script .shotline:last-child { border-bottom: 0; }
.script .t { color: var(--accent-2); font-variant-numeric: tabular-nums; font-weight: 650; margin-right: 6px; }
.script .q { color: var(--text); font-weight: 600; }
.script .part { display: block; text-align: center; font-size: 12px; letter-spacing: .1em; color: var(--faint); padding: 10px 0; }

/* banner / callouts */
.callout { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); }
.callout svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.callout.you { border-color: rgba(255,181,71,.35); background: linear-gradient(0deg, var(--you-soft), var(--you-soft)), var(--panel); }
.callout.you svg { color: var(--you); }
.callout.err { border-color: rgba(255,107,122,.35); background: linear-gradient(0deg, var(--err-soft), var(--err-soft)), var(--panel); }
.callout.err svg { color: var(--err); }
.callout.work svg { color: var(--accent-2); }
.callout.ok svg { color: var(--ok); }
.callout .grow { flex: 1; min-width: 0; }
.callout b { display: block; margin-bottom: 2px; }

/* working state */
.working { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r); border: 1px solid rgba(157,107,255,.35); background: linear-gradient(90deg, var(--accent-soft), transparent 70%), var(--panel); }
.working b { display: block; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(157,107,255,.25); border-top-color: var(--accent-2); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 4px; transition: width 1s linear; }

/* voice picker */
.voice { display: grid; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.voice .who { display: flex; gap: 12px; align-items: center; }
.voice .who img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 12% 20%; background: #d9d9de; }
.vopt { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line); }
.vopt .n { font-weight: 700; color: var(--muted); width: 16px; }
.vopt audio { flex: 1; height: 34px; min-width: 0; }
audio::-webkit-media-controls-panel { background: var(--panel-2); }

/* cast strip on video page */
.cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cast a { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cast a:hover { border-color: var(--line-2); }
.cast .ci { aspect-ratio: 16/10; background: #d9d9de; overflow: hidden; }
.cast .ci img { width: 100%; height: 100%; object-fit: cover; }
.cast .ci.none { background: var(--panel-2); display: grid; place-items: center; font-size: 12px; color: var(--faint); }

.cast .cn svg { width: 14px; height: 14px; }
.cast .cn { padding: 8px 10px; font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }

/* details/summary panels */
details.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
details.panel > summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary svg { width: 18px; height: 18px; color: var(--muted); }
details.panel > summary .chev { margin-left: auto; transition: transform .2s; }
details.panel[open] > summary .chev { transform: rotate(180deg); }
details.panel > .in { padding: 0 18px 18px; display: grid; gap: 14px; }

/* tables (team) */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
@media (max-width: 700px) {
  .table thead { display: none; }
  .table tr { display: grid; gap: 6px; padding: 14px; border-bottom: 1px solid var(--line); }
  .table td { padding: 0; border: 0; }
}

/* ideas */
.ideas { display: grid; gap: 10px; }
.idea { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.idea p { flex: 1; white-space: pre-wrap; }
.idea .row { flex: none; }

/* toast */
.toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 50; padding: 11px 16px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; font-weight: 550; max-width: calc(100vw - 32px); animation: drop .3s ease-out; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--err); }
@keyframes drop { from { transform: translate(-50%, -12px); opacity: 0; } }

/* sign in + setup */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(80% 60% at 50% 0%, rgba(157,107,255,.16), transparent 70%), var(--bg); }
.authbox { width: 100%; max-width: 420px; }
.authbox .logo { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 18px; box-shadow: 0 10px 40px rgba(157,107,255,.35); }
.authbox h1 { text-align: center; }
.authbox .sub { text-align: center; color: var(--muted); margin: 6px 0 26px; }
.steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 26px; }
.steps i { width: 36px; height: 4px; border-radius: 4px; background: var(--line-2); }
.steps i.on { background: var(--accent); }
.steps i.done { background: var(--accent-2); opacity: .5; }
.howto { counter-reset: s; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.howto li { counter-increment: s; display: flex; gap: 12px; font-size: 14px; color: var(--muted); }
.howto li::before { content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.howto a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.howto code, .codebox { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 7px; padding: 1px 6px; color: var(--text); }
.secret { font-family: ui-monospace, Menlo, monospace; font-size: 18px; letter-spacing: .02em; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px dashed var(--accent); text-align: center; user-select: all; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* character face crop from a sheet (bottom-left expression) */
.face { display: inline-block; width: 28px; height: 28px; border-radius: 50%; flex: none; background-color: #d9d9de; background-repeat: no-repeat; background-size: 420% auto; background-position: 1% 96%; }
.face.lg { width: 44px; height: 44px; }

/* assets sub-tabs */
.subtabs { display: flex; gap: 6px; margin: -6px 0 22px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; width: fit-content; max-width: 100%; overflow-x: auto; }
.subtabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.subtabs a svg { width: 17px; height: 17px; }
.subtabs a:hover { color: var(--text); }
.subtabs a.on { background: var(--accent-soft); color: var(--text); }
.subtabs a.on svg { color: var(--accent-2); }
@media (max-width: 860px) { .tabs { grid-template-columns: repeat(4, 1fr); } }

.howto code { word-break: break-all; }

/* ONLY TOONS wordmark */
.wordmark { font-family: "Lilita One", var(--font); font-weight: 400; letter-spacing: .02em; color: #fff; display: inline-flex; gap: .28em; line-height: 1; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.wordmark em { font-style: normal; background: linear-gradient(90deg, #ff4fd8, #a678ff 55%, #6ee7ff); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 10px rgba(166,120,255,.45)); display: inline-block; transform: rotate(-3deg) translateY(-1px); }
.brand .wordmark { font-size: 19px; display: inline-flex; color: #fff; margin-top: 0; }
.wordmark.lg { font-size: 44px; justify-content: center; width: 100%; margin-bottom: 4px; }

/* Only Toons OT mark (owner's artwork) */
.brand img.brand-mark { width: auto; height: 40px; border-radius: 0; }
.brand b { font-size: 16px; }
.hero-mark { display: block; height: 76px; width: auto; margin: 0 auto 16px; filter: drop-shadow(0 8px 28px rgba(140,70,240,.45)); }
.hero-mark.sm { height: 52px; margin-bottom: 18px; }

/* photo picker thumbnails with remove buttons */
.drop .thumbs .thumb { position: relative; display: inline-block; }
.drop .thumbs .thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 9px; display: block; }
.drop .thumbs .thumb-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: 600 14px/1 var(--font); cursor: pointer; display: grid; place-items: center; padding: 0; }
.drop .thumbs .thumb-x:hover { background: var(--err); border-color: var(--err); color: #fff; }

/* Spending analytics */
.an { --s1: #338ced; --s2: #e76624; --s3: #00a888; display: flex; flex-direction: column; gap: 16px; }
.an h3 { font-size: 15px; font-weight: 650; }
.an-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { font: inherit; font-size: 13.5px; font-weight: 550; color: var(--muted); background: none; border: 0; border-radius: 9px; padding: 7px 12px; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg.sm button { padding: 6px 10px; font-size: 13px; }
.an-custom { display: flex; gap: 12px; flex-wrap: wrap; }
.an-custom label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.an-custom input { width: auto; padding: 7px 10px; color-scheme: dark; }
.an-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi .k { font-size: 13px; color: var(--muted); }
.kpi b { font-size: 28px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12.5px; color: var(--faint); }
.an-chart { position: relative; }
.an-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.legend { display: flex; gap: 6px; flex-wrap: wrap; }
.lg { font: inherit; font-size: 13px; color: var(--text); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 8px; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.lg i, .tl i, .sv-l i, .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.lg.off { color: var(--faint); border-style: dashed; }
.lg.off i { opacity: .25; }
.chart { position: relative; min-height: 260px; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .grid.base { stroke: var(--line-2); }
.chart .ax { fill: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart svg.hov .bar { opacity: .35; }
.chart svg.hov .bar.on { opacity: 1; }
.chart-empty { position: absolute; inset: 0 0 30px 52px; display: grid; place-items: center; color: var(--faint); font-size: 14px; pointer-events: none; }
.tip { position: absolute; z-index: 5; min-width: 180px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); pointer-events: none; font-size: 13px; }
.tip b { font-weight: 650; }
.tip .tt { font-size: 20px; font-weight: 700; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.tip .tt span { font-size: 12px; color: var(--faint); font-weight: 500; margin-left: 8px; }
.tl { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 2px 0; }
.tl span { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.an-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.hb { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hb:last-child { border-bottom: 0; }
.hb-l { display: flex; flex-direction: column; min-width: 0; }
.hb-l a, .hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-l span { font-size: 12px; }
.hb-t { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.hb-t i { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.hb b, .sv-v { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; min-width: 64px; }
.sv { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.sv.off { opacity: .45; }
.sv-l { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; flex-wrap: wrap; }
.sv-l span { font-size: 12px; }
.sv-p { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.split-bar { height: 10px; border-radius: 5px; background: var(--line-2); overflow: hidden; margin-bottom: 6px; }
.split-bar i { display: block; height: 100%; background: var(--accent); border-right: 2px solid var(--panel); }
.an-table-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 16px 6px; }
.an-table-head input { width: 260px; max-width: 100%; padding: 8px 12px; }
.an-table .dot { margin-right: 7px; vertical-align: -1px; }
.nowrap { white-space: nowrap; }
.sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-transform: inherit; letter-spacing: inherit; }
.sort[data-dir="desc"]::after { content: " ↓"; }
.sort[data-dir="asc"]::after { content: " ↑"; }
@media (max-width: 900px) { .an-kpis { grid-template-columns: 1fr 1fr; } .an-two { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .kpi b { font-size: 22px; } .seg button { padding: 6px 9px; font-size: 13px; } .an-table-head input { width: 100%; } }
