
@font-face { font-family: Archivo; font-weight: 400; font-display: swap; src: url(fonts/archivo-400.woff2) format('woff2'); }
@font-face { font-family: Archivo; font-weight: 600; font-display: swap; src: url(fonts/archivo-600.woff2) format('woff2'); }
@font-face { font-family: Archivo; font-weight: 800; font-display: swap; src: url(fonts/archivo-800.woff2) format('woff2'); }

:root {
  color-scheme: dark light;
  --bg: #0e1422; --screen: #080c15; --line: #2b364c; --text: #f0f3f8; --muted: #a8b3c7; --sound: #ffb648; --focus: #ffd089;
  --gap: clamp(12px, 1.6vw, 28px); --pad: clamp(14px, 2.2vw, 40px);
  --u: clamp(15px, 0.35vw + 13.6px, 22px);
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f2f4f8; --screen: #dfe3eb; --line: #c9cfdb; --text: #111827; --muted: #485469; --sound: #8a4b00; --focus: #8a4b00; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font: 400 var(--u)/1.4 Archivo, system-ui, sans-serif;
  padding: max(var(--pad), env(safe-area-inset-top)) max(var(--pad), env(safe-area-inset-right)) max(var(--pad), env(safe-area-inset-bottom)) max(var(--pad), env(safe-area-inset-left)); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 20px; margin: 0 0 var(--gap); }
.top h1 { margin: 0; font-size: 1.5em; font-weight: 800; letter-spacing: -0.015em; line-height: 1.1; }
.hint { margin: 0; color: var(--muted); font-size: 0.95em; }
.foot { margin: var(--gap) 0 0; color: var(--muted); font-size: 0.8em; }
.closed { margin: 18vh 0 0; max-width: 22em; font-size: 1.5em; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }


.stage { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); align-items: start; margin: 0 auto; }
.room { min-width: 0; }
.screen { position: relative; aspect-ratio: 16 / 9; background: var(--screen); border-radius: 10px; overflow: hidden; outline: 1px solid var(--line); outline-offset: -1px; }
.slot, .slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.idle { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: var(--muted); font-size: 0.95em; text-align: center; padding: 8px; }
.pick { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: inherit; background: transparent; color: inherit; font: inherit;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; display: grid; align-items: end; justify-items: start; }
.pick-say { margin: 10px; padding: 7px 14px 7px 12px; border-radius: 999px; background: rgb(8 12 21 / 0.82); color: #f0f3f8; font-weight: 600; font-size: 0.9em; line-height: 1.2; }
.pick-say::before { content: ''; display: inline-block; width: 0.5em; height: 0.5em; margin-right: 0.5em; border-radius: 50%; background: #ffb648; vertical-align: 0.08em; }
.pick:hover .pick-say { background: #ffb648; color: #10141d; }
.pick:hover .pick-say::before { background: #10141d; }
.pick:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.pick:focus-visible .pick-say { background: #ffb648; color: #10141d; }
.pick:active .pick-say { transform: scale(0.97); }
.is-big .pick { display: none; }
.is-big .screen { border-radius: 14px; }
.slot iframe:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

.cap { padding: 10px 2px 0; }
.cap h2 { margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; font-size: 1.2em; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.cap p { margin: 0; overflow-wrap: anywhere; }
.lbl, .when, .who { color: var(--muted); }
.lbl { font-weight: 600; }
.when { font-variant-numeric: tabular-nums; }
.now .t { display: block; font-weight: 600; line-height: 1.25; }
.now .who { display: block; }
.next { margin-top: 6px !important; font-size: 0.88em; }
.next .t { color: var(--text); }
.is-big .cap h2 { font-size: 1.7em; }
.is-big .now .t { font-size: 1.2em; }


.snd { display: inline-flex; align-items: flex-end; gap: 3px; color: var(--sound); font-size: 0.8rem; font-weight: 600; letter-spacing: 0; line-height: 1.2; }
.snd i { width: 3px; height: 0.95em; background: currentColor; border-radius: 1px; transform-origin: 50% 100%; animation: bar 0.9s ease-in-out infinite alternate; }
.snd i:nth-child(2) { animation-delay: -0.3s; }
.snd i:nth-child(3) { animation-delay: -0.6s; }
.snd span { margin-left: 5px; }
@keyframes bar { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .snd i { animation: none; } .snd i:nth-child(2) { transform: scaleY(0.55); } .snd i:nth-child(3) { transform: scaleY(0.8); }
  .pick:active .pick-say { transform: none; }
}


@media (max-width: 759px) and (orientation: portrait) {
  .stage:not([data-big]) .room { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 0 12px; align-items: start; }
  .stage:not([data-big]) .cap { display: contents; }
  .stage:not([data-big]) .screen { grid-row: 1 / span 2; }
  .stage:not([data-big]) .cap h2 { grid-column: 2; font-size: 1.1em; }
  .stage:not([data-big]) .now { grid-column: 2; font-size: 0.9em; }
  .stage:not([data-big]) .next { grid-column: 1 / -1; }
  .stage:not([data-big]) .now[hidden] + .next { grid-column: 2; grid-row: 2; margin-top: 0 !important; }
  .stage:not([data-big]) .pick-say { margin: 6px; padding: 5px 11px 5px 9px; font-size: 0.8em; }
}
.stage[data-big] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stage[data-big] .is-big { grid-column: 1 / -1; order: -1; }
.stage[data-big] .room:not(.is-big) .cap h2 { font-size: 1em; }
.stage[data-big] .room:not(.is-big) .now, .stage[data-big] .room:not(.is-big) .next { font-size: 0.85em; }
.stage[data-big] .room:not(.is-big) .pick-say { margin: 6px; padding: 5px 11px 5px 9px; font-size: 0.8em; }


@media (min-width: 760px) and (min-height: 501px) {
  .stage { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: calc((100dvh - 15em) * 16 / 9 * 3); }
  .stage[data-big] { grid-template-columns: minmax(0, 3.1fr) minmax(0, 1fr); max-width: max(720px, calc((100dvh - 16.5em) * 16 / 9 * 4.1 / 3.1)); }
  .stage[data-big] .is-big { grid-column: 1; grid-row: 1 / span 3; order: 0; }
  .stage[data-big] .room:not(.is-big) { grid-column: 2; }
}


@media (orientation: landscape) and (max-height: 500px) {
  :root { --pad: 10px; --gap: 10px; --u: 14px; }
  .top { margin-bottom: 8px; } .top h1 { font-size: 1.15em; } .foot { display: none; }
  .stage { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cap { padding-top: 6px; } .next { margin-top: 2px !important; }
  .stage[data-big] { grid-template-columns: auto minmax(0, 1fr); }
  .stage[data-big] .is-big { grid-column: 1; grid-row: 1 / span 3; order: 0; width: min(64vw, calc((100dvh - 8.6em) * 16 / 9)); }
  .stage[data-big] .is-big .cap h2 { font-size: 1.25em; } .stage[data-big] .is-big .now .t { font-size: 1em; }
  .stage[data-big] .is-big .now .t, .stage[data-big] .is-big .now .who { display: inline; }
  .stage[data-big] .is-big .next { display: none; }
  .stage[data-big] .room:not(.is-big) { grid-column: 2; display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 10px; align-items: start; }
  .stage[data-big] .room:not(.is-big) .cap { padding: 0; }
  .stage[data-big] .room:not(.is-big) .next { display: none; }
  .stage[data-big] .room:not(.is-big) .now[hidden] + .next { display: block; margin-top: 0 !important; }
  .stage[data-big] .room:not(.is-big) .pick-say { margin: 4px; padding: 4px 9px 4px 8px; font-size: 0.78em; }
}
