#stage.maze-active .g-wrap{height:100%;max-height:none;display:flex;flex-direction:column;min-height:0}
#stage.maze-active .g-body{width:100%;max-width:none!important;padding:0!important;flex:1;min-height:0;overflow:auto}
#stage.maze-active .g-head{display:none}
.mz-game{--mz-cream:#f7f0d6;--mz-mint:#a97bff;width:100%;height:100%;min-height:650px;display:flex;flex-direction:column;color:var(--mz-cream);background:#142a32;border:1px solid #accdc02b;border-radius:20px;overflow:hidden;text-align:right;font-family:inherit}
.mz-game *{box-sizing:border-box}.mz-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 22px;background:#0a0a16;flex:none}
.mz-brand{display:flex;align-items:center;gap:12px}.mz-logo{width:43px;height:43px;display:grid;place-items:center;background:#e9c67a;color:#263e39;border-radius:14px;font-size:32px;font-weight:900;box-shadow:0 4px 0 #b89350}
.mz-brand small{font:600 9px/1.4 sans-serif;letter-spacing:2px;color:#a8bfb6;direction:ltr;display:block;text-align:left}.mz-brand small i{padding:0 6px;color:#e2c385}
.mz-brand h2{font-size:23px;line-height:1.5;margin:2px 0 0}.mz-brand em{font:normal 10px/1.5 sans-serif;margin-inline-start:8px;background:#e7be6920;color:#f0ce87;border:1px solid #e7be6938;border-radius:5px;padding:3px 6px;white-space:nowrap}
.mz-counters{display:flex;align-items:center;gap:25px}.mz-counters>span{font-size:12px;color:#b0c7bd}.mz-counters b{display:block;text-align:center;font:700 23px sans-serif;color:#e7f3d2}.mz-counters>strong{font:700 32px/1 monospace;letter-spacing:1px;padding:12px 17px;background:#213a40;border:1px solid #93b8a82c;border-radius:12px}.mz-counters .urgent{color:#ffad99;border-color:#ffad9966;animation:mz-pulse 1s infinite}
.mz-field{position:relative;flex:1;min-height:310px;overflow:hidden;background:#101022}.mz-field canvas{display:block;width:100%;height:100%;position:absolute;inset:0}
.mz-map-label{position:absolute;top:14px;right:22px;pointer-events:none;display:flex;align-items:center;gap:14px}.mz-map-label b{font-size:16px;color:#f2efff}.mz-map-label span{font-size:11px;color:#a9a4c8}.mz-legend{position:absolute;bottom:10px;inset-inline:10px;display:flex;justify-content:center;gap:17px;color:#c9c2ff;font-size:10px;pointer-events:none}
.mz-countdown{position:absolute;inset:0;display:grid;place-items:center;background:#0a0a1666;backdrop-filter:blur(2px);font-size:88px;font-weight:900;color:#ffe5a4;text-shadow:0 5px 0 #12122a}.mz-countdown[hidden],.mz-event[hidden]{display:none}.mz-event{position:absolute;top:48px;left:50%;transform:translateX(-50%);border:1px solid #d8c09555;background:#20203bf0;color:#f5d991;border-radius:30px;padding:8px 20px;font-weight:bold;font-size:13px}
.mz-status{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 22px;border-top:1px solid #31e1ff24;border-bottom:1px solid #31e1ff24;background:#17172d;font-size:13px;min-height:42px;flex:none}.mz-status>span:first-child{color:#ffd76e;font-weight:700}.mz-status>span:last-child{font-size:10px;color:#a9a4c8;white-space:nowrap}
.mz-voting{padding:14px 22px 10px;background:#12122a;flex:none}.mz-vote-heading{display:flex;align-items:center;gap:16px;margin-bottom:10px}.mz-vote-heading>div:first-child{flex:1}.mz-vote-heading small{font:600 8px sans-serif;letter-spacing:2px;color:#8f89b5}.mz-vote-heading h3{font-size:21px;line-height:1.4;margin:2px 0}.mz-vote-total{font-size:12px;border:1px solid #a97bff33;padding:5px 13px;border-radius:30px;color:#c9c2ff}.mz-count{display:flex;align-items:center;gap:6px;min-width:60px}.mz-count b{font:700 29px monospace;color:#f0cb7d}.mz-count small{letter-spacing:0;font:11px inherit}
.mz-options{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.mz-options button{font:inherit;position:relative;isolation:isolate;overflow:hidden;border:1px solid #97b7ae3d;border-radius:12px;padding:12px 14px 8px;background:#233e44;color:#dbe5ca;opacity:1!important;cursor:default;text-align:left;transition:border-color .2s,transform .2s;min-width:0}.mz-options button:not(:disabled){cursor:pointer}.mz-options button:not(:disabled):hover{border-color:#f4d493;transform:translateY(-2px)}.mz-fill{position:absolute;bottom:0;left:0;height:100%;width:var(--fill,0%);background:#a97bff17;z-index:-1;transition:width .3s}.mz-option-top{display:flex;align-items:center;gap:9px}.mz-option-top b{font:700 20px monospace;display:grid;place-items:center;background:#122e36;width:29px;height:29px;border-radius:7px;color:#b6daba}.mz-option-top i{font:normal 26px/1 sans-serif}.mz-option-top strong{font-size:14px;white-space:nowrap}.mz-percent{display:block;color:#a2baad;font:11px monospace;margin-top:7px;text-align:right}.mz-options .chosen{border-color:#ffe5a4;background:#415448;box-shadow:0 0 20px #ffe5a416}.mz-options .chosen .mz-option-top b{background:#eed38c;color:#213c38}.mz-options .excluded{opacity:.28!important}.mz-vote-hint{text-align:center;font-size:10px;color:#9db7aa;margin:10px 0 0}
.mz-host{display:flex;align-items:center;justify-content:space-between;padding:9px 22px;gap:10px;border-top:1px solid #a8c3b21a;background:#112830;color:#91a99e;font-size:10px;flex:none}.mz-host>div{display:flex;align-items:center;gap:7px}.mz-host button{background:#254047;color:#c5d3bd;border:1px solid #9cbbae26;font:11px inherit;border-radius:6px;padding:5px 8px;cursor:pointer}.mz-host label{display:flex;gap:5px;align-items:center}.mz-host input{width:58px;accent-color:#e6c47c}
.mz-results{display:flex;flex-direction:column;align-items:center;gap:16px;padding:30px!important;overflow:auto!important;background:radial-gradient(ellipse at top,#314f45,#122b34 70%)!important;color:#f8edca}.mz-results h2{font-size:36px;margin:0}.mz-results>p{margin:0;color:#c7d9c1}.mz-result-stats{display:flex;gap:28px;justify-content:center;flex-wrap:wrap}.mz-result-stats span{text-align:center;font-size:12px;color:#aac2b5}.mz-result-stats b{display:block;font-size:26px;color:#f4d695}.mz-result-team{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;max-width:950px}.mz-result-player{display:flex;align-items:center;gap:7px;padding:8px 13px;border-radius:12px;border:1px solid #bcd9b53d;background:#38574855;font-size:14px}.mz-result-player em{font-style:normal;color:#f4d695}.mz-results .mz-again{border:0;background:#f0d18c;color:#153a3a;padding:12px 28px;border-radius:10px;font:700 17px inherit;cursor:pointer}.mz-results .mz-result-icon{font-size:62px;line-height:1.2}
@keyframes mz-pulse{50%{box-shadow:0 0 18px #ffad9922}}
@media(min-width:900px) and (min-height:850px){.mz-game{min-height:760px}.mz-field{min-height:400px}.mz-options button{padding:16px}.mz-vote-heading h3{font-size:25px}}
@media(max-width:650px){.mz-game{border-radius:12px;min-height:680px}.mz-head{padding:12px;gap:8px}.mz-brand{gap:8px}.mz-logo{width:32px;height:35px;font-size:26px}.mz-brand h2{font-size:17px}.mz-brand em{display:block;width:max-content;margin:2px 0 0;font-size:9px}.mz-brand small{font-size:7px;letter-spacing:1px}.mz-counters{gap:10px}.mz-counters>span{font-size:9px}.mz-counters>strong{font-size:23px;padding:9px}.mz-map-label{right:12px;gap:6px;flex-direction:column;align-items:flex-start}.mz-map-label b{font-size:13px}.mz-map-label span{font-size:9px}.mz-voting{padding:12px}.mz-options{gap:6px}.mz-options button{padding:8px 7px}.mz-option-top{gap:4px;flex-wrap:wrap}.mz-option-top b{font-size:17px;width:24px;height:24px}.mz-option-top i{font-size:24px}.mz-option-top strong{font-size:12px;width:100%}.mz-status{padding:8px 12px;flex-direction:column;gap:4px;align-items:flex-start;font-size:12px}.mz-host{padding:9px 12px;flex-wrap:wrap}.mz-host>div{gap:5px;flex-wrap:wrap}.mz-legend{gap:9px;font-size:9px}.mz-results h2{font-size:28px}}
@media(prefers-reduced-motion:reduce){.mz-game *{animation:none!important;transition:none!important}}
/* The shared stage centers ordinary cards. The maze needs the whole play area. */
body:has(#stage.maze-active) #stage.maze-active{position:fixed!important;inset:0 72px 66px 0!important;width:auto!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;overflow:hidden!important;z-index:20}
body.practice-on:has(#stage.maze-active) #stage.maze-active{bottom:120px!important}
#stage.maze-active>.g-wrap{width:100%!important;height:100%!important;max-width:none!important;min-height:0!important;transform:none!important;padding:0!important;gap:0!important}
#stage.maze-active .g-how,#stage.maze-active .g-top,#stage.maze-active #gtimer{display:none!important}
#stage.maze-active .g-body{display:block!important;width:100%!important;height:100%!important;min-height:0!important;padding:0!important;margin:0!important;overflow:auto!important;align-items:normal!important;justify-content:flex-start!important}
#stage.maze-active .mz-game{height:100%;min-height:510px;border:0;border-radius:0}
#stage.maze-active .mz-field{min-height:180px}
body:has(#stage.maze-active) #brandmark,body:has(#stage.maze-active) #stageBar .sb-right,body:has(#stage.maze-active) #stageBar .sb-mid{display:none!important}
body:has(#stage.maze-active) #practice{position:fixed!important;inset:auto 72px 66px 0!important;width:auto!important;height:54px!important;min-height:0!important;margin:0!important;padding:7px 14px!important;z-index:21;border-radius:0!important}
body:has(#stage.maze-active) #practice .pr-row,body:has(#stage.maze-active) #prMe{display:none!important}
body:has(#stage.maze-active) #practice .pr-top{justify-content:center}
@media(max-width:650px){body:has(#stage.maze-active) #stage.maze-active{right:0!important;top:52px!important;bottom:66px!important}body.practice-on:has(#stage.maze-active) #stage.maze-active{bottom:120px!important}body:has(#stage.maze-active) #practice{right:0!important}.mz-head{min-height:78px}}
@media(max-height:780px) and (min-width:651px){.mz-head{padding:9px 18px}.mz-brand h2{font-size:21px}.mz-voting{padding:9px 18px 7px}.mz-vote-heading{margin-bottom:6px}.mz-vote-heading h3{font-size:19px}.mz-options button{padding:8px 12px 6px}.mz-vote-hint{margin-top:6px}.mz-host{padding:6px 18px}.mz-status{padding:7px 18px;min-height:34px}}
body.win-full:has(.mz-results) #practice,body.win-full:has(.mz-results) #brandmark,body.win-full:has(.mz-results) #stageBar{display:none!important}
body.win-full #stage .mz-results{justify-content:safe center!important;align-items:center!important;text-align:center;gap:18px;z-index:7990!important;box-sizing:border-box}
.mz-results::before,.mz-results::after{display:none!important}
.mz-results .mz-again{flex-shrink:0}

/* ══════════════════════════════════════════════════════════════════════
   شاشةُ فوز المتاهة — جماعيّة

   اللعبةُ يفوز فيها الفريقُ كلُّه، فلا تُبرز واحداً وتُخفي الباقين.
   كلُّهم ببنراتهم، وأرقامُ الرحلة في بطاقات. وبألوان الموقع:
   بنفسجيٌّ وسماويٌّ وذهبيٌّ على داكن.
   ══════════════════════════════════════════════════════════════════════ */
.mz-win{
  position:relative;overflow:hidden;display:flex;flex-direction:column;align-items:center;
  gap:clamp(7px,1.3vh,14px);padding:clamp(16px,3vh,34px) clamp(14px,3vw,38px);
  border-radius:clamp(16px,2.6vh,26px);text-align:center;
  background:linear-gradient(168deg,#20203b,#17172d 58%,#101022);
  border:1px solid rgba(169,123,255,.3);
  box-shadow:0 24px 64px rgba(2,2,12,.7),0 0 60px rgba(169,123,255,.16);
}
/* شعاعٌ يدور خلف البطاقة — للفوز وحده */
.mz-win.won .mzw-ray{
  position:absolute;inset:-40%;z-index:0;pointer-events:none;
  background:conic-gradient(from 0deg,transparent 0 64%,rgba(255,215,110,.5) 78%,transparent 92%);
  filter:blur(26px);opacity:.55;animation:mzwSpin 7s linear infinite;
}
@keyframes mzwSpin{to{transform:rotate(1turn)}}
.mz-win>*:not(.mzw-ray){position:relative;z-index:1}
.mzw-ico{font-size:clamp(38px,7vh,74px);line-height:1;
  filter:drop-shadow(0 6px 18px rgba(255,215,110,.5))}
.mz-win small{font:900 9px/1 sans-serif;letter-spacing:3px;color:#8f89b5}
.mz-win h2{font-size:clamp(20px,3.6vh,38px);font-weight:900;line-height:1.25;
  background:linear-gradient(135deg,#a97bff,#31e1ff 50%,#ffd76e);
  -webkit-background-clip:text;background-clip:text;color:transparent}
.mz-win p{font-size:clamp(12px,1.9vh,16px);color:#c9c2ff;max-width:52ch}

.mzw-stats{display:flex;flex-wrap:wrap;justify-content:center;gap:clamp(6px,1vw,12px)}
.mzw-s{display:flex;flex-direction:column;align-items:center;gap:1px;min-width:74px;
  padding:clamp(6px,1.1vh,11px) clamp(9px,1.4vw,16px);border-radius:14px;
  background:rgba(255,255,255,.05);border:1px solid rgba(49,225,255,.18)}
.mzw-s b{font-size:clamp(15px,2.6vh,26px);font-weight:900;color:#ffd76e;
  font-variant-numeric:tabular-nums}
.mzw-s i{font-style:normal;font-size:10.5px;font-weight:800;color:#8f89b5}

.mzw-team{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;max-width:100%}
.mzw-p{position:relative;overflow:hidden;display:inline-flex;align-items:center;gap:7px;
  padding:5px 13px 5px 6px;border-radius:999px;font-size:clamp(12px,1.8vh,16px);font-weight:900;
  background:linear-gradient(110deg,color-mix(in srgb,var(--pb-acc) 26%,#20203b),#20203b);
  border:1px solid rgba(169,123,255,.22);
  animation:mzwIn .4s cubic-bezier(.2,1.2,.35,1) backwards}
.mzw-p:nth-child(2){animation-delay:.05s}.mzw-p:nth-child(3){animation-delay:.1s}
.mzw-p:nth-child(4){animation-delay:.15s}.mzw-p:nth-child(5){animation-delay:.2s}
@keyframes mzwIn{from{opacity:0;transform:translateY(10px) scale(.92)}to{opacity:1;transform:none}}
.mzw-p.has-bnr .mzw-bg{position:absolute;inset:0;z-index:0;
  background-image:var(--own-img);background-size:cover;background-position:center var(--own-y,50%)}
/* ستارٌ يثقل نحو الاسم ليُقرأ ويخفّ عن البنر ليُرى */
.mzw-p.has-bnr .mzw-bg::after{content:'';position:absolute;inset:0;
  background:linear-gradient(270deg,rgba(10,10,22,.4),rgba(10,10,22,.8) 55%,rgba(10,10,22,.9))}
.mzw-p>*:not(.mzw-bg){position:relative;z-index:1}
.mzw-p b{text-shadow:0 2px 4px #000}
.mzw-p em{font-style:normal;font-size:11px;font-weight:900;color:#0a0a16;
  background:#ffd76e;padding:1px 8px;border-radius:999px}
.mzw-more{display:inline-flex;align-items:center;padding:5px 13px;border-radius:999px;
  font-size:13px;font-weight:900;color:#c9c2ff;background:rgba(255,255,255,.06)}

.mz-again{margin-top:4px;font-family:inherit;font-size:clamp(13px,1.9vh,17px);font-weight:900;
  cursor:pointer;padding:clamp(9px,1.5vh,14px) clamp(18px,3vw,34px);border-radius:14px;
  color:#0a0a16;border:0;background:linear-gradient(135deg,#a97bff,#31e1ff)}
.mz-again:hover{filter:brightness(1.1)}
