/* Lock-in — UI v2, matched to the four Product UI Concept boards (Lock-in Design Package)
   Near-black + saturated lime, large display type, numbered steppers, radar queue,
   big A/V tiles, mono timers. UI layer only — all functionality ids/logic untouched. */

@font-face { font-family: "Inter"; src: url("../vendor/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../vendor/fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../vendor/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../vendor/fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../vendor/fonts/inter-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --bg: #0a0b0c;
  --surface: #111314;
  --surface2: #181b1c;
  --edge: #242829;
  --edge2: #3a4041;
  --fg: #f3f5f0;
  --muted: #8d9490;
  --lime: #def3a9;
  --lime-dim: #c2de88;
  --red: #ff4d43;
  --blue: #a9bcff;
  --amber: #f5c96b;

  --panel: var(--surface);
  --panel-2: var(--surface2);
  --line: var(--edge);
  --line-strong: var(--edge2);
  --text: var(--fg);
  --danger: var(--red);
  --radius: 12px;

  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

/* ---------- shell ---------- */

.app {
  display: flex;
  min-height: 100dvh;
  background: radial-gradient(circle at 88% 4%, rgba(222, 243, 169, 0.05), transparent 26%), var(--bg);
}

.sidebar {
  width: 204px;
  flex: none;
  border-right: 1px solid #1c1f20;
  padding: 22px 14px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  background: #0b0d0e;
}

.brand { display: flex; align-items: center; gap: 10px; width: max-content; padding: 0; border: 0; background: transparent; font: inherit; font-size: 19px; font-weight: 700; letter-spacing: -0.6px; margin: 0 0 30px 6px; color: var(--fg); cursor: pointer; text-align: left; }
.brand:hover, .brand:focus-visible { color: var(--lime); }
.dots { display: grid; grid-template-columns: repeat(2, 5px); gap: 5px; flex: none; }
.dots i { width: 5px; height: 5px; border-radius: 1.5px; background: #f3f5f0; display: block; }
.dots i:nth-child(4) { background: var(--lime); }

.nav {
  border: 0; background: transparent; color: #9aa19c;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; font-family: inherit; font-size: 13px; font-weight: 500;
  border-radius: 9px; margin: 2px 0; cursor: pointer; text-align: left;
  transition: color 120ms ease, background 120ms ease;
}
.nav:hover { color: var(--fg); background: #141617; }
.nav.active { color: var(--fg); background: #161a12; box-shadow: inset 0 0 0 1px #2a3a1a; }
.nav.active .ico { color: var(--lime); }
.nav .ico { font-size: 15px; width: 20px; text-align: center; color: #7f8680; }

.sidebottom { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid #1c1f20; font-size: 11.5px; color: #70766f; line-height: 1.7; }
.sidebottom .lightdot { display: none; }
.version { margin-top: 12px; color: #565c56; font: 9.5px var(--mono); letter-spacing: 1.2px; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  min-height: 54px;
  border-bottom: 1px solid #1c1f20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 38px;
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 11, 12, 0.92);
  backdrop-filter: blur(10px);
}
.crumb { color: #6d746d; font: 10px var(--mono); letter-spacing: 1.8px; display: flex; align-items: center; gap: 9px; text-transform: uppercase; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb strong { color: #c6ccc5; font-family: var(--font); font-weight: 500; font-size: 12px; letter-spacing: 0.3px; }
.topright { display: flex; align-items: center; gap: 14px; flex: none; }
.topbar .crumb { flex: 1; }
#btn-back { flex: none; }
.chrome { font: 10px var(--mono); letter-spacing: 1.4px; color: #5f665f; text-transform: uppercase; }
.concept { font: 9.5px var(--mono); padding: 6px 9px; border: 1px solid #232827; color: #6d746d; border-radius: 6px; letter-spacing: 1px; text-transform: uppercase; }
.dots3 { font-size: 14px; color: var(--lime); letter-spacing: 2px; }

.content {
  flex: 1; position: relative; width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 36px 40px 100px; min-height: 0;
}

.spark {
  position: absolute; top: 40px; right: 40px; width: 130px; height: 96px; pointer-events: none; z-index: 0;
  background-image: radial-gradient(#8a9368 1px, transparent 1.4px);
  background-size: 13px 13px;
  opacity: 0.28;
  -webkit-mask-image: radial-gradient(circle at 100% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(circle at 100% 0%, #000 30%, transparent 75%);
}

.foot { position: absolute; bottom: 28px; left: 40px; color: #4d534d; font: 9.5px var(--mono); letter-spacing: 1.6px; }

/* ---------- type ---------- */

.screen { animation: fade 160ms ease-out; position: relative; z-index: 1; max-width: 1040px; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.eyebrow { font: 10.5px var(--mono); letter-spacing: 2.4px; color: var(--lime); text-transform: uppercase; margin: 0 0 14px; }
.title { font-size: clamp(30px, 4vw, 42px); letter-spacing: -1.8px; line-height: 1.05; font-weight: 800; margin: 0; }
h1.headline { font-size: clamp(38px, 5.4vw, 58px); letter-spacing: -2.8px; line-height: 1; font-weight: 800; margin: 0 0 16px; }
h2.h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -1.2px; font-weight: 800; margin: 0 0 10px; }
.subtitle, .subhead { font-size: 14.5px; color: var(--muted); line-height: 1.6; margin: 12px 0 0; max-width: 640px; }
#screen-battle > .subtitle { color: #fff; }
.hint { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 12px 0 20px; max-width: 680px; }
.note { color: #767d76; font-size: 12px; line-height: 1.6; margin: 14px 0 0; max-width: 680px; }
.muted { color: var(--muted); font-size: 12px; }
.small { font-size: 11.5px; color: #8b928c; line-height: 1.55; }
.processing-indicator { display: inline-flex; align-items: center; gap: 7px; color: var(--lime); font-size: 11.5px; }
.spinner { width: 13px; height: 13px; border: 2px solid rgba(222,243,169,.28); border-top-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.live-compare-controls { align-items: end; margin-top: 14px; }
.live-compare-controls .field { flex: 1 1 280px; margin: 0; }
.compare-items { display: grid; gap: 10px; margin: 16px 0 22px; }
.compare-item { padding: 12px 14px; border: 1px solid var(--edge); border-radius: 10px; background: var(--surface2); }
.compare-item-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.compare-item-status { font: 10px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--lime); }
.compare-item-status.is-missed { color: #ffc98a; }
.compare-item-status.is-changed { color: #a9bcff; }
.compare-item-status.is-added { color: #b8bfb7; }
.compare-excerpts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 9px; }
.compare-excerpts p { margin: 0; color: #c2c9c2; font-size: 12px; line-height: 1.55; }
.compare-excerpts strong { display: block; color: var(--muted); font: 10px var(--mono); letter-spacing: 1px; margin-bottom: 4px; text-transform: uppercase; }
@media (max-width: 700px) { .compare-excerpts { grid-template-columns: 1fr; } }
.bodycopy { color: #c2c9c2; font-size: 13.5px; line-height: 1.6; margin: 0; }
.privacy-line { color: #767d76; font-size: 12px; margin: 26px 0 0; border-top: 1px solid #1e2223; padding-top: 13px; }

.trustrow { display: flex; flex-wrap: wrap; gap: 12px 30px; color: #868d86; font-size: 11.5px; margin: 26px 0 0; }
.trustrow span { display: inline-flex; gap: 7px; align-items: center; }
.trustrow b { color: #aab1a9; font-weight: 500; font-size: 12px; }

/* ---------- stepper (numbered chips + connectors) ---------- */

.stepper { display: flex; align-items: center; gap: 0; margin: 22px 0 26px; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #7a817a; white-space: nowrap; padding: 0; border: 0; background: none; border-radius: 0; }
.step::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34393a; flex: none; }
.step.on { color: var(--fg); }
.step.on::before { background: var(--lime); box-shadow: 0 0 8px rgba(222, 243, 169, 0.5); }
.step.done { color: #b6bdb4; }
.step.done::before { background: var(--lime-dim); }
.arrow { display: inline-block; width: 26px; height: 1px; background: #2a2e2f; position: relative; margin: 0 10px; }
.arrow::after { content: ""; position: absolute; right: 0; top: -2px; border-left: 5px solid #2a2e2f; border-top: 2.5px solid transparent; border-bottom: 2.5px solid transparent; }
.step .arrow { margin-left: 8px; }

/* ---------- buttons ---------- */

.actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; align-items: center; }
.btnrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn {
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  min-height: 44px; padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 10px; border: 1px solid #333837; background: #15181a; color: #d7ddd2;
  cursor: pointer; white-space: nowrap;
  transition: border-color 120ms ease, filter 120ms ease, color 120ms ease;
}
.btn:hover:not(:disabled) { border-color: #4a5150; color: var(--fg); }
.btn-primary { background: var(--lime); border-color: var(--lime); color: #101408; font-weight: 650; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); border-color: var(--lime); color: #101408; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { border-color: #4a5150; color: var(--fg); }
.btn-small { min-height: 34px; padding: 0 13px; font-size: 11.5px; border-radius: 8px; }
.btn-add { margin-top: 4px; }
.count { color: var(--muted); font-weight: 400; margin-left: 5px; font-family: var(--mono); font-size: 10.5px; }

/* ---------- cards ---------- */

.card { background: var(--surface); border: 1px solid #202424; border-radius: var(--radius); padding: 20px; }
.card.faint { background: #0e1011; }
.rule { height: 1px; background: #202424; margin: 16px 0; border: 0; }
.minihead { font: 10px var(--mono); letter-spacing: 1.6px; color: #8d948b; text-transform: uppercase; margin: 0 0 9px; }
.sectiontitle { font-weight: 650; font-size: 15.5px; letter-spacing: -0.3px; margin: 0 0 9px; }

.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.split { display: grid; grid-template-columns: 1.45fr 0.9fr; gap: 18px; align-items: start; }
.split-even { display: grid; grid-template-columns: 1.05fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .cols2, .cols3, .split, .split-even { grid-template-columns: 1fr; } }

.listrow { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #222626; border-radius: 10px; background: #141618; margin-bottom: 9px; font-size: 13px; }
.numb { font: 11px var(--mono); background: #1f2424; padding: 7px 9px; border-radius: 6px; color: #d8ded6; flex: none; }
.tick { display: inline-grid; place-items: center; width: 22px; height: 22px; background: var(--lime); border-radius: 7px; color: #101408; font-size: 12px; font-weight: 800; flex: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #202526; display: grid; place-items: center; font-weight: 700; color: #90968f; flex: none; }
.notice { background: #1a1c12; border: 1px solid #3a431c; border-radius: 10px; padding: 12px 14px; color: #d3e39a; font-size: 11.5px; line-height: 1.5; }

/* ---------- chips ---------- */

.chip, .tag, .pill {
  font: 10.5px var(--mono); letter-spacing: 0.8px; border: 1px solid #2f3535; background: #17191b;
  padding: 5px 9px; border-radius: 6px; color: #c2c9c1; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; text-transform: uppercase;
}
.chip.lime, .tag { background: var(--lime); color: #101408; border-color: var(--lime); font-weight: 700; }
.chip.outlineLime, .pill.is-ok { color: var(--lime); border-color: #465424; background: transparent; }
.chip.red, .pill.is-bad { color: #ff8d84; border-color: #58302c; background: #1f1211; }
.pill.is-warn { color: #ecc97f; border-color: #524322; background: #1d180d; }
.chip.soft { color: #b3c1f0; border-color: #39435c; background: #141a26; }
.chip-say { color: var(--lime); border-color: #465424; background: #14170d; }
.chip-ask { color: #cdeaf7; border-color: #2e4a55; background: #101a1e; }
.chip-attention { color: #ecc97f; border-color: #524322; background: #1d180d; }
.chip-evidence-verified { color: var(--lime); border-color: #465424; background: transparent; }
.chip-evidence-partial { color: #ecc97f; border-color: #524322; background: #1d180d; }
.chip-evidence-general_no_audience_evidence { color: #8d948b; border-color: #2c3131; background: #141618; }

/* ---------- home ---------- */

/* ---------- cover ---------- */

body.cover-screen { background: #130d0c; }
body.cover-screen .sidebar, body.cover-screen .topbar { display: none; }
body.cover-screen .workspace { width: 100%; }
body.cover-screen .content { max-width: none; padding: 0; }
body.cover-screen .screen.cover-screen { max-width: none; }
body.cover-screen .spark { display: none; }
#screen-cover.cover-screen { position: relative; display: grid; place-items: center; width: 100%; max-width: none; min-height: 100dvh; margin: 0; overflow: hidden; isolation: isolate; color: #fff; background: #24100d; }
.cover-video, .cover-wash, .cover-grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-video { z-index: -3; object-fit: cover; object-position: center; filter: saturate(1.08) contrast(1.03); }
.cover-wash { z-index: -2; background: linear-gradient(180deg, rgba(10, 6, 5, .24), rgba(10, 6, 5, .08) 35%, rgba(10, 6, 5, .54)), linear-gradient(90deg, rgba(10, 6, 5, .42), transparent 28%, transparent 72%, rgba(10, 6, 5, .42)); }
.cover-grid { z-index: -1; opacity: .2; background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to bottom, black, transparent 70%); }
.cover-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: min(1040px, calc(100% - 48px)); padding: 34px 0 56px; text-align: center; }
.cover-brand { position: absolute; top: clamp(22px, 4vh, 48px); left: max(0px, calc((100vw - 1040px) / -2)); display: inline-flex; align-items: center; gap: 11px; padding: 0; border: 0; background: transparent; color: #151416; cursor: pointer; font: 800 clamp(20px, 2.2vw, 29px) var(--font); letter-spacing: -1.2px; text-shadow: 0 1px 12px rgba(255,255,255,.55); }
.cover-brand:focus-visible, .cover-brand:hover { color: #e83924; }
.cover-brand-mark { display: grid; grid-template-columns: repeat(2, 10px); grid-template-rows: repeat(2, 10px); gap: 3px; }
.cover-brand-mark i { display: block; width: 10px; height: 10px; border-radius: 2px; background: #16171a; }
.cover-brand-mark i:last-child { background: #ef3b22; }
.cover-eyebrow { margin: 0 0 18px; color: #f0442d; font: 800 11px var(--mono); letter-spacing: 3px; }
.cover-title { display: flex; flex-direction: column; gap: 2px; margin: 0; color: #151416; font-size: clamp(46px, 7vw, 102px); line-height: .96; letter-spacing: -4px; text-shadow: 0 3px 18px rgba(255,255,255,.62); }
.cover-title strong { color: #ef3b22; font-weight: 800; }
.cover-copy { margin: 28px 0 0; max-width: 860px; color: #161519; font-size: clamp(14px, 1.45vw, 20px); line-height: 1.45; font-weight: 650; text-shadow: 0 2px 16px rgba(255,255,255,.62); }
.cover-start { display: inline-flex; align-items: center; gap: 24px; margin-top: 42px; min-width: 268px; justify-content: center; padding: 18px 30px; border: 1px solid rgba(255,255,255,.68); border-radius: 999px; background: linear-gradient(135deg, #ff5a31, #ed1e12); box-shadow: 0 12px 30px rgba(188, 25, 12, .38), inset 0 1px 0 rgba(255,255,255,.55); color: #fff; cursor: pointer; font: 800 19px var(--font); transition: transform .18s ease, filter .18s ease, box-shadow .18s ease; }
.cover-start span { font-size: 31px; line-height: .6; font-weight: 500; }
.cover-start:hover, .cover-start:focus-visible { filter: brightness(1.08); box-shadow: 0 16px 38px rgba(188, 25, 12, .48), inset 0 1px 0 rgba(255,255,255,.7); transform: translateY(-2px); }
.cover-start:focus-visible { outline: 3px solid rgba(255,255,255,.9); outline-offset: 4px; }
.cover-footer { position: absolute; right: max(24px, calc((100vw - 1040px) / 2)); bottom: 24px; margin: 0; color: rgba(18, 17, 20, .72); font: 700 9px var(--mono); letter-spacing: 1.6px; }
@media (max-width: 700px) { .cover-content { width: min(calc(100% - 32px), 620px); padding-top: 58px; }.cover-brand { left: 0; top: 16px; }.cover-title { font-size: clamp(40px, 12vw, 68px); letter-spacing: -2.5px; }.cover-copy { font-size: 14px; }.cover-copy-break { display: none; }.cover-start { margin-top: 30px; min-width: 230px; padding: 15px 24px; font-size: 17px; }.cover-footer { right: 16px; bottom: 16px; font-size: 8px; letter-spacing: 1px; } }
@media (prefers-reduced-motion: reduce) { .cover-video { display: none; } #screen-cover.cover-screen { background: linear-gradient(135deg, #fff8f5, #ffb29e 58%, #ef3b22); } .cover-start { transition: none; } }

.route-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 30px; max-width: 1120px; }
@media (max-width: 980px) { .route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .route-grid { grid-template-columns: 1fr; } }
.home-activity { max-width: 880px; margin-top: 18px; }
.home-activity-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-activity-list { display: grid; gap: 8px; margin-top: 12px; }
.home-activity-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--edge); }
.home-activity-row strong, .home-activity-row span { display: block; }
.home-activity-row .small { margin-top: 3px; }

.route-card {
  text-align: left; background: #131617; border: 1px solid #242929; border-radius: 14px;
  padding: 22px 22px 18px; min-height: 150px; color: var(--fg); cursor: pointer;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  transition: border-color 140ms ease, transform 140ms ease; font-family: inherit;
}
.route-card:hover { border-color: #3c423f; transform: translateY(-1px); }
.route-card .icon {
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: #1c2120; color: var(--lime); font-size: 17px; border: 1px solid #262b2a;
}
.route-title { font-size: 21px; font-weight: 750; letter-spacing: -0.7px; display: flex; align-items: center; gap: 8px; }
.route-desc { color: #8f968f; font-size: 12.5px; line-height: 1.55; margin-top: 4px; grid-column: auto; }
.route-cta { color: #a3ab97; font-size: 15px; font-weight: 500; justify-self: end; }
.route-card.primary-card { background: var(--lime); border-color: var(--lime); color: #101408; }
.route-card.primary-card .icon { background: rgba(16, 20, 8, 0.12); color: #101408; border-color: transparent; }
.route-card.primary-card .route-desc { color: #45521c; }
.route-card.primary-card .route-cta { color: #303b0f; }
.route-card.primary-card:hover { filter: brightness(1.05); border-color: var(--lime); }
.route-card > .body { display: flex; flex-direction: column; }
.assistant-choices { margin-top: 26px; }
.assistant-choices .card { display: grid; align-content: start; gap: 8px; font: inherit; color: inherit; text-align: left; }
.assistant-choices .card:enabled { cursor: pointer; border-color: var(--lime-dim); }
.assistant-choices .card:disabled { color: var(--muted); }
.live-grid, #live-review, #live-saved { margin: 18px 0; }
.is-processing { display: flex; align-items: center; gap: 8px; }
.is-processing::before { content: ""; width: 14px; height: 14px; flex: 0 0 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.live-check-error { border-color: rgba(255, 77, 67, 0.55) !important; }
#screen-live .field { display: grid; gap: 5px; margin: 12px 0; }
#screen-live meter, #live-player { width: 100%; }
#screen-live .btnrow { flex-wrap: wrap; }
.live-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.live-signals { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 8px 14px; }
.live-signals dt { color: var(--muted); }
.live-signals dd { margin: 0; }
.live-list { list-style: none; margin: 10px 0; padding: 0; overflow-wrap: anywhere; }
.live-list li { border-top: 1px solid var(--line); padding: 9px 0; }
.live-list p { white-space: pre-wrap; }
#live-turns { max-height: 60vh; overflow-y: auto; }

/* ---------- upload ---------- */

.drop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .drop-grid { grid-template-columns: 1fr; } }

.drop { border: 1px dashed #394040; border-radius: 10px; background: #131617; transition: border-color 140ms ease, background 140ms ease; }
.drop:hover, .drop.is-over { border-color: var(--lime); background: #171a13; }
.drop-inner { display: flex; flex-direction: column; gap: 5px; padding: 22px 16px; cursor: pointer; text-align: center; align-items: center; min-height: 128px; justify-content: center; }
.drop-title { font-weight: 650; font-size: 14px; }
.drop-sub { color: #828982; font-size: 11.5px; }
.drop-cta { color: var(--lime); font-size: 11px; font-weight: 600; margin-top: 8px; border: 1px solid #465424; border-radius: 6px; padding: 5px 11px; letter-spacing: 0.5px; }

.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.file-card { display: flex; align-items: center; gap: 12px; background: #141618; border: 1px solid #242828; border-radius: 9px; padding: 10px 13px; }
.file-icon { width: 30px; height: 34px; border-radius: 5px; flex: none; display: grid; place-items: center; background: #852721; color: #ffd9d4; font: 10px var(--mono); font-weight: 700; }
.file-icon.is-doc { background: #2b3b64; color: #cdd9f5; }
.file-main { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { color: #828982; font-size: 10.5px; margin-top: 2px; font-family: var(--mono); }
.file-meta.is-error { color: var(--red); }
.file-actions { display: flex; gap: 6px; flex: none; }
.file-btn { background: #17191b; border: 1px solid #2f3535; color: #c2c9c1; border-radius: 6px; font-family: inherit; font-size: 10.5px; font-weight: 600; padding: 5px 9px; cursor: pointer; }
.file-btn:hover { border-color: #4a5150; color: var(--fg); }
.file-btn.is-danger:hover { border-color: var(--red); color: var(--red); }
.verified { color: var(--lime); font-size: 12px; }

/* ---------- audience ---------- */

.audience-list { display: flex; flex-direction: column; gap: 9px; }
.audience-card { background: #141618; border: 1px solid #222626; border-radius: 10px; padding: 13px; }
.audience-head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.audience-head .idx { font: 11px var(--mono); background: #1f2424; padding: 4px 7px; border-radius: 5px; color: #d8ded6; }
.audience-remove { margin-left: auto; }
.audience-fields { display: grid; grid-template-columns: 150px 1fr; gap: 9px 11px; }
@media (max-width: 560px) { .audience-fields { grid-template-columns: 1fr; } }
.field label { display: block; color: #8d948b; font: 10px var(--mono); letter-spacing: 1.4px; margin-bottom: 5px; text-transform: uppercase; }
.field input, .field select { width: 100%; font-family: inherit; font-size: 12.5px; background: #17191b; color: #d7ddd2; border: 1px solid #2f3535; border-radius: 8px; padding: 10px 12px; outline: none; }
.field input:focus, .field select:focus { border-color: var(--lime); }
.field.span-2 { grid-column: 1 / -1; }

/* ---------- research ---------- */

.research-stages { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; max-width: 640px; }
.research-stages li { display: flex; align-items: flex-start; gap: 12px; background: #141618; border: 1px solid #222626; border-radius: 9px; padding: 12px 14px; font-size: 12.5px; }
.research-stages li .stage-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; margin-top: 1px; display: grid; place-items: center; font: 9px var(--mono); font-weight: 700; background: #1f2424; color: #c2c9c1; border: 1px solid #2c3131; }
.research-stages li[data-status="active"] { border-color: #465424; }
.research-stages li[data-status="active"] .stage-dot { background: var(--lime); color: #101408; border-color: var(--lime); animation: pulse 1.1s ease-in-out infinite; }
.research-stages li[data-status="done"] .stage-dot { background: var(--lime); color: #101408; border-color: var(--lime); }
.research-stages li[data-status="warn"] .stage-dot { color: #ecc97f; border-color: #524322; background: #1d180d; }
.research-stages li[data-status="error"] .stage-dot { color: var(--red); border-color: #58302c; background: #1f1211; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.warning { background: #1f1211; border: 1px solid #58302c; border-radius: 9px; padding: 12px 14px; font-size: 12px; line-height: 1.55; margin-bottom: 14px; color: #ffb7ae; }

/* ---------- lazy pack ---------- */

.pack-list { display: flex; flex-direction: column; border: 1px solid #202424; border-radius: 12px; background: var(--surface); overflow: hidden; max-width: 840px; }
.pack-card { padding: 16px 18px; border-bottom: 1px solid #1e2222; background: transparent; }
.pack-list .pack-card:last-child { border-bottom: 0; }
.rank-badge { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: transparent; border: 1px solid #3a4040; color: #d8ded6; font: 11px var(--mono); font-weight: 700; }
.pack-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; grid-column: auto; grid-row: auto; }
.pack-advice { font-size: 15px; line-height: 1.5; font-weight: 550; letter-spacing: -0.2px; margin: 0; }
.pack-why { color: #848b84; font-size: 11.5px; line-height: 1.5; margin: 6px 0 0; }
.pack-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 10.5px; color: #6f766f; margin-top: 8px; font-family: var(--mono); }
.pack-sources a { color: var(--lime); text-decoration: none; border-bottom: 1px dotted rgba(222, 243, 169, 0.45); }
.pack-sources a:hover { border-bottom-style: solid; }
.pack-refs span { color: var(--muted); }

/* pack cards are rendered by app.js as: [rank][chip][advice+why][copy] — keep grid tolerant */
.pack-card > div { min-width: 0; }
.pack-card .pack-body { grid-column: 3; }
@media (max-width: 700px) {
  .pack-card { grid-template-columns: 30px 46px 1fr; }
}

/* ---------- setup / preflight ---------- */

.setup-grid { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.setup-field label { display: block; color: #8d948b; font: 10px var(--mono); letter-spacing: 1.6px; margin-bottom: 8px; text-transform: uppercase; }
.seg { display: inline-flex; gap: 7px; flex-wrap: wrap; }
.seg-btn { font-family: inherit; font-size: 12px; font-weight: 550; background: #17191b; color: #98a098; border: 1px solid #2f3535; border-radius: 8px; padding: 9px 14px; min-height: 38px; cursor: pointer; transition: border-color 120ms ease, background 120ms ease, color 120ms ease; }
.seg-btn:hover { border-color: #4a5150; color: var(--fg); }
.seg-btn.is-active { background: var(--lime); color: #101408; border-color: var(--lime); font-weight: 650; }
.custom-min { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.custom-min input { width: 80px; font-family: inherit; font-size: 13px; background: #17191b; color: #d7ddd2; border: 1px solid #2f3535; border-radius: 8px; padding: 8px 11px; outline: none; }
.custom-min input:focus { border-color: var(--lime); }
.select-input { width: 100%; max-width: 340px; font-family: inherit; font-size: 12.5px; background: #17191b; color: #d7ddd2; border: 1px solid #2f3535; border-radius: 8px; padding: 10px 12px; outline: none; }
.select-input:focus { border-color: var(--lime); }

.preflight { display: grid; grid-template-columns: minmax(220px, 1fr) 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .preflight { grid-template-columns: 1fr; } }
.preflight-preview { position: relative; border-radius: 12px; overflow: hidden; background: #141618; border: 1px solid #2a2f2f; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.preflight-preview video { width: 100%; height: 100%; object-fit: cover; display: none; }
.preflight-preview video.is-live { display: block; }
.preflight-preview video.is-live + .preflight-placeholder { display: none; }
.preflight-placeholder { color: #6f766f; font: 10px var(--mono); letter-spacing: 1.8px; text-align: center; padding: 0 12px; line-height: 2; }
.preflight-info { display: flex; flex-direction: column; gap: 10px; }
.device-status { margin: 0; font-size: 12.5px; color: #c2c9c2; display: flex; align-items: center; gap: 8px; }
.device-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #40474a; flex: none; }
.device-status.is-ok { color: #d9e2c8; }
.device-status.is-ok::before { background: var(--lime); }
.device-status.is-bad { color: #ffb7ae; }
.device-status.is-bad::before { background: var(--red); }
.device-status.is-warn { color: #ecc97f; }
.device-status.is-warn::before { background: var(--amber); }
.mic-meter { height: 6px; border-radius: 4px; background: #17191b; border: 1px solid #2a2f2f; overflow: hidden; width: 100%; max-width: 320px; }
#mic-meter-fill { height: 100%; width: 0%; background: var(--lime); transition: width 90ms linear; }

/* ---------- live stage ---------- */

.stage-screen { display: flex; flex-direction: column; gap: 12px; }
.stage-top { display: flex; align-items: center; gap: 12px; }
.stage-top .scene-label { font: 10.5px var(--mono); letter-spacing: 1.6px; color: #7e857d; text-transform: uppercase; margin-right: auto; }
.stage-timer { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 21px; font-weight: 700; letter-spacing: -0.5px; color: var(--fg); }
.rec-badge { display: inline-flex; align-items: center; gap: 6px; font: 10px var(--mono); font-weight: 700; letter-spacing: 1.4px; color: #ff9d95; border: 1px solid #58302c; background: #1f1211; border-radius: 6px; padding: 5px 9px; }
.rec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.4s ease-in-out infinite; }

.stage-body {
  position: relative; background: #0c0e0f; border: 1px solid #262b2b; border-radius: 14px;
  min-height: 300px; height: calc(100dvh - 235px); max-height: 680px;
  overflow: hidden; display: grid; grid-template-columns: 1fr minmax(260px, 360px); gap: 0;
}
.stage-slides { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; min-width: 0; }
.stage-slides canvas { max-width: calc(100% - 26px); max-height: calc(100% - 60px); border-radius: 10px; box-shadow: 0 16px 50px rgba(0, 0, 0, 0.65); background: #fff; }
.stage-slide-nav { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; background: rgba(17, 19, 20, 0.88); border: 1px solid #2c312f; border-radius: 9px; padding: 5px 11px; backdrop-filter: blur(8px); z-index: 2; }
.stage-video-wrap {
  position: relative; align-self: end; justify-self: stretch; margin: 12px 12px 12px 0;
  width: min(100%, 360px); aspect-ratio: 4 / 4.2; max-height: calc(100% - 24px);
  border-radius: 12px; border: 1px solid #333a38; background: #141618; overflow: hidden;
}
.stage-video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scaleX(-1);
}
.stage-body.is-camera-only .stage-slides { display: none; }
.stage-body.is-camera-only { grid-template-columns: 1fr; }
.stage-body.is-camera-only .stage-video-wrap { width: min(78vw, 72vh, 720px); aspect-ratio: 16 / 9; margin: 0 auto; align-self: center; justify-self: center; }
.tab-warning { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: #1d180d; border: 1px solid #524322; color: #ecc97f; font-size: 11px; border-radius: 7px; padding: 7px 12px; z-index: 5; }

.timer-track { height: 4px; border-radius: 4px; background: #202526; overflow: hidden; }
#timer-fill { height: 100%; width: 100%; background: var(--lime); transition: width 180ms linear; border-radius: 4px; }

/* ---------- Q&A ---------- */

.qna-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0 12px; }
.qna-head .minihead { margin: 0; }
.qna-status { color: #8d948b; font-size: 13px; display: flex; align-items: center; gap: 9px; }
.qna-status::before { content: ""; width: 13px; height: 13px; border-radius: 50%; border: 2px solid #3a4040; border-top-color: var(--lime); animation: spin 0.9s linear infinite; flex: none; }
.qna-status.is-done::before { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.qna-progress { font: 10px var(--mono); color: var(--lime); letter-spacing: 2px; text-transform: uppercase; margin: 0; }
.qna-card { background: #101213; border: 1px solid #222626; border-radius: 14px; padding: 22px; max-width: 820px; }
.qna-question-text { font-size: clamp(19px, 2.4vw, 26px); line-height: 1.32; font-weight: 700; letter-spacing: -0.6px; margin: 0 0 9px; display: flex; gap: 14px; align-items: flex-start; }
.qna-question-text::before { content: "Q"; font: 12px var(--mono); color: #101408; background: var(--lime); border-radius: 7px; width: 28px; height: 28px; display: grid; place-items: center; flex: none; margin-top: 3px; font-weight: 700; }
.qna-why { color: #848b84; font-size: 11.5px; line-height: 1.5; margin: 0 0 16px; padding-left: 42px; }
.qna-controls { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.qna-rec { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; background: #131617; border: 1px solid #242828; border-radius: 9px; }
.qna-rec-timer { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; }
.qna-eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 20px; flex: 1; max-width: 260px; overflow: hidden; }
.qna-eq i { width: 3px; background: #3c443b; border-radius: 1px; animation: eq 1.2s ease-in-out infinite; display: block; }
.qna-eq i:nth-child(-n+6) { background: var(--lime-dim); }
.qna-eq i:nth-child(3n) { animation-delay: 0.2s; } .qna-eq i:nth-child(4n) { animation-delay: 0.45s; } .qna-eq i:nth-child(5n) { animation-delay: 0.7s; }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 18px; } }
.qna-live { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: #141618; border: 1px solid #242828; color: #9aa19a; font-size: 12px; line-height: 1.6; min-height: 18px; }
.qna-textarea { width: 100%; font-family: inherit; font-size: 13px; line-height: 1.6; background: #141618; color: #d7ddd2; border: 1px solid #2f3535; border-radius: 9px; padding: 13px 14px; outline: none; resize: vertical; }
.qna-textarea:focus { border-color: var(--lime); }
.qna-captured { background: #171a10; border: 1px solid #465424; border-radius: 8px; padding: 11px 13px; font-size: 12px; color: #cbd8a4; line-height: 1.55; }
.qna-captured strong { color: var(--lime); font-weight: 650; }

/* ---------- report ---------- */

.report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-top: 18px; }
.report-overall { min-width: 200px; }
.report-overall .minihead { margin-bottom: 6px; }
.big-score { font-family: var(--font); font-size: 54px; font-weight: 800; letter-spacing: -2.5px; line-height: 1; color: var(--lime); }
.big-score small { font-size: 15px; color: #848b84; font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 8px; }
.score-card { background: #101213; border: 1px solid #202424; border-radius: 10px; padding: 13px 14px; }
.score-card .score-label { color: #8d948b; font: 9.5px var(--mono); letter-spacing: 1.4px; text-transform: uppercase; }
.score-card .score-value { font-size: 26px; font-weight: 750; letter-spacing: -1px; margin: 6px 0 2px; color: var(--fg); }
.score-card .score-value.is-na { color: #707770; font-size: 13px; letter-spacing: 0; }
.score-card .score-bar { height: 5px; border-radius: 4px; background: #232828; overflow: hidden; margin: 8px 0; }
.score-card .score-bar > div { height: 100%; background: var(--lime); border-radius: 4px; }
.score-card .score-evidence { font-size: 10.5px; color: #848b84; line-height: 1.5; }
.score-card .score-weight { color: #667067; font-size: 9px; margin-top: 6px; font-family: var(--mono); letter-spacing: 1px; }
.report-summary { font-size: 13.5px; line-height: 1.6; color: #c2c9c2; margin: 2px 0 10px; max-width: 780px; }
.report-notes { color: #b9c291; font-size: 11.5px; line-height: 1.6; margin: 6px 0 18px; max-width: 780px; background: #171a10; border: 1px solid #333d1d; border-radius: 9px; padding: 11px 13px; }
.report-h3 { font: 10.5px var(--mono); letter-spacing: 2px; text-transform: uppercase; color: var(--lime); margin: 22px 0 10px; }
.report-highlights, .report-qna { display: flex; flex-direction: column; gap: 8px; max-width: 780px; }
.highlight-card, .ans-card { background: #141618; border: 1px solid #242828; border-radius: 9px; padding: 12px 14px; }
.highlight-card .hl-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 6px; }
.time-chip { font-family: var(--mono); font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--lime); background: transparent; border: 1px solid #465424; border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.time-chip:hover { background: #171a10; }
.highlight-card .hl-title { font-weight: 600; font-size: 12.5px; }
.highlight-card .hl-text { color: #939a93; font-size: 11.5px; line-height: 1.6; margin: 0; }
.ans-card .ans-q { font-weight: 600; font-size: 12px; line-height: 1.5; margin: 0 0 6px; }
.ans-card .ans-meta { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ans-transcript { display: inline-block; }
.ans-transcript summary { cursor: pointer; list-style: none; }
.ans-transcript summary::-webkit-details-marker { display: none; }
.ans-transcript summary::after { content: " +"; }
.ans-transcript[open] summary::after { content: " −"; }
.ans-card .ans-spoken { color: #c2c9c2; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 2px; max-width: 680px; }
.ans-card .ans-note { color: #939a93; font-size: 11px; line-height: 1.55; margin: 0; }
.report-player { margin-top: 18px; max-width: 780px; }
#report-video { width: 100%; max-height: 320px; border-radius: 10px; border: 1px solid #2a2f2f; background: #000; }
#report-audio { width: 100%; }
.report-video-frame { position: relative; }
.report-video-frame video { display: block; object-fit: contain; }
#report-landmarks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.review-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
#stage-transcript, #qna-live { max-height: 10em; overflow-y: auto; }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.review-actions .file-btn { text-decoration: none; }
.review-actions [aria-pressed="true"] { color: var(--lime); border-color: var(--lime); }
.review-actions button:disabled { opacity: .55; cursor: default; }
#uploaded-script summary { cursor: pointer; }

/* ---------- Battle ---------- */

.battle-hero-card { background: var(--lime); border-radius: 14px; padding: 24px; color: #101408; }
.battle-hero-card .battle-rules { margin: 0 0 16px; }
.battle-hero-card .battle-rules li { background: rgba(16, 20, 8, 0.10); border-color: rgba(16, 20, 8, 0.16); color: #1c2408; }
.battle-hero-card .battle-rules li::before { background: rgba(16, 20, 8, 0.14); color: #101408; }
.battle-hero-card .battle-rules li strong { color: #101408; }
.battle-hero-card .btn { background: #101408; border-color: #101408; color: var(--lime); min-height: 46px; padding: 0 22px; }
.battle-hero-card .btn:hover { filter: brightness(1.15); border-color: #101408; color: var(--lime); }

.battle-rules { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 9px; counter-reset: rule; }
.battle-rules li { counter-increment: rule; display: flex; align-items: flex-start; gap: 11px; background: #141618; border: 1px solid #222626; border-radius: 9px; padding: 11px 13px; color: #b8bfb7; font-size: 12px; line-height: 1.55; }
.battle-rules li::before { content: counter(rule, decimal-leading-zero); font: 10px var(--mono); background: #1f2424; padding: 5px 7px; border-radius: 5px; color: #d8ded6; flex: none; margin-top: 1px; }
.battle-rules li strong { color: var(--fg); font-weight: 600; }
.steps-list { counter-reset: step; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.steps-list li { counter-increment: step; display: flex; gap: 11px; font-size: 12px; color: #a7aea7; line-height: 1.5; }
.steps-list li::before { content: counter(step); font: 10px var(--mono); width: 20px; height: 20px; border-radius: 50%; border: 1px solid #363c3b; color: #c2c9c1; display: grid; place-items: center; flex: none; }
.steps-list li strong { color: var(--fg); font-weight: 600; }

.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.55; margin: 0 0 11px; color: #b8bfb7; cursor: pointer; }
.check-row input { margin-top: 3px; accent-color: var(--lime); width: 14px; height: 14px; }
.battle-self-wrap { margin: 14px 0 8px; }
.battle-self { width: 100%; max-width: 560px; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 12px; border: 1px solid #333a38; background: #141618; transform: scaleX(-1); pointer-events: none; }

.battle-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.battle-tile { position: relative; background: #101213; border: 1px solid #262b2b; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 11; }
.battle-tile::after { content: ""; position: absolute; inset: auto 0 0; height: 64px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); pointer-events: none; }
.battle-video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.battle-tile .pill { position: absolute; left: 12px; bottom: 12px; z-index: 1; background: rgba(16, 19, 20, 0.8); backdrop-filter: blur(6px); }
.battle-tile .pill.is-ok { color: var(--lime); border-color: #465424; }
.battle-hud { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 10px; }
.battle-clock { font-family: var(--mono); font-size: clamp(30px, 4.4vw, 46px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -2px; color: var(--lime); margin: 0; background: #101408; border: 1px solid #465424; border-radius: 10px; padding: 6px 16px; }
.battle-round { color: #8d948b; font: 10.5px var(--mono); letter-spacing: 2px; text-transform: uppercase; }

.circlemotion {
  height: 168px; width: 168px; border: 1px solid #333a29; border-radius: 50%;
  margin: 10px auto 26px; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle, rgba(222, 243, 169, 0.06), transparent 65%);
}
.circlemotion::before { content: ""; position: absolute; inset: -20px; border: 1px solid #232a1a; border-radius: 50%; }
.circlemotion::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(222, 243, 169, 0.5) 40deg, transparent 90deg);
  -webkit-mask: radial-gradient(circle, transparent 74px, #000 75px, #000 77px, transparent 78px);
  mask: radial-gradient(circle, transparent 74px, #000 75px, #000 77px, transparent 78px);
  animation: spin 2.6s linear infinite;
}
.circlemotion span { font-size: 34px; color: var(--lime); }
.centerline { text-align: center; }

.battle-board { width: 100%; border-collapse: collapse; margin: 10px 0 12px; }
.battle-board caption { caption-side: top; text-align: left; color: #8d948b; font: 9.5px var(--mono); letter-spacing: 1.4px; padding-bottom: 9px; text-transform: uppercase; }
.battle-board th, .battle-board td { text-align: left; font-size: 12px; padding: 10px 8px; border-bottom: 1px solid #202424; }
.battle-board th { color: #8d948b; font: 9.5px var(--mono); letter-spacing: 1.4px; text-transform: uppercase; }
.battle-board tr td:first-child { color: var(--lime); font-family: var(--mono); }

/* ---------- legacy hub summary / flow ---------- */

.summary { display: flex; flex-direction: column; gap: 7px; background: var(--surface); border: 1px solid #202424; border-radius: 10px; padding: 15px 17px; font-size: 12.5px; }
.summary .row { display: flex; justify-content: space-between; gap: 16px; }
.summary .row span:first-child { color: var(--muted); }
.summary .row span:last-child { text-align: right; }
.flow-list { margin: 0 0 8px; padding-left: 20px; color: var(--text); font-size: 13.5px; line-height: 1.7; }
.flow-list li { margin-bottom: 7px; }
.flow-list strong { color: var(--lime); font-weight: 600; }

/* ---------- viewer / toast ---------- */

.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(8, 9, 10, 0.94); backdrop-filter: blur(8px); display: flex; flex-direction: column; padding: 16px; }
.viewer-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 12px; }
.viewer-title { font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-stage { flex: 1; display: grid; place-items: center; overflow: hidden; }
.viewer-canvas { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55); background: #fff; }
.viewer-bar { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px 0 4px; }
.viewer-page-label { color: #8d948b; font: 11px var(--mono); min-width: 52px; text-align: center; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #171a10; border: 1px solid #465424; color: #e8f2cf; padding: 10px 15px; border-radius: 9px; font-size: 12px; max-width: 90vw; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55); z-index: 80; }

[hidden] { display: none !important; }
#privacy-info, .account-dialog { width: min(600px, 92vw); max-height: 84dvh; overflow: auto; color: var(--fg); background: #141618; border: 1px solid #414746; border-radius: 14px; padding: clamp(18px, 4vw, 32px); }
#privacy-info::backdrop, .account-dialog::backdrop { background: rgb(0 0 0 / .78); }
#privacy-info .title, .account-dialog .title { font-size: 28px; margin: 0 0 18px; }
#privacy-info h3 { margin: 15px 0 4px; font-size: 15px; }
#privacy-info p { font-size: 13px; line-height: 1.55; color: #c4cbc4; margin: 5px 0; }
.account-dialog { width: min(460px, 92vw); overflow-wrap: anywhere; }
.account-dialog p { font-size: 14px; line-height: 1.55; margin: 10px 0; }
.account-dialog .field, .account-dialog .check-row { margin: 16px 0; }
#privacy-accept, #setup-add-deck { margin-top: 14px; }
#script-method { margin-bottom: 10px; }
#script-text-panel label { display: block; font-size: 12px; margin-bottom: 6px; }
#setup-deck-file { max-width: 100%; }

/* ---------- live face feedback (ported from v1.7.0) ---------- */

.presence-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.challenge-columns { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 24px; margin-top: 18px; }
.challenge-entry { display: grid; gap: 5px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.challenge-entry video { width: 100%; max-height: 240px; background: #050607; border-radius: 6px; }
.challenge-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font: 12px var(--mono); }
#challenge-preview { width: 100%; max-height: 220px; margin: 10px 0; background: #050607; border-radius: 6px; }
@media (max-width: 800px) { .challenge-columns { grid-template-columns: 1fr; } }

.presence-hud {
  position: absolute; top: 14px; left: 12px; z-index: 3;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  max-width: min(320px, calc(100% - 24px)); padding: 10px 12px 11px;
  border-radius: 8px; border: 1px solid rgba(222, 243, 169, 0.45);
  background: rgba(5, 6, 4, 0.9); backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); pointer-events: none;
}
.presence-hud.is-loading, .presence-hud.is-noface, .presence-hud.is-unavailable { border-color: rgba(255, 216, 154, 0.55); }
.presence-hud-state {
  margin: 0; font: 700 11px var(--mono); letter-spacing: 1.4px; line-height: 1.2;
  text-transform: uppercase; color: #f3f5ea; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}
.presence-hud.is-facing .presence-hud-state, .presence-hud.is-smile .presence-hud-state { color: var(--lime); }
.presence-hud.is-away .presence-hud-state, .presence-hud.is-down .presence-hud-state { color: #ffd89a; }
.presence-hud.is-loading .presence-hud-state, .presence-hud.is-noface .presence-hud-state, .presence-hud.is-unavailable .presence-hud-state { color: #ffe7c2; }
.presence-hud-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.presence-hud-metric, .presence-hud-chip {
  display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px;
  border-radius: 999px; border: 1px solid #2f3535;
  font: 700 9.5px var(--mono); letter-spacing: 0.6px; text-transform: uppercase; color: #d7ddd2;
}
.presence-hud-metric { border-color: rgba(222, 243, 169, 0.35); color: var(--lime); background: rgba(222, 243, 169, 0.08); }
.presence-hud-chip.is-smile { border-color: rgba(222, 243, 169, 0.45); color: var(--lime); background: rgba(222, 243, 169, 0.12); }
.presence-hud-chip.is-people { color: #9aa19c; border-color: #2c3131; }
.presence-hud-metric.is-quality { border-color: rgba(222, 243, 169, 0.28); color: #e8eccc; background: rgba(9, 10, 8, 0.35); }
.presence-hud-meter { width: 100%; height: 3px; border-radius: 999px; background: rgba(243, 245, 234, 0.1); overflow: hidden; }
.presence-hud-meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--lime); }

.face-lines-toggle {
  position: absolute; top: 14px; right: 12px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 10px 0 8px;
  border-radius: 10px; border: 1px solid rgba(222, 243, 169, 0.55);
  background: rgba(9, 10, 8, 0.86); color: var(--lime);
  font: 700 10px var(--mono); letter-spacing: 0.6px; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; backdrop-filter: blur(12px);
}
.face-lines-toggle.is-off { border-color: rgba(243, 245, 234, 0.22); background: rgba(243, 245, 234, 0.06); color: #9aa19c; }
.face-lines-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(222, 243, 169, 0.22); }
.face-lines-toggle.is-off .face-lines-dot { background: #8a8d80; box-shadow: none; }

.context-card {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin: 12px 0 0; padding: 12px 14px; border: 1px solid #242929; border-radius: 10px; background: #101213;
}
.context-card-compact { margin: 0 0 2px; }
.context-line { color: #d7ddd2; font-size: 12.5px; line-height: 1.45; }
.context-line strong { font-weight: 650; color: var(--fg); }
.btn-text {
  flex: 0 0 auto; padding: 4px 0; background: none; border: 0;
  color: var(--lime); font-family: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer;
}

/* ---------- responsive shell ---------- */

@media (max-width: 1020px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: sticky; top: 0; z-index: 30;
    flex-direction: row; align-items: center; gap: 3px;
    padding: 9px 12px; border-right: 0; border-bottom: 1px solid #1c1f20; background: rgba(11, 13, 14, 0.94); backdrop-filter: blur(10px);
  }
  .brand { margin: 0 12px 0 4px; font-size: 16px; }
  .brand .dots { transform: scale(0.9); }
  .sidebottom { display: none; }
  .nav { padding: 9px 11px; font-size: 12px; margin: 0; }
  .topbar { padding: 0 16px; min-height: 46px; position: static; }
  .chrome, .concept, .dots3 { display: none; }
  .content { padding: 22px 16px 80px; }
  .spark { display: none; }
  .foot { left: 16px; bottom: 18px; }
  .stage-body { grid-template-columns: 1fr; height: auto; max-height: none; }
  .stage-video-wrap { margin: 0 10px 10px; width: calc(100% - 20px); aspect-ratio: 16 / 9; }
  .battle-stage { grid-template-columns: 1fr; }
}

.battle-judge, .battle-review { margin-top: 18px; max-width: 780px; }
.battle-notepad { margin: 16px 0; max-width: 780px; }
.battle-notepad textarea { display: block; margin-top: 8px; }
.battle-notepad .small { margin: 6px 0 0; }
.battle-notepad summary { cursor: pointer; }
#battle-notes-list time { display: block; margin-top: 14px; color: var(--muted); }
#battle-notes-list p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0; }
.battle-judge fieldset { margin: 12px 0; border: 0; padding: 0; display: grid; grid-template-columns: minmax(110px,1fr) minmax(0,2fr); gap: 12px 18px; }
.battle-judge .battle-clock { display: inline-block; margin-left: .5em; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .battle-judge fieldset { grid-template-columns: 1fr; } }
.battle-judge label { display: grid; gap: 6px; font-size: 13px; }
.battle-judge input { color: inherit; background: #181b1b; border: 1px solid #424747; border-radius: 6px; padding: 8px; width: 100%; }
.battle-review video { display: block; max-width: 100%; max-height: 340px; background: #101213; margin: 8px 0; }
.battle-review .sectiontitle { margin: 20px 0 10px; }
.battle-review .battle-board { width: 100%; }
.battle-review .battle-board :is(td,th) { overflow-wrap: anywhere; vertical-align: top; text-align: left; white-space: pre-wrap; }
.battle-review [role=status] { white-space: pre-wrap; overflow-wrap: anywhere; }
#screen-battle-room.is-solo .battle-stage { grid-template-columns: 1fr; }
.battle-reveal-header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin: -4px 0 18px; padding-bottom: 14px; border-bottom: 1px solid #ffffff25; }
.battle-reveal-brand { display: flex; align-items: center; gap: 8px; font-size: 20px; color: var(--fg); white-space: nowrap; }
.battle-reveal-brand:first-letter { color: var(--lime); }
.battle-reveal-progress { display: flex; justify-content: center; align-items: center; gap: 12px; color: #8c948b; font: 10px var(--mono); letter-spacing: 1px; white-space: nowrap; }
.battle-reveal-progress i { width: 42px; height: 1px; background: #697166; display: block; }
.battle-reveal-progress span.is-done { color: var(--lime); }
.battle-reveal-progress span.is-active { color: #11150d; background: var(--lime); border-radius: 999px; padding: 9px 16px; font-weight: 800; }
.battle-reveal-countdown { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid #3a403c; border-radius: 999px; color: #e9efe4; font-size: 12px; white-space: nowrap; }
.battle-reveal-countdown > span:first-child { color: var(--lime); font-size: 18px; }
.battle-reveal-countdown strong { min-width: 46px; padding: 5px 8px; border-radius: 8px; background: #ff5147; color: white; font: 800 17px var(--mono); text-align: center; }
.battle-reveal-header[hidden] { display: none; }
.battle-stage.battle-reveal-stage { grid-template-columns: minmax(0, 1fr) minmax(420px, 480px) minmax(0, 1fr); align-items: end; gap: 16px; margin: 0; }
.battle-stage.battle-reveal-stage.is-live { grid-template-columns: 1fr 1fr; }
.battle-stage.battle-reveal-stage.is-live #battle-judge-card { display: none; }
.battle-stage.battle-reveal-stage:not(.is-live) #battle-judge-card { display: block; }
.battle-judge-flip { position: relative; width: clamp(420px, 34vw, 480px); aspect-ratio: 626 / 682; perspective: 1000px; outline: none; }
.battle-judge-flip:focus-visible { box-shadow: 0 0 0 3px var(--lime); border-radius: 20px; }
.battle-judge-flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 500ms ease-out; }
.battle-judge-flip.is-flipped .battle-judge-flip-inner { transform: rotateY(180deg); }
.battle-judge-face { position: absolute; inset: 0; overflow: hidden; border-radius: 22px; backface-visibility: hidden; border: 1px solid #def3a9aa; background: #0b0e0c; box-shadow: 0 0 0 1px #def3a946, 0 20px 54px #000b; }
.battle-judge-face--back { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; transform: rotateY(0deg); color: var(--lime); background: radial-gradient(circle at 50% 35%, #283522, #0e120f 62%, #070908); font: 700 18px var(--mono); letter-spacing: 1px; }
.battle-judge-back-mark { font-size: 82px; line-height: 1; color: var(--lime); text-shadow: 0 0 24px #def3a966; }
.battle-judge-back-copy { width: min(86%, 360px); padding: 12px 14px; border: 1px solid #ffffff33; border-radius: 12px; background: #071009cc; text-align: center; }
.battle-judge-back-copy p { margin: 0; }
.battle-judge-back-copy .small { color: #d7dfd0; line-height: 1.45; }
.battle-judge-back-copy a { display: inline-block; margin-top: 8px; color: var(--lime); font-size: 12px; }
.battle-judge-face--front { transform: rotateY(180deg); }
.battle-judge-face--front > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.battle-judge-front-composed { display: grid; grid-template-rows: auto auto auto 1fr; gap: 9px; height: 100%; padding: 32px 26px 24px; background: linear-gradient(180deg, #182019 0%, #0e120f 100%); text-align: center; }
.battle-judge-front-composed .battle-judge-portrait { width: 54%; aspect-ratio: 1; height: auto; margin: 0 auto 6px; border-radius: 50%; }
.battle-judge-card-name { margin: 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -1.4px; line-height: 1; }
.battle-judge-card-role { margin: 0; color: #bbc4b8; font-size: 13px; }
.battle-judge-card-question { margin: 12px 0 0; padding: 18px 14px; border: 1px solid #64715b; border-radius: 13px; color: #f4f7ed; font-size: clamp(17px, 2vw, 24px); line-height: 1.25; font-weight: 700; }
.battle-judge-card-criteria { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; align-self: end; text-align: left; }
.battle-judge-card-criteria > div { min-height: 60px; padding: 13px; border: 1px solid #414a40; border-radius: 11px; color: #dce8ce; font-size: 12px; line-height: 1.35; }
.battle-judge-card-criteria > div::before { content: "◆"; display: block; margin-bottom: 4px; color: var(--lime); font-size: 10px; }
.battle-judge-front-fallback { height: 100%; display: grid; place-items: center; color: var(--lime); font-size: 42px; }
.battle-reveal-tagline { margin: 18px 0 2px; text-align: center; color: #d7dfd0; font-size: 13px; letter-spacing: .4px; }
.battle-reveal-tagline[hidden] { display: none; }
.battle-live-judge-strip { display: flex; align-items: center; gap: 11px; margin: 0 0 12px; padding: 11px 14px; border: 1px solid #303832; border-radius: 11px; background: #121714; color: #dce6d7; }
.battle-live-judge-strip > span:first-child { color: var(--lime); font-size: 20px; }
.battle-live-judge-strip strong { color: var(--lime); }
.battle-live-judge-strip span:last-child { color: #a4afa2; overflow-wrap: anywhere; }
#battle-live-controls[hidden] { display: none; }
.battle-live-reactions { margin: 15px 0 4px; max-width: none; }
.battle-live-reactions h3 { margin: 0 0 10px; }
.battle-live-reaction-compose { display: flex; gap: 9px; margin-top: 10px; }
.battle-live-reaction-compose input { min-width: 0; flex: 1; color: inherit; background: #181b1b; border: 1px solid #424747; border-radius: 8px; padding: 9px 11px; }
.battle-live-reactions .small { margin: 8px 0 0; }
@media (max-width: 1020px) {
  .battle-reveal-header { grid-template-columns: 1fr; justify-items: center; }
  .battle-stage.battle-reveal-stage { grid-template-columns: 1fr; justify-items: center; }
  .battle-stage.battle-reveal-stage.is-live { grid-template-columns: 1fr; }
  .battle-judge-flip { order: -1; }
  .battle-stage.battle-reveal-stage .battle-tile { width: min(100%, 640px); }
}
@media (max-width: 620px) {
  .battle-reveal-progress { gap: 6px; font-size: 8px; letter-spacing: .3px; }
  .battle-reveal-progress i { width: 18px; }
  .battle-reveal-progress span.is-active { padding: 8px 10px; }
  .battle-reveal-countdown { width: 100%; justify-content: space-between; }
  .battle-judge-flip { width: min(calc(100vw - 32px), 360px); }
  .battle-judge-front-composed { padding: 25px 18px 18px; }
  .battle-judge-card-name { font-size: 30px; }
  .battle-judge-card-question { font-size: 17px; }
  .battle-judge-card-criteria > div { padding: 10px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .battle-judge-flip-inner { transition: none; } }
.battle-judge-context { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 14px; border-color: #4f5c45; background: #111711; }
.battle-judge-context-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.battle-judge-portrait { width: 58px; height: 58px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 50%; border: 1px solid #def3a966; background: radial-gradient(circle at 35% 30%, #def3a966, #1b241c 65%, #0b0d0c); color: var(--lime); }
.battle-judge-portrait img { width: 100%; height: 100%; object-fit: cover; }
.battle-judge-portrait span { font: 700 18px var(--mono); letter-spacing: -1px; }
.battle-judge-portrait[data-judge="vivian_lau"] { background: radial-gradient(circle at 35% 30%, #d9b56e, #4b3620 62%, #16100b); color: #ffe1a2; }
.battle-judge-portrait[data-judge="marcus_reed"] { background: radial-gradient(circle at 35% 30%, #90b8ff, #24385e 62%, #0c101b); color: #cfe0ff; }
.battle-judge-portrait[data-judge="mina_park"] { background: radial-gradient(circle at 35% 30%, #f59bc4, #5a263e 62%, #170b11); color: #ffd1e5; }
.battle-judge-context .sectiontitle { margin: 0; }
.battle-judge-context .bodycopy, .battle-judge-context .small { margin: 4px 0 0; }
.battle-judge-context-side { flex: 0 0 220px; text-align: right; }
.battle-judge-context-side strong { color: var(--lime); font: 700 20px var(--mono); }
.battle-judge-context.is-revealing { border-color: var(--lime); box-shadow: 0 0 0 1px #def3a944, 0 10px 28px #0008; }
.battle-mark-moment { margin: 0 0 12px; }
.battle-xp-summary { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 16px; }
.battle-xp-summary .btn strong { color: var(--lime); margin-left: 5px; }
.battle-xp-summary #battle-xp-detail { position: absolute; right: 20px; z-index: 5; margin-top: 104px; min-width: 230px; }
.battle-leaderboard { margin-top: 18px; max-width: 560px; }
.battle-leaderboard ol { margin: 10px 0 0; padding-left: 24px; color: var(--muted); }
.battle-ranked-dashboard { margin: 18px 0; border-color: #4f5c45; background: #111711; }
.battle-ranked-head, .battle-ranked-meta { display: flex; justify-content: space-between; gap: 18px; }
.battle-ranked-judge { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; min-width: 160px; color: var(--muted); text-align: right; }
.battle-ranked-judge strong { color: var(--lime); }
.battle-ranked-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 24px; }
.battle-ranked-player { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; border: 1px solid #303930; border-radius: 10px; background: #0c100d; }
.battle-ranked-score { color: var(--lime); font: 700 32px var(--mono); }
.battle-ranked-criteria { display: grid; gap: 7px; }
.battle-ranked-criterion { border: 1px solid #2f372f; border-radius: 8px; background: #0c100d; }
.battle-ranked-criterion.is-deciding { border-color: var(--lime); }
.battle-ranked-criterion summary { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; cursor: pointer; }
.battle-ranked-criterion summary span { color: var(--lime); font: 700 12px var(--mono); }
.battle-ranked-bars { display: grid; gap: 4px; padding: 0 12px 8px; }
.battle-ranked-bar { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: #293029; }
.battle-ranked-bar i { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.battle-ranked-bar + .battle-ranked-bar i { background: #a7c5ff; }
.battle-ranked-criterion p { margin: 0; padding: 0 12px 11px; }
.battle-ranked-meta { margin-top: 20px; padding-top: 14px; border-top: 1px solid #2a312a; }
.battle-ranked-meta > div { flex: 1; }
.battle-ranked-meta .sectiontitle { margin: 0; }
.battle-ranked-reaction { margin-top: 18px; }
.battle-ranked-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #2a312a; }
@media (max-width: 620px) { .battle-judge-context, .battle-ranked-head, .battle-ranked-meta { align-items: flex-start; flex-direction: column; }.battle-judge-context-side, .battle-ranked-judge { min-width: 0; text-align: left; align-items: flex-start; }.battle-ranked-players { grid-template-columns: 1fr; }.battle-xp-summary { justify-content: flex-start; }.battle-xp-summary #battle-xp-detail { left: 16px; right: auto; } }

/* ---------- home mode carousel ---------- */

body.home-screen {
  background: linear-gradient(180deg, rgba(8, 10, 10, .26), rgba(8, 10, 10, .56) 48%, rgba(8, 10, 10, .88)),
    url("./assets/home-stage-background.jpeg") center 54% / cover fixed no-repeat, #101313;
}
.mode-hero { position: relative; isolation: isolate; left: 50%; width: calc(100vw - 204px); height: calc(100dvh - 54px); margin: -36px 0 34px; transform: translateX(-50%); overflow: hidden; background: #151a17; pointer-events: none; }
.mode-hero.is-transition-covered { visibility: hidden; }
.mode-hero-photo, .mode-hero-wash { position: absolute; inset: 0; }
.mode-hero-photo { z-index: -2; background-position: center 44%; background-size: cover; transform: scale(1.015); }
.mode-hero-wash, .carousel-wash { background: linear-gradient(180deg, #080b0b18 0%, #080b0b08 28%, #080b0b38 52%, #080b0bf2 100%), linear-gradient(105deg, #10161366, transparent 70%); }
.mode-hero-wash { z-index: -1; }
.mode-hero-content { position: absolute; left: max(28px, calc((100% - 760px) / 2)); right: 24px; bottom: 34px; max-width: 760px; }
.mode-hero-tag, .mode-hero-series { color: #e5ebdf; font: 9px var(--mono); letter-spacing: 1px; }
.mode-hero-tag { margin: 0 0 12px; }
.mode-hero-title { color: #fff; font-size: clamp(40px, 6vw, 76px); line-height: 1; margin: 0; }
.mode-title-flight { position: fixed; z-index: 10001; margin: 0; overflow: visible; white-space: nowrap; pointer-events: none; }
.mode-hero-series { margin: 12px 0 0; color: #ffffffc9; }
.home-carousel { margin-top: 8px; max-width: 1040px; }
.carousel-viewport { height: 440px; position: relative; overflow: hidden; perspective: 1900px; perspective-origin: 50% 43%; cursor: grab; touch-action: pan-y; outline: none; user-select: none; }
.carousel-viewport:focus-visible { outline: 1px solid #def3a9a8; outline-offset: -3px; }
.carousel-viewport:active { cursor: grabbing; }
.carousel-ring { position: absolute; inset: 0; transform-style: preserve-3d; }
.carousel-card { --card-tint: #def3a9; position: absolute; top: 50%; left: 50%; width: clamp(208px, 24vw, 246px); height: 344px; padding: 0; margin: 0; display: block; overflow: hidden; text-align: left; color: #f3f5f0; cursor: pointer; backface-visibility: hidden; border: 1px solid #e6efe1a8; border-radius: 7px; background: #181d1a; transform: translate3d(calc(-50% + var(--x, 0px)), -50%, var(--z, 0px)) scale(var(--scale, 1)); transform-style: preserve-3d; opacity: var(--opacity, 1); filter: brightness(var(--brightness, 1)); transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .4s, filter .4s, box-shadow .4s; box-shadow: 0 18px 44px #0009, inset 0 0 0 3px #0a0b0c99; }
.carousel-card.is-front { --scale: 1.02; z-index: 30 !important; box-shadow: 0 0 0 1px #def3a966, 0 0 36px #def3a92b, 0 26px 54px #000b, inset 0 0 0 3px #0a0b0c99; }
.carousel-card:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.carousel-ring.is-dragging .carousel-card { transition: none; }
.carousel-card.is-opening { border-radius: 0; opacity: 1; filter: none; transition: none; }
.carousel-photo, .carousel-wash, .carousel-frame { position: absolute; inset: 0; display: block; border-radius: 6px; }
.carousel-photo { background-position: center; background-size: cover; filter: saturate(.84); }
.photo-pre { background-image: url("https://images.unsplash.com/photo-1475721027785-f74eccf877e2?auto=format&fit=crop&w=850&q=85"); }
.photo-live { background-image: url("https://images.unsplash.com/photo-1521737711867-e3b97375f902?auto=format&fit=crop&w=850&q=85"); }
.photo-post { background-image: url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=850&q=85"); }
.photo-battle { background-image: url("https://images.unsplash.com/photo-1515169067868-5387ec356754?auto=format&fit=crop&w=850&q=85"); }
.photo-slides { background-image: url("./assets/create-deck-4k.webp"); background-position: center 46%; }
.photo-videos { background-image: url("./assets/create-video-4k.webp"); background-position: center 48%; }
.carousel-frame { background: none; }
.carousel-frame::after { content: ""; position: absolute; inset: 5px; border: 1px solid #ffffff52; border-radius: 3px; pointer-events: none; }
.carousel-topline, .carousel-bottomline { position: absolute; z-index: 2; left: 17px; right: 17px; display: flex; justify-content: space-between; gap: 12px; color: #ffffffd9; font: 8px var(--mono); letter-spacing: 1px; text-shadow: 0 1px 6px #000; }
.carousel-topline { top: 17px; }
.carousel-bottomline { bottom: 16px; color: #ffffffc7; font-size: 7px; }
.carousel-card-icon { position: absolute; top: 57px; right: 19px; z-index: 2; width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #ffffff9e; border-radius: 50%; background: #10151370; color: #fff; backdrop-filter: blur(8px); font: 9px var(--mono); }
.carousel-copy { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 45px; display: flex; flex-direction: column; align-items: flex-start; }
.carousel-tag { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: #f0f4ec; font: 8px var(--mono); letter-spacing: 1px; text-shadow: 0 1px 8px #111; }
.carousel-tag i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px #def3a9a8; }
.carousel-title { color: #fff; font-size: clamp(23px, 2.5vw, 28px); font-weight: 600; line-height: 1.1; text-shadow: 0 2px 14px #000a; }
.carousel-series { margin-top: 8px; color: #ffffffc9; font: 8px var(--mono); letter-spacing: 1px; }
.carousel-side-fade { position: absolute; z-index: 5; top: 0; bottom: 0; width: 10%; pointer-events: none; }
.carousel-side-fade-left { left: 0; }.carousel-side-fade-right { right: 0; }
.carousel-controls { position: relative; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 15px; margin-top: -7px; }
.carousel-arrow { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #ffffff35; border-radius: 50%; background: #ffffff08; color: #e3e8dd; font: 20px var(--font); cursor: pointer; }
.carousel-arrow:hover, .carousel-arrow:focus-visible { color: var(--lime); border-color: var(--lime); background: #def3a914; }
.carousel-pagination { display: flex; align-items: center; gap: 7px; }
.carousel-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 8px; background: #687067; cursor: pointer; }
.carousel-dot.is-active { width: 22px; background: var(--lime); box-shadow: 0 0 10px #def3a95c; }
.carousel-dot:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.carousel-position { min-width: 48px; color: #777f77; font: 9px var(--mono); }.carousel-position strong { color: #e5eadf; font-weight: 500; }
.carousel-footer { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 12px; margin-top: 21px; padding: 17px 0 8px; border-top: 1px solid #ffffff1c; }
.carousel-hint, .carousel-footer-note, .carousel-open { color: #929a91; font: 8px var(--mono); letter-spacing: 1px; }
.carousel-hint { display: flex; align-items: center; gap: 9px; }.carousel-hint span { color: var(--lime); font-size: 11px; }
.carousel-footer-note { justify-self: center; text-align: center; color: #707970; }
.carousel-open { justify-self: end; display: inline-flex; align-items: center; gap: 10px; padding: 8px 0; border: 0; border-bottom: 1px solid #def3a977; background: none; color: #dbe4cf; cursor: pointer; }
.carousel-open span { color: var(--lime); font: 15px var(--font); }
.home-quick-links { display: flex; justify-content: center; gap: 16px; margin-top: 14px; }
.home-quick-links button { border: 0; border-bottom: 1px solid #ffffff30; padding: 5px 0; background: none; color: #9aa39a; cursor: pointer; font: 10px var(--mono); letter-spacing: .5px; }
.home-quick-links button:hover, .home-quick-links button:focus-visible { color: var(--lime); border-color: var(--lime); }
.home-preview { position: fixed; inset: 0; z-index: 10010; display: grid; place-items: center; padding: 24px; background: #050706e8; backdrop-filter: blur(8px); }
.home-preview[hidden] { display: none; }
.home-preview-shell { width: min(1080px, 100%); max-height: calc(100dvh - 48px); overflow: auto; border: 1px solid #ffffff38; border-radius: 14px; background: #101413; box-shadow: 0 24px 90px #000b; }
.home-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 16px; }
.home-preview-head .eyebrow, .home-preview-head .title, .home-preview-head .subtitle { margin: 0; }
.home-preview-head .title { margin-top: 5px; }
.home-preview-head .subtitle { margin-top: 8px; color: var(--lime); font: 11px var(--mono); letter-spacing: .8px; text-transform: uppercase; }
.home-preview-image { display: block; width: 100%; max-height: calc(100dvh - 190px); object-fit: contain; background: #080b0b; }
body.home-preview-open { overflow: hidden; }
@media (max-width: 700px) { .home-carousel { margin-top: 4px; }.carousel-viewport { height: 386px; }.carousel-card { width: min(226px, calc(100vw - 104px)); height: 318px; }.carousel-controls { gap: 10px; }.carousel-footer { grid-template-columns: 1fr auto; margin-top: 15px; }.carousel-footer-note { display: none; } }
@media (max-width: 520px) { .home-quick-links { gap: 10px; flex-wrap: wrap; }.home-quick-links button { font-size: 9px; } }
@media (max-width: 600px) { .mode-hero { width: 100vw; height: calc(100dvh - 100px); margin-top: -22px; margin-bottom: 26px; }.mode-hero-content { left: 20px; right: 20px; bottom: 24px; }.mode-hero-title { font-size: 46px; } }
@media (prefers-reduced-motion: reduce) { .carousel-card, .carousel-arrow, .carousel-dot { transition-duration: .01ms; }.carousel-card.is-opening, .carousel-card.is-opening * { transition-duration: .01ms !important; } }

/* History is intentionally scoped so the requested white/red surface does not
   change the existing dark practice, meeting, or Battle screens. */
.history-screen { max-width: none; min-height: 720px; padding: 18px 0 48px; color: var(--fg); background: var(--bg); overflow: hidden; }
.history-wave { position: absolute; inset: -40px -80px auto; height: 190px; pointer-events: none; opacity: .7; background: radial-gradient(82% 130% at 72% 0%, rgba(222, 243, 169, .16), transparent 62%), radial-gradient(68% 120% at 35% 0%, rgba(222, 243, 169, .08), transparent 68%), linear-gradient(166deg, transparent 48%, rgba(222, 243, 169, .22) 49%, transparent 53%); clip-path: ellipse(68% 72% at 56% 0%); }
.history-screen > :not(.history-wave) { position: relative; z-index: 1; }
.history-title { margin: 52px 34px 0; color: var(--fg); font-size: clamp(38px, 5vw, 60px); letter-spacing: -2.6px; line-height: 1; font-weight: 800; }
.history-subtitle { margin: 13px 34px 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.history-toolbar { display: flex; align-items: center; gap: 14px; margin: 34px 34px 14px; flex-wrap: wrap; }
.history-search { min-width: min(360px, 100%); flex: 1 1 280px; display: flex; align-items: center; gap: 9px; padding: 0 14px; height: 44px; border: 1px solid var(--edge2); border-radius: 999px; background: var(--surface); box-shadow: 0 7px 20px rgba(0, 0, 0, .2); color: var(--lime); }
.history-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--fg); font: inherit; background: transparent; }
.history-search input::placeholder { color: var(--muted); }
.history-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.history-filter { min-height: 38px; padding: 0 14px; border: 1px solid var(--edge2); border-radius: 999px; background: var(--surface); color: var(--fg); cursor: pointer; font: 600 12px var(--font); }
.history-filter.is-active { border-color: var(--lime); background: var(--lime); color: #101408; box-shadow: 0 8px 18px rgba(222, 243, 169, .16); }
.history-filter::before { display: inline-block; margin-right: 7px; color: var(--lime); font-size: 15px; line-height: 0; vertical-align: -1px; }
.history-filter.is-active::before { color: #101408; }
.history-filter:nth-child(1)::before { content: "▱"; }
.history-filter:nth-child(2)::before { content: "▤"; }
.history-filter:nth-child(3)::before { content: "▣"; }
.history-filter:nth-child(4)::before { content: "♜"; }
.history-status-line { min-height: 20px; margin: 0 34px 10px; color: var(--muted); font-size: 12px; }
.history-table-wrap { margin: 0 34px; overflow-x: auto; border: 1px solid var(--edge); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 32px rgba(0, 0, 0, .24); }
.history-table { width: 100%; min-width: 900px; border-collapse: collapse; color: var(--fg); }
.history-table th { padding: 13px 14px; background: var(--surface2); color: var(--muted); text-align: left; font: 700 10px var(--mono); letter-spacing: .9px; text-transform: uppercase; white-space: nowrap; }
.history-table td { padding: 16px 14px; border-top: 1px solid var(--edge); vertical-align: middle; font-size: 12px; }
.history-table tbody tr:hover { background: #141817; }
.history-activity { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.history-activity strong { color: var(--fg); font-size: 13px; }
.history-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #182012; color: var(--lime); font-size: 15px; flex: none; }
.history-type { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: var(--surface2); color: var(--fg); white-space: nowrap; font-size: 10px; font-weight: 700; }
.history-table td:nth-child(3) span, .history-table td:nth-child(3) small { display: block; white-space: nowrap; }
.history-table td:nth-child(3) small { margin-top: 3px; color: var(--muted); }
.history-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.history-status.completed { background: #e8f7eb; color: #2e8b4d; }
.history-status.processing { background: #fff3dc; color: #a86d14; }
.history-status.failed { background: #fdeceb; color: #b24642; }
.history-status.draft { background: #f3f0f0; color: #756b6b; }
.history-summary { min-width: 190px; max-width: 280px; }
.history-summary strong, .history-summary span { display: block; }
.history-summary strong { color: var(--fg); font-size: 13px; }
.history-summary span { margin-top: 3px; color: var(--muted); line-height: 1.4; }
.history-menu { margin-left: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
.history-empty { margin: 0; padding: 40px 20px; text-align: center; color: var(--muted); }
@media (max-width: 760px) { .history-screen { margin: -22px -16px -80px; padding-bottom: 80px; } .history-title, .history-subtitle, .history-toolbar, .history-status-line { margin-left: 18px; margin-right: 18px; } .history-table-wrap { margin: 0 18px; } }
