/* ---------- tokens ---------- */
:root {
  --bg: #ebebeb;
  --surface: #f6f6f6;
  --surface-hi: #ffffff;
  --ink: #262626;
  --muted: #6b6b6b;
  --line: #4d4d4d;
  --rule: #cfcfcf;
  --leader: #8c8c8c;
  --live: #147874;
  --warn: #b26a00;
  --red: #a64c47; --orange: #9d580c; --green: #2c7f44; --blue: #2c6fae;
  --pad-body: #fafafa;
  --pad-stroke: #555;
  --pad-btn: #3a3a3a;
  --pad-btn-ink: #fff;
  --pad-shoulder: #dedede;
  --shadow: 0 6px 24px rgba(0, 0, 0, .12);

  --mode: #147874;                       /* set from the current mode by app.js */
  --mode-soft: color-mix(in srgb, var(--mode) 20%, transparent);
  --mode-tint: color-mix(in srgb, var(--mode) 9%, var(--surface));
  --mode-ink: var(--mode);               /* mode colour used for text */
  --lift: 0%;                            /* how much mode colours lighten for text */

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* type: 12 / 13 / 14 / 16 / 18 */
  --fast: 120ms;
  --move: 220ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #242424; --surface: #2e2e2e; --surface-hi: #383838; --ink: #ededed; --muted: #a3a3a3;
    --line: #8f8f8f; --rule: #474747; --leader: #7d7d7d; --live: #5fc4bb; --warn: #e3a64a;
    --red: #ea9891; --orange: #e0a26f; --green: #82c38f; --blue: #7fb6ee;
    --pad-body: #353535; --pad-stroke: #b5b5b5; --pad-btn: #e2e2e2; --pad-btn-ink: #262626; --pad-shoulder: #4a4a4a;
    --shadow: 0 8px 28px rgba(0, 0, 0, .45);
    --mode-ink: color-mix(in oklch, var(--mode) 55%, white); --lift: 45%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #242424; --surface: #2e2e2e; --surface-hi: #383838; --ink: #ededed; --muted: #a3a3a3;
  --line: #8f8f8f; --rule: #474747; --leader: #7d7d7d; --live: #5fc4bb; --warn: #e3a64a;
  --red: #ea9891; --orange: #e0a26f; --green: #82c38f; --blue: #7fb6ee;
  --pad-body: #353535; --pad-stroke: #b5b5b5; --pad-btn: #e2e2e2; --pad-btn-ink: #262626; --pad-shoulder: #4a4a4a;
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
  --mode-ink: color-mix(in oklch, var(--mode) 55%, white); --lift: 45%;
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; border-radius: 0; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); padding-bottom: 72px; }
h2 { margin: 0; }
button, input { font: inherit; color: inherit; }
button, .brand { white-space: nowrap; }
button {
  cursor: pointer; background: var(--surface); border: 1.5px solid var(--line);
  height: 32px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
button:active { transform: scale(0.97); }
button:focus-visible, input:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--mode); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: default; transform: none; }
button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
button.quiet { border-color: transparent; background: transparent; }
button.icon { width: 32px; padding: 0; border-color: transparent; background: transparent; }
button.quiet { padding: 0 10px 0 8px; }
.i { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.i.ui { width: 18px; height: 18px; }
.i.key { width: 13px; height: 13px; stroke-width: 1.6; }
.ic { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; }
@media (hover: hover) {
  button:not(:disabled):hover { background: var(--surface-hi); }
  button.primary:not(:disabled):hover { background: var(--ink); opacity: .86; }
  button.quiet:hover, button.icon:hover { border-color: var(--rule); background: var(--surface); }
}
input {
  height: 32px; padding: 0 10px; background: var(--surface-hi); border: 1.5px solid var(--line); width: 100%;
}
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* key caps */
.caps { display: inline-flex; gap: 3px; flex: none; }
kbd.cap {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px;
  font: 600 12px var(--font); color: var(--ink); background: var(--surface-hi);
  border: 1px solid var(--rule); border-bottom-width: 2px;
}

/* tones */
.tone-red { color: var(--red); } .tone-orange { color: var(--orange); } .tone-green { color: var(--green); } .tone-blue { color: var(--blue); }

/* ---------- header ---------- */
header { display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 24px; border-bottom: 1px solid var(--rule); }
.brand { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.tagline { color: var(--muted); font-size: 13px; }
nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }

main { max-width: 1120px; margin: 0 auto; padding: 24px 24px 24px; }

/* ---------- modes ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rotates { display: flex; gap: 2px; }
.modes .tab .start { width: 12px; height: 12px; stroke-width: 1.75; opacity: .7; }
.modes-wrap { display: flex; align-items: center; gap: 4px; min-width: 0; }
.modes { position: relative; isolation: isolate; display: flex; border: 1.5px solid var(--line); background: var(--surface); overflow-x: auto; scrollbar-width: none; }
.modes .thumb { position: absolute; z-index: 1; top: 0; bottom: 0; left: 0; width: 100%; background: var(--mode); clip-path: inset(0 100% 0 0); transition: clip-path 280ms var(--ease), background-color 280ms var(--ease); }
.modes .tab > * { position: relative; z-index: 2; }
.modes .tab:focus-visible { z-index: 3; outline-color: currentColor; outline-offset: -5px; }
.modes .tab { position: relative; border: 0; background: transparent; height: 34px; padding: 0 16px; gap: 8px; font-weight: 500; transition: color 280ms var(--ease), background var(--fast) var(--ease); }
.modes .tab + .tab { border-left: 1.5px solid var(--rule); }
.modes .tab .sw { width: 10px; height: 10px; background: var(--c); flex: none; transition: background-color 280ms var(--ease); }
.modes .tab[aria-selected="true"] { color: #fff; font-weight: 600; }
.modes .tab[aria-selected="true"] .sw { background: #fff; }
@media (hover: hover) { .modes .tab:not([aria-selected="true"]):hover { background: var(--surface-hi); } }
/* the sliding thumb is the only thing that paints the selected tab */
.modes .tab[aria-selected="true"], .seg button[aria-checked="true"] { background: transparent !important; }
.modes .tab:active { transform: none; }

/* ---------- stage ---------- */
.stage {
  position: relative; display: grid; align-items: center; justify-content: center;
  grid-template-columns: minmax(0, 248px) auto minmax(0, 248px); column-gap: 72px;
  padding: 24px 0 28px;
}
.col { display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.pad { width: clamp(300px, 36vw, 430px); height: 340px; position: relative; z-index: 1; }
.pad svg { display: block; width: 100%; height: 100%; overflow: visible; }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; transition: opacity var(--fast) var(--ease); }
.leaders.moving { opacity: 0; transition-duration: 60ms; }
.leaders polyline { fill: none; stroke: var(--leader); stroke-width: 1.5; transition: stroke var(--fast) var(--ease); }
.leaders polyline.sel { stroke: var(--mode); stroke-width: 2.25; }
.stage .col { position: relative; z-index: 3; }

/* controller drawing */
.pad .body { fill: var(--pad-body); stroke: var(--pad-stroke); stroke-width: 2; }
.pad .dpad-base { fill: var(--pad-btn); }
.pad .b { cursor: pointer; }
.pad .b .cap { fill: var(--pad-btn); transform-box: fill-box; transform-origin: center; transition: fill var(--fast) var(--ease), transform var(--fast) var(--ease); }
.pad .b text { fill: var(--pad-btn-ink); font: 600 15px var(--font); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.pad .b .ink { fill: var(--pad-btn-ink); pointer-events: none; }
.pad .b .stroke { stroke: var(--pad-btn-ink); stroke-width: 2; pointer-events: none; }
.pad .b.shoulder .cap { fill: var(--pad-shoulder); stroke: var(--pad-stroke); stroke-width: 2; }
.pad .b.shoulder text { fill: var(--ink); font-size: 12px; font-weight: 700; }
@media (hover: hover) { .pad .b:not(.sel):hover .cap { opacity: .8; } }
.pad .b.sel .cap, .pad .b.shoulder.sel .cap { fill: var(--mode); opacity: 1; }
.pad .b.shoulder.sel text { fill: #fff; }
.pad .b.pressed .cap { fill: var(--mode); }
.pad .b.pressed circle.cap { transform: scale(0.88); }
.pad .b.shoulder { transition: transform var(--fast) var(--ease); }
.pad .b.shoulder.pressed { transform: translateY(5px); }

/* mapping boxes */
.slot {
  width: 100%; height: 48px; padding: 0 12px; gap: 10px; justify-content: flex-start;
  background: var(--surface); border: 1.5px solid var(--line); text-align: left;
}
.slot.sel { background: var(--surface-hi); border-color: var(--mode); box-shadow: 0 0 0 3px var(--mode-soft); }
.slot.pressed { background: var(--mode-soft); }
.slot.flash { animation: flash 600ms var(--ease); }
.slot .act { flex: 1; min-width: 0; line-height: 1.2; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.slot .act .i { color: inherit; }
.slot[data-kind="none"] .act, .slot[data-kind="off"] .act, .slot[data-kind="power"] .act { color: var(--muted); font-weight: 400; }
.slot .out .cap { background: transparent; color: var(--muted); }
.stage.swap .slot .act, .stage.swap .slot .out { animation: fade var(--move) var(--ease); }
.extras { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 16px; }
.extras .slot { width: 248px; }

/* glyphs */
.g { width: 24px; height: 24px; flex: none; display: block; }
.g circle, .g rect, .g .solid { fill: var(--ink); }
.g text { fill: var(--surface); font: 700 12px var(--font); text-anchor: middle; dominant-baseline: central; }
.g .gi { fill: var(--surface); }
.g .gs { stroke: var(--surface); stroke-width: 2.4; fill: none; }
.slot.sel .g text, .slot.sel .g .gi { fill: var(--surface-hi); }
.slot.sel .g .gs { stroke: var(--surface-hi); }

/* ---------- editor ---------- */
.editor { max-width: 760px; margin: 0 auto; background: var(--surface); border: 1.5px solid var(--line); }
.ed-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.ed-head h2 { font-size: 16px; font-weight: 700; }
/* two rows, each: label, value, its own action, all aligned in columns */
.ed-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr) 168px; align-items: center; gap: 12px 16px; padding: 16px; }
.ed-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ed-value { display: flex; align-items: center; gap: 10px; min-width: 0; padding-left: 13.5px; }
.ed-note { font-size: 13px; color: var(--muted); }
.mode-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; background: var(--chip, var(--mode)); color: #fff; font-weight: 600; font-size: 12px; white-space: nowrap; }
.side { width: 100%; height: 40px; justify-content: flex-start; padding: 0 12px; gap: 8px; }
.side.on { border-color: var(--mode); background: var(--mode-tint); box-shadow: 0 0 0 3px var(--mode-soft); color: var(--mode-ink); }
.side.on .ic { animation: pulse 1s var(--ease) infinite; }
.side.done { border-color: var(--live); color: var(--live); }
.picker-btn {
  height: 40px; justify-content: space-between; padding: 0 10px 0 12px; gap: 10px;
  background: var(--surface-hi); text-align: left; min-width: 0;
}
.picker-btn[aria-expanded="true"] { border-color: var(--mode); box-shadow: 0 0 0 3px var(--mode-soft); }
.picker-btn .chev { display: inline-flex; color: var(--muted); }
.picker-btn .chev .i { transition: transform var(--move) var(--ease); }
.picker-btn[aria-expanded="true"] .chev .i { transform: rotate(180deg); }
.picker-btn:active { transform: none; }
.pv { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; font-weight: 600; overflow: hidden; }
.pv .muted { color: var(--muted); font-weight: 400; }
.modeswitch { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- popover: action picker and mode editor ---------- */
.pop {
  position: fixed; z-index: 30; background: var(--surface-hi); border: 1.5px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; max-height: min(420px, 70vh); animation: drop var(--move) var(--ease);
}
.pop .search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--rule); color: var(--muted); }
.pop .search input { border: 0; height: 28px; padding: 0; background: transparent; color: var(--ink); }
.pop .search input:focus-visible { outline: none; }
.pop .list { overflow-y: auto; padding: 4px 0 6px; }
.pop .grp { padding: 10px 12px 4px; }
.pop .opt { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; cursor: pointer; }
.pop .opt .nm { flex: 1; min-width: 0; }
.pop .opt .tick { width: 16px; display: inline-flex; color: var(--mode); }
.pop .opt[aria-selected="true"] { font-weight: 600; }
.pop .opt.active { background: var(--mode-soft); }
.pop .opt .sw { width: 10px; height: 10px; flex: none; }
.pop .opt.special { color: var(--mode-ink); font-weight: 600; }
.pop .empty { padding: 16px 12px; color: var(--muted); }
.pop.form { padding: 14px; gap: 12px; width: 300px; }
.pop.form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches button { width: 28px; height: 28px; padding: 0; border: 2px solid transparent; background: var(--c); }
.swatches button[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--surface-hi); }
@media (hover: hover) { .swatches button:not(:disabled):hover { background: var(--c); border-color: var(--rule); } }
.pop.form .row { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.danger { color: var(--red); }
.note { font-size: 12px; color: var(--muted); margin: 0; }

/* ---------- status banner ---------- */
.banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  border-top: 1.5px solid var(--rule); background: var(--surface);
  transition: background var(--move) var(--ease), border-color var(--move) var(--ease);
}
.bn-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 12px; }
.sig { width: 20px; height: 20px; flex: none; fill: currentColor; color: var(--muted); }
.sig rect { transform-box: fill-box; transform-origin: bottom; transition: transform var(--move) var(--ease); }
.bn-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.bn-text strong { font-size: 14px; }
.bn-text span { font-size: 12px; color: var(--muted); }
.bn-last { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.bn-last .arrow { color: var(--muted); }
.bn-last .g { width: 20px; height: 20px; }
.banner[data-state="listening"], .banner[data-state="ok"] { border-top-color: var(--live); background: color-mix(in srgb, var(--live) 9%, var(--surface)); }
.banner[data-state="listening"] .sig, .banner[data-state="ok"] .sig, .banner[data-state="listening"] strong, .banner[data-state="ok"] strong { color: var(--live); }
.banner[data-state="listening"] .sig rect, .banner[data-state="ok"] .sig rect { animation: idle 1.6s var(--ease) infinite; }
.banner .sig rect:nth-child(2) { animation-delay: .2s; }
.banner .sig rect:nth-child(3) { animation-delay: .4s; }
.banner[data-state="warn"] { border-top-color: var(--warn); background: color-mix(in srgb, var(--warn) 11%, var(--surface)); }
.banner[data-state="warn"] .sig, .banner[data-state="warn"] strong { color: var(--warn); }
.banner[data-state="capture"] { border-top-color: var(--mode); background: var(--mode-tint); }
.banner[data-state="capture"] .sig, .banner[data-state="capture"] strong { color: var(--mode-ink); }
.banner[data-state="capture"] .sig rect { animation: idle .8s var(--ease) infinite; }
.banner[data-state="paused"] .sig { opacity: .55; }
.banner.hit .sig rect { animation: hit 360ms var(--ease); }
.banner.hit .bn-last { animation: bump var(--move) var(--ease); }

/* ---------- dialog, tooltip, toast ---------- */
dialog {
  width: min(580px, calc(100% - 32px)); max-height: 85vh; padding: 0;
  background: var(--surface-hi); color: var(--ink); border: 1.5px solid var(--line);
}
dialog[open] { animation: rise var(--move) var(--ease); }
dialog::backdrop { background: rgba(0, 0, 0, .35); animation: fade var(--move) var(--ease); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--rule); }
.dialog-head h2 { font-size: 16px; }
#modal-body { padding: 4px 20px 20px; }
dialog p, dialog li { line-height: 1.6; }
dialog ol { padding-left: 20px; }
dialog li + li { margin-top: 6px; }
dialog code { font: 12px var(--mono); background: var(--bg); padding: 1px 4px; }
.guide li::marker { font-weight: 600; }
.guide li + li { margin-top: 10px; }
.ref { display: inline-block; line-height: 20px; padding: 0 6px 0 4px; border: 1px solid var(--rule); background: var(--surface); font-weight: 600; white-space: nowrap; }
.ref.only { padding: 0 2px; }
.ref .i.ui { display: inline-block; width: 15px; height: 15px; margin-right: 4px; vertical-align: -3px; }
.ref.only .i.ui { margin-right: 0; }
.shot { display: block; width: 100%; height: auto; margin: 8px 0 10px; border: 1px solid var(--rule); }
dialog a { color: inherit; }
dialog textarea { width: 100%; height: 260px; padding: 10px; font: 12px/1.5 var(--mono); background: var(--bg); color: var(--ink); border: 1.5px solid var(--rule); resize: vertical; }
.opt-section { padding: 16px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; }
.opt-section:last-child { border-bottom: 0; padding-bottom: 0; }
.opt-section.links { flex-direction: row; gap: 4px; }
a.icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--ink); border: 1.5px solid transparent; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease); }
a.icon:active { transform: scale(0.97); }
@media (hover: hover) { a.icon:hover { border-color: var(--rule); background: var(--surface); } }
.opt-section h3 { margin: 0; font-size: 14px; }
.ids { display: flex; gap: 12px; flex-wrap: wrap; }
.ids label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.ids input { width: 120px; }
.dialog-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1.5px solid var(--line); background: var(--surface); width: max-content; }
.seg .thumb { position: absolute; top: 0; bottom: 0; left: 0; background: var(--ink); transition: transform var(--move) var(--ease); }
.seg button { position: relative; border: 0; background: transparent; height: 32px; width: 44px; padding: 0; }
.seg button[aria-checked="true"] { color: var(--bg); }
.seg.text button { width: 96px; padding: 0 12px; }
dialog:focus, dialog:focus-visible { outline: none; }
.seg .thumb { width: 0; }
.pop .opt .sub { margin-left: 8px; font-weight: 400; font-size: 12px; color: var(--muted); }
.phone-note { display: flex; align-items: flex-start; gap: 10px; padding: 10px 8px 10px 16px; background: var(--mode-tint); border-bottom: 1.5px solid var(--mode); font-size: 13px; }
.phone-note .ic { margin-top: 1px; color: var(--mode-ink); }
.phone-note p { margin: 0; flex: 1; line-height: 1.45; }
.phone-note button { margin-top: -6px; }
@media (hover: hover) { .seg button:not([aria-checked="true"]):hover { background: var(--surface-hi); } }
#tip {
  position: fixed; z-index: 40; pointer-events: none; padding: 4px 8px; font-size: 12px;
  background: var(--ink); color: var(--bg); white-space: nowrap; animation: fade var(--fast) var(--ease);
  display: flex; align-items: center; gap: 8px;
}
#tip kbd.cap { min-width: 18px; height: 18px; padding: 0 4px; font-size: 11px; color: var(--bg); background: transparent; border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
#tip .i.key { width: 11px; height: 11px; }
.history { display: flex; gap: 2px; padding-right: 6px; margin-right: 2px; border-right: 1px solid var(--rule); }
#toast {
  position: fixed; bottom: 72px; left: 50%; z-index: 20; translate: -50% 8px;
  background: var(--ink); color: var(--bg); padding: 10px 16px; font-size: 13px; max-width: calc(100% - 32px);
  opacity: 0; pointer-events: none; transition: opacity var(--move) var(--ease), translate var(--move) var(--ease);
}
#toast.show { opacity: 1; translate: -50% 0; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; translate: 0 8px; } }
@keyframes drop { from { opacity: 0; translate: 0 -4px; } }
@keyframes bump { from { opacity: .3; translate: 0 4px; } }
@keyframes flash { from { background: var(--mode-soft); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes idle { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
@keyframes hit { 30% { transform: scaleY(1.25); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- narrower screens ---------- */
@media (max-width: 1040px) {
  .stage { column-gap: 40px; }
  .slot .out { display: none; }
}
@media (max-width: 720px) {
  header { padding: 0 16px; gap: 8px; }
  .tagline, .wide { display: none; }
  main { padding: 16px 16px 24px; }
  .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 16px 0; }
  .col { min-width: 0; }
  .pad { grid-column: 1 / -1; order: -1; justify-self: center; width: 100%; height: 230px; margin-bottom: 12px; }
  .leaders { display: none; }
  .slot { padding: 0 8px; gap: 8px; height: 44px; }
  .slot .act { font-size: 13px; }
  .slot .modeswitch .txt { display: none; }
  .ed-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .ed-label { grid-column: 1 / -1; }
  .side { width: auto; }
  .side .lbl { display: none; }
  .extras .slot { width: 100%; }
  .pop { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto !important; max-height: 75vh; animation-name: rise; }
  .pop.form { width: auto; }
  .bn-inner { padding: 0 16px; }
  .bn-last .lbl { display: none; }
}
