.hero-play-trigger{position:absolute;bottom:86px;left:50%;transform:translateX(-50%);white-space:nowrap;box-shadow:0 8px 30px #34215333;z-index:3;background:#1c211f}.hero-play-trigger:hover{transform:translateX(-50%) translateY(-2px)}
#hero-game{width:min(940px,96vw);max-height:94dvh;padding:0;border:0;border-radius:24px;background:#f8f9f5;color:#1c211f;overflow:auto;box-shadow:0 24px 100px #15112355}#hero-game::backdrop{background:#181324b8;backdrop-filter:blur(8px)}.hg-header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;gap:16px}.hg-header p{margin:0;font-size:11px;letter-spacing:2px}.hg-header h2{font-size:26px;letter-spacing:-1px}.hg-close{border:0;background:#e7e7e1;border-radius:50%;width:42px;height:42px;font-size:25px}.hg-stage{position:relative;background:#d9cef6}.hg-stage canvas{width:100%;display:block;aspect-ratio:900/570;touch-action:none}.hg-hud{position:absolute;top:14px;left:18px;right:18px;display:flex;align-items:center;justify-content:space-between;gap:8px;pointer-events:none}.hg-hud span,.hg-hud button{background:#ffffffdf;border:0;border-radius:30px;padding:9px 14px;font-weight:700;font-size:13px}.hg-hud button{pointer-events:auto}.hg-panel{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#d9cef644;padding:20px;overflow:auto}.hg-panel[hidden]{display:none}.hg-card{background:#f8f9f5f5;max-width:460px;width:100%;padding:26px;border-radius:22px;text-align:center;box-shadow:0 16px 50px #4b337333}.hg-card h3{font-size:29px;letter-spacing:-1px;margin:10px 0}.hg-card p{font-size:14px;line-height:1.55}.hg-card .hg-star{display:block;font-size:45px;color:#7951ad}.hg-card .hg-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.hg-card button{padding:12px 18px;min-height:44px;font-size:14px}.hg-secondary{background:transparent;color:#1c211f}.hg-card form{text-align:left;display:grid;gap:10px}.hg-card label{font-size:13px;font-weight:600}.hg-card input{display:block;width:100%;padding:10px;border:1px solid #aaa7b1;border-radius:6px;margin-top:4px}.hg-card .hg-notice{font-size:12px;color:#59615a}.hg-controls{padding:12px 20px;display:flex;gap:14px;align-items:center;justify-content:space-between}.hg-controls p{font-size:12px;max-width:490px;line-height:1.5;margin:0}.hg-pad{display:flex;gap:5px}.hg-pad button{width:43px;height:43px;border:1px solid #ccc5d8;border-radius:10px;background:#e8def9;touch-action:none;font-size:20px}.hg-win .hg-star{animation:hg-pop .65s cubic-bezier(.2,1.6,.4,1)}.hg-win{animation:hg-enter .4s ease-out}@keyframes hg-pop{from{transform:scale(.15) rotate(-40deg)}to{transform:scale(1) rotate(0)}}@keyframes hg-enter{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){#hero-game{width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0}.hg-header{padding:12px 16px}.hg-stage canvas{height:57dvh;aspect-ratio:auto;object-fit:contain}.hg-card{padding:18px}.hg-card h3{font-size:24px}.hg-controls{flex-direction:column}.hg-panel{padding:12px}.hg-hud{left:8px;right:8px;top:8px}.hg-hud span,.hg-hud button{font-size:12px;padding:7px 10px}}
.hg-panel{align-items:safe center}.hg-card .hg-actions{margin-top:14px}
.hg-panel{z-index:5}.hg-hud{z-index:6}.hg-stage .game-fx{z-index:4}.hg-stage.fx-hit canvas{animation:fx-nudge .23s}.hg-stage .fx-badge{font-size:18px}.hg-stage .fx-win{font-size:clamp(18px,3vw,30px);background:#263a1c;color:#eaffc4;border-color:#e1c167}.hg-speed{position:absolute;bottom:15px;left:22px;z-index:3;background:#faf8f0ee;border:1px solid #fff;border-radius:12px;padding:9px 12px;min-width:135px;pointer-events:none;font-size:11px;font-weight:700;box-shadow:0 3px 15px #422e4b15}.hg-speed>div{height:6px;border-radius:6px;overflow:hidden;background:#ddd6e4;margin-top:6px}.hg-speed i{display:block;height:100%;background:#6e5597;width:0;transition:width .1s}.hg-urgent{background:#8f3023!important;color:#fff;border-color:#fff!important}#hero-game>.game-progress{padding:10px 24px;background:#faf8fc;margin:0}#hero-game .game-sound{margin:0;color:#263923;background:#ffffffe6!important;pointer-events:auto}#hero-game .game-sound[aria-pressed=true]{background:#c9f568!important}#hero-game[data-mode=celebrating] .hg-hud{opacity:.75}#hero-game[data-mode=win] .hg-card{border:2px solid #eac367;background:#fffdf0f5}#hero-game .hg-win .hg-star{font-size:48px;text-shadow:0 4px 20px #ffc95666}#hero-game .hg-pad button:active{transform:translateY(2px);box-shadow:inset 0 2px 4px #56437530}@media(max-width:600px){.hg-hud{flex-wrap:wrap;gap:5px}#hero-game .hg-hud span,#hero-game .hg-hud button{font-size:11px;padding:7px 9px}.hg-time{margin-right:0}.hg-speed{left:12px;bottom:12px;min-width:105px}#hero-game>.game-progress{padding:8px 14px}.hg-stage .fx-badge{font-size:14px;padding:5px 9px}}
/* Let the diorama remain the main event, including before the first roll. */
#hero-game{width:min(1120px,97vw);background:#ede5f4;border:1px solid #ffffff80;box-shadow:0 35px 140px #17102070}
.hg-header{background:#faf8fc;padding:15px 24px}.hg-header p{color:#83748e;font-size:10px}.hg-header h2{font-size:25px}
.hg-stage{background:#d8c8f2;isolation:isolate}.hg-stage canvas{aspect-ratio:1120/680;height:min(65vh,680px);outline-offset:-4px}
.hg-hud{top:20px;left:24px;right:24px}.hg-hud span,.hg-hud button{padding:11px 17px;background:#fff9;backdrop-filter:blur(12px);border:1px solid #fff9;box-shadow:0 3px 14px #6950780c}.hg-score{font-variant-numeric:tabular-nums}.hg-time{margin-left:auto;margin-right:8px}
.hg-controls{background:#faf8fc;border:0;padding:12px 24px}.hg-pad button{background:#eee5f6;border-color:#d9cce5}.hg-pad button:active{background:#c9f568}
.hg-panel{background:#d9cef61a;padding:24px;align-items:safe flex-end;justify-content:flex-end}.hg-card{background:#fcfaffeb;backdrop-filter:blur(18px);border:1px solid #fff;box-shadow:0 12px 36px #56446821;text-align:left;border-radius:18px;padding:22px;max-width:400px}.hg-card .hg-star{display:none}.hg-card h3{font-size:26px;margin:0 0 8px}.hg-card p{font-size:13px;margin:0 0 14px;color:#655b6c}.hg-card .hg-actions{justify-content:flex-start}.hg-card button{border-radius:9px}.hg-win .hg-star{display:block;font-size:32px;color:#ad7921;margin-bottom:8px}
#hero-game[data-mode="entry"] .hg-panel{background:#d9cef655;align-items:safe center}
@media(max-width:600px){#hero-game{width:100%;height:100dvh;border:0;border-radius:0}.hg-stage canvas{height:65dvh;aspect-ratio:auto}.hg-header{padding:12px 16px}.hg-hud{top:12px;left:12px;right:12px}.hg-hud span,.hg-hud button{font-size:11px;padding:9px 11px}.hg-panel{padding:12px}.hg-card{max-width:none;padding:17px}.hg-card h3{font-size:22px}.hg-card p{font-size:12px;line-height:1.45}.hg-card button{font-size:13px;padding:10px 13px}.hg-controls{padding:10px 14px;gap:8px}.hg-controls p{font-size:11px}.hg-pad{gap:10px}.hg-pad button{width:48px;height:45px}}
