/* Mystery Doors — enchanted four-door game-show treatment.
   Every door is a DOM element: phone choices remain buttons and results remain live text. */
#r20MiniGame[data-game="mystery_doors"]{--md-gold:#ffda83}
#r20MiniGame[data-game="mystery_doors"] .ccc-stage-mystery_doors.md-stage{
 width:min(100%,1480px);margin:auto;padding:clamp(12px,2vh,24px) clamp(12px,2vw,28px);
 border:2px solid #ffe199;border-bottom:5px solid #a87742;border-radius:clamp(20px,3vw,35px);
 background:radial-gradient(ellipse at 48% 5%,#69429282,transparent 80%),linear-gradient(155deg,#302457,#172b55 70%,#18254f);
 box-shadow:0 0 30px #e7a8584d,inset 0 0 42px #9270ce2c,0 12px 0 #102048;
 position:relative;isolation:isolate;overflow:visible;
}
#r20MiniGame[data-game="mystery_doors"] .md-stage:before{content:"✦     ✧     ✦";position:absolute;inset:2% 0 auto;text-align:center;letter-spacing:3rem;color:#ffe6a565;pointer-events:none}
#r20MiniGame[data-game="mystery_doors"] .ccc-party-tv-message{margin:clamp(2px,.7vh,8px) auto;font-size:clamp(15px,2vw,24px);line-height:1.15;text-shadow:0 2px 4px #06102d}
#r20MiniGame[data-game="mystery_doors"] .md-pick-grid,
#r20MiniGame[data-game="mystery_doors"] .md-reveal-grid{
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:clamp(8px,1.3vw,18px)!important;width:100%!important;max-width:1360px!important;
 margin:clamp(5px,1vh,13px) auto!important;align-items:stretch;
}
#r20MiniGame[data-game="mystery_doors"] .doorCard.md-theme{
 --md-bright:#ffc66e;--md-deep:#7c3c24;--md-mid:#b96b2c;--md-shadow:#442030;
 display:flex;position:relative;flex-direction:column;align-items:center;justify-content:flex-end;
 min-width:0!important;gap:clamp(3px,.65vh,7px);padding:clamp(6px,1vw,14px)!important;
 border:2px solid color-mix(in srgb,var(--md-bright),white 20%);
 border-radius:18px;background:radial-gradient(ellipse at 50% 70%,color-mix(in srgb,var(--md-mid),transparent 48%),transparent 72%),linear-gradient(#2a395e,#152842);
 box-shadow:inset 0 3px 10px #ffffff12,0 6px 17px #080e3280;
 overflow:visible!important;isolation:isolate;
}
#r20MiniGame[data-game="mystery_doors"] .md-theme-1{--md-bright:#72f6e7!important;--md-mid:#159caa!important;--md-deep:#14627a!important;--md-shadow:#093c55!important}
#r20MiniGame[data-game="mystery_doors"] .md-theme-2{--md-bright:#df9aff!important;--md-mid:#a453d7!important;--md-deep:#56318f!important;--md-shadow:#2e195b!important}
#r20MiniGame[data-game="mystery_doors"] .md-theme-3{--md-bright:#9ed7ff!important;--md-mid:#358cdf!important;--md-deep:#214ca4!important;--md-shadow:#182b73!important}
#r20MiniGame[data-game="mystery_doors"] .md-portal{
 position:relative;display:block;flex:none;width:clamp(70px,13vw,185px);
 height:clamp(125px,24vh,255px);max-width:88%;margin:clamp(2px,1vh,9px) auto 0;
 filter:drop-shadow(0 7px 7px #030c26bd) drop-shadow(0 0 11px var(--md-mid));
 transition:filter .3s ease,transform .3s ease;
}
#r20MiniGame[data-game="mystery_doors"] .md-portal .md-arch{
 position:absolute;inset:0 0 8% 0;border-radius:48% 48% 9px 9px/28% 28% 9px 9px;
 background:linear-gradient(110deg,#583b2d,#fff0b2 9%,var(--md-bright) 16%,var(--md-deep) 28%,var(--md-mid) 66%,#ffe5a1 82%,var(--md-shadow) 97%);
 border:clamp(3px,.4vw,7px) ridge #f9da80;box-shadow:inset 0 3px 9px #ffe7a799,0 0 13px var(--md-mid);
}
#r20MiniGame[data-game="mystery_doors"] .md-door-glow{
 position:absolute;inset:12% 12% 10%;border-radius:44% 44% 5px 5px/27% 27% 5px 5px;
 background:radial-gradient(circle,#f8eab855 0%,var(--md-mid) 50%,#06112b 100%);
 box-shadow:0 0 22px var(--md-mid);
}
#r20MiniGame[data-game="mystery_doors"] .doorLeaf.md-door-leaf{
 position:absolute;inset:12% 13% 10%;width:auto;height:auto;display:block;
 border:3px solid #fcd591;border-radius:43% 43% 5px 5px/24% 24% 5px 5px;
 background:repeating-linear-gradient(90deg,#f4cc8033 0 3px,transparent 3px 19px),linear-gradient(115deg,var(--md-shadow),var(--md-mid) 40%,var(--md-deep) 73%,var(--md-shadow));
 box-shadow:inset 8px 0 12px #ffffff30,inset -12px 0 13px #030c3566,0 1px 6px #0a0a25;
 transform-origin:5% 52%;z-index:2;transition:transform .8s cubic-bezier(.14,.7,.23,1);
}
#r20MiniGame[data-game="mystery_doors"] .md-inlay{
 position:absolute;inset:15% 13% 17%;border:2px solid #ffdf956e;
 border-radius:40% 40% 4px 4px/24% 24% 4px 4px;
 box-shadow:inset 0 0 7px #ffe8a344;pointer-events:none
}
#r20MiniGame[data-game="mystery_doors"] .md-symbol{
 position:absolute;top:16%;left:50%;transform:translateX(-50%);color:#fff0be;
 font-size:clamp(20px,3vw,38px);line-height:1;text-shadow:0 0 8px var(--md-bright),0 3px 2px #1b123a;
}
#r20MiniGame[data-game="mystery_doors"] .md-crest{
 position:absolute;z-index:4;top:-5%;left:50%;transform:translateX(-50%);
 display:grid;place-items:center;width:29%;aspect-ratio:1;border-radius:32% 32% 44% 44%;
 border:2px solid #ffda74;background:radial-gradient(#fff0b6,var(--md-bright) 46%,#71512e);
 color:#442e48;font-size:clamp(13px,1.5vw,23px);box-shadow:0 0 15px var(--md-bright);
}
#r20MiniGame[data-game="mystery_doors"] .md-keyhole{
 position:absolute;top:56%;left:50%;transform:translate(-50%,-50%);
 width:23%;aspect-ratio:.8;border:2px solid #fff0b9;border-radius:35% 35% 25% 25%;
 background:linear-gradient(#ffd87f,#a65c2c);color:#392a42;font-size:clamp(12px,1.3vw,18px);
 display:grid;place-items:center;box-shadow:0 0 11px var(--md-bright);
}
#r20MiniGame[data-game="mystery_doors"] .md-side-ornament{
 position:absolute;z-index:4;bottom:10%;font-size:clamp(18px,2.5vw,32px);filter:drop-shadow(0 0 8px var(--md-mid));
}
#r20MiniGame[data-game="mystery_doors"] .md-left{left:-14%}
#r20MiniGame[data-game="mystery_doors"] .md-right{right:-14%}
#r20MiniGame[data-game="mystery_doors"] .md-stone{
 position:absolute;z-index:1;bottom:0;left:-15%;right:-15%;height:10%;border-radius:45% 45% 15% 15%;
 background:linear-gradient(#aec2d0,#556a91 40%,#253d59 50%,#111e3a);
 border-bottom:4px solid var(--md-bright);box-shadow:0 0 18px var(--md-mid);
}
#r20MiniGame[data-game="mystery_doors"] .md-door-name{
 width:min(94%,220px);padding:5px 9px;border:2px solid var(--md-bright);border-radius:999px;
 background:linear-gradient(135deg,var(--md-shadow),var(--md-deep));color:#fff4d5!important;
 text-align:center;font-size:clamp(14px,1.5vw,22px)!important;
 text-shadow:0 2px 2px #120d24;box-shadow:0 0 10px color-mix(in srgb,var(--md-bright),transparent 55%);
}
#r20MiniGame[data-game="mystery_doors"] .md-lock-progress{
 display:flex;flex-direction:column;align-items:center;width:min(100%,570px);margin:5px auto 0;
 padding:8px 16px;border:2px solid #ffdb81;border-radius:30px;background:#162f56;
 color:#fff0c5;font-size:clamp(15px,1.8vw,23px);box-shadow:0 4px 13px #08132e;
}
#r20MiniGame[data-game="mystery_doors"] .md-lock-track{width:100%;height:10px;margin:6px 0 0;border:1px solid #ffd992;border-radius:999px;background:#0a1d3f;overflow:hidden}
#r20MiniGame[data-game="mystery_doors"] .md-lock-fill{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ffe48d,#eeb549);transition:width .35s ease}

#r20MiniGame[data-game="mystery_doors"] .md-reveal-card .md-door-glow{background:radial-gradient(circle,#fff7bd,var(--md-mid) 52%,#06244a);animation:mdPortalReveal .9s ease-out both}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-positive{border-color:#95ffc1;box-shadow:0 0 18px #55ecab78}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-negative{border-color:#ff9d96;box-shadow:0 0 18px #ff6a6978}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-icon{
 position:absolute;z-index:5;top:35%;left:50%;transform:translateX(-50%);
 font-size:clamp(25px,3vw,45px);color:#fff9c9;text-shadow:0 0 20px var(--md-bright);
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-negative .md-reveal-icon{color:#ffb3a2}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card .doorReward{
 padding:4px 7px;border-radius:12px;background:#12264ca8;color:#fff5d0;
 font-size:clamp(15px,1.6vw,24px);line-height:1.12;
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-positive .doorReward{color:#a9ffcb}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-negative .doorReward{color:#ffb6ae}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card small{
 max-height:none!important;overflow:visible!important;overflow-wrap:anywhere;
 font-size:clamp(11px,1vw,15px)!important;color:#e9f0ff;line-height:1.2;
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-grid .md-portal{height:clamp(95px,20vh,205px);width:clamp(60px,10.5vw,155px)}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .md-phone-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .doorCard.md-theme{min-height:160px;padding:10px!important}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .md-portal{width:clamp(58px,23vw,108px);height:clamp(100px,33vw,150px)}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .md-door-name{font-size:15px!important}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .doorCard.md-theme:active{transform:scale(.97)}
#r20MiniGame[data-game="mystery_doors"] .md-preview-card{--md-bright:#ffcc7d;--md-mid:#bc813d;--md-deep:#663f3b;--md-shadow:#3c2340}
#r20MiniGame[data-game="mystery_doors"] .md-preview-card .md-portal{width:min(85%,90px);height:clamp(75px,13vh,135px)}
#r20MiniGame[data-game="mystery_doors"] .md-preview-card .md-symbol{font-size:17px}
#r20MiniGame[data-game="mystery_doors"] .md-preview-card .md-crest{font-size:13px}
#r20MiniGame[data-game="mystery_doors"] .md-preview-card .md-keyhole{font-size:10px}
#r20MiniGame[data-game="mystery_doors"] .md-preview-card .md-side-ornament{font-size:15px}
#r20MiniGame[data-game="mystery_doors"] .md-preview-card .md-portal:after{content:"";position:absolute;inset:0;z-index:-1;box-shadow:0 0 15px var(--md-bright);border-radius:40%}
@keyframes mdPortalReveal{from{filter:brightness(2.3);opacity:.2;transform:scale(.85)}to{filter:brightness(1);opacity:1;transform:none}}
@media(max-height:680px){
 #r20MiniGame[data-game="mystery_doors"] .md-portal{height:clamp(82px,18vh,155px)}
 #r20MiniGame[data-game="mystery_doors"] .ccc-stage-mystery_doors.md-stage{padding:7px 12px}
 #r20MiniGame[data-game="mystery_doors"] .md-reveal-grid .md-portal{height:clamp(76px,17vh,140px)}
}
@media(prefers-reduced-motion:reduce){
 #r20MiniGame[data-game="mystery_doors"] .md-reveal-card .md-door-glow{animation:none}
 #r20MiniGame[data-game="mystery_doors"] .md-door-leaf{transition:none}
}

/* The board-only mode preview displays the same four distinct magical door identities. */
#cccLobbyModePreview.md-lobby-preview{
 gap:clamp(5px,1vh,13px);padding:clamp(9px,2vh,25px);
 background:radial-gradient(circle at 50% 28%,#315da1,#102447 80%);
}
#cccLobbyModePreview.md-lobby-preview .ccc-lobby-preview-icon{font-size:clamp(40px,6vh,80px);line-height:1}
#cccLobbyModePreview.md-lobby-preview h2{font-size:clamp(31px,4vw,60px);text-shadow:0 3px 0 #794f32,0 7px 13px #0b102d}
#cccLobbyModePreview.md-lobby-preview p{margin:2px auto;max-width:1000px}
#cccLobbyModePreview.md-lobby-preview .ccc-party-preview-visual{
 width:min(100%,1120px);max-width:none;border:2px solid #ffdf97;border-radius:26px;
 background:radial-gradient(ellipse at 50% 20%,#543e8b,#132b54);
 box-shadow:0 0 20px #ffde7666,inset 0 0 24px #b17acb33;
 padding:clamp(8px,1.2vh,18px);
}
#cccLobbyModePreview.md-lobby-preview .ccc-party-preview-headline{color:#ffe39b}
#cccLobbyModePreview.md-lobby-preview .ccc-party-preview-scene{width:100%}
#cccLobbyModePreview.md-lobby-preview .md-lobby-gallery{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;
 gap:clamp(8px,1.3vw,19px);width:100%;margin:0 auto;
}
#cccLobbyModePreview.md-lobby-preview .md-lobby-door{
 --md-bright:#ffd27a;--md-mid:#bf7435;--md-deep:#7a352a;
 display:flex;flex-direction:column;align-items:center;gap:4px;
 border:1px solid #a8bed366;border-radius:15px;padding:8px;
 background:radial-gradient(ellipse at 50% 80%,var(--md-mid),#172a4e 65%);
 font-size:clamp(12px,1.2vw,19px);color:#fff2d2;
}
#cccLobbyModePreview.md-lobby-preview .md-theme-1{--md-bright:#76fff1;--md-mid:#197e98;--md-deep:#174a72}
#cccLobbyModePreview.md-lobby-preview .md-theme-2{--md-bright:#e4a0ff;--md-mid:#743ba9;--md-deep:#452374}
#cccLobbyModePreview.md-lobby-preview .md-theme-3{--md-bright:#a7e6ff;--md-mid:#3067b7;--md-deep:#143c86}
#cccLobbyModePreview.md-lobby-preview .md-lobby-portal{
 position:relative;display:block;width:clamp(50px,8vw,117px);
 height:clamp(83px,18vh,180px);filter:drop-shadow(0 0 13px var(--md-mid));
}
#cccLobbyModePreview.md-lobby-preview .md-lobby-arch{
 position:absolute;inset:0 0 8%;border:5px ridge #f5d78e;border-radius:45% 45% 7px 7px/25% 25% 7px 7px;
 background:linear-gradient(110deg,var(--md-deep),var(--md-bright),var(--md-mid),var(--md-deep));
 box-shadow:0 0 10px var(--md-bright);
}
#cccLobbyModePreview.md-lobby-preview .md-lobby-leaf{
 position:absolute;inset:11% 12% 10%;border:3px solid #ffeba9;
 border-radius:42% 42% 5px 5px/24% 24% 5px 5px;
 background:repeating-linear-gradient(90deg,#fff8bb16 0 4px,transparent 4px 16px),linear-gradient(120deg,var(--md-deep),var(--md-mid),var(--md-deep));
 box-shadow:inset 5px 0 10px #ffe7ba55,inset -6px 0 12px #11142899;
}
#cccLobbyModePreview.md-lobby-preview .md-lobby-crest{
 position:absolute;z-index:3;top:-5%;left:50%;transform:translateX(-50%);
 border:2px solid #ffe59c;border-radius:35%;background:var(--md-bright);
 color:#38273c;box-shadow:0 0 12px var(--md-bright);padding:2px 6px;
 font-size:clamp(12px,1.5vw,22px);
}
#cccLobbyModePreview.md-lobby-preview .md-lobby-symbol{
 position:absolute;top:23%;left:50%;transform:translateX(-50%);
 color:#fff7c9;text-shadow:0 0 9px var(--md-bright);font-size:clamp(18px,2vw,30px);
}
#cccLobbyModePreview.md-lobby-preview .md-lobby-lock{
 position:absolute;top:59%;left:50%;transform:translateX(-50%);
 background:#ffdc8e;color:#644b37;border-radius:4px;padding:1px 4px;font-size:13px;
}
#cccLobbyModePreview.md-lobby-preview .md-lobby-ornament{
 position:absolute;right:-8%;bottom:7%;font-size:clamp(15px,1.9vw,27px);
 filter:drop-shadow(0 0 9px var(--md-bright));
}
@media(max-height:740px){#cccLobbyModePreview.md-lobby-preview .md-lobby-portal{height:clamp(65px,16vh,115px)}}

/* Door-by-door cinematic reveal, only when the TV first receives this round. */

#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-animate .doorReward,
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-animate .md-reveal-icon{
 animation:mdRewardPop .65s ease-out both;animation-delay:.55s;
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-animate .md-reveal-icon{animation-name:mdIconPop}



#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-animate:nth-child(2) .doorReward,
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-animate:nth-child(2) .md-reveal-icon{animation-delay:.69s}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-animate:nth-child(3) .doorReward,
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-animate:nth-child(3) .md-reveal-icon{animation-delay:.83s}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-animate:nth-child(4) .doorReward,
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-animate:nth-child(4) .md-reveal-icon{animation-delay:.97s}
@keyframes mdRewardPop{from{opacity:0;transform:translateY(13px) scale(.78)}to{opacity:1;transform:none}}
@keyframes mdIconPop{from{opacity:0;transform:translate(-50%,13px) scale(.78)}to{opacity:1;transform:translateX(-50%) scale(1)}}
@media(prefers-reduced-motion:reduce){
 #r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-animate .md-door-leaf,
 #r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-animate .doorReward,
 #r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-animate .md-reveal-icon{animation:none!important}
}

/* November 11: contain all doors and reward animations within their own portal. */
#r20MiniGame[data-game="mystery_doors"] .md-reveal-grid .md-reveal-card{
 overflow:hidden!important;contain:paint;min-width:0;
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-grid .md-portal{
 overflow:hidden!important;isolation:isolate;transform:none!important;
 filter:drop-shadow(0 0 6px var(--md-mid));perspective:none!important;
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-grid .md-door-leaf{
 transform:none!important;transform-origin:left center!important;transition:none!important;
 animation:none!important;clip-path:inset(0 100% 0 0);
 backface-visibility:hidden;
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-grid .md-reveal-card.md-animate .md-door-leaf{
 animation:mdContainedOpening .7s ease-out both!important;
}
@keyframes mdContainedOpening{
 0%{clip-path:inset(0 0 0 0);opacity:1}
 100%{clip-path:inset(0 100% 0 0);opacity:.15}
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-grid{
 max-width:100%!important;overflow:hidden!important;
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-grid .doorReward,
#r20MiniGame[data-game="mystery_doors"] .md-reveal-grid .doorCard small{
 z-index:6;position:relative;text-align:center;max-width:100%;
}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .r20-mg-phone-controls .md-phone-grid{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 width:100%!important;gap:clamp(8px,2vw,12px)!important;visibility:visible!important;
 opacity:1!important;margin:8px auto 14px!important;
}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .md-phone-grid .md-phone-option{
 display:flex!important;flex-direction:column!important;align-items:center!important;
 justify-content:center!important;min-width:0;min-height:clamp(155px,26vh,225px);
 padding:10px!important;visibility:visible!important;opacity:1;
}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .md-phone-grid .md-phone-option:disabled{
 opacity:.65!important;filter:saturate(.75);
}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .md-phone-option .md-portal{
 width:clamp(60px,23vw,105px);height:clamp(94px,29vw,140px);
}
#r20MiniGame[data-game="mystery_doors"] .md-phone-instruction{
 text-align:center;color:#fff0b9;font-weight:950;font-size:clamp(16px,4.3vw,22px);
 margin:6px auto;
}
@media(prefers-reduced-motion:reduce){
 #r20MiniGame[data-game="mystery_doors"] .md-reveal-grid .md-reveal-card.md-animate .md-door-leaf{animation:none!important}
}

/* Preview polish: hero door and four evenly sized steps stay within the panel. */
#cccLobbyModePreview.md-lobby-preview .md-preview-hero{
 display:grid;place-items:center;width:auto;height:clamp(96px,16vh,170px);
 overflow:visible;filter:none;margin-bottom:1px;
}
#cccLobbyModePreview.md-lobby-preview .md-preview-hero .md-lobby-portal{
 width:clamp(70px,9vw,105px);height:clamp(96px,16vh,150px);
}
#cccLobbyModePreview.md-lobby-preview .ccc-party-preview-mini-steps{
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:clamp(5px,.8vw,12px)!important;width:100%;margin:8px auto 0;
}
#cccLobbyModePreview.md-lobby-preview .ccc-party-preview-mini-steps span{
 min-width:0;text-align:center;font-size:clamp(11px,1.4vw,19px)!important;
 padding:8px 3px!important;white-space:normal;
}
@media(max-width:500px){
 #cccLobbyModePreview.md-lobby-preview .ccc-party-preview-mini-steps{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* Safe open portal: no rotating leaves or perspective transforms remain. */
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card .md-open-portal{
 position:relative;display:block;overflow:hidden!important;isolation:isolate;
 transform:none!important;perspective:none!important;
 filter:drop-shadow(0 0 7px var(--md-mid));
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card .md-open-interior{
 position:absolute;z-index:2;inset:12% 14% 10%;
 border-radius:45% 45% 5px 5px/26% 26% 5px 5px;
 background:radial-gradient(ellipse at 50% 45%,#fff5b088 0%,var(--md-mid) 26%,#142342 81%);
 box-shadow:inset 0 0 16px var(--md-bright),0 0 15px var(--md-mid);
 pointer-events:none;
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-positive .md-open-interior{
 background:radial-gradient(ellipse at 50% 45%,#eeffb9 0%,#4acc97 37%,#0b3a46 88%);
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-negative .md-open-interior{
 background:radial-gradient(ellipse at 50% 45%,#ffae77 0%,#bd3459 35%,#3a173c 88%);
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card.md-empty .md-open-interior{
 background:radial-gradient(ellipse at 50% 45%,#aca6a9 0%,#2e354e 40%,#101728 90%);
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card .md-open-portal *{
 max-height:100%;box-sizing:border-box;
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card .md-reveal-icon{
 z-index:7;pointer-events:none;
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-grid .doorCard{
 min-width:0;overflow:hidden!important;
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-grid .doorCard small{
 overflow-wrap:anywhere!important;max-height:none!important;
 font-size:clamp(10px,1.08vw,16px)!important;line-height:1.28;
}

/* Gameplay upgrade: scores, magic powers and cinematic risk round. */
#r20MiniGame[data-game="mystery_doors"] .md-scoreboard{
 display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
 gap:clamp(4px,.55vw,9px);width:min(100%,1280px);margin:5px auto;
}
#r20MiniGame[data-game="mystery_doors"] .md-score-player{
 min-width:0;display:flex;align-items:center;justify-content:space-between;
 gap:5px;background:linear-gradient(130deg,#263d65,#172f53);color:#fff;
 border:1px solid #83afd2;border-radius:10px;padding:5px 8px;
 font-size:clamp(11px,1.13vw,17px);line-height:1.18;font-weight:850;
}
#r20MiniGame[data-game="mystery_doors"] .md-score-player:first-child{
 border-color:#ffdf83;box-shadow:0 0 10px #ffc35f77;
}
#r20MiniGame[data-game="mystery_doors"] .md-score-player span:first-child{
 overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;
}
#r20MiniGame[data-game="mystery_doors"] .md-score-player strong{color:#ffe09c;white-space:nowrap}
#r20MiniGame[data-game="mystery_doors"] .md-score-bonuses{white-space:nowrap}
#r20MiniGame[data-game="mystery_doors"] .md-risk-panel{
 width:min(100%,1100px);margin:auto;padding:clamp(14px,3vw,30px);
 border-radius:24px;border:3px solid #ffdc87;
 background:radial-gradient(circle at 50% 12%,#7550a0aa,#243c72 62%,#13294b);
 box-shadow:0 0 28px #ffcd7c55,0 10px 25px #09153677;
 color:#fff;text-align:center;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-panel h2{
 color:#ffe39a;font-size:clamp(25px,4vw,48px);margin:4px auto 12px;
 text-shadow:0 4px 0 #654268;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-panel p{
 font-size:clamp(16px,2vw,24px);line-height:1.25;margin:10px auto;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-actions{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-button{
 min-height:110px;font-size:clamp(16px,3vw,26px);padding:15px 9px;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-button:first-child{background:linear-gradient(#c3ffd6,#4ec998);border-color:#9bf3c4}
#r20MiniGame[data-game="mystery_doors"] .md-risk-button:last-child{background:linear-gradient(#ffea9a,#f49b53);border-color:#ffdea1}
#r20MiniGame[data-game="mystery_doors"] .md-risk-result{
 margin:7px auto;padding:8px 12px;background:#102d53;
 border:1px solid #e8c481;border-radius:10px;
 font-size:clamp(13px,1.5vw,19px);font-weight:900;
}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card .md-reveal-icon{font-size:clamp(19px,2.4vw,34px)}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-card .doorReward{font-size:clamp(13px,1.4vw,22px);white-space:normal}
#r20MiniGame[data-game="mystery_doors"] .md-reveal-grid .doorCard small{max-height:none!important;overflow:visible!important}
@media(max-width:700px){
 #r20MiniGame[data-game="mystery_doors"] .md-scoreboard{grid-template-columns:repeat(2,minmax(0,1fr))}
 #r20MiniGame[data-game="mystery_doors"] .md-risk-actions{grid-template-columns:1fr}
 #r20MiniGame[data-game="mystery_doors"] .md-risk-button{min-height:75px}
}

/* Ultimate final round: elevate the stage without any oversized 3D objects. */
#r20MiniGame[data-game="mystery_doors"] .ccc-stage-mystery_doors.md-finale{
 border-color:#ffed9e!important;
 background:radial-gradient(ellipse at 50% 18%,#73498cb0,#27345c 52%,#111c40 100%)!important;
 box-shadow:0 0 36px #f7cb70a3,inset 0 0 30px #b989fd44,0 12px 0 #102048!important;
}
#r20MiniGame[data-game="mystery_doors"] .md-finale .ccc-party-tv-message{
 color:#fff0a9;text-shadow:0 0 13px #ffad4d;
}
#r20MiniGame[data-game="mystery_doors"] .md-finale .doorCard{
 box-shadow:0 0 15px #ffda8270,inset 0 3px 10px #ffffff22!important;
}
#r20MiniGame[data-game="mystery_doors"] .md-finale .md-lock-progress{
 background:linear-gradient(130deg,#3e315a,#142c54);border-color:#ffdf83;
}

/* Locked-door suspense: full-stage dimming, contained rattles and a 3-2-1 countdown. */
#r20MiniGame[data-game="mystery_doors"] .md-stage.md-suspense{
 position:relative;isolation:isolate;overflow:hidden!important;
 min-height:clamp(285px,54vh,530px);
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-heading{
 position:relative;z-index:2;color:#ffe59c;text-align:center;
 font-size:clamp(15px,2.1vw,24px);font-weight:1000;letter-spacing:.04em;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-grid{
 position:relative;z-index:1;transform:none!important;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-grid .doorCard{
 transform:none!important;overflow:hidden!important;
 animation:mdDoorRattle .22s ease-in-out .65s 10 alternate both;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-grid .md-portal{
 transform:none!important;max-width:85%;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-grid .doorLeaf{
 transform:none!important;backface-visibility:hidden;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-curtain{
 position:absolute;z-index:5;inset:0;pointer-events:none;
 border-radius:inherit;
 background:radial-gradient(circle at 50% 45%,#090e2880 5%,#060b23d9 86%);
 animation:mdLightsDown 3.3s linear both;
 display:flex;flex-direction:column;align-items:center;justify-content:center;
 gap:clamp(4px,1.3vh,16px);
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-countdown{
 position:relative;display:grid;place-items:center;width:clamp(100px,15vw,200px);
 height:clamp(104px,23vh,210px);
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-digit{
 grid-area:1/1;opacity:0;color:#fff1b2;font-weight:1000;
 font-size:clamp(80px,15vw,195px);line-height:1;
 text-shadow:0 0 16px #fff5c0,0 0 38px #febd54,0 7px 0 #8a4829;
 animation:mdCountBeat 1s cubic-bezier(.14,.67,.26,1) both;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-prompt{
 color:#fff1c6;text-align:center;font-weight:1000;
 font-size:clamp(17px,2.8vw,37px);
 text-shadow:0 0 15px #fedb77,0 3px 5px #080b22;
 letter-spacing:.035em;max-width:90%;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-locked{
 position:relative;z-index:5;margin:4px auto 0;
 color:#fff6d3;font-size:clamp(13px,1.65vw,22px);
 font-weight:900;text-align:center;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-phone{
 display:grid;gap:8px;text-align:center;padding:23px 14px;
 border:2px solid #ffdb8c;border-radius:20px;
 background:radial-gradient(circle at top,#644487,#172c55 75%);
 color:#fff8d4;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-phone strong{
 font-size:clamp(22px,6.4vw,32px);
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-phone p{
 font-size:clamp(16px,4vw,23px);margin:0;
}
@keyframes mdDoorRattle{
 0%{transform:translateX(-2px) rotate(-.7deg)}
 100%{transform:translateX(2px) rotate(.7deg)}
}
@keyframes mdLightsDown{
 0%{opacity:0}12%{opacity:.75}55%{opacity:1}90%{opacity:.94}100%{opacity:.1}
}
@keyframes mdCountBeat{
 0%{opacity:0;transform:scale(1.45);filter:brightness(2)}
 16%{opacity:1;transform:scale(1);filter:brightness(1)}
 80%{opacity:1;transform:scale(.94)}
 100%{opacity:0;transform:scale(.75)}
}
@media(prefers-reduced-motion:reduce){
 #r20MiniGame[data-game="mystery_doors"] .md-suspense-grid .doorCard,
 #r20MiniGame[data-game="mystery_doors"] .md-suspense-curtain,
 #r20MiniGame[data-game="mystery_doors"] .md-suspense-digit{
  animation:none!important;transform:none!important;
 }
 #r20MiniGame[data-game="mystery_doors"] .md-suspense-curtain{opacity:.85}
 #r20MiniGame[data-game="mystery_doors"] .md-suspense-digit:first-child{opacity:1}
}


/* Countdown must remain visible and time-aligned across socket rerenders. */
#r20MiniGame[data-game="mystery_doors"] .md-suspense-curtain{
 animation:mdLightsDown 6s linear both;
 background:radial-gradient(circle at 50% 42%,#080d24c9 0%,#060b23e8 87%);
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-countdown{
 width:clamp(210px,31vw,460px);height:clamp(92px,20vh,180px);
 z-index:10;isolation:isolate;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-digit{
 display:block;opacity:1;animation:none;position:relative;z-index:11;
 font-size:clamp(90px,15vw,184px);text-align:center;
 color:#fff4b9;text-shadow:0 0 21px #ffd65f,0 0 52px #ffc04f,0 7px 0 #733b23;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-digit.md-suspense-word{
 font-size:clamp(35px,5.5vw,72px);line-height:1.05;white-space:nowrap;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-digit.md-count-pulse{
 animation:mdCountdownVisiblePulse .55s cubic-bezier(.14,.67,.26,1) both;
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-prompt{
 position:relative;z-index:11;font-size:clamp(16px,2vw,29px);
}
#r20MiniGame[data-game="mystery_doors"] .md-suspense-grid .doorCard{
 animation:mdDoorRattle .22s ease-in-out 1.2s 18 alternate both;
}
@media(prefers-reduced-motion:reduce){
 #r20MiniGame[data-game="mystery_doors"] .md-suspense-digit.md-count-pulse{animation:none!important;opacity:1!important}
}

@keyframes mdCountdownVisiblePulse{0%{opacity:.4;transform:scale(1.26)}40%{opacity:1;transform:scale(1)}100%{opacity:1;transform:scale(1)}}

/* Mystery Doors: celebrate a shield actually blocking a trap (server-confirmed). */
#r20MiniGame[data-game="mystery_doors"] .md-shield-activation{
 position:absolute;z-index:30;left:50%;top:48%;transform:translate(-50%,-50%);
 width:min(90%,850px);min-width:0;pointer-events:none;
 padding:clamp(13px,2.5vh,24px) clamp(14px,2.4vw,30px);
 border:3px solid #b9ffe5;border-radius:24px;
 background:radial-gradient(ellipse at 50% 0%,#258989,#103d66 66%,#0a2447);
 color:#fff;text-align:center;box-shadow:0 0 0 8px #b9ffe529,0 0 45px #62ffdaaf,0 20px 55px #000a;
 display:flex;flex-direction:column;gap:6px;
 animation:mdShieldArrival 3.4s ease-out both;
}
#r20MiniGame[data-game="mystery_doors"] .md-shield-headline{
 color:#c3ffe8;font-size:clamp(25px,4vw,54px);font-weight:1000;
 text-shadow:0 0 19px #3dffbd,0 3px 3px #062b43;
}
#r20MiniGame[data-game="mystery_doors"] .md-shield-detail{
 font-size:clamp(13px,1.7vw,24px);font-weight:900;line-height:1.25;
}
#r20MiniGame[data-game="mystery_doors"] .md-shield-reminder{
 position:relative;z-index:2;margin:5px auto 0;padding:6px 15px;
 max-width:96%;border:1px solid #7df9d2;border-radius:12px;
 background:#12536be8;color:#dcfff3;text-align:center;
 font-weight:900;font-size:clamp(12px,1.4vw,19px);
}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .md-shield-activation.md-shield-phone{
 position:relative;left:auto;top:auto;transform:none;width:100%;margin:12px auto;
 animation:mdShieldPhoneIn .5s ease-out both;
}
@keyframes mdShieldArrival{
 0%{opacity:0;transform:translate(-50%,-50%) scale(.5);filter:brightness(2)}
 13%,65%{opacity:1;transform:translate(-50%,-50%) scale(1);filter:brightness(1)}
 88%{opacity:1;transform:translate(-50%,-50%) scale(.99)}
 100%{opacity:0;transform:translate(-50%,-50%) scale(.95)}
}
@keyframes mdShieldPhoneIn{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){
 #r20MiniGame[data-game="mystery_doors"] .md-shield-activation{animation:none!important;opacity:1;position:relative;top:auto;left:auto;transform:none;margin:8px auto}
}

/* Mystery Doors progress: visible on the TV and on the phone in every
   active stage, including suspense, reveal and bank-or-gamble. */
#r20MiniGame[data-game="mystery_doors"] .md-round-ribbon{
 display:flex;align-items:center;justify-content:center;flex-wrap:wrap;
 gap:clamp(5px,.8vw,11px);margin:0 auto clamp(5px,1vh,12px);
 padding:clamp(6px,.85vh,11px) clamp(10px,1.6vw,20px);
 width:min(100%,960px);min-width:0;border:2px solid #eec976;
 border-radius:16px;background:linear-gradient(110deg,#533b79,#253b69 62%,#16395c);
 color:#fff0c3;box-shadow:inset 0 2px 9px #ffffff1e,0 3px 12px #0005;
 position:relative;z-index:7;
}
#r20MiniGame[data-game="mystery_doors"] .md-round-title{
 font-size:clamp(17px,2vw,27px);font-weight:1000;white-space:nowrap;
 text-shadow:0 2px 5px #0008;
}
#r20MiniGame[data-game="mystery_doors"] .md-round-track{
 display:flex;gap:clamp(3px,.35vw,7px);align-items:center;justify-content:center;
 flex:1 1 120px;max-width:290px;
}
#r20MiniGame[data-game="mystery_doors"] .md-round-pip{
 flex:1;min-width:5px;height:clamp(9px,1.5vh,14px);
 border:1px solid #bdc5de;border-radius:20px;background:#17233f;
}
#r20MiniGame[data-game="mystery_doors"] .md-round-pip.is-complete{
 background:linear-gradient(90deg,#f9b94b,#fff0a5);border-color:#ffe5a2;
}
#r20MiniGame[data-game="mystery_doors"] .md-round-pip.is-current{
 box-shadow:0 0 10px 2px #ffde7b;
}
#r20MiniGame[data-game="mystery_doors"] .md-round-finale{
 color:#ffe399;font-size:clamp(12px,1.25vw,17px);font-weight:1000;
}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .md-round-ribbon{
 gap:6px;padding:8px;border-radius:12px;
}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .md-round-title{
 font-size:clamp(16px,4.5vw,22px);
}
#r20MiniGame.r20-mg-phone[data-game="mystery_doors"] .md-round-track{
 flex-basis:100%;max-width:100%;
}

/* Each portal stays visibly LOCKED until its own turn; rewards and player
   names cannot appear early. Door movements stay contained in each tile. */
#r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(6px,1vw,14px);
}
#r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-reveal-card{
 min-width:0;min-height:clamp(155px,28vh,310px);
 display:flex;flex-direction:column;justify-content:center;align-items:center;
 padding:clamp(5px,.8vw,12px);position:relative;overflow:hidden;
}
#r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-door-illustration{
 display:flex;align-items:center;justify-content:center;min-width:0;width:100%;
}
#r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-door-illustration>.doorFrame{max-width:100%}
#r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-sequence-detail{
 display:flex;flex-direction:column;align-items:center;gap:2px;max-width:100%;
 text-align:center;transition:opacity .25s ease;
}
#r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-door-waiting .md-sequence-detail{
 visibility:hidden!important;opacity:0!important;
}
#r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-door-waiting{
 filter:saturate(.7) brightness(.78);
}
#r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-door-opening{
 animation:mdSingleDoorPop .55s ease-out;
}
/* One 3–2–1 before the sequence; each following door shakes briefly, then
   opens. The fourth door has a longer ominous build and a larger payoff. */
#r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-door-rattling{
 z-index:2;border-color:#ffe2a1!important;
 box-shadow:0 0 28px #ffcb8590,inset 0 0 14px #ffe49f44;
 animation:mdDoorRattle .16s ease-in-out infinite alternate;
}
#r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal.md-final-tension .md-reveal-card:not(.md-door-rattling){
 filter:saturate(.6) brightness(.55);
 transition:filter .45s ease-out;
}
#r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal.md-final-tension .md-door-rattling{
 border-color:#fff1a8!important;filter:brightness(1.3);
 box-shadow:0 0 30px #ffd783aa,0 0 55px #f6a34b44;
}
#r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-last-door-opened{
 z-index:3;border-color:#fff2bd!important;
 box-shadow:0 0 28px #ffe79699,0 0 44px #ffc76288;
 animation:mdFinalDoorBurst .75s cubic-bezier(.17,.8,.25,1) both;
}
#r20MiniGame[data-game="mystery_doors"] .md-last-door-warning{
 box-sizing:border-box;width:min(100%,700px);
 margin:3px auto;padding:6px 10px;
 border:1px solid #ffe6a7;border-radius:10px;
 background:linear-gradient(100deg,#5b3449,#3c2551,#5b3449);
 color:#fff2ba;text-align:center;font:950 clamp(12px,1.65vw,21px)/1.2 system-ui;
 letter-spacing:.04em;animation:mdFinalWarning .7s ease-in-out infinite alternate;
}
#r20MiniGame[data-game="mystery_doors"] .md-last-door-warning[hidden]{display:none!important}
@keyframes mdDoorRattle{
 from{transform:translateX(-3px) rotate(-1deg)}
 to{transform:translateX(3px) rotate(1deg)}
}
@keyframes mdFinalDoorBurst{
 0%{transform:scale(.91);filter:brightness(.5)}
 48%{transform:scale(1.04);filter:brightness(1.55)}
 100%{transform:scale(1);filter:brightness(1)}
}
@keyframes mdFinalWarning{
 from{box-shadow:0 0 6px #ffe39e44}
 to{box-shadow:0 0 24px #ffd58b99}
}
#r20MiniGame[data-game="mystery_doors"] .md-sequence-status,
#r20MiniGame[data-game="mystery_doors"] .md-sequence-summary,
#r20MiniGame[data-game="mystery_doors"] .md-sequence-shield{
 text-align:center;margin:clamp(3px,.6vh,9px) auto;padding:5px 12px;
 font-weight:950;color:#ffedb5;font-size:clamp(14px,1.75vw,23px);
}
#r20MiniGame[data-game="mystery_doors"] .md-sequence-shield{
 color:#b5ffe7;background:#115472;border:2px solid #7cf1d0;
 border-radius:12px;max-width:97%;
}
#r20MiniGame[data-game="mystery_doors"] .md-sequence-scores{
 width:100%;
}
#r20MiniGame[data-game="mystery_doors"] [hidden].md-sequence-summary,
#r20MiniGame[data-game="mystery_doors"] [hidden].md-sequence-shield,
#r20MiniGame[data-game="mystery_doors"] [hidden].md-sequence-scores{display:none!important}
@keyframes mdSingleDoorPop{
 0%{transform:scale(.92);filter:brightness(.65)}
 45%{transform:scale(1.035);filter:brightness(1.3)}
 100%{transform:scale(1);filter:brightness(1)}
}
@media(max-width:700px){
 #r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
 #r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-reveal-card{
  min-height:140px;
 }
}
@media(prefers-reduced-motion:reduce){
 #r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-door-opening{animation:none!important}
}


/* Mystery Doors TV sign-off: one results scoreboard, no overlapping fixed dock. */
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_risk_result"] .r20-mg-scores{
 display:none!important;
}
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_risk_result"] .r20-mg-center,
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_risk_result"] .r20-mg-stage-main{
 min-height:0!important;max-height:none!important;overflow:visible!important;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-results-panel{
 box-sizing:border-box;width:min(100%,1160px)!important;
 margin:0 auto!important;padding:clamp(9px,1.3vh,18px) clamp(12px,1.5vw,24px)!important;
 border-radius:19px!important;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-results-panel h2{
 font-size:clamp(23px,3.4vh,38px)!important;line-height:1.1!important;
 margin:0 auto clamp(6px,.9vh,10px)!important;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-results-grid{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:clamp(4px,.5vh,8px) clamp(6px,.7vw,12px);
 width:100%;margin:0 auto;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-results-grid .md-risk-result{
 display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,auto) auto;
 gap:clamp(5px,.65vw,12px);align-items:center;
 min-width:0;min-height:0;margin:0!important;
 padding:clamp(5px,.65vh,8px) clamp(7px,.9vw,12px)!important;
 border-radius:10px;font-size:clamp(11px,1.35vw,17px)!important;line-height:1.15;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-player-name{
 min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-outcome{
 font-size:clamp(10px,1.13vw,15px);white-space:nowrap;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-points{white-space:nowrap;text-align:right}
#r20MiniGame[data-game="mystery_doors"] .md-risk-banked{border-color:#e8c481!important;background:linear-gradient(120deg,#293e61,#34466a)!important;color:#ffe6ad}
#r20MiniGame[data-game="mystery_doors"] .md-risk-won{border-color:#81e7a8!important;background:linear-gradient(120deg,#174f4c,#1d5d54)!important;color:#d2ffe2}
#r20MiniGame[data-game="mystery_doors"] .md-risk-lost{border-color:#ff9e9a!important;background:linear-gradient(120deg,#643445,#4b304c)!important;color:#ffd7d7}
#r20MiniGame[data-game="mystery_doors"] .md-risk-scores-title{
 color:#d8edff;font-size:clamp(12px,1.55vh,17px);line-height:1.1;
 margin:clamp(6px,.9vh,10px) 0 2px!important;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-results-panel .md-scoreboard{
 grid-template-columns:repeat(5,minmax(0,1fr));gap:4px 6px;
 margin:2px auto 0!important;
}
#r20MiniGame[data-game="mystery_doors"] .md-risk-results-panel .md-score-player{
 padding:4px 6px!important;gap:4px!important;font-size:clamp(11px,1.05vw,15px)!important;
}
@media(max-height:780px){
 #r20MiniGame[data-game="mystery_doors"] .md-risk-results-panel{padding:7px 12px!important}
 #r20MiniGame[data-game="mystery_doors"] .md-risk-results-panel .md-risk-result{padding:4px 7px!important}
 #r20MiniGame[data-game="mystery_doors"] .md-risk-results-panel .md-score-player{padding:3px 5px!important}
}
@media(max-width:850px){
 #r20MiniGame[data-game="mystery_doors"] .md-risk-results-grid .md-risk-result{
  grid-template-columns:minmax(0,1fr) auto;gap:2px 6px;
 }
 #r20MiniGame[data-game="mystery_doors"] .md-risk-outcome{grid-column:1;grid-row:2}
 #r20MiniGame[data-game="mystery_doors"] .md-risk-points{grid-column:2;grid-row:1/3}
 #r20MiniGame[data-game="mystery_doors"] .md-risk-results-panel .md-scoreboard{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
 #r20MiniGame[data-game="mystery_doors"] .md-risk-results-grid{grid-template-columns:1fr}
}
/* Suspense stage: contained height and caption, including short/fullscreen TVs. */
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-stage.md-suspense{
 min-height:clamp(240px,38dvh,365px)!important;
 height:clamp(240px,38dvh,365px)!important;
 max-height:38dvh!important;box-sizing:border-box!important;
}
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-suspense-curtain{
 justify-content:flex-start!important;gap:clamp(5px,.8dvh,10px)!important;
 padding:clamp(16px,3dvh,28px) 12px 12px!important;box-sizing:border-box!important;
}
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-cinematic-countdown{
 flex:0 0 auto!important;height:clamp(95px,16dvh,148px)!important;
 min-height:0!important;width:min(80%,420px)!important;
}
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-cinematic-countdown:before{
 width:clamp(78px,15dvh,138px)!important;height:clamp(78px,15dvh,138px)!important;
 max-width:85%!important;max-height:85%!important;
}
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-cinematic-countdown:has(.md-suspense-word):before{
 display:none!important;
}
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-suspense-prompt{
 display:block!important;visibility:visible!important;opacity:1!important;
 position:relative!important;z-index:40!important;
 width:min(96%,880px)!important;max-width:96%!important;
 margin:0 auto!important;padding:0 4px!important;
 font-size:clamp(15px,2.25vw,27px)!important;line-height:1.2!important;
 white-space:normal!important;overflow:visible!important;text-wrap:balance;
}
@media(max-height:700px){
 #r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-stage.md-suspense{
  min-height:220px!important;height:35dvh!important;max-height:35dvh!important;
 }
 #r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-cinematic-countdown{
  height:clamp(80px,14dvh,105px)!important;
 }
 #r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-suspense-curtain{
  padding-top:10px!important;
 }
}


/* Mystery Doors suspense polish — centred, readable at laptop and TV heights.
   Keep the round ribbon in view while removing the competing score dock. */
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .r20-mg-scores{
 display:none!important;
}
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-stage.md-suspense{
 position:relative!important;
 min-height:clamp(320px,62dvh,650px)!important;
 height:clamp(320px,62dvh,650px)!important;
 max-height:min(70dvh,650px)!important;
 overflow:hidden!important;
}
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-suspense-curtain{
 display:flex!important;flex-direction:column!important;
 justify-content:center!important;align-items:center!important;
 gap:clamp(12px,2.2dvh,25px)!important;
 padding:clamp(20px,4dvh,42px) clamp(12px,2vw,26px)!important;
 background:radial-gradient(ellipse at 50% 45%,#080d24af 0%,#060b23db 87%)!important;
}
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-cinematic-countdown{
 display:grid!important;place-items:center!important;
 flex:0 0 auto!important;
 width:min(94%,700px)!important;
 height:clamp(130px,24dvh,230px)!important;
 min-height:0!important;margin:0 auto!important;
}
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-suspense-digit{
 max-width:100%!important;
 font-size:clamp(100px,min(17vw,23dvh),214px)!important;
 line-height:1!important;
}
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-suspense-word{
 font-size:clamp(32px,5.1vw,66px)!important;
 white-space:normal!important;text-wrap:balance;
}
#r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-suspense-prompt{
 flex:0 0 auto!important;position:relative!important;
 width:min(94%,920px)!important;max-width:94%!important;
 margin:0 auto!important;padding:0 8px!important;
 font-size:clamp(17px,2.4vw,31px)!important;
 line-height:1.25!important;letter-spacing:.015em!important;
 text-align:center!important;text-wrap:balance!important;
 overflow-wrap:break-word!important;
}
@media(max-height:700px){
 #r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-stage.md-suspense{
  min-height:290px!important;height:60dvh!important;max-height:60dvh!important;
 }
 #r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-cinematic-countdown{
  height:clamp(110px,21dvh,160px)!important;
 }
 #r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-suspense-curtain{
  gap:10px!important;padding:12px!important;
 }
}
@media(max-height:520px){
 #r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-stage.md-suspense{
  min-height:210px!important;height:54dvh!important;max-height:54dvh!important;
 }
 #r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-cinematic-countdown{
  height:90px!important;
 }
 #r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-suspense-digit{
  font-size:90px!important;
 }
 #r20MiniGame.r20-mg-tv[data-game="mystery_doors"][data-stage="door_suspense"] .md-suspense-prompt{
  font-size:clamp(14px,2vw,21px)!important;
 }
}

@media(prefers-reduced-motion:reduce){
 #r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-door-rattling,
 #r20MiniGame[data-game="mystery_doors"] .md-sequential-reveal .md-last-door-opened,
 #r20MiniGame[data-game="mystery_doors"] .md-last-door-warning{animation:none!important}
}
