:root {
  color-scheme: light;
  --paper: #fafaf9;
  --ink: #1d1d1f;
  --muted: #68686d;
  --line: #e5e5e3;
  --surface: #efefed;
  --accent: #0066cc;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.shell { width: min(980px, calc(100% - 64px)); margin-inline: auto; }
.masthead { padding-block: 48px 40px; }
.brand { font-size: 21px; font-weight: 600; letter-spacing: -.015em; }
.intro { margin: 0 0 48px; font-size: 24px; line-height: 1.35; letter-spacing: -.015em; font-weight: 400; }
.intro span { color: var(--muted); }
.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.game { min-width: 0; }
.game-link { display: block; border-radius: 12px; }
.preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px; background: var(--surface); }
.preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.game-name { margin: 16px 0 6px; font-size: 19px; font-weight: 500; line-height: 1.2; letter-spacing: -.015em; }
.description { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.game-bottom { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; line-height: 1.5; }
.capacity { color: var(--muted); }
.play { white-space: nowrap; font-weight: 500; }
.play span { display: inline-block; margin-left: 4px; }
.paused { position: absolute; top: 12px; left: 12px; padding: 5px 9px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--paper); color: var(--ink); }
.footer { margin-top: 64px; padding-block: 24px 40px; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 12px; background: var(--paper); transform: translateY(-160%); }
.skip:focus { transform: none; }
.player-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.player-bar { flex: 0 0 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 24px; background: var(--paper); }
.back, .tool { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 500; border-radius: 8px; }
.back { padding-left: 0; }
.player-title { display: flex; align-items: baseline; justify-content: center; gap: 12px; min-width: 0; }
.player-title h1 { margin: 0; font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-title span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.player-tools { display: flex; gap: 8px; }
.tool { border: 0; background: var(--surface); color: var(--ink); }
.tool.secondary { background: transparent; }
.stage { position: relative; flex: 1; min-height: 0; background: #171b20; }
.stage iframe { display: block; border: 0; width: 100%; height: 100%; }
.stage:fullscreen { width: 100%; height: 100%; }
.fullscreen-exit { display: none; position: absolute; z-index: 10; top: 12px; right: 12px; background: var(--paper); }
.stage:fullscreen .fullscreen-exit { display: inline-flex; }
.load-status { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; background: var(--paper); font-size: 15px; }
.load-status[hidden] { display: none; }
.fullscreen-status { position: fixed; z-index: 20; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 16px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.empty { padding-block: 80px; }
.empty h1 { font-size: 32px; font-weight: 600; letter-spacing: -.022em; }
.empty a { display: inline-flex; margin-top: 16px; padding: 12px 16px; background: var(--surface); border-radius: 8px; }
@media (hover: hover) {
  .game-link:hover .game-name, .game-link:hover .play { color: var(--accent); }
  .game-link:hover .play span { transform: translateX(3px); }
  .tool:hover { background: var(--line); color: var(--accent); }
  .back:hover, .footer a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
  .play span { transition: transform 180ms ease-out; }
  .game-link:active .preview { transform: scale(.99); }
  .tool:active { transform: scale(.98); }
}
@media (max-width: 800px) {
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-title span { display: none; }
  .tool.secondary { font-size: 0; gap: 0; min-width: 44px; }
  .tool.secondary::after { content: '↗'; font-size: 20px; }
}
@media (max-width: 540px) {
  .shell { width: calc(100% - 40px); }
  .masthead { padding-block: 32px; }
  .intro { font-size: 22px; margin-bottom: 32px; }
  .games { grid-template-columns: 1fr; gap: 32px; }
  .preview { aspect-ratio: 16 / 10; }
  .game-bottom { font-size: 14px; }
  .footer { margin-top: 40px; padding-bottom: 24px; }
  .player-bar { padding-inline: 12px; gap: 8px; }
  .back, .tool { font-size: 13px; padding-inline: 8px; }
  .player-title h1 { font-size: 14px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .player-bar { flex-basis: 48px; padding-block: 2px; }
}
