:root {
  --bg: #06070c;
  --ink: #f4f6fb;
  --ink-2: #b9c0d4;
  --muted: #7d859c;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --glass: rgba(255, 255, 255, .035);
  --glass-2: rgba(255, 255, 255, .06);
  --mint: #8ff3d8;
  --sky: #59c3ff;
  --indigo: #6c79ff;
  --amber: #ffcf8a;
  --bad: #ff7d8c;
  --grad: linear-gradient(120deg, var(--mint) 0%, var(--sky) 48%, var(--indigo) 100%);
  --grad-soft: linear-gradient(120deg, rgba(143, 243, 216, .16), rgba(89, 195, 255, .12) 50%, rgba(108, 121, 255, .16));
  --r: 18px;
  --r-sm: 12px;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Geist', ui-sans-serif, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--bad); min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }
em { font-style: italic; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; margin: 0; line-height: 1.05; }
h1 em, h2 em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }

/* ---------- atmosphere ---------- */
.aurora { position: fixed; inset: -20vmax; z-index: -2; filter: blur(80px) saturate(130%); opacity: .9; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: drift 26s var(--ease) infinite alternate; }
.aurora i:nth-child(1) { width: 60vmax; height: 60vmax; left: -5vmax; top: -10vmax; background: radial-gradient(circle, rgba(143, 243, 216, .55), transparent 62%); }
.aurora i:nth-child(2) { width: 55vmax; height: 55vmax; right: -10vmax; top: 5vmax; background: radial-gradient(circle, rgba(108, 121, 255, .55), transparent 62%); animation-duration: 32s; animation-delay: -8s; }
.aurora i:nth-child(3) { width: 50vmax; height: 50vmax; left: 25vmax; bottom: -20vmax; background: radial-gradient(circle, rgba(89, 195, 255, .4), transparent 62%); animation-duration: 38s; animation-delay: -14s; }
@keyframes drift { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); } }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); }

.logo-mark { width: 30px; height: 30px; border-radius: 10px; background: var(--grad); position: relative; box-shadow: 0 6px 24px rgba(89, 195, 255, .35); flex: none; }
.logo-mark::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--bg); }

/* ---------- controls ---------- */
input, textarea, select {
  width: 100%; background: rgba(0, 0, 0, .28); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 13px 15px; font: 16px/1.5 var(--sans); transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 110px; }
input::placeholder, textarea::placeholder { color: #5d6478; }
input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(89, 195, 255, .6); box-shadow: 0 0 0 4px rgba(89, 195, 255, .12); }
label.field { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }

button { font: 500 15px var(--sans); color: var(--ink); cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; background: var(--grad); color: #041019; font-weight: 600;
  box-shadow: 0 10px 30px -8px rgba(89, 195, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 36px -8px rgba(89, 195, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-primary:active:not(:disabled) { transform: scale(.98); }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--glass-2); transition: border-color .2s, background .2s; }
.btn-ghost:hover:not(:disabled) { border-color: rgba(143, 243, 216, .5); }
.btn-text { color: var(--ink-2); padding: 8px 10px; font-size: 14px; }
.btn-text.danger { color: var(--bad); }
.wide { width: 100%; }
.btn-primary.busy::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(4, 16, 25, .3); border-top-color: #041019; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.segmented button { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-size: 14px; transition: background .2s, color .2s; }
.segmented button.on { background: var(--glass-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }

.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--ink-2); font-size: 14px; transition: all .2s var(--ease); }
.chip.on { border-color: transparent; background: var(--grad-soft); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(143, 243, 216, .45); }
.chip.on::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- login ---------- */
.login { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(380px, 100%); padding: 34px 28px; text-align: center; animation: rise .7s var(--ease) both; }
.login-card .logo-mark { margin: 0 auto 22px; width: 44px; height: 44px; border-radius: 14px; }
.login-card .logo-mark::after { inset: 13px; }
.login-card h1 { font-size: 44px; }
.login-card p { margin: 8px 0 22px; }
.login-card input { margin-bottom: 12px; text-align: center; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100svh; }
.rail { position: sticky; top: 0; height: 100svh; padding: 26px 18px; display: flex; flex-direction: column; gap: 28px; border-right: 1px solid var(--line); background: rgba(6, 7, 12, .35); backdrop-filter: blur(20px); }
.brand { display: flex; align-items: center; gap: 12px; font: 26px var(--serif); padding-left: 6px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav button { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--ink-2); text-align: left; transition: background .2s, color .2s; }
.nav button:hover { background: var(--glass); color: var(--ink); }
.nav button.on { background: var(--glass-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.nav button.on svg { stroke: var(--mint); }
.balances { margin-top: auto; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; padding-left: 6px; }
.balances b { color: var(--ink-2); font-weight: 500; }
.main { min-width: 0; }
.view { max-width: 980px; margin: 0 auto; padding: 44px 36px 140px; }
.warning { margin: 16px 36px 0; padding: 11px 16px; border-radius: 12px; background: rgba(255, 207, 138, .08); border: 1px solid rgba(255, 207, 138, .25); color: var(--amber); font-size: 13px; }
.tabbar { display: none; }

/* ---------- page heads ---------- */
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--grad); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; animation: rise .6s var(--ease) both; }
.page-head h1 { font-size: clamp(40px, 6vw, 64px); }
.page-head p { margin: 10px 0 0; color: var(--ink-2); max-width: 46ch; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: rise .6s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .05s; } .stagger > *:nth-child(3) { animation-delay: .1s; }
.stagger > *:nth-child(4) { animation-delay: .15s; } .stagger > *:nth-child(5) { animation-delay: .2s; }
.stagger > *:nth-child(n+6) { animation-delay: .25s; }

/* ---------- home gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tile { position: relative; aspect-ratio: 9 / 14; border-radius: var(--r); overflow: hidden; cursor: pointer; border: 1px solid var(--line); background: var(--glass); transition: transform .35s var(--ease), border-color .3s; }
.tile:hover { transform: translateY(-4px); border-color: var(--line-2); }
.tile img, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(4, 6, 12, .92)); }
.tile .cap { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; }
.tile .cap strong { display: block; font: 22px/1.1 var(--serif); }
.tile .cap span { font-size: 12px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.tile .empty-art { position: absolute; inset: 0; background: var(--grad-soft); }
.tile.new { display: grid; place-items: center; text-align: center; border: 1px dashed rgba(143, 243, 216, .35); background: linear-gradient(160deg, rgba(143, 243, 216, .08), rgba(108, 121, 255, .08)); }
.tile.new::after { display: none; }
.tile.new .plus { width: 58px; height: 58px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #041019; margin: 0 auto 14px; box-shadow: 0 12px 30px -8px rgba(89, 195, 255, .6); }
.tile.new .plus svg { width: 26px; height: 26px; stroke-width: 2.2; }
.tile.new strong { font: 24px var(--serif); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11px; letter-spacing: .04em; background: rgba(4, 6, 12, .7); border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.tile .badge { position: absolute; top: 12px; left: 12px; z-index: 1; }
.badge.final { color: var(--mint); border-color: rgba(143, 243, 216, .4); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 0 rgba(89, 195, 255, .7); animation: pulse 1.6s infinite; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(89, 195, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(89, 195, 255, 0); } }

/* ---------- wizard ---------- */
.crumb { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.crumb input { background: transparent; border-color: transparent; font: 30px var(--serif); padding: 4px 8px; margin-left: -8px; }
.crumb input:hover { border-color: var(--line); }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 30px; }
.steps button { text-align: left; padding: 12px 12px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); position: relative; overflow: hidden; transition: border-color .25s, background .25s; }
.steps button .n { font: 13px var(--sans); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.steps button .t { display: block; font: 19px/1.1 var(--serif); margin-top: 4px; color: var(--ink-2); }
.steps button::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--grad); transition: width .5s var(--ease); }
.steps button.done::after { width: 100%; }
.steps button.done .n { color: var(--mint); }
.steps button.cur { border-color: rgba(89, 195, 255, .5); background: var(--glass-2); }
.steps button.cur .t { color: var(--ink); }
.steps button.locked { opacity: .4; }

.stage { padding: 30px; animation: rise .5s var(--ease) both; }
.stage-head { margin-bottom: 22px; }
.stage-head h2 { font-size: clamp(34px, 4.6vw, 48px); }
.stage-head p { margin: 8px 0 0; color: var(--ink-2); max-width: 60ch; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.cost { font-size: 13px; color: var(--muted); }
.cost b { color: var(--amber); font-weight: 500; }
.actions { margin-top: 22px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* photo strip */
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.thumb { position: relative; flex: none; width: 82px; height: 82px; border-radius: 16px; overflow: hidden; cursor: pointer; scroll-snap-align: start; border: 1px solid var(--line); transition: transform .2s var(--ease); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.85); transition: filter .2s; }
.thumb.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--sky); }
.thumb.on img { filter: none; }
.thumb.on::after { content: '✓'; position: absolute; right: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--grad); color: #041019; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.thumb.add { display: grid; place-items: center; background: var(--glass); color: var(--muted); border-style: dashed; }

/* results */
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 24px; }
.result { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--glass); cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s; }
.result img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result:hover { transform: translateY(-3px); }
.result.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--mint), 0 20px 40px -12px rgba(143, 243, 216, .35); }
.result .badge { position: absolute; left: 10px; top: 10px; }
.result.loading { cursor: default; display: grid; place-items: center; text-align: center; color: var(--ink-2); font-size: 13px; }
.result.loading::before { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%); background-size: 220% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.result.failed, .take.failed { cursor: default; color: var(--bad); font-size: 13px; padding: 14px; display: grid; place-items: center; text-align: center; }

/* script cards */
.cards { display: grid; gap: 10px; }
.card-pick { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); cursor: pointer; transition: border-color .2s, background .2s; text-align: left; width: 100%; }
.card-pick:hover { border-color: var(--line-2); }
.card-pick.on { border-color: transparent; background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(143, 243, 216, .45); }
.card-pick strong { display: block; font-weight: 500; margin-bottom: 4px; }
.card-pick p { margin: 0; color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
details.own { margin-top: 14px; }
details.own summary { cursor: pointer; color: var(--ink-2); list-style: none; padding: 8px 0; }
details.own summary::before { content: '+ '; color: var(--mint); }
details.own[open] summary::before { content: '− '; }

/* tags */
.tagbar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; scrollbar-width: none; }
.tagbar::-webkit-scrollbar { display: none; }
.tagbar button { flex: none; padding: 7px 12px; border-radius: 999px; font-size: 13px; color: var(--mint); background: rgba(143, 243, 216, .06); border: 1px solid rgba(143, 243, 216, .2); }
.script-box { font-family: var(--sans); min-height: 240px; line-height: 1.75; }

/* takes */
.takes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 22px; }
.take { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); display: flex; align-items: center; gap: 14px; transition: box-shadow .3s; }
.take.on { box-shadow: inset 0 0 0 1px rgba(143, 243, 216, .55); background: var(--grad-soft); }
.play { width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--grad); color: #041019; box-shadow: 0 8px 22px -8px rgba(89, 195, 255, .7); }
.play svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.take .info { flex: 1; min-width: 0; }
.take .info strong { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.take .info small { color: var(--muted); }
.bar { height: 3px; border-radius: 3px; background: var(--line); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); }
.take.loading { color: var(--ink-2); font-size: 14px; }

.slider { display: flex; align-items: center; gap: 14px; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 4px; padding: 0; border: 0; border-radius: 4px; background: var(--line-2); flex: 1; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); box-shadow: 0 4px 14px rgba(89, 195, 255, .5); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--sky); }
.slider output { font-variant-numeric: tabular-nums; color: var(--ink-2); width: 44px; text-align: right; }

/* video */
.split { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: start; }
.preview { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 9 / 16; border: 1px solid var(--line); background: #000; }
.preview img, .preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview .badge { position: absolute; left: 10px; bottom: 10px; }
.player { width: min(360px, 100%); border-radius: 22px; overflow: hidden; border: 1px solid var(--line-2); background: #000; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), 0 0 0 6px rgba(255, 255, 255, .02); }
.player video { width: 100%; display: block; }
.render-list { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 26px; }
.render { display: flex; flex-direction: column; gap: 10px; }
.render .meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.progress-card { width: min(360px, 100%); aspect-ratio: 9 / 16; border-radius: 22px; border: 1px solid var(--line); background: var(--glass); display: grid; place-items: center; text-align: center; padding: 26px; position: relative; overflow: hidden; }
.progress-card::before { content: ''; position: absolute; width: 140%; aspect-ratio: 1; background: conic-gradient(from 0deg, transparent, rgba(89, 195, 255, .25), transparent 40%); animation: spin 4s linear infinite; }
.progress-card > div { position: relative; }
.progress-card strong { display: block; font: 28px var(--serif); margin: 6px 0; }
.progress-card.failed::before { display: none; }
.progress-card.failed { color: var(--bad); }

.formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.format { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); text-align: left; transition: all .2s; }
.format strong { display: block; font: 22px var(--serif); margin-bottom: 4px; }
.format small { color: var(--muted); font-size: 13px; line-height: 1.4; display: block; }
.format.on { border-color: transparent; background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(143, 243, 216, .5); }

/* sticky wizard bar */
.wizbar { position: fixed; left: 236px; right: 0; bottom: 0; z-index: 10; padding: 14px 36px calc(14px + var(--safe-b)); background: linear-gradient(180deg, transparent, rgba(6, 7, 12, .92) 40%); }
.wizbar .inner { max-width: 908px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 999px; background: rgba(15, 17, 26, .75); border: 1px solid var(--line); backdrop-filter: blur(20px); }
.wizbar .where { flex: 1; text-align: center; font-size: 13px; color: var(--muted); }
.wizbar .where b { color: var(--ink); font-weight: 500; }

/* library pages */
.panel { padding: 24px; margin-bottom: 18px; }
.panel h3 { font-size: 28px; margin-bottom: 6px; }
.panel p.muted { margin: 0 0 16px; }
.list { display: grid; gap: 10px; }
.item { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; }
.item .body { flex: 1; min-width: 0; }
.item .body strong { font-weight: 500; }
.item .body p { margin: 6px 0 0; color: var(--ink-2); white-space: pre-wrap; font-size: 14px; }
.item .body textarea { margin-top: 8px; }
.pill { font-size: 11px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pill.todo { color: var(--mint); border-color: rgba(143, 243, 216, .35); }
.filters { margin-bottom: 14px; }
.photo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-wall .ph { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.photo-wall img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-wall .del { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(4, 6, 12, .7); display: grid; place-items: center; backdrop-filter: blur(6px); }
.drop { display: grid; place-items: center; gap: 8px; text-align: center; padding: 34px 20px; border-radius: var(--r); border: 1px dashed rgba(143, 243, 216, .35); background: linear-gradient(160deg, rgba(143, 243, 216, .05), rgba(108, 121, 255, .06)); cursor: pointer; transition: background .2s; }
.drop:hover, .drop.over { background: linear-gradient(160deg, rgba(143, 243, 216, .1), rgba(108, 121, 255, .1)); }
.drop strong { font: 24px var(--serif); }
.voice-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.voice-row .av { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #041019; font-weight: 700; flex: none; }
.voice-row input[type=text] { background: transparent; border-color: transparent; padding: 6px 8px; font-weight: 500; }
.voice-row input[type=text]:focus { border-color: var(--line-2); }
.toggle { position: relative; width: 44px; height: 26px; flex: none; }
.toggle input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .2s; }
.toggle span::after { content: ''; position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.toggle input:checked + span { background: var(--sky); }
.toggle input:checked + span::after { transform: translateX(18px); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty strong { display: block; font: 28px var(--serif); color: var(--ink); margin-bottom: 6px; }

.toast { position: fixed; left: 50%; bottom: calc(110px + var(--safe-b)); transform: translateX(-50%); z-index: 50; padding: 12px 20px; border-radius: 999px; background: rgba(20, 23, 34, .92); border: 1px solid var(--line-2); backdrop-filter: blur(14px); font-size: 14px; max-width: calc(100vw - 32px); animation: rise .35s var(--ease) both; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .6); }
.toast.bad { color: var(--bad); border-color: rgba(255, 125, 140, .35); }


/* ---------- batch ---------- */
.tile.new.alt { border-color: rgba(108, 121, 255, .4); background: linear-gradient(160deg, rgba(108, 121, 255, .1), rgba(89, 195, 255, .06)); }
.tile.new.alt .plus { background: linear-gradient(120deg, var(--sky), var(--indigo)); }
.tile.batch .stack-art { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.tile.batch .stack-art img { position: static; width: 100%; height: 100%; object-fit: cover; }
.tile.batch .stack-art:has(img:only-child) { grid-template-columns: 1fr; }
.tile.batch .badge svg { width: 13px; height: 13px; }
.steps.five { grid-template-columns: repeat(5, 1fr); }
.brows { display: grid; gap: 10px; }
.brow { padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border-radius: 16px; }
.brow.col { grid-template-columns: 1fr; }
.brow-head { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.brow-head strong { font-weight: 500; display: block; }
.brow-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.num { font: 22px/1 var(--serif); color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; flex: none; min-width: 26px; }
.brow-media { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mini { width: 54px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; background: var(--glass); display: grid; place-items: center; transition: box-shadow .2s; }
.mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--mint); }
.mini.failed { color: var(--bad); cursor: help; }
.mini.loading { cursor: default; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; margin-top: 24px; }
.bcell { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bcell .meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bcell .meta strong { flex: 1; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcell .meta .btn-text { padding: 4px 6px; font-size: 13px; }
.bcell .player, .bcell .progress-card, .bcell .preview { width: 100%; }
.bcell .progress-card { aspect-ratio: 9 / 16; }
.bcell .progress-card strong { font-size: 22px; }
.empty-prev { display: grid; place-items: center; color: var(--muted); font-size: 13px; background: var(--glass) !important; }


/* ---------- bank + voice creator ---------- */
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; max-height: 420px; overflow: auto; padding: 2px; }
.bank-item { position: relative; aspect-ratio: 3 / 4; padding: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--glass); transition: transform .2s var(--ease), box-shadow .2s; }
.bank-item:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--sky); }
.bank-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bank-item .badge { position: absolute; left: 6px; bottom: 6px; font-size: 10px; padding: 2px 7px; }
[data-scene] { margin-top: 6px; }
.panel h3 em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.read-card { margin: 18px 0; padding: 18px 20px; border-radius: 16px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.read-card p { margin: 0; font: 20px/1.55 var(--serif); color: var(--ink); }
.rec-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rec-btn { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #041019; box-shadow: 0 10px 30px -8px rgba(89, 195, 255, .6); flex: none; transition: transform .2s var(--ease); }
.rec-btn svg { width: 26px; height: 26px; }
.rec-btn.live { background: #ff5d6c; color: #fff; animation: recpulse 1.4s infinite; }
.rec-btn .stop { width: 20px; height: 20px; border-radius: 4px; background: #fff; display: block; }
@keyframes recpulse { 0% { box-shadow: 0 0 0 0 rgba(255, 93, 108, .6); } 70% { box-shadow: 0 0 0 18px rgba(255, 93, 108, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 93, 108, 0); } }
.clips { display: grid; gap: 8px; margin-top: 16px; }
.clip { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); }
.clip audio { flex: 1; min-width: 0; height: 36px; }


/* ---------- settings ---------- */
.warning { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.warning svg { width: 18px; height: 18px; }
.warning b { font-weight: 600; }
.warning .btn-text { color: var(--amber); margin-left: auto; padding: 4px 8px; font-weight: 500; }
.key-card { padding: 20px 22px; display: grid; gap: 14px; }
.key-head { display: flex; align-items: center; gap: 14px; }
.key-head .av { width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: #041019; display: grid; place-items: center; font: 22px var(--serif); flex: none; }
.key-head h3 { font-size: 26px; }
.key-head p { margin: 2px 0 0; font-size: 14px; }
.grow { flex: 1; min-width: 0; }
.key-state { font-size: 14px; }
.key-input input { flex: 1; min-width: 200px; font-family: ui-monospace, monospace; letter-spacing: .04em; }
.key-foot { gap: 6px; }
.key-foot .hint { font-size: 12px; }
.key-foot a.btn-text { color: var(--mint); text-decoration: none; }
.pill.ok { color: var(--mint); border-color: rgba(143, 243, 216, .4); text-transform: none; letter-spacing: 0; font-size: 12px; }
.pill.bad { color: var(--bad); border-color: rgba(255, 125, 140, .4); text-transform: none; letter-spacing: 0; font-size: 12px; }
.pill.off, .pill.checking { text-transform: none; letter-spacing: 0; font-size: 12px; }


/* ---------- scene choice ---------- */
.choice2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { text-align: left; padding: 18px 18px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); display: grid; gap: 6px; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.choice:hover { transform: translateY(-2px); border-color: var(--line-2); }
.choice .ci { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: var(--ink-2); margin-bottom: 4px; }
.choice strong { font: 24px/1.1 var(--serif); font-weight: 400; }
.choice small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.choice.on { border-color: transparent; background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(143, 243, 216, .5); }
.choice.on .ci { background: var(--grad); color: #041019; }
.bank-item.upload { display: grid; place-items: center; align-content: center; gap: 6px; color: var(--mint); border: 1px dashed rgba(143, 243, 216, .4); background: rgba(143, 243, 216, .04); font-size: 13px; }


/* ---------- tiles: progress, cost, downloads ---------- */
.tile .cap span { display: flex; }
.tile-bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .14); margin: 9px 0 6px; overflow: hidden; }
.tile-bar i { display: block; height: 100%; background: var(--grad); border-radius: 3px; }
.tile .cap .tile-cost { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.tile-dl { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; flex-direction: column; gap: 6px; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s var(--ease); }
.tile:hover .tile-dl, .tile:focus-within .tile-dl { opacity: 1; transform: none; }
.dl { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--ink); text-decoration: none; background: rgba(4, 6, 12, .72); border: 1px solid var(--line-2); backdrop-filter: blur(10px); transition: background .2s, border-color .2s; }
.dl svg { width: 15px; height: 15px; }
.dl:hover { background: rgba(4, 6, 12, .9); border-color: rgba(143, 243, 216, .55); color: var(--mint); }
/* Phones have no hover: the buttons stay visible, icon only. */
@media (hover: none) {
  .tile-dl { opacity: 1; transform: none; }
  .dl span { display: none; }
  .dl { padding: 8px; }
}

/* ---------- spend ---------- */
.spend { position: relative; }
.spend summary { list-style: none; cursor: pointer; font-size: 13px; color: var(--ink-2); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); white-space: nowrap; }
.spend summary::-webkit-details-marker { display: none; }
.spend summary b { color: var(--amber); font-weight: 600; }
.spend[open] summary { border-color: var(--line-2); }
.spend-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 240px; padding: 14px 16px; border-radius: 16px; background: rgba(16, 18, 28, .96); border: 1px solid var(--line-2); backdrop-filter: blur(20px); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .7); display: grid; gap: 8px; font-size: 14px; }
.spend-pop div { display: flex; justify-content: space-between; gap: 16px; color: var(--ink-2); }
.spend-pop b { color: var(--ink); font-weight: 500; }
.spend-pop small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.cost-tag { position: absolute; right: 8px; bottom: 8px; font-size: 11px; padding: 3px 8px; border-radius: 999px; background: rgba(4, 6, 12, .72); border: 1px solid var(--line); backdrop-filter: blur(8px); color: var(--ink-2); }

/* ---------- reel versions ---------- */
.render.kept .player { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--mint), 0 30px 60px -20px rgba(0, 0, 0, .8); }
.render .meta small { font-size: 12px; }
.versions { display: flex; flex-wrap: wrap; gap: 6px; }
.vchip { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--ink-2); }
.vchip.on { border-color: rgba(143, 243, 216, .5); color: var(--mint); }
.vchip.failed { color: var(--bad); }


/* ---------- tabs ---------- */
.btabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); margin-bottom: 18px; }
.btabs button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; color: var(--ink-2); font-size: 14px; }
.btabs button svg { width: 16px; height: 16px; }
.btabs button.on { background: var(--grad); color: #041019; font-weight: 600; }

/* ---------- batch board ---------- */
.board { display: grid; gap: 10px; margin-top: 18px; }
.board-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 16px 12px 12px; border-radius: 18px; cursor: pointer; transition: border-color .2s, transform .2s var(--ease); }
.board-row:hover { border-color: var(--line-2); transform: translateY(-1px); }
.bthumb { position: relative; width: 64px; aspect-ratio: 9 / 14; border-radius: 12px; overflow: hidden; background: var(--grad-soft); }
.bthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bthumb .num { position: absolute; left: 6px; top: 4px; font-size: 16px; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.bmain { min-width: 0; display: grid; gap: 7px; }
.bmain strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipes { display: flex; gap: 6px; flex-wrap: wrap; }
.pip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 6px; border-radius: 999px; border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.pip i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.pip.done { color: var(--ink-2); border-color: rgba(143, 243, 216, .3); }
.pip.done i { background: var(--mint); box-shadow: 0 0 8px rgba(143, 243, 216, .6); }
.pip.run { color: var(--sky); border-color: rgba(89, 195, 255, .4); }
.pip.run i { background: var(--sky); animation: pulse 1.6s infinite; }
.bstatus { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.bstatus .bad { color: var(--bad); }
.bside { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-size: 13px; }
.ap-run { display: flex; align-items: center; gap: 16px; }
.ap-run strong { font: 26px/1.1 var(--serif); font-weight: 400; display: block; }
.pulse.big { width: 14px; height: 14px; flex: none; }
.ap-photo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; color: var(--amber); font-size: 14px; }
.row-actions { display: flex; gap: 2px; }
.row-actions .btn-text { font-size: 13px; color: var(--mint); padding: 6px 8px; }
.row-bank { grid-column: 1 / -1; display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; }
.row-bank .mini { flex: none; padding: 0; }

/* ---------- bank: reference hearts, shoot review ---------- */
.photo-wall .heart { position: absolute; left: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: rgba(255, 255, 255, .7); background: rgba(4, 6, 12, .6); backdrop-filter: blur(6px); }
.photo-wall .heart.on { color: #ff6b8a; background: rgba(255, 107, 138, .18); box-shadow: inset 0 0 0 1px rgba(255, 107, 138, .5); }
.ph-btn { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 8px; border-radius: 999px; background: rgba(4, 6, 12, .75); border: 1px solid var(--line-2); font-size: 13px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 14px; }
.review-card { position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--glass); }
.review-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-actions { position: absolute; left: 10px; right: 10px; bottom: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.review-actions button { padding: 10px; font-size: 13px; }
.review-actions .btn-ghost { background: rgba(4, 6, 12, .7); backdrop-filter: blur(8px); }
.review-card.loading { display: grid; place-items: center; text-align: center; padding: 18px; color: var(--ink-2); }
.review-card.loading::before { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%); background-size: 220% 100%; animation: shimmer 1.6s linear infinite; }
.review-card.loading small { display: block; margin-top: 10px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.review-card.failed { display: grid; place-items: center; padding: 16px; color: var(--bad); font-size: 12px; text-align: center; }


/* ---------- bell ---------- */
.bell { position: fixed; top: 16px; right: 18px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 17, 26, .75); border: 1px solid var(--line); backdrop-filter: blur(16px); color: var(--ink-2); }
.bell:hover { border-color: var(--line-2); color: var(--ink); }
.bell-count { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #ff6b8a; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.bell-panel { position: fixed; top: 68px; right: 18px; z-index: 40; width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; border-radius: 18px; background: rgba(16, 18, 28, .97); border: 1px solid var(--line-2); backdrop-filter: blur(20px); box-shadow: 0 24px 50px -12px rgba(0, 0, 0, .8); padding: 6px; animation: rise .25s var(--ease) both; }
.bell-head { padding: 10px 12px 6px; font: 22px var(--serif); }
.note { display: grid; gap: 2px; width: 100%; text-align: left; padding: 11px 12px; border-radius: 12px; }
.note:hover { background: var(--glass-2); }
.note strong { font-weight: 500; font-size: 14px; }
.note span { color: var(--ink-2); font-size: 13px; }
.note small { color: var(--muted); font-size: 11px; }
.note.unread strong::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sky); margin-right: 7px; vertical-align: middle; }
.view { padding-top: 64px; }
.push-box { padding: 6px 8px 10px; display: grid; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.push-box.inline { padding: 0; border: 0; margin: 0; justify-items: start; }
.push-box small:empty { display: none; }
.push-box button:disabled { opacity: .85; cursor: default; }
.warning { margin-right: 76px !important; }

/* ---------- daily + queue ---------- */
.key-head h3 em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.daily .key-head .av svg { width: 22px; height: 22px; }
.daily-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.daily-grid input[type=time] { color-scheme: dark; }
.next-script { padding: 13px 15px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(0, 0, 0, .2); font-size: 14px; }
.bad { color: var(--bad); }
.item.next-up { box-shadow: inset 0 0 0 1px rgba(143, 243, 216, .45); background: var(--grad-soft); }
.item .num { font-size: 18px; }
.tile .badge.daily-badge { left: auto; right: 12px; top: auto; bottom: 86px; color: var(--amber); border-color: rgba(255, 207, 138, .4); }


/* ---------- balances ---------- */
.balances { gap: 8px; padding-left: 0; }
.bal-title { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-left: 6px; margin-bottom: 2px; }
.bal { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); text-align: left; font-size: 12px; color: var(--ink-2); }
.bal b { color: var(--ink); font-weight: 600; text-align: right; }
.bal small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.bal small.down { color: var(--amber); }
.bal small.up { color: var(--mint); }
.bal.off { cursor: pointer; border-style: dashed; }
.bal.off b { color: var(--sky); font-weight: 500; }
.bal.err b { color: var(--bad); }
.bal-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: -8px 0 22px; }
.bal-strip .bal { padding: 10px 12px; font-size: 13px; }
.bal-strip .bal b { font-size: 15px; }
.mobile-only { display: none; }


/* ---------- planning ---------- */
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.daily .key-head .av svg { width: 22px; height: 22px; }
.plan-list { display: grid; gap: 8px; }
.plan-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(160px, 260px); gap: 14px; align-items: center; padding: 12px 16px; border-radius: 16px; }
.plan-row.pinned { box-shadow: inset 0 0 0 1px rgba(143, 243, 216, .4); }
.plan-date strong { display: block; font: 20px/1.1 var(--serif); font-weight: 400; }
.plan-date small { color: var(--muted); font-size: 12px; }
.plan-script { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.plan-script span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-row select { padding: 9px 12px; font-size: 14px; }
.plan-sub input[type=number] { margin: 0; }
input[type=date] { color-scheme: dark; }


/* ---------- script generator ---------- */
.gen-panel h3 em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.draft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 26px; }
.draft { padding: 14px; border-radius: 18px; display: grid; gap: 8px; }
.draft-title { background: transparent; border-color: transparent; font: 20px var(--serif); padding: 4px 6px; }
.draft-title:hover { border-color: var(--line); }
.draft textarea { min-height: 150px; font-size: 15px; line-height: 1.6; }

.home-btn { display: none; }


/* ---------- simple wizard ---------- */
.engine-note { display: flex; align-items: center; gap: 10px; margin: -10px 0 16px; padding: 10px 14px; border-radius: 12px; font-size: 14px; color: var(--ink-2); background: var(--glass); border: 1px solid var(--line); }
.engine-note.bad { color: var(--bad); border-color: rgba(255, 125, 140, .35); }
.engine-note svg { width: 16px; height: 16px; }
.waiting { display: flex; align-items: center; gap: 12px; padding: 22px; border-radius: 18px; color: var(--ink-2); grid-column: 1 / -1; }
.collapse { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(0, 0, 0, .18); }
.collapse summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 16px; font-size: 14px; color: var(--ink-2); }
.collapse summary::-webkit-details-marker { display: none; }
.collapse summary b { color: var(--ink); font-weight: 500; }
.collapse summary .change { margin-left: auto; color: var(--mint); font-size: 13px; }
.collapse[open] summary .change { opacity: .5; }
.collapse-body { padding: 0 16px 16px; }
.result { position: relative; }
.dl-mini { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(4, 6, 12, .7); border: 1px solid var(--line-2); color: var(--ink); backdrop-filter: blur(8px); z-index: 2; }
.dl-mini svg { width: 15px; height: 15px; }
.take .dl-mini { position: static; flex: none; }
.tile-menu { position: absolute; right: 10px; bottom: 76px; z-index: 3; }
.tile-menu .dots { width: 32px; height: 32px; border-radius: 50%; background: rgba(4, 6, 12, .7); border: 1px solid var(--line-2); color: var(--ink); font-size: 18px; line-height: 1; backdrop-filter: blur(8px); }
.menu-pop { position: absolute; right: 0; bottom: 38px; min-width: 140px; padding: 6px; border-radius: 14px; background: rgba(16, 18, 28, .97); border: 1px solid var(--line-2); box-shadow: 0 16px 30px -10px rgba(0, 0, 0, .7); display: grid; }
.menu-pop button { text-align: left; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.menu-pop button:hover { background: var(--glass-2); }
.menu-pop .danger { color: var(--bad); }
.wf-steps { display: grid; gap: 8px; margin-top: 6px; }
.wf-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .15); }
.wf-step strong { display: block; font-weight: 500; }
.wf-step small { font-size: 12px; }
.workflow .key-head h3 em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }


/* ---------- simple pages ---------- */
.simple-card { padding: 20px; margin-bottom: 16px; border-radius: 22px; }
.simple-card h3 { font-size: 26px; margin-bottom: 6px; }
.simple-card h4 { font: 600 15px var(--sans); margin: 22px 0 10px; color: var(--ink); }
.simple-card > p.muted { margin: 0 0 14px; font-size: 14px; }
.big-choices { display: grid; gap: 10px; margin-top: 12px; }
.big-choice { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); transition: all .2s var(--ease); }
.big-choice .ci { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); flex: none; }
.big-choice strong { display: block; font: 21px/1.15 var(--serif); font-weight: 400; }
.big-choice small { color: var(--muted); font-size: 13px; }
.big-choice .tick { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: #041019; font-weight: 700; flex: none; }
.big-choice.on { border-color: transparent; background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(143, 243, 216, .55); }
.big-choice.on .ci { background: var(--grad); color: #041019; }
.big-choice.on .tick { background: var(--grad); border-color: transparent; }
.conn-list { display: grid; gap: 8px; }
.conn { border-radius: 16px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.conn-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-align: left; }
.conn-row strong { display: block; font-weight: 500; }
.conn-row small { font-size: 12px; }
.conn-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--line-2); }
.conn-dot.ok { background: var(--mint); box-shadow: 0 0 10px rgba(143, 243, 216, .7); }
.conn-dot.bad, .conn-dot.off { background: var(--amber); }
.conn-dot.checking { background: var(--sky); animation: pulse 1.6s infinite; }
.conn-cta { padding: 8px 16px; font-size: 13px; }
.conn-form { padding: 0 16px 16px; }
.conn-form p { font-size: 13px; margin: 0 0 10px; }
.conn-form a { color: var(--mint); }
.big-switch { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.big-switch strong { display: block; font: 24px var(--serif); font-weight: 400; }
.big-switch > span:first-child { flex: 1; }
.toggle.big { width: 60px; height: 34px; }
.toggle.big span::after { width: 28px; height: 28px; }
.toggle.big input:checked + span::after { transform: translateX(26px); }
.big-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.big-pill { padding: 14px 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); font-size: 15px; }
.big-pill.on { border-color: transparent; background: var(--grad); color: #041019; font-weight: 600; }
.chips.days { margin-top: 10px; }
.big-time { font-size: 22px; padding: 14px 16px; max-width: 220px; color-scheme: dark; }
.voice-cards { display: grid; gap: 10px; margin-bottom: 16px; }
.voice-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; }
.voice-card.on { box-shadow: inset 0 0 0 1px rgba(143, 243, 216, .5); background: var(--grad-soft); }
.voice-card strong { display: block; font-weight: 500; }
.voice-card small { font-size: 12px; }
.play.big { width: 54px; height: 54px; }
.play.busy { opacity: .5; }
.star { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted); flex: none; }
.star.on { color: #041019; background: linear-gradient(120deg, #ffe08a, var(--amber)); border-color: transparent; }
.star.on svg { fill: currentColor; }
.tile-menu.inline { position: relative; bottom: auto; right: auto; top: auto; }
.tile-menu.inline .menu-pop { top: 38px; bottom: auto; right: 0; z-index: 20; }
.add-big { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; border-radius: 20px; border: 1px dashed rgba(143, 243, 216, .45) !important; color: var(--mint); font-size: 16px; font-weight: 500; }


/* ---------- end cards ---------- */
.cta-open { border: 1px solid var(--line); border-radius: 16px; background: rgba(0, 0, 0, .18); }
.big-grid.three { grid-template-columns: repeat(3, 1fr); }
.cta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.cta-card { position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--glass); }
.cta-card img, .cta-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cta-card.star-on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--amber); }
.cta-tools { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; gap: 6px; justify-content: center; }
.cta-tools.wide { flex-direction: column; }
.cta-tools.wide button { width: 100%; padding: 9px; font-size: 13px; }
.cta-tools .star, .cta-tools .rot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(4, 6, 12, .75); border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 700; backdrop-filter: blur(8px); }
.cta-tools .rot svg, .cta-tools .star svg { width: 16px; height: 16px; }
.cta-tools .rot.on { background: var(--grad); color: #041019; border-color: transparent; }
.cta-wait { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--ink-2); text-align: center; padding: 10px; }
.cta-wait.bad { color: var(--bad); }
.cta-pick { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; }
.cta-tile { flex: none; width: 74px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--glass); padding: 0; }
.cta-tile img, .cta-tile video { width: 100%; height: 100%; object-fit: cover; }
.cta-tile.none { display: grid; place-items: center; font-size: 12px; color: var(--ink-2); padding: 6px; }
.cta-tile.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--mint); }
.endcard-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; margin-top: 14px; font-size: 14px; }

/* ---------- phone ---------- */
.menu-pop a { display: block; text-align: left; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--ink); text-decoration: none; }
.menu-pop a:hover { background: var(--glass-2); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .view { padding: 26px 18px calc(170px + var(--safe-b)); }
  .warning { margin: 12px 18px 0; }
  .page-head { flex-direction: column; align-items: flex-start; margin-bottom: 22px; }
  .tabbar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); z-index: 20;
    padding: 6px; border-radius: 22px; background: rgba(14, 16, 25, .82); border: 1px solid var(--line); backdrop-filter: blur(22px);
  }
  .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 16px; color: var(--muted); font-size: 11px; }
  .tabbar button.on { color: var(--ink); background: var(--glass-2); }
  .tabbar button.on svg { stroke: var(--mint); }
  .wizbar { left: 0; bottom: calc(76px + var(--safe-b)); padding: 10px 12px; background: none; }
  .wizbar .inner { padding: 7px; }
  .wizbar .btn-primary, .wizbar .btn-ghost { padding: 11px 16px; font-size: 14px; }
  /* Steps become tappable pills you can swipe through and jump between. */
  .steps, .steps.five { display: flex; gap: 6px; margin: 0 -18px 18px; padding: 2px 18px 6px; overflow-x: auto; scrollbar-width: none; }
  .steps::-webkit-scrollbar { display: none; }
  .steps button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; }
  .steps button .n { font-size: 12px; }
  .steps button .t { display: inline; margin: 0; font: 15px var(--sans); }
  .steps button::after { display: none; }
  .steps button.done { border-color: rgba(143, 243, 216, .35); }
  .steps button.cur { background: var(--grad); border-color: transparent; }
  .steps button.cur .t, .steps button.cur .n { color: #041019; font-weight: 600; }
  .stage { padding: 22px 18px; border-radius: 22px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .results { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .split { grid-template-columns: 1fr; }
  .split .preview { width: 60%; margin: 0 auto; }
  .crumb input { font-size: 26px; }
  .formats { grid-template-columns: 1fr 1fr; }
  .brow { grid-template-columns: 1fr; }
  .brow-media { justify-content: flex-start; }
  .bgrid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .format strong { font-size: 19px; }
  .player, .progress-card { width: 100%; }
  .toast { bottom: calc(150px + var(--safe-b)); }
  body.wizard .tabbar { display: none; }
  .wizbar .where { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
  body.wizard .wizbar { bottom: 0; padding-bottom: calc(12px + var(--safe-b)); }
  body.wizard .view { padding-bottom: calc(110px + var(--safe-b)); }
  body.wizard .toast { bottom: calc(90px + var(--safe-b)); }
  .item { flex-wrap: wrap; }
  .bank-grid { grid-template-columns: repeat(3, 1fr); }
  .key-head .pill { display: none; }
  .choice { padding: 14px; }
  .crumb { flex-wrap: wrap; }
  .board-row { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .bell { top: 12px; right: 12px; width: 40px; height: 40px; }
  .mobile-only { display: grid; }
  .home-btn { position: fixed; top: 12px; left: 12px; z-index: 40; width: 40px; height: 40px; border-radius: 50%; place-items: center; background: rgba(15, 17, 26, .75); border: 1px solid var(--line); backdrop-filter: blur(16px); color: var(--ink-2); }
  body.wizard .home-btn, body.page-inner .home-btn { display: grid; }
  body.wizard .crumb { padding-left: 0; }
  body.wizard .warning { margin-left: 62px !important; margin-right: 62px !important; }
  .bal-strip { grid-template-columns: 1fr 1fr; }
  .bell-panel { top: 60px; right: 12px; }
  .view { padding-top: 62px; }
  .daily-grid { grid-template-columns: 1fr; }
  .plan-row { grid-template-columns: 1fr; gap: 8px; }
  .draft-grid { grid-template-columns: 1fr; }
  .wf-step { flex-wrap: wrap; }
  .tile-menu { bottom: 64px; }
  .tabbar button { min-width: 0; }
  .bthumb { width: 52px; }
  .bside { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
  .pip small { display: none; }
  .pip { padding: 4px; }
  .review-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ap-run { flex-wrap: wrap; }
  .btabs { display: flex; }
  .btabs button { flex: 1; justify-content: center; }
  .spend-pop { right: auto; left: 0; }
  .tile .cap .tile-cost { display: none; }
  .choice strong { font-size: 20px; }
  .choice small { font-size: 12px; }
  .key-head h3 { font-size: 22px; }
  .key-input .btn-primary { width: 100%; }
  .tabbar button span { font-size: 10px; }
  .read-card p { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- phone, easier (pass 2) ---------- */
@media (max-width: 860px) {
  /* Headers: short and to the point, content starts higher. */
  .view { padding-top: 58px; }
  .page-head { margin-bottom: 16px; gap: 10px; }
  .page-head .eyebrow { display: none; }
  .page-head h1 { font-size: 34px; }
  .page-head p { font-size: 14px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* The setup banner: one slim line between the home button and the bell. */
  .warning { position: fixed; top: 14px; left: 62px; right: 62px; margin: 0 !important; z-index: 35; padding: 8px 12px; font-size: 12px; flex-wrap: nowrap; border-radius: 999px; backdrop-filter: blur(14px); background: rgba(40, 32, 14, .85); }
  .warning svg { display: none; }
  .warning span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .warning .btn-text { padding: 0 0 0 6px; white-space: nowrap; font-size: 12px; }
  body:not(.wizard) .warning { left: 12px; }

  /* Choice buttons: a tidy grid of equal buttons instead of a wrapping pill. */
  .segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; border-radius: 16px; }
  .segmented button { padding: 10px 6px; border-radius: 12px; font-size: 13px; line-height: 1.25; }
  [data-seg="drhythm"] { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
  [data-seg="bankfilter"], [data-seg="filter"] { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
  .actions { gap: 10px; }
  .actions .spacer { display: none; }
  .actions .btn-primary { flex: 1 1 100%; }

  /* Script and voice rows: text full width, buttons underneath. */
  .item { flex-direction: column; gap: 10px; }
  .item > .row { width: 100%; justify-content: flex-start; gap: 4px; }
  .item .body p { -webkit-line-clamp: 4; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .wf-step { flex-direction: column; align-items: stretch; }

  /* Inside a video: one compact header line, smaller step titles, nothing hidden under the bar. */
  .crumb { flex-wrap: nowrap; gap: 8px; margin-bottom: 12px; }
  .crumb input { font-size: 22px; padding: 2px 4px; min-width: 0; }
  .crumb .spacer { display: none; }
  .spend summary { padding: 6px 10px; font-size: 12px; }
  .stage { padding: 18px 16px; }
  .stage-head { margin-bottom: 14px; }
  .stage-head .eyebrow { display: none; }
  .stage-head h2 { font-size: 30px; }
  .stage-head p { font-size: 14px; margin-top: 4px; }
  body.wizard .view { padding-bottom: calc(140px + var(--safe-b)); }
  .wizbar .where { display: none; }
  .wizbar .inner { gap: 8px; }
  .wizbar .btn-ghost span { display: none; }
  .wizbar .btn-ghost { padding: 12px 14px; }
  .wizbar .btn-primary { flex: 1; padding: 14px 16px; font-size: 15px; }
  .player video { max-height: 62vh; object-fit: contain; background: #000; }

  /* Home: compact start buttons, cleaner tiles (downloads move into the ⋯ menu). */
  .tile.new { aspect-ratio: auto; min-height: 0; padding: 16px 12px; }
  .tile.new .plus { width: 44px; height: 44px; margin-bottom: 8px; }
  .tile.new strong { font-size: 20px; }
  .tile-dl { display: none; }
  .tile-menu { bottom: auto; top: 10px; right: 10px; }
  .menu-pop { bottom: auto; top: 38px; }
  .bal-strip { margin-top: 0; }
}
