html, body, #root { margin: 0; min-height: 100%; }
body { background: var(--bgd); }
.mz-root { --gold:var(--gold); --ink:#f6efe0; --bg:var(--bgd); --bg2:#1f1a3d; --card:#2a2352; font-family: 'Noto Sans Arabic','Segoe UI',Tahoma,sans-serif; color: var(--ink); min-height: calc(100 * var(--vh));
  background: radial-gradient(900px 500px at 50% -10%, #3a2d78 0%, transparent 60%), radial-gradient(600px 400px at 100% 100%, #1d4a5a55 0%, transparent 60%), var(--bg); padding: 10px 10px 40px; box-sizing: border-box; max-width: 760px; margin: 0 auto; -webkit-tap-highlight-color: transparent; }
.mz-root * { box-sizing: border-box; }
.mz-root button { font-family: inherit; cursor: pointer; }
/* setup */
.mz-setup { padding: 14px 6px; display:flex; flex-direction:column; gap:16px; }
.mz-logo { text-align:center; }
.mz-logo h1 { margin: 0; font-size: 56px; color: var(--gold); text-shadow: 0 4px 24px #f3d27a55; line-height:1.1; }
.mz-logo p { margin: 4px 0 0; opacity:.8; }
.mz-sect h3 { margin: 0 0 8px; font-size: 15px; color:#cdbfff; }
.mz-seg { display:flex; gap:8px; }
.mz-seg button { flex:1; padding: 13px 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--p3); color: var(--ink); font-size: 15px; font-weight:700; }
.mz-seg button.on { background: linear-gradient(180deg,#f7dc8a,#d9a93c); color:#2a1d00; border-color:#f7dc8a; box-shadow: 0 4px 16px #f3d27a40; }
.mz-names { display:flex; flex-direction:column; gap:8px; }
.mz-names input { padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line); background:var(--p3); color: var(--ink); font-size:16px; font-family:inherit; }
.mz-bot { padding: 13px 14px; border-radius:12px; background:#1a1538; border:1.5px dashed #3e3578; opacity:.9; }
.mz-go { padding: 15px 18px; border-radius: 16px; border:0; font-size:18px; font-weight:800; color:#2a1d00; background: linear-gradient(180deg,#f9e29b,#d9a93c); box-shadow: 0 6px 20px #d9a93c55, inset 0 1px 0 #fff8; display:inline-flex; gap:8px; align-items:center; justify-content:center; }
.mz-go:active { transform: translateY(1px) scale(.99); }
.mz-go.sm { padding: 11px 22px; font-size:16px; }
.mz-go.gold { background: linear-gradient(180deg,#f9e29b,#d9a93c); }
.mz-go.teal { background: linear-gradient(180deg,#8fe9dc,#2aa89a); color:#022; box-shadow: 0 6px 20px #2aa89a55; }
.mz-sec { padding: 11px 16px; border-radius: 14px; border:1.5px solid var(--line); background:var(--p3); color:var(--ink); font-size:15px; font-weight:700; }
.mz-sec.wide { width:100%; margin-top:8px; }
.mz-link { background:none; border:0; color:#cdbfff; text-decoration: underline; font-size:14px; }
.mz-soon { text-align:center; opacity:.55; font-size:13px; margin:0; }
.mz-rules { background:var(--p3); border:1px solid var(--line); border-radius:16px; padding: 4px 16px 12px; line-height:1.8; font-size:14.5px; }
.mz-rules h4 { margin: 14px 0 2px; color: var(--gold); }
.mz-rules p { margin:0; opacity:.92; }
/* game */
.mz-game { display:flex; flex-direction:column; gap:10px; }
.mz-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.mz-title { font-size: 22px; font-weight:800; color:var(--gold); } .mz-title span { font-size:12px; color:#cdbfff; font-weight:500; margin-inline-start:6px; }
.mz-ibtn { background:var(--p3); border:1.5px solid var(--line); color:var(--ink); padding:8px 14px; border-radius:12px; font-size:13px; font-weight:700; }
.mz-banner { padding: 10px 14px; border-radius: 14px; background: var(--p3); border:1px solid var(--line); font-size:14.5px; font-weight:600; min-height:44px; display:flex; align-items:center; justify-content:space-between; animation: mz-pop .35s ease; }
.mz-banner small { opacity:.5; white-space:nowrap; margin-inline-start:8px; }
.mz-banner.good { background:#173a33; border-color:#2f8a73; }
.mz-banner.bad { background:#40202e; border-color:#9a3d5b; }
.mz-banner.play { background:#2f2760; border-color:#7a66e0; }
.mz-log { background:var(--p3); border-radius:12px; padding:8px 12px; font-size:13px; line-height:1.9; border:1px solid var(--line); }
.mz-log .good{color:#8fe9c8}.mz-log .bad{color:#ff9db6}.mz-log .turn{opacity:.55}
@keyframes mz-pop { from { transform: scale(.96); opacity:.4; } to { transform:none; opacity:1; } }
.mz-opps { display:grid; gap:8px; grid-template-columns: 1fr; }
.mz-opps.n2 { grid-template-columns: 1fr 1fr; } .mz-opps.n3 { grid-template-columns: 1fr 1fr; }
.mz-opps.n3 .mz-panel:first-child { grid-column: 1 / -1; }
.mz-opps.n1 { grid-template-columns: 1fr; }
.mz-panel { background: linear-gradient(180deg,var(--p1),var(--p2)); border:1.5px solid var(--line); border-radius:18px; padding: 8px 8px 4px; position:relative; transition: border-color .3s, box-shadow .3s; }
.mz-panel.turn { border-color: var(--gold); box-shadow: 0 0 0 2px #f3d27a30, 0 0 24px #f3d27a30; }
.mz-panel.isghost { opacity:.75; filter:saturate(.5); }
.mz-panel.fx-fall { animation: mz-shake .6s; } .mz-panel.fx-star { animation: mz-flash .8s; } .mz-panel.fx-revive { animation: mz-flash .8s; }
@keyframes mz-shake { 0%,100%{transform:none} 15%{transform:translateX(-7px) rotate(-1deg)} 35%{transform:translateX(7px) rotate(1deg)} 55%{transform:translateX(-5px)} 75%{transform:translateX(4px)} }
@keyframes mz-flash { 0%{box-shadow:0 0 0 0 var(--gold)} 60%{box-shadow:0 0 0 14px #f3d27a00} }
.mz-ph { display:flex; justify-content:space-between; align-items:center; gap:6px; }
.mz-name { font-weight:800; font-size:14px; display:flex; align-items:center; gap:4px; }
.mz-stats { display:flex; align-items:center; gap:8px; font-size:13px; }
.mz-hearts { display:inline-flex; gap:1px; } .mz-ic.on { color:#ff5d7e; } .mz-ic.off { color:#4a3f6a; }
.mz-stars { display:inline-flex; align-items:center; gap:2px; color:var(--gold); font-weight:800; }
.crown { color: var(--gold); filter: drop-shadow(0 0 6px var(--gold)); }
.mz-badges { display:flex; flex-wrap:wrap; gap:4px; margin:4px 0 0; min-height:20px; }
.mz-badge { font-size:11px; padding:2px 8px; border-radius:99px; display:inline-flex; gap:3px; align-items:center; background:#3a3270; font-weight:700; }
.mz-badge.prot { background:#2f4f9a; } .mz-badge.tar { background:#5a2c3d; color:#ffc2d2; } .mz-badge.ghost { background:#4a4a66; } .mz-badge.crown { background:#6b5416; color:var(--gold); } .mz-badge.hand { background:transparent; border:1px solid var(--line); }
.mz-ghostbox { display:flex; flex-direction:column; align-items:center; gap:4px; padding:16px 0; opacity:.7; font-size:12px; }
.mz-knownrow { display:flex; gap:4px; justify-content:center; padding:2px 0 4px; }
/* scale */
.mz-scale { width:100%; display:block; overflow:visible; }
.mz-scale .stand { stroke:#8b7fd0; stroke-width:4; stroke-linecap:round; fill:none; }
.mz-scale .beam line { stroke: var(--gold); stroke-width:5; stroke-linecap:round; }
.mz-scale .pivot { fill:var(--gold); }
.mz-scale .str { stroke:#b9aaf0; stroke-width:1.4; }
.mz-scale .pan { fill:#6a5cc8; stroke:#cdbfff; stroke-width:1.5; }
.mz-scale .hit { fill: transparent; }
.mz-scale .mz-w rect { fill:var(--gold); stroke:#a8761a; stroke-width:1.5; }
.mz-scale .mz-w text { font-size:13px; font-weight:800; fill:#2a1d00; }
.mz-scale .mz-sum { font-size:17px; font-weight:800; fill:#fff; }
.mz-scale .mz-more { font-size:11px; fill:#ddd; }
.mz-scale.danger .mz-sum { fill:#ff8aa5; }
.mz-scale.danger .beam line { stroke:#ff8aa5; }
.mz-scale g, .mz-scale line { transition: all .5s cubic-bezier(.3,1.4,.5,1); }
.mz-cup.tap .pan { fill:#8b6cf0; stroke:var(--gold); stroke-width:2.5; animation: mz-pulse 1s infinite; }
.mz-cup.tap { cursor:pointer; }
.mz-cup.picked .pan { fill:var(--gold); stroke:#fff; stroke-width:3; }
@keyframes mz-pulse { 50% { opacity:.55; } }
.mz-panel.me .mz-scale { max-width: 310px; margin: 0 auto; }
/* table */
.mz-table { display:flex; gap:14px; align-items:center; justify-content:center; padding: 12px 8px; border-radius:20px; background: radial-gradient(ellipse at center,#245e55 0%,#164038 80%); border:2px solid #2f8a73; }
.mz-deck, .mz-market { display:flex; flex-direction:column; align-items:center; gap:6px; }
.mz-market { flex-direction:row; flex-wrap:wrap; justify-content:center; }
.mz-market small { width:100%; text-align:center; }
.mz-table small { font-size:11px; opacity:.8; }
.mz-mslot { min-width:62px; min-height:90px; }
.mz-mslot.glow .mz-card { animation: mz-glow 1.2s infinite; cursor:pointer; }
.mz-mslot.empty { border:2px dashed #ffffff30; border-radius:10px; }
@keyframes mz-glow { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 18px var(--gold); } }
.mz-hint { text-align:center; font-weight:700; font-size:15px; color:var(--gold); padding:6px 0 0; min-height:30px; }
/* cards */
.mz-card { --h: 40; position:relative; width:92px; height:132px; border-radius:12px; border:2px solid #fff3; padding:0; flex:0 0 auto; color:#2a1d00; font-family:inherit; display:flex; flex-direction:column; align-items:center; justify-content:center; box-shadow: 0 6px 14px #0006, inset 0 0 0 2px #fff6; transition: transform .2s, box-shadow .2s; overflow:hidden; text-align:center; }
.mz-card.sm { width:62px; height:90px; border-radius:9px; }
.mz-card.weight { background: radial-gradient(circle at 50% 30%, hsl(var(--h) 70% 92%) 0%, hsl(var(--h) 55% 78%) 100%); border-color: hsl(var(--h) 60% 35%); color: hsl(var(--h) 60% 22%); }
.mz-card.weight::before { content:''; position:absolute; inset:5px; border-radius:8px; border:1.5px solid hsl(var(--h) 55% 40% / .55); background: repeating-conic-gradient(from 0deg at 50% 50%, hsl(var(--h) 60% 50% / .08) 0 15deg, transparent 15deg 30deg); }
.mz-card.act { color:#fff; border-color:#fff6; }
.mz-card.act::before { content:''; position:absolute; inset:5px; border-radius:8px; border:1.5px solid #fff5; background: repeating-conic-gradient(from 0deg at 50% 50%, #fff2 0 12deg, transparent 12deg 24deg); }
.t-violet { background: linear-gradient(160deg,#9b5de5,#4b1d8f); } .t-blue { background: linear-gradient(160deg,#3a86ff,#12408f); } .t-red { background: linear-gradient(160deg,#f15b5b,#8f1d2c); }
.t-slate { background: linear-gradient(160deg,#5b6b8f,#232c4a); } .t-sage { background: linear-gradient(160deg,#6fcf97,#1f7a52); } .t-gold { background: linear-gradient(160deg,#f6c453,#a8761a); color:#2a1d00; } .t-teal { background: linear-gradient(160deg,#38d0c0,#116a73); }
.mz-art { position:relative; display:flex; flex-direction:column; align-items:center; gap:2px; z-index:1; }
.mz-num { font-size:46px; font-weight:900; line-height:1; text-shadow:0 2px 0 #fff8; } .sm .mz-num { font-size:30px; }
.mz-pips { display:flex; flex-wrap:wrap; gap:2px; justify-content:center; max-width:56px; margin-top:4px; } .mz-pips i { width:6px; height:6px; border-radius:50%; background: hsl(var(--h) 60% 35%); } .sm .mz-pips { display:none; }
.mz-art b { font-size:14px; } .sm .mz-art b { font-size:11px; } .mz-art em { font-size:10px; font-style:normal; opacity:.9; padding:0 6px; line-height:1.3; }
.mz-corner { position:absolute; top:5px; inset-inline-start:7px; font-size:13px; font-weight:900; z-index:2; display:flex; } .mz-corner.b { top:auto; bottom:5px; inset-inline-start:auto; inset-inline-end:7px; }
.mz-card.sel { transform: translateY(-14px) scale(1.05); box-shadow: 0 0 0 3px var(--gold), 0 14px 24px #000a; }
.mz-card.dis { filter: grayscale(.8) brightness(.7); }
.mz-eye { position:absolute; bottom:18px; font-size:9px; background:#000a; color:#fff; padding:1px 5px; border-radius:6px; z-index:3; }
.mz-back { background: radial-gradient(circle at 50% 50%, #3a2d78 0 30%, transparent 31%), repeating-conic-gradient(from 0deg at 50% 50%, var(--line) 0 10deg, var(--p1) 10deg 20deg); border-color: var(--gold); }
.mz-back::after { content:''; position:absolute; inset:6px; border:1.5px solid #f3d27a99; border-radius:8px; }
.mz-back span { position:relative; z-index:2; font-weight:900; font-size:20px; color:var(--gold); background:#14102acc; padding:2px 10px; border-radius:99px; }
.deckbtn.glow { animation: mz-glow 1.2s infinite; }
.mz-hand { background:var(--p3); border-radius:18px; padding: 8px 6px 10px; border:1.5px solid var(--line); }
.mz-handlabel { font-size:12px; opacity:.7; padding: 0 6px 4px; }
.mz-fan { display:flex; gap:8px; overflow-x:auto; padding: 18px 8px 8px; scroll-snap-type:x proximity; }
.mz-fan .mz-card { scroll-snap-align:center; }
.mz-note { display:block; padding:4px 8px; opacity:.6; font-size:11.5px; }
.mz-nums { display:grid; grid-template-columns: repeat(9, 1fr); gap:5px; }
.mz-nums button { padding:11px 0; border-radius:10px; border:1.5px solid var(--line); background:var(--p3); color:var(--ink); font-size:17px; font-weight:800; }
.mz-nums button.on { background:var(--gold); color:#2a1d00; }
.mz-actions { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
/* dialogs */
.mz-dlg { border:0; padding:0; background:transparent; color:var(--ink); max-width: 92vw; width: 400px; font-family:'Noto Sans Arabic','Segoe UI',Tahoma,sans-serif; }
.mz-dlg::backdrop { background: #0a0820cc; backdrop-filter: blur(4px); }
.mz-cov { background: linear-gradient(180deg,#2d2560,#1c1740); border:2px solid var(--gold); border-radius:22px; padding: 22px 18px; text-align:center; display:flex; flex-direction:column; gap:10px; align-items:stretch; animation: mz-pop .3s; }
.mz-cov h2 { margin:0; color:var(--gold); font-size:22px; } .mz-cov p { margin:0; opacity:.85; }
.mz-cov.scroll { max-height: calc(80 * var(--vh)); overflow:auto; text-align:start; }
.mz-cov.win .crown { align-self:center; animation: mz-bounce 1s infinite; }
@keyframes mz-bounce { 50% { transform: translateY(-8px); } }
.mz-reacts { display:flex; flex-direction:column; gap:8px; }
.mz-final { display:flex; flex-direction:column; gap:6px; } .mz-final div { display:flex; justify-content:space-between; background:#ffffff10; padding:6px 12px; border-radius:10px; }
.mz-final span { display:inline-flex; gap:3px; align-items:center; margin-inline-start:10px; }
@media (min-width: 560px) { .mz-card { width:100px; height:142px; } .mz-card.sm { width:68px; height:98px; } }
@media (max-width: 360px) { .mz-card { width:84px; height:122px; } .mz-opps.n2, .mz-opps.n3 { gap:6px; } .mz-name { font-size:12.5px; } }
/* ===== v2 illustrated identity ===== */
body { background:var(--bgd); }
.mz-root { background: linear-gradient(180deg, color-mix(in srgb, var(--bgd) 15%, transparent) 0, color-mix(in srgb, var(--bgd) 60%, transparent) 420px, var(--bgd) 760px), var(--bg-img) top center / 100% auto no-repeat, var(--bgd); }
.mz-logoimg { width: 170px; height:170px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); box-shadow: 0 0 40px #f3d27a66, 0 10px 30px #000a; }
.mz-setup .mz-logo h1 { font-size: 64px; background: linear-gradient(180deg,#fff3b8,var(--gold2) 60%,#a8761a); -webkit-background-clip:text; background-clip:text; color:transparent; filter: drop-shadow(0 3px 10px #000a); }
.mz-panel { background: linear-gradient(180deg,color-mix(in srgb,var(--p1) 82%,transparent),color-mix(in srgb,var(--p2) 90%,transparent)); border:1.5px solid var(--gold2); box-shadow: 0 8px 22px #0008, inset 0 0 0 1px #f3d27a22; backdrop-filter: blur(3px); }
.mz-panel.turn { border-color:var(--accent); box-shadow: 0 0 0 2px #f3d27a55, 0 0 30px #f3d27a66, 0 8px 22px #0008; }
.mz-table { background: linear-gradient(color-mix(in srgb, var(--tint) 55%, transparent), color-mix(in srgb, var(--tint) 80%, transparent)), var(--table-img) center / cover; border:2px solid #c8962e; box-shadow: inset 0 0 40px #000a, 0 8px 22px #0008; }
.mz-hand { background: linear-gradient(180deg,rgba(30,20,80,.8),rgba(14,9,44,.92)); border-color:#8a6a2a; }
.mz-banner { background: linear-gradient(90deg,color-mix(in srgb,var(--p1) 90%,transparent),color-mix(in srgb,var(--p2) 90%,transparent)); border-color:var(--gold2); }
/* cards */
.mz-card { background-size: cover; background-position: center; border:2px solid var(--gold); box-shadow: 0 8px 16px #000a, 0 0 0 1px #5a3d00; padding:0; }
.mz-card::before, .mz-card::after { display:none !important; }
.mz-card.weight { color: hsl(var(--h) 55% 22%); }
.mz-card.weight .mz-num { position:absolute; top:46%; left:0; right:0; transform: translateY(-50%); font-size:56px; font-weight:900; line-height:1; color: hsl(var(--h) 60% 26%); text-shadow: 0 1px 0 #fff9, 0 0 14px hsl(var(--h) 90% 70% / .6); }
.mz-card.sm.weight .mz-num { font-size:36px; top:50%; }
.mz-card.weight .mz-pips { position:absolute; bottom:15%; left:18%; right:18%; max-width:none; margin:0; justify-content:center; }
.mz-card.weight .mz-pips i { background: hsl(var(--h) 65% 38%); box-shadow: 0 0 0 1px #fff8; }
.mz-plaque { position:absolute; left:0; right:0; bottom:0; padding:16px 4px 6px; display:flex; flex-direction:column; align-items:center; gap:1px; color:var(--goldhi); background: linear-gradient(180deg, transparent, #0b0626ee 45%); }
.mz-plaque b { font-size:15px; color:var(--goldhi); text-shadow:0 1px 4px #000; display:flex; align-items:center; gap:4px; } .sm .mz-plaque b { font-size:10.5px; }
.mz-plaque em { font-size:9.5px; font-style:normal; color:#e7dcff; line-height:1.25; padding:0 5px; }
.mz-plaque .mz-ic { color:#ffd466; }
.mz-card.sel { box-shadow: 0 0 0 3px #fff3b8, 0 0 24px var(--gold), 0 16px 26px #000a; transform: translateY(-16px) scale(1.06); }
.mz-back { background-size:cover; border-color:var(--gold); }
.mz-back::after { display:none; }
.mz-back span { background:#0b0626cc; border:1px solid var(--gold); }
@keyframes mz-deal { from { transform: translateY(-40px) scale(.7) rotate(-6deg); opacity:0; } to { transform:none; opacity:1; } }
.mz-fan .mz-card { animation: mz-deal .4s ease both; }
.mz-mslot .mz-card { animation: mz-deal .35s ease both; }
/* scale metallic */
.mz-scale .beam line { stroke: url(#gg); stroke-width:6; }
.mz-scale .pivot { fill: url(#gg); stroke:#7a4f08; stroke-width:1.5; }
.mz-scale .stand { stroke: url(#gg); stroke-width:5; }
.mz-scale .pan { fill: url(#gp); stroke: url(#gg); stroke-width:2.2; }
.mz-scale .str { stroke:#e9c870; stroke-width:1.3; }
.mz-scale .mz-w rect { fill: url(#gw); stroke:#7a4f08; stroke-width:1.4; }
.mz-scale .mz-sum { fill:#fff3c6; paint-order: stroke; stroke:#1a0f4a; stroke-width:3px; }
.mz-scale.danger .mz-sum { fill:#ff9db6; }
.mz-w { animation: mz-drop .45s cubic-bezier(.3,1.6,.5,1) both; transform-box: fill-box; transform-origin: center; }
@keyframes mz-drop { from { opacity:0; transform: translateY(-26px) scale(1.3); } to { opacity:1; transform:none; } }
.mz-go { background: linear-gradient(180deg,#fff0a8,var(--gold2) 55%,#b5791c); border:1px solid #fff3b8; }
.mz-seg button.on { background: linear-gradient(180deg,#fff0a8,var(--gold2) 55%,#b5791c); }
.mz-cov { background: linear-gradient(180deg,rgba(45,30,110,.97),rgba(18,12,56,.98)); border-color:var(--gold2); box-shadow: 0 0 40px #f3d27a44; }
.mz-card.weight, .mz-card.act, .mz-card.mz-back { background-size: cover !important; background-position: center !important; background-repeat:no-repeat !important; background-color:#1a1040; }
.mz-scale .beam line { stroke:#f0c45a; stroke-width:6; }
.mz-scale .stand { stroke:#d9a93c; }

.mz-roomcode { font-size:44px; font-weight:900; letter-spacing:8px; text-align:center; color:var(--goldhi); background:#1a1240; border:2px dashed var(--gold2); border-radius:16px; padding:10px; margin-bottom:10px; }
.mz-linkbox { width:100%; padding:12px; border-radius:12px; border:1.5px solid var(--line); background:var(--p3); color:#cdbfff; font-size:13px; }
.mz-code { text-align:center; letter-spacing:6px; font-size:22px; font-weight:800; }
.mz-seg button { font-size:14px; padding:12px 4px; }

/* ---- readability pass (Muse feedback) ---- */
.mz-num, .mz-sum, .mz-scale text, .mz-pips { font-family: system-ui, 'Segoe UI', Roboto, Arial, sans-serif; font-variant-numeric: lining-nums; }
.mz-card.weight .mz-num { font-size:64px; font-weight:900; -webkit-text-stroke: 1.5px #fff9; letter-spacing:-1px; }
.mz-card.sm.weight .mz-num { font-size:42px; }
.mz-scale .mz-sum, .mz-scale text.mz-sum { font-size: 26px; font-weight: 900; }
.mz-stat { display:inline-flex; flex-direction:column; align-items:center; gap:0; line-height:1.1; }
.mz-stat em { font-style:normal; font-size:10px; opacity:.7; }
.mz-stars { font-size:17px; } .mz-stars small { font-size:12px; opacity:.75; }
.mz-ic.on { color:#ff4d6d; filter: drop-shadow(0 0 3px #ff4d6d88); }
.mz-bar { position:absolute; top:0; left:0; right:0; height:7px; font-size:9px; font-weight:800; color:#fff; text-align:center; line-height:12px; z-index:2; }
.mz-card:not(.sm) .mz-bar { height:16px; line-height:16px; font-size:11px; }
.mz-bar.atk { background:#e5484d; } .mz-bar.def { background:#2dd4bf; color:#053; } .mz-bar.magic { background:#8b5cf6; }
.mz-panel.dim { opacity:.78; filter: saturate(.85); }
.mz-panel.turn { border-width:3px; border-color:var(--accent); box-shadow: 0 0 0 3px #ffd24d55, 0 0 34px #ffd24daa, 0 8px 22px #0008; animation: mz-pulse 1.6s infinite; }
@keyframes mz-pulse { 50% { box-shadow: 0 0 0 5px #ffd24d33, 0 0 44px #ffd24dcc, 0 8px 22px #0008; } }
.mz-turnbar { display:flex; justify-content:center; align-items:center; gap:12px; padding:10px; border-radius:14px; background:var(--p1); border:2px solid var(--line); font-size:19px; color:#fff3d6; }
.mz-turnbar.mine { background: linear-gradient(90deg,#f3b93a,#ffd86b); color:#2a1d00; border-color:#fff3b0; box-shadow:0 0 22px #ffd24d88; font-size:22px; }
.mz-timer { font-size:15px; font-weight:800; padding:2px 10px; border-radius:99px; background:#0006; } .mz-turnbar.mine .mz-timer { background:#0002; } .mz-timer.low { background:#e5484d; color:#fff; }
.mz-tr { display:flex; gap:6px; }
.mz-tut h2 { font-size:20px; } .mz-tut p { font-size:16px; line-height:1.8; }
.mz-dots { display:flex; gap:6px; justify-content:center; margin-bottom:8px; } .mz-dots i { width:10px; height:10px; border-radius:50%; background:var(--line); } .mz-dots i.on { background:var(--accent); }
.mz-celebrate { position:fixed; inset:0; pointer-events:none; z-index:60; display:flex; align-items:center; justify-content:center; animation: mz-cel-fade 2.4s forwards; background: radial-gradient(circle, #ffd24d55, transparent 60%); }
.mz-cel-t { font-size:38px; font-weight:900; color:var(--goldhi); text-shadow:0 0 18px #ffb800, 0 3px 0 #7a4f08; animation: mz-cel-pop .7s ease; }
.mz-celebrate i { position:absolute; font-style:normal; font-size:26px; color:var(--accent); animation: mz-fly 1.8s ease-out forwards; animation-delay: var(--d); opacity:0; }
@keyframes mz-fly { 0% { transform: rotate(var(--a)) translateY(0) scale(.4); opacity:1; } 100% { transform: rotate(var(--a)) translateY(-150px) scale(1.3); opacity:0; } }
@keyframes mz-cel-pop { 0% { transform:scale(.3); opacity:0; } 60% { transform:scale(1.15); opacity:1; } 100% { transform:scale(1); } }
@keyframes mz-cel-fade { 0%,70% { opacity:1; } 100% { opacity:0; } }
.mz-banner.balance { background:#4a3a10; border-color:var(--accent); color:var(--goldhi); }
.mz-stars { direction:ltr; }

/* ---- themes ---- */
.mz-root { --goldhi:#ffe9a8; --gold2:#e2a93a; --accent:#ffd24d; --line:#4a3f8a; --p1:#2a2356; --p2:#1e1942; --p3:#241e4c; --bgd:#0c0724; --tint:#0a0828; }
.mz-root.th-space { --gold:#7ee8ff; --goldhi:#d6f7ff; --gold2:#35b6e0; --accent:#ff5de0; --line:#3a4f9a; --p1:#14204a; --p2:#0b1236; --p3:#101a42; --bgd:#040716; --tint:#050a24; --ink:#eaf6ff; }
.mz-root.th-fantasy { --gold:#f0c28a; --goldhi:#ffe6c4; --gold2:#d9955a; --accent:#7ee8a8; --line:#3f7a5a; --p1:#173a2e; --p2:#0f2a21; --p3:#12322a; --bgd:#06150f; --tint:#06180f; --ink:#fff3e0; }
.mz-root.th-modern { --gold:#ff6b3d; --goldhi:#ffb08f; --gold2:#e8541f; --accent:#ff6b3d; --line:#555566; --p1:#30303a; --p2:#26262e; --p3:#30303a; --bgd:#eceae3; --tint:#2a2a32; --ink:#f4f1ea; }
.mz-root.th-modern .mz-sect h3, .mz-root.th-modern .mz-logo p, .mz-root.th-modern .mz-soon, .mz-root.th-modern .mz-link, .mz-root.th-modern .mz-hint, .mz-root.th-modern .mz-sect p { color:#23232b !important; }
.mz-root.th-modern .mz-logo p { opacity:1; }
.mz-root.th-modern .mz-panel { background: linear-gradient(180deg,#34343f,#26262e); border-color:#555566; }
.mz-root.th-modern .mz-turnbar:not(.mine) { background:#30303a; color:#f4f1ea; }
.mz-root.th-modern .mz-banner { background:#30303a; border-color:#555566; color:#f4f1ea; }
.mz-themes { display:grid; grid-template-columns: repeat(4,1fr); gap:8px; }
.mz-th { display:flex; flex-direction:column; align-items:center; gap:6px; padding:8px 4px; border-radius:14px; border:2px solid var(--line); background:var(--p3); color:var(--ink); font-family:inherit; font-size:12.5px; font-weight:700; }
.mz-th img { width:54px; height:54px; border-radius:50%; object-fit:cover; }
.mz-th.on { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent), 0 0 18px var(--accent); }

/* ---- one-screen board: everything visible, no scrolling ---- */
.mz-root.in-game { height: 100dvh; min-height: 0; overflow: hidden; padding: 5px 5px calc(5px + env(safe-area-inset-bottom)); position: relative; }
.mz-root.in-game .mz-game { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 4px; }
.mz-root.in-game .mz-top { flex: 0 0 auto; gap: 6px; }
.mz-root.in-game .mz-title { font-size: 15px; }
.mz-root.in-game .mz-title span { font-size: 10.5px; margin-inline-start: 4px; }
.mz-root.in-game .mz-ibtn { padding: 4px 8px; font-size: 11px; border-radius: 9px; }
.mz-root.in-game .mz-banner { flex: 0 0 auto; min-height: 0; padding: 3px 9px; font-size: 11.5px; line-height: 1.55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.mz-root.in-game .mz-banner small { font-size: 9.5px; margin-inline-start: 4px; }
.mz-log.overlay { position: absolute; z-index: 40; top: 42px; left: 6px; right: 6px; max-height: calc(45 * var(--vh)); overflow: auto; box-shadow: 0 12px 30px #000c; font-size: 12px; }
.mz-root.in-game .mz-opps { flex: 1 1 0; min-height: 0; grid-template-columns: repeat(var(--opps), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 4px; }
.mz-root.in-game .mz-opps.n3 .mz-panel:first-child { grid-column: auto; }
.mz-root.in-game .mz-panel { padding: 2px 4px 0; border-radius: 11px; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.mz-root.in-game .mz-ph { gap: 2px; }
.mz-root.in-game .mz-name { font-size: 11px; gap: 2px; }
.mz-root.in-game .mz-stats { font-size: 10px; gap: 3px; }
.mz-root.in-game .mz-stars { font-size: 11.5px; }
.mz-root.in-game .mz-stars small { font-size: 9px; }
.mz-root.in-game .mz-stat em { font-size: 8px; }
.mz-root.in-game .mz-badges { min-height: 0; gap: 2px; margin: 0; }
.mz-root.in-game .mz-badges:empty { display: none; }
.mz-root.in-game .mz-badge { font-size: 8.5px; padding: 0 4px; }
.mz-root.in-game .mz-panel .mz-scale { flex: 1 1 0; min-height: 0; height: auto; width: 100%; }
.mz-root.in-game .mz-ghostbox { padding: 2px 0; font-size: 9.5px; gap: 1px; }
.mz-root.in-game .mz-knownrow { padding: 0; }
.mz-root.in-game .mz-table { flex: 0 0 auto; padding: 3px 6px; gap: 10px; border-radius: 12px; }
.mz-root.in-game .mz-table small { font-size: 9px; }
.mz-root.in-game .mz-table .mz-card { width: clamp(38px, calc(7 * var(--vh)), 56px); height: calc(clamp(38px, calc(7 * var(--vh)), 56px) * 1.44); }
.mz-root.in-game .mz-mslot { min-width: 0; min-height: 0; }
.mz-root.in-game .mz-deck, .mz-root.in-game .mz-market { gap: 3px; }
.mz-root.in-game .mz-turnbar { flex: 0 0 auto; padding: 3px 9px; font-size: 13px; gap: 7px; border-radius: 10px; overflow: hidden; }
.mz-root.in-game .mz-turnbar.mine { font-size: 14.5px; }
.mz-root.in-game .mz-timer { font-size: 11.5px; padding: 0 7px; }
.mz-hintline { font-size: 11px; font-weight: 600; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mz-root.in-game .mz-panel.me { flex: 0 0 auto; }
.mz-root.in-game .mz-panel.me .mz-scale { flex: 0 0 auto; height: clamp(44px, calc(9 * var(--vh)), 78px); max-width: 230px; margin: 0 auto; }
.mz-sheet { flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; padding: 4px 6px; border-radius: 12px; background: var(--p2); border: 1.5px solid var(--line); }
.mz-sheet .mz-nums { gap: 3px; }
.mz-sheet .mz-nums button { padding: 6px 0; font-size: 14px; border-radius: 8px; }
.mz-sheet .mz-actions { gap: 6px; }
.mz-sheet .mz-go.sm, .mz-sheet .mz-sec { padding: 7px 16px; font-size: 13px; }
.mz-root.in-game .mz-hand { flex: 0 0 auto; padding: 1px 3px 3px; border-radius: 12px; }
.mz-root.in-game .mz-handlabel { font-size: 9.5px; padding: 0 4px 1px; }
.mz-root.in-game .mz-note { font-size: 9.5px; padding: 0 4px; }
.mz-root.in-game .mz-fan { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 3px; padding: 0; overflow: visible; }
.mz-root.in-game .mz-fan .mz-card { width: 100%; height: auto; aspect-ratio: 2 / 3; min-width: 0; max-width: calc(clamp(56px, calc(13 * var(--vh)), 96px)); justify-self: center; container-type: inline-size; border-radius: 8px; }
.mz-root.in-game .mz-fan .mz-card .mz-num { font-size: 54cqw; }
.mz-root.in-game .mz-fan .mz-card .mz-plaque b { font-size: 9px; }
.mz-root.in-game .mz-fan .mz-card .mz-plaque em { display: none; }
.mz-root.in-game .mz-fan .mz-card .mz-bar { height: 9px; line-height: 9px; font-size: 6.5px; }
.mz-root.in-game .mz-fan .mz-card .mz-plaque { padding: 6px 2px 2px; }
.mz-game:has(.mz-sheet) .mz-fan .mz-card { max-width: calc(clamp(44px, calc(9 * var(--vh)), 70px)); }
@media (max-height: 680px) {
  .mz-root.in-game .mz-panel.me .mz-scale { height: 46px; }
  .mz-root.in-game .mz-table .mz-card { width: clamp(34px, calc(6.4 * var(--vh)), 46px); height: calc(clamp(34px, calc(6.4 * var(--vh)), 46px) * 1.44); }
  .mz-root.in-game .mz-fan .mz-card { max-width: clamp(48px, calc(11 * var(--vh)), 72px); }
  .mz-root.in-game .mz-title { font-size: 14px; }
}

/* ================= polish pass: bundled Arabic type + button system ================= */
@font-face { font-family:'Cairo'; font-style:normal; font-weight:200 1000; font-display:swap;
  src:url('/fonts/cairo-arabic.woff2') format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family:'Cairo'; font-style:normal; font-weight:200 1000; font-display:swap;
  src:url('/fonts/cairo-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Lalezar'; font-style:normal; font-weight:400; font-display:swap;
  src:url('/fonts/lalezar-arabic.woff2') format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family:'Lalezar'; font-style:normal; font-weight:400; font-display:swap;
  src:url('/fonts/lalezar-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+FEFF,U+FFFD; }

.mz-root { font-family:'Cairo',system-ui,'Segoe UI',Tahoma,sans-serif; font-synthesis-weight:none;
  --btn-a:#ffe9a8; --btn-b:#dda32f; --btn-edge:#fff3b8; --btn-ink:#2a1d00;
  --surf:#ffffff0f; --surf2:#0000002e; }
.mz-root.th-space { --btn-a:#b6f2ff; --btn-b:#2aa4d4; --btn-edge:#d9f9ff; --btn-ink:#03222e; }
.mz-root.th-fantasy { --btn-a:#ffe6c2; --btn-b:#d09250; --btn-edge:#fff1da; --btn-ink:#2b1a06; }
.mz-root.th-modern { --btn-a:#ffb79a; --btn-b:#e2561f; --btn-edge:#ffd2bf; --btn-ink:#2a0d00; }
.mz-root, .mz-root button, .mz-root input, .mz-root select { font-family:'Cairo',system-ui,'Segoe UI',Tahoma,sans-serif; }
.mz-logo h1, .mz-title, .mz-cel-t, .mz-dlg h2, .mz-cov h2, .mz-logo h1 { font-family:'Lalezar','Cairo',sans-serif; font-weight:400; letter-spacing:0; }
.mz-num, .mz-sum, .mz-scale text, .mz-roomcode, .mz-timer, .mz-stars { font-family:'Cairo',system-ui,sans-serif; font-variant-numeric:lining-nums tabular-nums; }
.mz-sect h3 { font-size:13.5px; font-weight:800; letter-spacing:0; color:#cfc3ff; opacity:.9; }
.mz-root:focus-visible, .mz-root button:focus-visible, .mz-root input:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* buttons */
.mz-go { min-height:50px; padding:0 22px; border-radius:14px; border:1px solid var(--btn-edge); font-size:17.5px; font-weight:800;
  color:var(--btn-ink); background:linear-gradient(180deg,var(--btn-a),var(--btn-b));
  box-shadow:0 8px 20px #00000055, inset 0 1px 0 #ffffffaa, inset 0 -2px 0 #00000022; }
.mz-go:active { transform:translateY(1px); box-shadow:0 3px 10px #00000055, inset 0 1px 0 #ffffff88; }
.mz-go:disabled { opacity:.45; box-shadow:none; }
.mz-go.sm { min-height:42px; padding:0 18px; font-size:15.5px; border-radius:12px; }
.mz-go.gold, .mz-go.teal { background:linear-gradient(180deg,var(--btn-a),var(--btn-b)); color:var(--btn-ink); }
.mz-go.teal { --btn-a:#9df0e2; --btn-b:#1f9c8d; --btn-ink:#03211d; }
.mz-sec { min-height:44px; padding:0 16px; border-radius:12px; font-size:15px; font-weight:700; color:var(--ink);
  background:linear-gradient(180deg,var(--surf),transparent), var(--p3); border:1px solid var(--line); box-shadow:inset 0 1px 0 #ffffff14; }
.mz-sec:active { transform:translateY(1px); background:var(--surf2), var(--p2); }
.mz-ibtn { min-height:38px; padding:0 12px; border-radius:10px; font-size:12.5px; font-weight:700; color:var(--ink);
  background:var(--surf); border:1px solid var(--line); box-shadow:inset 0 1px 0 #ffffff12; }
.mz-ibtn:active { background:var(--surf2); }
.mz-seg { background:#00000033; padding:4px; border-radius:14px; gap:4px; }
.mz-seg button { min-height:42px; border-radius:10px; border:0; background:transparent; font-size:15px; font-weight:700; color:var(--ink); }
.mz-seg button.on { background:linear-gradient(180deg,var(--btn-a),var(--btn-b)); color:var(--btn-ink); box-shadow:0 3px 12px #00000055, inset 0 1px 0 #ffffff88; }
.mz-names input { min-height:50px; border-radius:12px; }

/* ================= one-screen board, second pass (research-driven) ================= */
/* space budget: top 34 · banner 24 · opponents 78 · table flex · turnbar 34 · me 62 · hand */
.mz-root.in-game { padding:6px 6px calc(6px + env(safe-area-inset-bottom)); }
.mz-root.in-game .mz-game { gap:5px; }
.mz-root.in-game .mz-top { min-height:34px; }
.mz-root.in-game .mz-title { font-size:18px; line-height:1; }
.mz-root.in-game .mz-title span { font-size:10.5px; }
.mz-root.in-game .mz-ibtn { min-height:32px; padding:0 9px; font-size:11.5px; border-radius:9px; }
.mz-root.in-game .mz-banner { min-height:0; padding:2px 9px; font-size:11px; line-height:1.5; }

/* opponents: one compact strip, scale kept but small */
.mz-root.in-game .mz-opps { flex:0 0 auto; height:clamp(72px,calc(12.4 * var(--vh)),100px); gap:5px; }
.mz-root.in-game .mz-opps .mz-panel { padding:3px 5px 1px; border-radius:12px; display:grid; grid-template-rows:auto auto 1fr; align-content:start; }
.mz-root.in-game .mz-opps .mz-ph { flex-direction:column; align-items:stretch; gap:0; }
.mz-root.in-game .mz-opps .mz-name { font-size:10.5px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mz-root.in-game .mz-opps .mz-stats { gap:6px; font-size:9px; justify-content:flex-start; }
.mz-root.in-game .mz-opps .mz-stat em { font-size:7.5px; }
.mz-root.in-game .mz-opps .mz-stars { font-size:10.5px; }
.mz-root.in-game .mz-opps .mz-badges { position:absolute; top:3px; inset-inline-end:4px; margin:0; }
.mz-root.in-game .mz-opps .mz-badge { font-size:7.5px; padding:0 3px; border-radius:5px; }
.mz-root.in-game .mz-opps .mz-scale { flex:0 0 auto; height:clamp(34px,calc(5.6 * var(--vh)),48px); width:100%; margin-top:1px; }
.mz-root.in-game .mz-opps .mz-scale .mz-sum { font-size:44px; }
.mz-root.in-game .mz-opps .mz-knownrow { position:absolute; bottom:2px; inset-inline-start:3px; }
.mz-root.in-game .mz-opps .mz-knownrow .mz-card { width:16px; height:22px; }

/* table: the visual hero */
.mz-root.in-game .mz-table { flex:1 1 auto; min-height:0; padding:4px 8px; border-radius:14px; align-items:center; }
.mz-root.in-game .mz-table .mz-card { width:clamp(46px,calc(9.4 * var(--vh)),70px); height:calc(clamp(46px,calc(9.4 * var(--vh)),70px) * 1.44); }
.mz-root.in-game .mz-market { flex:1 1 auto; }
.mz-root.in-game .mz-table small { font-size:8.5px; opacity:.75; }

/* turn bar */
.mz-root.in-game .mz-turnbar { min-height:32px; padding:2px 10px; border-radius:11px; font-size:13px; }
.mz-root.in-game .mz-turnbar.mine { font-size:14px; }
.mz-hintline { font-size:10.5px; }

/* own panel: slim horizontal bar with the scale at the end */
.mz-root.in-game .mz-panel.me { padding:3px 8px; border-radius:12px; display:grid; grid-template-columns:1fr auto; grid-template-rows:auto auto; align-items:center; column-gap:6px; }
.mz-root.in-game .mz-panel.me .mz-ph { grid-column:1; grid-row:1; }
.mz-root.in-game .mz-panel.me .mz-name { font-size:12px; }
.mz-root.in-game .mz-panel.me .mz-stats { font-size:11px; gap:8px; }
.mz-root.in-game .mz-panel.me .mz-stars { font-size:12.5px; }
.mz-root.in-game .mz-panel.me .mz-badges { grid-column:1; grid-row:2; margin:0; min-height:0; }
.mz-root.in-game .mz-panel.me .mz-badges:empty { display:none; }
.mz-root.in-game .mz-panel.me .mz-scale { grid-column:2; grid-row:1 / span 2; height:clamp(40px,calc(6.8 * var(--vh)),58px); width:clamp(86px,25vw,124px); margin:0; }
.mz-root.in-game .mz-panel.me .mz-scale .mz-sum { font-size:44px; }
.mz-game:has(.mz-sheet) .mz-panel.me .mz-scale { height:clamp(62px,calc(10.5 * var(--vh)),86px); width:clamp(120px,34vw,168px); }

/* hand: real fan with a minimum visible strip, cards never overflow the width */
.mz-root.in-game .mz-hand { padding:0 2px 2px; }
.mz-root.in-game .mz-handlabel { font-size:9.5px; opacity:.7; padding:0 2px 1px; }
.mz-root.in-game .mz-fan { --strip:44px; --w:min(96px, calc(100% - (var(--cols) - 1) * var(--strip)));
  display:flex; justify-content:center; align-items:flex-end; gap:0; overflow:visible; }
.mz-root.in-game .mz-fan .mz-card { width:var(--w); max-width:none; flex:0 0 auto; aspect-ratio:2 / 3; height:auto;
  margin-inline-start:calc(var(--strip) - var(--w)); border-radius:10px; container-type:inline-size; }
.mz-root.in-game .mz-fan .mz-card:first-child { margin-inline-start:0; }
.mz-root.in-game .mz-fan .mz-card.sel { transform:translateY(-10px) scale(1.03); z-index:6; }
.mz-root.in-game .mz-fan .mz-card .mz-num { font-size:58cqw; }
.mz-root.in-game .mz-fan .mz-card .mz-plaque b { font-size:min(11px, 15cqw); }
.mz-root.in-game .mz-fan .mz-card .mz-bar { height:12cqw; line-height:12cqw; font-size:7cqw; }
.mz-game:has(.mz-sheet) .mz-fan { --strip:40px; --w:min(74px, calc(100% - (var(--cols) - 1) * var(--strip))); }

/* number picker + action sheet */
.mz-sheet { padding:5px 7px; border-radius:12px; gap:5px; }
.mz-sheet .mz-nums { display:grid; grid-template-columns:repeat(9,minmax(0,1fr)); gap:3px; }
.mz-sheet .mz-nums button { min-height:34px; padding:0; font-size:15px; font-weight:800; border-radius:8px; border:1px solid var(--line); background:var(--p3); color:var(--ink); }
.mz-sheet .mz-nums button.on { background:linear-gradient(180deg,var(--btn-a),var(--btn-b)); color:var(--btn-ink); border-color:var(--btn-edge); }
.mz-sheet .mz-actions { display:flex; gap:6px; }
.mz-sheet .mz-actions > * { flex:1 1 0; }

@media (max-height:680px) {
  .mz-root.in-game .mz-opps { height:66px; }
  .mz-root.in-game .mz-opps .mz-scale { height:30px; }
  .mz-root.in-game .mz-table .mz-card { width:clamp(38px,calc(8 * var(--vh)),52px); height:calc(clamp(38px,calc(8 * var(--vh)),52px) * 1.44); }
  .mz-root.in-game .mz-fan { --w:min(84px, calc(100% - (var(--cols) - 1) * var(--strip))); }
  .mz-root.in-game .mz-panel.me .mz-scale { height:38px; }
}

/* ================= one-screen board, third pass ================= */
/* opponents: one line of identity + a small but legible scale */
.mz-root.in-game .mz-opps { height:clamp(66px,calc(11 * var(--vh)),92px); }
.mz-root.in-game .mz-opps .mz-panel { padding:3px 5px 0; }
.mz-root.in-game .mz-opps .mz-ph { flex-direction:row; align-items:center; justify-content:space-between; gap:2px; }
.mz-root.in-game .mz-opps .mz-name { font-size:10.5px; flex:1 1 auto; min-width:0; }
.mz-root.in-game .mz-opps .mz-stats { flex:0 0 auto; gap:5px; }
.mz-root.in-game .mz-opps .mz-stat { flex-direction:row; align-items:center; gap:2px; }
.mz-root.in-game .mz-opps .mz-stat em { display:none; }
.mz-root.in-game .mz-opps .mz-stars { font-size:10.5px; }
.mz-root.in-game .mz-opps .mz-stars small { font-size:8px; }
.mz-root.in-game .mz-opps .mz-hearts .mz-ic { width:10px; height:10px; }
.mz-root.in-game .mz-opps .mz-badges { top:auto; bottom:1px; inset-inline-end:3px; }
.mz-root.in-game .mz-opps .mz-scale { height:clamp(30px,calc(5 * var(--vh)),42px); margin-top:0; }
.mz-root.in-game .mz-opps .mz-scale .mz-sum { font-size:40px; }
.mz-root.in-game .mz-opps .mz-scale .mz-w text { font-size:22px; }

/* own bar: no labels, scale at the inline end */
.mz-root.in-game .mz-panel.me .mz-stat em { display:none; }
.mz-root.in-game .mz-panel.me .mz-stat { flex-direction:row; align-items:center; gap:3px; }
.mz-root.in-game .mz-panel.me .mz-hearts .mz-ic { width:13px; height:13px; }
.mz-root.in-game .mz-panel.me .mz-scale { height:clamp(36px,calc(6 * var(--vh)),52px); width:clamp(84px,24vw,116px); }
.mz-root.in-game .mz-panel.me .mz-scale .mz-sum { font-size:40px; }

/* table sits at its content size; the hand gets the leftover room */
.mz-root.in-game .mz-table { flex:0 1 auto; }
.mz-root.in-game .mz-table .mz-card { width:clamp(48px,calc(9.6 * var(--vh)),72px); height:calc(clamp(48px,calc(9.6 * var(--vh)),72px) * 1.44); }
.mz-root.in-game .mz-hand { flex:1 1 auto; display:flex; flex-direction:column; justify-content:flex-end; min-height:0; }

/* hand fan: overlap only as much as the width forces, keep the rank on the visible strip */
.mz-root.in-game .mz-fan { --w:min(126px, calc(100% - (var(--cols) - 1) * var(--strip)));
  align-items:flex-end; justify-content:center; }
.mz-root.in-game .mz-fan .mz-card { margin-inline-start:min(0px, max(calc(var(--strip) - var(--w)), calc((100% - var(--cols) * var(--w)) / (var(--cols) - 1)))); }
.mz-root.in-game .mz-fan .mz-card .mz-num { left:auto; right:7cqw; text-align:start; font-size:52cqw; font-weight:900;
  color:#2b1a10; text-shadow:0 1px 0 #ffffffcc, 0 0 1px #00000022; -webkit-text-stroke:0; }
.mz-root.in-game .mz-fan .mz-card.weight .mz-pips { left:auto; right:14%; width:auto; bottom:12%; justify-content:flex-start; }
.mz-root.in-game .mz-fan .mz-card .mz-plaque { padding:6px 3px 3px; }
.mz-game:has(.mz-sheet) .mz-fan { --w:min(92px, calc(100% - (var(--cols) - 1) * var(--strip))); }
@media (max-height:680px) {
  .mz-root.in-game .mz-opps { height:60px; }
  .mz-root.in-game .mz-opps .mz-scale { height:26px; }
  .mz-root.in-game .mz-fan { --w:min(112px, calc(100% - (var(--cols) - 1) * var(--strip))); }
  .mz-root.in-game .mz-table .mz-card { width:clamp(40px,calc(8.4 * var(--vh)),56px); height:calc(clamp(40px,calc(8.4 * var(--vh)),56px) * 1.44); }
}

/* ================= one-screen board, fourth pass: fan with a rank plate ================= */
.mz-root.in-game .mz-fan { --strip:46px; --w:min(150px, calc(18 * var(--vh)), calc(100% - (var(--cols) - 1) * var(--strip))); }
.mz-root.in-game .mz-fan .mz-card { border-radius:9px; }
.mz-root.in-game .mz-fan .mz-card .mz-num { left:auto; right:calc(var(--strip) * .09); top:3px; width:calc(var(--strip) - 11px); height:calc(var(--strip) - 11px);
  transform:none; display:flex; align-items:center; justify-content:center; font-size:calc(var(--strip) * .8); line-height:1; font-weight:900;
  border-radius:7px; background:linear-gradient(180deg,#fffaea,#f0dcae); color:#3a2208; text-shadow:none; -webkit-text-stroke:0;
  box-shadow:0 1px 3px #00000066, inset 0 0 0 1px #b98b2e99; }
.mz-root.in-game .mz-fan .mz-card .mz-pips { bottom:4%; left:6%; right:6%; }
.mz-root.in-game .mz-fan .mz-card .mz-plaque { padding:4px 2px 2px; }
.mz-root.in-game .mz-fan .mz-card.sel { transform:translateY(-12px) scale(1.02); box-shadow:0 0 0 3px #fff6c9, 0 0 22px #ffd24d, 0 12px 22px #000a; }
.mz-game:has(.mz-sheet) .mz-fan { --w:min(104px, calc(14 * var(--vh)), calc(100% - (var(--cols) - 1) * var(--strip))); }
/* opponent badges: compact corner pill, name keeps clear of it */
.mz-root.in-game .mz-opps .mz-badges { top:1px; bottom:auto; inset-inline-end:3px; }
.mz-root.in-game .mz-opps .mz-name { max-width:56%; }
.mz-root.in-game .mz-opps .mz-panel { grid-template-rows:auto 1fr; }
.mz-root.in-game .mz-opps .mz-scale { align-self:end; }
@media (max-height:680px) {
  .mz-root.in-game .mz-fan { --w:min(138px, calc(17 * var(--vh)), calc(100% - (var(--cols) - 1) * var(--strip))); }
  .mz-root.in-game .mz-opps .mz-panel { padding:2px 4px 0; }
}

/* ================= one-screen board, fifth pass: Muse checklist ================= */
/* turn strip: thin line right above the hand, not a row of its own */
.mz-root.in-game .mz-turnbar { min-height:28px; padding:1px 10px; border-radius:9px; font-size:12.5px; border-width:1.5px; }
.mz-root.in-game .mz-turnbar.mine { font-size:13.5px; box-shadow:0 0 16px #ffd24d66; }
.mz-root.in-game .mz-hintline { font-size:10px; }
/* opponent tile: badge bottom-left, name free */
.mz-root.in-game .mz-opps .mz-badges { top:auto; bottom:1px; left:3px; right:auto; }
.mz-root.in-game .mz-opps .mz-name { max-width:none; }
/* market cards a touch bigger */
.mz-root.in-game .mz-table .mz-card { width:clamp(54px,calc(9.8 * var(--vh)),66px); height:calc(clamp(54px,calc(9.8 * var(--vh)),66px) * 1.44); }
/* hand takes the room it needs, cards sized by height and width together */
.mz-root.in-game .mz-hand { padding-top:14px; }
.mz-root.in-game .mz-fan { --w:min(150px, calc(24 * var(--vh)), calc(100% - (var(--cols) - 1) * var(--strip))); }
.mz-game:has(.mz-sheet) .mz-fan { --w:min(118px, calc(17 * var(--vh)), calc(100% - (var(--cols) - 1) * var(--strip))); }
/* buttons: secondary as tall as primary, icon buttons thumb-sized, press feedback */
.mz-root.in-game .mz-sec, .mz-sec { min-height:46px; }
.mz-root.in-game .mz-ibtn { min-height:38px; padding:0 11px; font-size:12px; }
.mz-root .mz-go, .mz-root .mz-sec, .mz-root .mz-ibtn, .mz-root .mz-seg button, .mz-root .mz-sheet .mz-nums button { transition:transform .12s ease, filter .12s ease, background .12s ease; }
.mz-root .mz-go:active, .mz-root .mz-sec:active, .mz-root .mz-ibtn:active, .mz-root .mz-seg button:active, .mz-root .mz-sheet .mz-nums button:active { transform:scale(.97); filter:brightness(1.08); }
.mz-root .mz-go:disabled, .mz-root .mz-sec:disabled { opacity:.45; filter:grayscale(.4); }
@media (max-height:680px) {
  .mz-root.in-game .mz-fan { --w:min(142px, calc(23.5 * var(--vh)), calc(100% - (var(--cols) - 1) * var(--strip))); }
  .mz-root.in-game .mz-table .mz-card { width:clamp(48px,calc(9 * var(--vh)),58px); height:calc(clamp(48px,calc(9 * var(--vh)),58px) * 1.44); }
  .mz-root.in-game .mz-ibtn { min-height:34px; }
}

/* ================= one-screen board, sixth pass ================= */
.mz-root.in-game .mz-fan .mz-card { position:relative; }
.mz-root.in-game .mz-fan { --w:min(calc(34 * var(--vh)), calc(100% - (var(--cols) - 1) * var(--strip))); }
.mz-root.in-game .mz-fan .mz-card .mz-num { top:4px; right:5px; }
.mz-game:has(.mz-sheet) .mz-fan { --w:min(calc(24 * var(--vh)), calc(100% - (var(--cols) - 1) * var(--strip))); }
@media (max-height:680px) {
  .mz-root.in-game .mz-fan { --w:min(calc(33 * var(--vh)), calc(100% - (var(--cols) - 1) * var(--strip))); }
}

/* ================= seventh pass: corner rank index + big centre number ================= */
.mz-rank { display:none; }
.mz-root.in-game .mz-fan .mz-card .mz-rank { display:flex; position:absolute; top:4px; right:5px; z-index:2;
  width:calc(var(--strip) - 12px); height:calc(var(--strip) - 12px); align-items:center; justify-content:center;
  font-size:calc(var(--strip) * .74); font-weight:900; line-height:1; color:#3a2208; border-radius:6px;
  background:linear-gradient(180deg,#fffaea,#f0dcae); box-shadow:0 1px 3px #00000066, inset 0 0 0 1px #b98b2e99; }
.mz-root.in-game .mz-fan .mz-card .mz-num { position:absolute; top:48%; left:0; right:0; width:auto; height:auto;
  transform:translateY(-50%); display:block; text-align:center; font-size:50cqw; font-weight:900; line-height:1;
  color:#2b1a10; text-shadow:0 1px 0 #ffffffaa; background:none; box-shadow:none; border-radius:0; }
.mz-root.in-game .mz-fan .mz-card.weight .mz-pips { bottom:6%; left:10%; right:10%; justify-content:center; }

/* ================= eighth pass: RTL fan order — first card on top, index on the visible strip ================= */
.mz-root.in-game .mz-fan .mz-card:nth-child(1){z-index:20}
.mz-root.in-game .mz-fan .mz-card:nth-child(2){z-index:19}
.mz-root.in-game .mz-fan .mz-card:nth-child(3){z-index:18}
.mz-root.in-game .mz-fan .mz-card:nth-child(4){z-index:17}
.mz-root.in-game .mz-fan .mz-card:nth-child(5){z-index:16}
.mz-root.in-game .mz-fan .mz-card:nth-child(6){z-index:15}
.mz-root.in-game .mz-fan .mz-card:nth-child(7){z-index:14}
.mz-root.in-game .mz-fan .mz-card:nth-child(8){z-index:13}
.mz-root.in-game .mz-fan .mz-card:nth-child(9){z-index:12}
.mz-root.in-game .mz-fan .mz-card:nth-child(10){z-index:11}
.mz-root.in-game .mz-fan .mz-card .mz-rank { right:auto; left:5px; }
.mz-root.in-game .mz-fan .mz-card.sel { z-index:40; }

/* ================= ninth pass: turn strip follows the theme ================= */
.mz-root.in-game .mz-turnbar.mine { background:linear-gradient(180deg,var(--btn-a),var(--btn-b)); color:var(--btn-ink); border-color:var(--btn-edge); box-shadow:0 0 16px #00000055, inset 0 1px 0 #ffffff88; }
.mz-root.in-game .mz-turnbar.mine .mz-timer { background:#00000026; }
.mz-root.in-game .mz-turnbar:not(.mine) { background:var(--p2); color:var(--ink); }

/* ================= tenth pass: no dead space in the hand zone (Muse verdict) ================= */
.mz-root.in-game .mz-hand { flex:0 0 auto; padding-top:6px; }
.mz-root.in-game .mz-table { flex:1 1 auto; min-height:0; }
.mz-root.in-game .mz-table .mz-card { width:clamp(64px,calc(12 * var(--vh)),92px); height:calc(clamp(64px,calc(12 * var(--vh)),92px) * 1.44); }
.mz-root.in-game .mz-panel.me .mz-scale { height:clamp(46px,calc(7.5 * var(--vh)),72px); width:clamp(96px,30vw,150px); }
.mz-root.in-game .mz-panel.me .mz-scale .mz-sum { font-size:46px; }
@media (max-height:680px) {
  .mz-root.in-game .mz-table .mz-card { width:clamp(56px,calc(10.5 * var(--vh)),76px); height:calc(clamp(56px,calc(10.5 * var(--vh)),76px) * 1.44); }
}

/* ================= eleventh pass: keep the centre rank, market must not wrap ================= */
.mz-root.in-game .mz-fan .mz-card .mz-num { display:block; }
.mz-root.in-game .mz-table .mz-card { width:clamp(54px,calc(9.8 * var(--vh)),70px); height:calc(clamp(54px,calc(9.8 * var(--vh)),70px) * 1.44); }
.mz-root.in-game .mz-market { flex-wrap:nowrap; overflow:hidden; }
.mz-root.in-game .mz-table small { flex:0 0 auto; }
@media (max-height:680px) {
  .mz-root.in-game .mz-table .mz-card { width:clamp(48px,calc(9 * var(--vh)),62px); height:calc(clamp(48px,calc(9 * var(--vh)),62px) * 1.44); }
}

/* ================= twelfth pass: hand as rows, smaller cards, one readable rank ================= */
.mz-root.in-game .mz-hand { flex:0 0 auto; }
.mz-root.in-game .mz-fan { --ch: calc(34 * var(--vh)); display:grid; grid-template-columns:repeat(var(--cols), minmax(0,1fr));
  grid-auto-rows:auto; gap:5px; align-items:end; justify-items:center; }
.mz-root.in-game .mz-fan .mz-card { width:min(100px, calc((100% - (var(--cols) - 1) * 5px) / var(--cols)), calc(var(--ch) / var(--rows) * 0.66));
  max-width:100%; margin-inline-start:0; aspect-ratio:2 / 3; height:auto; flex:0 0 auto; }
.mz-root.in-game .mz-fan .mz-card .mz-rank { display:none; }
.mz-root.in-game .mz-fan .mz-card .mz-num { display:block; position:absolute; top:50%; left:0; right:0; transform:translateY(-50%);
  text-align:center; font-size:52cqw; font-weight:900; line-height:1; color:#2b1a10; text-shadow:0 1px 0 #ffffffaa; background:none; box-shadow:none; }
.mz-root.in-game .mz-fan .mz-card .mz-plaque b { font-size:min(12px, 17cqw); }
.mz-root.in-game .mz-fan .mz-card .mz-plaque em { display:none; }
.mz-root.in-game .mz-fan .mz-card .mz-bar { height:11cqw; line-height:11cqw; font-size:7cqw; }
.mz-game:has(.mz-sheet) .mz-fan { --ch: calc(24 * var(--vh)); }
@media (max-height:680px) { .mz-root.in-game .mz-fan { --ch: calc(32 * var(--vh)); } }

/* ================= thirteenth pass: hand rows sized from the column, market smaller, opponents bigger ================= */
.mz-root.in-game .mz-fan { --ch: calc(33 * var(--vh)); }
.mz-root.in-game .mz-fan .mz-card { width:100%; max-width:calc(var(--ch) / var(--rows) * 0.66); aspect-ratio:2 / 3; height:auto; }
.mz-root.in-game .mz-table { flex:0 1 auto; padding:3px 8px; }
.mz-root.in-game .mz-table .mz-card { width:clamp(44px,calc(7.4 * var(--vh)),56px); height:calc(clamp(44px,calc(7.4 * var(--vh)),56px) * 1.44); }
.mz-root.in-game .mz-table small { font-size:8px; }
.mz-root.in-game .mz-opps { height:clamp(80px,calc(13 * var(--vh)),112px); }
.mz-root.in-game .mz-opps .mz-name { font-size:12px; }
.mz-root.in-game .mz-opps .mz-stats { font-size:11px; gap:7px; }
.mz-root.in-game .mz-opps .mz-stars { font-size:12px; }
.mz-root.in-game .mz-opps .mz-stars small { font-size:9px; }
.mz-root.in-game .mz-opps .mz-hearts .mz-ic { width:12px; height:12px; }
.mz-root.in-game .mz-opps .mz-badge { font-size:8.5px; }
.mz-root.in-game .mz-opps .mz-scale { height:clamp(38px,calc(6.4 * var(--vh)),54px); }
.mz-root.in-game .mz-opps .mz-scale .mz-sum { font-size:40px; }
@media (max-height:680px) {
  .mz-root.in-game .mz-fan { --ch: calc(31 * var(--vh)); }
  .mz-root.in-game .mz-opps { height:74px; }
  .mz-root.in-game .mz-opps .mz-scale { height:34px; }
  .mz-root.in-game .mz-table .mz-card { width:clamp(40px,calc(6.8 * var(--vh)),50px); height:calc(clamp(40px,calc(6.8 * var(--vh)),50px) * 1.44); }
}

/* ================= fourteenth pass: opponent card count on its own line ================= */
.mz-root.in-game .mz-opps .mz-badges { position:static; display:flex; justify-content:center; margin:0; gap:3px; }
.mz-root.in-game .mz-opps .mz-panel { grid-template-rows:auto auto 1fr; }
.mz-root.in-game .mz-opps .mz-badge { font-size:8.5px; padding:0 5px; }

/* ================= fifteenth pass: Muse size table ================= */
.mz-root.in-game .mz-fan { --ch: calc(39 * var(--vh)); gap:5px; }
.mz-root.in-game .mz-fan .mz-card { width:100%; max-width:min(140px, calc(var(--ch) / var(--rows) * 0.66)); aspect-ratio:2 / 3; height:auto; }
.mz-root.in-game .mz-fan .mz-card .mz-num { font-size:min(46px, 40cqw); }
.mz-root.in-game .mz-opps { height:clamp(76px, calc(11.4 * var(--vh)), 104px); }
.mz-root.in-game .mz-opps .mz-scale { height:clamp(36px, calc(5.2 * var(--vh)), 48px); }
.mz-root.in-game .mz-opps .mz-name { font-size:12px; }
.mz-root.in-game .mz-opps .mz-stats, .mz-root.in-game .mz-opps .mz-stars { font-size:12px; }
.mz-root.in-game .mz-table .mz-card { width:clamp(54px, calc(8 * var(--vh)), 68px); height:calc(clamp(54px, calc(8 * var(--vh)), 68px) * 1.44); }
@media (min-height:700px) { .mz-root.in-game .mz-fan { --ch: calc(42 * var(--vh)); } }
@media (min-height:700px) { .mz-root.in-game .mz-opps .mz-name { font-size:13px; } }
@media (max-height:680px) { .mz-root.in-game .mz-opps { height:76px; } .mz-root.in-game .mz-opps .mz-scale { height:36px; } }

/* ================= sixteenth pass: hand rows wrap and centre ================= */
.mz-root.in-game .mz-fan { display:flex; flex-wrap:wrap; justify-content:center; align-content:flex-end; gap:5px; }
.mz-root.in-game .mz-fan .mz-card { flex:0 0 auto; width:calc((100% - (var(--cols) - 1) * 5px) / var(--cols));
  max-width:min(140px, calc(var(--ch) / var(--rows) * 0.66)); }

/* ================= seventeenth pass: no dead space below the hand (Muse final) ================= */
.mz-root.in-game .mz-table { flex:1 1 auto; max-height:calc(26 * var(--vh)); }
.mz-root.in-game .mz-panel.me .mz-scale { height:clamp(56px, calc(9.5 * var(--vh)), 96px); width:clamp(120px, 34vw, 180px); }
.mz-root.in-game .mz-panel.me .mz-scale .mz-sum { font-size:48px; }

/* ================= eighteenth pass: opponents get the room, pans become real targets ================= */
.mz-root.in-game .mz-top { min-height:30px; }
.mz-root.in-game .mz-banner { font-size:10.5px; padding:1px 9px; }
.mz-root.in-game .mz-opps { height:clamp(112px, calc(16.5 * var(--vh)), 168px); }
.mz-root.in-game .mz-opps .mz-name { font-size:13px; }
.mz-root.in-game .mz-opps .mz-stats { font-size:12.5px; gap:8px; }
.mz-root.in-game .mz-opps .mz-stars { font-size:13px; }
.mz-root.in-game .mz-opps .mz-stars small { font-size:10px; }
.mz-root.in-game .mz-opps .mz-hearts .mz-ic { width:14px; height:14px; }
.mz-root.in-game .mz-opps .mz-badge { font-size:9.5px; padding:0 6px; }
.mz-root.in-game .mz-opps .mz-scale { height:clamp(72px, calc(11 * var(--vh)), 106px); }
.mz-root.in-game .mz-opps .mz-scale .mz-sum { font-size:38px; }
.mz-root.in-game .mz-table { flex:0 0 auto; max-height:none; padding:2px 8px; }
.mz-root.in-game .mz-table .mz-card { width:clamp(40px, calc(5.8 * var(--vh)), 50px); height:calc(clamp(40px, calc(5.8 * var(--vh)), 50px) * 1.44); }
.mz-root.in-game .mz-table small { font-size:7.5px; }
.mz-root.in-game .mz-turnbar { min-height:24px; padding:0 10px; font-size:11.5px; }
.mz-root.in-game .mz-turnbar.mine { font-size:12.5px; }
.mz-root.in-game .mz-panel.me { padding:2px 8px; }
.mz-root.in-game .mz-panel.me .mz-scale { height:clamp(44px, calc(6.6 * var(--vh)), 62px); width:clamp(100px, 27vw, 140px); }
.mz-root.in-game .mz-panel.me .mz-scale .mz-sum { font-size:40px; }
.mz-root.in-game .mz-fan { --ch: calc(37 * var(--vh)); }
@media (min-height:700px) { .mz-root.in-game .mz-fan { --ch: calc(42 * var(--vh)); } }
@media (max-height:680px) { .mz-root.in-game .mz-opps { height:112px; } .mz-root.in-game .mz-opps .mz-scale { height:72px; } }
/* tap targets on the scales: visible zone + clear highlight */
.mz-scale .hit { fill:transparent; }
.mz-scale .mz-cup.tap .hit { fill:#ffd24d1c; stroke:#ffd24d99; stroke-width:2; stroke-dasharray:7 5; }
.mz-scale .mz-cup.tap:active .hit, .mz-scale .mz-cup.picked .hit { fill:#ffd24d3d; stroke:#fff; stroke-dasharray:none; }

/* ================= nineteenth pass: opponents absorb the spare height ================= */
.mz-root.in-game .mz-opps { flex:1 1 auto; min-height:clamp(112px,calc(16.5 * var(--vh)),168px); max-height:clamp(150px,calc(23 * var(--vh)),220px); }
.mz-root.in-game .mz-table { flex:0 0 auto; }
.mz-root.in-game .mz-hand { flex:0 0 auto; }

/* ================= twentieth pass: scale keeps its aspect, pans stay in the tile ================= */
.mz-root.in-game .mz-opps .mz-scale { width:100%; height:auto; aspect-ratio:200 / 128; max-height:100%; align-self:center; }
.mz-root.in-game .mz-panel.me .mz-scale { width:clamp(104px, 29vw, 148px); height:auto; aspect-ratio:200 / 128; }

/* ================= twenty-first pass: fit the short screen ================= */
@media (max-height:680px) { .mz-root.in-game .mz-fan { --ch: calc(34.5 * var(--vh)); } .mz-root.in-game .mz-opps { min-height:104px; height:104px; } }

/* ================= twenty-second pass: opponent header on two lines ================= */
.mz-root.in-game .mz-opps .mz-ph { flex-direction:column; align-items:stretch; gap:1px; }
.mz-root.in-game .mz-opps .mz-name { font-size:12.5px; max-width:100%; }
.mz-root.in-game .mz-opps .mz-stats { justify-content:space-between; font-size:11px; gap:4px; }
.mz-root.in-game .mz-opps .mz-stars { font-size:11.5px; }
.mz-root.in-game .mz-opps .mz-hearts .mz-ic { width:12px; height:12px; }

/* ================= twenty-third pass: short screen balance ================= */
@media (max-height:680px) {
  .mz-root.in-game .mz-opps { height:120px; min-height:120px; max-height:120px; }
  .mz-root.in-game .mz-fan { --ch: calc(32 * var(--vh)); }
  .mz-root.in-game .mz-table .mz-card { width:clamp(36px,calc(5.4 * var(--vh)),44px); height:calc(clamp(36px,calc(5.4 * var(--vh)),44px) * 1.44); }
  .mz-root.in-game .mz-panel.me .mz-scale { width:clamp(96px,26vw,120px); }
}

/* ================= twenty-fourth pass: 44px pans on the short screen ================= */
@media (max-height:680px) {
  .mz-root.in-game .mz-opps { height:136px; min-height:136px; max-height:136px; }
  .mz-root.in-game .mz-fan { --ch: calc(31 * var(--vh)); }
}

/* ================= twenty-fifth pass: opponent strip capped (Muse final) ================= */
.mz-root.in-game .mz-opps { max-height:140px; }
@media (min-height:700px) { .mz-root.in-game .mz-opps { height:140px; min-height:140px; max-height:140px; }
  .mz-root.in-game .mz-fan { --ch: calc(45 * var(--vh)); } }
@media (max-height:680px) {
  .mz-root.in-game .mz-opps { height:128px; min-height:128px; max-height:128px; }
  .mz-root.in-game .mz-table .mz-card { width:clamp(42px,calc(6 * var(--vh)),48px); height:calc(clamp(42px,calc(6 * var(--vh)),48px) * 1.44); }
  .mz-root.in-game .mz-fan { --ch: calc(33 * var(--vh)); }
}
@media (max-height:680px) { .mz-root.in-game .mz-fan { --ch: calc(32 * var(--vh)); } }

/* ================= twenty-sixth pass: action sheet floats above the hand, never pushes it off screen ================= */
.mz-root.in-game .mz-bottom { position:relative; display:flex; flex-direction:column; flex:1 1 auto; min-height:0; }
.mz-root.in-game .mz-bottom > .mz-hand { flex:1 1 auto; }
.mz-root.in-game .mz-bottom > .mz-sheet { position:absolute; left:2px; right:2px; bottom:calc(100% + 6px); z-index:70;
  background:var(--p3); border:1.5px solid var(--line); border-radius:16px; padding:7px 8px; margin:0;
  box-shadow:0 10px 28px #00000066; backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }
.mz-root.in-game .mz-bottom > .mz-sheet .mz-actions { gap:8px; }

/* ================= twenty-seventh pass: layout per player count, cartoon card look, motion ================= */
/* --- opponents scale with how many there are: 1 opponent gets the biggest stage --- */
.mz-root.in-game .mz-opps { height:var(--oh); min-height:var(--oh); max-height:var(--oh); --oh:128px; gap:6px; }
.mz-root.in-game .mz-opps.n1 { --oh:clamp(150px,calc(26 * var(--vh)),208px); }
.mz-root.in-game .mz-opps.n2 { --oh:clamp(132px,calc(19 * var(--vh)),168px); }
.mz-root.in-game .mz-opps.n3 { --oh:clamp(112px,calc(15.4 * var(--vh)),146px); }
@media (max-height:680px) {
  .mz-root.in-game .mz-opps.n1 { --oh:150px; }
  .mz-root.in-game .mz-opps.n2 { --oh:132px; }
  .mz-root.in-game .mz-opps.n3 { --oh:112px; }
}
.mz-root.in-game .mz-opps.n1 .mz-panel { max-width:min(320px,86%); margin:0 auto; }
.mz-root.in-game .mz-opps.n1 .mz-name, .mz-root.in-game .mz-opps.n1 .mz-stats { font-size:15px; }
.mz-root.in-game .mz-opps.n1 .mz-hearts .mz-ic { width:17px; height:17px; }
.mz-root.in-game .mz-opps.n1 .mz-stars { font-size:15px; }
.mz-root.in-game .mz-opps.n1 .mz-scale { max-height:calc(var(--oh) - 44px); }
.mz-root.in-game .mz-opps.n2 .mz-scale { max-height:calc(var(--oh) - 40px); }
.mz-root.in-game .mz-opps.n3 .mz-scale { max-height:calc(var(--oh) - 34px); }
/* two players: the market can breathe a little */
.mz-root.in-game .mz-opps.n1 ~ .mz-table .mz-card { width:clamp(48px,calc(7 * var(--vh)),58px); height:calc(clamp(48px,calc(7 * var(--vh)),58px) * 1.44); }

/* --- cartoon card look: chunky outline, soft top light, sticker shadow --- */
.mz-root .mz-card { border-radius:15px; border-width:2.5px; border-color:#241736; border-style:solid;
  box-shadow:0 3px 0 #1b1030b3, 0 7px 16px #00000070, inset 0 2px 0 #ffffff66;
  transition:transform .18s cubic-bezier(.2,.9,.3,1.3), box-shadow .18s ease, filter .18s ease; }
.mz-root .mz-card.weight { border-color:hsl(var(--h) 55% 32%); box-shadow:0 3px 0 hsl(var(--h) 60% 26% / .85), 0 7px 16px #00000070, inset 0 2px 0 #ffffff99; }
.mz-root .mz-card.act { border-color:#2a1a3a; }
.mz-root .mz-card.sm { border-radius:11px; border-width:2px; }
.mz-root .mz-card::after { display:block !important; content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:linear-gradient(157deg, #ffffff7a 0%, #ffffff2e 16%, #ffffff00 42%); }
.mz-root .mz-fan .mz-card .mz-num { color:#2b1a10; -webkit-text-stroke:2px #ffffff; paint-order:stroke fill;
  text-shadow:0 2px 0 #ffffff88, 0 3px 7px #00000033; }
.mz-root .mz-fan .mz-card.selected { transform:translateY(-7px) scale(1.05) rotate(-.6deg);
  box-shadow:0 10px 0 #1b103099, 0 16px 26px #00000088, 0 0 0 3px var(--gold), inset 0 2px 0 #ffffff88; z-index:5; }
.mz-root .mz-fan .mz-card:not(.selected):active { transform:translateY(-3px) scale(1.02); }

/* --- opponent + my panel: sticker frames --- */
.mz-root.in-game .mz-panel { border-radius:16px; border-width:2px; box-shadow:0 3px 0 #00000055, 0 8px 18px #00000055, inset 0 1px 0 #ffffff22; }
.mz-root.in-game .mz-panel.active-turn, .mz-root.in-game .mz-panel.me.active-turn { box-shadow:0 0 0 3px var(--gold), 0 0 18px #f3d27a66, 0 8px 18px #00000066; }

/* --- motion --- */
@keyframes mz-deal { from { opacity:0; transform:translateY(20px) scale(.88); } to { opacity:1; transform:none; } }
@keyframes mz-land { 0% { transform:scale(.55); opacity:.15; } 60% { transform:scale(1.18); } 100% { transform:scale(1); opacity:1; } }
@keyframes mz-wobble { 0%,100% { transform:rotate(0); } 25% { transform:rotate(-1.3deg); } 75% { transform:rotate(1.3deg); } }
@keyframes mz-flash { 0% { filter:brightness(1); } 30% { filter:brightness(1.6) saturate(1.3); } 100% { filter:brightness(1); } }
.mz-root.in-game .mz-fan .mz-card { animation:mz-deal .34s cubic-bezier(.2,.85,.3,1.25) backwards; }
.mz-root.in-game .mz-fan .mz-card:nth-child(2) { animation-delay:.03s; }
.mz-root.in-game .mz-fan .mz-card:nth-child(3) { animation-delay:.06s; }
.mz-root.in-game .mz-fan .mz-card:nth-child(4) { animation-delay:.09s; }
.mz-root.in-game .mz-fan .mz-card:nth-child(5) { animation-delay:.12s; }
.mz-root.in-game .mz-fan .mz-card:nth-child(n+6) { animation-delay:.15s; }
.mz-root .mz-w { animation:mz-land .3s ease-out; }
.mz-root .mz-scale.danger { animation:mz-wobble 1.8s ease-in-out infinite; }
.mz-root .mz-banner { animation:mz-pop .3s ease, mz-flash .5s ease; }
.mz-root .mz-dlg .mz-cov h2 { animation:mz-land .45s cubic-bezier(.2,.85,.3,1.25); }
.mz-root .mz-snd.off, .mz-root .mz-mus.off { opacity:.45; text-decoration:line-through; }
.mz-root .mz-snd, .mz-root .mz-mus { min-width:44px; min-height:34px; padding:0 8px; }
@media (prefers-reduced-motion: reduce) {
  .mz-root.in-game .mz-fan .mz-card, .mz-root .mz-w, .mz-root .mz-scale.danger, .mz-root .mz-banner, .mz-root .mz-dlg .mz-cov h2 { animation:none !important; }
}

/* ================= twenty-eighth pass: my own scale never clips ================= */
.mz-root.in-game .mz-panel.me { overflow:visible; }
.mz-root.in-game .mz-panel.me .mz-scale { height:clamp(42px, calc(7 * var(--vh)), 62px); width:auto; max-width:44vw; aspect-ratio:200 / 128; align-self:center; }

/* ================= twenty-ninth pass: market shows all three cards; my own scale readable ================= */
.mz-root.in-game .mz-market { position:relative; flex-wrap:nowrap; overflow:visible; align-items:center; justify-content:center; gap:5px; }
.mz-root.in-game .mz-market small { position:absolute; left:0; right:0; bottom:0; width:auto; text-align:center; font-size:8px; opacity:.75; pointer-events:none; }
.mz-root.in-game .mz-mslot { flex:0 0 auto; display:flex; align-items:center; justify-content:center; }
.mz-root.in-game .mz-panel.me { min-height:clamp(62px,calc(9.5 * var(--vh)),92px); column-gap:8px; }
.mz-root.in-game .mz-panel.me .mz-scale { height:clamp(46px,calc(8 * var(--vh)),78px); width:auto; max-width:46vw; }
.mz-root.in-game .mz-fan { --ch:calc(31 * var(--vh)); }

/* ================= thirtieth pass: Muse review adopted ================= */
/* opponent strip capped (no dead space), still bigger with fewer opponents */
.mz-root.in-game .mz-opps.n1 { --oh:clamp(140px,calc(22 * var(--vh)),156px); }
.mz-root.in-game .mz-opps.n2 { --oh:clamp(132px,calc(18.5 * var(--vh)),148px); }
.mz-root.in-game .mz-opps.n3 { --oh:clamp(112px,calc(15 * var(--vh)),140px); }
@media (max-height:680px) { .mz-root.in-game .mz-opps.n1 { --oh:140px; } .mz-root.in-game .mz-opps.n2 { --oh:132px; } .mz-root.in-game .mz-opps.n3 { --oh:112px; } }
/* market cards never below a comfortable tap width */
.mz-root.in-game .mz-table .mz-card { width:clamp(44px,calc(6.6 * var(--vh)),58px); height:calc(clamp(44px,calc(6.6 * var(--vh)),58px) * 1.44); }
/* the chosen pan fills gold; the other pans dim; other opponents step back */
.mz-root.in-game .mz-cup.picked .pan { fill:#E8B84B; stroke:#8a6415; }
.mz-root.in-game .mz-cup.picked .mz-sum { color:#2a1d00; }
.mz-root.in-game .mz-cup.picked .str { stroke:#8a6415; }
.mz-root.in-game .mz-opps .mz-cup.tap .hit { fill:#E8B84B1f; stroke:#E8B84B99; stroke-width:2; stroke-dasharray:6 4; }
.mz-root.in-game .mz-opps:has(.mz-cup.tap) .mz-panel:not(:has(.mz-cup.tap)) { opacity:.7; }

/* ================= thirty-first pass: motion on the board, playable cards, turn ring ================= */
@keyframes mz-swing { 0% { transform:rotate(-1.7deg); } 40% { transform:rotate(1.5deg); } 70% { transform:rotate(-.6deg); } 100% { transform:rotate(0deg); } }
.mz-root .mz-scale .beam { transform-box:view-box; transform-origin:100px 26px; animation:mz-swing .55s cubic-bezier(.3,.9,.3,1); }
@keyframes mz-ring { 0%,100% { box-shadow:0 0 0 3px var(--gold), 0 0 12px #f3d27a55, 0 8px 18px #00000055; } 50% { box-shadow:0 0 0 3px var(--gold), 0 0 26px #f3d27aaa, 0 8px 18px #00000055; } }
.mz-root.in-game .mz-panel.turn { animation:mz-ring 1.8s ease-in-out infinite; }
.mz-root.in-game .mz-panel.dim { opacity:.82; }
/* hand: playable cards lift and glow, unplayable ones step back */
.mz-root.in-game .mz-fan .mz-card.dis { opacity:.45; filter:saturate(.55) brightness(.85); }
.mz-root.in-game .mz-fan.canplay .mz-card:not(.dis) { box-shadow:0 3px 0 #1b1030b3, 0 7px 16px #00000070, 0 0 0 2px #f3d27a66, inset 0 2px 0 #ffffff77; }
.mz-root.in-game .mz-fan.canplay .mz-card:not(.dis):hover { transform:translateY(-4px); }
@media (prefers-reduced-motion: reduce) {
  .mz-root .mz-scale .beam, .mz-root.in-game .mz-panel.turn { animation:none !important; }
}

/* ================= thirty-second pass: no dead band above the hand, market label clear of the cards ================= */
.mz-root.in-game .mz-market { padding-bottom:12px; }
.mz-root.in-game .mz-market small { bottom:0; }
.mz-root.in-game .mz-hand { flex:1 1 auto; min-height:0; }
.mz-root.in-game .mz-fan { flex:1 1 auto; min-height:0; align-content:end; }
.mz-root.in-game .mz-fan .mz-card { width:100%;
  max-width:min(calc((100% - (var(--cols) - 1) * 5px) / var(--cols)), calc(var(--ch) / var(--rows) * 0.66 * 1.38));
  aspect-ratio:2 / 3; height:auto; }

/* ================= thirty-third pass: opponents look like players ================= */
.mz-root.in-game .mz-av { width:20px; height:20px; border-radius:50%; display:inline-grid; place-items:center; flex:0 0 auto;
  font-size:11px; font-weight:800; color:#1a1030; margin-inline-end:5px; vertical-align:middle;
  background:radial-gradient(circle at 32% 28%, #ffffffcc, hsl(calc(var(--av) * 71 + 12) 68% 62%) 62%);
  box-shadow:inset 0 0 0 1.5px #ffffff77, 0 1px 3px #00000066; }
.mz-root.in-game .mz-opps.n1 .mz-av { width:24px; height:24px; font-size:13px; }
.mz-root.in-game .mz-minifan { display:inline-flex; align-items:center; margin-inline-end:4px; }
.mz-root.in-game .mz-minifan i { width:9px; height:13px; border-radius:2px; margin-inline-start:-4px;
  background:linear-gradient(160deg,#7a5cc4,#2b1d5a); box-shadow:0 1px 2px #00000088, inset 0 0 0 .5px #ffffff44; }
.mz-root.in-game .mz-minifan i:first-child { margin-inline-start:0; transform:rotate(-9deg); }
.mz-root.in-game .mz-minifan i:last-child { transform:rotate(9deg); }
.mz-root.in-game .mz-opps.n1 .mz-minifan i { width:11px; height:16px; }

/* ================= thirty-fourth pass: hand never overlaps the player bar on short screens ================= */
.mz-root.in-game .mz-fan .mz-card { max-height:calc(var(--ch) / var(--rows) * 1.38); }
@media (max-height:680px) {
  .mz-root.in-game .mz-fan { --ch:calc(25 * var(--vh)); }
  .mz-root.in-game .mz-fan .mz-card { max-height:calc(var(--ch) / var(--rows) * 1.38); }
}

/* ================= thirty-fifth pass: my own scale is the hero of my side ================= */
.mz-root.in-game .mz-panel.me { min-height:clamp(96px,calc(15.5 * var(--vh)),146px); padding:2px 8px; }
.mz-root.in-game .mz-panel.me .mz-scale { height:clamp(84px,calc(13.5 * var(--vh)),124px); width:auto; max-width:62vw; align-self:center; }
.mz-root.in-game .mz-panel.me .mz-scale .mz-sum { font-size:46px; }
.mz-root.in-game .mz-panel.me .mz-name { font-size:15px; }
.mz-root.in-game .mz-table { padding:2px 8px; }
.mz-root.in-game .mz-table .mz-card { width:clamp(40px,calc(5.9 * var(--vh)),52px); height:calc(clamp(40px,calc(5.9 * var(--vh)),52px) * 1.44); }
.mz-root.in-game .mz-market { padding-bottom:10px; }
@media (max-height:680px) {
  .mz-root.in-game .mz-panel.me { min-height:96px; }
  .mz-root.in-game .mz-panel.me .mz-scale { height:84px; }
  .mz-root.in-game .mz-fan { --ch:calc(22 * var(--vh)); }
}

/* ================= thirty-sixth pass: wide screens use the width ================= */
@media (min-width: 900px) {
  .mz-root.in-game { max-width:1120px; padding:8px 14px 10px; }
  .mz-root.in-game .mz-opps { --oh:clamp(160px,calc(23 * var(--vh)),214px); }
  .mz-root.in-game .mz-opps .mz-name { font-size:16px; }
  .mz-root.in-game .mz-opps .mz-stars { font-size:15px; }
  .mz-root.in-game .mz-opps .mz-hearts .mz-ic { width:17px; height:17px; }
  .mz-root.in-game .mz-opps .mz-cup .hit { width:auto; }
  .mz-root.in-game .mz-panel.me { min-height:clamp(150px,calc(20 * var(--vh)),200px); }
  .mz-root.in-game .mz-panel.me .mz-scale { height:clamp(130px,calc(17 * var(--vh)),180px); max-width:46vw; }
  .mz-root.in-game .mz-table .mz-card { width:clamp(56px,calc(7.4 * var(--vh)),76px); height:calc(clamp(56px,calc(7.4 * var(--vh)),76px) * 1.44); }
  .mz-root.in-game .mz-fan { --ch:calc(33 * var(--vh)); }
  .mz-root.in-game .mz-fan .mz-card { max-height:calc(var(--ch) / var(--rows) * 1.38); }
}

/* ================= thirty-seventh pass: fit the real visible viewport, hand can never overlap my bar ================= */
.mz-root.in-game { height:calc(100 * var(--vh)); height:100dvh; max-height:calc(100 * var(--vh)); max-height:100dvh; overflow:hidden; }
.mz-root.in-game .mz-fan { display:grid; grid-template-columns:repeat(var(--cols), minmax(0,1fr)); grid-auto-rows:minmax(0, 1fr);
  gap:5px; min-height:0; align-items:end; justify-items:center; }
.mz-root.in-game .mz-fan .mz-card { height:100%; width:auto; max-width:100%; max-height:none; aspect-ratio:2 / 3;
  margin:0; justify-self:center; align-self:end; }
.mz-root.in-game .mz-hand { overflow:hidden; }
.mz-root.in-game .mz-panel.me { flex:0 0 auto; }

/* ================= thirty-eighth pass: market caption clear of cards, "معروف" badge off the art ================= */
.mz-root.in-game .mz-market { padding-bottom:15px; }
.mz-root.in-game .mz-market small { bottom:1px; font-size:8px; opacity:.7; }
.mz-root .mz-card .mz-eye { position:absolute; inset-inline-start:3px; bottom:3px; top:auto; z-index:3;
  font-size:8px; line-height:1; padding:2px 4px; border-radius:6px; background:#000000aa; color:#ffe9a8; box-shadow:0 1px 2px #0008; }
.mz-root.in-game .mz-fan .mz-card .mz-eye { inset-inline-start:auto; inset-inline-end:3px; }

/* ================= thirty-ninth pass: no duplicate number on market cards ================= */
.mz-root .mz-card.sm .mz-rank { display:none; }
.mz-root.in-game .mz-table .mz-card .mz-num { font-size:44cqw; }
.mz-root.in-game .mz-market { padding-bottom:16px; }

/* fix: market number size back to the small-card size */
.mz-root.in-game .mz-table .mz-card .mz-num { font-size:30px; }
.mz-root.in-game .mz-table .mz-card.sm .mz-num { font-size:clamp(22px,calc(6.4 * var(--vh)),34px); }

/* ================= fortieth pass: UNO-style landscape table ================= */
@media (orientation: landscape) and (min-width: 640px) {
  .mz-root.in-game .mz-game { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
    grid-template-rows:auto auto auto minmax(0,1fr) auto auto; column-gap:10px; row-gap:6px; }
  .mz-root.in-game .mz-top { grid-column:1 / -1; grid-row:1; }
  .mz-root.in-game .mz-banner { grid-column:1 / -1; grid-row:2; }
  .mz-root.in-game .mz-opps { grid-column:1 / -1; grid-row:3; --oh:clamp(88px,calc(26 * var(--vh)),120px); }
  .mz-root.in-game .mz-table { grid-column:1; grid-row:4; align-self:stretch; }
  .mz-root.in-game .mz-panel.me { grid-column:2; grid-row:4; min-height:0; align-self:stretch; }
  .mz-root.in-game .mz-turnbar { grid-column:1 / -1; grid-row:5; }
  .mz-root.in-game .mz-bottom { grid-column:1 / -1; grid-row:6; }
  .mz-root.in-game .mz-panel.me .mz-scale { height:min(100%, clamp(90px,calc(22 * var(--vh)),150px)); max-width:60%; }
  .mz-root.in-game .mz-fan { display:flex; flex-wrap:nowrap; align-items:flex-end; justify-content:center; gap:0; height:100%; }
  .mz-root.in-game .mz-fan .mz-card { flex:0 0 auto; height:100%; width:auto; max-width:none; aspect-ratio:2 / 3;
    margin-inline-start:-2.6%; transform-origin:50% 130%;
    transform:rotate(calc((var(--i) - (var(--n) - 1) / 2) * 3.2deg)); }
  .mz-root.in-game .mz-fan .mz-card:first-child { margin-inline-start:0; }
  .mz-root.in-game .mz-fan .mz-card.selected { transform:rotate(0deg) translateY(-10px) scale(1.04); }
}

/* landscape: give the hand a real share of the height */
@media (orientation: landscape) and (min-width: 640px) {
  .mz-root.in-game .mz-game { grid-template-rows:auto auto auto minmax(0,1.15fr) auto minmax(0,1fr); }
  .mz-root.in-game .mz-bottom { min-height:0; }
  .mz-root.in-game .mz-hand { flex:1 1 auto; min-height:0; }
  .mz-root.in-game .mz-fan { min-height:0; height:100%; }
  .mz-root.in-game .mz-fan .mz-card { height:100%; max-height:100%; }
}

/* landscape tuning: fixed hand band, shorter seats, middle band takes the rest */
@media (orientation: landscape) and (min-width: 640px) {
  .mz-root.in-game .mz-game { grid-template-rows:auto auto auto minmax(0,1fr) auto auto; }
  .mz-root.in-game .mz-opps { --oh:clamp(66px,calc(20 * var(--vh)),108px); }
  .mz-root.in-game .mz-hand { flex:0 0 auto; height:clamp(96px,calc(29 * var(--vh)),210px); overflow:visible; }
  .mz-root.in-game .mz-fan { height:100%; }
  .mz-root.in-game .mz-fan .mz-card { height:100%; max-height:100%; }
}

/* short landscape phones: drop the log banner, compact the bars, keep my scale visible */
@media (orientation: landscape) and (max-height: 520px) {
  .mz-root.in-game .mz-banner { display:none; }
  .mz-root.in-game .mz-top { padding:2px 6px; }
  .mz-root.in-game .mz-top .mz-title { font-size:17px; }
  .mz-root.in-game .mz-opps { --oh:72px; }
  .mz-root.in-game .mz-panel.me { min-height:96px; }
  .mz-root.in-game .mz-hand { height:100px; }
  .mz-root.in-game .mz-turnbar { padding:2px 8px; font-size:12px; }
  .mz-root.in-game .mz-panel.me .mz-scale { height:clamp(72px, calc(18 * var(--vh)), 96px); }
}

/* landscape: opponent strip overrides must beat the per-count rules */
@media (orientation: landscape) {
  .mz-root.in-game .mz-opps.n1 { --oh:clamp(84px,calc(26 * var(--vh)),140px); }
  .mz-root.in-game .mz-opps.n2 { --oh:clamp(78px,calc(24 * var(--vh)),130px); }
  .mz-root.in-game .mz-opps.n3 { --oh:clamp(72px,calc(22 * var(--vh)),120px); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .mz-root.in-game .mz-opps.n1, .mz-root.in-game .mz-opps.n2, .mz-root.in-game .mz-opps.n3 { --oh:74px; }
}

/* landscape pass 2: readable seats, gentler fan */
@media (orientation: landscape) {
  .mz-root.in-game .mz-opps.n1 { --oh:clamp(92px,calc(26 * var(--vh)),140px); }
  .mz-root.in-game .mz-opps.n2 { --oh:clamp(90px,calc(24 * var(--vh)),134px); }
  .mz-root.in-game .mz-opps.n3 { --oh:clamp(88px,calc(22 * var(--vh)),126px); }
  .mz-root.in-game .mz-opps .mz-panel { grid-template-rows:auto 1fr auto; }
  .mz-root.in-game .mz-opps .mz-scale { max-height:calc(var(--oh) - 40px); }
  .mz-root.in-game .mz-fan .mz-card { margin-inline-start:-1.1%; transform:rotate(calc((var(--i) - (var(--n) - 1) / 2) * 1.7deg)); }
  .mz-root.in-game .mz-panel.me .mz-scale { height:clamp(78px, calc(21 * var(--vh)), 116px); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .mz-root.in-game .mz-opps.n1, .mz-root.in-game .mz-opps.n2, .mz-root.in-game .mz-opps.n3 { --oh:88px; }
  .mz-root.in-game .mz-hand { height:104px; }
  .mz-root.in-game .mz-banner { display:none; }
}

/* landscape pass 3: seat scale sits beside the name so the pans stay big */
@media (orientation: landscape) {
  .mz-root.in-game .mz-opps .mz-panel { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);
    grid-template-rows:auto auto; column-gap:6px; align-content:stretch; }
  .mz-root.in-game .mz-opps .mz-ph { grid-column:1; grid-row:1; }
  .mz-root.in-game .mz-opps .mz-badges { grid-column:1; grid-row:2; align-content:start; }
  .mz-root.in-game .mz-opps .mz-scale { grid-column:2; grid-row:1 / span 2; max-height:calc(var(--oh) - 12px); width:100%; align-self:center; }
  .mz-root.in-game .mz-opps .mz-ghostbox { grid-column:2; grid-row:1 / span 2; }
  .mz-root.in-game .mz-opps .mz-knownrow { grid-column:1 / -1; grid-row:3; }
}

/* landscape pass 4: no hidden hand cards, badge clear of the pan */
@media (orientation: landscape) {
  .mz-root.in-game .mz-fan { gap:3px; }
  .mz-root.in-game .mz-fan .mz-card { margin-inline-start:0; }
  .mz-root.in-game .mz-opps .mz-badges { padding-inline-end:6px; max-width:100%; }
  .mz-root.in-game .mz-opps .mz-badge.hand { font-size:10px; }
}

/* ================= oval table pass: the table itself is an oval, seats sit on its rim ================= */
.mz-root.in-game .mz-table{
  flex:0 0 auto; min-height:clamp(150px, calc(21 * var(--vh)), 210px);
  border-radius:50% / 50%;
  margin:-10px -7px -10px;
  padding:24px 16px 8px;
  border:3px solid #c8962e;
  box-shadow: inset 0 0 0 2px #ffffff24, inset 0 14px 36px #0009, inset 0 -12px 28px #0007,
              0 0 0 5px #6d4f26, 0 0 0 6px #2a1c0e, 0 14px 28px #000a;
  position:relative; z-index:1;
}
.mz-root.in-game .mz-table::after{ /* felt sheen so the oval reads as a surface, not a box */
  content:''; position:absolute; inset:6px 8px; border-radius:50% / 50%; pointer-events:none;
  background:radial-gradient(ellipse at 50% 26%, #ffffff1c 0%, #ffffff08 38%, transparent 66%);
  z-index:0;
}
.mz-root.in-game .mz-table > *{ position:relative; z-index:1; }
.mz-root.in-game .mz-opps{ flex:1 1 0; min-height:0; position:relative; z-index:3; margin-bottom:-8px; }
/* seats ride the top arc: outer seats dip toward the table edge */
.mz-root.in-game .mz-opps.n2 .mz-panel:first-child,
.mz-root.in-game .mz-opps.n3 .mz-panel:first-child{ transform:translateY(4px); }
.mz-root.in-game .mz-opps.n3 .mz-panel:last-child{ transform:translateY(4px); }
.mz-root.in-game .mz-opps .mz-panel{ box-shadow:0 6px 14px #0008; }
.mz-root.in-game .mz-turnbar{ position:relative; z-index:4; }
/* market cards get room to breathe on the felt */
.mz-root.in-game .mz-table .mz-card{ width:clamp(46px, calc(8.4 * var(--vh)), 64px); height:calc(clamp(46px, calc(8.4 * var(--vh)), 64px) * 1.44); }
.mz-root.in-game .mz-table small{ margin-top:1px; }
@media (orientation: landscape) and (min-width: 640px){
  .mz-root.in-game .mz-table{ margin-top:-6px; border-radius:50% / 50%; padding:10px 18px 8px; }
  .mz-root.in-game .mz-table .mz-card{ width:clamp(52px, calc(10 * var(--vh)), 78px); height:calc(clamp(52px, calc(10 * var(--vh)), 78px) * 1.44); }
}

/* ================= scale pass: totals in their own badge, weights in the pan, difference badge ================= */
.mz-scale .mz-sumbg{ fill:#0d0826e6; stroke:#e9c87099; stroke-width:1.2; }
.mz-scale .mz-sum{ stroke:none; paint-order:normal; }
.mz-scale .mz-diff rect{ fill:#0d0826e6; stroke:#e9c87099; stroke-width:1.2; }
.mz-scale .mz-diff text{ font-size:15px; font-weight:800; fill:#ffe9a8; }
.mz-scale .mz-diff path{ fill:#ffe9a8; }
.mz-root.in-game .mz-opps .mz-scale .mz-sum{ font-size:22px; }
.mz-root.in-game .mz-panel.me .mz-scale .mz-sum{ font-size:30px; }
.mz-scale.big .mz-diff text{ font-size:15px; }
/* the hand-count chip sits in the name row now */
.mz-name .mz-badge.hand{ position:static; margin-inline-start:4px; font-size:9px; padding:0 4px; vertical-align:middle; }
.mz-root.in-game .mz-opps .mz-name .mz-badge.hand{ font-size:9px; }
.mz-root.in-game .mz-opps .mz-name{ display:flex; align-items:center; gap:3px; min-width:0; }
.mz-root.in-game .mz-opps .mz-name > *{ flex:0 0 auto; }
/* معروف label: top corner of the card, clear of the card name */
.mz-eye{ top:3px; bottom:auto; inset-inline-start:3px; font-size:8px; padding:0 4px; }

/* ================= table scene pass: landscape is the main view =================
   One big oval table. Opponents sit around it (left / top / right), each with the scale on the
   table in front and the cards fanned behind. My seat is at the bottom with my hand under it. */
.mz-backs{ display:none; }
@media (orientation: landscape) {
  .mz-root.in-game .mz-game.scene.scene{
    position:relative; direction:ltr; display:grid; gap:3px 6px; height:100%;
    --rT:clamp(66px,19.5dvh,104px); --rM:clamp(84px,27dvh,136px); --rH:clamp(60px,19dvh,120px);
    grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr);
    grid-template-rows:auto auto var(--rT) minmax(0,1fr) var(--rM) var(--rH);
    grid-template-areas:"top top top" "ban ban ban" "L T R" "L C R" "me me me" "hand hand hand";
  }
  .mz-root.in-game .mz-game.scene.scene > *{ direction:rtl; min-width:0; min-height:0; }
  .mz-root.in-game .mz-game.scene.scene .mz-top{ grid-area:top; }
  .mz-root.in-game .mz-game.scene.scene .mz-banner{ grid-area:ban; }
  .mz-root.in-game .mz-game.scene.scene .mz-opps{ display:contents; }
  /* the oval */
  .mz-root.in-game .mz-game.scene.scene .mz-table{
    grid-row:3 / 6; grid-column:1 / -1; z-index:0; margin:0 14px; padding:0;
    display:grid; grid-template-rows:subgrid; grid-template-columns:1fr auto auto 1fr; column-gap:12px; align-items:center;
    border-radius:50% / 50%; flex:none; max-height:none;
    border:3px solid #c8962e;
    box-shadow: inset 0 0 0 2px #ffffff24, inset 0 14px 40px #000a, inset 0 -12px 30px #0008, 0 0 0 5px #6d4f26, 0 0 0 6px #2a1c0e, 0 14px 28px #000a;
  }
  .mz-root.in-game .mz-game.scene.scene .mz-table::after{ content:''; position:absolute; inset:5px 10px; border-radius:50% / 50%; pointer-events:none;
    background:radial-gradient(ellipse at 50% 30%, #ffffff1c 0%, #ffffff08 40%, transparent 68%); }
  .mz-root.in-game .mz-game.scene.scene .mz-deck{ grid-row:2; grid-column:2; z-index:1; }
  .mz-root.in-game .mz-game.scene.scene .mz-market{ grid-row:2; grid-column:3; z-index:1; flex-wrap:nowrap; gap:5px; align-items:flex-start; position:relative; }
  .mz-root.in-game .mz-game.scene.scene .mz-market small{ position:absolute; left:0; right:0; bottom:-12px; width:auto; }
  .mz-root.in-game .mz-game.scene.scene .mz-table .mz-card{ width:clamp(38px,12.4dvh,66px); height:calc(clamp(38px,12.4dvh,66px) * 1.44); }
  .mz-root.in-game .mz-game.scene.scene .mz-table .mz-card .mz-num{ font-size:clamp(18px,6.4dvh,32px); }
  .mz-root.in-game .mz-game.scene.scene .mz-deck small{ font-size:9px; }

  /* seats */
  .mz-root.in-game .mz-game.scene.scene .seat{ z-index:2; position:relative; direction:ltr; display:grid; padding:3px 5px; margin:0; overflow:visible; min-height:0;
    box-shadow:0 6px 14px #000a; transform:none; }
  .mz-root.in-game .mz-game.scene.scene .seat > *{ direction:rtl; }
  .mz-root.in-game .mz-game.scene.scene .seat .mz-ph{ display:flex; flex-direction:column; align-items:stretch; gap:1px; grid-row:auto; grid-column:auto; }
  .mz-root.in-game .mz-game.scene.scene .seat .mz-name{ display:flex; align-items:center; gap:3px; font-size:11px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mz-root.in-game .mz-game.scene.scene .seat .mz-name > *{ flex:0 0 auto; }
  .mz-root.in-game .mz-game.scene.scene .seat .mz-stats{ display:flex; gap:6px; justify-content:flex-start; align-items:center; font-size:10px; }
  .mz-root.in-game .mz-game.scene.scene .seat .mz-stat em{ display:none; }
  .mz-root.in-game .mz-game.scene.scene .seat .mz-badges{ position:static; display:flex; flex-wrap:wrap; gap:2px; margin:0; padding:0; grid-row:auto; grid-column:auto; }
  .mz-root.in-game .mz-game.scene.scene .seat .mz-badges:empty{ display:none; }
  .mz-root.in-game .mz-game.scene.scene .seat .mz-scale{ grid-row:auto; grid-column:auto; width:100%; height:100%; max-height:none; margin:0; align-self:center; justify-self:center; flex:none; }
  .mz-root.in-game .mz-game.scene.scene .seat .mz-scale .mz-sum{ font-size:20px; }
  .mz-root.in-game .mz-game.scene.scene .seat .mz-ghostbox{ grid-row:auto; grid-column:auto; }
  .mz-root.in-game .mz-game.scene.scene .seat .mz-knownrow{ position:absolute; bottom:2px; inset-inline-start:3px; grid-row:auto; grid-column:auto; }
  /* cards behind the seat, fanned */
  .mz-root.in-game .mz-game.scene.scene .mz-backs{ display:flex; position:absolute; z-index:0; pointer-events:none; }
  .mz-root.in-game .mz-game.scene.scene .mz-backs i{ display:block; width:12px; height:17px; border-radius:2px; border:1px solid #1a0f4a;
    background:linear-gradient(135deg,#6a4cd8,#2a1a7a); box-shadow:0 1px 2px #000a; flex:0 0 auto; }
  /* top seat: backs along the top edge, name+stats left, scale right */
  .mz-root.in-game .mz-game.scene.scene .seat-T{ grid-area:T; justify-self:center; width:min(100%,380px); align-self:stretch;
    grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); column-gap:6px; padding-top:10px; }
  .mz-root.in-game .mz-game.scene.scene .seat-T .mz-backs{ top:-2px; left:50%; transform:translateX(-50%); flex-direction:row; }
  .mz-root.in-game .mz-game.scene.scene .seat-T .mz-backs i{ margin-inline:-3px; transform:rotate(calc((var(--i) - (var(--n) - 1) / 2) * 5deg)); transform-origin:50% 140%; }
  .mz-root.in-game .mz-game.scene.scene .seat-T .mz-ph{ grid-column:1; grid-row:1; align-self:center; }
  .mz-root.in-game .mz-game.scene.scene .seat-T .mz-badges{ grid-column:1; grid-row:2; }
  .mz-root.in-game .mz-game.scene.scene .seat-T .mz-scale, .mz-root.in-game .mz-game.scene.scene .seat-T .mz-ghostbox{ grid-column:2; grid-row:1 / span 2; }
  /* side seats: backs on the outer edge, name+stats, scale below */
  .mz-root.in-game .mz-game.scene.scene .seat-L, .mz-root.in-game .mz-game.scene.scene .seat-R{ grid-row:3 / 5; align-self:center; max-height:100%;
    grid-template-rows:auto minmax(0,1fr); row-gap:2px; padding-inline:4px; }
  .mz-root.in-game .mz-game.scene.scene .seat-L{ grid-column:1; padding-left:22px; margin-left:2px; }
  .mz-root.in-game .mz-game.scene.scene .seat-R{ grid-column:3; padding-right:22px; margin-right:2px; }
  .mz-root.in-game .mz-game.scene.scene .seat-L .mz-backs{ left:3px; top:50%; transform:translateY(-50%); flex-direction:column; }
  .mz-root.in-game .mz-game.scene.scene .seat-R .mz-backs{ right:3px; top:50%; transform:translateY(-50%); flex-direction:column; }
  .mz-root.in-game .mz-game.scene.scene .seat-L .mz-backs i, .mz-root.in-game .mz-game.scene.scene .seat-R .mz-backs i{ width:17px; height:12px; margin-block:-3px; }
  .mz-root.in-game .mz-game.scene.scene .seat-L .mz-backs i{ transform:rotate(calc((var(--i) - (var(--n) - 1) / 2) * 5deg)); transform-origin:130% 50%; }
  .mz-root.in-game .mz-game.scene.scene .seat-R .mz-backs i{ transform:rotate(calc((var(--i) - (var(--n) - 1) / 2) * -5deg)); transform-origin:-30% 50%; }
  .mz-root.in-game .mz-game.scene.scene .seat-L .mz-ph, .mz-root.in-game .mz-game.scene.scene .seat-R .mz-ph{ grid-row:1; }
  .mz-root.in-game .mz-game.scene.scene .seat-L .mz-badges, .mz-root.in-game .mz-game.scene.scene .seat-R .mz-badges{ display:none; }
  .mz-root.in-game .mz-game.scene.scene .seat-L .mz-scale, .mz-root.in-game .mz-game.scene.scene .seat-R .mz-scale{ grid-row:2; }

  /* me: scale on the table in front of me, hand fanned below */
  .mz-root.in-game .mz-game.scene.scene .mz-panel.me{ grid-row:5; grid-column:2; z-index:2; display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:6px;
    padding:3px 6px; align-items:center; min-height:0; box-shadow:0 6px 14px #000a; }
  .mz-root.in-game .mz-game.scene.scene .mz-panel.me .mz-ph{ grid-column:1; grid-row:1; display:flex; flex-direction:column; gap:2px; align-self:center; }
  .mz-root.in-game .mz-game.scene.scene .mz-panel.me .mz-name{ font-size:12px; display:flex; align-items:center; gap:3px; white-space:nowrap; }
  .mz-root.in-game .mz-game.scene.scene .mz-panel.me .mz-stats{ display:flex; gap:6px; align-items:center; font-size:10.5px; }
  .mz-root.in-game .mz-game.scene.scene .mz-panel.me .mz-stat em{ display:none; }
  .mz-root.in-game .mz-game.scene.scene .mz-panel.me .mz-badges{ grid-column:1; grid-row:2; position:static; display:flex; flex-wrap:wrap; gap:2px; }
  .mz-root.in-game .mz-game.scene.scene .mz-panel.me .mz-badges:empty{ display:none; }
  .mz-root.in-game .mz-game.scene.scene .mz-panel.me .mz-scale{ grid-column:2; grid-row:1 / span 2; height:100%; width:100%; max-width:none; margin:0; justify-self:center; align-self:center; flex:none; }
  .mz-root.in-game .mz-game.scene.scene .mz-panel.me .mz-scale .mz-sum{ font-size:23px; }
  .mz-root.in-game .mz-game.scene.scene .mz-turnbar{ grid-row:5; grid-column:3; align-self:end; justify-self:end; z-index:3; max-width:100%; padding:3px 8px; font-size:12px; }
  .mz-root.in-game .mz-game.scene.scene .mz-turnbar.mine{ font-size:13px; }
  .mz-root.in-game .mz-game.scene.scene .mz-hintline{ display:none; }
  .mz-root.in-game .mz-game.scene.scene .mz-bottom{ grid-row:6; grid-column:1 / -1; min-height:0; z-index:2; }
  .mz-root.in-game .mz-game.scene.scene .mz-hand{ height:100%; padding:0 2px; overflow:visible; display:flex; flex-direction:column; justify-content:flex-end; background:none; border:0; }
  .mz-root.in-game .mz-game.scene.scene .mz-handlabel{ display:none; }
  .mz-root.in-game .mz-game.scene.scene .mz-fan{ height:100%; }
  .mz-root.in-game .mz-game.scene.scene .mz-sheet{ position:absolute; z-index:30; left:50%; transform:translateX(-50%); bottom:calc(var(--rH) + 6px); width:min(94%,560px); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .mz-root.in-game .mz-game.scene.scene .mz-banner{ display:none; }
  .mz-root.in-game .mz-game.scene.scene .mz-top{ padding:0 4px; }
}

/* portrait: the game is made for landscape, ask for a turn */
@media (orientation: portrait) and (max-width: 820px) {
  .mz-root.in-game::after{ content:'أدِر هاتفك إلى الوضع الأفقي لتلعب\A (اللعبة مصمَّمة للعرض العرضي)'; white-space:pre-line; text-align:center;
    position:fixed; inset:0; z-index:200; display:flex; align-items:center; justify-content:center; padding:24px;
    background:radial-gradient(circle at 50% 40%,#2a1a6aee,#0a0626f6); color:#ffe9a8; font-size:20px; font-weight:800; line-height:2; }
}

/* scene pass 2: full width in landscape, bigger side-seat scales */
@media (orientation: landscape) {
  .mz-root.in-game{ max-width:none; margin:0; padding:3px 8px calc(3px + env(safe-area-inset-bottom)); background-size:cover; }
  .mz-root.in-game.in-game .mz-game.scene.scene{ grid-template-columns:minmax(0,.9fr) minmax(0,1.45fr) minmax(0,.9fr); }
  .mz-root.in-game.in-game .mz-game.scene.scene .seat-L, .mz-root.in-game.in-game .mz-game.scene.scene .seat-R{ align-self:stretch; max-height:none; margin-block:2px; }
  .mz-root.in-game.in-game .mz-game.scene.scene .seat-L .mz-scale, .mz-root.in-game.in-game .mz-game.scene.scene .seat-R .mz-scale{ width:100%; height:100%; }
}

/* scene pass 3: scales fill their seat, seats let the felt show through */
@media (orientation: landscape) {
  .mz-root.in-game.in-game .mz-game.scene.scene .seat-L, .mz-root.in-game.in-game .mz-game.scene.scene .seat-R{ grid-template-columns:minmax(0,1fr); }
  .mz-root.in-game.in-game .mz-game.scene.scene .seat .mz-scale{ justify-self:stretch; width:100%; height:100%; }
  .mz-root.in-game.in-game .mz-game.scene.scene .seat{ background:linear-gradient(180deg,#1b1442cc,#0f0a2ccc); backdrop-filter:blur(1px); }
  .mz-root.in-game.in-game .mz-game.scene.scene .seat.turn{ background:linear-gradient(180deg,#2b2370e0,#1a1252e0); }
}

/* scene pass 4: action sheet lives in the empty corner, never over my scale */
@media (orientation: landscape) {
  .mz-root.in-game.in-game .mz-game.scene.scene .mz-sheet{ left:8px; transform:none; width:min(258px,29vw); bottom:calc(var(--rH) + 8px); min-height:auto; height:auto; overflow:visible; }
  .mz-root.in-game.in-game .mz-game.scene.scene .mz-sheet > *{ min-height:auto; }
  .mz-root.in-game.in-game .mz-game.scene.scene .mz-sheet .mz-nums{ grid-template-columns:repeat(5,minmax(0,1fr)); }
  .mz-root.in-game.in-game .mz-game.scene.scene .mz-sheet .mz-nums button{ min-height:26px; font-size:13px; }
}

/* scene pass 5: visible felt, centred deck+market, lighter seats, bigger backs */
@media (orientation: landscape) {
  .mz-root.in-game.in-game .mz-game.scene.scene .mz-table{
    background:radial-gradient(ellipse at 50% 42%, #2f8f63 0%, #1f6e4c 45%, #134a35 80%, #0e3828 100%);
  }
  .mz-root.in-game.in-game .mz-game.scene.scene .mz-table::after{ background:radial-gradient(ellipse at 50% 28%, #ffffff30 0%, #ffffff0c 42%, transparent 70%); }
  .mz-root.in-game.in-game .mz-game.scene.scene .mz-deck, .mz-root.in-game.in-game .mz-game.scene.scene .mz-market{ align-self:center; margin-top:0; }
  .mz-root.in-game.in-game .mz-game.scene.scene .seat{ background:linear-gradient(180deg,#1b1442a8,#0f0a2ca8); }
  .mz-root.in-game.in-game .mz-game.scene.scene .seat.turn{ background:linear-gradient(180deg,#2b2370cc,#1a1252cc); }
  .mz-root.in-game.in-game .mz-game.scene.scene .mz-backs i{ width:16px; height:23px; }
  .mz-root.in-game.in-game .mz-game.scene.scene .seat-L .mz-backs i, .mz-root.in-game.in-game .mz-game.scene.scene .seat-R .mz-backs i{ width:23px; height:16px; }
}

/* scene pass 6 (Muse review, adopted parts): readable deck count, wood rim, hand lifted off the bottom edge, avatars */
@media (orientation: landscape) {
  .mz-root.in-game.in-game .mz-game.scene.scene .mz-deck .deckbtn > span{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); background:#fff3d6; color:#14102e; font-weight:800; font-size:14px; padding:1px 8px; border-radius:10px; box-shadow:0 2px 0 #0006; opacity:1; }
  .mz-root.in-game.in-game .mz-game.scene.scene .mz-table{ border:4px solid #d9a93f; box-shadow: inset 0 0 0 2px #ffffff24, inset 0 14px 40px #000a, inset 0 -12px 30px #0008, 0 0 0 7px #7a4a21, 0 0 0 9px #2a1c0e, 0 14px 28px #000b; }
  .mz-root.in-game.in-game .mz-game.scene.scene .mz-bottom{ padding-bottom:6px; }
  .mz-root.in-game.in-game .mz-game.scene.scene .seat .mz-av, .mz-root.in-game.in-game .mz-game.scene.scene .seat .mz-avatar{ width:30px; height:30px; font-size:16px; }
}

/* scene pass 7: scale-to-fit stage. The scene is laid out at a fixed 390px height (width follows the screen)
   and scaled by the real viewport height, so short phone viewports (browser bars shown) get the same layout. */
:root{ --vh:1vh; --k:1; --sw:844; }
@media (orientation: landscape) {
  .mz-root.in-game.in-game{ position:fixed; inset:0; padding:0; overflow:hidden; height:auto; }
  .mz-root.in-game.in-game .mz-game.scene.scene{ --vh:var(--vhu,3.6px); position:absolute; left:0; top:0; width:calc(var(--sw) * 1px); height:var(--sh,360px); max-height:none;
    transform:scale(var(--k)); transform-origin:0 0; padding:3px 8px; box-sizing:border-box; }
}
@media (orientation: landscape) { .mz-root.in-game.in-game .mz-game.scene.scene .mz-deck small{ display:none; } }
/* action sheet sits in the free bottom-left corner, under the left seat, beside the hand */
@media (orientation: landscape) { .mz-root.in-game.in-game .mz-game.scene.scene .mz-sheet{ bottom:6px; } }

/* dialogs in short landscape: never taller than the screen; the winner card goes two-column */
@media (orientation: landscape) and (max-height: 520px) {
  .mz-dlg{ width:min(560px,94vw); max-width:94vw; max-height:96vh; }
  .mz-dlg .mz-cov{ max-height:94vh; overflow:auto; padding:12px 16px; gap:6px; }
  .mz-dlg .mz-cov.win{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); grid-template-areas:"c f" "h f" "p f" "g f"; column-gap:16px; align-items:center; justify-items:center; }
  .mz-dlg .mz-cov.win .crown{ grid-area:c; width:34px; height:34px; }
  .mz-dlg .mz-cov.win h2{ grid-area:h; font-size:20px; }
  .mz-dlg .mz-cov.win p{ grid-area:p; font-size:13px; }
  .mz-dlg .mz-cov.win .mz-final{ grid-area:f; width:100%; display:flex; flex-direction:column; gap:4px; }
  .mz-dlg .mz-cov.win .mz-final > div{ padding:4px 10px; min-height:0; font-size:13px; }
  .mz-dlg .mz-cov.win .mz-go{ grid-area:g; width:100%; min-height:38px; font-size:15px; padding:6px 10px; }
}

/* setup menu in short landscape: logo and start on the left, options in two columns on the right */
@media (orientation: landscape) and (max-height: 520px) {
  .mz-setup{ display:grid !important; grid-template-columns:200px minmax(0,1fr) minmax(0,1fr); column-gap:14px; row-gap:6px; align-items:start; max-width:none !important; width:100%; padding:8px 14px !important; }
  .mz-setup .mz-logo{ grid-column:1; grid-row:1 / span 4; position:sticky; top:6px; display:flex; flex-direction:column; align-items:center; gap:2px; }
  .mz-setup .mz-logoimg{ width:84px !important; height:84px !important; }
  .mz-setup .mz-logo h1{ font-size:34px; margin:0; } .mz-setup .mz-logo p{ font-size:12px; margin:0; }
  .mz-setup .mz-sect:nth-of-type(2){ grid-column:2 / 4; }
  .mz-setup .mz-sect:nth-of-type(3){ grid-column:2; }
  .mz-setup .mz-sect:nth-of-type(4){ grid-column:3; }
  .mz-setup .mz-sect:nth-of-type(5){ grid-column:2 / 4; }
  .mz-setup .mz-seg button{ white-space:nowrap; font-size:13px; }
  .mz-setup .mz-themes{ height:auto; } .mz-setup .mz-th{ height:70px; min-height:0; }
  .mz-setup .mz-seg button{ min-height:36px; height:36px; padding:0 6px; }
  .mz-setup .mz-sect h3{ margin:0 0 4px; font-size:14px; }
  .mz-setup .mz-go{ grid-column:1; grid-row:5; position:sticky; bottom:6px; }
  .mz-setup .mz-link{ grid-column:1; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .mz-setup .mz-th{ height:auto !important; min-height:92px; padding:6px 4px; }
  .mz-setup .mz-sect{ margin:0 0 6px !important; }
}

.mz-gonetoast{ position:fixed; top:8px; left:50%; transform:translateX(-50%); z-index:120; background:#2b2370; color:#ffe9a8; border:2px solid var(--gold,#e8b84b); border-radius:14px; padding:6px 16px; font-weight:800; font-size:14px; box-shadow:0 8px 20px #000a; max-width:92vw; text-align:center; }
/* turn bar sits right beside my panel, not in the far corner */
@media (orientation: landscape) { .mz-root.in-game.in-game .mz-game.scene.scene .mz-turnbar{ justify-self:start; align-self:center; margin-left:8px; } }
