:root {
  color-scheme: dark;
  --background: #080706;
  --surface: #16120d;
  --gold: #e8c078;
  --gold-light: #f8dc9f;
  --text: #f6edda;
  --muted: #b6a78f;
  --border: #584326;
  --poster-width: 992px;
  --bar-height: 82px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--background); }
body { margin: 0; background: var(--background); color: var(--text); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; color: inherit; }
button:focus-visible, a:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 4px;
}
button:active { transform: translateY(1px); }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.icon {
  width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.skip-link {
  position: fixed; z-index: 30; top: 12px; left: 12px;
  padding: 12px 18px; background: var(--gold-light); color: var(--background);
  transform: translateY(-160%); text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.poster {
  position: relative; width: min(100%, var(--poster-width)); margin: 0 auto;
  padding-bottom: calc(var(--bar-height) + env(safe-area-inset-bottom) + 20px);
}
.poster:focus { outline: none; }
.poster-image { display: block; width: 100%; height: auto; }

.action-bar {
  position: fixed; z-index: 6; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, var(--poster-width)); min-height: var(--bar-height);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: #0c0a08; border-top: 1px solid var(--border);
}
.game-button {
  display: flex; align-items: center; justify-content: center; gap: 32px;
  min-width: 240px; min-height: 52px; padding: 12px 26px;
  border: 1px solid var(--gold-light); border-radius: 3px;
  background: linear-gradient(110deg, var(--gold-light), var(--gold));
  color: #21170a; font-size: 16px; font-weight: 700; letter-spacing: 2px;
  transition: filter 150ms ease;
}
.game-button:hover { filter: brightness(1.08); }

.action-dialog {
  width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 40px);
  padding: 42px 28px 26px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); overflow: auto;
  box-shadow: 0 24px 80px #0009;
}
.action-dialog::backdrop { background: #000b; }
.dialog-close {
  position: absolute; top: 6px; right: 6px; width: 44px; height: 44px;
  display: grid; place-items: center; background: transparent; border: 0; color: var(--muted);
}
.dialog-close:hover { color: var(--gold-light); }
.dialog-eyebrow { margin: 0 0 14px; font-size: 10px; letter-spacing: 2px; color: var(--gold); }
.action-dialog h2 { margin: 0 0 12px; font-size: 23px; font-weight: 600; }
#dialog-message { margin: 0 0 26px; color: var(--muted); font-size: 15px; line-height: 1.7; text-wrap: pretty; }
.dialog-confirm {
  width: 100%; min-height: 48px; border: 1px solid var(--gold);
  border-radius: 3px; background: var(--gold); color: #21170a; font-weight: 600;
}
.dialog-confirm:hover { background: var(--gold-light); }
body.dialog-open { overflow: hidden; }

@media (max-width: 600px) {
  :root { --bar-height: 78px; }
  .action-bar { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .game-button { width: 100%; min-width: 0; max-width: 400px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
