/* Table, seat and background images are the original Demon Cards assets. */
body.at-table{background:#05080c url('../assets/table/bg.jpg') center/cover fixed no-repeat;overflow:hidden}
body.at-table:before,body.at-table:after{display:none}
.at-table .topbar{height:48px;background:#080b0e80;border:0;padding:0 22px}
.at-table .brand img{display:none}.at-table .brand span{font-size:12px;letter-spacing:3px}.at-table .brand small{display:none}.at-table .topbar nav{gap:20px}.at-table .topbar nav button{font-size:10px}.at-table .header-tools{gap:16px}
.wood-game.game-view{position:relative;width:100%;max-width:none;height:calc(100svh - 48px);min-height:540px;padding:0;margin:0;isolation:isolate}
.wood-game .table-topline{position:absolute;top:8px;left:18px;right:18px;z-index:15;justify-content:space-between;font-size:9px;letter-spacing:1px;color:#999b96}
.wood-game .table-topline button{font:12px 'Segoe UI',sans-serif;background:#15130ed9;color:#d4cbb9;padding:12px 14px;margin:0;border-radius:3px}
.wood-game .table-topline>span{position:absolute;left:50%;transform:translateX(-50%);font-size:8px;top:6px;pointer-events:none}
.wood-game .table-topline>div{display:flex;gap:8px}
.table-status{position:absolute;top:55px;left:30%;width:40%;text-align:center;color:#aaa99f;font-size:12px;font-weight:700;letter-spacing:1px;z-index:5}
.table-status.my-turn{color:#69d98d;text-shadow:0 0 12px #36d16450}.table-status.under-attack{color:#ed636c;text-shadow:0 0 12px #e9444a50}.turn-clock{display:block;font-size:10px;line-height:1.8;color:#b9b4a2;font-weight:400}
.wood-board{position:absolute;left:50%;top:19%;bottom:1%;transform:translateX(-50%);width:min(79vw,170svh);background:url('../assets/table/table_board.png') center/100% 100% no-repeat;container-type:inline-size}
.wood-seat{position:absolute;left:var(--x);top:var(--y);width:9.4%;aspect-ratio:1;transform:translate(-50%,-50%);z-index:8;pointer-events:none}
.seat-avatar{display:block;width:100%;height:100%;position:relative;border-radius:50%;padding:9%;background:url('../assets/table/seat_wood_alt.png') center/100% 100% no-repeat;border:0;pointer-events:auto}
.seat-avatar .avatar{border:0;padding:0;width:100%;height:100%;border-radius:50%;object-fit:cover;background:none;box-shadow:inset 0 0 5px #000}
.wood-seat.active .seat-avatar{filter:drop-shadow(0 0 7px #c0af6c55)}.wood-seat.active .seat-name{color:#dfd6b6}.wood-seat.empty .seat-avatar{opacity:.88}
.seat-name{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);white-space:nowrap;font-size:clamp(8px,.8vw,12px);color:#9e9c93;text-shadow:0 2px 4px #000}
.seat-count{position:absolute;top:45%;left:calc(100% + 9px);width:24%;aspect-ratio:2/3;display:grid;place-items:center;background:#0b0b0cdb;border-radius:3px;transform:rotate(-9deg);font-size:1.8cqw;color:#bab7af}
.wood-seat[data-slot="3"] .seat-count,.wood-seat[data-slot="4"] .seat-count,.wood-seat[data-slot="5"] .seat-count{left:auto;right:calc(100% + 9px);transform:rotate(9deg)}
.seat-badge{position:absolute;bottom:-3%;left:50%;transform:translateX(-50%);padding:4px 13px;min-width:42%;text-align:center;background:#0b0a09;border-radius:99px;color:#8d8b83;font-size:clamp(9px,.9vw,13px);white-space:nowrap}
.seat-avatar.is-away .avatar{filter:brightness(.3) saturate(.3)}.away-label{position:absolute;inset:15%;display:grid;place-items:center;border-radius:50%;color:#d1cebd;font:700 clamp(8px,.85vw,13px) 'Segoe UI',sans-serif;text-transform:uppercase;pointer-events:none;text-shadow:0 1px 4px #000}.wood-seat.escaped .avatar{opacity:.35}
.turn-route{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:3}
.mobile-route{display:none}
.turn-route path{fill:none;stroke:#e5d8b56b;stroke-width:2;stroke-dasharray:7 9;stroke-linecap:round;vector-effect:non-scaling-stroke;animation:wood-route var(--route-speed,20s) linear infinite}.route-still .turn-route path{animation:none}
@keyframes wood-route{to{stroke-dashoffset:-320}}
.wood-stock,.wood-action{position:absolute;top:70px;width:clamp(120px,13vw,230px);z-index:12;text-align:center}.wood-stock{left:2%}.wood-action{right:2%}
.wood-disc{position:relative;display:block;width:100%;aspect-ratio:1;border:0;border-radius:50%;padding:0;background:url('../assets/table/seat_wood_alt.png') center/100% 100%;box-shadow:0 10px 30px #0004}
.action-disc span{font-size:clamp(12px,1.2vw,23px);text-transform:uppercase;color:#7e7d75;letter-spacing:.4px}.action-disc.ready span{color:#d9ceaf}.action-disc.ready:hover{filter:brightness(1.22)}.action-disc:disabled{opacity:1;cursor:default}.wood-action>.btn{margin-top:12px;min-width:90px}
.wood-deck-count{position:absolute;top:7%;left:34%;width:32%;background:#090a0dd9;border-radius:40px;z-index:3;color:#b1b1a9;font-size:clamp(12px,1.35vw,23px)}
.wood-trump{position:absolute;top:31%;left:34%;width:38%;transform:rotate(10deg)}.wood-trump .card{width:100%}
.wood-deck{position:absolute;top:14%;left:29%;width:42%;transform:rotate(90deg);filter:brightness(.75)}.wood-deck .card{width:100%;box-shadow:3px 2px #1a1b1b,5px 4px #393935,7px 6px #171819}.wood-deck.exhausted{opacity:.15}.stock-summary{font-size:10px;color:#93958e;display:block;margin-top:7px}.stock-summary i{font-style:normal;font-size:18px}
.wood-field{position:absolute;top:23%;left:12%;right:12%;bottom:31%;display:flex;justify-content:center;align-items:center;z-index:4;min-height:0}
.wood-field{container-type:size}
.wood-field.draft-field{top:19%;left:15%;right:15%;bottom:32%}.wood-field.choice-field{top:20%;bottom:30%}
.wood-field .draft-grid{width:100%;height:100%;gap:8px}.wood-field .draft-cell{border-radius:3px}.wood-field .pack-reveal .card{width:clamp(80px,10vw,155px)}.wood-field .pack-reveal{gap:22px}
.formation{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:clamp(10px,1.4vw,25px);justify-content:center;align-items:center;width:100%;height:100%;max-width:1000px}
.formation[data-lanes="1"]{max-width:155px}.formation[data-lanes="2"]{max-width:335px}.formation[data-lanes="3"]{max-width:515px}.formation[data-lanes="4"]{max-width:695px}
.battle-lane{position:relative;min-width:0;width:100%;display:flex;flex-direction:column;align-items:center;align-self:center}
.formation-fighter{position:relative;width:100%;max-width:145px;transform-origin:center;z-index:1}.formation-fighter .card{width:100%;aspect-ratio:2/3}.defense-fighter{margin-top:-25%;z-index:2;transform:translateX(8%)}.attack-fighter{transform:translateX(-6%)}
.formation-fighter{max-width:min(145px,calc((100cqh - 30px)/2.75))}
.attack-fighter .card-info{bottom:auto;top:-20px;left:0;width:100%;background:#12140ed9;border-radius:4px;padding:3px 5px}.attack-fighter .card-name{display:none}.attack-fighter .stats>span{flex-direction:row;gap:4px}.attack-fighter .stats b{font-size:15cqw}.attack-fighter .stats small{font-size:9cqw}.attack-fighter .creature-art{height:91%}
.defense-slot{width:100%;aspect-ratio:2/3;border:1px dashed #b9b29529;border-radius:6px;background:#0b0c0e1c;color:#c0b59655;display:grid;place-items:center;opacity:1!important;padding:0}.defense-slot span{font:26px Georgia}.defense-slot.can-drop{background:#7b9c7630;border-color:#d8d2a171;cursor:pointer}.battle-lane.chosen .defense-slot{border-color:#d8d2a1}.battle-lane.resolved .card{filter:saturate(.65) brightness(.82)}
.undo-card{position:absolute;right:-7px;bottom:0;z-index:9;border-radius:50%;width:30px;height:30px;background:#151a17f2;border:1px solid #8d866d66;font:21px Georgia;color:#d4c6a0}.lane-result{position:absolute;bottom:-18px;color:#a6b59e;font-size:14px;z-index:4}.sacrifice-mark{position:absolute;right:-5px;top:42%;z-index:5;font-size:10px;color:#d7bc83;background:#1e221bd9;padding:2px 5px}
.empty-formation{width:100%;height:100%;border:0;display:grid;place-items:center;background:none;color:#a5a695aa;font-size:13px}.empty-formation:disabled{opacity:1}.table-whisper{color:#aaa99b;font-size:13px}
.wood-hand{position:absolute;left:12%;right:12%;bottom:2.5%;z-index:6}.wood-hand .hand-scroll{justify-content:safe center;gap:10px;padding:18px 8px 6px;min-height:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#aaa29138 transparent}
.wood-hand .hand-scroll .card{width:clamp(85px,7.3vw,130px);box-shadow:0 8px 15px #0007;touch-action:pan-x}.wood-hand .hand-scroll .card.selected{transform:translateY(-12px)}.wood-hand .hand-scroll .card.selected:after{border-color:#cec09988}.wood-hand .hand-scroll .card.muted{filter:brightness(.72) saturate(.75)}
.hand-tools{display:flex;align-items:center;justify-content:space-between;min-height:30px;padding:0 8px;gap:10px}.hand-tools .books-tray{height:34px;gap:9px;flex:0 0 auto}.hand-tools .books-tray button{width:24px}.placement-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.table-small,.btn.table-small{font:11px 'Segoe UI',sans-serif;padding:7px 11px;min-height:30px;min-width:0;border:1px solid #aca28a27;background:#10130fd9;color:#c9c4ad;border-radius:3px}.table-small.active{border-color:#d2be78a0}.table-small:hover:not(:disabled){background:#2c2e25}
.wood-ritual{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;white-space:nowrap;background:#101510f5;padding:12px;border:1px solid #a58d5a55;border-radius:5px;z-index:15;font-size:11px}.wood-ritual button{border-bottom:1px solid #b29e7477;padding:8px;color:#d0c39f}.wood-ritual span{color:#a99f88}.wood-forecast{position:absolute;right:0;bottom:calc(100% + 4px);color:#b3c5a6;font-size:10px}.wood-forecast.lose{color:#cf9a89}
.wood-field .book-choices{gap:30px}.wood-field .book-choice>img{height:clamp(80px,13vh,145px)}.wood-field .book-choice h3{font-size:19px}.wood-field .book-choice p{font-size:11px}.wood-field .book-choice .btn{min-height:32px;padding:8px}.wood-field .result h2{font-size:30px}.wood-field .result p{font-size:12px}
.formation-fighter.lunging{animation:table-strike .55s ease-in-out;z-index:12}.formation-fighter.struck .card{animation:shake .32s}.attack-fighter.lunging{--strike:38%}.defense-fighter.lunging{--strike:-38%}
@keyframes table-strike{0%,100%{translate:0 0}30%{translate:0 calc(var(--strike)*-.15)}48%{translate:0 var(--strike)}70%{translate:0 calc(var(--strike)*.4)}}
.drag-card-ghost{position:fixed;z-index:150;width:110px;pointer-events:none;opacity:.9;transform:translate(-50%,-65%) rotate(5deg)}.drag-card-ghost .card{width:100%}.drag-source{opacity:.25}.drop-ready{filter:drop-shadow(0 0 12px #c8d79e99)}
.player-menu{text-align:center}.player-menu>.avatar{width:80px;height:80px;margin:auto auto 15px}.player-menu .btn{margin:8px}.player-menu p{font-size:12px}.route-options{display:flex;justify-content:space-between;gap:18px;margin:18px auto;max-width:340px;font-size:12px}.route-options input{accent-color:#aa9b77}
@media(min-width:1900px){.wood-board{width:min(76vw,165svh)}.wood-field{top:25%}.wood-hand .hand-scroll .card{width:145px}.wood-stock,.wood-action{width:240px}}
@media(max-height:750px) and (min-width:701px){.wood-game.game-view{min-height:430px}.wood-board{top:19%;width:78vw}.wood-field{top:22%;bottom:33%}.wood-hand .hand-scroll .card{width:clamp(70px,10.5vh,110px)}.formation-fighter{max-width:clamp(65px,12vh,110px)}.formation{gap:14px}.wood-stock,.wood-action{top:60px;width:clamp(100px,17vh,150px)}.seat-name{font-size:9px}.seat-badge{font-size:9px;padding:3px 8px}.wood-field .book-choice p{font-size:10px;min-height:35px}.wood-field .book-choice>img{height:80px}.wood-field .book-choice h3{font-size:15px}}
@media(max-width:700px) and (orientation:portrait){
 .desktop-route{display:none}.mobile-route{display:block}
 body.at-table{overflow:auto}.at-table .topbar{height:44px;padding:0 12px}.at-table .brand{display:none}.at-table .topbar nav{margin-right:auto}.at-table .topbar nav button{font-size:10px}
 .wood-game.game-view{height:calc(100svh - 44px);min-height:660px}.wood-game .table-topline{left:10px;right:10px;top:4px}.wood-game .table-topline button{padding:9px 10px;font-size:10px}.wood-game .table-topline>span{font-size:6px;top:10px}.wood-game .table-topline>div{gap:4px}.table-status{top:50px;font-size:10px;left:27%;width:46%}
 .wood-board{top:25%;bottom:1%;width:92%;background-size:100% 100%}.wood-seat{width:15%}.wood-seat[data-slot="0"]{--x:8%!important;--y:11%!important}.wood-seat[data-slot="1"]{--x:25%!important;--y:2%!important}.wood-seat[data-slot="2"]{--x:42%!important;--y:-2%!important}.wood-seat[data-slot="3"]{--x:58%!important;--y:-2%!important}.wood-seat[data-slot="4"]{--x:75%!important;--y:2%!important}.wood-seat[data-slot="5"]{--x:92%!important;--y:11%!important}
 .seat-count{top:60%;left:85%;width:30%;font-size:13px}.wood-seat[data-slot="3"] .seat-count,.wood-seat[data-slot="4"] .seat-count,.wood-seat[data-slot="5"] .seat-count{right:85%}.seat-name{font-size:8px;top:calc(100% + 4px)}.seat-badge{font-size:8px;padding:2px 6px;min-width:45%}.away-label{font-size:7px}.wood-seat.empty{opacity:.65}
 .wood-stock,.wood-action{top:58px;width:96px}.wood-stock{left:8px}.wood-action{right:8px}.action-disc span{font-size:12px}.wood-action>.btn{margin-top:4px;min-height:27px;font-size:10px;padding:6px 10px}.stock-summary{font-size:8px;margin-top:2px}.wood-deck-count{font-size:13px}.stock-summary i{font-size:14px}
 .wood-field{top:19%;left:8%;right:8%;bottom:35%}.wood-field.draft-field{top:18%;left:7%;right:7%;bottom:34%}.wood-field.choice-field{top:18%;bottom:30%}.wood-field .draft-grid{gap:5px}.wood-field .pack-reveal{gap:9px}.wood-field .pack-reveal .card{width:78px}
 .formation{grid-auto-flow:row;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:24px 18px;align-content:center;max-width:none!important}.formation[data-lanes="1"]{grid-template-columns:1fr;max-width:95px!important}.formation[data-lanes="2"]{grid-template-columns:repeat(2,1fr);max-width:210px!important}.formation-fighter{max-width:90px}.defense-fighter{margin-top:-55%}.formation[data-lanes="1"] .defense-fighter,.formation[data-lanes="2"] .defense-fighter,.formation[data-lanes="3"] .defense-fighter{margin-top:-20%}.undo-card{width:27px;height:27px;right:-10px;font-size:19px}.lane-result{bottom:-12px;font-size:11px}.defense-slot span{font-size:20px}
 .wood-hand{left:5%;right:5%;bottom:3%}.wood-hand .hand-scroll{gap:7px;padding:17px 4px 4px;justify-content:flex-start}.wood-hand .hand-scroll .card{width:83px}.hand-tools{gap:5px;padding:0 4px;min-height:32px}.hand-tools .books-tray{height:28px;gap:5px}.hand-tools .books-tray button{width:21px}.placement-actions{gap:4px}.table-small,.btn.table-small{font-size:9px;padding:6px 8px;min-height:30px}.wood-ritual{padding:8px;gap:6px;font-size:10px}.wood-ritual button{padding:6px}.wood-forecast{font-size:8px;bottom:calc(100% + 3px)}
 .wood-field .book-choices{gap:15px;padding:0}.wood-field .book-choice>img{height:85px}.wood-field .book-choice h3{font-size:14px}.wood-field .book-choice p{font-size:9px;min-height:50px}.wood-field .result h2{font-size:23px}.wood-field .result .btn{font-size:10px;padding:9px;min-height:32px}.empty-formation{font-size:11px}.table-whisper{font-size:11px}
}
@media(max-height:520px) and (orientation:landscape){.at-table .topbar{height:32px}.wood-game.game-view{height:calc(100svh - 32px);min-height:310px}.wood-game .table-topline{top:0}.wood-game .table-topline button{padding:7px 10px;font-size:10px}.table-status{top:24px;font-size:9px}.wood-board{top:22%;width:78vw}.wood-stock,.wood-action{top:44px;width:90px}.wood-field{top:22%;bottom:36%;left:14%;right:14%}.formation-fighter{max-width:58px}.formation{gap:10px}.defense-fighter{margin-top:-40%}.wood-hand{bottom:2%;left:12%;right:12%}.wood-hand .hand-scroll .card{width:57px}.hand-tools{min-height:24px}.hand-tools .books-tray{height:23px}.placement-actions{gap:4px}.table-small,.btn.table-small{font-size:9px;padding:3px 7px;min-height:24px}.wood-hand .hand-scroll{padding-top:12px;gap:7px}.seat-badge{font-size:7px;padding:2px 6px}.seat-name{font-size:7px}.seat-count{font-size:12px}.action-disc span{font-size:11px}.wood-field .book-choice>img{height:48px}.wood-field .book-choice h3{font-size:12px}.wood-field .book-choice p{font-size:8px;min-height:30px;margin:3px}.wood-field .book-choice .btn{font-size:9px;padding:5px;min-height:24px}.wood-field .book-choices{gap:20px}.wood-field .pack-reveal .card{width:63px}.away-label{font-size:7px}.wood-action>.btn{margin-top:4px;min-height:23px;font-size:9px;padding:5px}}
@media(max-width:700px) and (orientation:portrait){
 .wood-field:not(.draft-field):not(.choice-field){top:18%;bottom:36%;left:6%;right:6%}
 .formation{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px}
 .formation[data-lanes="1"]{grid-template-columns:1fr;max-width:210px!important}.formation[data-lanes="2"],.formation[data-lanes="3"],.formation[data-lanes="4"]{max-width:none!important;grid-template-columns:repeat(2,minmax(0,1fr))}
 .battle-lane{flex-direction:row;gap:5px;justify-content:center;align-items:center}
 .formation-fighter{width:calc(50% - 3px);max-width:min(85px,calc((100cqh - 32px)/4.5))}
 .formation[data-lanes="1"] .formation-fighter,.formation[data-lanes="2"] .formation-fighter,.formation[data-lanes="3"] .formation-fighter,.formation[data-lanes="4"] .formation-fighter{max-width:85px}
 .defense-fighter,.formation[data-lanes="1"] .defense-fighter,.formation[data-lanes="2"] .defense-fighter,.formation[data-lanes="3"] .defense-fighter{margin-top:0;transform:none}.attack-fighter{transform:none}
 .attack-fighter .card-info{top:auto;bottom:5%;left:9%;width:82%;background:none;padding:0}.attack-fighter .card-name{display:block}.attack-fighter .stats>span{flex-direction:column;gap:3px}.attack-fighter .stats b{font-size:24cqw}.attack-fighter .stats small{font-size:7cqw}.attack-fighter .creature-art{height:72%}
 .undo-card{bottom:-12px;right:0;width:24px;height:24px}.lane-result{bottom:-12px;left:50%}.card-name{letter-spacing:.5px}
}
@media(prefers-reduced-motion:reduce){.turn-route path,.formation-fighter.lunging{animation:none}.card{transition:none}}

@media(max-height:750px) and (orientation:landscape){.formation-fighter{max-width:min(130px,calc((100cqh - 30px)/2.75))}}
