:root {
  --night: #121119;
  --deck: #1b1924;
  --deck-2: #24212f;
  --deck-3: #2e2a3b;
  --line: #322e40;
  --paper: #f5f2fa;
  --mist: #a49db8;
  --haze: #6f6982;
  --caption: #ffe23a;
  --on-caption: #1a1606;
  --ok: #3edb9b;
  --wait: #ffb547;
  --busy: #a596ff;
  --bad: #ff5c6c;
  --rec: #ff3b4e;
  --tiktok: #fe2c55;
  --tiktok-2: #25f4ee;
  --youtube: #ff0033;
  --insta: linear-gradient(45deg, #f58529 0%, #dd2a7b 55%, #8134af 100%);

  --display: 'Unbounded', ui-sans-serif, system-ui, sans-serif;
  --text: 'Onest', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-frame: 18px;
  --r-group: 20px;
  --r-control: 14px;
  --r-sheet: 28px;
  --gutter: 20px;
  --tabbar: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--night);
  color: var(--paper);
  font: 400 16px/1.45 var(--text);
  font-feature-settings: 'tnum' 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--caption); outline-offset: 3px; border-radius: 10px; }
::selection { background: var(--caption); color: var(--on-caption); }

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  padding-bottom: calc(var(--tabbar) + var(--safe-b) + 24px);
}
.app.no-tabs { padding-bottom: calc(var(--safe-b) + 24px); }

.screen { padding: calc(var(--safe-t) + 18px) var(--gutter) 0; }
.screen-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-bottom: 18px;
}
.screen-head h1 {
  flex: 1;
  margin: 0;
  font: 700 28px/1.12 var(--display);
  letter-spacing: -0.02em;
}
.screen-head .sub { display: block; margin-top: 6px; font: 400 14px/1.3 var(--text); color: var(--mist); letter-spacing: 0; }
.backbar { display: flex; align-items: center; gap: 6px; margin: -6px 0 6px -10px; }

.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; }
.section-head h2 { flex: 1; margin: 0; font: 600 18px/1.3 var(--text); }
.section-head .link { font-size: 14px; color: var(--mist); text-decoration: none; background: none; border: 0; padding: 6px 0; }

.muted { color: var(--mist); }
.faint { color: var(--haze); }
.num { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; font-feature-settings: 'tnum' 1; }
.small { font-size: 14px; line-height: 1.4; }
.micro { font-size: 12px; line-height: 1.35; }
.clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clip1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow { flex: 1; min-width: 0; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.stack { display: grid; gap: 12px; }
.hidden { display: none !important; }

.btn {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--deck-2);
  color: var(--paper);
  font: 600 16px/1 var(--text);
  text-decoration: none;
  transition: transform .12s var(--ease), background .2s;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.go[disabled] { opacity: 1; background: var(--deck-3); color: var(--haze); }
.btn.go { background: var(--caption); color: var(--on-caption); min-height: 56px; font-size: 17px; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.btn.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1px rgba(255, 92, 108, .35); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn .cost { font: 600 14px/1 var(--display); opacity: .8; }

.icon-btn {
  appearance: none;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--paper);
  flex: none;
}
.icon-btn:active { background: var(--deck-2); }
.icon-btn.solid { background: var(--deck); }
.ic { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 18px; height: 18px; }
.ic.lg { width: 28px; height: 28px; }

.group {
  background: var(--deck);
  border-radius: var(--r-group);
  overflow: hidden;
}
.group + .group { margin-top: 12px; }
.group-title { margin: 22px 4px 8px; font: 500 14px/1.3 var(--text); color: var(--mist); }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 12px 16px;
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  color: inherit;
  position: relative;
}
.row + .row::before { content: ''; position: absolute; left: 16px; right: 0; top: 0; height: 1px; background: var(--line); }
button.row:active, a.row:active { background: var(--deck-2); }
a.row { text-decoration: none; }
.row .label { font-weight: 500; }
.row .hint { display: block; font-size: 13px; line-height: 1.35; color: var(--mist); margin-top: 2px; }
.row .value { color: var(--mist); font-size: 15px; text-align: right; max-width: 55%; }
.row .value.set { color: var(--paper); }
.row .chev { color: var(--haze); }
.row .lead {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--deck-2); color: var(--paper); flex: none; font-size: 18px;
}

.tally { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; line-height: 1; color: var(--mist); white-space: nowrap; }
.tally::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--haze); flex: none; }
.tally.ok::before { background: var(--ok); }
.tally.wait::before { background: var(--wait); }
.tally.busy::before { background: var(--busy); animation: pulse 1.6s ease-in-out infinite; }
.tally.bad::before { background: var(--bad); }
.tally.live::before { background: var(--rec); box-shadow: 0 0 0 4px rgba(255, 59, 78, .18); }
@keyframes pulse { 50% { opacity: .35; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  appearance: none;
  border: 0;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--deck);
  color: var(--paper);
  font: 500 15px/1 var(--text);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip.on { background: var(--caption); color: var(--on-caption); }
.chip .count { font: 600 12px/1 var(--display); opacity: .7; }

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--deck);
  border-radius: 16px;
}
.seg button {
  appearance: none;
  border: 0;
  min-height: 40px;
  border-radius: 12px;
  background: transparent;
  color: var(--mist);
  font: 500 15px/1.1 var(--text);
  padding: 0 8px;
}
.seg button.on { background: var(--deck-3); color: var(--paper); }

.switch { appearance: none; position: relative; width: 52px; height: 32px; border-radius: 999px; background: var(--deck-3); border: 0; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); transition: transform .2s var(--ease); }
.switch.on { background: var(--caption); }
.switch.on::after { transform: translateX(20px); background: var(--on-caption); }

.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field > span { font-size: 14px; color: var(--mist); }
.input, .textarea, .select {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: var(--r-control);
  border: 1px solid var(--line);
  background: var(--deck);
  color: var(--paper);
  font: 400 16px/1.4 var(--text);
  outline: none;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--caption); }
.input::placeholder, .textarea::placeholder { color: var(--haze); }
.range { width: 100%; accent-color: var(--caption); height: 32px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--deck-2); border-radius: 14px; padding: 4px; }
.stepper button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--deck-3); color: var(--paper); font-size: 20px; }
.stepper output { min-width: 44px; text-align: center; font: 600 17px/1 var(--display); }

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  height: calc(var(--tabbar) + var(--safe-b));
  padding: 0 8px var(--safe-b);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: rgba(18, 17, 25, .9);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--line);
  z-index: 40;
}
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--haze);
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 8px 0;
  font: 500 11.5px/1 var(--text);
  text-decoration: none;
  position: relative;
}
.tab.on { color: var(--paper); }
.tab.on::after { content: ''; position: absolute; top: -1px; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--caption); }
.tab .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--busy); color: var(--night); font: 700 11px/18px var(--display); }

.rec {
  justify-self: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--night);
  box-shadow: 0 0 0 3px var(--caption);
  transform: translateY(-10px);
  transition: transform .2s var(--ease);
}
.rec::before {
  content: '';
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--rec);
  transition: border-radius .3s var(--ease), width .3s var(--ease), height .3s var(--ease);
}
.rec.open::before { width: 24px; height: 24px; border-radius: 6px; }
.rec:active { transform: translateY(-10px) scale(.94); }

.scrim { position: fixed; inset: 0; background: rgba(6, 5, 10, .62); z-index: 60; animation: fade .25s ease both; }
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--deck);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: 0 -1px 0 var(--line);
  z-index: 61;
  animation: rise .32s var(--ease) both;
}
.sheet.tall { height: 92dvh; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--deck-3); margin: 10px auto 2px; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px 6px 22px; flex: none; }
.sheet-head h3 { flex: 1; margin: 0; font: 650 19px/1.25 var(--text); }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 22px 22px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 22px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); flex: none; display: grid; gap: 10px; }
.sheet .group { background: var(--deck-2); }
.sheet .group .row + .row::before { background: var(--deck-3); }
.sheet .input, .sheet .textarea, .sheet .select { background: var(--deck-2); }
.sheet .chip { background: var(--deck-2); }
.sheet .chip.on { background: var(--caption); color: var(--on-caption); }
.sheet .seg { background: var(--deck-2); }
.sheet .seg button.on { background: var(--deck-3); }
@keyframes rise { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 560px;
  padding: 12px var(--gutter) calc(12px + var(--safe-b));
  background: linear-gradient(to top, var(--night) 70%, rgba(18, 17, 25, 0));
  z-index: 30;
  display: grid;
  gap: 8px;
}
.dock .note { text-align: center; font-size: 13px; color: var(--mist); }

.frame {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-frame);
  overflow: hidden;
  background: var(--deck);
  isolation: isolate;
}
.frame > img, .frame > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame .shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .55) 100%); pointer-events: none; }
.segs { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 3px; z-index: 2; }
.segs i { flex: 1; height: 3px; border-radius: 2px; background: rgba(245, 242, 250, .28); overflow: hidden; position: relative; }
.segs i b { position: absolute; inset: 0 auto 0 0; background: var(--paper); border-radius: 2px; transition: width .6s var(--ease); }
.segs i.failed { background: var(--bad); }
.segs i.busy b { background: var(--caption); }
.frame .state { position: absolute; top: 20px; left: 10px; z-index: 2; }
.frame .state .tally { background: rgba(18, 17, 25, .72); padding: 6px 9px; border-radius: 999px; color: var(--paper); backdrop-filter: blur(6px); }
.frame .making { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; padding: 12px; }
.frame .making .pct { font: 700 30px/1 var(--display); }
.frame .making .stage { font-size: 13px; color: var(--mist); }
.frame .making::before { content: ''; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 226, 58, .14) 85%, transparent 100%); animation: sweep 3.2s linear infinite; z-index: -1; }
@keyframes sweep { to { transform: rotate(1turn); } }
.frame .glyph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; opacity: .9; }
.frame .plats { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 4px; z-index: 2; }

.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 12px; }
.tile { appearance: none; border: 0; padding: 0; background: none; text-align: left; color: inherit; display: grid; gap: 8px; }
.tile .t { font-weight: 600; font-size: 15px; line-height: 1.3; }
.tile .s { font-size: 13px; color: var(--mist); }

.pm { width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; flex: none; background: #000; }
.pm svg { width: 13px; height: 13px; fill: #fff; stroke: none; }
.pm.tiktok { background: #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.pm.youtube { background: var(--youtube); }
.pm.instagram { background: var(--insta); }
.pm.lg { width: 34px; height: 34px; border-radius: 10px; }
.pm.lg svg { width: 18px; height: 18px; }
.pm.off { filter: grayscale(1); opacity: .45; }

.meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.meter { appearance: none; border: 0; text-align: left; background: var(--deck); border-radius: 18px; padding: 14px 14px 12px; color: inherit; display: grid; gap: 4px; min-height: 92px; align-content: start; }
.meter .k { font-size: 13px; color: var(--mist); }
.meter .v { font: 650 21px/1.1 var(--display); letter-spacing: -0.02em; }
.meter .u { font-size: 12px; color: var(--mist); }
.meter.warn .v { color: var(--wait); }
.meter.off .v { color: var(--haze); font-size: 15px; font-family: var(--text); font-weight: 500; }

.now { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; background: var(--deck); border-radius: 24px; padding: 12px; }
.now .info h3 { margin: 0 0 6px; font: 600 17px/1.3 var(--text); }
.now .info p { margin: 0 0 12px; font-size: 14px; color: var(--mist); }

.timeline { display: grid; }
.tl { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; color: inherit; width: 100%; }
.tl:last-child { border-bottom: 0; }
.tl .time { font: 600 15px/1 var(--display); font-feature-settings: 'tnum' 1; }
.tl .time small { display: block; margin-top: 4px; font: 400 12px/1 var(--text); color: var(--mist); }
.tl .what { display: flex; gap: 10px; align-items: center; min-width: 0; }
.tl .what .txt { min-width: 0; }
.tl .what .ttl { font-size: 15px; font-weight: 500; }
.tl .what .acc { font-size: 13px; color: var(--mist); }
.day { margin: 22px 0 4px; font: 600 14px/1.2 var(--text); color: var(--mist); }

.empty { text-align: center; padding: 48px 12px 24px; display: grid; gap: 14px; justify-items: center; }
.empty h3 { margin: 0; font: 650 20px/1.25 var(--text); }
.empty p { margin: 0; color: var(--mist); max-width: 32ch; }

.toast-host { position: fixed; left: 0; right: 0; top: calc(var(--safe-t) + 10px); display: grid; justify-items: center; gap: 8px; z-index: 90; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; max-width: 520px; background: var(--paper); color: var(--night); padding: 12px 16px; border-radius: 16px; font-weight: 500; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: drop .3s var(--ease) both; display: flex; gap: 10px; align-items: center; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

.skel { background: linear-gradient(90deg, var(--deck) 0%, var(--deck-2) 50%, var(--deck) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.login { min-height: 100dvh; display: grid; align-content: center; padding: 32px 24px calc(32px + var(--safe-b)); max-width: 440px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; }
.brand .dot { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 0 0 3px var(--caption); display: grid; place-items: center; }
.brand .dot::before { content: ''; width: 28px; height: 28px; border-radius: 50%; background: var(--rec); }
.brand b { font: 800 26px/1 var(--display); letter-spacing: -0.03em; }
.login h1 { font: 700 30px/1.15 var(--display); letter-spacing: -0.02em; margin: 0 0 10px; }
.login p { margin: 0 0 28px; color: var(--mist); }
.err { color: var(--bad); font-size: 14px; margin: -4px 0 14px; }

.monitor-wrap { display: grid; grid-template-columns: 124px 1fr; gap: 16px; align-items: end; margin-bottom: 8px; }
.monitor { --cap-color: #fff; --cap-hi: #ffe23a; }
.monitor .bg { position: absolute; inset: 0; }
.monitor .emoji { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font-size: 54px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .5)); }
.monitor .cap { position: absolute; left: 8%; right: 8%; text-align: center; font: 800 13px/1.1 var(--text); color: var(--cap-color); paint-order: stroke; -webkit-text-stroke: 3px rgba(0, 0, 0, .85); letter-spacing: .01em; }
.monitor .cap em { font-style: normal; color: var(--cap-hi); }
.monitor .cap.box { -webkit-text-stroke: 0; }
.monitor .cap.box em { background: var(--cap-hi); color: #0a0a0a; padding: 1px 4px; border-radius: 4px; }
.monitor .cap.neon { -webkit-text-stroke: 0; text-shadow: 0 0 8px currentColor; }
.monitor .cap.minimal { -webkit-text-stroke: 0; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.monitor .tc { position: absolute; left: 8px; bottom: 8px; font: 600 10px/1 var(--display); color: rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .45); padding: 4px 6px; border-radius: 6px; font-feature-settings: 'tnum' 1; }
.monitor .rec-dot { position: absolute; right: 9px; bottom: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 3px rgba(255, 59, 78, .25); }
.monitor-meta h2 { margin: 0 0 6px; font: 700 20px/1.15 var(--display); letter-spacing: -0.02em; }
.monitor-meta p { margin: 0; color: var(--mist); font-size: 14px; }
.monitor-meta .facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 14px; }
.monitor-meta .facts b { font: 600 15px/1 var(--display); }

.picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pick { appearance: none; border: 0; border-radius: 16px; background: var(--deck-2); color: inherit; padding: 14px 10px; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 14px; font-weight: 500; min-height: 96px; align-content: center; position: relative; }
.pick .e { font-size: 28px; line-height: 1; }
.pick.on { box-shadow: inset 0 0 0 2px var(--caption); }
.pick .n { position: absolute; top: 6px; right: 8px; font: 600 11px/1 var(--display); color: var(--mist); }
.option { appearance: none; border: 0; width: 100%; text-align: left; background: var(--deck-2); color: inherit; border-radius: 16px; padding: 14px 16px; display: grid; gap: 4px; position: relative; }
.option + .option { margin-top: 8px; }
.option .t { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.option .d { font-size: 14px; color: var(--mist); }
.option .p { position: absolute; top: 14px; right: 16px; font: 600 13px/1 var(--display); color: var(--mist); }
.option.on { box-shadow: inset 0 0 0 2px var(--caption); }
.badge-pill { font: 600 11px/1 var(--text); padding: 4px 7px; border-radius: 999px; background: var(--deck-3); color: var(--mist); }

.choose { display: grid; gap: 12px; }
.choose .big { appearance: none; border: 0; width: 100%; text-align: left; color: inherit; background: var(--deck-2); border-radius: 22px; padding: 16px; display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; }
.choose .big .ill { aspect-ratio: 9 / 16; border-radius: 12px; display: grid; place-items: center; font-size: 26px; }
.choose .big h4 { margin: 0 0 4px; font: 650 18px/1.2 var(--text); }
.choose .big p { margin: 0; font-size: 14px; color: var(--mist); }

.player { width: 100%; max-height: 62dvh; aspect-ratio: 9 / 16; background: #000; border-radius: var(--r-frame); object-fit: contain; }
.loglist { font-size: 13px; line-height: 1.5; color: var(--mist); display: grid; gap: 6px; max-height: 40dvh; overflow: auto; }
.loglist .l { display: grid; grid-template-columns: 48px 1fr; gap: 8px; }
.loglist .l.error { color: var(--bad); }
.loglist .l.warn { color: var(--wait); }
.factlist { display: grid; gap: 8px; }
.factlist .f { background: var(--deck-2); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; }
.factlist .f b { font-weight: 600; }
.factlist .f span { font-size: 14px; color: var(--mist); }
.steps { counter-reset: s; display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; font-size: 15px; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--deck-3); font: 600 13px/1 var(--display); }
.kbd { font: 600 13px/1 var(--display); background: var(--deck-3); padding: 3px 6px; border-radius: 6px; }

@media (min-width: 720px) {
  .grid2 { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.hint .tally { white-space: normal; line-height: 1.35; align-items: flex-start; }
.hint .tally::before { margin-top: 4px; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { appearance: none; border: 0; width: 64px; display: grid; justify-items: center; gap: 6px; background: none; color: var(--mist); font-size: 12px; padding: 0; }
.swatch i { width: 52px; height: 52px; border-radius: 16px; display: block; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.swatch.on i { box-shadow: 0 0 0 3px var(--caption); }
.swatch.on { color: var(--paper); }
.dot-color { width: 40px; height: 40px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.dot-color.on { box-shadow: 0 0 0 3px var(--night), 0 0 0 5px var(--caption); }
.voice { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.tarot-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 12px; }
.tarot-cards .c { background: var(--deck-3); border-radius: 12px; padding: 10px; display: grid; gap: 4px; font-size: 13px; }
.tarot-cards .c b { font-size: 22px; }
.monitor-wrap.wide { grid-template-columns: 188px 1fr; }
.viewfinder .bg { background: radial-gradient(120% 75% at 25% 15%, rgba(165, 150, 255, .38) 0%, transparent 58%), radial-gradient(100% 70% at 85% 92%, rgba(255, 59, 78, .26) 0%, transparent 60%), linear-gradient(180deg, var(--deck-3), var(--night)); }
.viewfinder .vf-text { position: absolute; left: 10px; right: 10px; top: 46px; font-size: 11px; line-height: 1.32; color: rgba(245, 242, 250, .86); display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; z-index: 1; }
.monitor-wrap.wide .viewfinder .vf-text { -webkit-line-clamp: 3; top: 38px; }
.title-input { width: 100%; border: 0; border-bottom: 1px dashed var(--line); background: transparent; color: var(--paper); font: 700 18px/1.2 var(--display); letter-spacing: -0.02em; padding: 0 0 6px; margin-bottom: 8px; outline: none; border-radius: 0; resize: none; overflow: hidden; display: block; }
.title-input:focus { border-bottom-color: var(--caption); }
.title-input::placeholder { color: var(--paper); }
.prompt-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hints { margin-top: 12px; }
.textarea.prompt { min-height: 132px; }
.group.params { padding: 4px 16px 12px; }
.param { padding: 12px 0 4px; }
.param-head { font-size: 14px; color: var(--mist); margin: 0 2px 8px; }
.param .micro { margin: 8px 2px 0; }
.sheet .param + .param, .sheet .param + .param-switch, .sheet .param-switch + .param { border-top: 1px solid var(--deck-3); }
.sheet .param { padding: 14px 0 10px; }
.sheet .param-switch { padding: 14px 0; min-height: 0; }
.param-switch + .param-switch::before { left: 0; }
.slider { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.slider output { font: 600 15px/1 var(--display); min-width: 60px; text-align: right; font-feature-settings: 'tnum' 1; }
.photo-empty { appearance: none; width: 100%; border: 1.5px dashed var(--line); border-radius: 18px; background: var(--deck); color: var(--paper); padding: 22px 16px; display: grid; justify-items: center; gap: 6px; text-align: center; font: inherit; }
.photo-empty b { font-weight: 600; }
.photo-empty span { font-size: 13px; color: var(--mist); }
.photo-empty .ic { color: var(--caption); }
.photo-has { display: flex; align-items: center; gap: 12px; background: var(--deck); border-radius: 18px; padding: 10px 12px; }
.photo-has img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; flex: none; }
.photo-has .label { font-weight: 600; display: block; }
.photo-has .hint { font-size: 13px; color: var(--mist); }
.photo-pick.compact .photo-empty { padding: 12px; grid-auto-flow: column; justify-content: center; align-items: center; gap: 10px; background: var(--deck-2); }
.photo-pick.compact .photo-has { background: var(--deck-2); padding: 8px 10px; }
.photo-pick.compact .photo-has img { width: 44px; height: 44px; border-radius: 10px; }
.link-btn { appearance: none; border: 0; background: none; color: var(--mist); font-size: 13px; padding: 10px 2px 0; text-decoration: underline; text-underline-offset: 3px; }
.idea-tools { display: flex; align-items: center; gap: 12px; margin-top: 14px; background: var(--deck); border-radius: 18px; padding: 10px 10px 10px 16px; }
.idea-tools .label { display: block; font-weight: 500; }
.idea-tools .hint { display: block; font-size: 13px; color: var(--mist); }
.board { display: grid; gap: 12px; }
.scene { background: var(--deck); border-radius: 20px; padding: 10px 10px 12px 12px; display: grid; gap: 10px; }
.scene-head { display: flex; align-items: center; gap: 2px; }
.scene .no { width: 30px; height: 30px; border-radius: 50%; background: var(--caption); color: var(--on-caption); display: grid; place-items: center; font: 700 13px/1 var(--display); margin-right: 8px; flex: none; }
.scene .icon-btn { width: 38px; height: 38px; color: var(--mist); }
.icon-btn[disabled] { opacity: .28; pointer-events: none; }
.scene-text { min-height: 84px; background: var(--deck-2); border-color: transparent; resize: none; }
.pill-select { position: relative; display: inline-flex; align-items: center; }
.pill-select select { appearance: none; -webkit-appearance: none; height: 32px; padding: 0 30px 0 12px; border-radius: 999px; border: 0; background: var(--deck-2); color: var(--paper); font: 600 14px/1 var(--display); outline: none; }
.pill-select select:focus-visible { box-shadow: 0 0 0 2px var(--caption); }
.pill-select .ic { position: absolute; right: 9px; width: 15px; height: 15px; pointer-events: none; color: var(--mist); }
.add-scene { appearance: none; border: 1.5px dashed var(--line); background: transparent; color: var(--mist); border-radius: 20px; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 8px; font: 500 15px/1 var(--text); }
.add-scene:active { background: var(--deck); }
.option .modes { display: flex; gap: 6px; margin-top: 4px; }
.option .modes i { font-style: normal; font-size: 11px; line-height: 1; padding: 4px 8px; border-radius: 999px; background: var(--deck-3); color: var(--mist); }
.option .modes i.on { color: var(--paper); box-shadow: inset 0 0 0 1px var(--haze); }
.option:has(.p) .t { padding-right: 76px; flex-wrap: wrap; }
.viewfinder .state .tally { font-size: 11px; padding: 5px 8px; gap: 5px; }
.viewfinder .state .tally::before { width: 6px; height: 6px; }
.sheet-body > .chips.sticky { position: sticky; top: -8px; z-index: 3; background: var(--deck); margin: -8px -22px 8px; padding: 8px 22px 10px; }
.facts-head { margin: 24px 2px 10px; align-items: center; }
.fact-board { display: grid; gap: 10px; }
.fact-card { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; background: var(--deck); border-radius: 18px; padding: 12px 4px 12px 12px; }
.fact-card .no { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--caption); color: var(--on-caption); font: 700 13px/1 var(--display); margin-top: 3px; }
.fact-card .fields { display: grid; gap: 2px; min-width: 0; }
.fact-card textarea { width: 100%; resize: none; border: 0; background: transparent; color: var(--paper); padding: 5px 6px; margin: 0 -6px; outline: none; overflow: hidden; font: 600 16px/1.35 var(--text); border-radius: 8px; display: block; }
.fact-card textarea.fact-detail { font-weight: 400; color: var(--mist); }
.fact-card textarea:focus { background: var(--deck-2); }
.fact-card textarea::placeholder { color: var(--haze); font-weight: 400; }
.fact-card .icon-btn { width: 36px; height: 36px; color: var(--haze); }
.fact-empty { background: var(--deck); border-radius: 20px; padding: 16px; display: grid; gap: 14px; }
.fact-empty p { margin: 0; color: var(--mist); font-size: 15px; line-height: 1.45; }
.fact-empty p b { color: var(--paper); font-family: var(--display); font-weight: 600; }
.fact-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fact-actions .btn:not(.ghost) { background: var(--deck-3); }
.studio-foot { text-align: center; margin-top: 20px; }
.monitor.cardsy .card-no { position: absolute; left: 9%; top: 14%; font-family: var(--display); font-weight: 700; line-height: 1; -webkit-background-clip: text; background-clip: text; color: transparent; z-index: 1; }
.monitor.cardsy .card-of { position: absolute; right: 9%; top: 16%; color: rgba(255, 255, 255, .6); font-family: var(--display); z-index: 1; }
.monitor.cardsy .card-fact { position: absolute; left: 9%; right: 9%; top: 33%; color: #fff; font-weight: 700; line-height: 1.18; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; z-index: 1; }
.lib-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin: 0 0 14px; min-height: 28px; }
.lib-head .back { display: inline-flex; align-items: center; gap: 4px; padding: 0; text-decoration: none; color: var(--paper); font-size: 15px; }
.lib-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.lib-topic { appearance: none; border: 0; text-align: left; color: inherit; background: var(--deck-2); border-radius: 18px; padding: 14px; display: grid; gap: 2px; font: inherit; }
.lib-topic .e { font-size: 24px; line-height: 1; margin-bottom: 8px; }
.lib-topic .l { font-weight: 600; font-size: 15px; }
.lib-topic .n { font: 700 24px/1.1 var(--display); margin-top: 6px; letter-spacing: -0.02em; }
.lib-topic .s { font-size: 12px; color: var(--mist); }
.lib-topic .bar { height: 4px; border-radius: 2px; background: var(--deck-3); margin-top: 10px; overflow: hidden; display: block; }
.lib-topic .bar i { display: block; height: 100%; background: var(--caption); border-radius: 2px; }
.lib-topic.dry .n { color: var(--wait); }
.lib-topic:active, .lib-fact:active { transform: scale(.985); }
.lib-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lib-search { display: flex; align-items: center; gap: 10px; background: var(--deck-2); border-radius: 14px; padding: 0 14px; min-height: 48px; color: var(--mist); }
.lib-search input { flex: 1; border: 0; background: transparent; color: var(--paper); font: 400 16px/1.3 var(--text); outline: none; min-width: 0; }
.lib-facts { display: grid; gap: 8px; }
.lib-fact { appearance: none; border: 0; text-align: left; color: inherit; background: var(--deck-2); border-radius: 16px; padding: 12px 12px 12px 10px; display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; font: inherit; transition: transform .1s var(--ease); }
.lib-fact .mark { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--haze); display: grid; place-items: center; color: var(--mist); font: 700 13px/1 var(--display); }
.lib-fact.on { box-shadow: inset 0 0 0 2px var(--caption); }
.lib-fact.on .mark { background: var(--caption); color: var(--on-caption); box-shadow: none; }
.lib-fact .body { display: grid; gap: 4px; min-width: 0; }
.lib-fact .t { font-weight: 600; font-size: 15px; line-height: 1.35; }
.lib-fact .d { font-size: 13px; color: var(--mist); line-height: 1.4; }
.lib-fact.used { opacity: .55; }
.lib-fact .was { font-size: 11px; color: var(--mist); background: var(--deck-3); padding: 3px 7px; border-radius: 999px; }
.lib-progress { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center; font-size: 14px; color: var(--mist); }
.lib-progress > span b { color: var(--paper); font-family: var(--display); }
.lib-progress .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--deck-3); overflow: hidden; display: block; }
.lib-progress .bar b { display: block; height: 100%; background: var(--busy); transition: width .3s var(--ease); }
.lib-progress .bar b.full { background: var(--caption); }
.lib-progress .link { background: none; border: 0; color: var(--mist); font-size: 13px; padding: 0; }
.pill-select select { font-size: 16px; }
.note-link { appearance: none; border: 0; background: none; color: var(--mist); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; padding: 2px 0; justify-self: center; }
.section.first { margin-top: 22px; }
.setup { background: linear-gradient(160deg, rgba(165, 150, 255, .16), rgba(255, 226, 58, .07)), var(--deck); border-radius: 24px; padding: 16px 16px 8px; box-shadow: inset 0 0 0 1px rgba(165, 150, 255, .2); }
.setup-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.setup-head h3 { margin: 0; font: 650 18px/1.25 var(--text); }
.setup-head p { margin: 3px 0 0; font-size: 14px; color: var(--mist); }
.ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--caption) calc(var(--p) * 1%), var(--deck-3) 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #1d1a29; }
.ring b { position: relative; font: 700 14px/1 var(--display); }
.setup-steps { display: grid; }
.step { appearance: none; border: 0; background: transparent; color: inherit; text-align: left; display: flex; align-items: center; gap: 12px; padding: 11px 0; width: 100%; font: inherit; }
.step + .step { border-top: 1px solid rgba(255, 255, 255, .06); }
.step .tick { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--haze); display: grid; place-items: center; flex: none; }
.step.done .tick { background: var(--ok); box-shadow: none; color: #0b2a1d; }
.step .label { display: block; font-weight: 500; }
.step .hint { display: block; font-size: 13px; color: var(--mist); margin-top: 1px; }
.step.done .label { color: var(--mist); }
.step .chev { color: var(--haze); }
.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kind { appearance: none; border: 0; background: none; color: inherit; padding: 0; text-align: left; display: grid; gap: 3px; font: inherit; }
.kind .cover { aspect-ratio: 9 / 13; border-radius: 18px; display: grid; place-items: center; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.kind .cover::after { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 60% at 30% 10%, rgba(255, 255, 255, .28), transparent 60%), linear-gradient(to top, rgba(0, 0, 0, .25), transparent 55%); }
.kind .glyph { font-size: 42px; position: relative; z-index: 1; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); transition: transform .2s var(--ease); }
.kind:active .glyph { transform: scale(1.12) rotate(-6deg); }
.kind .t { font-weight: 650; font-size: 15px; margin-top: 6px; }
.kind .s { font-size: 12px; color: var(--mist); }
.strip { display: flex; gap: 10px; overflow-x: auto; margin: 12px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip .tile { width: 92px; flex: none; }
.voice-tuning { background: var(--deck-2); border-radius: 18px; margin: 4px 0 6px; }
.voice-tuning .tuning-toggle { min-height: 56px; }
.voice-tuning .tuning-toggle .lead { background: var(--deck-3); }
.tuning-body { padding: 0 16px 14px; }
.tuning-body .param { padding: 10px 0 4px; }
.tuning-body .chip { background: var(--deck-3); }
.tuning-body .seg { background: var(--deck-3); }
.tuning-body .seg button.on { background: var(--deck); }
.tuning-body .param-switch { padding: 10px 0; }
.tuning-body > .btn { margin-top: 8px; }
