.lsm-opening{position:relative;margin:1rem auto;padding:1rem;border:1px solid #d9cfe4;border-radius:22px;background:#fff9f0;color:#29223d;max-width:800px;overflow:hidden}
.lsm-opening[hidden],.lsm-opening [hidden],.game-frame[hidden]{display:none!important}
.lsm-opening video{display:block;width:100%;max-height:55vh;aspect-ratio:16/9;object-fit:contain;background:#fff9f0;border-radius:14px;margin:0 auto 1rem}
.lsm-opening-mark{display:flex;align-items:center;justify-content:center;gap:22px;padding:18px;text-align:left}
.lsm-opening-mark img{width:100px;height:100px;object-fit:contain}
.lsm-opening-mark p{font:700 30px/1.06 Baloo,Nunito,sans-serif;margin:0}
.lsm-opening[data-opening-phase=playing] .lsm-opening-mark,.lsm-opening[data-opening-phase=paused] .lsm-opening-mark{display:none}
.lsm-opening[data-opening-motion=reduced] .lsm-opening-mark{display:flex}
.lsm-opening-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px}
.lsm-opening-actions .button{min-height:44px;padding:10px 17px;font-size:14px;gap:8px}
.lsm-opening-actions label{display:flex;align-items:center;gap:8px;min-height:44px;font-size:13px;font-weight:800}
.lsm-opening-actions input{width:20px;height:20px;accent-color:#4255ff;margin:0}
.lsm-opening [role=status]{margin:10px 0 0;text-align:center;font-size:13px}
.lsm-opening [role=status]:empty{display:none}
.lsm-opening button:focus-visible,.lsm-opening input:focus-visible{outline:3px solid #4255ff;outline-offset:4px}
.reader-audio:has(.lsm-opening){flex-wrap:wrap}.reader-audio .lsm-opening{flex-basis:100%;width:100%}
.reader-stage,.game-stage{position:relative;isolation:isolate}
[data-opening-stage]>.lsm-opening{--opening-controls-height:84px;position:absolute;z-index:3;inset:0;margin:0;padding:0;box-sizing:border-box;border:1.5px solid #25234b;border-radius:12px;max-width:none;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;background:#fff9f0;box-shadow:none}
[data-opening-stage]>.lsm-opening video{position:absolute;inset:0 0 var(--opening-controls-height);width:100%;height:calc(100% - var(--opening-controls-height));max-height:none;aspect-ratio:auto;border-radius:12px 12px 0 0;margin:0;object-fit:contain}
[data-opening-stage]>.lsm-opening .lsm-opening-mark{position:absolute;inset:0 0 var(--opening-controls-height);padding:12px 16px;gap:20px}
[data-opening-stage]>.lsm-opening .lsm-opening-mark img{max-height:100%;object-fit:contain}
[data-opening-stage]>.lsm-opening .lsm-opening-actions{position:absolute;z-index:1;inset:auto 0 0;padding:14px 18px;background:#fff9f0ed;border-top:1px solid #25234b26;backdrop-filter:blur(6px)}
[data-opening-stage]>.lsm-opening [role=status]{position:absolute;z-index:2;inset:8px auto auto 8px;margin:0;background:#fff9f0ed;border-radius:50px;padding:3px 8px;font-size:11px;text-align:left}
[data-opening-stage]>.lsm-opening[data-opening-motion=reduced]{background-image:none!important}
.game-stage[data-opening-phase]:not([data-opening-phase=done]){height:min(740px,76vh);min-height:480px}
.game-stage.viewport-stage[data-opening-phase]:not([data-opening-phase=done]){height:650px;min-height:0}
.game-stage>.game-frame{border-radius:12px}
@media(max-width:740px){.game-stage[data-opening-phase]:not([data-opening-phase=done]){height:70vh;min-height:450px}.game-stage.viewport-stage[data-opening-phase]:not([data-opening-phase=done]){height:610px}}
@media(max-width:480px){.lsm-opening{padding:12px}.lsm-opening-actions{gap:8px}.lsm-opening-actions .button{font-size:13px;padding:10px 11px;min-height:44px;white-space:nowrap}.lsm-opening-actions label{font-size:12px;min-height:44px;white-space:nowrap}.lsm-opening-mark{gap:14px}.lsm-opening-mark img{width:76px;height:76px}.lsm-opening-mark p{font-size:25px}[data-opening-stage]>.lsm-opening{--opening-controls-height:59px}[data-opening-stage]>.lsm-opening .lsm-opening-actions{padding:7px 9px;gap:8px;flex-wrap:nowrap}[data-opening-stage]>.lsm-opening .lsm-opening-actions label{flex:none;gap:6px}[data-opening-stage]>.lsm-opening .lsm-opening-mark{padding:6px 12px}.reader-stage>.lsm-opening .lsm-opening-mark img{width:58px;height:58px}.reader-stage>.lsm-opening .lsm-opening-mark p{font-size:22px}}
@media(max-width:370px){.game-stage.viewport-stage[data-opening-phase]:not([data-opening-phase=done]){height:580px}}
@media(prefers-reduced-transparency:reduce){[data-opening-stage]>.lsm-opening .lsm-opening-actions,[data-opening-stage]>.lsm-opening [role=status]{background:#fff9f0;backdrop-filter:none}}
/* Keep the initial start/skip row in reach on short screens. */
.game-stage[data-opening-phase]:not([data-opening-phase=done]),.game-stage.viewport-stage[data-opening-phase]:not([data-opening-phase=done]){height:clamp(360px,calc(100svh - 230px),650px);min-height:0}
@media(max-width:740px){.game-stage[data-opening-phase]:not([data-opening-phase=done]),.game-stage.viewport-stage[data-opening-phase]:not([data-opening-phase=done]){height:clamp(360px,calc(100svh - 240px),610px)}}
@media(max-width:370px){.game-stage[data-opening-phase]:not([data-opening-phase=done]),.game-stage.viewport-stage[data-opening-phase]:not([data-opening-phase=done]){height:clamp(300px,calc(100svh - 330px),580px)}}
@media(max-height:500px) and (min-width:600px){.game-stage[data-opening-phase]:not([data-opening-phase=done]),.game-stage.viewport-stage[data-opening-phase]:not([data-opening-phase=done]){height:clamp(180px,calc(100svh - 152px),360px)}}
/* Games use one launch/resume target over the opening, without a control bar. */
.lsm-opening[data-opening=game]{--opening-controls-height:0px;padding:0;min-height:180px}
[data-opening-stage]>.lsm-opening[data-opening=game]{--opening-controls-height:0px}
.lsm-opening[data-opening=game] video{position:absolute;inset:0;width:100%;height:100%;max-height:none;aspect-ratio:auto;margin:0;border-radius:inherit}
.lsm-opening[data-opening=game] .lsm-opening-mark{position:absolute;inset:0;padding:12px 16px;gap:18px}
.lsm-opening[data-opening=game][data-opening-phase=ready] .lsm-opening-mark{transform:translateY(-72px)}
.lsm-opening[data-opening=game] .lsm-opening-mark img{width:76px;height:76px}
.lsm-opening[data-opening=game] .lsm-opening-mark p{font-size:25px}
.lsm-opening[data-opening=game] .lsm-opening-actions{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:0;background:transparent;border:0;backdrop-filter:none}
.lsm-opening[data-opening=game][data-opening-phase=playing] .lsm-opening-actions{display:none}
.lsm-opening[data-opening=game] [data-opening-pause],.lsm-opening[data-opening=game] [data-opening-skip],.lsm-opening[data-opening=game] .lsm-opening-actions>label{display:none!important}
@media(max-height:500px) and (min-width:600px){.lsm-opening[data-opening=game][data-opening-phase=ready] .lsm-opening-mark{display:none}}
