/* Oracle. The same calm design as Pitboss (its colours, type, controls and sign-in screen), with Oracle's own layout: the steps on the
   left, the step in the middle, the game card on the right. Light and dark follow the device unless the person picks one. */
:root {
  color-scheme: light;
  --page: #f6f6f3; --surface: #fcfcfb; --surface-2: #f1f0ec; --side: #efeee9; --hover: rgba(11, 11, 11, .045); --press: rgba(11, 11, 11, .08);
  --ink: #0b0b0b; --ink-2: #52514e; --muted: #7c7a74; --line: #e1e0d9; --line-2: #ecebe5; --axis: #c3c2b7; --ring: rgba(11, 11, 11, .10);
  --accent: #2a78d6; --accent-ink: #1c5cab; --accent-soft: #e6effb; --on-accent: #fff;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --good: #0ca30c; --good-ink: #006300; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b; --info: #6a7f99;
  --shadow: 0 1px 2px rgba(11, 11, 11, .04), 0 2px 8px rgba(11, 11, 11, .04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0f0f0e; --surface: #1a1a19; --surface-2: #222220; --side: #141413; --hover: rgba(255, 255, 255, .05); --press: rgba(255, 255, 255, .09);
    --ink: #f0efec; --ink-2: #c3c2b7; --muted: #8f8d86; --line: #2c2c2a; --line-2: #252523; --axis: #383835; --ring: rgba(255, 255, 255, .10);
    --accent: #3987e5; --accent-ink: #86b6ef; --accent-soft: #17283d; --on-accent: #fff;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --good-ink: #0ca30c; --info: #8ea3bd; --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0f0f0e; --surface: #1a1a19; --surface-2: #222220; --side: #141413; --hover: rgba(255, 255, 255, .05); --press: rgba(255, 255, 255, .09);
  --ink: #f0efec; --ink-2: #c3c2b7; --muted: #8f8d86; --line: #2c2c2a; --line-2: #252523; --axis: #383835; --ring: rgba(255, 255, 255, .10);
  --accent: #3987e5; --accent-ink: #86b6ef; --accent-soft: #17283d; --on-accent: #fff;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --good-ink: #0ca30c; --info: #8ea3bd; --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 650; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 650; margin: 0; }
h3 { font-size: 13px; font-weight: 650; margin: 0 0 8px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
p { margin: 0 0 10px; } small, .muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---- shell: steps | the step | the game card */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.work { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; min-width: 0; }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 18px 12px 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { font-size: 17px; letter-spacing: -.01em; } .brand span { display: block; font-size: 12px; color: var(--muted); line-height: 1.2; }
.nav-label { font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 520; }
.nav a:hover { background: var(--hover); text-decoration: none; color: var(--ink); }
.nav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 650; min-width: 22px; height: 20px; border-radius: 10px; display: inline-grid; place-items: center; padding: 0 6px; background: var(--surface-2); color: var(--ink-2); }
.steps a { align-items: flex-start; }
.steps .dot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1.5px solid var(--axis); color: var(--ink-2); margin-top: 1px; }
.steps .done .dot { background: var(--good); border-color: var(--good); color: #fff; }
.steps .done .dot svg { width: 13px; height: 13px; opacity: 1; }
.steps a[aria-current="page"] .dot { border-color: var(--accent); color: var(--accent-ink); }
.steps .done[aria-current="page"] .dot { color: #fff; }
.steps small { display: block; font-size: 12px; line-height: 1.3; color: var(--muted); font-weight: 400; }
.side-foot { margin-top: auto; padding: 14px 10px 0; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.side-foot b { color: var(--ink-2); font-weight: 600; } .side-foot a { display: inline-block; margin-top: 6px; margin-right: 12px; }
.main { min-width: 0; padding: 26px 34px 60px; max-width: 980px; width: 100%; }
.shell.wide .main { max-width: 1280px; }
.topbar { display: none; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head p { margin: 4px 0 0; color: var(--ink-2); }
.head > div:first-child { flex: 1 1 380px; min-width: 0; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.saved { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.saved.bad { color: var(--critical); font-weight: 560; }
.pager-steps { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.step-pills { display: none; }

/* ---- controls */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 11px; border-radius: 7px; color: var(--ink-2); cursor: pointer; font-weight: 520; min-height: 32px; white-space: nowrap; }
.seg button:hover { color: var(--ink); background: var(--hover); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
select, input[type=text], input[type=password], input[type=number], input[type=search], textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-height: 38px; min-width: 0; width: 100%; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[disabled], select[disabled], textarea[disabled] { opacity: .65; }
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 30px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { font-size: 12.5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 8px; min-height: 38px; cursor: pointer; font-weight: 560; color: var(--ink); white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; } .btn:active { background: var(--press); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); } .btn.primary:hover { filter: brightness(1.06); }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 13.5px; }
.btn.quiet { border-color: transparent; background: none; color: var(--accent-ink); } .btn.quiet:hover { background: var(--hover); }
.btn[disabled] { opacity: .5; cursor: default; } .btn[disabled]:hover { background: var(--surface); }
.btn svg { width: 16px; height: 16px; }
.icon-btn { border: 0; background: none; width: 40px; height: 40px; border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--hover); } .icon-btn svg { width: 20px; height: 20px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 32px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .tr { width: 38px; height: 22px; border-radius: 11px; background: var(--axis); position: relative; flex: none; transition: background .15s; }
.switch .tr::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.switch input:checked + .tr { background: var(--accent); } .switch input:checked + .tr::after { transform: translateX(16px); }
.switch input:focus-visible + .tr { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 4px 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
details.more { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 4px; }
details.more > summary { cursor: pointer; color: var(--accent-ink); font-weight: 560; padding: 10px 0; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; } details.more[open] > summary::before { content: "– "; }

/* ---- cards and blocks */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card > .ch { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 18px 6px; flex-wrap: wrap; }
.card > .ch p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.card > .cb { padding: 8px 18px 18px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.note { background: var(--surface-2); border-radius: 8px; padding: 10px 14px; color: var(--ink-2); font-size: 13.5px; }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.err { color: var(--critical); font-size: 13.5px; font-weight: 560; } .ok { color: var(--good-ink); font-size: 13.5px; font-weight: 560; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.on { background: var(--accent-soft); color: var(--accent-ink); }
.badge.good { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good-ink); }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--ink); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.status.good::before { background: var(--good); } .status.warning::before { background: var(--warning); } .status.critical::before { background: var(--critical); border-radius: 2px; transform: rotate(45deg); }
.status.info::before { background: var(--info); } .status.todo::before { background: transparent; border: 2px solid var(--muted); width: 7px; height: 7px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 9px 14px; color: var(--ink-2); font-weight: 560; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; }
.tabs button:hover { color: var(--ink); } .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- the games list */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.game { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; text-align: left; padding: 0; color: inherit; }
.game:hover { border-color: var(--axis); }
.cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); display: grid; place-items: center; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover b { font-size: 34px; font-weight: 700; color: var(--accent-ink); letter-spacing: .02em; opacity: .7; }
.game .gb { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.game h2 { font-size: 16px; }
.progress-dots { display: flex; gap: 5px; margin-top: 6px; }
.progress-dots i { width: 18px; height: 5px; border-radius: 3px; background: var(--line); }
.progress-dots i.on { background: var(--good); }

/* ---- step 2: game types */
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.type { position: relative; text-align: left; cursor: pointer; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); }
.type:hover { border-color: var(--axis); }
.type[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.type .rank { position: absolute; top: 12px; right: 14px; font-size: 12px; color: var(--muted); font-weight: 600; }
.type p { font-size: 13.5px; color: var(--ink-2); margin: 0; }
.type .meta { font-size: 12.5px; color: var(--muted); }
.minigrid { display: grid; gap: 3px; width: max-content; padding: 6px; background: var(--surface-2); border-radius: 8px; }
.minigrid i { width: 11px; height: 11px; border-radius: 3px; background: var(--axis); }
.type[aria-pressed="true"] .minigrid i { background: var(--accent); opacity: .75; }

/* ---- step 3: features */
.fgroup { margin-bottom: 22px; }
.feature { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; padding: 11px 0; border-top: 1px solid var(--line-2); align-items: start; }
.feature:first-of-type { border-top: 0; }
.feature .fn { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.feature p { margin: 2px 0 0; color: var(--ink-2); font-size: 13.5px; }
.feature .extra { grid-column: 2; display: grid; gap: 10px; margin-top: 6px; max-width: 520px; }
.divider { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 14px 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 4px 12px; cursor: pointer; font-size: 13.5px; font-weight: 520; color: var(--ink-2); min-height: 32px; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

/* ---- step 4: maths */
.target { display: grid; grid-template-columns: 170px minmax(0, 1fr) 110px; gap: 6px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.target:first-child { border-top: 0; }
.target .tl { font-weight: 600; } .target .tl small { display: block; font-weight: 400; font-size: 12.5px; }
.target .tv { font-variant-numeric: tabular-nums; font-weight: 650; text-align: right; font-size: 16px; }
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fig { padding: 12px 14px; background: var(--surface-2); border-radius: 9px; }
.fig .label { font-size: 12.5px; color: var(--ink-2); font-weight: 560; }
.fig .value { font-size: 22px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.fig .sub { font-size: 12.5px; color: var(--muted); }
.split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--surface); margin: 8px 0 6px; }
.split i { display: block; height: 100%; }
.split .s1 { background: var(--s1); } .split .s2 { background: var(--s2); } .split .s3 { background: var(--s3); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.s1 { background: var(--s1); } .legend i.s2 { background: var(--s2); } .legend i.s3 { background: var(--s3); }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- step 5: briefs */
.brief { border-top: 1px solid var(--line-2); padding: 14px 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
.brief:first-child { border-top: 0; }
.brief .thumb { width: 96px; height: 96px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 11px; text-align: center; padding: 4px; }
.brief .thumb img { width: 100%; height: 100%; object-fit: contain; }
.brief .bt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brief .bt b { font-family: var(--mono); font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.brief .text { color: var(--ink-2); font-size: 13.5px; margin: 6px 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.brief .text.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.brief .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.brief audio { width: 100%; max-width: 360px; height: 36px; margin-top: 6px; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.brief .take { display: flex; align-items: center; gap: 10px; } .brief .take .muted { font-size: 12.5px; min-width: 46px; } .brief .take audio { margin-top: 4px; }
.brief .err { margin: 6px 0; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 8px 0 10px; }
.option { margin: 0; padding: 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); display: grid; gap: 6px; }
.option.chosen { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.option img { width: 100%; aspect-ratio: 2 / 3; object-fit: contain; background: repeating-conic-gradient(var(--line-2) 0% 25%, transparent 0% 50%) 50% / 16px 16px; border-radius: 6px; }
.option figcaption { display: grid; gap: 6px; font-size: 13px; } .option figcaption .btn { width: 100%; }
.brief .thumb img { background: repeating-conic-gradient(var(--line-2) 0% 25%, transparent 0% 50%) 50% / 12px 12px; }
/* a picture opens large when clicked: the small one is a button, the large one a full-window viewer */
.zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 6px; position: relative; }
.zoom:hover img { filter: brightness(1.06); } .zoom:hover::after, .zoom:focus-visible::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px; border-radius: 6px; background: rgba(11, 11, 11, .72)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4.5-4.5M11 8.5v5M8.5 11h5'/%3E%3C/svg%3E") center / 15px no-repeat; }
.option .zoom { height: auto; }
.brief .take .btn { margin-top: 4px; flex: none; }
.viewer { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto minmax(0, 1fr); background: rgba(11, 11, 11, .88); color: #fff; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
.viewer-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; } .viewer-name b { font-family: var(--mono); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; } .viewer-name .muted { font-size: 13px; }
.viewer-bar .acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.viewer-stage { display: grid; place-items: center; padding: 16px; min-height: 0; overflow: auto; cursor: zoom-out; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: default; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  background: repeating-conic-gradient(#8a8a86 0% 25%, #a6a6a1 0% 50%) 50% / 24px 24px; }
body.viewing { overflow: hidden; }
.batch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin: 12px 0 4px; background: var(--surface-2); border-radius: 10px; font-size: 13.5px; }
.voices { margin: 14px 0 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.voices > h3 { margin: 0 0 4px; }
.voice { padding: 12px 0; border-top: 1px solid var(--line-2); display: grid; gap: 10px; } .voice:first-of-type { border-top: 0; }
.vhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; } .vhead .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.preview { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); } .preview audio { width: 100%; height: 36px; }
.vlist { display: grid; gap: 2px; max-height: 360px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 10px; }
.vitem { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px) auto; gap: 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line-2); } .vitem:first-child { border-top: 0; }
.vitem audio { width: 100%; height: 34px; }
@media (max-width: 640px) { .vitem { grid-template-columns: minmax(0, 1fr) auto; } .vitem audio { grid-column: 1 / -1; grid-row: 2; } }
.uploader { border: 1.5px dashed var(--axis); border-radius: 10px; padding: 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.uploader img { width: 200px; max-width: 100%; border-radius: 8px; display: block; }
.uploader.drag { border-color: var(--accent); background: var(--accent-soft); }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* ---- step 6 */
.frames { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-end; }
/* step 6: the draft playing in a frame, as a phone or as a desktop */
.playbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.playbox { display: grid; place-items: center; background: var(--surface-2); border-radius: 14px; padding: 18px; min-height: 240px; }
.playbox iframe { border: 0; display: block; background: #000; }
.playbox.phone iframe { width: 390px; max-width: 100%; height: 780px; max-height: 82vh; border-radius: 30px; box-shadow: 0 0 0 9px #16181d, 0 12px 40px rgba(0, 0, 0, .3); }
.playbox.desk { padding: 12px; } .playbox.desk iframe { width: 100%; max-width: 1180px; aspect-ratio: 16 / 9; border-radius: 10px; box-shadow: 0 0 0 5px #16181d, 0 12px 40px rgba(0, 0, 0, .3); }
.playnotes { margin: 14px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--muted); display: grid; gap: 5px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--link, #1d6fd8); font: inherit; cursor: pointer; text-decoration: underline; }
.frame { border: 2px solid var(--axis); border-radius: 22px; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 16px; font-size: 13px; background: var(--surface-2); }
.frame.phone { width: 180px; height: 340px; } .frame.desk { width: 420px; max-width: 100%; height: 250px; border-radius: 12px; }
.checklist { list-style: none; margin: 0; padding: 0; } .checklist li { padding: 8px 0; border-top: 1px solid var(--line-2); } .checklist li:first-child { border-top: 0; }

/* ---- advice: beside the choice it is about, never covering the screen */
.advice-pop { border: 1px solid var(--line); border-left: 4px solid var(--info); background: var(--surface); border-radius: 9px; padding: 12px 14px; margin: 10px 0; box-shadow: var(--shadow); max-width: 640px; }
.advice-pop.warning { border-left-color: var(--warning); } .advice-pop.not-possible { border-left-color: var(--critical); }
.advice-pop .lv { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.advice-pop b { display: block; margin: 2px 0; } .advice-pop p { margin: 0 0 4px; color: var(--ink-2); font-size: 13.5px; }
.advice-pop .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---- the game card */
.gamecard { border-left: 1px solid var(--line); background: var(--surface); padding: 20px 18px 40px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.gamecard .cover { border-radius: 10px; margin-bottom: 12px; }
.gamecard h2 { font-size: 18px; line-height: 1.3; }
.gamecard section { border-top: 1px solid var(--line-2); padding: 12px 0; }
.gamecard section:first-of-type { border-top: 0; }
.gamecard h3 { font-size: 11.5px; margin-bottom: 6px; }
.gamecard .kv { font-size: 13.5px; gap: 4px 14px; }
.gamecard .adv { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; padding: 3px 0; }
.card-toggle { display: none; }

/* ---- sign-in */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login .card { width: 100%; max-width: 400px; padding: 28px 28px 24px; }
.login .brand { padding: 0 0 22px; }
.login h1 { font-size: 20px; margin-bottom: 4px; }
.login .form { margin-top: 18px; }

/* ---- smaller laptops and iPads: the game card folds into the step */
@media (max-width: 1260px) {
  .work { display: flex; flex-direction: column; align-items: stretch; }
  .gamecard { order: -1; position: static; height: auto; border: 1px solid var(--line); border-radius: var(--r); margin: 20px 34px 0; padding: 0; overflow: visible; max-width: 912px; }
  .gamecard .gc-body { padding: 4px 16px 12px; } .gamecard:not(.open) .gc-body { display: none; }
  .card-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; border: 0; background: none; padding: 12px 16px; cursor: pointer; font-weight: 600; text-align: left; }
  .card-toggle small { font-weight: 400; }
  .gamecard .cover { max-width: 320px; }
}
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .gamecard { margin: 14px 22px 0; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 280px; transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
  .shell.nav-open .side { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, .25); transition: transform .2s ease; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 30; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: var(--page); border-bottom: 1px solid var(--line); padding: 8px 14px; }
  .topbar .brand { padding: 0; } .topbar .brand svg { width: 26px; height: 26px; }
  .main { padding: 20px 22px 60px; }
  .step-pills { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 4px; }
  .step-pills a { border: 1px solid var(--line); border-radius: 16px; padding: 4px 12px; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
  .step-pills a[aria-current="page"] { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
  .step-pills a.done::before { content: "✓ "; color: var(--good-ink); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .main { padding: 16px 16px 50px; } .gamecard { margin: 12px 16px 0; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .target { grid-template-columns: minmax(0, 1fr) auto; } .target .tc { grid-column: 1 / -1; grid-row: 2; }
  .figures { grid-template-columns: minmax(0, 1fr); }
  .brief { grid-template-columns: 64px minmax(0, 1fr); } .brief .thumb { width: 64px; height: 64px; }
  .frame.desk { height: 200px; }
}
@media (hover: none) { .seg button, .btn, select, input, .chip { min-height: 42px; } }
@media (prefers-reduced-motion: reduce) { .side { transition: none !important; } .spin { animation-duration: 2s; } }
.main:focus { outline: none; }
@media (max-width: 640px) { .options { grid-template-columns: repeat(2, minmax(0, 1fr)); } .brief .acts .btn { max-width: 100%; white-space: normal; height: auto; text-align: left; } }
