.arena-heading{display:grid;grid-template-columns:minmax(90px,1fr) auto minmax(90px,1fr);align-items:center;gap:12px}
.arena-heading h1{grid-column:2;grid-row:1}
.arena-session{grid-column:3;grid-row:1;justify-self:end;display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 15px;border:1px solid #c69ee8;border-radius:8px;background:linear-gradient(#643184,#35164e);color:#faeaff;font:600 14px/1.2 var(--title);text-decoration:none}
.arena-session:hover{filter:brightness(1.15)}
.hero{padding:6px 0 10px}.hero h1{font-size:clamp(32px,4.1vw,56px)}
.table-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;min-height:44px;gap:12px}
.table-toolbar>#new-game{justify-self:start;grid-column:1;grid-row:1;position:relative;z-index:5;min-height:44px;padding:10px 14px;font-size:13px}
.table-toolbar>.table-reference{grid-column:2;grid-row:1;display:flex;justify-content:center;align-items:center}
.table-toolbar .catalogue-shortcut{min-height:44px;max-width:240px;padding:10px 14px;font-size:13px;line-height:1.2}
.table-toolbar .arena-rules-button{grid-column:3;grid-row:1;justify-self:end;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;border:1px solid #bb8de3;border-radius:8px;background:linear-gradient(#643184,#35164e);color:#faeaff;font:600 13px/1.2 var(--title);white-space:nowrap}
.central-pot{height:138px;margin:0;gap:0}.central-pot .cauldron{width:132px;height:132px;margin:0 auto}.central-pot .pot-value>#pot-xp{font-size:30px}
.central-pot+.confrontation{display:grid;grid-template-columns:minmax(0,1fr) 106px minmax(0,1fr);gap:8px;margin:0 auto;padding:0}
.confrontation>#play-button{grid-column:2;grid-row:1;align-self:center;justify-self:center;min-width:0;width:100%;min-height:46px;margin:0;padding:9px 7px;font-size:12px;line-height:1.25;white-space:normal}
.table-panel .turn-status{min-height:28px;margin:5px auto;font-size:13px;line-height:1.3}
body[data-scoring="tricks"] .turn-hint{display:none}
.table-panel .opponent-offer{margin:5px auto;padding:7px 12px}.table-panel .opponent-offer p{font-size:11px;margin-bottom:6px}.table-panel .opponent-offer button{min-height:34px;padding:6px 12px}
.card-stage.winner{animation:arena-winner-shake .45s ease-out}
@keyframes arena-winner-shake{0%,100%{transform:translateX(0) rotate(0)}20%{transform:translateX(-3px) rotate(-1.2deg)}40%{transform:translateX(3px) rotate(1.2deg)}60%{transform:translateX(-2px) rotate(-.7deg)}80%{transform:translateX(1px) rotate(.4deg)}}
@media(min-width:851px){.hero h1{font-size:clamp(32px,6svh,56px)}.table-panel{padding:10px 14px 12px}.card-stage,button.card-stage{height:clamp(130px,calc(100svh - 620px),265px);width:auto;max-width:100%;aspect-ratio:822/1122}.game-footer{margin-top:9px;gap:12px;font-size:9px}.central-pot{height:clamp(124px,19svh,170px);padding-top:16px}.central-pot+.confrontation{margin-top:8px}.central-pot .cauldron{width:clamp(94px,15svh,132px);height:clamp(94px,15svh,132px)}.panel.player-panel{padding:18px 14px}.player-panel .deck-pile{width:clamp(78px,12svh,112px);margin-bottom:6px}.player-panel .deck-caption{margin:4px 0 10px;font-size:11px}.player-panel>.player-identity{margin-bottom:8px}.player-panel .score-tile{padding:8px 0}.player-panel .xp-history-title{margin:8px 0 3px}.player-panel .xp-history{margin-top:4px}}
@media(prefers-reduced-motion:reduce){.card-stage.winner{animation:none}}

.player-panel>#raise-button{grid-column:1/-1;width:100%;min-height:36px;margin:7px 0 0;padding:7px 10px;font-size:11px;border-color:#f7c46a;background:linear-gradient(#fff0ba,#f2bd50 52%,#d28b28);color:#311809;box-shadow:inset 0 1px #fff6d0,0 2px 8px #e2973229;text-shadow:0 1px #fff5cb66}

/* The tricks mode needs no equipment placeholders. Special-card effects remain in play. */
body[data-scoring="tricks"] .equipment{display:none}

/* Both opponents keep their portrait to the left of their name. */
.player-panel>.player-identity{display:flex;flex-direction:row;grid-template-columns:none;grid-template-rows:none;align-items:center;justify-content:flex-start;gap:10px;height:auto;min-height:88px;text-align:left}
.player-panel>.player-identity h2{flex:1;min-width:0;text-align:left}
.player-panel>.player-identity>.avatar-button,.player-panel>.player-identity>.master-portrait{width:64px;height:78px;max-width:64px;flex-shrink:0}
.player-panel>.player-identity>.master-portrait{height:64px}

/* Tablets keep the table full-width, with both player summaries underneath.
   Wide touch tablets retain this layout after rotating to landscape. */
@media (min-width:601px) and (max-width:1180px),(min-width:601px) and (pointer:coarse){
 .arena-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:stretch}
 .table-panel{grid-column:1/-1;grid-row:1;padding:16px 20px 18px;min-width:0}
 .player-panel[data-controller="human"]{grid-column:1;grid-row:2}
 .opponent-panel{grid-column:2;grid-row:2}
 .panel.player-panel{display:grid;grid-template-columns:66px minmax(0,1fr);grid-template-rows:72px 48px 42px 32px 24px auto;gap:0 12px;align-content:start;margin:0;padding:16px;min-width:0;min-height:0;text-align:left}
 .player-panel>.eyebrow,.player-panel>.panel-ornament,.player-panel>.deck-caption{display:none}
 .player-panel>.player-identity{grid-column:1/-1;grid-row:1;height:72px;min-height:72px;margin:0;gap:10px;justify-content:flex-start}
 .player-panel>.player-identity>.avatar-button,.player-panel>.player-identity>.master-portrait{width:56px;height:68px;max-width:56px}
 .player-panel>.player-identity>.master-portrait{height:56px}
 .player-panel>.player-identity h2,.opponent-panel .player-identity h2{font-size:18px;line-height:1.2;text-align:left;margin:0}
 .player-panel .deck-pile{grid-column:1;grid-row:2/5;width:62px;height:auto;margin:6px auto 0;align-self:center}
 .player-panel .deck-count{min-width:28px;height:28px;font-size:12px;right:-7px;bottom:-3px}
 .player-panel .score-tile{grid-column:2;grid-row:2;display:flex;flex-wrap:nowrap;align-items:baseline;justify-content:space-between;gap:8px;padding:5px 0;min-width:0}
 .player-panel .score-tile>span{width:auto;font-size:12px;line-height:1.2}
 body[data-scoring="tricks"] .player-panel .score-tile strong,.player-panel .score-tile strong{font-size:38px;line-height:1}
 .player-panel>#raise-button{grid-column:2;grid-row:3;width:100%;min-height:38px;margin:2px 0;padding:7px 9px;font-size:11px}
 .player-panel>.wallet-line{grid-column:2;grid-row:4;display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;padding:5px 0;margin:0;border:0;background:transparent;font-size:11px}
 .player-panel>.wallet-line strong{font-size:12px;white-space:nowrap}
 .player-panel>.xp-history-title{grid-column:1/-1;grid-row:5;margin:6px 0 2px;font-size:12px;line-height:1.2}
 .player-panel>.xp-history{grid-column:1/-1;grid-row:6;display:flex;justify-content:space-between;gap:8px;padding:0;margin:0}
 .player-panel .xp-history p{display:flex;gap:5px;margin:3px 0;font-size:10px;line-height:1.3}
 .player-panel .xp-history strong{font-size:12px}
 .central-pot{height:148px;padding-top:12px}
 .central-pot .cauldron{width:132px;height:132px;margin:0 auto}
 .central-pot+.confrontation{max-width:840px;grid-template-columns:minmax(0,1fr) 106px minmax(0,1fr);gap:12px;margin:8px auto 0}
 .card-stage,button.card-stage{height:clamp(190px,30svh,320px);width:auto;max-width:100%;aspect-ratio:822/1122}
}

/* Portrait phones: the confrontation and both player summaries share one view.
   Keep natural scrolling for long dialogs, hands and unusually short screens. */
@media(max-width:600px) and (orientation:portrait){
 main{padding:4px 8px max(4px,env(safe-area-inset-bottom));min-height:100svh}
 .hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 5px;padding:2px 0 6px}
 .arena-heading{display:contents}.arena-heading h1{grid-column:1/-1;grid-row:1}
 .hero .mode-chip{grid-column:1;grid-row:2;justify-self:center}.arena-session{grid-column:2;grid-row:2;min-height:25px;padding:4px 6px;font-size:10px}
 .hero h1{font-size:clamp(23px,7vw,30px);gap:6px;line-height:1.12;letter-spacing:-.7px}
 .arena-halloween-home{width:30px;height:30px;padding:2px}
 .arena-halloween-home svg{width:25px;height:25px}
 .mode-chip{font-size:9px;line-height:1.2;min-height:24px;padding:4px 9px;gap:7px}
 .mode-chip b{font-size:9px}.mode-chip span{font-size:8px;padding-left:7px}
 .arena-layout{--fit-card-height:clamp(98px,calc(100svh - 600px),180px);grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;align-items:stretch}
 .table-panel{grid-column:1/-1;grid-row:1;padding:8px 10px 7px;overflow:visible}
 .table-panel:after,.panel:after{inset:4px;pointer-events:none}
 .table-toolbar{position:absolute;z-index:6;inset:8px 9px auto;min-height:36px;justify-content:flex-start;gap:5px;pointer-events:none}
 .table-toolbar>*{pointer-events:auto}
 .table-toolbar>#new-game{min-height:36px;font-size:10px;padding:7px 8px}
 .table-toolbar .reserve-chip{position:absolute;top:38px;left:0;max-width:82px;flex-wrap:wrap;font-size:8px}
 .table-toolbar .turn-timer{position:absolute;top:38px;right:0;font-size:10px}
 .central-pot{height:132px;margin:0;padding-top:36px;gap:0}
 .table-toolbar .table-reference .catalogue-shortcut{width:clamp(118px,calc(100vw - 210px),160px);min-height:36px;padding:4px 5px;font-size:9px;line-height:1.1;border-width:1px;border-radius:5px;box-shadow:inset 0 1px #fff8dd}
 .player-panel>#raise-button{grid-column:2;grid-row:3;min-height:32px;margin:3px 0 0;font-size:9px;padding:5px 7px}
 .player-panel[data-controller="human"]>.score-tile{grid-row:2}
 .player-panel[data-controller="human"]>.wallet-line{grid-row:4}
 .player-panel[data-controller="human"]>.xp-history-title{grid-row:5}
 .central-pot .cauldron{width:88px;height:88px;margin:0 auto -4px}
 .central-pot .pot-value>#pot-xp{font-size:23px}
 .central-pot .pot-value>.xpc-help>summary{min-height:20px;min-width:30px;font-size:8px;letter-spacing:.5px}
 .table-toolbar .arena-rules-button{min-height:36px;font-size:10px;padding:7px 9px}
 .central-pot .secondary-action{min-height:32px;font-size:9px;padding:5px 10px;margin:0}
 .central-pot+.confrontation{margin:0 auto;gap:5px;grid-template-columns:minmax(0,1fr) 64px minmax(0,1fr);padding:0}
 .combatant-name{height:28px;min-height:28px;margin:0 0 3px;font-size:10px;line-height:1.15;gap:4px}
 .combatant-name .avatar-mini,.combatant-name .portrait-small{width:23px;height:27px;flex-shrink:0}
 .card-stage,button.card-stage{height:var(--fit-card-height);width:auto;max-width:100%;aspect-ratio:822/1122;margin:0 auto}
 .card-caption{height:23px;min-height:23px;margin:3px -2px 2px;font-size:9px;line-height:1.15}
 .attack-hint{font-size:7px;line-height:1.1;margin-top:1px}
 .confrontation>#play-button{min-height:44px;padding:7px 4px;font-size:9px;line-height:1.2}
 .equipment{gap:3px}
 .equipment-slot,.equipment-slot.active{min-height:22px;padding:2px 0;gap:1px;font-size:7px;line-height:1.1}
 .equipment-slot .slot-icon{font-size:9px}.equipment-slot .slot-card{height:24px;width:18px}
 .turn-status{font-size:11px;line-height:1.2;min-height:26px;margin:4px auto;max-width:100%}
 .table-panel>.main-action{min-height:36px;font-size:11px;min-width:180px;padding:7px 12px}
 .turn-hint{display:none}
 .choice-actions{gap:4px;margin:3px 0}.choice-actions button{min-height:30px;padding:5px;font-size:9px}
 .counter-open{min-height:30px;font-size:10px;margin:3px auto;padding:5px}
 .stake-ribbon{font-size:8px;margin:2px auto;line-height:1.2}
 .player-panel{margin:0;min-height:0;min-width:0;padding:7px 8px 6px;display:grid;grid-template-columns:31px minmax(0,1fr);gap:0 7px;align-content:start;text-align:left}
 .player-panel>.eyebrow,.player-panel>.panel-ornament{display:none}
 .player-reference-slot{height:30px;min-height:30px;margin:0 0 3px;grid-column:1/-1}
 .player-reference-slot .catalogue-shortcut{min-height:30px;padding:4px 5px;font-size:9px;line-height:1.15;border-width:1px;border-radius:5px;box-shadow:inset 0 1px #fff8dd}
 .player-panel>.player-identity{display:flex;flex-direction:row;grid-template-columns:none;grid-template-rows:none;justify-content:flex-start;align-items:center;height:56px;min-height:56px;gap:5px;margin:0 0 3px;grid-column:1/-1;text-align:left}
 .player-panel>.player-identity>.avatar-button,.player-panel>.player-identity>.master-portrait{width:43px;height:52px;max-width:43px}
 .player-panel>.player-identity>.master-portrait{height:43px}
 .player-panel>.player-identity h2,.opponent-panel .player-identity h2{font-size:11px;line-height:1.18;text-align:left;max-width:100%;margin:0;letter-spacing:0}
 .player-panel .deck-pile{width:27px;height:auto;grid-column:1;grid-row:2/5;margin:3px 0 0;align-self:center}
 .deck-count{min-width:19px;height:19px;font-size:9px;right:-5px;bottom:-2px;border-width:1px}
 .score-tile{grid-column:2;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:baseline;gap:3px;padding:2px 0;min-height:22px;border:0}
 .score-tile>span{width:auto;font-size:9px;line-height:1.2}
 body[data-scoring="tricks"] .score-tile strong,.score-tile strong{font-size:23px;line-height:1}
 .score-tile small{font-size:8px}
 .wallet-line{grid-column:2;display:flex;align-items:center;justify-content:space-between;min-height:20px;padding:1px 0;margin:0;gap:3px;border:0;background:transparent;font-size:8px;line-height:1.2}
 .wallet-line strong{font-size:9px;white-space:nowrap}
 .xp-history-title{font-size:9px;line-height:1.1;margin:5px 0 1px;text-align:center}
 .xp-history{display:flex;gap:5px;padding:0;margin:0;justify-content:space-between}
 .xp-history p{display:flex;gap:3px;margin:0;font-size:7px;line-height:1.2}
 .xp-history strong{font-size:9px;line-height:1.1}
 .game-footer{display:none}
 .opponent-offer{padding:6px 8px;margin:4px auto}
 .opponent-offer p{font-size:10px;line-height:1.2;margin:0 0 4px}
 .opponent-offer button{min-height:30px;padding:5px 10px;font-size:9px}
 .arena-layout:has(.opponent-offer:not([hidden])),.arena-layout:has(.dice-rack:not([hidden])){--fit-card-height:clamp(80px,calc(100svh - 665px),150px)}
 .dice-rack{min-height:48px;margin:1px auto;gap:1px}.die-d12{width:34px;height:39px;font-size:18px}.die-d12 small{font-size:7px;bottom:4px}.dice-equation{font-size:9px}
 .arena-layout:has(.choice-actions:not([hidden])),.arena-layout:has(.counter-open:not([hidden])){--fit-card-height:clamp(80px,calc(100svh - 640px),160px)}
}

/* Brief sparks stay on the winning card and never intercept a touch. */
.arena-win-sparks{position:absolute;z-index:4;inset:-10px -12px;overflow:hidden;pointer-events:none;border-radius:12px}
.arena-win-sparks>i{position:absolute;top:-8px;display:block;width:2px;height:7px;border-radius:50%;background:linear-gradient(#fff9d0,#ffd15b 45%,#ff7b15);box-shadow:0 0 4px #ffb53b;opacity:0;animation:arena-spark-fall 1.3s var(--spark-delay) cubic-bezier(.3,.05,.65,.85) both}
.arena-win-sparks>i.spark-white{width:3px;height:4px;background:#fff5ce;box-shadow:0 0 5px #ffe2a1}
@keyframes arena-spark-fall{0%{opacity:0;transform:translate(0,0) rotate(var(--spark-tilt))}12%{opacity:1}70%{opacity:.9}100%{opacity:0;transform:translate(var(--spark-x),var(--spark-fall)) rotate(140deg)}}
@media(prefers-reduced-motion:reduce){.arena-win-sparks{display:none}}
