/* Fantasy's game player is independent of the landing page's visual studies. */
body.is-playing { overflow: hidden; }
#game-view,
.arcade-dialog { font-family: 'Space Grotesk', Arial, sans-serif; color: #f0f0f4; --player-accent: #eda873; }
#game-view *,
.arcade-dialog * { box-sizing: border-box; }
#game-view[hidden],
#game-view [hidden] { display: none !important; }
#game-view { position: fixed; inset: 0; z-index: 100; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #080c14; overscroll-behavior: none; }
#game-view svg,
.arcade-dialog svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#game-view button,
#game-view a,
.arcade-dialog button,
.arcade-dialog a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; outline-offset: 4px; font-family: inherit; }
#game-view button:focus-visible,
#game-view a:focus-visible,
.arcade-dialog button:focus-visible,
.arcade-dialog a:focus-visible { outline: 2px solid var(--player-accent); }
#game-view .player-toolbar { flex: 0 0 auto; display: flex; align-items: center; gap: 22px; height: calc(48px + env(safe-area-inset-top, 0px)); min-height: 48px; padding: env(safe-area-inset-top, 0px) max(10px, env(safe-area-inset-right, 0px)) 0 max(10px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid #ffffff17; background: #10141e; z-index: 3; }
#game-view .player-back { display: inline-flex; align-items: center; gap: 5px; min-width: 88px; height: 44px; padding: 0 8px 0 0; border: 0; border-radius: 5px; background: none; color: #f0f0f4; font-size: 14px; font-weight: 500; letter-spacing: -.025em; cursor: pointer; }
#game-view .player-back svg { width: 18px; height: 18px; }
#game-view .player-back:hover { color: var(--player-accent); }
#game-view .active-game { display: flex; align-items: center; gap: 12px; min-width: 0; }
#game-view .active-game strong { font-size: 13px; font-weight: 500; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#game-view .active-game > span { color: #8b94a6; font-size: 11px; white-space: nowrap; }
#game-view .player-actions { display: flex; gap: 2px; margin-left: auto; }
#game-view .player-icon { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px; color: #a5adbd; background: none; text-decoration: none; cursor: pointer; }
#game-view .player-icon:hover { color: #f2bc96; background: #ffffff07; }
#game-frame-host { position: relative; flex: 1; min-height: 0; min-width: 0; overflow: hidden; }
#game-frame-host iframe { display: block; width: 100%; height: 100%; border: 0; background: #080c14; }
#game-view .game-status { position: absolute; inset: calc(48px + env(safe-area-inset-top, 0px)) 0 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 28px; background: #10141e; }
#game-view .game-status > p { margin: 0; font-size: 19px; line-height: 1.35; letter-spacing: -.025em; }
#game-view .game-status > p > span { display: block; margin-top: 6px; color: #939daf; font-size: 12px; letter-spacing: 0; }
#game-view .loader-mark { flex: 0 0 26px; width: 26px; height: 26px; border: 2px solid #eda87326; border-top-color: #eda873; border-radius: 50%; animation: fantasy-player-spin .8s linear infinite; }
#game-view .game-error-content { width: min(100%, 430px); }
#game-view .game-error-content h2 { font-size: 30px; line-height: 1.15; font-weight: 500; letter-spacing: -.04em; margin: 0 0 14px; }
#game-view .game-error-content > p:not(.player-eyebrow) { color: #a4adbe; font-size: 14px; line-height: 1.6; }
#game-view .player-eyebrow,
.arcade-dialog .player-eyebrow { margin: 0 0 14px; color: #bc9d89; font: 10px/1.5 'Space Grotesk', Arial, sans-serif; font-weight: 400; letter-spacing: .1em; }
@keyframes fantasy-player-spin { to { transform: rotate(360deg); } }

.arcade-dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 30px; overflow: auto; background: #141a27; border: 1px solid #ffffff22; border-radius: 12px; box-shadow: 0 24px 90px #0008; }
.arcade-dialog::backdrop { background: #060a13c9; backdrop-filter: blur(5px); }
.arcade-dialog h2 { margin: 0 0 14px; font-size: 32px; line-height: 1.12; font-weight: 500; letter-spacing: -.045em; }
.arcade-dialog > p:not(.player-eyebrow) { color: #a9b1c0; font-size: 14px; line-height: 1.65; }
#game-view .dialog-actions,
.arcade-dialog .dialog-actions { display: flex; gap: 10px; align-items: center; margin-top: 25px; }
#game-view .dialog-actions button,
#game-view .dialog-actions a,
.arcade-dialog .dialog-actions button,
.arcade-dialog .dialog-actions a { display: inline-flex; justify-content: center; align-items: center; gap: 7px; flex: 1; min-height: 46px; padding: 12px 14px; border: 1px solid #ffffff28; border-radius: 7px; font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; }
#game-view .dialog-primary,
.arcade-dialog .dialog-primary { color: #221a17; background: #eda873; border-color: #eda873 !important; }
#game-view .dialog-primary:hover,
.arcade-dialog .dialog-primary:hover { background: #f7be94; border-color: #f7be94 !important; }
#game-view .dialog-secondary,
.arcade-dialog .dialog-secondary { color: #e0e3eb; background: #ffffff03; }
#game-view .dialog-secondary:hover,
.arcade-dialog .dialog-secondary:hover { background: #ffffff0c; }
.arcade-dialog .dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.arcade-dialog .dialog-close { display: grid; place-items: center; flex: 0 0 44px; height: 44px; margin: -7px -7px 0 0; padding: 0; color: #a9b1c0; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.arcade-dialog .dialog-close:hover { color: #f0f0f4; background: #ffffff09; }
.arcade-dialog.help-dialog { width: min(710px, calc(100% - 32px)); padding: 32px; }
.arcade-dialog .help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 19px; }
.arcade-dialog .help-grid section + section { border-left: 1px solid #ffffff16; padding-left: 28px; }
.arcade-dialog .help-game-index { font-size: 9px; letter-spacing: .09em; color: #bc9d89; }
.arcade-dialog .help-grid h3 { margin: 11px 0; font-size: 24px; line-height: 1.2; letter-spacing: -.04em; font-weight: 500; }
.arcade-dialog .help-grid p { color: #a9b1c0; font-size: 13px; line-height: 1.7; }
.arcade-dialog .help-grid .help-detail { margin-top: 18px; font-size: 11px; line-height: 2.3; }
.arcade-dialog .help-detail span { padding-inline: 5px; color: #5f6b80; }
.arcade-dialog kbd { padding: 3px 4px; color: #d6dce6; background: #20293b; border: 1px solid #ffffff16; border-radius: 3px; font: 10px/1.2 ui-monospace, SFMono-Regular, monospace; }
.arcade-dialog .help-footnote { border-top: 1px solid #ffffff16; margin: 22px 0 0; padding-top: 18px; font-size: 11px !important; color: #909caf !important; }

/* The existing game-card layout stays intact; these make each card playable. */
.game-card[data-game] { display: block; color: inherit; text-decoration: none; touch-action: manipulation; transition: border-color .18s, background .18s; }
.game-card[data-game]:focus-visible { border-color: #eda873b0; outline: 2px solid #eda873; outline-offset: 4px; }
.game-card[data-game] .game-cover img { filter: saturate(.85); }
.game-card[data-game] .game-cover--overcut .game-scene { right: -11%; }
.hero .arcade-auth .arcade-signup { color: #241a14; background: #eda873; border-color: #eda873; }
.hero .arcade-auth .arcade-signup:hover { background: #f7be94; border-color: #f7be94; }
.game-card[data-game] .game-caption { gap: 9px; }
.game-card[data-game] .game-caption > div { min-width: 0; }
.game-card[data-game] .game-caption h3 { min-height: 0; }
.game-card[data-game] .game-kind { display: block; margin: 5px 0 0; color: #99a5ba; font-size: 10px; font-weight: 400; line-height: 1.4; letter-spacing: 0; }
.game-card[data-game] .game-play { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; min-height: 32px; margin-left: auto; padding: 7px 9px; color: #f0d9c7; background: #eda87313; border: 1px solid #eda87344; border-radius: 5px; font: 400 11px/1.3 'Space Grotesk', Arial, sans-serif; white-space: nowrap; transition: background .18s, border-color .18s; }
.game-card[data-game]:hover .game-play,
.game-card[data-game]:focus-visible .game-play { color: #241a14; background: #eda873; border-color: #eda873; }
.game-card[data-game] .game-play svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.arcade-game-note { max-width: 536px; margin: 13px 0 0; color: #a0a9bc; font: 400 10px/1.6 'Space Grotesk', Arial, sans-serif; }
.hero .arcade-auth #open-help { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid #ffffff29; border-radius: 6px; white-space: nowrap; font-family: 'Space Grotesk', Arial, sans-serif; font-size: 13px; font-weight: 400; line-height: 1.4; transition: background .2s, border-color .2s; }
.hero .arcade-auth #open-help:hover { border-color: #ffffff50; background: #ffffff12; }
@media (hover: hover) { .game-card[data-game]:hover { border-color: #eda87360; background: #141d2e; } }
@media (max-width: 600px) {
  #game-view .player-toolbar { gap: 10px; padding-inline: max(8px, env(safe-area-inset-left, 0px)) max(8px, env(safe-area-inset-right, 0px)); }
  #game-view .player-back { min-width: 78px; font-size: 13px; }
  #game-view .active-game { min-width: 0; }
  #game-view .active-game strong { font-size: 12px; }
  #game-view .active-game > span { display: none; }
  #game-view .player-actions { gap: 0; }
  .arcade-dialog { padding: 25px; }
  .arcade-dialog.help-dialog { padding: 25px; }
  .arcade-dialog h2 { font-size: 29px; }
  .arcade-dialog .help-grid { grid-template-columns: 1fr; gap: 20px; }
  .arcade-dialog .help-grid section + section { border-left: 0; padding-left: 0; border-top: 1px solid #ffffff16; padding-top: 20px; }
  .arcade-dialog .help-grid p { margin-bottom: 0; }
  .arcade-dialog .help-grid .help-detail { margin-top: 12px; }
  .game-card[data-game] .game-caption { gap: 6px; padding-inline: 10px; }
  .game-card[data-game] .game-caption .game-number { display: none; }
  .game-card[data-game] .game-play { padding: 6px; font-size: 10px; }
  .game-card[data-game] .game-kind { font-size: 9px; }
  .hero .arcade-auth #open-help { padding-inline: 11px; font-size: 11px; }
}
@media (max-width: 359px) {
  #game-view .player-toolbar { gap: 5px; }
  #game-view .player-back { min-width: 72px; }
  #game-view .active-game strong { max-width: 104px; }
  .arcade-dialog { padding: 22px 20px; }
  .arcade-dialog .dialog-actions { gap: 8px; }
  .arcade-dialog .dialog-actions button { padding-inline: 9px; font-size: 12px; }
  .hero .arcade-auth { gap: 6px; }
  .hero .arcade-auth #open-help { padding-inline: 8px; }
  .game-card[data-game] .game-caption { flex-wrap: wrap; }
  .game-card[data-game] .game-play { width: 100%; margin-top: 5px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  #game-view .player-toolbar { height: 44px; min-height: 44px; padding-top: 0; }
  #game-view .game-status { top: 44px; }
  .arcade-dialog { max-height: calc(100dvh - 20px); }
}
@media (prefers-reduced-motion: reduce) {
  #game-view .loader-mark { animation: none; border-color: #eda873; }
  .game-card[data-game], .game-card[data-game] .game-play { transition: none; }
}
