/* Keep the board square and within the desktop viewport. */
.brand{gap:12px}.brand img,.game-screen .brand img{width:38px;height:38px;object-fit:contain}
.brand>span,.game-screen .brand>span{font-size:22px;letter-spacing:5px}.brand small{font-size:6px;letter-spacing:3px}
.game-layout{display:grid;grid-template-columns:210px minmax(0,1fr) 225px;min-height:0;max-width:1590px;gap:32px;padding:24px 28px 16px;align-items:start}
.board-zone{width:min(100%,740px,calc(100svh - 180px));max-width:none;margin:0 auto;min-width:0}
.board{grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));width:100%;aspect-ratio:1;min-height:0}
.board-center{padding:4% 4% 2%;min-height:0;min-width:0;gap:0}
.player-list{gap:10px;margin-top:16px;max-height:calc(100svh - 345px);min-height:180px;overflow-y:auto;padding:2px 3px 3px;scrollbar-width:thin}
.player-panel{min-height:85px;padding:11px 9px 8px;grid-template-columns:42px minmax(0,1fr) 27px;gap:8px;flex-shrink:0}
.avatar{width:40px;height:40px}.player-name{font-size:16px}.magic{font-size:19px}.player-bottom{font-size:8px}
.objective{margin-top:18px;padding:16px 0;gap:12px}.objective-sigil{width:32px;height:32px;flex-shrink:0;object-fit:contain}
.sidebar-log{margin-top:16px}.sidebar-log p{padding:8px 0;font-size:9px}
.actions-panel{display:flex;flex-direction:column;min-height:0;padding-top:35px;min-width:0}.actions-panel>*{grid-row:auto}
.action-copy p{min-height:0}.action-buttons{margin-top:24px;gap:9px}.action-buttons .btn{min-height:43px;font-size:11px}
/* Match the original, subdued forest grading, after each owner's tint. */
.tile.forest>img{filter:var(--forest-tint,brightness(1)) saturate(.62) brightness(.68);opacity:1}
.tile.forest:hover>img{filter:var(--forest-tint,brightness(1)) saturate(.68) brightness(.84)}
.tile.forest.current>img{filter:var(--forest-tint,brightness(1)) saturate(.65) brightness(.76)}
.center-heading{flex-shrink:0;margin:0 0 4%;width:100%}.center-heading .eyebrow{font-size:7px}
.center-heading h2{font-size:clamp(17px,1.7vw,25px)}.center-heading>p{font-size:9px}
.duel-arena{width:80%;max-width:390px;display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);gap:12px;align-items:center;margin:0 auto;flex-shrink:0}
.fighter{width:100%;min-width:0;position:relative}.fighter .creature-card{aspect-ratio:.64;width:100%;height:auto;max-height:none;transform-origin:center 80%}
.fighter-role{font-size:9px;min-height:24px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;margin-bottom:5px;text-align:center}
.health-label{font-size:9px}.health-track{margin-top:8px}.combat-log{font-size:9px;width:90%;margin-top:auto;padding-top:8px;flex-shrink:0}
.center-foot{font-size:8px;white-space:normal;text-align:center;line-height:1.5;margin-top:auto;padding-top:10px;flex-shrink:0}
.traveler-portrait img{width:65%;border-width:2px}.traveler-portrait span{margin-top:18px;letter-spacing:1px;font-size:8px}
.forest-preview{width:88%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8%;margin:auto 0}
.forest-preview .creature-card{aspect-ratio:.64}
.turn-banner{display:flex;align-items:center;justify-content:center;gap:10px;flex-shrink:0;margin:4% auto;color:#bac4bc;font-size:10px}
.turn-banner img{width:28px;height:28px;border:1px solid var(--player);border-radius:50%}.turn-banner span{color:var(--player)}
.card-status{font-size:6px}.card-stats small{font-size:6px}.card-latin{font-size:11px}.battle-heading{margin:0 0 4%}
.auto-battle-note{color:#b7c7b6;line-height:1.7;font-size:12px;border:1px solid #77927d30;padding:13px;border-radius:3px;background:#16291d22}
.auto-battle-note small{display:block;color:var(--muted);font-size:10px;margin-top:6px}
.fighter.striking{z-index:8}.fighter.receiving .creature-card{border-color:#d7a385}
.damage-float{position:absolute;z-index:9;top:35%;left:50%;font-family:Georgia,serif;font-size:27px;color:#f0b9a8;text-shadow:0 2px 6px #000;pointer-events:none;transform:translateX(-50%)}
.inventory-section{max-width:1534px;margin:20px auto 35px;padding:28px}.inventory-item{max-width:205px}
@media(min-width:1500px){.game-layout{padding-top:30px;gap:40px;grid-template-columns:225px minmax(0,1fr) 240px}}
@media(min-width:1051px) and (max-height:800px){
 .game-screen .topbar{height:64px}.game-layout{padding-top:15px;gap:24px;grid-template-columns:195px minmax(0,1fr) 205px}
 .board-zone{width:min(100%,calc(100svh - 145px))}.actions-panel{padding-top:27px}
 .player-list{max-height:calc(100svh - 310px);gap:8px;margin-top:10px}.player-panel{min-height:78px;padding:8px;grid-template-columns:37px minmax(0,1fr) 24px}
 .avatar{width:35px;height:35px}.player-name{font-size:14px}.magic{font-size:17px}.sidebar-log p:nth-last-child(1){display:none}
 .center-heading h2{font-size:20px}.center-heading>p{font-size:8px}.fighter-role{font-size:8px;min-height:18px}
 .health-label{font-size:8px}.combat-log{font-size:8px}.card-stats{font-size:27px}.center-foot{font-size:7px}
}
@media(max-width:1050px){
 .game-layout{display:flex;flex-direction:column;align-items:center;gap:18px;padding:18px 20px;max-width:780px}
 .players-panel{width:100%;padding:0;min-width:0}.players-panel>.section-label{display:none}
 .player-list{display:flex;flex-direction:row;overflow-x:auto;overflow-y:hidden;gap:8px;max-height:none;min-height:0;margin:0;padding:2px 1px 7px;scroll-snap-type:x proximity}
 .player-panel{min-width:170px;max-width:190px;flex:0 0 170px;min-height:82px;padding:10px 8px;grid-template-columns:36px minmax(0,1fr) 22px;gap:7px;scroll-snap-align:start}
 .avatar{width:34px;height:34px}.player-name{font-size:14px}.magic{font-size:17px}.player-score{font-size:18px}
 .players-panel .objective,.players-panel .sidebar-log,.players-panel>.btn{display:none}
 .board-zone{width:100%;max-width:600px;margin:0 auto}
 .actions-panel{width:100%;max-width:600px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:12px 20px;padding:18px 0 0;border:0;border-top:1px solid var(--line);background:none;min-height:0}
 .actions-panel>.location-heading{display:none}.actions-panel>.dice-display{grid-column:1;grid-row:1;padding:0;justify-content:start}
 .dice-display>img{width:38px;height:38px}.dice-display>span{margin-left:8px;margin-right:0;font-size:26px}
 .actions-panel>.action-copy{grid-column:1;grid-row:2;margin:0}.action-copy h3{font-size:22px;margin:7px 0}.action-copy p{font-size:10px;line-height:1.7;min-height:0}
 .actions-panel>.action-buttons{grid-column:2;grid-row:1/4;display:flex;flex-direction:column;margin:0;gap:8px;align-self:start}
 .action-buttons .btn{width:100%;height:auto;min-height:44px;font-size:11px;padding:10px 8px}
 .actions-panel>.turn-note{grid-column:1;grid-row:3;margin:0;font-size:8px}.actions-panel>.btn{display:none}
 .inventory-section{padding:24px 20px;margin-top:12px}.inventory-section>header{align-items:start;gap:14px;flex-direction:column}
 .topbar,.game-screen .topbar{height:66px;padding:0 20px;gap:12px}.main-nav{gap:18px}.main-nav>button{font-size:10px}
 .brand>span,.game-screen .brand>span{font-size:20px;letter-spacing:3px}
}
@media(max-width:620px){
 .game-layout{padding:12px 12px 16px;gap:15px}.topbar,.game-screen .topbar{padding:0 14px;height:64px;gap:8px}.brand{gap:10px}
 .brand>span,.game-screen .brand>span{font-size:19px;letter-spacing:2.5px}.brand small{font-size:5px;letter-spacing:2px}
 .brand img,.game-screen .brand img{width:31px;height:31px}.header-tools{gap:1px}.icon-button{width:29px;height:36px}
 .player-panel{min-width:145px;max-width:145px;flex-basis:145px;min-height:74px;padding:8px 7px 6px;grid-template-columns:31px minmax(0,1fr) 20px;gap:5px}
 .avatar{width:29px;height:29px}.player-name{font-size:13px}.magic{font-size:16px;margin-top:4px}.magic small{display:none}
 .player-score{font-size:17px}.player-score small{font-size:5px}.player-bottom,.player-bottom>span:first-child{font-size:7px}
 .board-center{padding:4% 3% 2%}.center-heading{margin:0 0 3%}.center-heading h2{font-size:17px;margin:3px 0;letter-spacing:0}
 .center-heading .eyebrow{font-size:5px;letter-spacing:1.3px}.center-heading>p{font-size:7px}
 .duel-arena{width:82%;gap:7px;grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr)}
 .fighter-role{font-size:7px;min-height:17px;margin-bottom:4px}.fighter .card-stats{font-size:22px}
 .card-latin{font-size:8px}.card-stats small{font-size:4px}.card-status{font-size:4px}.card-stats{font-size:21px}
 .center-foot{font-size:6px;padding-top:5px;line-height:1.4;gap:5px}.traveler-portrait span{font-size:6px;letter-spacing:.5px;margin-top:12px}
 .versus{font-size:11px}.health-label{font-size:7px;margin-top:4px}.health-label>span{font-size:5px}.health-track{height:3px;margin-top:5px}
 .combat-log{font-size:6px;width:92%;padding-top:5px;line-height:1.4}.combat-log>p{gap:5px}
 .forest-preview{width:90%;gap:6%}.turn-banner{font-size:8px;margin:3% auto;gap:7px}.turn-banner img{width:23px;height:23px}
 .board-bottomline{font-size:7px}.board-bottomline>span:last-child{display:none}
 .actions-panel{gap:10px 13px;padding:16px 2px 0}.dice-display{gap:7px}.dice-display>img{width:31px;height:31px}.dice-display>span{font-size:24px;margin-left:4px}
 .action-copy .section-label{font-size:6px}.action-copy h3{font-size:20px}.action-copy p{font-size:10px}.actions-panel>.turn-note{font-size:7px}
 .action-buttons .btn{font-size:10px;min-height:43px}.auto-battle-note{font-size:11px;padding:11px}.auto-battle-note small{font-size:9px}
 .inventory-section{padding:22px 14px;margin-top:0}.inventory-section>header p{font-size:10px}.inventory-item{max-width:none}
 .inventory-section .card-stats{font-size:32px}.inventory-section .card-latin{font-size:13px}.inventory-section .card-status{font-size:7px}.inventory-section .card-stats small{font-size:7px}
 .game-footer{font-size:9px}
}
@media(max-width:360px){
 .brand>span,.game-screen .brand>span{font-size:16px}.brand img,.game-screen .brand img{width:27px;height:27px}
 .center-heading h2{font-size:15px}.center-heading>p{font-size:6px}.fighter-role{font-size:6px;min-height:14px}
 .duel-arena{width:78%}.combat-log>p:first-child:not(:last-child){display:none}.action-copy h3{font-size:18px}
}
/* Only actual encounters occupy the arena. The selected attacker stays by the action. */
.single-guardian{width:33%;max-width:170px;margin:auto;flex-shrink:0}
.single-guardian .creature-card{width:100%;aspect-ratio:.64;height:auto}
.board-center>.duel-arena{margin:auto}
.place-emblem{display:flex;align-items:center;justify-content:center;margin:auto;width:32%;max-width:150px;aspect-ratio:1;opacity:.72}
.place-emblem img{display:block;width:100%;height:100%;object-fit:contain}
.place-caption{text-align:center;color:var(--muted);font-size:11px;line-height:1.6;max-width:85%;margin:14px auto 8px}
.hp-value{display:inline-block;font:inherit;font-weight:400;transform-origin:center;position:relative}
.attacker-preview{display:flex;align-items:center;text-align:left;gap:10px;border:1px solid #927b4f66;background:#141c20b3;color:var(--text);border-radius:3px;padding:9px;width:100%;cursor:pointer}
.attacker-preview>img{width:42px;height:60px;object-fit:cover;border:1px solid #87735177;border-radius:3px;flex-shrink:0}
.attacker-preview>span{display:flex;flex-direction:column;gap:5px;min-width:0}
.attacker-preview small{font-size:7px;letter-spacing:1px;color:var(--gold)}
.attacker-preview strong{font-family:Georgia,serif;font-size:14px;font-weight:400}
.attacker-stats{font-size:9px;color:var(--muted)}.attacker-stats b{color:#d56b70;font-weight:400}
@media(max-width:620px){
 .single-guardian{width:34%;max-width:120px}.single-guardian .card-stats{font-size:26px}
 .place-caption{font-size:8px;margin:6px auto}.place-emblem{width:29%}
 .attacker-preview{gap:7px;padding:7px}.attacker-preview>img{width:32px;height:46px}
 .attacker-preview strong{font-size:11px}.attacker-preview small{font-size:6px;letter-spacing:.5px}.attacker-stats{font-size:8px}
}

.attacker-preview{grid-column:1/-1}
