/* Playable demo affordances. Styling follows the existing button and poster language;
   no approved layout or typography is changed. */
.demo-cta-row{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:0 0 6px}
.demo-note{font-size:12px;color:#aeb9c8;margin:0 0 18px}
.button.demo-button{display:inline-flex;align-items:center;gap:8px}
.button.ghost{background:transparent;color:#f3f6fb;border:1px solid #ffffff55}
.button.ghost:hover{background:#ffffff14}

.poster-cell{display:flex;flex-direction:column;min-width:0}
.poster-cell .game-poster{flex:1}
.poster-demo{align-self:flex-start;margin-top:10px;background:transparent;color:#e7ecf4;border:1px solid #ffffff38;border-radius:30px;padding:9px 15px;font:inherit;font-size:12px;min-height:44px;cursor:pointer;transition:background .2s,border-color .2s}
.poster-demo:hover{background:#ffffff14;border-color:#ffffff70}
.poster-demo:focus-visible{outline:2px solid #ffab74;outline-offset:2px}

body.demo-open{overflow:hidden}
.demo-modal{position:fixed;inset:0;z-index:120;background:#05070bdd;display:flex;align-items:center;justify-content:center;padding:24px}
.demo-modal[hidden]{display:none}
.demo-modal-panel{display:flex;flex-direction:column;width:min(1080px,100%);height:min(820px,100%);background:#0b0e14;border:1px solid #ffffff20;border-radius:6px;overflow:hidden}
.demo-modal-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-bottom:1px solid #ffffff1c}
.demo-modal-bar h2{font:700 22px/1.15 ItalianText,Arial,sans-serif;margin:0;letter-spacing:-.02em}
.demo-modal-bar .eyebrow{font-size:12px;letter-spacing:.12em;margin:0 0 6px;color:#ffab74}
.demo-modal-bar-actions{display:flex;align-items:center;gap:10px}
.demo-status{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#aeb9c8}
.demo-newtab,.demo-close{background:transparent;color:#e7ecf4;border:1px solid #ffffff38;border-radius:30px;font:inherit;font-size:12px;padding:9px 14px;min-height:44px;cursor:pointer}
.demo-close{min-width:44px;padding:9px 12px}
.demo-newtab:hover,.demo-close:hover{background:#ffffff14}
.demo-newtab:focus-visible,.demo-close:focus-visible{outline:2px solid #ffab74;outline-offset:2px}
.demo-modal-stage{position:relative;flex:1;background:#05070b;min-height:0}
.demo-frame{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
.demo-state{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;text-align:center;padding:24px;background:#05070b}
.demo-state[hidden]{display:none}
.demo-state p{margin:0;color:#dbe2ec;font-size:16px}
.demo-state-actions{display:flex;flex-wrap:wrap;gap:14px;align-items:center;justify-content:center}
.demo-help{margin:0;padding:10px 18px;border-top:1px solid #ffffff1c;font-size:13px;line-height:1.5;color:#dbe2ec}
.demo-help[hidden]{display:none}
.demo-help-link{background:none;border:0;padding:0 2px;min-height:44px;font:inherit;color:#ffab74;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.demo-help-link:focus-visible{outline:2px solid #ffab74;outline-offset:2px}
.demo-modal-note{margin:0;padding:12px 18px;border-top:1px solid #ffffff1c;font-size:12px;line-height:1.6;color:#aeb9c8}

@media(max-width:650px),(max-height:560px){
 .demo-modal{padding:0}
 .demo-modal-panel{width:100%;height:100%;border:0;border-radius:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
 .demo-modal-bar{padding:10px 14px}
 .demo-modal-bar h2{font-size:18px}
}
/* Phones keep status, new tab and close reachable: the actions drop to their own row. */
@media(max-width:650px){
 .demo-modal-bar{flex-wrap:wrap;gap:8px}
 .demo-modal-bar>div:first-child{min-width:0}
 .demo-modal-bar-actions{width:100%;justify-content:flex-end}
 .demo-status{margin-right:auto}
 .demo-modal-note{font-size:12px;padding:10px 14px}
 .demo-help{padding:8px 14px}
}
@media(max-height:560px){
 .demo-modal-bar .eyebrow{margin:0 0 2px}
 .demo-modal-note,.demo-help{padding:6px 14px;line-height:1.4}
 .demo-help-link{min-height:44px}
}
@media(prefers-reduced-motion:reduce){.poster-demo{transition:none}}
.hero-video-caption{position:absolute;right:clamp(16px,3vw,40px);top:116px;z-index:2;font-size:12px;letter-spacing:.06em;color:#dbe2ec;background:#05070bb3;padding:4px 10px;border-radius:30px;opacity:0;transition:opacity .4s;pointer-events:none}
.hero-video.is-playing+.hero-video-caption{opacity:1}
@media(max-width:650px){.hero-video-caption{top:100px}}
@media(prefers-reduced-motion:reduce){.hero-video-caption{display:none}}

/* Mobile/Desktop view. Desktop default: a phone-sized frame (390 CSS px wide) centred on a
   dark surround; height follows the viewport up to a phone ratio, never crushed below 480. */
.demo-size{display:inline-flex;border:1px solid #ffffff38;border-radius:30px;padding:2px}
.demo-size button{background:transparent;color:#aeb9c8;border:0;border-radius:30px;font:inherit;font-size:12px;padding:0 14px;min-height:40px;cursor:pointer}
.demo-size button[aria-pressed=true]{background:#f3f6fb;color:#0b0e14}
.demo-size button:focus-visible{outline:2px solid #ffab74;outline-offset:2px}
@media(min-width:651px) and (min-height:561px){
 .demo-modal[data-demo-size=mobile] .demo-modal-stage{overflow:auto;background:radial-gradient(ellipse at center,#161b25,#05070b 70%)}
 .demo-modal[data-demo-size=mobile] .demo-frame{left:50%;top:50%;transform:translate(-50%,-50%);width:390px;height:min(844px,calc(100% - 32px));min-height:480px;border:1px solid #ffffff2a;border-radius:18px;box-shadow:0 20px 60px #0009}
}
/* Phones (portrait or short landscape) always use the full available area. */
@media(max-width:650px),(max-height:560px){.demo-size{display:none}}
@media(min-width:651px) and (min-height:561px){.demo-modal[data-demo-size=mobile][data-demo-orient=landscape] .demo-frame{width:min(844px,calc(100% - 32px));height:390px;min-height:0}}
