/* Batch 23: mobile table; desktop score / square table / trick history. */
.match-content{--gold:#d9b565;--ink:#f3ede0;--card-width:66px;color:var(--ink);background:#0b2e24;border:1px solid #8a6b2a;border-radius:16px;overflow:hidden;box-shadow:0 18px 45px #0b2e2418}
.match-content button,.match-content a{min-height:44px;padding:10px 15px;border:1px solid #8a6b2a;border-radius:8px;background:#123e31;color:var(--ink);font:inherit;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.match-content button:disabled{opacity:.45}
.match-content .match-primary{background:var(--gold);color:#17251e;font-weight:600}
.match-content h2{font:500 22px/1.3 Georgia,serif;margin:0 0 16px}
.match-content small{font-size:11px;color:#d3c49e;display:block}
.match-content :focus-visible{outline:3px solid #ffe6a5;outline-offset:3px}
.match-toolbar{display:flex;gap:8px;align-items:center;padding:12px;border-bottom:1px solid #476047}
.match-toolbar a{margin-left:auto}.match-note{font-size:12px;line-height:1.6;color:#d2d3be;margin:10px 0}
.match-connection{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;padding:10px 16px;background:#102b25}
.match-connection[data-match-connection=live]{color:#9fd0b2}
.match-error{padding:12px 16px;margin:0;color:#ffd1b2;background:#532b24}
.match-exit,.match-empty{padding:26px;max-width:720px;margin:auto}.match-exit a{margin:8px}
.match-layout{display:grid;grid-template-columns:minmax(170px,1fr) minmax(350px,2.4fr) minmax(160px,1fr)}
.match-scores,.match-history{padding:24px 16px;min-width:0}.match-scores{border-right:1px solid #496047}.match-history{border-left:1px solid #496047}
.match-scores h2,.match-history h2{font:500 12px/1.5 monospace;letter-spacing:.12em;text-transform:uppercase;color:var(--gold)}
.match-score-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:8px;align-items:center;border-bottom:1px solid #365440;padding:15px 0}
.match-score-row>span:not(.match-avatar){font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.match-score-row>small{grid-column:2/-1;margin-top:-6px}.match-score-row>strong{font:500 20px monospace}
.match-avatar{width:34px;height:34px;position:relative;flex:none;display:block}.match-avatar .base-avatar-art,.match-avatar-default{display:flex;width:100%;height:100%;border-radius:50%;align-items:center;justify-content:center;background:#193e31;color:#ddc791;overflow:hidden;font-size:20px}.match-avatar .base-avatar-art img{display:block;width:100%;height:100%;object-fit:contain}
.match-avatar>.cosmetic-art{position:absolute;inset:-4px;width:auto;height:auto;min-height:0;background:none;border:0;border-radius:0;pointer-events:none;font-size:0}.match-avatar>.cosmetic-art img{display:block;width:100%;height:100%;object-fit:contain}.match-avatar>.cosmetic-art.unavailable{display:none}
.match-contract{margin-top:26px;padding:16px;border:1px solid #76683c;border-radius:8px}.match-contract strong{display:block;margin-top:6px;font-size:14px}
.match-history-row{display:grid;gap:4px;padding:13px 0;border-bottom:1px solid #365440;font-size:12px}.match-history-row>span:first-child{color:#c8bd96;font:11px monospace}.match-history-row>span:last-child{display:flex;justify-content:space-between}.match-suit-H,.match-suit-D{color:#ffb3a0}
.match-main{padding:18px 10px 24px;min-width:0}.match-phase{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:70px;padding:0 8px}.match-phase h2{font:500 17px/1.4 Inter,system-ui,sans-serif;margin:4px 0 0}.match-timer{font:500 14px monospace;white-space:nowrap;color:#f7d584}
.match-board{position:relative;width:100%;max-width:420px;aspect-ratio:1;margin:14px auto 0;background:radial-gradient(ellipse at center,#84623b33,transparent 72%)}
.match-felt{position:absolute;inset:15% 12%;border:10px solid #58412c;border-radius:20px;background:radial-gradient(ellipse at 50% 35%,#1b5b46,#103e30 75%);box-shadow:inset 0 0 0 2px #9d7a3c88,inset 0 10px 35px #0006,0 12px 18px #0004;isolation:isolate}
.match-table-mark{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font:70px Georgia,serif;color:#d4b6720f;z-index:-1}
.match-theme{position:absolute;inset:2px;z-index:-1;overflow:hidden;border-radius:9px;opacity:.45}.match-theme .cosmetic-art,.match-theme img{display:block;width:100%;height:100%;object-fit:cover}.match-theme .cosmetic-art{font-size:0}.match-theme .unavailable{display:none}
.match-seat{position:absolute;width:112px;display:flex;flex-direction:column;align-items:center;z-index:4;gap:5px;text-align:center;border:1px solid #746839;border-radius:12px;padding:8px 6px;background:#0e342a;box-shadow:0 5px 12px #0003}
.match-seat strong{font-size:11px;font-weight:500;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.match-seat small{font-size:10px}.match-seat.is-turn{border-color:#f4d277;box-shadow:0 0 0 2px #d9b56538,0 5px 12px #0003;background:#1b4a36}
.match-seat-top{top:0;left:50%;transform:translateX(-50%)}.match-seat-bottom{bottom:0;left:50%;transform:translateX(-50%)}.match-seat-left{top:50%;left:0;transform:translateY(-50%)}.match-seat-right{top:50%;right:0;transform:translateY(-50%)}
.match-seat-left,.match-seat-right{width:84px}.match-seat-left .match-avatar,.match-seat-right .match-avatar{width:27px;height:27px}
.match-seat-appearance{display:flex;align-items:center;justify-content:center;gap:7px}
.match-card-back{display:block;width:22px;height:31px;flex:none;transform:rotate(7deg);border-radius:3px;background:#163b2d;box-shadow:-2px 1px 0 #d2c29b,0 3px 5px #0005;overflow:hidden}
.match-card-back .cosmetic-art{display:block;width:100%;height:100%;min-height:0;padding:0;border:0;border-radius:0;background:none;font-size:0}
.match-card-back .cosmetic-art img{display:block;width:100%;height:100%;object-fit:contain}
.match-card-back:has(.unavailable){display:none}
@media(max-width:600px){.match-seat-appearance{gap:5px}.match-card-back{width:19px;height:27px}}
.match-turn-halo{position:absolute;inset:-4px;border:2px solid #f6d67d;border-radius:14px;opacity:0;pointer-events:none}.match-timer.is-urgent{padding:4px 7px;border-radius:5px;background:#eedc9c;color:#12382c;white-space:nowrap}
.match-trick{position:absolute;inset:12%;z-index:2}.match-play{position:absolute;width:55px;height:78px;transform:translate(-50%,-50%)}.match-play-top{top:25%;left:50%}.match-play-right{top:50%;left:72%}.match-play-bottom{top:75%;left:50%}.match-play-left{top:50%;left:28%}
.match-play-shadow{position:absolute;inset:0;border-radius:4px;box-shadow:0 4px 8px #0005;pointer-events:none}.match-table-card{position:relative;height:100%;border-radius:4px;background:#f7f1e3;color:#183027;overflow:hidden}.match-table-card img,.match-hand-card img{display:block;width:100%;height:100%;object-fit:fill}.match-card-fallback{display:none}.asset-missing img{display:none}.asset-missing .match-card-fallback{display:block;font-size:12px;padding:5px;white-space:normal}
.match-winner{position:absolute;bottom:-18%;left:0;right:0;text-align:center;font-size:11px;color:#eedc9c;white-space:nowrap}.match-trick.is-complete{opacity:.78}
.match-hand{position:relative;width:100%;height:132px;margin:24px auto 0;max-width:490px;isolation:isolate}
.match-content .match-hand-card{position:absolute;left:calc(var(--card-index) * (100% - var(--card-width)) / max(1, var(--hand-count) - 1));bottom:4px;width:var(--card-width);height:94px;min-height:0;padding:0;border:1px solid #d6c8a0!important;border-radius:5px;background:#f7f1e3;overflow:hidden;box-shadow:0 3px 7px #0005;display:block;transition:bottom 120ms ease}
.match-content .match-hand-card:disabled{opacity:1;cursor:default}.match-hand-card.is-unavailable{filter:brightness(.64)}.match-content .match-hand-card[aria-pressed=true]{bottom:24px;border-color:#eac66e!important;box-shadow:0 0 0 2px #e6bc59,0 5px 10px #0006;z-index:2}
.match-controls{min-height:90px;padding:0 8px}.match-auction,.match-trumps{display:flex;gap:7px;flex-wrap:wrap;justify-content:center}.match-auction button{min-width:45px}.match-trumps button{flex:1 1 40%}.match-play-action{text-align:center}.match-play-action>button{width:100%}
.match-deal-result{padding:16px;border:1px solid #76683c;border-radius:10px}.match-deal-result h2{font-size:19px}.match-deal-result>div{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid #456044;font-size:13px}.match-deal-result>div>span:first-child{flex:1}
@media(min-width:1000px){.match-toolbar [data-match-action=scores]{display:none}}
@media(max-width:999px){.match-layout{grid-template-columns:minmax(0,1fr)}.match-main{width:100%;max-width:560px;margin:auto}.match-scores,.match-history{display:none}.match-content.show-details .match-scores,.match-content.show-details .match-history{display:block;border:0;border-top:1px solid #496047}.match-content.show-details .match-scores{order:2}.match-content.show-details .match-history{order:3}}
@media(max-width:600px){.match-content{--card-width:64px;border-radius:12px}.match-main{padding:10px 6px 20px}.match-toolbar{padding:8px;gap:5px;font-size:11px}.match-toolbar button,.match-toolbar a{padding:8px 10px}.match-connection{padding:8px 10px;font-size:11px;gap:6px}.match-connection button{font-size:11px;padding:6px 10px}.match-phase{min-height:65px}.match-phase h2{font-size:15px}.match-board{margin:8px auto 0}.match-felt{inset:16% 11%;border-width:8px}.match-seat{width:100px;padding:6px 4px;gap:3px}.match-seat-left,.match-seat-right{width:77px}.match-avatar{width:28px;height:28px}.match-seat-left .match-avatar,.match-seat-right .match-avatar{width:24px;height:24px}.match-seat strong{font-size:10px}.match-seat small{font-size:9px}.match-hand{height:116px;margin-top:16px}.match-content .match-hand-card{height:91px}.match-play{width:47px;height:67px}.match-controls{padding:0 5px}.match-play-action .match-note{font-size:11px}.match-empty{padding:20px}}
body.match-active #related{display:none}
.match-trump{display:inline-block;color:#eed496;font-size:12px;margin-top:3px}
.match-hand{width:min(100%,var(--hand-span));min-width:var(--card-width)}
.match-last-score{margin-top:20px;font-size:12px}.match-last-score summary{cursor:pointer;padding:12px 0;color:#eed496}.match-last-score>div{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid #365440}
@media(min-width:1000px){.match-board{max-width:min(400px,max(290px,calc(100dvh - 600px)))}.match-hand{height:112px;margin-top:12px}.match-main{padding-top:12px;padding-bottom:16px}.match-phase{min-height:60px}}
@media(max-width:600px){body.match-active #primary{display:none}body.match-active .app-header{padding:10px 12px}body.match-active .screen-heading{margin-bottom:8px}body.match-active #content{padding-top:6px}.match-connection[data-match-connection=live]{padding-top:5px;padding-bottom:5px}.match-main{padding-top:4px}.match-phase{min-height:52px}.match-hand{height:108px;margin-top:10px}}
@media(max-width:600px) and (max-height:850px){.match-board{max-width:300px}.match-hand{height:108px;margin-top:4px}}
