@charset "UTF-8";
:root{color-scheme:dark;--bg:#0c0e11;--surface:#15181e;--text:#f1f1f2;--muted:#a4aab4;--gold:#c59a55;--line:#ffffff20;--silver:#c2cbd7;font:16px/1.45 Arial,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button{font:inherit;color:inherit;cursor:pointer;transition:background .16s,border-color .16s,transform .16s}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #ecbb67;outline-offset:4px}h1,h2,h3,p{margin:0}h1,h2,h3,.serif{font-family:Georgia,'Times New Roman',serif}h1{font-size:clamp(2rem,3.6vw,3.2rem);font-weight:500;line-height:1.1}h2{font-weight:500}img{display:block;max-width:100%}.app{max-width:1600px;margin:auto}.topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 32px;border-bottom:1px solid var(--line)}.brand{display:flex;gap:13px;align-items:center;color:#eee;text-decoration:none;font:1.12rem Georgia,serif;letter-spacing:.09em}.brand-seal{border:1px solid #c59a5560;color:var(--gold);padding:9px;font:1rem Georgia,serif}.brand small{display:block;color:var(--muted);font:10px/1.8 Arial,sans-serif;letter-spacing:.15em}nav{display:flex;align-items:center;gap:16px}.version{font-size:.65rem;color:#828b97;letter-spacing:.12em}.quiet{background:none;border:1px solid transparent;color:var(--muted);padding:8px 10px;font-size:.875rem}.quiet:hover{color:#fff;border-color:var(--line)}.primary,.secondary{border-radius:3px;padding:12px 23px;border:1px solid var(--gold);font-size:.9rem;font-weight:600}.primary{background:var(--gold);color:#14110c}.primary:hover:not(:disabled){background:#dfb575}.primary:disabled{opacity:.35}.secondary{background:#151a22;color:#f2eee7;border-color:#606975}.secondary:hover:not(:disabled){background:#292f39;border-color:#c59a55}.secondary:disabled{opacity:.4}.eyebrow{font-size:.75rem;letter-spacing:.15em;color:var(--gold);text-transform:uppercase}.muted{color:var(--muted)}.intro{text-align:center;padding:40px 20px 26px}.intro h1{margin:10px 0 14px}.intro p{color:var(--muted)}.house-grid{display:grid;grid-template-columns:repeat(2,minmax(0,390px));gap:30px;justify-content:center;padding:8px 22px 26px}.house{background:linear-gradient(155deg,#1c1d22,#0c0d10);border:1px solid #c59a5560;border-bottom:3px solid var(--gold);padding:25px 24px;text-align:center;border-radius:3px}.house.wolf{border-color:#6f7d9166;border-bottom-color:var(--silver);background:linear-gradient(155deg,#161e2b,#0c0d10)}.house:hover{transform:translateY(-4px);border-color:#f2d9ae}.crest{object-fit:contain}.house>.crest{height:220px;max-width:200px;width:100%;margin:0 auto 25px;mix-blend-mode:screen}.house-copy h2{font-size:2rem;margin:8px 0 14px}.house-copy p{color:var(--muted);font-size:.875rem;min-height:40px}.choose-label{display:block;margin-top:16px;font-size:.875rem;color:#f1c582}.setup-note{text-align:center;max-width:690px;padding:0 20px 35px;margin:auto;color:var(--muted);font-size:.875rem}.small-house{display:flex;justify-content:center;align-items:center;gap:10px;margin-bottom:15px}.small-house .crest{height:40px;width:36px;mix-blend-mode:screen}.draft{max-width:1050px;margin:auto}.draft-hand{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;padding:0 20px}.draft-controls{text-align:center;padding:26px 15px}.draft-controls p{margin-top:12px;color:var(--muted);font-size:.875rem}.draft-team{max-width:780px;margin:auto;padding:12px 20px 40px}.draft-team>h2{font-size:1.2rem;text-align:center;margin-bottom:20px}.roster{display:flex;gap:18px;justify-content:center;align-items:start}.fighter{--house-color:var(--gold);width:200px;flex:0 0 200px;min-width:0}.fighter.wolf{--house-color:var(--silver)}.fighter-card{position:relative;background:#090b0e;border:1px solid #727c8c70;border-bottom:3px solid var(--house-color);padding:4px;border-radius:3px;box-shadow:0 8px 25px #0005}.profile{display:block;padding:0;width:100%;border:0;position:relative;overflow:hidden;aspect-ratio: .78;background:#07090b;text-align:left;color:white}.profile[disabled]{opacity:1}.fighter-photo{position:absolute;width:100%;height:100%;object-fit:cover;object-position:center;inset:0}.profile-caption{position:absolute;left:0;right:0;bottom:0;padding:45px 11px 13px;background:linear-gradient(transparent,#080a0ded 62%);z-index:1}.profile-caption strong{display:block;font:600 1.1rem/1.13 Georgia,serif;text-transform:uppercase;margin-top:5px;overflow-wrap:break-word}.nickname{display:block;font:italic .77rem/1.25 Georgia,serif;color:#dfb574}.fighter.wolf .nickname{color:#e1b976}.profile[data-fighter]:hover .fighter-photo{filter:brightness(1.12)}.fighter:has(.profile[data-fighter]:hover) .fighter-card{border-color:var(--gold)}.stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;padding:6px 0 2px;border-top:1px solid #ffffff16}.stat{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3px 0;gap:2px;border:1px solid transparent;border-radius:3px;font-size:1rem;line-height:1.2;color:#e7eaf0;min-width:0}.stat img{width:30px;height:30px;object-fit:contain}.weapon-choice{background:#202631;border:1px solid #9c86504d;cursor:pointer}.weapon-choice:hover{background:#55442a;border-color:#e1b264;transform:translateY(-3px)}.weapon-choice:focus-visible{outline-offset:0}.selected-weapon{background:#c59a552c;border-color:#ccab6a;color:#f4cf85}.fatigue{display:flex;gap:4px;align-items:center;justify-content:center;flex-wrap:wrap;min-height:22px;margin-top:6px;color:#a1a9b5;font-size:.7rem}.fatigue i{display:block;border-radius:100%;width:7px;height:7px;background:#c94d52}.fatigue span{margin-left:3px}.deployed-label{position:absolute;top:9px;left:9px;background:#0b1012c9;border:1px solid #c59a5555;padding:4px 7px;font-size:.57rem;letter-spacing:.08em;color:#f0d39e}.weapon-on-card-hint{text-align:center;font-size:.78rem;color:#f4ce8f;margin-top:7px}.has-passed .profile,.has-passed .stats{filter:brightness(.32) saturate(.4)}.pass-overlay{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#07090b20;pointer-events:none}.pass-overlay strong{font:bold 3.9rem/1 Arial,sans-serif;letter-spacing:.1em;color:#fff;text-shadow:0 2px 20px #000}.pass-overlay span{margin-top:7px;font-size:.74rem;color:#d2d7e0}.is-out .profile,.is-out .stats{filter:brightness(.3) grayscale(1)}.out-overlay{position:absolute;inset:0;display:grid;place-items:center;z-index:4;color:#ffabb0;font-size:.8rem;font-weight:700;letter-spacing:.07em;pointer-events:none}.has-passed.is-out .out-overlay{align-items:end;padding-bottom:18px}.coin-wrap{text-align:center;padding:40px 20px 70px}.coin{width:160px;height:160px;border:4px double #a78854;border-radius:100%;background:#15191f;margin:25px auto;display:grid;place-items:center;animation:coin-in .8s ease-out}.coin .crest{width:80px;height:110px;mix-blend-mode:screen}.coin-wrap h1{font-size:2.1rem}.coin-wrap p{max-width:580px;margin:17px auto 27px;color:var(--muted)}.phasebar{display:flex;justify-content:space-between;gap:24px;padding:18px 30px;align-items:center;border-bottom:1px solid var(--line);background:#12161c}.phasebar h2{font-size:1.24rem}.phasebar p{margin-top:4px;color:var(--muted);font-size:.875rem}.round-number{white-space:nowrap;font-size:.75rem;letter-spacing:.08em;color:#a9b1bd}.round-number strong{color:var(--gold);font-size:1.3rem;margin-left:8px}.game-board{padding:24px 24px 32px;overflow-x:auto;background:radial-gradient(ellipse at 50% 50%,#23283155,transparent 68%)}.board-grid{display:grid;grid-template-columns:180px minmax(680px,1fr) 145px;grid-template-areas:'hand foe backs' 'hand duel backs' 'hand own backs';gap:24px 22px;min-width:1049px;align-items:start}.board-team{width:100%;max-width:720px;justify-self:center}.opponent-team{grid-area:foe}.player-team{grid-area:own}.team-heading{display:flex;align-items:center;gap:13px;max-width:670px;margin:0 auto 15px;padding:0 10px}.team-heading>.crest{height:49px;width:43px;mix-blend-mode:screen}.team-heading small{font-size:.65rem;letter-spacing:.12em;color:var(--muted)}.team-heading h2{font-size:1.3rem}.team-tournament-score{margin-left:auto;display:flex;gap:11px;align-items:center}.team-tournament-score strong{font:2.6rem Georgia,serif;color:#e9c791}.team-tournament-score span{font-size:.59rem;line-height:1.5;letter-spacing:.07em;color:var(--muted)}.side-hand{align-self:start;padding-top:95px;position:sticky;top:0}.own-hand{grid-area:hand}.enemy-hand{grid-area:backs}.hand-heading{text-align:center;margin-bottom:25px}.hand-heading h2{font:500 1rem Arial,sans-serif}.hand-heading>span{font-size:.75rem;display:block;color:var(--muted);margin-top:6px}.action{display:flex;flex-direction:column;background:linear-gradient(150deg,#282e38,#171b22);border:1px solid #6f7b8d7a;border-top:2px solid #c1a06b;box-shadow:0 6px 14px #0005;border-radius:5px;min-height:224px;width:174px;padding:13px;text-align:left;position:relative;color:#f0f0f1}.action-kind{font-size:.62rem;letter-spacing:.1em;text-transform:uppercase;color:#b4becb}.action h3{font-size:1.1rem;line-height:1.2;margin:7px 0 10px;min-height:2.5rem}.action p{font-size:.8rem;line-height:1.45;color:#d0d5df}.action-mark{font:1.65rem Georgia,serif;color:#e0b979;margin-top:auto;padding-top:12px}.action:not(:disabled):hover{border-color:#e7bb78;box-shadow:0 9px 25px #0008}.action:disabled{color:#b6bdc7}.action.chosen{border:2px solid #d27072;background:#42262c}.action.chosen:after{content:'ODRZUĆ';position:absolute;right:11px;bottom:16px;font-size:.65rem;color:#f5acaf;letter-spacing:.1em}.draft-hand .action{width:100%}.vertical-hand{display:flex;flex-direction:column;align-items:center;padding:0 3px 25px}.vertical-hand .action{width:100%;max-width:174px;flex-shrink:0}.vertical-hand .action+.action{margin-top:-127px}.vertical-hand .action:nth-child(odd){transform:rotate(-2deg)}.vertical-hand .action:nth-child(even){transform:rotate(2deg)}.vertical-hand .action:disabled{filter:saturate(.65)}.vertical-hand .action:hover,.vertical-hand .action:focus-visible{transform:translateX(7px);z-index:70}.opponent-card-backs{display:flex;flex-direction:column;align-items:center;padding:0 4px}.card-back{position:relative;width:130px;height:183px;border:1px solid #8b98a85c;border-radius:5px;background:linear-gradient(135deg,#1e2633,#0c1017);box-shadow:0 8px 15px #0006,inset 0 0 0 5px #111722,inset 0 0 0 6px #9eaabc33;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px}.card-back+.card-back{margin-top:-110px}.card-back:nth-child(odd){transform:rotate(3deg)}.card-back:nth-child(even){transform:rotate(-3deg)}.card-back .crest{height:102px;width:79px;mix-blend-mode:screen}.card-back>span:last-child{font:9px Georgia,serif;letter-spacing:.12em;color:#bfc4ce}.back-corner{position:absolute;left:10px;top:9px;font-size:.75rem;color:#b5bfcc}.duel-octagon{grid-area:duel;position:relative;isolation:isolate;min-height:515px;padding:38px 30px 48px;display:flex;flex-direction:column;justify-content:center}.octagon-floor{position:absolute;inset:0;width:100%;height:100%;z-index:-2;filter:drop-shadow(0 12px 18px #0008);pointer-events:none;overflow:visible}.mat-weapon{position:absolute;width:200px;height:200px;object-fit:contain;top:50%;left:50%;transform:translate(-50%,-50%);opacity:.05;z-index:-1}.arena-title{text-align:center;margin-bottom:23px}.arena-title>span{display:block;font-size:.6rem;letter-spacing:.3em;color:#778393;margin-bottom:7px}.arena-title>strong{font:1rem Georgia,serif;letter-spacing:.035em;color:#d7bc90}.duel-line{display:grid;grid-template-columns:minmax(0,1fr) 200px minmax(0,1fr);gap:19px;align-items:center}.active-slot{min-width:0;width:100%;display:flex;flex-direction:column;align-items:center}.slot-label{font-size:.6rem;letter-spacing:.12em;color:#aeb8c6;margin-bottom:10px}.active-slot .fighter{width:100%;max-width:225px;flex:auto}.active-slot .profile{aspect-ratio:.76}.active-slot .profile-caption strong{font-size:1.16rem}.active-slot .fighter-card{box-shadow:0 13px 35px #0008;border-color:#b097625e;border-bottom-color:var(--house-color)}.empty-slot{border:1px dashed #a8b5c535;border-radius:4px;height:303px;width:100%;max-width:218px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;color:#8b96a5;font-size:.8rem;background:#070a0e25;text-align:center;padding:15px}.empty-slot .crest{height:95px;max-width:78px;opacity:.25;mix-blend-mode:screen}.battle-middle{align-self:center;text-align:center;min-width:0}.clash-totals{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:8px}.clash-totals>div{display:grid;grid-template-columns:auto auto;gap:4px 5px;align-items:center}.clash-totals small{grid-column:1/-1;font-size:.53rem;letter-spacing:.06em;color:#c0c9d7}.clash-totals strong{font:1.95rem Georgia,serif}.clash-totals>span{font-size:.54rem;letter-spacing:.1em;color:#8997a8}.dice{display:inline-grid;place-items:center;width:25px;height:25px;background:#e9edf4;color:#20252e;box-shadow:1px 2px 0 #9ba4b5;border-radius:4px;font-weight:bold;font-size:.85rem}.played-pile{height:248px;position:relative;margin:8px auto 0}.played-card{width:171px;min-height:222px;border-top-color:#d3aa68}.played-by{font-size:.57rem;letter-spacing:.06em;padding-bottom:8px;margin-bottom:9px;border-bottom:1px solid #ffffff20;color:#ebc685}.enemy-play{background:linear-gradient(155deg,#2f3d50,#172131);border-top-color:#a2b4ce}.enemy-play .played-by{color:#c5d5ec}.played-card h3{font-size:1.03rem;min-height:0}.played-card p{font-size:.76rem}.played-bottom{display:flex;align-items:end;justify-content:space-between;gap:6px;margin-top:auto}.blocked-label{color:#e1a0a7;border:1px solid #bd777d;padding:2px 5px;font-size:.6rem;transform:rotate(-5deg)}.played-card.cancelled{filter:saturate(.35)}.played-pile .played-card{position:absolute;top:7px;left:50%;transform:translate(calc(-50% + var(--offset-x)),var(--offset-y)) rotate(var(--tilt))}.played-pile .played-card:hover,.played-pile .played-card:focus-visible{z-index:65!important;transform:translate(-50%,-2px) rotate(0deg)}.played-pile .just-thrown{animation:card-thrown .45s cubic-bezier(.16,.76,.26,1) backwards}.empty-pile{height:205px;display:grid;place-items:center}.empty-pile>span{font-size:.65rem;letter-spacing:.14em;line-height:2;color:#7e8a9c;border:1px dashed #8791a52c;border-radius:4px;padding:35px 15px}.inspect-pile{font-size:.7rem;padding:4px 7px;margin-bottom:6px;color:#b6c1d1}.turn-label{font-size:.8rem;color:#c9d2de;line-height:1.4;margin:8px 0 12px}.round-controls .primary,.round-controls .secondary{width:100%;font-size:.8rem;padding:11px 9px}.round-result{font:1.1rem Georgia,serif;color:#f3cb85;margin:6px 0 12px}.result-explain{font-size:.76rem;color:#c4cdd9;margin-bottom:10px}.empty-hand{font-size:.8rem;color:var(--muted);text-align:center;padding:24px 5px}.thinking{animation:pulse 1.2s infinite}.end{text-align:center;padding:45px 20px}.end h1{margin:15px 0 20px}.end-houses{display:flex;justify-content:center;align-items:center;gap:35px;margin:25px auto}.end-houses .crest{width:80px;height:112px;mix-blend-mode:screen}.end-houses span{font:4rem Georgia,serif;color:#e9c690}.end>p{margin:10px auto}.end>.primary{margin-top:18px}.result-table{width:100%;max-width:680px;border-collapse:collapse;margin:30px auto;text-align:left;font-size:.875rem}.result-table th,.result-table td{padding:10px 12px;border-bottom:1px solid var(--line)}.result-table th{font-weight:400;color:var(--muted)}.result-table td:last-child{text-align:right}dialog{width:calc(100% - 32px);max-width:760px;max-height:85vh;padding:26px;background:#161b23;border:1px solid #636e7f;color:#eef0f4;border-radius:5px;box-shadow:0 25px 100px #000c}dialog::backdrop{background:#05080cce;backdrop-filter:blur(5px)}.modal-head{display:flex;justify-content:space-between;gap:20px;margin-bottom:20px}.modal-head h2{font-size:1.55rem}.modal-head button{align-self:start}.modal-actions{display:flex;gap:12px;justify-content:end;margin-top:24px}.rules-content{font-size:.9375rem;line-height:1.6;color:#cbd3df}.rules-content p{margin:13px 0}.rules-content li{margin:10px 0}.rules-content ol{padding-left:22px}.rules-content h3{color:#e5c18a;font-size:1.1rem;margin:22px 0 8px}.rules-content strong{color:#fff}.modal-hand,.played-gallery{display:flex;gap:14px;flex-wrap:wrap;justify-content:center}.played-gallery .played-card{min-height:237px}.card-detail p+p{margin-top:18px}.card-detail{font-size:1.05rem;line-height:1.6}.tactic-picker{display:grid;gap:10px}.weapon-option{display:flex;align-items:center;gap:13px;background:#242c39;padding:11px 14px;border:1px solid #76839855;text-align:left;border-radius:3px}.weapon-option img{height:37px;width:37px}.weapon-option:disabled{opacity:.3}.weapon-option:hover:not(:disabled){border-color:var(--gold);background:#344054}.sr-only{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}.board-scroll-hint{display:none}@keyframes card-thrown{from{opacity:0;transform:translate(calc(-50% + var(--throw-x)),-65px) rotate(calc(var(--tilt) * 3)) scale(1.1)}to{opacity:1;transform:translate(calc(-50% + var(--offset-x)),var(--offset-y)) rotate(var(--tilt))}}@keyframes coin-in{from{transform:rotateY(540deg) scale(.7)}to{transform:rotateY(0) scale(1)}}@keyframes pulse{50%{opacity:.45}}
@media(min-width:1400px){.board-grid{grid-template-columns:195px minmax(680px,1fr) 155px;column-gap:28px}.game-board{padding:27px 32px 38px}.duel-line{grid-template-columns:minmax(0,1fr) 215px minmax(0,1fr);gap:24px}.duel-octagon{padding-left:36px;padding-right:36px}.board-team .fighter{width:210px;flex-basis:210px}}
@media(max-width:1100px){.game-board{padding:18px 14px 30px}.topbar{padding:16px 20px}.phasebar{padding:16px 20px}.board-grid{grid-template-columns:150px 680px 120px;column-gap:20px;min-width:990px}.vertical-hand .action{padding:11px;min-height:235px}.vertical-hand .action+.action{margin-top:-130px}.vertical-hand .action h3{font-size:1rem}.card-back{width:110px;height:160px}.card-back+.card-back{margin-top:-90px}.card-back .crest{height:82px;width:68px}.active-slot .profile-caption strong{font-size:1.03rem}.active-slot .nickname{font-size:.7rem}.duel-octagon{padding-left:25px;padding-right:25px}.duel-line{grid-template-columns:190px 210px 190px;gap:15px}.board-team .fighter{width:190px;flex-basis:190px}}
@media(max-width:760px){.topbar{padding:14px 15px;gap:8px}.brand{font-size:.9rem;gap:9px}.brand small{font-size:8px}.brand-seal{font-size:.85rem;padding:7px}.version{display:none}nav{gap:2px}.quiet{font-size:.75rem;padding:7px}.intro{padding:30px 18px 20px}.intro p{font-size:.9rem}.house-grid{gap:15px;padding:5px 16px 22px}.house{padding:20px 12px}.house>.crest{height:160px;max-width:130px;margin-bottom:20px}.house-copy h2{font-size:1.5rem}.house-copy .eyebrow{font-size:.58rem}.house-copy p{font-size:.73rem;min-height:50px}.choose-label{font-size:.8rem}.setup-note{font-size:.78rem}.draft-hand{grid-template-columns:repeat(2,1fr);padding:0 15px;gap:12px}.draft-hand .action{min-height:230px}.draft-team{overflow-x:auto;padding:12px 15px 30px}.draft-team .roster{justify-content:flex-start;width:max-content;margin:auto}.draft-team .fighter{width:180px;flex-basis:180px}.phasebar{padding:14px 15px;gap:15px}.phasebar h2{font-size:1.05rem}.phasebar p{font-size:.8rem}.round-number{font-size:.6rem}.round-number strong{font-size:1.1rem}.board-scroll-hint{display:block;font-size:.73rem;color:var(--muted);padding:10px 15px 0}.coin-wrap h1{font-size:1.7rem}.coin-wrap p{font-size:.9rem}.end-houses{gap:20px}.end-houses span{font-size:3rem}.end-houses .crest{width:62px;height:90px}.result-table{font-size:.75rem}.result-table td,.result-table th{padding:8px}.modal-hand .action,.played-gallery .played-card{width:calc(50% - 7px);padding:11px;min-height:245px}.modal-head h2{font-size:1.25rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}

/* Version 0.4: hands centered on the arena; scoreboard close to the upper rail. */
.board-grid{grid-template-areas:'. foe .' 'hand duel backs' '. own .';row-gap:22px;align-items:center}
.side-hand{position:relative;top:auto;padding-top:0;align-self:center}
.duel-octagon{align-self:center;min-height:570px;padding-top:49px;padding-bottom:62px}
.opponent-team .team-heading{margin:22px auto 0;max-width:570px;border-bottom:1px solid #bca17155;padding:10px 16px 12px;background:linear-gradient(90deg,transparent,#1c232c 20%,#1c232c 80%,transparent)}
.opponent-team .team-heading h2{font-size:1.65rem}
.opponent-team .team-tournament-score strong{font-size:3rem}
.arena-title{margin-bottom:22px}
.mat-weapon{width:80%;height:84%;max-width:660px;opacity:.15;top:49%}
.empty-pile{height:160px}
.octagon-round{position:absolute;left:50%;bottom:0;transform:translate(-50%,35%);min-width:104px;padding:7px 21px;background:linear-gradient(#242c36,#10161f);border:1px solid #b49a6b;border-radius:3px;text-align:center;font:600 1.65rem/1.15 Georgia,serif;color:#f2d4a0;box-shadow:0 4px 15px #0009;letter-spacing:.08em;z-index:4}
.player-team{margin-top:20px}
.fighter-status{font-size:.7rem;text-align:center;color:#dac297;margin-top:5px}
.action-notice{font-size:.73rem;line-height:1.35;color:#e8c989;margin-top:12px}
.tempo-options{display:flex;flex-direction:column;gap:10px;margin-top:20px}
.modal-hand{margin-top:18px}
/* Clip only the black area outside each original shield; preserve its heraldry. */
.crest{mix-blend-mode:normal!important;background:transparent}
.crest-lion{clip-path:polygon(4% 4%,95% 4%,95% 40%,94% 51%,90% 62%,85% 71%,77% 80%,67% 88%,50% 94%,33% 86%,23% 77%,15% 66%,9% 54%,5% 41%)}
.crest-wolf{clip-path:polygon(12.7% 8.4%,94% 8.4%,94% 36%,93% 46%,89% 57%,83% 67%,75% 77%,65% 85%,53.5% 92.2%,43% 87%,32% 80%,24% 71%,18% 60%,14% 48%,12.7% 36%)}
.card-back{--ornament:#bd965a;width:138px;height:195px;isolation:isolate;overflow:hidden;border:1px solid var(--ornament);border-radius:9px;background:radial-gradient(ellipse at center,#342a22,#140f11 78%);box-shadow:0 8px 16px #0009;gap:0}
.card-back.wolf{--ornament:#b9c6d9;background:radial-gradient(ellipse at center,#243248,#0d1420 78%)}
.card-back:before{content:'';position:absolute;inset:15px;background:repeating-linear-gradient(45deg,transparent 0 8px,#b9a0700c 9px 10px);z-index:-1;border-radius:4px}
.card-back .crest{height:88%;width:94%;max-width:none;object-fit:contain;position:relative;z-index:1;filter:drop-shadow(0 4px 4px #0008)}
.card-back .crest-lion{transform:scale(1.04)}
.card-back .crest-wolf{transform:scale(1.06) translateX(-2%)}
.back-ornament{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke:var(--ornament);stroke-width:1.1;pointer-events:none;z-index:2}
.card-back+.card-back{margin-top:-112px}
@media(max-width:1100px){.card-back{width:113px;height:165px}.card-back+.card-back{margin-top:-92px}.card-back .crest{height:88%;width:94%}.opponent-team .team-heading h2{font-size:1.45rem}.mat-weapon{width:86%;height:85%}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* Version 1.2.3: permanent return to the Stalowa Arena website. */
.game-home-link{
 position:fixed;z-index:140;top:62px;right:20px;
 display:inline-flex;align-items:center;justify-content:center;width:158px;min-height:38px;padding:8px 12px;
 border:1px solid #b7955b66;border-radius:3px;background:#0b0e14e8;color:#e7d2ad;
 box-shadow:0 8px 20px #0008;backdrop-filter:blur(5px);
 font:600 .74rem/1 Georgia,'Times New Roman',serif;letter-spacing:.07em;text-decoration:none;text-transform:uppercase
}
.game-home-link:hover,.game-home-link:focus-visible{border-color:#d4ad70;color:#fff4df;outline:none}
@media(max-width:760px){.game-home-link{top:51px;right:12px;width:138px;min-height:34px;padding:7px 8px;font-size:.62rem}}

/* Version 0.5: compact, single-screen battle layout. */
body.battle-active{overflow:hidden}
body.battle-active .app{height:100vh;height:100dvh;max-width:none;overflow:hidden}
body.battle-active .topbar{height:50px;padding:5px 20px}
body.battle-active .brand-seal{padding:6px;font-size:.82rem}
body.battle-active .brand{font-size:.92rem}
body.battle-active .brand small{display:none}
body.battle-active nav{gap:5px}
body.battle-active .quiet{padding:6px 8px;font-size:.76rem}
#game.battle-mode{height:calc(100vh - 50px);height:calc(100dvh - 50px);min-height:650px}
.battle-mode .game-board{height:100%;padding:5px 18px 8px;overflow-x:auto;overflow-y:hidden}
.battle-mode .board-grid{height:100%;min-width:1120px;min-height:650px;grid-template-columns:170px minmax(720px,1fr) 140px;grid-template-rows:minmax(112px,15%) minmax(430px,1fr) minmax(112px,15%);grid-template-areas:'. foe .' 'hand duel backs' '. own .';column-gap:18px;row-gap:3px;align-items:stretch;align-content:center}
.battle-mode .board-team{height:100%;max-width:960px;display:flex;flex-direction:column;align-items:center}
.battle-mode .opponent-team{justify-content:flex-end}
.battle-mode .player-team{justify-content:flex-start;margin-top:0}
.battle-mode .board-team .roster{width:100%;gap:8px;align-items:center}
.battle-mode .board-team .compact-fighter{width:clamp(210px,28%,270px);flex:0 1 270px}
.compact-fighter .fighter-card{height:70px;display:grid;grid-template-columns:68px minmax(0,1fr);grid-template-rows:31px 33px;padding:2px}
.compact-fighter .profile{grid-column:1;grid-row:1/3;aspect-ratio:auto;height:64px}
.compact-fighter .profile-caption{padding:22px 5px 5px}
.compact-fighter .nickname{display:none}
.compact-fighter .profile-caption strong{font-size:.68rem;line-height:1.05;margin:0}
.compact-fighter .stats{grid-column:2;grid-row:2;padding:2px;gap:1px}
.compact-fighter .stat{font-size:.68rem;padding:0;gap:0}
.compact-fighter .stat img{width:15px;height:15px}
.compact-fighter .fatigue{min-height:11px;margin-top:1px;font-size:.56rem;line-height:1}
.compact-fighter .fatigue i{width:5px;height:5px}
.compact-fighter .fighter-status{display:none}
.compact-fighter .out-overlay{font-size:.58rem;text-align:center;padding-left:70px}
.battle-mode .board-team .team-heading{height:36px;width:min(520px,80%);max-width:none;margin:0;padding:3px 16px;gap:9px;border:1px solid #9e895d66;border-radius:3px;background:linear-gradient(90deg,#11161d,#202733 50%,#11161d);box-shadow:0 5px 15px #0006;z-index:5}
.battle-mode .opponent-team .team-heading{margin:2px 0 0;border-color:#8695aa66;background:linear-gradient(90deg,#111722,#1f2b3d 50%,#111722)}
.battle-mode .player-team .team-heading{margin:0 0 2px;background:linear-gradient(90deg,#1b1212,#34211c 50%,#1b1212)}
.battle-mode .team-heading>.crest{height:31px;width:28px}
.battle-mode .team-heading small{font-size:.5rem}
.battle-mode .team-heading h2{font-size:1.05rem;line-height:1}
.battle-mode .team-tournament-score{gap:6px}
.battle-mode .team-tournament-score strong{font-size:1.65rem}
.battle-mode .team-tournament-score span{font-size:.48rem;line-height:1.15}
.battle-mode .duel-octagon{height:100%;min-height:0;padding:29px 26px 35px;align-self:stretch}
.battle-mode .arena-title{height:22px;margin-bottom:2px}
.battle-mode .arena-title>span{display:none}
.battle-mode .arena-title>strong{font-size:.86rem}
.battle-mode .duel-line{height:calc(100% - 24px);grid-template-columns:minmax(190px,1fr) 185px minmax(190px,1fr);gap:14px}
.battle-mode .active-slot .fighter{max-width:clamp(180px,13vw,225px)}
.battle-mode .empty-slot{height:min(300px,42vh)}
.battle-mode .battle-middle{width:100%;max-width:185px}
.battle-mode .played-pile{height:clamp(180px,25vh,230px)}
.battle-mode .played-pile .played-card{width:150px;min-height:190px;padding:10px}
.battle-mode .played-card h3{font-size:.9rem}
.battle-mode .played-card p{font-size:.68rem}
.battle-mode .empty-pile{height:150px}
.battle-mode .side-hand{height:100%;display:flex;flex-direction:column;justify-content:center;align-self:stretch;padding:0}
.battle-mode .hand-heading{margin-bottom:10px}
.battle-mode .vertical-hand{padding:0 3px}
.battle-mode .vertical-hand .action{min-height:205px}
.battle-mode .vertical-hand .action+.action{margin-top:-160px}
.battle-mode .opponent-card-backs .card-back+.card-back{margin-top:-140px}
.battle-mode .octagon-round{min-width:88px;padding:5px 15px;font-size:1.25rem}

@media(max-height:850px) and (min-width:761px){
 body.battle-active .topbar{height:44px;padding:3px 18px}
 #game.battle-mode{height:calc(100vh - 44px);height:calc(100dvh - 44px);min-height:600px}
 .battle-mode .board-grid{min-height:600px;grid-template-rows:minmax(90px,14%) minmax(400px,1fr) minmax(90px,14%)}
 .battle-mode .board-team .compact-fighter{width:clamp(205px,27%,250px)}
 .compact-fighter .fighter-card{height:60px;grid-template-columns:58px minmax(0,1fr);grid-template-rows:26px 28px}
 .compact-fighter .profile{height:54px}
 .compact-fighter .profile-caption{padding:18px 4px 4px}
 .compact-fighter .profile-caption strong{font-size:.61rem}
 .compact-fighter .stat img{width:13px;height:13px}
 .compact-fighter .stat{font-size:.61rem}
 .battle-mode .board-team .team-heading{height:32px}
 .battle-mode .team-heading>.crest{height:27px;width:25px}
 .battle-mode .team-heading h2{font-size:.92rem}
 .battle-mode .team-tournament-score strong{font-size:1.4rem}
 .battle-mode .duel-octagon{padding:25px 22px 30px}
 .battle-mode .active-slot .fighter{max-width:185px}
 .battle-mode .active-slot .profile-caption strong{font-size:.9rem}
 .battle-mode .active-slot .nickname{font-size:.6rem}
 .battle-mode .active-slot .stat img{width:22px;height:22px}
 .battle-mode .active-slot .stat{font-size:.82rem}
 .battle-mode .played-pile{height:170px}
 .battle-mode .played-pile .played-card{width:132px;min-height:168px;padding:8px}
 .battle-mode .vertical-hand .action{min-height:185px;padding:10px}
 .battle-mode .vertical-hand .action+.action{margin-top:-148px}
 .battle-mode .vertical-hand .action h3{font-size:.88rem;min-height:2.1rem}
 .battle-mode .vertical-hand .action p{font-size:.68rem}
 .battle-mode .card-back{width:100px;height:142px}
 .battle-mode .opponent-card-backs .card-back+.card-back{margin-top:-112px}
 .battle-mode .card-back .crest{height:84%}
}

@media(max-width:760px){
 body.battle-active{overflow:auto}
 body.battle-active .app{height:auto;min-height:100vh;overflow:visible}
 #game.battle-mode{height:auto;min-height:0}
 .battle-mode .game-board{height:auto;overflow-x:auto;overflow-y:visible}
 .battle-mode .board-grid{height:720px;min-height:720px;min-width:990px;grid-template-columns:150px 680px 120px;grid-template-rows:100px 500px 100px}
 .battle-mode .board-team .compact-fighter{width:210px;flex-basis:210px}
}

/* Version 1.0: live configuration, compact draft, sound and final tournament state. */
.sound-toggle{position:absolute;z-index:90;top:13px;left:15px;display:flex;align-items:center;gap:7px;border:1px solid #9e82554f;background:#0c1119d9;color:#e7d2ad;border-radius:3px;font-family:Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.04em;backdrop-filter:blur(5px)}
.battle-mode .sound-toggle{position:fixed;top:8px;left:8px;padding:6px 9px;background:#0b0e14dd}
.data-status{text-align:center;color:#928a7e;font:italic .68rem/1.3 Georgia,'Times New Roman',serif;letter-spacing:.025em}
.ceremonial-button{font:600 1rem/1 Georgia,'Times New Roman',serif!important;font-variant:small-caps!important;letter-spacing:.075em!important;text-shadow:0 1px #f8dc9e44}

/* Crop the dark rectangular raster margins to the heraldic shield silhouette. */
.house-crest,.crest-clip,.card-back-crest{display:inline-grid;place-items:center;overflow:hidden;clip-path:polygon(5% 3%,95% 3%,95% 52%,91% 67%,81% 81%,66% 92%,50% 100%,34% 92%,19% 81%,9% 67%,5% 52%);background:transparent!important}
.house-crest .crest,.crest-clip .crest,.card-back-crest .crest{width:100%!important;height:100%!important;max-width:none!important;object-fit:contain!important;mix-blend-mode:screen!important;filter:drop-shadow(0 5px 5px #000a)}
.house-select-screen .house-crest{width:255px;height:310px;margin:0 auto 10px}
.house-select-screen .house-crest .crest-wolf{transform:scale(1.01)}
.house-select-screen .house-crest .crest-lion{transform:scale(1.035)}
.coin .crest-clip{width:102px;height:126px;clip-path:polygon(4% 2%,96% 2%,96% 53%,91% 69%,80% 84%,64% 94%,50% 100%,36% 94%,20% 84%,9% 69%,4% 53%)}
.coin .crest-clip .crest-wolf{transform:scale(.91);transform-origin:center}
.card-back-crest{width:91%;height:91%;position:relative;z-index:1}
.card-back-crest .crest-lion{transform:scale(1.03)}
.card-back-crest .crest-wolf{transform:scale(.94)}
.card-back>.crest{display:none}

.setup-scene{position:relative;isolation:isolate;min-height:100vh;min-height:100dvh;overflow:hidden;background:radial-gradient(ellipse at 50% 42%,#222936cc,#090c10 73%)}
.setup-scene::after{content:'';position:absolute;z-index:0;inset:0;background:linear-gradient(90deg,#090b0edc,transparent 33%,#090b0e80 50%,transparent 67%,#090b0edc);pointer-events:none}
.setup-scene>.board-house-banner{width:50%;opacity:.38}
.setup-scene>*:not(.board-house-banner){position:relative;z-index:2}
.draft-layout{width:min(1500px,100%);min-height:100vh;min-height:100dvh;margin:auto;padding:22px 24px;display:grid;grid-template-columns:minmax(275px,330px) minmax(0,1fr);gap:28px;align-items:center}
.draft-team{max-width:none;margin:0;padding:15px 12px 20px;align-self:center;text-align:center;border-right:1px solid #b7955b42}
.draft-team>h2{margin:8px 0 14px;font:600 1.5rem/1 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.06em;color:#f0d4a1}
.draft-roster{display:flex;flex-direction:column;align-items:center;gap:11px}
.draft-fighter{width:100%;max-width:310px;flex:none}
.draft-fighter .fighter-card{height:150px;display:grid;grid-template-columns:132px minmax(0,1fr);grid-template-rows:72px 70px;padding:3px}
.draft-fighter .profile{grid-column:1;grid-row:1/3;aspect-ratio:auto;height:142px}
.draft-fighter .compact-title{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;padding:5px 9px;border-bottom:1px solid #ffffff18;color:#f1dfbd;font:600 1rem/1.1 Georgia,'Times New Roman',serif;text-align:center}
.draft-fighter .stats{grid-column:2;grid-row:2;padding:4px 3px;gap:2px}
.draft-fighter .stat{font-size:.88rem;padding:1px 0}
.draft-fighter .stat img{width:24px;height:24px}
.draft-fighter .fatigue{display:none}
.draft-zone{min-width:0;align-self:center;padding:8px 0}
.draft-heading{display:flex;align-items:center;justify-content:center;gap:14px;text-align:left;margin:0 auto 15px}
.draft-heading>.crest{width:48px;height:60px;mix-blend-mode:screen}
.draft-heading h1{font:600 clamp(1.6rem,2.8vw,2.55rem)/1 Georgia,'Times New Roman',serif;font-variant:small-caps;color:#f2e8d8;margin:5px 0}
.draft-heading p{color:#c4b9aa;font:italic .82rem/1.35 Georgia,'Times New Roman',serif}
.draft-screen .draft-hand{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px;padding:0}
.draft-screen .draft-hand .action{min-height:206px;padding:10px}
.draft-screen .draft-hand .action h3{font-size:.95rem;min-height:2.15rem;margin:5px 0 7px}
.draft-screen .draft-hand .action p{font-size:.7rem;line-height:1.34}
.draft-screen .draft-hand .action-mark{font-size:1.4rem;padding-top:7px}
.draft-screen .draft-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;padding:15px 5px 0}
.draft-screen .draft-controls p{width:100%;margin:0;font:italic .76rem Georgia,'Times New Roman',serif}

.coin-screen{display:grid;place-items:center}
.coin-screen .coin-wrap{width:min(720px,calc(100% - 32px));padding:34px 22px 55px;text-align:center;border:1px solid #af8d5840;background:#0b0f16b8;box-shadow:0 25px 70px #0009;backdrop-filter:blur(4px)}
.coin-screen .coin{width:180px;height:180px;background:radial-gradient(circle,#252c37,#11151c 70%);margin:25px auto}
.coin-screen .coin.is-tossing{display:grid;place-items:center;animation:coin-in 1s ease-in-out}
.coin-screen .coin.is-revealed{animation:coin-reveal .28s ease-out}
.mystery-shield{display:block;width:104px;height:130px;overflow:visible;filter:drop-shadow(0 9px 12px #0009)}
.mystery-shield path{fill:#242a33dc;stroke:#7d8693;stroke-width:2.5;stroke-linejoin:round}
.mystery-shield text{fill:#ded6c7;font:700 4.1rem/1 Georgia,'Times New Roman',serif;dominant-baseline:middle}
.coin-result-placeholder{height:146px}
@keyframes coin-in{0%{transform:rotateY(0) scale(.88)}45%{transform:rotateY(540deg) scale(1.06)}100%{transform:rotateY(1080deg) scale(1)}}
@keyframes coin-reveal{from{opacity:0;transform:scale(.78)}to{opacity:1;transform:scale(1)}}
.coin-screen .coin-wrap h1{font:600 2.75rem/1 Georgia,'Times New Roman',serif;font-variant:small-caps;text-shadow:0 3px 8px #000}
.coin-screen .coin-wrap p{font-family:Georgia,'Times New Roman',serif;color:#d3c7b5}

.action-mark .mark-fatigue{color:#ef686d;text-shadow:0 0 8px #8f2024a8}
.action-mark .mark-strength{color:#69aef2;text-shadow:0 0 8px #225f9da8}
.action-mark .mark-special{color:#e5b966;text-shadow:0 0 8px #8e6727a8}
.action-mark .mark-separator{color:#aa9d89;font-size:.75em}
.new-card-label{position:absolute;top:8px;right:8px;padding:3px 5px;border:1px solid #d4ad69;background:#131922;color:#f3d79f;font-size:.48rem;letter-spacing:.1em}
.vertical-hand .newly-drawn{z-index:80!important;animation:new-card-up .72s cubic-bezier(.15,.78,.24,1) both;box-shadow:0 0 0 2px #d0a35d,0 12px 30px #000c}
@keyframes new-card-up{from{opacity:0;transform:translateY(190px) rotate(8deg) scale(.88)}to{opacity:1}}

.battle-mode .team-heading>.crest-clip{position:absolute;z-index:3;left:13px;top:50%;width:48px;height:62px;transform:translateY(-50%)}
.battle-mode .empty-slot>.crest-clip{width:78px;height:95px;opacity:.25}
.battle-mode .arena-title{transform:translateY(9px);position:relative;z-index:4}
.battle-mode .arena-title>strong{font-size:1.32rem}
.battle-mode .slot-label{font-size:.84rem}
.battle-mode .empty-slot>span:last-child{font-size:1rem}
.battle-mode .turn-label{font-size:1rem}
.battle-mode .mat-weapon{width:72%;height:72%;opacity:.09}
.battle-mode .clash-totals{justify-content:center;gap:22px;margin-bottom:5px}
.battle-mode .clash-totals>div{display:flex;align-items:center;gap:6px}
.battle-mode .clash-totals strong{font-size:2.15rem}
.action-counter{margin:-6px 0 8px;color:#b7a98f;font:italic .65rem Georgia,'Times New Roman',serif}
.tournament-finished .board-grid,.tournament-finished>.board-house-banner{filter:grayscale(1) brightness(.28);pointer-events:none}
.final-overlay{position:absolute;z-index:100;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(circle,#111822dd 0,#080b10d4 48%,#05070ac2 100%);text-align:center}
.final-overlay>strong{margin:12px 0 4px;color:#f0d09a;font:700 clamp(3.2rem,8vw,7rem)/.95 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.06em;text-shadow:0 5px 16px #000,0 0 30px #bd8d4055}
.final-overlay>p{font:600 2.2rem Georgia,'Times New Roman',serif;color:#e9e0d2;margin-bottom:18px}
.final-overlay .primary{min-width:230px}

.end-screen{padding:20px 0 45px}
.end-screen .end{width:min(900px,calc(100% - 32px));margin:auto;padding:34px 32px;background:#0b0f16c4;border:1px solid #a9865152;box-shadow:0 25px 70px #0009;backdrop-filter:blur(4px)}
.end-screen .end h1{font:600 clamp(2.1rem,4vw,3.8rem)/1 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.04em;color:#f1e7d6;text-shadow:0 4px 10px #000}
.end-screen .end-houses>.crest-clip{width:80px;height:112px}
.end-screen .result-table{background:#0a0e14aa}
.end-screen .result-table th:nth-child(3),.end-screen .result-table td:nth-child(3){text-align:center;white-space:nowrap}
.end-screen .result-table th:last-child,.end-screen .result-table td:last-child{text-align:right}

@media(max-height:850px) and (min-width:900px){
 .draft-layout{grid-template-columns:270px minmax(0,1fr);gap:20px;padding:12px 18px}
 .draft-fighter .fighter-card{height:128px;grid-template-columns:112px minmax(0,1fr);grid-template-rows:60px 61px}
 .draft-fighter .profile{height:120px}.draft-fighter .compact-title{font-size:.86rem}.draft-fighter .stat img{width:20px;height:20px}.draft-screen .draft-hand .action{min-height:180px}.draft-heading{margin-bottom:9px}.draft-heading h1{font-size:1.85rem}.draft-screen .draft-controls{padding-top:10px}
}
@media(max-width:900px){
 .setup-scene{overflow:auto}.draft-layout{min-height:auto;display:block;padding:64px 15px 30px}.draft-team{border-right:0;border-bottom:1px solid #b7955b42}.draft-roster{flex-direction:row;overflow-x:auto;justify-content:flex-start;padding-bottom:10px}.draft-fighter{min-width:270px}.draft-zone{padding-top:24px}.draft-screen .draft-hand{grid-template-columns:repeat(2,minmax(0,1fr))}.draft-screen .draft-hand .action{min-height:215px}.sound-toggle span{display:none}.house-crest{width:210px!important;height:255px!important}
}

/* Version 0.6: heraldic score ribbons, arena watermarks and no top header. */
.app{max-width:none}
#game.battle-mode{height:100vh;height:100dvh}
.battle-mode .game-board{position:relative;isolation:isolate;background:radial-gradient(ellipse at 50% 48%,#2b313d66,#11151b 66%,#090b0e 100%)}
.battle-mode .board-grid{position:relative;z-index:2;grid-template-rows:minmax(122px,16%) minmax(406px,1fr) minmax(122px,16%)}
.board-watermark{position:absolute;top:50%;width:clamp(250px,26vw,470px);transform:translateY(-50%);opacity:.065;filter:grayscale(1) contrast(1.2);pointer-events:none;z-index:0}
.board-watermark .crest{width:100%;height:auto;max-height:70vh;object-fit:contain;filter:drop-shadow(0 0 28px #d3b77f55)}
.watermark-lion{left:clamp(20px,5vw,100px)}
.watermark-wolf{right:clamp(20px,5vw,100px)}
.battle-mode .board-team .team-heading{position:relative;isolation:isolate;height:50px;width:min(560px,70%);padding:0 24px 0 65px;gap:13px;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible}
.battle-mode .board-team .team-heading::before{content:'';position:absolute;z-index:-2;left:50%;top:50%;width:min(930px,82vw);height:2px;transform:translate(-50%,-50%);background:linear-gradient(90deg,transparent 0,#8c713d 14%,#c9a35f 50%,#8c713d 86%,transparent 100%);box-shadow:0 0 5px #c49b5170}
.battle-mode .board-team .team-heading::after{content:'';position:absolute;z-index:-1;inset:0;background:linear-gradient(180deg,#26364b 0,#172536 52%,#101923 100%);clip-path:polygon(3% 0,97% 0,100% 50%,97% 100%,3% 100%,0 50%);box-shadow:inset 0 1px #8997a955,inset 0 -1px #05080c,0 5px 15px #0009}
.battle-mode .board-team .team-heading.lion-bar::after{background:linear-gradient(180deg,#4a2b27 0,#31201e 52%,#1b1212 100%)}
.battle-mode .board-team .team-heading>.crest{position:absolute;z-index:3;left:13px;top:50%;width:48px;height:62px;transform:translateY(-50%);filter:drop-shadow(0 5px 4px #000b)}
.battle-mode .team-name{min-width:0;display:flex;align-items:center}
.battle-mode .team-name small{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.battle-mode .team-heading h2{font:600 1.3rem/1 Georgia,'Times New Roman',serif;letter-spacing:.035em;text-transform:uppercase;color:#f1eee8;text-shadow:0 2px 3px #000}
.battle-mode .team-tournament-score{margin-left:auto;min-width:48px;justify-content:center}
.battle-mode .team-tournament-score strong{font:600 2rem/1 Georgia,'Times New Roman',serif;color:#efd19a;text-shadow:0 2px 3px #000}
.battle-mode .team-tournament-score span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.battle-mode .opponent-team .team-heading{margin:4px 0 0}
.battle-mode .player-team .team-heading{margin:0 0 4px}

@media(max-height:850px) and (min-width:761px){
 #game.battle-mode{height:100vh;height:100dvh}
 .battle-mode .board-grid{grid-template-rows:minmax(105px,15%) minmax(390px,1fr) minmax(105px,15%)}
 .battle-mode .board-team .team-heading{height:42px;width:min(520px,68%);padding-left:58px}
 .battle-mode .board-team .team-heading>.crest{left:12px;width:42px;height:53px}
 .battle-mode .team-heading h2{font-size:1.08rem}
 .battle-mode .team-tournament-score strong{font-size:1.65rem}
}

@media(max-width:760px){
 #game.battle-mode{height:auto}
 .battle-mode .board-grid{grid-template-rows:110px 500px 110px}
 .battle-mode .board-team .team-heading{height:42px;width:470px;padding-left:58px}
 .battle-mode .board-team .team-heading::before{width:650px}
 .battle-mode .board-team .team-heading>.crest{left:12px;width:42px;height:53px}
 .battle-mode .team-heading h2{font-size:1.05rem}
 .board-watermark{width:300px;opacity:.05}
}

/* Version 0.7: full-height house banners, larger bench cards and 30% smaller octagon. */
.battle-mode .board-grid{grid-template-rows:minmax(145px,18%) minmax(360px,1fr) minmax(145px,18%)}
.board-house-banner{position:absolute;inset-block:0;width:34%;overflow:hidden;pointer-events:none;z-index:0;opacity:.24}
.board-house-banner img{width:100%;height:100%;object-fit:cover;object-position:center;filter:saturate(.86) brightness(.72) contrast(1.08)}
.board-house-banner::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,#080b0f7d 0,transparent 16%,transparent 84%,#080b0f8f 100%)}
.banner-left{left:0;-webkit-mask-image:linear-gradient(90deg,#000 0,#000 48%,transparent 100%);mask-image:linear-gradient(90deg,#000 0,#000 48%,transparent 100%)}
.banner-right{right:0;-webkit-mask-image:linear-gradient(270deg,#000 0,#000 48%,transparent 100%);mask-image:linear-gradient(270deg,#000 0,#000 48%,transparent 100%)}
.battle-mode .duel-octagon{transform:scale(.7);transform-origin:center;z-index:3}
.battle-mode .board-team .roster{gap:10px}
.battle-mode .board-team .compact-fighter{width:clamp(218px,30.5%,290px);flex:0 1 290px}
.compact-fighter .fighter-card{height:88px;grid-template-columns:82px minmax(0,1fr);grid-template-rows:40px 42px;padding:3px}
.compact-fighter .profile{height:80px}
.compact-fighter .profile-caption{display:none}
.compact-fighter .compact-title{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;padding:3px 7px;border-bottom:1px solid #ffffff18;color:#f0dfc0;font:600 .79rem/1.12 Georgia,'Times New Roman',serif;text-align:center;letter-spacing:.015em}
.compact-fighter .stats{grid-column:2;grid-row:2;padding:2px 3px;gap:2px}
.compact-fighter .stat{font-size:.78rem}
.compact-fighter .stat img{width:19px;height:19px}
.compact-fighter .fatigue{min-height:13px;margin-top:2px;font-size:.6rem}
.compact-fighter .out-overlay{padding-left:84px}

@media(max-height:850px) and (min-width:761px){
 .battle-mode .board-grid{grid-template-rows:minmax(125px,18%) minmax(350px,1fr) minmax(125px,18%)}
 .battle-mode .board-team .compact-fighter{width:clamp(210px,30%,275px);flex-basis:275px}
 .compact-fighter .fighter-card{height:76px;grid-template-columns:72px minmax(0,1fr);grid-template-rows:34px 36px}
 .compact-fighter .profile{height:68px}
 .compact-fighter .compact-title{font-size:.7rem;padding:2px 5px}
 .compact-fighter .stat{font-size:.68rem}
 .compact-fighter .stat img{width:16px;height:16px}
 .compact-fighter .out-overlay{padding-left:74px}
}

@media(max-width:760px){
 .battle-mode .board-grid{grid-template-rows:125px 500px 125px}
 .battle-mode .board-team .compact-fighter{width:225px;flex-basis:225px}
 .compact-fighter .fighter-card{height:78px;grid-template-columns:74px minmax(0,1fr);grid-template-rows:35px 37px}
 .compact-fighter .profile{height:70px}
 .compact-fighter .compact-title{font-size:.7rem}
 .compact-fighter .stat img{width:16px;height:16px}
 .board-house-banner{width:38%;opacity:.2}
}

/* Version 0.8: closer score ribbons, larger rosters and heraldic interface type. */
.battle-mode .game-board.player-lion{--player-accent:#edc170}
.battle-mode .game-board.player-wolf{--player-accent:#dbe7f4}
.battle-mode .game-board.enemy-lion{--enemy-accent:#edc170}
.battle-mode .game-board.enemy-wolf{--enemy-accent:#dbe7f4}
.battle-mode .board-grid{grid-template-rows:minmax(155px,20%) minmax(320px,1fr) minmax(155px,20%)}
.battle-mode .opponent-team .team-heading{transform:translateY(clamp(46px,7vh,78px))}
.battle-mode .player-team .team-heading{transform:translateY(clamp(-78px,-7vh,-46px))}
.battle-mode .board-team .roster{gap:10px}
.battle-mode .board-team .compact-fighter{width:clamp(225px,31%,315px);flex:0 1 315px}
.compact-fighter .fighter-card{height:112px;grid-template-columns:106px minmax(0,1fr);grid-template-rows:50px 55px;padding:3px}
.compact-fighter .profile{height:104px}
.compact-fighter .compact-title{font-size:.9rem;line-height:1.12;padding:4px 8px}
.compact-fighter .stats{padding:3px 4px;gap:3px}
.compact-fighter .stat{font-size:.9rem}
.compact-fighter .stat img{width:24px;height:24px}
.compact-fighter .fatigue{min-height:16px;margin-top:3px}
.compact-fighter .fatigue i{width:9px;height:9px}
.compact-fighter .out-overlay{padding-left:108px}
.fatigue i{width:11px;height:11px;background:radial-gradient(circle at 35% 30%,#ef8588,#bd343a 65%,#761d22);border:1px solid #ff9b9d55;box-shadow:0 0 5px #d74b5088}
.battle-mode .own-hand{--ui-accent:var(--player-accent)}
.battle-mode .enemy-hand{--ui-accent:var(--enemy-accent)}
.battle-mode .your-active{--ui-accent:var(--player-accent)}
.battle-mode .enemy-active{--ui-accent:var(--enemy-accent)}
.battle-mode .hand-heading h2{color:var(--ui-accent);font:600 1.12rem/1.1 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.07em;text-shadow:0 2px 4px #000,0 0 12px #000}
.battle-mode .hand-heading>span{color:#c7bda9;font:italic .78rem/1.3 Georgia,'Times New Roman',serif;letter-spacing:.035em}
.battle-mode .empty-hand{color:var(--ui-accent);font:600 .92rem/1.35 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.06em;text-shadow:0 2px 5px #000}
.battle-mode .arena-title>strong{display:inline-flex;align-items:center;gap:9px;color:#edd09a;font:600 1rem/1 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.08em;text-shadow:0 2px 4px #000}
.battle-mode .arena-title>strong::before,.battle-mode .arena-title>strong::after{content:'◆';font-size:.42rem;color:#9e8355}
.battle-mode .slot-label{color:var(--ui-accent);font:600 .68rem/1 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.15em;text-shadow:0 2px 4px #000}
.battle-mode .empty-slot>span{color:var(--ui-accent);font:600 .86rem/1.35 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.045em;text-shadow:0 2px 4px #000}
.battle-mode .turn-label{color:#eed4a4;font:600 .9rem/1.45 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.035em;text-shadow:0 2px 4px #000}
.battle-mode .clash-totals small,.battle-mode .clash-totals>span{font-family:Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.1em;color:#d9c9aa;text-shadow:0 2px 3px #000}
.battle-mode .clash-totals strong{color:#f2e5cb;text-shadow:0 2px 5px #000}
.battle-mode .round-controls .primary,.battle-mode .round-controls .secondary{font:600 .82rem/1.15 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.045em;border:1px solid #927a52;background:linear-gradient(180deg,#252b35,#121720);box-shadow:inset 0 1px #ffffff14,0 4px 10px #0008;color:#f0d6a6}
.battle-mode .round-controls .primary:hover:not(:disabled),.battle-mode .round-controls .secondary:hover:not(:disabled){background:linear-gradient(180deg,#3b3327,#1b1a19);border-color:#d3aa68}
.battle-mode .round-result{font-variant:small-caps;letter-spacing:.045em;text-shadow:0 2px 4px #000}
.battle-mode .result-explain,.battle-mode .action-notice{font-family:Georgia,'Times New Roman',serif;color:#d4c2a3;text-shadow:0 2px 3px #000}
.battle-mode .octagon-round{font-variant:small-caps;text-shadow:0 2px 4px #000,0 0 8px #a77a3833}

@media(max-height:850px) and (min-width:761px){
 .battle-mode .board-grid{grid-template-rows:minmax(150px,20%) minmax(300px,1fr) minmax(150px,20%)}
 .battle-mode .opponent-team .team-heading{transform:translateY(clamp(38px,6vh,58px))}
 .battle-mode .player-team .team-heading{transform:translateY(clamp(-58px,-6vh,-38px))}
 .battle-mode .board-team .compact-fighter{width:clamp(220px,30.5%,292px);flex-basis:292px}
 .compact-fighter .fighter-card{height:94px;grid-template-columns:88px minmax(0,1fr);grid-template-rows:42px 45px}
 .compact-fighter .profile{height:86px}
 .compact-fighter .compact-title{font-size:.78rem}
 .compact-fighter .stat{font-size:.78rem}
 .compact-fighter .stat img{width:20px;height:20px}
 .compact-fighter .out-overlay{padding-left:90px}
}

@media(max-width:760px){
 .battle-mode .board-grid{grid-template-rows:150px 500px 150px}
 .battle-mode .opponent-team .team-heading{transform:translateY(42px)}
 .battle-mode .player-team .team-heading{transform:translateY(-42px)}
 .battle-mode .board-team .compact-fighter{width:250px;flex-basis:250px}
 .compact-fighter .fighter-card{height:96px;grid-template-columns:90px minmax(0,1fr);grid-template-rows:43px 46px}
 .compact-fighter .profile{height:88px}
}

/* Version 0.9: heraldic house selection, larger reserves and refined screen spacing. */
#game.house-mode{min-height:100vh;min-height:100dvh}
.house-select-screen{position:relative;isolation:isolate;min-height:100vh;min-height:100dvh;overflow:hidden;padding:18px 24px 32px;background:radial-gradient(ellipse at 50% 42%,#202631cc,#090c10 72%)}
.house-select-screen::after{content:'';position:absolute;z-index:0;inset:0;background:linear-gradient(90deg,#090b0ee8 0,#090b0e5c 27%,#090b0ef2 49%,#090b0ef2 51%,#090b0e5c 73%,#090b0ee8 100%);pointer-events:none}
.house-select-screen .board-house-banner{width:50%;opacity:.46;filter:saturate(.94) contrast(1.07)}
.house-select-screen .banner-left{-webkit-mask-image:linear-gradient(90deg,#000 0,#000 62%,transparent 100%);mask-image:linear-gradient(90deg,#000 0,#000 62%,transparent 100%)}
.house-select-screen .banner-right{-webkit-mask-image:linear-gradient(270deg,#000 0,#000 62%,transparent 100%);mask-image:linear-gradient(270deg,#000 0,#000 62%,transparent 100%)}
.house-select-content{position:relative;z-index:2;max-width:1260px;margin:auto}
.house-select-screen .intro{padding:25px 20px 22px}
.house-select-screen .intro .eyebrow{font:600 .78rem/1 Georgia,'Times New Roman',serif;letter-spacing:.24em;color:#d5aa62;text-shadow:0 2px 5px #000}
.house-select-screen .intro h1{margin:12px 0 10px;font:600 clamp(2.4rem,4.5vw,4.4rem)/1 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.035em;color:#f1e8d9;text-shadow:0 4px 12px #000}
.house-select-screen .intro p{font:italic 1rem/1.5 Georgia,'Times New Roman',serif;color:#d4c6af;letter-spacing:.04em;text-shadow:0 2px 4px #000}
.house-rules{position:fixed;z-index:140;right:20px;top:14px;width:158px;min-height:38px;padding:8px 12px;font-family:Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.06em;border-color:#b18c53;color:#edd5aa;background:#10151de8;box-shadow:0 8px 20px #0008;backdrop-filter:blur(5px)}
.house-grid{grid-template-columns:repeat(2,minmax(0,470px));gap:48px;padding:8px 26px 22px}
.house-select-screen .house{position:relative;isolation:isolate;overflow:hidden;min-height:610px;padding:23px 28px 29px;border:1px solid #bd985d99;border-bottom:3px solid #d3a95f;background:linear-gradient(180deg,#281917d9,#100d0de8 70%);box-shadow:inset 0 1px #ffffff16,0 18px 55px #000a}
.house-select-screen .house::before{content:'';position:absolute;z-index:-1;inset:8px;border:1px solid #c79d5b2e;clip-path:polygon(0 18px,18px 18px,18px 0,calc(100% - 18px) 0,calc(100% - 18px) 18px,100% 18px,100% calc(100% - 18px),calc(100% - 18px) calc(100% - 18px),calc(100% - 18px) 100%,18px 100%,18px calc(100% - 18px),0 calc(100% - 18px))}
.house-select-screen .house.wolf{border-color:#acbed599;border-bottom-color:#cbd8e8;background:linear-gradient(180deg,#17243ad9,#0b1018e8 70%)}
.house-select-screen .house:hover{transform:translateY(-5px) scale(1.012);border-color:#efd19a;box-shadow:inset 0 1px #ffffff22,0 24px 65px #000d}
.house-crest{display:grid;place-items:center;height:315px;margin:0 auto 5px}
.house-crest .crest{clip-path:none!important;mix-blend-mode:screen!important;width:255px;height:310px;max-width:none;object-fit:contain;filter:drop-shadow(0 12px 10px #000b)}
.house-crest .crest-wolf{width:240px}
.house-copy .eyebrow{font:600 .67rem/1 Georgia,'Times New Roman',serif;letter-spacing:.2em;color:#d8ad68}
.house-copy h2{margin:12px 0 13px;font:600 2.35rem/1.08 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.035em;color:#f2e8d7;text-shadow:0 3px 6px #000}
.house.wolf .house-copy h2{color:#e9f0f8}
.house-copy p{font:italic .88rem/1.45 Georgia,'Times New Roman',serif;color:#cabda8;min-height:42px}
.house .choose-label{display:inline-block;margin-top:17px;padding:9px 19px;border-top:1px solid #c89f5d5c;border-bottom:1px solid #c89f5d5c;font:600 .87rem/1 Georgia,'Times New Roman',serif;font-variant:small-caps;letter-spacing:.07em;color:#f0c77f}
.house.wolf .choose-label{color:#dbe8f6;border-color:#b8c8da5c}
.house-select-screen .setup-note{padding:4px 20px 0;font:italic .82rem/1.4 Georgia,'Times New Roman',serif;color:#c7baa5;text-shadow:0 2px 4px #000}
.player-rules h3{font-variant:small-caps;letter-spacing:.035em}
.player-rules ul{padding-left:23px}
.player-rules li{margin:5px 0}
.rules-reminder{margin-top:25px!important;padding:17px 19px;border:1px solid #a986514f;background:#0d1118;color:#e5d1ae}

.battle-mode .board-grid{grid-template-rows:minmax(178px,22%) minmax(280px,1fr) minmax(178px,22%)}
.battle-mode .opponent-team .roster{position:relative;top:13px}
.battle-mode .player-team .roster{position:relative;bottom:13px}
.battle-mode .board-team .compact-fighter{width:clamp(245px,32%,340px);flex-basis:340px}
.compact-fighter .fighter-card{height:128px;grid-template-columns:120px minmax(0,1fr);grid-template-rows:57px 64px}
.compact-fighter .profile{height:120px}
.compact-fighter .compact-title{font-size:.98rem;padding:5px 9px}
.compact-fighter .stat{font-size:.96rem}
.compact-fighter .stat img{width:27px;height:27px}
.compact-fighter .out-overlay{padding-left:122px}

/* Version 0.9.2: pull both reserve rows and score ribbons toward the octagon. */
.battle-mode .board-team{max-width:1080px}
.battle-mode .opponent-team .roster{top:24px}
.battle-mode .player-team .roster{bottom:24px}
.battle-mode .board-team .compact-fighter{width:clamp(255px,33%,360px);flex-basis:360px}
.compact-fighter .fighter-card{height:136px;grid-template-columns:128px minmax(0,1fr);grid-template-rows:61px 68px}
.compact-fighter .profile{height:128px}
.compact-fighter .compact-title{font-size:1.02rem}
.compact-fighter .stat{font-size:1rem}
.compact-fighter .stat img{width:28px;height:28px}
.compact-fighter .out-overlay{padding-left:130px}
.battle-mode .opponent-team .team-heading{transform:translateY(clamp(40px,5vh,52px))}
.battle-mode .player-team .team-heading{transform:translateY(clamp(-52px,-5vh,-40px))}

@media(max-height:850px) and (min-width:761px){
 .battle-mode .board-grid{grid-template-rows:minmax(162px,21%) minmax(270px,1fr) minmax(162px,21%)}
 .battle-mode .opponent-team .roster{top:19px}
 .battle-mode .player-team .roster{bottom:19px}
 .battle-mode .opponent-team .team-heading{transform:translateY(36px)}
 .battle-mode .player-team .team-heading{transform:translateY(-36px)}
 .battle-mode .board-team .compact-fighter{width:clamp(240px,32%,330px);flex-basis:330px}
 .compact-fighter .fighter-card{height:118px;grid-template-columns:110px minmax(0,1fr);grid-template-rows:53px 58px}
 .compact-fighter .profile{height:110px}
 .compact-fighter .compact-title{font-size:.92rem}
 .compact-fighter .stat{font-size:.9rem}
 .compact-fighter .stat img{width:24px;height:24px}
 .compact-fighter .out-overlay{padding-left:112px}
}

@media(max-width:760px){
 .house-select-screen{padding:12px 12px 28px;overflow:auto}
 .house-select-screen .board-house-banner{width:65%;opacity:.34}
 .house-rules{right:12px;top:10px;width:138px;min-height:34px;padding:7px 8px;font-size:.7rem}
 .house-select-screen .intro{padding-top:54px}
 .house-grid{grid-template-columns:1fr;gap:22px;padding:8px 5px 22px}
 .house-select-screen .house{min-height:520px;padding:19px 18px 24px}
 .house-crest{height:260px}
 .house-crest .crest{height:255px;width:210px}
 .house-copy h2{font-size:2rem}
 .battle-mode .board-grid{grid-template-rows:165px 500px 165px}
 .battle-mode .opponent-team .roster{top:16px}
 .battle-mode .player-team .roster{bottom:16px}
 .battle-mode .opponent-team .team-heading{transform:translateY(32px)}
 .battle-mode .player-team .team-heading{transform:translateY(-32px)}
 .battle-mode .board-team .compact-fighter{width:282px;flex-basis:282px}
 .compact-fighter .fighter-card{height:112px;grid-template-columns:104px minmax(0,1fr);grid-template-rows:50px 55px}
 .compact-fighter .profile{height:104px}
}

/* Final v1.0 overrides after the historical layout layers. */
.house-select-screen .house-crest{width:255px;height:310px;margin:0 auto 10px;clip-path:polygon(5% 3%,95% 3%,95% 52%,91% 67%,81% 81%,66% 92%,50% 100%,34% 92%,19% 81%,9% 67%,5% 52%)}
.house-select-screen .house-crest .crest{width:100%!important;height:100%!important}
.battle-mode .arena-title{transform:translateY(9px);position:relative;z-index:4;margin-bottom:7px}
.battle-mode .arena-title>strong{font-size:1.32rem}
.battle-mode .slot-label{font-size:.84rem}
.battle-mode .empty-slot>span:last-child{font-size:1rem}
.battle-mode .turn-label{font-size:1rem}
.battle-mode .mat-weapon{width:72%;height:72%;opacity:.09}
.battle-mode .clash-totals{justify-content:center;gap:22px;margin-bottom:5px}
.battle-mode .clash-totals>div{display:flex;align-items:center;gap:6px}
.battle-mode .clash-totals strong{font-size:2.15rem}
.battle-mode .team-heading>.crest-clip{position:absolute;z-index:3;left:13px;top:50%;width:48px;height:62px;transform:translateY(-50%)}
.battle-mode .empty-slot>.crest-clip{width:78px;height:95px;opacity:.25}
.card-back .card-back-crest{width:91%;height:91%}
@media(max-width:900px){.house-select-screen .house-crest{width:210px;height:255px}}

/* Version 1.1: clearer combat layout, transparent crests and aligned banners. */
.crest,.crest-lion,.crest-wolf,.house-crest,.crest-clip,.card-back-crest{
 clip-path:none!important;-webkit-clip-path:none!important
}
.house-crest,.crest-clip,.card-back-crest{overflow:visible!important;background:transparent!important}
.house-crest .crest,.crest-clip .crest,.card-back-crest .crest{
 mix-blend-mode:normal!important;object-fit:contain!important;transform:none!important
}
.board-house-banner img{height:104%;margin-top:-2%;transform:none}
.board-house-banner.banner-lion img{transform:translateY(2%)}
.end-screen .end h1{font-variant:normal;text-transform:none}

.battle-mode .arena-title{transform:translateY(7px);margin-bottom:13px}
.battle-mode .arena-title>strong{font-size:1.68rem;line-height:1.05}
.battle-mode .duel-line{
 grid-template-columns:minmax(185px,1fr) 68px minmax(176px,205px) 68px minmax(185px,1fr);
 gap:11px;align-items:center
}
.battle-mode .battle-middle{width:100%;max-width:205px}
.combat-score{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px;min-width:0}
.combat-score strong{font:600 3.4rem/1 Georgia,'Times New Roman',serif;color:#f2e5cb;text-shadow:0 3px 7px #000}
.combat-score .dice{width:43px;height:43px;font-size:1.32rem;border-radius:6px;box-shadow:2px 3px 0 #8f99aa,0 5px 12px #0009}
.combat-score.empty-score{visibility:hidden}
.battle-mode .octagon-round{bottom:-18px;transform:translate(-50%,50%)}
.octagon-post{position:absolute;z-index:3;width:18px;height:18px;border:3px solid #0b0d11;border-radius:50%;background:#747c89;box-shadow:0 2px 5px #000b;transform:translate(-50%,-50%);pointer-events:none}
.post-top-left{left:20%;top:1.2%}.post-top-right{left:80%;top:1.2%}
.post-right-top{left:99.2%;top:27.46%}.post-right-bottom{left:99.2%;top:72.54%}
.post-bottom-right{left:80%;top:98.8%}.post-bottom-left{left:20%;top:98.8%}
.post-left-bottom{left:.8%;top:72.54%}.post-left-top{left:.8%;top:27.46%}

.trade-back-grid{display:flex;justify-content:center;align-items:flex-start;flex-wrap:wrap;gap:22px;padding:12px 4px 5px}
.trade-card-back{border:1px solid transparent;background:none;padding:5px;border-radius:8px}
.trade-card-back .card-back{margin:0!important;transform:none!important;width:140px;height:196px;transition:transform .16s,border-color .16s,box-shadow .16s}
.trade-card-back:hover .card-back,.trade-card-back:focus-visible .card-back{transform:translateY(-8px)!important;border-color:#e7bb78;box-shadow:0 16px 27px #000b,0 0 0 2px #c59a5566}

@media(max-width:1100px){
 .battle-mode .duel-line{grid-template-columns:178px 60px 180px 60px 178px;gap:8px}
 .combat-score strong{font-size:3rem}.combat-score .dice{width:39px;height:39px}
}

/* Version 1.1.2: final setup-screen spacing and simplified arena outline. */
.setup-scene>.sound-toggle,.house-select-screen>.sound-toggle,.battle-mode .sound-toggle{
 position:fixed;z-index:120;top:12px;left:12px;padding:8px 10px
}
.coin-screen{
 display:flex;align-items:center;justify-content:center;min-height:100vh;min-height:100dvh;
 padding:32px 16px
}
.coin-screen .coin-wrap{margin:auto}
.house-select-screen .house-crest{width:204px;height:248px;margin-bottom:12px}
.board-house-banner img{height:106%;margin-top:-3%;transform:none}
.board-house-banner.banner-lion img{transform:translateY(2.5%)}
@media(max-width:900px){.house-select-screen .house-crest{width:168px!important;height:204px!important}}

/* Version 1.1.3: centered house crests, clearer arena controls and colored results. */
.house-select-screen .house{
 display:grid;grid-template-rows:minmax(0,1fr) auto;align-items:stretch
}
.house-select-screen .house-crest{
 align-self:center;justify-self:center;margin:0 auto
}
.battle-mode .round-controls{margin-top:22px}
.end-screen .result-table .result-lion{color:#e56b63;font-weight:700}
.end-screen .result-table .result-wolf{color:#78ace8;font-weight:700}

/* Version 1.1.4: symmetrical combat spacing and aligned card hands. */
.battle-mode .side-hand{
 justify-content:center;padding-top:0
}
.battle-mode .hand-heading{
 flex:0 0 50px;margin:0
}
.battle-mode .vertical-hand,.battle-mode .opponent-card-backs{
 flex:0 0 auto;padding-top:0
}
.battle-mode .vertical-hand .action{
 height:205px;min-height:205px
}
.battle-mode .vertical-hand .action+.action{margin-top:-151px}
.battle-mode .opponent-card-backs .card-back+.card-back{margin-top:-140px}

/* Keep instructions and turn controls visibly below the empty weapon/card field. */
.battle-mode .empty-pile+.round-controls{
 transform:translateY(76px)
}

/* Mirror all horizontal moves around the exact centre of the octagon. */
.battle-mode .combat-score.side-0{transform:translateX(-34px)}
.battle-mode .combat-score.side-1{transform:translateX(34px)}
.battle-mode .your-active{transform:translateX(22px)}
.battle-mode .enemy-active{transform:translateX(-22px)}

@media(max-width:1100px){
 .battle-mode .vertical-hand .action+.action{margin-top:-156px}
 .battle-mode .opponent-card-backs .card-back+.card-back{margin-top:-110px}
}
@media(max-height:850px) and (min-width:761px){
 .battle-mode .side-hand{padding-top:0}
 .battle-mode .vertical-hand .action{height:185px;min-height:185px}
 .battle-mode .vertical-hand .action+.action{margin-top:-154px}
 .battle-mode .opponent-card-backs .card-back+.card-back{margin-top:-105px}
 .battle-mode .empty-pile+.round-controls{transform:translateY(66px)}
}

/* Version 1.2.5: one fixed navigation stack on every game screen. */
#game .house-rules{display:none!important}
.game-corner-controls{
 position:fixed;z-index:1000;top:14px;right:20px;
 display:flex;flex-direction:column;gap:8px;width:158px
}
.game-corner-controls .game-home-link,
.game-corner-controls .house-rules{
 position:static!important;inset:auto!important;display:inline-flex;
 align-items:center;justify-content:center;width:100%;min-height:38px;margin:0;padding:8px 12px
}
.game-corner-controls .game-home-link{order:1}
.game-corner-controls .house-rules{order:2}
@media(max-width:760px){
 .game-corner-controls{top:10px;right:12px;width:138px;gap:7px}
 .game-corner-controls .game-home-link,
 .game-corner-controls .house-rules{min-height:34px;padding:7px 8px}
}
