/* Temple of Trouble — 21 active trap chambers, unified cinematic presentation.
   Visuals only: never intercept input, alter timers, hide instructions, or change scores. */
#r20MiniGame .temple-shell[data-trap]{
 --tc-gold:#ffdb87;--tc-light:#d5faff;--tc-accent:#43d6d9;--tc-deep:#102840;
 position:relative;isolation:isolate;
 background:
  radial-gradient(ellipse at 50% 0%,color-mix(in srgb,var(--tc-accent),transparent 87%),transparent 58%),
  linear-gradient(155deg,#091b30 0%,var(--tc-deep) 54%,#09152b 100%);
 border:2px solid #cfaa70;border-radius:clamp(14px,2vw,26px);
 box-shadow:inset 0 2px 0 #ffe9ac2b,inset 0 0 55px #061121aa,0 12px 38px #0009;
 color:#f5f8ff;min-width:0;
}
#r20MiniGame .temple-shell[data-trap]::before{
 content:"";position:absolute;inset:7px;border:1px solid #e5c47c48;
 border-radius:inherit;pointer-events:none;z-index:0;
}
#r20MiniGame .temple-shell[data-trap] > *{position:relative;z-index:1;min-width:0}
#r20MiniGame .temple-shell[data-trap] .temple-title{
 color:#ffedb0;text-shadow:0 2px 0 #9b5d27,0 5px 12px #000d,0 0 13px #ffc96155;
 line-height:1.08;letter-spacing:.02em;text-align:center;
}
#r20MiniGame .temple-shell[data-trap] .temple-kicker{
 color:#d3fff0;text-align:center;letter-spacing:.06em;text-shadow:0 2px 7px #000;
}
#r20MiniGame .temple-shell[data-trap] :is(.temple-hud,.temple-x-scene,.temple-classic-stage,.temple-trap-controls){
 min-width:0;max-width:100%;box-sizing:border-box;
}
#r20MiniGame .temple-shell[data-trap] :is(.temple-trap-banner,.temple-trap-instruction,.temple-preview,.temple-round-note,.temple-x-intro,.temple-classic-tag){
 color:#fff3cb;line-height:1.26;overflow-wrap:anywhere;text-align:center;text-shadow:0 2px 5px #071020;
}
#r20MiniGame .temple-shell[data-trap] :is(.temple-classic-panel,.temple-x-stage){
 position:relative;min-width:0;max-width:100%;isolation:isolate;
 border:2px solid color-mix(in srgb,var(--tc-accent),#ffe0a0 32%);
 border-radius:clamp(14px,1.6vw,23px);
 background:radial-gradient(ellipse at 50% 8%,color-mix(in srgb,var(--tc-accent),transparent 80%),transparent 64%),
 linear-gradient(160deg,#173957,#10223d 70%,#172c41);
 box-shadow:inset 0 1px 0 #fff6,inset 0 0 28px #09132f,0 8px 23px #0008;
 overflow:hidden;
}
#r20MiniGame .temple-shell[data-trap] :is(.temple-classic-panel,.temple-x-stage)::before{
 content:"✦";position:absolute;right:1.5%;top:1%;color:#ffe7a575;font-size:clamp(14px,2vw,26px);pointer-events:none;
}
#r20MiniGame .temple-shell[data-trap] :is(.temple-classic-heading,.temple-x-heading){
 color:#fff0bb;font-weight:1000;letter-spacing:.055em;
 text-shadow:0 3px 1px #6c3d1a,0 5px 12px #000a;text-align:center;
}
#r20MiniGame .temple-shell[data-trap] :is(.temple-x-hint,.temple-x-note,.temple-classic-tag){
 color:#d9f7ff;font-weight:800;text-align:center;
}
#r20MiniGame .temple-shell[data-trap] :is(button.temple-option,button.temple-new-button,button.temple-x-button,button.temple-boulder-blitz-choice,button.temple-transmitter-submit,button.temple-trap-ready-button){
 min-width:0;max-width:100%;touch-action:manipulation;
 border:2px solid #e7cb88;border-radius:clamp(10px,1.25vw,17px);
 color:#fff7d7;background:linear-gradient(155deg,#2a6681,#173b5e 75%,#244a61);
 box-shadow:inset 0 1px 0 #fff6,0 4px 0 #0a233a,0 6px 16px #0008;
 text-shadow:0 2px 4px #061328;line-height:1.18;overflow-wrap:anywhere;
}
#r20MiniGame .temple-shell[data-trap] button:focus-visible{
 outline:3px solid #ffffff;outline-offset:3px;
}
@media(hover:hover){
 #r20MiniGame .temple-shell[data-trap] :is(button.temple-option,button.temple-new-button,button.temple-x-button,button.temple-boulder-blitz-choice):hover:not(:disabled){
  filter:brightness(1.16);box-shadow:0 0 0 2px #ffe19a99,0 6px 17px #0009;
 }
}
#r20MiniGame .temple-shell[data-trap] :is(button.temple-option,button.temple-new-button,button.temple-x-button,button.temple-boulder-blitz-choice):active:not(:disabled){
 transform:translateY(1px);
}
#r20MiniGame .temple-shell[data-trap] :is(.temple-x-result,.temple-x-golden-result,.temple-river-result,.temple-classic-result-line){
 border-radius:12px;border:1px solid #d8c08a;
 box-shadow:inset 0 1px 0 #fffbda33,0 4px 10px #0006;
}
#r20MiniGame .temple-shell[data-trap] :is(.temple-x-results,.temple-river-results,.temple-x-golden-results){
 min-width:0;max-width:100%;gap:clamp(5px,.8vw,13px);
}

/* Every active trap keeps its own magic, palette and legible board identity. */
#r20MiniGame .temple-shell[data-trap="stones"]{--tc-accent:#e7bb70;--tc-deep:#352b39}
#r20MiniGame .temple-shell[data-trap="boulder"]{--tc-accent:#ef935f;--tc-deep:#332b35}
#r20MiniGame .temple-shell[data-trap="symbols"]{--tc-accent:#b390ff;--tc-deep:#28254b}
#r20MiniGame .temple-shell[data-trap="floor"]{--tc-accent:#53cfb7;--tc-deep:#163c3c}
#r20MiniGame .temple-shell[data-trap="switch"]{--tc-accent:#ffe477;--tc-deep:#383b4c}
#r20MiniGame .temple-shell[data-trap="ropes"]{--tc-accent:#b8e997;--tc-deep:#263d33}
#r20MiniGame .temple-shell[data-trap="countdown"]{--tc-accent:#a9e6fa;--tc-deep:#1c3852}
#r20MiniGame .temple-shell[data-trap="boulder_run"]{--tc-accent:#ffa66c;--tc-deep:#3c2931}
#r20MiniGame .temple-shell[data-trap="crushing_walls"]{--tc-accent:#faab86;--tc-deep:#432a38}
#r20MiniGame .temple-shell[data-trap="gem_avalanche"]{--tc-accent:#77eaff;--tc-deep:#103f5c}
#r20MiniGame .temple-shell[data-trap="river_crossing"]{--tc-accent:#66e7ed;--tc-deep:#17475a}
#r20MiniGame .temple-shell[data-trap="ancient_code"]{--tc-accent:#daa1fa;--tc-deep:#382c54}
#r20MiniGame .temple-shell[data-trap="cursed_treasure"]{--tc-accent:#ffdc7c;--tc-deep:#45302d}
#r20MiniGame .temple-shell[data-trap="golden_balance"]{--tc-accent:#ffd374;--tc-deep:#47372e}
#r20MiniGame .temple-shell[data-trap="rune_word_rush"]{--tc-accent:#c69cff;--tc-deep:#302858}
#r20MiniGame .temple-shell[data-trap="crystal_lift"]{--tc-accent:#7df7e8;--tc-deep:#164655}
#r20MiniGame .temple-shell[data-trap="moonbeam_escape"]{--tc-accent:#b6c5ff;--tc-deep:#242d58}
#r20MiniGame .temple-shell[data-trap="forbidden_echo"]{--tc-accent:#ffb6e1;--tc-deep:#482b4e}
#r20MiniGame .temple-shell[data-trap="whisper_vault"]{--tc-accent:#f2db9d;--tc-deep:#463c32}
#r20MiniGame .temple-shell[data-trap="temple_transmitter"]{--tc-accent:#9debff;--tc-deep:#193e5c}
#r20MiniGame .temple-shell[data-trap="quicksand_grid"]{--tc-accent:#b6fa87;--tc-deep:#273f37}

/* 1 — Stepping stones: carved sandstone pedestals with an illuminated rune. */
#r20MiniGame .temple-shell[data-trap="stones"] .temple-classic-step{
 background:linear-gradient(155deg,#f2d6a1,#966b4e 62%,#4c3441);
 border:2px solid #ffe4ae;border-radius:16px;
 box-shadow:inset 0 3px 0 #fff8,0 7px 0 #3b2834,0 9px 20px #0009;
}
/* 2 & 8 — Boulder traps: rocky caves rather than generic numbered cards. */
#r20MiniGame .temple-shell[data-trap="boulder"] :is(.temple-classic-tunnel,.temple-boulder-blitz-choice),
#r20MiniGame .temple-shell[data-trap="boulder_run"] :is(.temple-boulder-lane,.temple-classic-corridor){
 border:2px solid #d9a77b;border-radius:17px;
 background:radial-gradient(ellipse at 50% 7%,#765745,#1b2534 75%);
 box-shadow:inset 0 0 22px #0009,0 5px 12px #0007;
}
#r20MiniGame .temple-shell[data-trap="boulder"] .temple-classic-tunnel.is-safe{
 box-shadow:inset 0 0 19px #47ffbb66,0 0 20px #64eabd88;
}
/* 3 — Rune wall: ancient violet tiles with clear numbering. */
#r20MiniGame .temple-shell[data-trap="symbols"] :is(.temple-classic-rune,.temple-seal){
 border:2px solid #c5a3ff;border-radius:11px;
 background:linear-gradient(155deg,#5a497d,#27284b);
 color:#fff4dc;box-shadow:inset 0 2px 0 #fff4,0 4px 9px #0009;
}
/* 4 — Trapdoor Tango: shapes and slots retain unambiguous colours. */
#r20MiniGame .temple-shell[data-trap="floor"] :is(.temple-classic-colour,.temple-new-tile,.temple-new-slot){
 border:3px solid #b0e8c2;border-radius:12px;
 box-shadow:inset 0 2px 0 #fff7,0 5px 12px #0008;
}
/* 5 — Mystery Switches: energetic voltage, without blocking actual clues. */
#r20MiniGame .temple-shell[data-trap="switch"] :is(.temple-classic-switch,.temple-switch-clue){
 border:2px solid #ffe19b;border-radius:12px;
 box-shadow:inset 0 0 17px #ffcf5833,0 5px 13px #0008;
}
/* 6 — Rope Roulette: woven bridge/plank feeling. */
#r20MiniGame .temple-shell[data-trap="ropes"] .temple-classic-rope{
 border:2px solid #d8c689;border-radius:15px;
 background:linear-gradient(155deg,#53734c,#29483f 72%,#6a4a3b);
 box-shadow:inset 0 1px 0 #dffcb777,0 6px 0 #2f281b;
}
/* 7 — Temple Countdown: elegant clock-face, restrained while timing. */
#r20MiniGame .temple-shell[data-trap="countdown"] .temple-classic-clock-ring{
 border-color:#ffe2a2;box-shadow:0 0 24px #c6eafe72,inset 0 0 23px #183252;
}
/* 9 — Crushing Walls: ominous glowing sandstone blocks. */
#r20MiniGame .temple-shell[data-trap="crushing_walls"] :is(.temple-classic-wall,.temple-wall-bar){
 border-color:#ffc39b;box-shadow:inset 0 0 22px #742c30,0 0 18px #d3624a51;
}
/* 10 — Gem Avalanche: icy sapphire rather than bland flat icons. */
#r20MiniGame .temple-shell[data-trap="gem_avalanche"] :is(.temple-gem-wave,.temple-gem-drop,.temple-avalanche-gem){
 filter:drop-shadow(0 1px 4px #a8efff) drop-shadow(0 0 11px #18cfff88);
}
/* 11 — River Crossing: turquoise water, raised golden rafts. */
#r20MiniGame .temple-shell[data-trap="river_crossing"] :is(.temple-river-crossing-track,.temple-river-three-stage){
 border:2px solid #8ae9d9;border-radius:17px;
 background:linear-gradient(165deg,#11536c,#0b2d56 68%,#1d5a65);
 box-shadow:inset 0 0 28px #17cde633,0 6px 16px #0008;
}
#r20MiniGame .temple-shell[data-trap="river_crossing"] .temple-river-rule{
 border:1px solid #9ddedb;border-radius:11px;background:#163e58;
}
/* 12 — Ancient Code: runic lock and high-contrast numbered slots. */
#r20MiniGame .temple-shell[data-trap="ancient_code"] :is(.temple-new-slot,.temple-new-tile){
 border:2px solid #f5da9d;border-radius:12px;
 background:linear-gradient(145deg,#634b81,#2c3153);
 box-shadow:inset 0 2px 0 #fff6,0 5px 0 #1a213e;
}
/* 13 — Cursed Treasure: gold-edged ancient altar, not a generic card grid. */
#r20MiniGame .temple-shell[data-trap="cursed_treasure"] :is(.temple-cursed-arena,.temple-cursed-guide-step){
 border:2px solid #e3bd70;border-radius:16px;
 background:linear-gradient(160deg,#624127,#352b3a 67%,#1a2534);
 box-shadow:inset 0 1px 0 #ffe4a177,0 8px 21px #0008;
}
/* 14 — Guardian's Scales: monumental gold altar with focal target. */
#r20MiniGame .temple-shell[data-trap="golden_balance"] .temple-x-golden-altar{
 border-radius:21px;background:radial-gradient(ellipse at center,#907446,#46372c 65%,#1b2434);
 box-shadow:inset 0 0 29px #ffe0a044,0 7px 23px #0008;
}
#r20MiniGame .temple-shell[data-trap="golden_balance"] .temple-x-golden-target{
 border:2px solid #ffde91;box-shadow:0 0 19px #ffc45d75,inset 0 0 18px #ffe29355;
}
/* 15 — Rune Word Rush: tactile engraved letter tiles and progress. */
#r20MiniGame .temple-shell[data-trap="rune_word_rush"] .temple-x-letter{
 border:2px solid #e4d3ff;border-radius:11px;
 background:linear-gradient(155deg,#705d9d,#34345e);
 box-shadow:inset 0 2px 0 #fff6,0 5px 0 #282247;
}
#r20MiniGame .temple-shell[data-trap="rune_word_rush"] .temple-x-rune-tier.is-earned{
 border-color:#ffe19a;box-shadow:0 0 17px #ffd56688;
}
/* 16 — Crystal Lift Panic: jewel tower and readable stopping zone. */
#r20MiniGame .temple-shell[data-trap="crystal_lift"] :is(.temple-x-lift,.temple-x-landing){
 border-color:#9afbef;box-shadow:inset 0 0 19px #68ddca51,0 0 15px #69ffff4a;
}
/* 17 — Moonbeam Escape: moonlit mirror frames and visible light path. */
#r20MiniGame .temple-shell[data-trap="moonbeam_escape"] :is(.temple-x-mirror,.temple-x-door){
 border:2px solid #d7d6ff;box-shadow:0 0 16px #929dff69,inset 0 0 20px #ddd7ff33;
}
/* 18 — Forbidden Echo: separate resonating symbols clearly. */
#r20MiniGame .temple-shell[data-trap="forbidden_echo"] .temple-x-echo-symbol{
 border:2px solid #ffc8e9;border-radius:15px;
 background:radial-gradient(circle,#945076,#382c56);
 box-shadow:0 0 16px #ec82e477,inset 0 2px 0 #fff4;
}
/* 19 — Whisper Vault: gilded combination lock and accessible keyboard. */
#r20MiniGame .temple-shell[data-trap="whisper_vault"] :is(.temple-x-vault,.temple-vault-phone){
 border:2px solid #e8c47c;border-radius:17px;
 background:linear-gradient(150deg,#534831,#23313f 70%);
 box-shadow:inset 0 0 22px #ffdd8f35,0 7px 19px #0008;
}
#r20MiniGame .temple-shell[data-trap="whisper_vault"] .temple-vault-letter{
 border:1px solid #e6c78e;box-shadow:inset 0 1px 0 #fff5;
}
/* 20 — Temple Transmitter: cool signal chamber with clearly marked sweet spot. */
#r20MiniGame .temple-shell[data-trap="temple_transmitter"] :is(.temple-x-channel,.temple-transmitter-aim){
 border-color:#8bdfff;box-shadow:inset 0 0 17px #30bbed44,0 4px 14px #0008;
}
#r20MiniGame .temple-shell[data-trap="temple_transmitter"] :is(.temple-transmitter-green,.temple-x-frequency-target){
 box-shadow:0 0 11px #b9ffd8,0 0 22px #57ffd188;
}
/* 21 — Quicksand Grid: mossy stone platforms, distinct green danger clues. */
#r20MiniGame .temple-shell[data-trap="quicksand_grid"] .temple-x-floor-tile{
 border:2px solid #bdeab0;border-radius:12px;
 background:linear-gradient(155deg,#42664b,#203e43);
 box-shadow:inset 0 2px 0 #fff4,0 5px 13px #0008;
}

/* Controls must remain responsive, visible and reachable on phones.
   Avoid scaling the full board or forcing fixed heights on interactive panels. */
#r20MiniGame.r20-mg-phone .temple-shell[data-trap]{
 width:100%;max-width:100%;padding:clamp(8px,2.8vw,15px);
 overflow-x:hidden;
}
#r20MiniGame.r20-mg-phone .temple-shell[data-trap] :is(.temple-x-controls,.temple-x-options,.temple-x-letters,.temple-x-keypad,.temple-new-choice-row,.temple-grid){
 min-width:0;max-width:100%;box-sizing:border-box;
}
#r20MiniGame.r20-mg-phone .temple-shell[data-trap] :is(button.temple-option,button.temple-new-button,button.temple-x-button,button.temple-boulder-blitz-choice){
 min-height:44px;font-size:clamp(13px,3.7vw,20px);
}
#r20MiniGame.r20-mg-phone .temple-shell[data-trap] .temple-x-intro{font-size:clamp(13px,3.6vw,19px)}
#r20MiniGame.r20-mg-phone .temple-shell[data-trap] :is(.temple-x-result,.temple-river-result){min-width:0;overflow-wrap:anywhere}
@media(max-height:680px){
 #r20MiniGame.r20-mg-tv .temple-shell[data-trap]{padding-block:clamp(4px,.7dvh,9px)}
 #r20MiniGame.r20-mg-tv .temple-shell[data-trap] :is(.temple-classic-panel,.temple-x-stage){
  box-shadow:inset 0 0 16px #0d182f,0 3px 11px #0007;
 }
}
@media(prefers-reduced-motion:reduce){
 #r20MiniGame .temple-shell[data-trap] *,
 #r20MiniGame .temple-shell[data-trap] *::before,
 #r20MiniGame .temple-shell[data-trap] *::after{
  animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;
 }
}
/* Primary player Ready CTA: bright golden-yellow, matching approved preview.
   Excludes host sit-out controls and gives locked state a distinct appearance. */
#r20MiniGame.r20-mg-phone .temple-shell[data-trap] button.temple-trap-ready-button.temple-ready-confirm:not(:disabled){
 background:linear-gradient(165deg,#fffbbc 0%,#ffe950 26%,#ffcf1d 57%,#ee9900 100%)!important;
 border:3px solid #fff0a4!important;
 border-radius:15px!important;
 box-shadow:inset 0 4px 0 #fff9d5c9,inset 0 -5px 0 #a65d0099,0 5px 0 #9f6009,0 8px 18px #0008,0 0 18px #ffd64b66!important;
 color:#132541!important;
 text-shadow:0 1px 0 #fff6c4!important;
 font-weight:1000!important;
}
#r20MiniGame.r20-mg-phone .temple-shell[data-trap] button.temple-trap-ready-button.temple-ready-confirm:disabled{
 background:linear-gradient(145deg,#234d44,#183e38)!important;
 border-color:#a4d8b8!important;color:#d8ffe7!important;
 opacity:1!important;
}
#r20MiniGame.r20-mg-phone .temple-shell[data-trap] button.temple-trap-ready-button.temple-ready-confirm:focus-visible{
 outline:3px solid white!important;outline-offset:3px!important;
}


/* Crystal Lift Panic: unmistakable yellow jump control on player phones. */
#r20MiniGame .temple-shell[data-trap="crystal_lift"] button.temple-x-button.is-jump:not(:disabled){
 background:linear-gradient(180deg,#fff7a1 0%,#ffdf34 45%,#ffb900 100%)!important;
 color:#18223a!important;
 border:3px solid #fff4a0!important;
 border-radius:16px!important;
 box-shadow:inset 0 2px 0 #ffffffa8,0 5px 0 #a96b00,0 8px 20px #0009,0 0 20px #ffd32f88!important;
 font-weight:1000!important;
 font-size:clamp(18px,5vw,25px)!important;
 min-height:60px!important;
 text-shadow:none!important;
}
#r20MiniGame .temple-shell[data-trap="crystal_lift"] button.temple-x-button.is-jump:focus-visible{
 outline:3px solid white!important;outline-offset:4px!important;
}

/* River Crossing recap stays visually centered on the TV rather than sitting low. */
#r20MiniGame.r20-mg-tv[data-game="temple_trouble"] .temple-shell:has(.temple-river-recap) .temple-river-recap{transform:translateY(clamp(-85px,-8dvh,-35px));}
/* Great Escape result: show answer speed separately from earned streak sparks. */
#r20MiniGame .temple-escape-answer-recap{width:min(100%,940px);margin:8px auto;padding:10px 14px;border:2px solid #e1b95f;border-radius:14px;background:linear-gradient(145deg,#163a4e,#1e2b4c);color:#fff1c9;text-align:center;font-weight:900;}
#r20MiniGame .temple-escape-answer-list{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:8px;}
#r20MiniGame .temple-escape-answer-entry{display:inline-flex;align-items:center;border:1px solid #71b5d7;border-radius:10px;padding:7px 10px;background:#15314d;color:white;font-size:clamp(13px,1.1vw,18px);}
#r20MiniGame .temple-escape-answer-entry.earned-spark{background:#574017;border-color:#ffd15d;color:#fff4b0;box-shadow:0 0 12px #ffcb4e55;}


/* Temple phone controller-first layout: preserve the puzzle and buttons in the
   first viewport. Scope all changes to Temple rather than other Party games. */
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"]{
 --temple-phone-header:0px;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .r20-mg-layout{
 min-height:100dvh!important;
 padding:clamp(4px,.75dvh,8px) 8px calc(7px + env(safe-area-inset-bottom,0px))!important;
 gap:clamp(3px,.6dvh,7px)!important;
 justify-content:flex-start;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .r20-mg-center{
 flex:0 0 auto!important;min-height:0!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .r20-mg-stage-main{
 padding:3px 6px!important;min-height:0;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .r20-mg-phone-controls{
 flex:0 0 auto;min-width:0;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .r20-mg-phone-info{
 margin:0!important;padding:2px 5px!important;
 font-size:clamp(11px,2.8vw,13px)!important;line-height:1.2!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .r20-mg-scores,
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .r20-mg-footer{
 display:none!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-shell{
 padding:clamp(4px,.9dvh,9px)!important;
 margin:0!important;
 max-height:none!important;
 overflow:visible!important;
 border-radius:12px;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-title{
 font-size:clamp(17px,4.7vw,24px)!important;line-height:1.08!important;
 margin:0!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-kicker{
 font-size:clamp(10px,2.65vw,13px)!important;
 line-height:1.14!important;margin:2px auto!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-trap-banner{
 margin:2px auto!important;padding:3px 9px!important;
 font-size:clamp(11px,3vw,14px)!important;line-height:1.15!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-question{
 font-size:clamp(15px,4vw,19px)!important;line-height:1.18!important;
 margin:3px auto!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-grid{
 gap:clamp(4px,.8dvh,8px)!important;margin:4px auto!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-option{
 min-height:clamp(42px,6.5dvh,54px)!important;
 padding:5px 7px!important;
 line-height:1.2!important;font-size:clamp(13px,3.5vw,17px)!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] :is(.temple-preview,.temple-trap-instruction,.temple-round-note,.temple-x-intro,.temple-status){
 margin:3px auto!important;padding:clamp(3px,.65dvh,7px)!important;
 font-size:clamp(11px,3vw,15px)!important;line-height:1.18!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] :is(.temple-x-stage,.temple-special-arena,.temple-classic-panel,.temple-new-controls,.temple-x-controls,.temple-vault-phone){
 padding:clamp(4px,.75dvh,8px)!important;gap:clamp(3px,.65dvh,8px)!important;
 margin-block:2px!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] :is(.temple-x-heading,.temple-classic-heading,.temple-new-note){
 font-size:clamp(12px,3.3vw,17px)!important;line-height:1.16!important;
 margin:0!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] :is(.temple-x-button,.temple-new-button,.temple-trap-ready-button,.temple-vault-submit,.temple-transmitter-submit){
 min-height:44px!important;padding:5px 7px!important;line-height:1.14!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] :is(.temple-x-floor,.temple-x-letters,.temple-x-options,.temple-x-keypad){
 gap:clamp(3px,.6dvh,7px)!important;margin-block:3px!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-x-floor-tile{
 min-height:clamp(34px,5.8dvh,48px)!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-vault-text{
 height:44px!important;min-height:44px!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-vault-letter{
 min-height:34px!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-trap-ready-board{
 padding:clamp(6px,.9dvh,10px)!important;gap:clamp(4px,.6dvh,7px)!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-ready-guide{
 padding:5px 7px!important;gap:4px!important;margin:0!important;
}
#r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-trap-ready-instructions{
 font-size:clamp(12px,3.3vw,16px)!important;line-height:1.2!important;
 margin:2px auto!important;
}
@media(max-height:700px){
 #r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-kicker{font-size:10px!important}
 #r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-grid{gap:3px!important}
 #r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-option{min-height:42px!important}
 #r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-x-floor-tile{min-height:33px!important}
 #r20MiniGame.r20-mg-phone[data-game="temple_trouble"] .temple-x-word-accepted{max-height:52px!important;overflow-y:auto}
}


/* Temple Priority 6 — celebrate verified outcomes in place, never extra stages.
   Shared audio owns Gem/Spark/gate sounds; these styles add no audio loops. */
#r20MiniGame[data-game="temple_trouble"] .temple-milestone-banner{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:center;
 width:min(100%,900px);margin:3px auto;gap:clamp(5px,.7vw,11px);
 padding:clamp(6px,.9dvh,10px) clamp(10px,1.5vw,18px);
 border:2px solid #85f0d7;border-radius:13px;
 background:linear-gradient(115deg,#1b5b54,#245b76);
 box-shadow:0 0 20px #5deac44a;color:#f0fffa;text-align:center;
 animation:templeMilestonePop .55s ease-out both;
}
#r20MiniGame[data-game="temple_trouble"] .temple-milestone-banner.is-target{
 background:linear-gradient(120deg,#6e481d,#94712e,#385b62);
 border-color:#ffe29b;box-shadow:0 0 27px #ffd5637a;
}
#r20MiniGame[data-game="temple_trouble"] .temple-milestone-glyph{
 font-size:clamp(23px,4dvh,42px);line-height:1;
}
#r20MiniGame[data-game="temple_trouble"] .temple-milestone-title{
 font-size:clamp(13px,1.7vw,23px);font-weight:1000;letter-spacing:.03em;color:#ffe6a4;
}
#r20MiniGame[data-game="temple_trouble"] .temple-milestone-names{
 font-size:clamp(12px,1.4vw,18px);font-weight:800;overflow-wrap:anywhere;
}
#r20MiniGame[data-game="temple_trouble"] .temple-trap-reward-row.is-shadow-escape{
 background:linear-gradient(110deg,#214b52,#516444)!important;
 border-color:#b7fbe2!important;
 box-shadow:0 0 14px #9dffe154;
}
#r20MiniGame[data-game="temple_trouble"] .temple-trap-reward-row.is-spark-earned{
 border-color:#ffd17e!important;
 box-shadow:0 0 12px #fdd27855;
}
#r20MiniGame[data-game="temple_trouble"] .temple-reward-mark{
 display:inline-block;padding:2px 6px;border-radius:9px;
 background:#1c3d49;color:#fff1b7;font-weight:950;
 font-size:clamp(9px,1vw,12px);white-space:nowrap;
}
#r20MiniGame[data-game="temple_trouble"] .temple-power-attack-board{
 border-color:#e4b8ff!important;box-shadow:0 0 14px #aa69e144;
}
#r20MiniGame[data-game="temple_trouble"] .temple-power-attack-event[data-power="freeze"],
#r20MiniGame[data-game="temple_trouble"] .temple-power-attack-event[data-power="gate_freeze"]{
 background:linear-gradient(120deg,#19556d,#2f78a2);border-color:#b1f3ff;color:#eeffff;
}
#r20MiniGame[data-game="temple_trouble"] .temple-power-attack-event[data-power="confusion"]{
 background:#54316d;border-color:#e3abff;color:#fff0ff;
}
#r20MiniGame[data-game="temple_trouble"] .temple-power-attack-event[data-power="time_thief"]{
 background:#654526;border-color:#ffe0a4;color:#fff5e7;
}
#r20MiniGame[data-game="temple_trouble"] .temple-power-attack-event[data-power="shield"],
#r20MiniGame[data-game="temple_trouble"] .temple-power-attack-event[data-power="blocked"]{
 background:#215a4a;border-color:#b1f4ca;color:#eefff5;
}
#r20MiniGame[data-game="temple_trouble"] .temple-gate-race-finalist.is-final-lock{
 border:2px solid #ffe69b;
 box-shadow:0 0 15px #ffcd6480;animation:templeLastLockGlow 1.5s ease-in-out infinite alternate;
}
#r20MiniGame[data-game="temple_trouble"] .temple-gate-race-finalist.is-gate-unlocked{
 border:2px solid #9cffc9;background:#24583e;color:#eaffec;
}
#r20MiniGame[data-game="temple_trouble"] .temple-cinematic-victory{
 box-shadow:0 0 35px #efc56855,inset 0 0 55px #ffd67b30!important;
}
#r20MiniGame[data-game="temple_trouble"] .temple-cinematic-victory .temple-gate-stage{
 filter:drop-shadow(0 0 18px #ffdb8e85);
}
#r20MiniGame[data-game="temple_trouble"] .temple-cinematic-crown{
 position:absolute;z-index:5;top:0;left:50%;font-size:clamp(20px,4dvh,39px);
 transform:translate(-50%,-100%);filter:drop-shadow(0 0 10px #ffec97);
 animation:templeCrownPop .7s 2.35s both;pointer-events:none;
}
#r20MiniGame[data-game="temple_trouble"] .temple-cinematic-victory .temple-gate-champion{
 isolation:isolate;
}
@keyframes templeMilestonePop{
 from{opacity:0;transform:scale(.96) translateY(8px)}
 65%{opacity:1;transform:scale(1.03) translateY(0)}
 to{opacity:1;transform:none}
}
@keyframes templeLastLockGlow{
 from{box-shadow:0 0 8px #ffcd6455}
 to{box-shadow:0 0 19px #ffdc90b3}
}
@keyframes templeCrownPop{
 from{opacity:0;transform:translate(-50%,-45%) scale(.55)}
 65%{opacity:1;transform:translate(-50%,-105%) scale(1.12)}
 to{opacity:1;transform:translate(-50%,-100%) scale(1)}
}
@media(max-height:650px){
 #r20MiniGame[data-game="temple_trouble"] .temple-milestone-banner{padding:4px 9px;gap:5px}
 #r20MiniGame[data-game="temple_trouble"] .temple-milestone-glyph{font-size:21px}
 #r20MiniGame[data-game="temple_trouble"] .temple-milestone-title{font-size:14px}
 #r20MiniGame[data-game="temple_trouble"] .temple-reward-mark{font-size:10px}
}
@media(prefers-reduced-motion:reduce){
 #r20MiniGame[data-game="temple_trouble"] .temple-milestone-banner,
 #r20MiniGame[data-game="temple_trouble"] .temple-gate-race-finalist.is-final-lock,
 #r20MiniGame[data-game="temple_trouble"] .temple-cinematic-crown{
 animation:none!important;
 }
 #r20MiniGame[data-game="temple_trouble"] .temple-cinematic-crown{
 opacity:1!important;transform:translate(-50%,-100%)!important;
 }
}
