/* UPDATE66 — the mercenary company's campaign table. No external texture dependency. */
:root{--night:#15100b;--panel:#26251d;--panel-2:#302c22;--ink:#eee2c8;--muted:#bdaf91;--line:#6b58403d;--gold:#bb9455;--gold-bright:#e0bd79;--shadow:0 16px 40px #0007}
body{background-color:#24180f;background-image:linear-gradient(90deg,#0006,transparent 18%,transparent 82%,#0006),repeating-linear-gradient(2deg,#c69a5b05 0 1px,transparent 1px 7px),repeating-linear-gradient(90deg,#372519 0 150px,#20150e 150px 153px,#2b1d13 153px 304px);background-attachment:fixed}
.game-shell{max-width:1560px}
.topbar{gap:12px;border-bottom:2px solid #9c794847;min-height:64px}
.topbar h1{font-family:Georgia,'Noto Serif KR',serif;font-size:1.5rem;letter-spacing:.02em}
.topbar>.turn-pill{margin-right:auto;white-space:nowrap}
.topbar-actions{margin-left:auto;flex-shrink:0}
.brand-mark{border-radius:3px;border-color:#a9844a;background:#3f2e19;box-shadow:inset 0 0 0 3px #21170d}
.turn-pill,.ghost-button,.secondary-button{border-radius:4px;border-color:#8d754c;background:#251e15;color:#e3cfaa}
.primary-button,.end-turn-button,.weapon-action{border-radius:4px;background:linear-gradient(#dac18a,#b4975e);color:#271c0f;border:1px solid #e4cc93;box-shadow:inset 0 0 0 2px #5f432c33,0 3px 0 #4c321c}
.fighter-panel,.combat-center{border:1px solid #7a694b;border-radius:5px;box-shadow:inset 0 0 0 3px #171a14,0 5px 12px #0005;background-color:#252a22;background-image:repeating-linear-gradient(0deg,#fff02 0 1px,transparent 1px 4px)}
.class-emblem{border-radius:4px;border:2px solid #a1834e;background:#33291c;box-shadow:0 0 0 2px #100e09}
.resource{border-radius:4px;background:#12181088}
.resource.energy{background:#3b3521;border-color:#c7a963}
.energy-orb{border-radius:2px;transform:rotate(45deg);margin:1px}
.energy-orb.filled{background:#e2c482;box-shadow:inset 0 0 0 1px #ffeda799}
.status-chip{border-radius:3px;background:#302b36;border-color:#82718e}
.combat-center{grid-template-rows:auto 1fr;gap:8px 14px;padding:10px 14px;background-color:#24302a}
.battle-view-tabs66{display:flex;align-items:center;gap:8px;grid-column:1;font-size:12px;min-height:30px}
.battle-view-tabs66 button{color:#b5a481;border:0;border-bottom:2px solid transparent;background:none;padding:4px 6px;cursor:pointer}
.battle-view-tabs66 button[aria-pressed=true]{color:#f0dab0;border-color:#c29c56}
.weapon-zone{grid-column:1;grid-row:2;min-height:100px;gap:10px;grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr)}
.weapon-slot{min-height:94px;padding:8px 12px;gap:3px;border:1px solid #8a795649;border-radius:4px;background:#141c1799}
.weapon-slot strong{font-size:1rem}.weapon-slot small{line-height:1.4}
.weapon-action{min-height:30px;padding:4px 12px;margin-top:4px;font-size:12px}
.versus-mark{width:34px;height:34px;font-size:11px;border-color:#8b734b;background:#181b12}
.battle-log{grid-column:2;grid-row:1/3;background:#ded0b0;color:#392f21;border:1px solid #9d8253;border-radius:3px;padding:10px 12px;box-shadow:inset 0 0 20px #8b65332e;min-height:0}
.battle-log .log-heading,.battle-log strong{color:#62401e}.battle-log #log-list{height:120px;max-height:120px;min-height:0;color:#453727;overflow-y:auto}
.battle-log li{border-color:#8b714d38}.battle-log .log-turn-divider{background:#ded0b0;color:#604622;border-color:#9d8253}
.battle-log #log-list li,.battle-log #log-list li span{color:#453727}.battle-log #log-list li strong{color:#62401e}
.passive-details66>summary{display:none}.passive-details66:not([open])>.passive-copy{display:block}
.card-hand{gap:10px}
.game-card{--card-edge66:#847254;border-radius:5px!important;border:1px solid var(--card-edge66)!important;background:linear-gradient(105deg,#e2d3b3,#cbb88e)!important;color:#34291c;box-shadow:inset 0 0 0 3px #f5e6bd66,0 5px 9px #0006}
.game-card .card-name{color:#302215;font-family:Georgia,'Noto Serif KR',serif}
.game-card .card-text{color:#4a3c29}.game-card .card-footer{color:#746044}
.game-card .card-type{color:var(--card-edge66);font-weight:850}.game-card .card-cost{border:1px solid #89703d;background:#382b19;color:#ffe6a5}
.game-card .card-art-frame{border:1px solid #89714a;border-radius:2px;background:#41382b}
.game-card.skill{--card-edge66:#853c2e}.game-card.weapon{--card-edge66:#51616a}.game-card.buff{--card-edge66:#706042}.game-card.equipment{--card-edge66:#806133}.game-card.counter{--card-edge66:#306b61}
.game-card:disabled{opacity:.57;filter:saturate(.45)}
.game-card:not(:disabled){outline:1px solid #d7bc74;outline-offset:-4px}
.game-card:hover:not(:disabled){box-shadow:0 0 0 2px #e5c57d,0 8px 16px #0006}
.game-card.counter-available{outline:2px solid #69bc98;outline-offset:1px}
.game-card::after{opacity:.2}
.game-dialog{border-color:#8c7145;border-radius:6px;background:#221b13}
.dialog-card,.utility-card,.main-menu-card{background:linear-gradient(110deg,#32281b,#211c14);border-radius:4px}
.main-menu-heading{padding:12px 0 22px;border-bottom:1px solid #8d7045;margin-bottom:18px}
.main-menu-heading h2{font-family:Georgia,'Noto Serif KR',serif;letter-spacing:.12em;color:#f3dfb6}
.main-menu-grid button{border-radius:3px;border:1px solid #8c754e;background:#262b23;box-shadow:inset 0 0 0 3px #10150e80,0 4px 6px #0005}
.main-menu-grid button:hover{background:#354035;border-color:#d1b37c}
.deck-choice,.deck-card-row{border-radius:4px;border-color:#766449;background:#2d3025}
.deck-choice:has(input:checked){outline-color:#dfc58a;background:#444733}
.deck-card-title strong{font-family:Georgia,'Noto Serif KR',serif}
.deck-card-meta{color:#e1bd7d}.deck-card-row p{color:#d4c5a7}
.deck-art-expand summary .card-art-frame{border-radius:2px}
.element-formula-guide,.choice-panel{border-radius:5px;background:#262b23;border-color:#8e7950}
.choice-option{border-radius:4px;background:#383526;border-color:#a68a50}
.mobile-card-zoom66[hidden]{display:none!important}.mobile-card-zoom66{display:none}
@media(min-width:721px){
 .combat-center[data-view66=log] .battle-log{box-shadow:0 0 0 2px #ddbe79,inset 0 0 20px #8b65332e}
}
@media(max-width:720px){
 :root{--tray66:218px;--safe66:env(safe-area-inset-bottom,0px)}
 body.battle-active66{height:100dvh;min-height:0;overflow:hidden}
 .game-shell{padding:0 7px;min-height:0;height:100dvh;display:flex;flex-direction:column}
 .topbar{height:44px;min-height:44px;gap:7px;flex-shrink:0;flex-wrap:nowrap}
 .topbar .brand-mark,.topbar .eyebrow{display:none}
 .topbar h1{font-size:16px;white-space:nowrap;margin:0;letter-spacing:0}
 .brand-lockup{min-width:0;gap:0}.topbar .turn-pill{font-size:10px;padding:4px 6px;margin-right:auto;flex-shrink:0;min-height:28px}
 .topbar-actions{gap:0;width:auto}.topbar #new-game-button{font-size:11px;padding:6px 9px;min-height:30px;white-space:nowrap}
 .battle-board{display:flex;flex-direction:column;gap:6px;margin-top:6px;overflow:auto;overscroll-behavior:contain;min-height:0;flex:1;padding:1px 1px 10px;margin-bottom:calc(var(--tray66) + var(--safe66));scrollbar-width:thin}
 .battle-board>.fighter-panel,.battle-board>.combat-center{flex:0 0 auto}
 .fighter-panel{padding:8px!important;overflow:visible}
 .enemy-panel,.player-summary{display:flex!important;flex-wrap:wrap;gap:6px;align-items:center}
 .fighter-identity{width:100%;gap:8px;flex:none!important}
 .fighter-identity>div{flex:1}.fighter-panel h2{font-size:14px;margin:0;line-height:1.3}
 .class-emblem{width:34px;height:38px;min-width:34px;border-width:1px}
 .side-label{font-size:9px;margin:0}.passive-details66>summary{display:block;cursor:pointer;color:#c9b889;font-size:10px;margin-top:2px;list-style:none}
 .passive-details66>summary::before{content:'▸ ';}.passive-details66[open]>summary::before{content:'▾ ';}
 .passive-details66:not([open])>.passive-copy{display:none}.passive-copy{font-size:11px;line-height:1.5;margin:4px 0 0}
 .fighter-panel .resource-row{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;width:100%;max-width:none;flex:none!important}
 .fighter-panel .resource-row .resource,.fighter-panel .resource-row .resource.hp{grid-column:auto!important;grid-row:auto!important;width:auto;min-width:0!important;min-height:36px;padding:4px 3px!important;display:flex;align-items:center;justify-content:center;gap:2px;flex-wrap:wrap}
 .fighter-panel .resource-row .resource.hp{display:block;grid-column:1/-1!important;min-height:30px;padding:3px 7px!important}.resource-label{gap:3px;justify-content:space-between;white-space:nowrap}
 .fighter-panel .resource-row .resource b{font-size:13px;line-height:1.2}.fighter-panel .resource-row .resource small{font-size:8px;white-space:nowrap}
 .fighter-panel .resource-row .hp-track{height:4px;margin-top:4px}.resource-icon{display:none}
 .fighter-panel .resource-row .energy{padding-bottom:11px!important}.energy-orbs{bottom:3px;left:4px;right:4px;gap:2px;justify-content:center}.energy-orb{width:5px;height:5px;margin:0}
 .status-row{min-height:0;margin-top:5px;gap:4px;width:100%}.status-chip{font-size:9px;padding:3px 5px}.status-row:empty{display:none}
 .combat-center{display:block!important;padding:5px 7px;min-height:0}
 .battle-view-tabs66{min-height:26px;gap:6px}.battle-view-tabs66 button{min-height:26px;font-size:11px;padding:2px 7px}
 .weapon-zone{display:grid;grid-template-columns:1fr 1fr!important;gap:6px;min-height:0;align-items:stretch}
 .weapon-zone .versus-mark{display:none}.weapon-slot{min-height:63px;padding:5px 6px;gap:1px;border-radius:3px}
 .weapon-slot strong{font-size:12px;margin:1px 0}.weapon-slot small,.weapon-slot .slot-label{font-size:9px;line-height:1.3}
 .weapon-action{min-height:27px;font-size:10px;padding:3px 5px;margin-top:3px}
 .battle-log{display:none;padding:6px 8px;min-height:0}.combat-center[data-view66=log] .weapon-zone{display:none}.combat-center[data-view66=log] .battle-log{display:block}
 .battle-log #log-list{height:86px;max-height:86px;font-size:11px}.log-heading{font-size:10px;margin-bottom:3px}
 .dual-weapons{gap:3px}.dual-weapon-slot{padding:4px;gap:2px}.dual-weapon-slot strong{font-size:10px}.dual-weapon-slot .weapon-action{min-height:27px;font-size:10px}.dual-weapon-rules{font-size:9px}
 #player-panel>.hand-heading{position:fixed;z-index:40;left:0;right:0;bottom:calc(174px + var(--safe66));height:44px;min-height:44px;margin:0;padding:5px 10px;display:flex;align-items:center;gap:6px;background:#271d12;border-top:2px solid #917144;box-shadow:0 -4px 16px #0005}
 .hand-heading>span{font-size:11px;color:#ddc7a2}.hand-heading .end-turn-button{padding:6px 10px;min-height:30px;white-space:nowrap;font-size:11px}.hand-heading #end-turn-button{margin-left:auto}
 .hand-heading #math-calculate62,.hand-heading #archaeologist-arrange{margin-left:auto;margin-right:0}
 #player-hand{position:fixed;z-index:39;left:0;right:0;bottom:0;height:calc(174px + var(--safe66));min-height:0;display:flex!important;flex-wrap:nowrap;align-items:stretch;gap:8px;margin:0;padding:5px 10px calc(8px + var(--safe66));overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x;scrollbar-width:thin;background:repeating-linear-gradient(1deg,#ffffff03 0 1px,transparent 1px 6px),#342419;box-shadow:inset 0 0 15px #0007}
 #player-hand>.game-card{flex:0 0 116px!important;width:116px!important;min-width:116px!important;max-width:116px;min-height:0!important;height:156px!important;padding:7px!important;gap:4px;transform:none!important;animation:none!important;display:flex;flex-direction:column;overflow:hidden;user-select:none}
 #player-hand>.game-card:disabled{pointer-events:none}#player-hand>.game-card.mobile-selected66{outline:2px solid #ffdd8d;outline-offset:-2px}
 #player-hand .card-topline{min-height:19px;gap:2px}#player-hand .card-cost{width:22px;height:22px;min-width:22px;font-size:12px}#player-hand .card-type{font-size:9px}
 #player-hand .card-art-frame{height:44px!important;min-height:44px;flex:none}#player-hand .card-name{font-size:12px;line-height:1.2}
 #player-hand .card-text{font-size:10px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
 #player-hand .card-footer{display:none}#player-hand .game-card::before{display:none!important}
 #player-hand [data-scope-position]{flex:0 0 78px;min-width:78px}
 .mobile-card-zoom66{display:block;position:fixed;z-index:55;left:50%;bottom:calc(var(--tray66) + var(--safe66) + 6px);transform:translateX(-50%);width:min(310px,88vw);max-height:calc(100dvh - var(--tray66) - var(--safe66) - 58px);overflow:auto;padding:9px;background:#241d14;border:1px solid #d5b879;box-shadow:0 10px 40px #000b;border-radius:5px;overscroll-behavior:contain}
 .zoom-heading66{display:flex;justify-content:space-between;align-items:center;gap:5px;margin-bottom:7px;font-size:10px;color:#e8d9b4}.zoom-heading66 button{padding:4px 9px;min-height:29px}
 .mobile-card-zoom66 .game-card{width:100%;min-height:0;max-height:none;padding:13px;display:flex;flex-direction:column;gap:8px;transform:none!important;animation:none!important;text-align:left}
 .mobile-card-zoom66 .game-card:disabled{opacity:1;filter:none}.mobile-card-zoom66 .card-art-frame{height:90px;min-height:90px}.mobile-card-zoom66 .card-text{font-size:14px;line-height:1.55}.mobile-card-zoom66 .card-name{font-size:18px}.mobile-card-zoom66 .card-footer{font-size:10px}
 .mobile-card-zoom66 details{margin-top:8px;font-size:12px}.mobile-card-zoom66 details p{white-space:pre-line;line-height:1.6}
 .played-card-visual{max-width:150px;top:30px;left:7px}.played-card-visual .card-art-frame{height:46px}
 .puppet-grid63:not([hidden]){gap:4px;margin-top:5px}.puppet63{padding:5px;font-size:10px}.puppet63 p{margin:3px 0}.puppet-steps63{gap:4px;margin-top:4px}.puppet-steps63 span{width:18px;height:18px;font-size:10px}
 .totem-zone,.turret-zone,.garden-zone,.summon-zone,.math-zone62{padding:5px;margin-top:5px}.math-zone62{font-size:11px}.math-zone62 strong{font-size:13px}.summon-heading,.turret-heading,.totem-heading{font-size:9px}
 .pvp-connection{font-size:10px;padding:3px 6px;margin:2px 0;flex-shrink:0}.pvp-clocks{font-size:11px;margin:2px 0;flex-shrink:0}
 .choice-inspect65{font-size:11px}.player-panel>.choice-inspect65:not([hidden]){position:fixed;z-index:43;bottom:calc(var(--tray66) + var(--safe66) + 3px);right:10px;margin:0;background:#33261a}
 #situation-content65 .hand-heading,#situation-content65 .card-hand{position:static;display:grid!important;height:auto;padding:6px}
 .tutorial-coach{bottom:calc(var(--tray66) + var(--safe66) + 8px);max-height:150px;overflow:auto;font-size:12px}
}
@media(max-width:720px) and (max-height:600px){:root{--tray66:174px}#player-panel>.hand-heading{bottom:calc(130px + var(--safe66))}#player-hand{height:calc(130px + var(--safe66))}#player-hand>.game-card{height:114px!important}#player-hand .card-art-frame{height:28px!important;min-height:28px}#player-hand .card-text{-webkit-line-clamp:1}.mobile-card-zoom66{max-height:calc(100dvh - 50px);bottom:8px}.mobile-card-zoom66 .card-art-frame{height:48px;min-height:48px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
