#waiting{display:grid;place-items:center;padding:12px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left));overflow:auto;background:radial-gradient(ellipse at 20% 20%,#1a578457,transparent 60%),radial-gradient(ellipse at 85% 85%,#4b34675c,transparent 55%),#0b1830}
#waiting .waiting-card{width:min(980px,100%);max-height:100%;padding:clamp(12px,2.1vw,24px);border:1px solid #8bd8f54d;border-radius:24px;background:linear-gradient(125deg,#1b3553f5,#12263ff5);box-shadow:0 16px 50px #020b2240;text-align:start;overflow:auto}
.matchmaking-header{display:flex;align-items:center;justify-content:space-between;gap:18px}.matchmaking-heading{min-width:0}.matchmaking-heading .eyebrow{color:#8be8fa;font-size:10px;letter-spacing:1.5px}.matchmaking-heading h2{font-size:clamp(20px,3vw,34px);line-height:1.18!important;margin:5px 0!important}.matchmaking-heading p{margin:5px 0 0!important;color:#afcce5;font-size:12px!important}
.matchmaking-timer{flex:none;min-width:110px;padding:9px 14px;text-align:center;background:#0d223b;border:1px solid #54bdd94a;border-radius:16px}.matchmaking-timer small{display:block;color:#a8c6db;font-size:10px}.matchmaking-timer .queue-clock{font-variant-numeric:tabular-nums;direction:ltr;color:#ffe2a2;letter-spacing:2px;font-size:clamp(20px,3vw,30px)!important;margin:3px 0!important;line-height:1.1}
.matchmaking-progress{height:4px;border-radius:4px;background:#071d32;overflow:hidden;margin:14px 0}.matchmaking-progress::before{content:'';display:block;height:100%;width:calc(var(--queue-progress,0)*100%);background:linear-gradient(90deg,#29cbe4,#ffd078);transition:width .5s linear}
.matchmaking-progress.is-preparing::before{width:35%;animation:queue-preparing 1.6s ease-in-out infinite alternate}@keyframes queue-preparing{to{transform:translateX(185%)}}
#playerSlots.matchmaking-roster{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(6px,1.4vw,14px);margin:0 0 12px;text-align:center}
.match-seat{min-width:0;border:1px solid #6585a843;border-radius:16px;background:linear-gradient(180deg,#12304b,#0e2139);padding:7px 7px 9px;display:flex;align-items:center;flex-direction:column;position:relative;overflow:hidden;min-height:150px}.match-seat.is-you{border-color:#ffd183;box-shadow:inset 0 0 18px #ffd18312}.match-seat.is-filled::before{content:'';position:absolute;inset:0 0 auto;height:2px;background:var(--seat-accent,#6bdff4)}.match-seat.is-empty{border-style:dashed;background:#11263d7a;justify-content:center;color:#84a7c4}
.match-seat-avatar{display:block;width:min(100%,150px);height:clamp(72px,17vh,130px);object-fit:contain}.match-seat-name{display:block;max-width:100%;font-size:clamp(11px,1.5vw,16px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:850;line-height:1.4}.match-seat-prestige{display:block;max-width:100%;font-size:9px;color:#9dc2de;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:2px 0 5px}
#playerSlots .match-seat-status{display:block;width:auto;height:auto;border:0;border-radius:8px;background:#1d4d604d;font-size:9px;line-height:1.3;padding:4px 7px;color:#91e2d1;aspect-ratio:auto}.match-seat-search{display:grid;place-items:center;width:44px;height:44px;border:1px solid #91bddd3d;border-radius:50%;font-size:27px;margin:8px 0 12px;color:#729cb8}.is-empty .match-seat-status{background:none!important;color:#7ea3c0!important}
.matchmaking-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:2px}.matchmaking-bottom p{color:#a5c2d9;font-size:11px!important;line-height:1.6;margin:0!important;max-width:620px}.matchmaking-actions{display:flex;align-items:center;gap:8px;flex:none}.matchmaking-actions button{min-height:42px;min-width:95px;margin:0!important;padding:8px 14px;font-size:12px}.matchmaking-actions .text-button{border:1px solid #597b9855;border-radius:12px;background:#193a57;color:#c3e5f7}
#waiting #inviteBox{margin:8px 0;padding:8px 12px;display:flex;align-items:center;justify-content:center;gap:12px;background:#193a57;border-radius:12px;font-size:11px}#waiting #inviteCode{direction:ltr;letter-spacing:3px;color:#ffe2a2;font-size:18px}#waiting #shareCode{min-height:40px;padding:7px 15px;border:1px solid #559bbb77;border-radius:10px;background:#245471}
@media(max-height:420px) and (orientation:landscape){#waiting{padding-top:8px;padding-bottom:8px}#waiting .waiting-card{padding:10px 15px;border-radius:18px}.matchmaking-heading h2{font-size:23px}.matchmaking-heading .eyebrow{font-size:8px}.matchmaking-heading p{font-size:10px!important}.matchmaking-timer{padding:6px 12px;min-width:90px}.matchmaking-progress{margin:9px 0}#playerSlots.matchmaking-roster{margin-bottom:7px}.match-seat{min-height:117px;padding:4px 5px 5px;border-radius:12px}.match-seat-avatar{height:66px}.match-seat-name{font-size:11px}.match-seat-prestige{font-size:8px;margin:1px 0 3px}.matchmaking-bottom p{font-size:10px!important}.matchmaking-actions button{min-height:38px;font-size:11px}#waiting #inviteBox{margin:6px 0;padding:4px 10px}}
@media(max-height:300px) and (orientation:landscape){.matchmaking-heading .eyebrow{display:none}.matchmaking-heading h2{font-size:20px}.matchmaking-progress{margin:6px 0}.match-seat{min-height:96px}.match-seat-avatar{height:49px}.matchmaking-bottom{gap:8px}.matchmaking-bottom p{line-height:1.35}.matchmaking-timer small{display:none}}
@media(max-width:550px) and (orientation:portrait){#waiting .waiting-card{padding:15px;border-radius:20px}.matchmaking-header{gap:10px}.matchmaking-timer{min-width:85px;padding:8px}#playerSlots.matchmaking-roster{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.match-seat{min-height:130px}.match-seat:last-child{grid-column:1 / -1;max-width:calc(50% - 5px);width:100%;justify-self:center}.match-seat-avatar{height:84px}.matchmaking-bottom{align-items:stretch;flex-direction:column;gap:10px}.matchmaking-actions{justify-content:flex-end}}
@media(prefers-reduced-motion:reduce){.matchmaking-progress::before{transition:none;animation:none!important}}
/* The scoped heading rule appears after the older global RTL reset. */
[dir=rtl] .matchmaking-heading .eyebrow{letter-spacing:0}
