/* Match screen — reference 07 (941x1672). Landscape variant (.land, 1672x941): bridge left, board right. */
.match { background: var(--frame-dark); }
.match .hud { position: absolute; left: 0; top: 0; width: 941px; height: 129px; display: grid; grid-template-columns: 348px 236px 349px; gap: 4px; background: var(--frame-dark); }
.match .sc { position: relative; display: flex; align-items: center; height: 121px; margin-top: 4px; color: var(--light-text); box-shadow: inset 0 0 0 3px var(--bronze-dark), inset 0 0 0 6px var(--accent), inset 0 0 0 8px var(--bronze-dark); }
.match .sc-you { background: var(--primary); clip-path: polygon(0 0, 100% 0, 100% 100%, 22px 100%, 0 calc(100% - 22px)); }
.match .sc-rival { background: var(--secondary); justify-content: flex-end; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%); }
.match .sc-clock { flex-direction: column; justify-content: center; background: var(--frame-dark); clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%, 0 14px); }
.match .sc-clock.hot .clock { color: #f26a4f; }
.match .ava { width: 150px; height: 112px; object-fit: cover; object-position: 30% 20%; align-self: flex-end; }
.match .sc-rival .ava { width: 116px; }
.match .sc-txt { flex: 1; display: flex; flex-direction: column; align-items: center; }
.match .sc-txt .lbl { font: 900 26px/1.1 var(--f-slab); letter-spacing: .03em; text-transform: uppercase; }
.match .sc-txt .row { display: flex; align-items: center; gap: 10px; }
.match .sc-txt .v { font: 900 66px/1 var(--f-slab); }
.match .clock { font: 900 60px/1 var(--f-slab); }
.match .round { font: 900 22px/1.2 var(--f-slab); letter-spacing: .03em; color: var(--accent); text-transform: uppercase; border-top: 2px solid var(--bronze-dark); padding: 2px 14px 0; margin-top: 6px; }
.match .pause { position: absolute; right: 6px; top: 6px; width: 54px; height: 54px; --c: 8px; z-index: 3; }
.match .pause::before { inset: 4px; } .match .pause::after { inset: 6px; }

.match .strip { position: absolute; left: 174px; top: 133px; width: 594px; height: 88px; background: var(--frame-dark); box-shadow: inset 0 0 0 2px var(--accent); display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 22px; box-sizing: border-box; z-index: 2; }
.match .strip::before, .match .strip::after { content: ''; position: absolute; top: 18px; width: 150px; height: 52px; background: url(../assets/ui/ink_left.webp) center/cover; opacity: 0; }
.match .pl { display: grid; grid-template-columns: 34px 1fr 34px 236px; align-items: center; gap: 10px; color: var(--light-text); }
.match .pl + .pl { border-top: 2px solid var(--bronze-dark); padding-top: 4px; }
.match .pl .ico svg { width: 30px; height: 30px; }
.match .nm { font: 800 27px/1.1 var(--f-slab); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match .fist { color: var(--accent); display: flex; }
.match .bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; height: 23px; }
.match .bars i { --f: 0; background: linear-gradient(90deg, var(--c1) calc(var(--f) * 100%), #8c8178 calc(var(--f) * 100%)); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.match .bars-me i { --c1: var(--primary-bright); } .match .bars-op i { --c1: #d4523f; }

.match .arena { position: absolute; left: 0; top: 222px; width: 941px; height: 552px; overflow: hidden; }
.match canvas.bridge { position: absolute; left: 0; top: 0; display: block; }
.match .gauge { position: absolute; top: 40px; width: 40px; height: 280px; background: var(--cream-alt); box-shadow: inset 0 0 0 3px var(--bronze-dark), 0 3px 6px rgba(0, 0, 0, .3); }
.match .gauge::before { content: ''; position: absolute; left: 17px; top: 14px; bottom: 14px; width: 6px; background: linear-gradient(180deg, var(--secondary) calc((1 - var(--tr, .5)) * 100%), var(--primary) 0); }
.match .gauge i { position: absolute; left: 6px; width: 28px; height: 16px; top: calc(14px + (1 - var(--tr, .5)) * 252px - 8px); background: var(--frame-dark); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); transition: top .3s; }
.match .gauge-l { left: 22px; } .match .gauge-r { right: 22px; }

.match .lanes { position: absolute; left: 100px; right: 100px; bottom: 9px; height: 86px; display: grid; grid-template-columns: 235px 250px 235px; justify-content: space-between; }
.match .lane { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text); background: var(--surface); font: 900 30px/1 var(--f-slab); text-transform: uppercase;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 100%, 0 100%); box-shadow: inset 0 0 0 3px var(--bronze-dark), inset 0 -6px 0 rgba(56, 40, 36, .2); transition: transform .08s; }
.match .lane:active { transform: translateY(3px); }
.match .lane.on { background: var(--primary); color: var(--accent); box-shadow: inset 0 0 0 6px var(--accent), inset 0 0 0 8px var(--bronze-dark); }
.match .lane.on b { color: var(--light-text); }
.match .count { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font: 400 180px/1 var(--f-stamp); color: var(--light-text); -webkit-text-stroke: 6px var(--frame-dark); paint-order: stroke; text-shadow: 0 8px 0 rgba(37, 34, 31, .5); }
.match .count.beat { animation: beat .9s ease-out; }
@keyframes beat { 0% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(.85); opacity: .6; } }

.match .guide { position: absolute; left: 0; top: 774px; width: 941px; height: 69px; background: var(--frame-dark); box-shadow: inset 0 3px 0 var(--bronze-dark), inset 0 -3px 0 var(--bronze-dark); display: flex; align-items: center; color: var(--surface); }
.match .g-txt { flex: 1; text-align: center; padding-inline: 250px; font: 900 34px/1 var(--f-slab); letter-spacing: .015em; text-transform: uppercase; }
.match .next { position: absolute; inset-inline-end: 28px; top: 8px; width: 225px; height: 54px; display: flex; align-items: center; gap: 10px; padding-inline-start: 18px; box-sizing: border-box; color: var(--light-text); box-shadow: inset 0 0 0 3px var(--accent); }
.match .next-l { font: 900 25px/1 var(--f-slab); text-transform: uppercase; }
.match .next-v { font: 900 50px/1 var(--f-slab); }
.match .next-i { position: absolute; inset-inline-end: 4px; bottom: 2px; height: 64px; }

.match .boardwrap { position: absolute; left: 0; top: 843px; width: 941px; height: 657px; background: var(--surface) url(../assets/ui/paper_bg.webp) center/cover; }
.match .ink { position: absolute; top: 0; height: 100%; width: 96px; object-fit: cover; opacity: .9; }
.match .ink-l { left: 0; } .match .ink-r { right: 0; }
.match .board { position: absolute; left: 96px; top: 0; width: 751px; height: 645px; box-sizing: border-box; padding: 20px 26px; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 5px;
  background: var(--frame-dark); box-shadow: inset 0 0 0 4px var(--accent), inset 0 0 0 9px var(--bronze-dark), inset 0 0 0 16px #3a2d22, 0 6px 10px rgba(0, 0, 0, .35); touch-action: none; }
.match .board::before, .match .board::after { content: ''; position: absolute; width: 26px; height: 26px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 30%, 30% 30%, 30% 100%, 0 100%); }
.match .board::before { left: 2px; top: 2px; } .match .board::after { right: 2px; bottom: 2px; transform: rotate(180deg); }
.match .cell { position: relative; background: #e3c497 url(../assets/ui/paper_bg.webp) center/400% 400%; box-shadow: inset 0 0 0 2px rgba(91, 57, 40, .45); }
.match .cell svg { position: absolute; right: 10px; bottom: 8px; }
.match .tiles { position: absolute; left: 26px; top: 20px; right: 26px; bottom: 20px; pointer-events: none; }
.match .tile { position: absolute; left: 0; top: 0; width: 25%; height: 25%; transition: transform .11s ease-out; will-change: transform; }
.match .tile > img { position: absolute; left: 4%; top: 3%; width: 92%; height: 76%; object-fit: contain; object-position: 50% 0; filter: drop-shadow(0 3px 2px rgba(37, 34, 31, .35)); }
.match .tile .plq { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); min-width: 44%; padding: 1px 8px; box-sizing: border-box; text-align: center; font: 900 40px/1 var(--f-sans); letter-spacing: -.025em; color: var(--text);
  background: #f3dfb8; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px); box-shadow: inset 0 0 0 2px var(--bronze-dark); }
.match .tile[data-t="4"] .plq, .match .tile[data-t="5"] .plq { background: #f1bf8c; }
.match .tile[data-t="6"] .plq, .match .tile[data-t="7"] .plq, .match .tile[data-t="8"] .plq { background: var(--accent); color: var(--secondary); }
.match .tile.sel::after { content: ''; position: absolute; inset: -3px; box-shadow: inset 0 0 0 5px var(--accent), inset 0 0 0 7px var(--frame-dark); animation: selp 1.1s ease-in-out infinite; }
@keyframes selp { 50% { box-shadow: inset 0 0 0 7px #f6d48f, inset 0 0 0 9px var(--frame-dark); } }
.match .tile.pop { animation: pop .18s ease-out; }
.match .tile.merge > img, .match .tile.merge .plq { animation: mrg .26s ease-out; }
.match .tile.die { opacity: 0; transition: opacity .12s, transform .11s; }
@keyframes pop { from { scale: .2; } to { scale: 1; } }
@keyframes mrg { 40% { scale: 1.22; } 100% { scale: 1; } }
.match .burst { position: absolute; width: 25%; height: 25%; object-fit: contain; animation: burst .5s ease-out forwards; pointer-events: none; }
@keyframes burst { from { opacity: 1; scale: .5; } to { opacity: 0; scale: 1.5; } }
.match .hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font: 800 26px var(--f-sans); color: var(--secondary); opacity: 0; transition: opacity .2s; white-space: nowrap; pointer-events: none; }
.match .hint.on { opacity: 1; }

.match .actions { position: absolute; left: 0; top: 1500px; width: 941px; height: 172px; background: var(--frame-dark); box-shadow: inset 0 3px 0 var(--accent); }
.match .actions .btn { position: absolute; top: 30px; height: 120px; }
.match .act-undo { left: 15px; width: 177px; flex-direction: column; gap: 0; }
.match .act-undo .lab { font-size: 28px; }
.match .act-undo .badge { position: absolute; right: 18px; top: 16px; font: 900 22px var(--f-sans); color: var(--accent); }
.match .act-deploy { left: 207px; width: 446px; gap: 16px; }
.match .act-deploy .dep-i { height: 96px; margin-top: -6px; }
.match .act-deploy .sep { width: 3px; height: 70px; background: var(--accent); opacity: .7; }
.match .act-deploy .lab { font-size: 48px; }
.match .act-deploy .dep-v { font: 900 70px/1 var(--f-slab); min-width: 1.2em; }
.match .act-deploy .cd { position: absolute; left: 16px; right: 16px; bottom: 14px; height: 6px; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.match .act-rush { left: 669px; width: 257px; gap: 8px; color: var(--light-text); }
.match .act-rush > svg { color: var(--accent); }
.match .act-rush .col { display: flex; flex-direction: column; align-items: center; }
.match .act-rush .lab { font-size: 40px; }
.match .act-rush .rt { display: flex; align-items: center; gap: 6px; font: 900 27px var(--f-slab); text-transform: none; }
.match .act-rush.ready > svg { animation: spin 3s linear infinite; }
.match .act-rush.active { --face: #b8361f; }
@keyframes spin { to { rotate: 360deg; } }

.match .toast.small { font-size: 30px; top: 17%; padding: 10px 24px; }
.match .toast.good { background: var(--primary); }
.match .toast.bad { background: var(--secondary); }
.match .toast.go { font: 400 96px/1 var(--f-stamp); top: 24%; background: var(--secondary); }

/* ---------- landscape ---------- */
.match.land .hud { width: 940px; height: 110px; grid-template-columns: 350px 230px 352px; }
.match.land .sc { height: 102px; }
.match.land .ava { height: 96px; width: 130px; }
.match.land .sc-txt .v { font-size: 56px; } .match.land .clock { font-size: 52px; }
.match.land .strip { left: 172px; top: 112px; height: 78px; }
.match.land .arena { top: 190px; width: 940px; height: 751px; }
.match.land .lanes { bottom: 10px; }
.match.land .gauge { top: 60px; height: 340px; }
.match.land .gauge i { top: calc(14px + (1 - var(--tr, .5)) * 312px - 8px); }
.match.land .guide { left: 944px; top: 0; width: 728px; height: 84px; }
.match.land .g-txt { font-size: 30px; padding-inline-end: 230px; }
.match.land .next { top: 14px; }
.match.land .boardwrap { left: 944px; top: 84px; width: 728px; height: 700px; }
.match.land .ink { width: 40px; }
.match.land .board { left: 40px; top: 12px; width: 648px; height: 676px; padding: 18px 22px; }
.match.land .tiles { left: 22px; right: 22px; top: 18px; bottom: 18px; }
.match.land .tile .plq { font-size: 36px; }
.match.land .actions { left: 944px; top: 784px; width: 728px; height: 157px; }
.match.land .actions .btn { top: 20px; height: 118px; }
.match.land .act-undo { left: 12px; width: 150px; }
.match.land .act-deploy { left: 170px; width: 338px; }
.match.land .act-deploy .dep-i { height: 80px; } .match.land .act-deploy .lab { font-size: 38px; } .match.land .act-deploy .dep-v { font-size: 58px; }
.match.land .act-rush { left: 516px; width: 200px; } .match.land .act-rush > svg { width: 52px; } .match.land .act-rush .lab { font-size: 32px; }

/* queued match toasts: fixed lane over the far bridge, never over the board strip */
.match .mtoast { position: absolute; left: 50%; top: 118px; transform: translateX(-50%); z-index: 6; pointer-events: none; padding: 12px 30px; font: 900 34px/1 var(--f-slab); color: var(--light-text); text-transform: uppercase; white-space: nowrap; background: var(--frame-dark); box-shadow: 0 0 0 3px var(--accent), var(--shadow); animation: mtoast .95s ease-out forwards; }
.match .mtoast.good { background: var(--primary); } .match .mtoast.bad { background: var(--secondary); }
.match .mtoast.go { top: 170px; font: 400 96px/1 var(--f-stamp); padding: 14px 44px; background: var(--secondary); animation-duration: 1.1s; }
.match.land .mtoast { top: 150px; }
@keyframes mtoast { 0% { opacity: 0; transform: translate(-50%, -12px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.04); } 25% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -16px); } }
/* reserve slot (left of the guide strip, mirrors NEXT) */
.match .reserve { position: absolute; inset-inline-start: 28px; top: 8px; width: 225px; height: 54px; display: flex; align-items: center; gap: 8px; padding: 0 12px; box-sizing: border-box; color: var(--light-text); box-shadow: inset 0 0 0 3px var(--accent); background: var(--primary-dark); }
.match .reserve.locked { background: var(--frame-dark); color: var(--surface); box-shadow: inset 0 0 0 3px var(--border); }
.match .reserve.locked::after { content: ''; position: absolute; inset-inline-end: 8px; top: 8px; width: 12px; height: 12px; background: var(--secondary); transform: rotate(45deg); box-shadow: 0 0 0 2px var(--accent); }
.match .reserve.full { background: var(--primary); animation: selp 1.1s ease-in-out infinite; }
.match .rs-ic { display: flex; color: var(--accent); }
.match .rs-l { font: 900 22px/1 var(--f-slab); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.match .rs-i { height: 62px; margin-top: -10px; }
.match .rs-v { font: 900 34px/1 var(--f-slab); }
.match.land .reserve { width: 180px; inset-inline-start: 16px; top: 15px; }
.match.land .next { width: 190px; inset-inline-end: 16px; }
.match.land .g-txt { font-size: 24px; padding-inline: 200px; }
.match.land .rs-l { max-width: 90px; font-size: 19px; }

/* ---- reserve unlock sheet (rewarded ad or gems) ---- */
.modal.reservem .sheet { width: 760px; text-align: center; padding: 44px 46px 40px; }
.modal.reservem h2 { font: 400 58px/1.05 var(--f-stamp); color: var(--secondary); margin: 0 0 14px; }
.modal.reservem .rdesc { font: 700 32px/1.3 var(--f-body); color: var(--text); margin: 0 0 28px; }
.modal.reservem .rrow { display: flex; gap: 22px; justify-content: center; }
.modal.reservem .rrow .btn { flex: 1; height: 112px; font-size: 34px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 14px; }
.modal.reservem .rrow .btn img { height: 54px; }
.modal.reservem .rrow .btn:disabled { filter: grayscale(.8) brightness(.8); }
.modal.reservem .rerr { min-height: 40px; font: 700 28px var(--f-body); color: #b3261e; margin: 14px 0 6px; }
.modal.reservem .cl { height: 84px; width: 340px; font-size: 32px; margin: 0 auto; }

/* Cup duel: round label in the clock plate turns gold */
.match .sc-clock .round.cup { color: var(--gold); letter-spacing: .03em; }
