/* News games (2026-11-19): pulsing game frame on cards and the floating 16:9 game window (games-host.js). */
/* 2026-11-22: the game colour is the game frame token of content-tokens.css (complementary to the theme accent). */
:root{--game-glow:var(--frame-game,#00a6c7);--game-glow-soft:color-mix(in srgb,var(--game-glow) 45%,transparent);--game-on-glow:#00161c}
:root[data-theme=dark]{--game-on-glow:#001b21}

/* Card frame (reader 0.14.5): the game card keeps ITS frame - the width and the dashing of its content type, or the 2px line of the spoken edition - and takes only the game colour.
   The glow breathes around that very frame; there is no second ring. .card-game-glow is just the halo: it lies exactly over the card (it follows the card panel in the
   fit-to-height reading, see reader.css). A dashed frame (an SVG in the article) glows along its dashes instead; the game card stays framed when it has been seen. */
.news-card[data-game=ready]{--card-line:var(--game-glow);--frame-glow:var(--game-glow)}
.news-card[data-game=ready]:not([data-frame=short-dash]):not([data-frame=long-dash])>.card-surface{border-color:var(--game-glow)}
.news-card[data-game=ready]:is([data-frame=short-dash],[data-frame=long-dash])>.card-outline{display:block;color:var(--game-glow);animation:game-outline-glow 2.4s ease-in-out infinite}
.card-game-glow{position:absolute;inset:0;z-index:0;border-radius:var(--radius,22px);pointer-events:none}
.card-game-glow::after{content:'';position:absolute;inset:0;border-radius:inherit;box-shadow:0 0 12px 2px var(--game-glow-soft),0 0 30px 7px var(--game-glow-soft);opacity:.2;animation:game-glow 2.4s ease-in-out infinite}
.news-card[data-game=ready]:is([data-frame=short-dash],[data-frame=long-dash],[data-frame=none])>.card-game-glow{display:none}
@keyframes game-glow{50%{opacity:1}}
@keyframes game-outline-glow{0%,100%{filter:drop-shadow(0 0 1px var(--game-glow-soft))}50%{filter:drop-shadow(0 0 3px var(--game-glow)) drop-shadow(0 0 9px var(--game-glow-soft))}}
@media(prefers-reduced-motion:reduce){.card-game-glow::after{animation:none;opacity:.6}.news-card[data-game=ready]>.card-outline{animation:none;filter:drop-shadow(0 0 4px var(--game-glow-soft))}}
@media(forced-colors:active){.card-game-glow{display:none}.news-card[data-game=ready]>.card-surface{border-style:solid;border-color:Highlight}.news-card[data-game=ready]>.card-outline{color:Highlight;animation:none;filter:none}}

/* Play button: always visible, never part of the read-more/expand controls. */
.card-game{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:14px 0 6px}
.game-play-button{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 17px 8px 14px;border:0;border-radius:999px;background:var(--game-glow);color:var(--game-on-glow);font:inherit;font-size:13px;font-weight:800;line-height:1.1;cursor:pointer;box-shadow:0 0 0 0 var(--game-glow-soft);transition:transform .15s,box-shadow .2s}
.game-play-button svg{width:13px;height:13px;flex:none;fill:currentColor;stroke:none}
.game-play-button:hover{transform:translateY(-1px);box-shadow:0 0 16px 2px var(--game-glow-soft)}
.game-play-button:focus-visible{outline:2px solid var(--ink,currentColor);outline-offset:3px}
.card-game-title{min-width:0;font-size:12px;font-weight:700;line-height:1.3;color:var(--metadata,var(--muted))}
@media(prefers-reduced-motion:reduce){.game-play-button{transition:none}.game-play-button:hover{transform:none}}
@media(forced-colors:active){.game-play-button{border:2px solid ButtonText}}

/* Game window: dark player chrome in both themes; the stage below the header is always 16:9. */
.game-window{box-sizing:content-box;position:fixed;z-index:24;left:8px;top:8px;width:640px;display:flex;flex-direction:column;overflow:hidden;color:#f2f6f8;background:#0b0d10;border:1px solid color-mix(in srgb,var(--game-glow) 55%,#0b0d10);border-radius:14px;box-shadow:0 24px 70px rgba(0,0,0,.45),0 0 26px -6px var(--game-glow-soft)}
.game-window-header{flex:none;display:flex;align-items:center;gap:8px;min-height:44px;padding:0 5px 0 14px;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;background:linear-gradient(180deg,#181c22,#101317);border-bottom:1px solid #232930}
.game-window.is-dragging .game-window-header{cursor:grabbing}
.game-window-title{flex:1 1 auto;min-width:0;margin:0;overflow:hidden;color:#fff;font-size:14px;font-weight:800;line-height:1.2;white-space:nowrap;text-overflow:ellipsis}
.game-window-badge{flex:none;padding:3px 8px;border-radius:999px;background:#ffd23f;color:#1d1600;font-size:10px;font-weight:800;letter-spacing:.06em;line-height:1.3;text-transform:uppercase}
.game-window-badge[hidden]{display:none}
.game-window-actions{flex:none;display:flex;align-items:center;gap:1px}
.game-window-button{display:inline-grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:9px;color:#d7dfe5;background:transparent;cursor:pointer}
.game-window-button:hover{color:#fff;background:rgba(255,255,255,.09)}
.game-window-button[data-game-action=close]:hover{background:#d93f45}
.game-window-button svg{width:18px;height:18px;fill:currentColor}
.game-window svg .stroke{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.game-window :is(.game-window-button,.game-window-resize,.game-window-resume):focus-visible{outline:2px solid var(--game-glow);outline-offset:-2px}
.game-window-stage{position:relative;flex:none;width:100%;aspect-ratio:16/9;overflow:hidden;background:#000}
.game-window-frame{position:absolute;inset:0;display:block;width:100%;height:100%;border:0;background:#000;color-scheme:normal}
.game-window:is(.is-dragging,.is-resizing) .game-window-frame{pointer-events:none}
.game-window-message{position:absolute;inset:0;display:grid;place-items:center;margin:0;padding:24px;color:#c8d2d9;font-size:14px;text-align:center}
.game-window-message[hidden]{display:none}
.game-window[data-state=error] .game-window-message{color:#ffb8b8}
.game-window-resume{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px;border:0;color:#fff;background:rgba(0,0,0,.64);font:inherit;cursor:pointer}
.game-window-resume[hidden]{display:none}
.game-window-resume svg{width:58px;height:58px;padding:16px;border-radius:50%;color:var(--game-on-glow);background:var(--game-glow);fill:currentColor;box-shadow:0 0 22px var(--game-glow-soft)}
.game-window-resume strong{font-size:18px}
.game-window-resume span{font-size:13px;opacity:.85}
.game-window-resize{position:absolute;right:0;bottom:0;z-index:2;width:30px;height:30px;padding:0;border:0;background:transparent;cursor:nwse-resize;touch-action:none}
.game-window-resize::before{content:'';position:absolute;right:6px;bottom:6px;width:12px;height:12px;border-right:2px solid rgba(255,255,255,.85);border-bottom:2px solid rgba(255,255,255,.85);border-bottom-right-radius:3px;filter:drop-shadow(0 0 2px #000)}

/* Maximized (CSS fallback, e.g. iOS Safari) and real fullscreen: the 16:9 game is centered and letterboxed on black. */
.game-window:is(.is-maximized,.is-fullscreen,:fullscreen){inset:0;width:auto;max-width:none;border:0;border-radius:0}
.game-window:is(.is-maximized,.is-fullscreen,:fullscreen) .game-window-header{cursor:default}
.game-window:is(.is-maximized,.is-fullscreen,:fullscreen) .game-window-stage{flex:1 1 auto;min-height:0;aspect-ratio:auto;container-type:size}
.game-window:is(.is-maximized,.is-fullscreen,:fullscreen) .game-window-frame{inset:auto;left:50%;top:50%;width:min(100cqw,100cqh*16/9);height:min(100cqh,100cqw*9/16);transform:translate(-50%,-50%)}
.game-window:is(.is-maximized,.is-fullscreen,:fullscreen) :is(.game-window-resize,[data-game-action=smaller],[data-game-action=larger]){display:none}
.game-window:fullscreen::backdrop{background:#000}
@media(max-width:560px){.game-window [data-game-action=smaller],.game-window [data-game-action=larger]{display:none}.game-window-header{padding-left:10px}.game-window-button{width:34px;height:34px}}
@media(forced-colors:active){.game-window{border:1px solid CanvasText}.game-window-badge{border:1px solid CanvasText}}
/* Cover pictures in the card: the 16:9 gameplay picture of a game (2026-11-19) and the cover of an audio post (2026-11-20) share one
   round play button, the same one for games and audio posts. */
.game-cover,.audio-media{position:relative;aspect-ratio:16/9;overflow:hidden;background:#0b0d12}
.news-grid .card-media.audio-media{aspect-ratio:16/9}
.game-cover img,.audio-media>img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .35s ease}
.game-cover-play,.audio-cover-play{position:absolute;inset:0;display:grid;place-items:center;width:100%;height:100%;padding:0;border:0;background:linear-gradient(180deg,rgba(0,0,0,0) 45%,rgba(0,0,0,.35));color:#fff;cursor:pointer;text-decoration:none}
/* Round, but exactly the video play button's look (.youtube-play: #181818a8, 1px #ffffff78, no blur), owner request
   2026-11-19; backdrop-filter:none removes the blur inherited from the shared .play-circle (style.css) */
.game-cover-play .play-circle,.audio-cover-play .play-circle{display:grid;place-items:center;width:64px;height:64px;border:1px solid #ffffff78;border-radius:50%;background:#181818a8;color:#fff;-webkit-backdrop-filter:none;backdrop-filter:none;transition:transform .15s,background .15s}
.game-cover-play .play-circle svg,.audio-cover-play .play-circle svg{width:30px;height:30px;margin-left:4px}
.game-cover-play:hover .play-circle,.game-cover-play:focus-visible .play-circle,.audio-cover-play:hover .play-circle,.audio-cover-play:focus-visible .play-circle{transform:scale(1.08);background:#181818e8}
.game-cover:hover img,.audio-media:hover>img{transform:scale(1.03)}
.game-cover-play:focus-visible{outline:3px solid var(--game-glow);outline-offset:-3px}
.game-tag{background:var(--game-glow);color:var(--game-on-glow);font-weight:800;letter-spacing:.04em}
@media(prefers-reduced-motion:reduce){.game-cover img,.audio-media>img,.game-cover-play .play-circle,.audio-cover-play .play-circle{transition:none}}

/* Audio posts (2026-11-20): label tag and duration reuse .media-tag / .video-duration; a thin progress line and the m:ss / m:ss counter appear
   once the audio has started. Let's Talk uses the same cover and button as a link (it cannot be framed). */
.audio-cover-play .play-circle svg{fill:currentColor;stroke:none}
.audio-media[data-state=playing] .audio-cover-play .play-circle svg{margin-left:0}
.audio-cover-play:focus-visible{outline:3px solid #fff;outline-offset:-3px}
.audio-duration:empty{display:none}
.audio-progress{position:absolute;left:0;right:0;bottom:0;z-index:2;height:4px;background:rgba(255,255,255,.3);pointer-events:none}
.audio-progress[hidden]{display:none}
.audio-progress>span{display:block;width:0;height:100%;background:#fff}
.audio-hint{position:absolute;left:12px;right:12px;bottom:36px;z-index:3;padding:8px 12px;border-radius:8px;background:#181818ee;color:#fff;font-size:12px;line-height:1.45;text-align:center}
.audio-hint:empty{display:none}
@media(forced-colors:active){.game-cover-play .play-circle,.audio-cover-play .play-circle{border-color:ButtonText;background:ButtonFace;color:ButtonText}.audio-cover-play:focus-visible,.game-cover-play:focus-visible{outline-color:Highlight}.audio-progress{background:Canvas;border-top:1px solid CanvasText}.audio-progress>span{background:Highlight}.audio-hint{border:1px solid CanvasText;background:Canvas;color:CanvasText}}
