/* One continuous playing surface. Artwork, not panels, carries the visual weight. */
body.table-active{background:#07151e}
.table-active .site-header{background:#091923;border-bottom:1px solid #8dabaf22;height:60px;min-height:60px;color:#f5ecd9}
.table-active .site-header .brand,.table-active .site-header nav a{color:#d7e4e8}
.table-active .members-tab{background:#16313f;color:#b8d6db}
.table-active #play-view{inset:60px 0 0;background:radial-gradient(ellipse at 42% 45%,#244b59 0,#102b39 44%,#07151e 85%)}
.table-active #match-table{padding:0 22px 10px;background:none;grid-template-rows:48px minmax(0,1fr) 18px}
.table-active .table-layout{position:relative;grid-template-columns:minmax(0,1fr) clamp(230px,21vw,370px);gap:24px}
.table-main{grid-column:1;grid-row:1;grid-template-rows:minmax(0,1fr) clamp(105px,18vh,245px);gap:8px}
.table-active .table-rail{grid-column:2;grid-row:1;gap:12px;padding-left:16px;border-left:1px solid #afc9ce20}
.table-active .table-sidebar{display:none;position:absolute;left:0;top:0;width:min(340px,80vw);height:75%;z-index:30;background:#0b202ef5;border:1px solid #66899666;border-radius:12px;padding:14px;box-shadow:0 12px 35px #0009}
.table-active .journal-open .table-sidebar{display:flex}
.table-active .table-sidebar .opponent-cards{display:none}
.table-active .table-communication{flex:1;max-height:none;border:0;background:none}
.table-active .table-communication.collapsed{flex:1}
.table-active .table-topbar{justify-content:flex-start}
.table-active .table-topbar h2{flex:1;color:#d9e5e8!important;font-family:inherit!important;font-size:14px!important;letter-spacing:0}
.table-active .table-mode{display:none}
.table-active .table-topbar .table-journal-toggle{font-size:12px;color:#a3c2ca;background:none;border:0;padding:6px 10px}
.table-active .table-topbar>div{gap:5px}.table-active #match-table .table-topbar .button{border:0;background:none;color:#9cb8c4;padding:5px!important;font-size:12px}
.table-active .table-board{padding:0;gap:0;border:0;border-radius:20px;background:linear-gradient(180deg,#233b40dd,#163c4ddd);box-shadow:0 12px 40px #0003;overflow:visible;grid-template-rows:minmax(0,1fr) 38px minmax(0,1fr)}
.table-active .table-player.own,.table-active .auto-player.opponent{position:relative;background:none;border:0;border-radius:0;padding:12px 20px!important;gap:6px}
.table-active .table-player.own{background:linear-gradient(0deg,#357c9322,transparent)}
.table-active .auto-player .table-player-heading{min-height:26px;flex-basis:26px;border:0}
.table-active .table-player-heading strong{font-size:clamp(12px,.85vw,20px)!important;letter-spacing:0;color:#d2e5e7}
.table-active .table-player-heading>span{color:#86aab5;font-size:12px!important}
.table-active .auto-public,.table-active .opponent .auto-public{grid-template-columns:minmax(0,1fr) minmax(75px,.7fr) minmax(0,1fr) clamp(45px,5.4vw,125px);grid-template-rows:minmax(0,1.18fr) minmax(0,1fr);gap:10px 18px;padding:0}
.table-active .auto-player.own .auto-characters{grid-row:1}
.table-active .auto-player.opponent .auto-characters{grid-row:2}
.table-active .auto-player.own .auto-leader,.table-active .auto-player.own .auto-stage,.table-active .auto-player.own .auto-don{grid-row:2}
.table-active .auto-player.opponent .auto-leader,.table-active .auto-player.opponent .auto-stage,.table-active .auto-player.opponent .auto-don{grid-row:1}
.table-active .auto-leader{grid-column:2;justify-self:center;min-height:0;max-height:100%;width:100%}
.table-active .auto-leader .table-card{max-width:100%;height:100%}
.table-active .auto-player .auto-stage{grid-column:3;justify-self:center;height:80%;opacity:.95}
.table-active .auto-characters{grid-column:1/4;justify-content:center;padding:5px 12px;gap:clamp(12px,2vw,44px);background:none!important;border:0!important;box-shadow:none}
.table-active .auto-characters .table-slot{border:1px dashed #a0c1ca24;background:none;box-shadow:none;border-radius:8px}
.table-active .table-slot:after{content:''}
.table-active .auto-don{grid-column:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:6px;padding:0;border:0;background:none!important;box-shadow:none;max-width:100%;min-width:0}
.table-active .auto-don>span{font-size:12px;line-height:1.2;color:#bdd2d5}
.table-active .auto-don>span strong{font-size:clamp(20px,1.6vw,34px);font-weight:650;color:#f8e5b0}
.table-active .auto-don small{display:inline;margin-left:12px;color:#89a6b0;font-size:12px}
.table-active .auto-don>div{flex:0 1 auto;max-height:62%;height:clamp(28px,5.4vw,95px);align-items:center;width:100%;padding:0}
.table-active #match-table .auto-don .don-card{height:100%;width:auto;aspect-ratio:63/88;max-height:95px;max-width:none;margin-right:clamp(-42px,-2vw,-12px);box-shadow:2px 3px 4px #0005}
.table-active #match-table .auto-don .don-card:last-child{margin-right:0}
.table-active .auto-player .auto-piles{--pile-height:clamp(30px,calc((82dvh - 295px)/6),125px);padding-left:12px;border:0;gap:6px}
.table-active .auto-piles img{filter:drop-shadow(2px 4px 2px #0006)}
.table-active .auto-piles strong{font-size:clamp(10px,.7vw,16px);font-weight:550;color:#bcd4dc;letter-spacing:0}
.table-active .opponent-hand{display:flex;position:absolute;top:8px;left:38%;height:26px;max-width:30%;padding:0;justify-content:center;pointer-events:none}
.table-active .opponent-hand img{height:26px;width:19px;object-fit:cover;margin-left:-7px}
.table-active .table-turn-line{background:#071b2877;border:0;border-top:1px solid #87bfcc22;border-bottom:1px solid #87bfcc22;padding:0 20px;gap:10px}
.table-active .table-turn-indicator{font-family:inherit;font-size:clamp(12px,.8vw,18px);letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;color:#d7e6e9}
.table-active .turn-dot{width:5px;height:5px;box-shadow:none;background:#91dacd}
.table-active .turn-number{font-size:12px}
.table-active .table-main>.table-hand{border:0;border-radius:0;background:none;padding:6px 20px 10px;overflow:visible}
.table-active .table-main .table-hand-heading{color:#8dabba;font-size:12px;letter-spacing:0}
.table-active .table-main .table-hand-cards{gap:clamp(7px,1.2vw,25px);padding-top:5px}
.table-active .table-card{border:0;background:transparent;box-shadow:0 5px 9px #0005;border-radius:7px;transition:transform 160ms ease-out,opacity 160ms;isolation:isolate;overflow:visible}
.table-active .table-card img{border-radius:6px;transition:transform 220ms ease-out;will-change:auto}
.table-active .table-card b{position:absolute;bottom:0;left:0;right:0;border:0;border-radius:0 0 6px 6px;background:#071f2be6;backdrop-filter:none;padding:4px 2px;color:#f7edca;font-weight:700;font-size:clamp(12px,.85vw,20px)!important}
.table-active .table-card.rested{background:none}
.table-active .table-card.legal{box-shadow:0 0 0 1px #84d4c155,0 5px 9px #0006}
.table-active .table-card.selected{outline:2px solid #f1c980;outline-offset:3px;box-shadow:none}
.table-active .table-card:hover,.table-active .table-card:focus-visible{transform:translateY(-5px) scale(1.08);z-index:9;box-shadow:0 10px 18px #0008}
.table-active .table-card.action-source:not(.selected){outline:1px solid #f1cf8277;outline-offset:2px}
.table-active .table-detail{background:none;border:0;border-radius:0;box-shadow:none;padding:0;gap:6px;flex:1 1 0}
.table-active .table-art-button{max-height:none;flex:1 1 0}
.table-active .table-art-button img{max-height:100%;object-fit:contain;filter:drop-shadow(0 8px 14px #0005)}
.table-active .table-detail>h3,.table-active .table-detail .table-stats{display:none}
.table-active .table-detail #table-text{border:0;color:#91b6c1;font-size:12px!important}
.table-active #table-actions,.table-active .auto-prompt{background:none;border:0;border-radius:0;box-shadow:none;padding:8px 0}
.table-active .auto-prompt{border-top:1px solid #9fc4cd22}
.table-active .auto-prompt h3{font-family:inherit;font-size:14px;color:#d1e4e7;font-weight:600}
.table-active .table-card-actions select{background:#133443;border:1px solid #658e9e55;border-radius:6px;color:#d4e5e9}
.table-active #match-table .confirm-card-action,.table-active #match-table .auto-prompt>.button,.table-active #match-table .turn-controls>.button{background:#edcd91!important;color:#173342!important;border:0!important;border-radius:6px;box-shadow:none!important;min-height:40px}
.effect-pulse{position:absolute;inset:-4px;border:2px solid #f0d6a0;border-radius:9px;pointer-events:none;z-index:9;box-shadow:0 0 12px #f0d6a066}
.table-motion-ghost{contain:layout style;will-change:transform,opacity}
.combat-result-cue{position:fixed;z-index:120;pointer-events:none;transform:translate(-50%,-50%);padding:9px 17px;border-radius:5px;background:#092838ed;border:1px solid #f0d6a0;color:#ffdf9d;font:800 clamp(16px,1.5vw,32px)/1.2 system-ui;white-space:nowrap;box-shadow:0 8px 20px #0005}
.table-active #match-table .opponent .auto-public{grid-template-rows:minmax(0,1fr) minmax(0,1.18fr)}
.table-active #match-table .opponent .auto-stage{grid-column:3;justify-self:center}
.table-active #match-table .auto-piles{display:grid;grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));align-items:center;justify-items:center;gap:3px;height:100%;min-height:0;--pile-height:clamp(24px,calc((82dvh - 340px)/6),117px)}
.table-active #match-table .auto-piles>div,.table-active #match-table .auto-piles>button{min-height:0;max-height:100%}
.table-active #match-table .auto-leader{display:flex;align-items:center;justify-content:center}
.table-active #match-table .table-main .table-hand-cards .table-card b{display:contents;background:none;border:0;pointer-events:none}
.hand-cost,.hand-counter{position:absolute;font-size:clamp(10px,.65vw,16px);font-weight:750;padding:3px 5px;border-radius:4px;white-space:nowrap;box-shadow:0 2px 5px #0008;line-height:1.2}
.hand-cost{top:3px;left:3px;background:#123b51ed;color:#f6e8c5;border:1px solid #afd1d966}
.hand-counter{bottom:3px;right:3px;background:#0c3b30ed;color:#aff5ca;border:1px solid #72caa666}
.table-active .table-card.rested img{transform:rotate(90deg) scale(.86)}
.table-active .site-header .beta-label,.table-active .site-header .brand-beta{color:#d7e4e8}
.table-active #platform-account-button{background:#163442;color:#d8e6e9;border:1px solid #426170}
.table-active .cardpathisch-beta{color:#111;background:#cddbd8;border-radius:3px;padding:1px 4px;font-size:10px}
@media(max-height:850px){.table-active .site-header{height:52px;min-height:52px}.table-active #play-view{inset:52px 0 0}.table-active #match-table{grid-template-rows:36px minmax(0,1fr) 16px;padding:0 12px 6px}.table-active .table-board{grid-template-rows:minmax(0,1fr) 28px minmax(0,1fr)}.table-active .table-player.own,.table-active .auto-player.opponent{padding:5px 10px!important;gap:3px}.table-active .auto-player .table-player-heading{flex-basis:18px;min-height:18px}.table-active .auto-public,.table-active .opponent .auto-public{gap:5px 10px}.table-active .opponent-hand{top:4px;height:17px}.table-active .opponent-hand img{height:17px;width:13px}.table-active .auto-don>span strong{font-size:20px}.table-active .auto-don small{font-size:10px;margin-left:6px}.table-active .auto-characters{padding:2px 8px}.table-active .table-main>.table-hand{padding:3px 10px 5px}.table-active .auto-prompt,.table-active #table-actions{padding:4px 0}.table-active .table-rail{gap:8px}.table-active #match-table .button{min-height:32px!important}.table-active .table-topbar h2{font-size:12px!important}}
@media(max-width:1100px){.table-active .table-layout{grid-template-columns:minmax(0,1fr) 205px;gap:12px}.table-active .table-rail{padding-left:10px}.table-active .auto-don small{display:block;margin:0}.table-active .auto-public,.table-active .opponent .auto-public{grid-template-columns:minmax(0,1fr) minmax(50px,.8fr) minmax(0,.7fr) 45px}.table-active .auto-don>span{font-size:10px}.table-active .auto-characters{gap:12px}.table-active .table-player-heading>span{font-size:10px!important}}
@media(max-width:650px){.table-active .table-layout{grid-template-columns:minmax(0,1fr) 135px;gap:6px}.table-active #match-table{padding:0 5px 5px}.table-active .table-rail{padding-left:5px}.table-active .table-topbar .table-journal-toggle{font-size:10px;padding:3px}.table-active .table-topbar h2{font-size:10px!important}.table-active .table-topbar>div>#table-help{display:none}.table-active .auto-public,.table-active .opponent .auto-public{grid-template-columns:minmax(0,1fr) 48px minmax(0,.5fr) 30px;gap:4px}.table-active .auto-characters{gap:5px;padding:2px}.table-active .auto-don small{display:none}.table-active .auto-piles strong{font-size:8px}.table-active .auto-player .auto-piles{--pile-height:25px;padding-left:0}.table-active .table-turn-line{padding:0 5px}.table-active .table-turn-indicator{font-size:10px}.table-active .table-player-heading>span{display:none}.table-active .table-card b{font-size:9px!important}.table-active #match-table .auto-don .don-card{margin-right:-16px}.table-active .auto-don>div{max-height:36px}.table-active .table-main .table-hand-cards{gap:3px}.table-active .auto-prompt h3{font-size:12px}}
@media(prefers-reduced-motion:reduce){.table-active .table-card,.table-active .table-card img{transition:none}.table-active .table-card:hover{transform:none}}
/* Action availability uses a quiet edge; selection and targets remain stronger. */
.table-active #match-table .table-card.can-play{outline:2px solid #91d6b488;outline-offset:2px}
.table-active #match-table .table-card.can-attack{box-shadow:0 0 0 2px #eac58299,0 6px 16px #0004}
.table-active #match-table .table-card.can-react{outline:2px solid #8bcceccc;outline-offset:2px}
.table-active #match-table .table-card.can-effect:not(.selected)::after{content:'ϟ';position:absolute;top:4px;right:5px;background:#223c48;color:#f4d699;border-radius:50%;width:22px;height:22px;text-align:center;font-weight:800}
.table-active #match-table .table-card.attack-target{outline:3px solid #91e5d0!important;outline-offset:3px}
.table-active #match-table .table-card.attack-chosen{outline-color:#ffcb78!important}
.table-active #match-table .auto-prompt.has-card-action .button{background:transparent!important;color:#c1d4d9!important;border:1px solid #58727b!important;min-height:28px!important;font-size:12px}
.table-connection{position:absolute;left:50%;top:48px;transform:translateX(-50%);z-index:180;max-width:90%;padding:12px 18px;background:#172d39;color:#ffdf9d;border:1px solid #d6b271;border-radius:8px;box-shadow:0 6px 18px #0006;text-align:center}
.table-connection[hidden]{display:none}
.table-connection a{margin-left:14px;color:#fff;text-decoration:underline}
.connection-lost .table-card-actions,.connection-lost .auto-prompt{opacity:.55;pointer-events:none}
