/* Generated at build time for 430px mobile preview. */

/* assets/css/game.css */
.app{grid-template-columns:220px minmax(650px,1fr)}.right{grid-column:1 / -1;display:grid;grid-template-columns:repeat(3,1fr)}.app{display:block;padding:6px}.side{margin-bottom:8px}.left{display:grid;grid-template-columns:1fr 1fr}.left .brand,.left .log{grid-column:1/-1}.boardwrap{min-height:720px}.right{display:block}.hud-status{
    grid-template-columns:65px 78px 82px 62px minmax(120px,1fr) minmax(120px,1fr) 85px;
  }.hud-actions{
    grid-column:1/-1;
    grid-template-columns:repeat(4,1fr);
  }.battle-panel{height:auto;min-height:100vh}.bottom-hud{position:sticky;bottom:0}.hud-status{
    grid-template-columns:repeat(4,1fr);
  }.hud-hp{
    grid-column:span 2;
  }.hud-block.mana{
    grid-column:span 2;
  }.hud-actions{
    grid-column:span 2;
    grid-template-columns:repeat(2,1fr);
    min-width:0;
  }.bottom-hud .hand{
    min-height:118px;
  }.bottom-hud .card{
    flex-basis:92px;
    height:116px;
  }.card-manager-box{height:94vh}.manager-main{grid-template-columns:1fr;grid-template-rows:210px 1fr}.manager-list-pane{border-right:0;border-bottom:1px solid #2d3d59}.manager-grid{grid-template-columns:1fr}.manager-preview{height:220px}.manager-form{grid-template-columns:1fr}.app{grid-template-columns:205px minmax(650px,1fr) 305px}.reference-topbar{grid-template-columns:minmax(315px,1.2fr) 125px minmax(260px,1fr)}.top-field select{min-width:105px}.reference-brand h1{font-size:27px}html,body{overflow:auto}.app{height:auto;display:grid;grid-template-columns:190px minmax(660px,1fr);min-width:900px}.reference-right{grid-column:1/3;height:470px;display:grid;grid-template-columns:220px 1fr 1fr 220px}.right-resource-frame,.enemy-roster-section,.ally-roster-section,.selection-strip{height:auto!important;min-height:0}.reference-topbar{width:min(470px,calc(100% - 22px))}.slots.n4{grid-template-columns:repeat(4,minmax(80px,132px))}.slots.n3{grid-template-columns:repeat(3,minmax(88px,140px))}.slots.n2{grid-template-columns:repeat(2,minmax(96px,150px))}#hand.hand .card{height:132px}.reference-topbar{position:relative;top:auto;right:auto;width:auto}.boardwrap{padding-top:8px}.left-status-frame{display:none}.reference-right{grid-column:1/3;height:640px;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:220px 180px 1fr}.enemy-roster-section{grid-column:1;grid-row:1/3;height:auto;flex:auto}.right-deck-section{grid-column:2;grid-row:1;height:auto}.right-hand-section{grid-column:2;grid-row:2/4;height:auto}.selection-strip{grid-column:1;grid-row:3;height:auto}.app{grid-template-columns:210px minmax(520px,.78fr) 330px}.board{width:82%;min-width:500px;max-width:740px}.slots.n4{grid-template-columns:repeat(4,minmax(68px,112px))}.slots.n3{grid-template-columns:repeat(3,minmax(76px,120px))}.slots.n2{grid-template-columns:repeat(2,minmax(84px,128px))}#hand.hand .card{height:120px}.app{height:auto;grid-template-columns:190px minmax(520px,1fr);min-width:860px}.reference-topbar{width:174px;margin:6px 0 6px 6px}.top-control-group{grid-template-columns:1fr}.top-new{grid-column:1}.top-options{grid-template-columns:1fr 1fr}.board{width:90%;min-width:460px}.reference-right{grid-column:1/3;height:620px;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:200px 160px 1fr}.app{grid-template-columns:198px minmax(520px,.8fr) 340px}.board{min-width:500px;max-width:730px}#hand.hand .card{height:166px}.hq-advisor-console{width:134px}.hq-info-overlay,.hq-advisor-summary{right:148px}.hq-unit-slot{right:148px}.basezone{height:112px!important;min-height:112px!important}.basezone>.hq,.hq.faction-fortress{height:110px!important;min-height:110px!important}.lane{min-height:82px!important}.slots{min-height:78px!important;height:78px!important}.slot{height:76px!important}#hand.hand{grid-template-rows:repeat(2,145px)!important;grid-auto-rows:145px!important;min-height:295px!important}#hand.hand .card{height:145px!important;grid-template-rows:16px 74px 1fr!important}.battlefield-layout{grid-template-columns:minmax(0,1fr) 164px;gap:0}.rail-hq-wrap{height:142px;min-height:142px}.field-side-rail .hq.faction-fortress{height:142px!important;min-height:142px!important}.rail-advisor-row{height:62px;min-height:62px}.field-side-rail .advisor{height:62px!important;min-height:62px!important}.field-side-rail .advisor-portrait{height:50px!important;width:28px!important}.battlefield-layout .slots{gap:5px!important}.battlefield-layout .slots.n4{grid-template-columns:repeat(4,minmax(62px,1fr))!important}.battlefield-layout{grid-template-columns:minmax(0,3.05fr) minmax(176px,1fr)!important}.rail-resource-strip{height:39px;min-height:39px;padding:3px}.rail-resource-item b{font-size:15px}.rail-resource-item span{font-size:9px}.rail-hq-wrap{height:140px!important;min-height:140px!important}.field-side-rail .hq.faction-fortress{height:140px!important;min-height:140px!important}.rail-advisor-row{height:68px!important;min-height:68px!important}.field-side-rail .advisor{height:68px!important;min-height:68px!important}.field-side-rail .advisor-portrait{height:56px!important;width:31px!important}.battlefield-layout .uname{font-size:12px!important}.battlefield-layout .stats{font-size:11px!important}.card-type-badge{position:absolute;left:4px;bottom:4px;z-index:6;padding:2px 5px;background:#05080dcc;border:1px solid #ffffff55;font-size:9px;font-weight:900}#allyHq #allyAdvisorConsole{display:none!important}#allyHq #allyAdvisorConsole.skill-menu-open{display:block!important;position:absolute!important;inset:34px 6px 6px!important;z-index:60!important;padding:6px!important;background:#080b0ef2!important;border:1px solid #9b7844!important;overflow:auto!important}#allyAdvisorConsole .advisor-mirror,#allyAdvisorConsole .advisor-switch{display:none!important}#allyAdvisorConsole .compact-skill-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important}#allyAdvisorConsole #upgradeAdvisorBtn{grid-column:1/-1!important}.field-side-rail .hq-info-overlay{gap:9px!important}.field-side-rail .hq-stat-chip{font-size:11px!important}.field-side-rail .hq-stat-chip b{font-size:14px!important}#hand.hand .card-grade{font-size:9px!important;padding:2px 5px!important}#hand.hand .cost{min-width:33px!important;height:23px!important;font-size:10px!important}#hand.hand .card-title-area{
    min-height:34px!important;
    height:34px!important;
    grid-template-rows:14px 12px!important;
    padding:3px!important;
  }#hand.hand .card-name-text{font-size:9px!important;line-height:14px!important}#hand.hand .card-head-grade,#hand.hand .card-head-cost{height:14px!important;font-size:6.5px!important;padding:0 3px!important}#hand.hand .card-head-ability,#hand.hand .card-head-ability b{font-size:6.5px!important;line-height:12px!important}#hand.hand .card{grid-template-rows:34px minmax(46px,1fr) auto!important}.hq-battle-row{padding:3px 0}.battle-hq{height:125px!important;min-height:125px!important;border-radius:0!important}.battle-hq .hq-advisor-slot{position:absolute;right:6px;top:34px;width:112px;height:76px;z-index:10;border-radius:4px}.battle-hq .hq-info-overlay{left:8px!important;right:124px!important;top:38px!important;transform:none!important;width:auto!important;justify-content:flex-start!important;gap:7px!important;flex-wrap:wrap!important}.battle-hq .hq-advisor-summary{left:8px!important;right:124px!important;bottom:7px!important;font-size:8px!important}#hand.hand{grid-auto-rows:185px!important}#hand.hand .card{min-height:185px!important;grid-template-rows:34px minmax(100px,1fr) auto!important}#allyAdvisorConsole .notice{font-size:12px!important}#allyAdvisorConsole .compact-skill-grid .skill b{font-size:13px!important}#allyAdvisorConsole .compact-skill-grid .skill span{font-size:10px!important}.advisor-hand-panel{grid-template-columns:42% 58%;gap:5px;padding:4px}.advisor-hand-preview-card{grid-template-rows:24px minmax(110px,1fr) 22px auto}.advisor-hand-name{font-size:11px}.advisor-hand-copy{font-size:8px}.advisor-hand-status{font-size:10px;padding:5px}.advisor-hand-skill-grid .skill{min-height:48px;padding:5px}.advisor-hand-skill-grid .skill b{font-size:12px}.advisor-hand-skill-grid .skill span{font-size:9px}.hq-image-manager{grid-template-columns:1fr}.hq-image-manager>.image-adjust-title{grid-column:1}#allyHq #allyAdvisorConsole.skill-menu-open{width:min(252px,calc(100vw - 16px))!important;max-height:300px!important}#allyAdvisorConsole.skill-menu-open{width:min(252px,calc(100vw - 16px))!important;max-height:320px!important}#hand.hand{grid-template-rows:repeat(2,170px)!important;grid-auto-rows:170px!important}#hand.hand .card{height:170px!important;min-height:170px!important;max-height:170px!important;grid-template-rows:34px 92px 44px!important}#hand.hand .cimg{height:92px!important;min-height:92px!important;max-height:92px!important}#hand.hand .cstats{min-height:44px!important;max-height:44px!important}.ally-hand-align-spacer{display:none!important}.hq-stat-chip b,.hq-stat-chip .hq-stat-value{font-size:15px!important}#hand.hand{grid-template-rows:repeat(2,180px)!important;grid-auto-rows:180px!important}#hand.hand .card{height:180px!important;min-height:180px!important;max-height:180px!important;grid-template-rows:27px 112px 41px!important}#hand.hand .cimg{height:112px!important;min-height:112px!important;max-height:112px!important}.boardwrap{
    overflow:auto!important;
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
  }.boardwrap::-webkit-scrollbar{width:0!important;height:0!important;display:none!important;}.deck-builder-toolbar{grid-template-columns:1fr 1fr}.deck-builder-main{grid-template-columns:1fr}.deck-builder-list{max-height:260px}.deck-builder-actions{grid-template-columns:1fr}.deck-builder-box{max-height:94vh!important;overflow:auto!important;}.hq-image-manager{grid-template-columns:1fr!important;}.hq-image-manager>.image-adjust-title{grid-column:1!important;}.slots.n5{grid-template-columns:repeat(5,94px)}.field-strategist-menu{left:8px!important;right:8px!important;top:auto!important;bottom:8px!important;width:auto!important;max-height:62vh;}.unit-class-icon{width:22px;height:22px;font-size:13px;}.card-shop-grid{grid-template-columns:repeat(4,minmax(110px,1fr));}.deck-builder-list{grid-template-columns:repeat(3,minmax(0,1fr))!important;}.deck-builder-list.selected{grid-template-columns:repeat(2,minmax(0,1fr))!important;}#hand.hand .card-name-text{font-size:11px!important;}.deck-builder-toolbar{grid-template-columns:1fr 1fr!important;}.deck-builder-score,.deck-builder-count{min-width:0;}.deck-builder-list,.deck-builder-list.selected{grid-template-columns:repeat(2,minmax(0,1fr))!important;max-height:340px;}.card-shop-toolbar{grid-template-columns:1fr 1fr;}.card-shop-grid{grid-template-columns:repeat(2,minmax(120px,1fr));}.deck-rule-form{grid-template-columns:repeat(2,minmax(0,1fr));}.deck-rule-form .deck-limit-field{grid-column:span 2;}.default-image-controls{grid-template-columns:1fr;}.reference-right .right-panel-hq-row{
    width:100%!important;
    min-height:104px!important;
    padding:0!important;
    margin:0 0 4px!important;
  }.reference-right .right-panel-hq-row .battle-hq{
    width:100%!important;
    height:104px!important;
    min-height:104px!important;
  }.formation-inline #allyFormationSelect{width:108px!important;min-width:108px!important;max-width:108px!important;flex-basis:108px!important}.battle-hq .hq-info-overlay{left:10px!important;right:124px!important;top:40px!important;gap:8px!important}.battle-hq .hq-stat-chip{font-size:12px!important}.battle-hq .hq-stat-chip b,.battle-hq .hq-stat-chip .hq-stat-value{font-size:14px!important}.reference-right .right-panel-hq-row{
    flex-basis:124px!important;
    height:124px!important;
    min-height:124px!important;
  }.reference-right .right-panel-hq-row .battle-hq{
    height:124px!important;
    min-height:124px!important;
    max-height:124px!important;
  }.reference-right .right-panel-hq-row .battle-hq .hq-advisor-slot{
    height:80px!important;
  }.reference-right .right-panel-hq-row{
    flex:1 1 auto!important;
    height:auto!important;
    min-height:180px!important;
    max-height:none!important;
  }.reference-right .right-panel-hq-row .battle-hq{
    height:100%!important;
    min-height:180px!important;
    max-height:none!important;
  }.battle-hq .hq-advisor-slot{
    width:84px!important;
    height:128px!important;
    min-width:84px!important;
    min-height:128px!important;
    max-width:84px!important;
    max-height:128px!important;
    right:8px!important;
  }.battle-hq .hq-info-overlay{right:100px!important;}.top-card-actions{min-width:0!important;grid-template-columns:1fr 1fr!important;}.reference-right .right-panel-hq-row .battle-hq .hq-advisor-slot{
    width:86px!important;
    height:132px!important;
    min-width:86px!important;
    min-height:132px!important;
    max-width:86px!important;
    max-height:132px!important;
    right:8px!important;
  }.reference-right .right-panel-hq-row .battle-hq .hq-info-overlay,
  .reference-right .right-panel-hq-row .battle-hq .hq-advisor-summary,
  .reference-right .right-panel-hq-row .battle-hq .hq-unit-slot{
    right:100px!important;
  }.reference-left .enemy-hq-row .battle-hq .hq-advisor-slot,
  .reference-right .right-panel-hq-row .battle-hq .hq-advisor-slot{
    width:86px!important;
    height:132px!important;
    min-width:86px!important;
    min-height:132px!important;
    max-width:86px!important;
    max-height:132px!important;
    right:8px!important;
  }.reference-left .enemy-hq-row .battle-hq .hq-info-overlay,
  .reference-left .enemy-hq-row .battle-hq .hq-unit-slot,
  .reference-right .right-panel-hq-row .battle-hq .hq-info-overlay,
  .reference-right .right-panel-hq-row .battle-hq .hq-unit-slot{
    right:100px!important;
  }.card-shop-grid{
    grid-template-columns:repeat(auto-fill,minmax(104px,1fr))!important;
    grid-auto-rows:170px!important;
    gap:7px!important;
  }.card-shop-grid .shop-card{
    width:100%!important;
    height:170px!important;
    min-height:170px!important;
    max-height:170px!important;
    grid-template-rows:21px minmax(0,1fr) 32px!important;
    box-sizing:border-box!important;
  }.rules-grid{grid-template-columns:1fr;}.rules-box{width:96vw!important;max-height:92vh!important;}#allyHq .hq-advisor-slot{top:calc(50% - 11px)!important;}.ally-hq-turn{right:8px;top:calc(50% + 59px);width:86px;height:19px;font-size:9px;}.ally-hq-turn b{font-size:12px;}.rules-grid li,.rules-grid dd,.rules-grid dt{font-size:13px!important;}.rules-grid dl{grid-template-columns:88px 1fr!important;}.ally-hq-turn{
    right:8px!important;
    top:calc(50% + 58px)!important;
    bottom:6px!important;
    width:86px!important;
    min-height:30px!important;
    font-size:13px!important;
  }.ally-hq-turn span{font-size:13px!important;}.ally-hq-turn b{font-size:19px!important;}.reference-right .right-deck-section{
    flex-basis:100px!important;
    height:100px!important;
    min-height:100px!important;
    max-height:100px!important;
  }.reference-right .right-deck-body{
    flex-basis:70px!important;
    height:70px!important;
    min-height:70px!important;
    max-height:70px!important;
  }.deck-auto-ratio{grid-template-columns:repeat(2,1fr)!important;}.deck-auto-ratio>b,.deck-auto-ratio>span{grid-column:1/-1!important;text-align:center!important;}.battlefield-layout .slots.n5,.battlefield-layout .slots.n6{width:max-content!important;grid-template-columns:repeat(5,82px)!important;}.battlefield-layout .slots.n6{grid-template-columns:repeat(6,76px)!important;}.batch-image-preset-slot{grid-template-columns:1fr!important;}.batch-image-preset-head,.batch-image-preset-fields{width:100%!important;}.event-image-manager,.hq-image-manager{grid-template-columns:1fr!important;}.batch-image-preset-slot{grid-template-columns:1fr!important;}.event-image-manager,.hq-image-manager{grid-template-columns:1fr!important;}.other-image-head{flex-direction:column;align-items:stretch;}.manager-head-actions{width:100%;justify-content:flex-end;}.manager-inline-image-zone{margin-top:8px;}.manager-inline-image-zone .batch-image-preset-row{gap:6px!important;}.batch-settings-head{flex-direction:column;align-items:stretch;}.batch-settings-head>.btn{align-self:flex-end;}.batch-settings-section{padding:8px;}.scene-stage-preview.hq{max-width:100%;}.event-image-preview-actions .btn{flex:1 1 100%;}.batch-scene-preset-actions>span{flex:1 1 100%;}.batch-scene-preset-actions .btn{flex:1 1 30%;}.hq-battlefield-grid{grid-template-columns:repeat(5,minmax(42px,1fr));gap:3px;padding:4px!important}.hq-field-slot{min-height:72px}.card-zoom-layout{grid-template-columns:1fr}.card-zoom-art{min-height:340px}.deck-builder-list{grid-template-columns:repeat(2,minmax(145px,1fr))!important}.deck-builder-visual-card{min-height:300px!important;grid-template-rows:auto 145px auto auto auto!important}.deck-builder-visual-card .collection-card-art{height:145px!important}.deck-builder-toolbar{grid-template-columns:86px 90px 86px 72px 82px minmax(130px,1fr) 82px 106px!important;gap:4px!important;}.deck-builder-toolbar select,.deck-builder-toolbar input{font-size:10px!important;}.deck-builder-list.selected{grid-template-columns:1fr!important;}.deck-builder-toolbar{grid-template-columns:repeat(4,minmax(0,1fr))!important;}.deck-builder-main{grid-template-columns:1fr!important;}.deck-builder-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;}.deck-builder-list.selected{grid-template-columns:repeat(2,minmax(0,1fr))!important;}.deck-builder-visual-card{min-height:290px!important;grid-template-rows:auto 138px auto minmax(34px,auto) auto auto!important;}.deck-builder-visual-card .collection-card-art{height:138px!important;min-height:138px!important;}.card-shop-grid{grid-template-columns:repeat(2,minmax(130px,1fr))!important;}.deck-builder-visual-card{grid-template-rows:auto 138px auto auto auto auto!important;}.card-shop-toolbar{grid-template-columns:100px 92px 76px 84px minmax(140px,1fr) 78px!important;gap:4px!important;}.card-shop-toolbar select,.card-shop-toolbar input{font-size:10px!important;}.card-shop-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))!important;}.card-shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}.deck-builder-visual-card{grid-template-rows:50px 142px auto minmax(48px,auto) auto!important;}.deck-builder-visual-card>.collection-card-art{height:142px!important;min-height:142px!important;}.card-shop-grid .shop-card{grid-template-rows:50px 142px auto minmax(48px,auto)!important;}.card-shop-grid .shop-card>.collection-card-art{height:142px!important;min-height:142px!important;}.card-shop-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important;}.deck-builder-list,.deck-builder-list.selected,.card-shop-grid{grid-template-columns:1fr!important;}.deck-builder-list,.deck-builder-list.selected,.card-shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}.deck-builder-visual-card,.card-shop-grid .shop-card{height:205px!important;min-height:205px!important;max-height:205px!important;grid-template-rows:22px 109px 34px 40px!important;}.deck-builder-visual-card>.collection-card-art,.card-shop-grid .shop-card>.collection-card-art{height:109px!important;min-height:109px!important;max-height:109px!important;}.deck-builder-list,.deck-builder-list.selected,.card-shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}.collection-card-heading small{display:none!important;}.deck-builder-list,.deck-builder-list.selected,.card-shop-grid{grid-template-columns:repeat(2,var(--collection-card-width,112px))!important;}.deck-builder-visual-card,.card-shop-grid .shop-card{
    width:var(--collection-card-width,112px)!important;min-width:var(--collection-card-width,112px)!important;max-width:var(--collection-card-width,112px)!important;
    height:var(--collection-card-height,220px)!important;min-height:var(--collection-card-height,220px)!important;max-height:var(--collection-card-height,220px)!important;
    grid-template-rows:var(--collection-card-title-height,20px) var(--collection-card-art-height,128px) var(--collection-card-stats-height,32px) var(--collection-card-desc-height,40px)!important;
  }.deck-builder-box{width:min(1240px,99vw)!important;}.deck-builder-main{grid-template-columns:minmax(520px,4fr) minmax(410px,3fr)!important;}.deck-builder-list{grid-template-columns:repeat(4,var(--collection-card-width,130px))!important;}.deck-builder-list.selected{grid-template-columns:repeat(3,var(--collection-card-width,130px))!important;}.card-shop-grid{grid-template-columns:repeat(4,var(--collection-card-width,130px))!important;}.deck-builder-main{grid-template-columns:1fr!important;overflow:auto!important;}.deck-builder-list{grid-template-columns:repeat(3,var(--collection-card-width,130px))!important;max-height:430px!important;}.deck-builder-list.selected{grid-template-columns:repeat(3,var(--collection-card-width,130px))!important;max-height:430px!important;}.card-shop-grid{grid-template-columns:repeat(3,var(--collection-card-width,130px))!important;}.deck-builder-list,.deck-builder-list.selected,.card-shop-grid{grid-template-columns:repeat(2,var(--collection-card-width,123px))!important;}.ally-hq-defense-lane .hq-battlefield-grid{gap:3px!important;padding:5px 4px!important;}.ally-hq-defense-lane .hq-field-slot{min-height:88px!important;}.deck-builder-box{width:min(1500px,99.5vw)!important;}.deck-builder-main{grid-template-columns:minmax(690px,5fr) minmax(550px,4fr)!important;}.deck-builder-list{grid-template-columns:repeat(5,var(--collection-card-width,130px))!important;}.deck-builder-list.selected{grid-template-columns:repeat(4,var(--collection-card-width,130px))!important;}.card-shop-grid{grid-template-columns:repeat(6,var(--collection-card-width,130px))!important;}.deck-builder-list{grid-template-columns:repeat(4,var(--collection-card-width,130px))!important;}.deck-builder-list.selected{grid-template-columns:repeat(3,var(--collection-card-width,130px))!important;}.card-shop-grid{grid-template-columns:repeat(5,var(--collection-card-width,130px))!important;}.deck-builder-toolbar{grid-template-columns:repeat(5,minmax(105px,1fr))!important;}.deck-builder-list,.deck-builder-list.selected{grid-template-columns:repeat(3,var(--collection-card-width,130px))!important;}.card-shop-grid{grid-template-columns:repeat(3,var(--collection-card-width,130px))!important;}.deck-builder-list,.deck-builder-list.selected,.card-shop-grid{grid-template-columns:repeat(2,var(--collection-card-width,123px))!important;}.sss-effect-stat-list,.sss-trigger-fields{grid-template-columns:1fr}.revive-candidate-list{grid-template-columns:1fr!important}.reference-right .formation-inline{grid-template-columns:66px minmax(96px,1fr) 56px!important}.reference-right .formation-inline #allyFormationSelect{width:66px!important;min-width:66px!important;max-width:66px!important}.batch-card-image-shuttle{grid-template-columns:1fr!important}.batch-scene-shuttle-grid,#batchSettingsModal[data-settings-mode="individual"] .event-image-manager{grid-template-columns:1fr!important}.batch-image-preset-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}.batch-preset-scene-summary{grid-column:1/-1!important}.individual-card-picker{grid-template-columns:1fr!important}.batch-settings-head-actions{width:100%}.batch-settings-head-actions .btn{flex:1}#hand.hand .opening-card-back-frame b{font-size:17px}#hand.hand .opening-card-back-frame small{font-size:21px}.deck-builder-toolbar{grid-template-columns:repeat(5,minmax(105px,1fr))!important;}.deck-builder-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important;}.faction-formation-status{display:none;}.enemy-hq-defense-lane .hq-battlefield-grid{gap:3px!important;padding:5px 4px!important;}.enemy-hq-defense-lane .hq-field-slot{min-height:88px!important;}#otherImageModal .default-card-image-manager{grid-template-columns:1fr!important;}#otherImageModal .default-card-image-manager>*{grid-column:1!important;grid-row:auto!important;}#otherImageModal .default-card-image-manager>.default-image-preview{height:260px!important;}:root{--mobile-action-height:58px;--mobile-hand-height:174px}html,body{height:auto!important;min-height:100%!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior-y:contain;background:#050708!important}body{padding:0 0 calc(env(safe-area-inset-bottom,0px) + 6px)!important;touch-action:pan-y;}body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;background:radial-gradient(circle at 50% 4%,#432b1538,transparent 38%),linear-gradient(180deg,#080b0c,#030506)}.mobile-game-header{display:block;position:sticky;top:0;z-index:96;width:100%;border-bottom:1px solid #8a5b28;background:linear-gradient(180deg,#11191cfa,#070b0df7);box-shadow:0 8px 22px #000c,inset 0 -1px #000;padding-top:env(safe-area-inset-top,0px)}.mobile-brand-row{height:44px;display:flex;align-items:center;justify-content:space-between;padding:6px 10px;border-bottom:1px solid #3f2b17}.mobile-brand-row>div{display:flex;align-items:baseline;gap:8px;min-width:0}.mobile-brand-row b{font-family:"Malgun Myeongjo","Batang",serif;color:#e0b36a;font-size:19px;letter-spacing:-.04em;text-shadow:0 2px #241608}.mobile-brand-row span{color:#9f9789;font-size:10px;font-weight:800}.mobile-icon-btn{width:34px;height:32px;display:grid;place-items:center;border:1px solid #604621;background:#17130e;color:#e6c27d;border-radius:8px;font-size:17px;padding:0}.mobile-prebattle-menu{display:grid;gap:8px;padding:9px}.mobile-menu-card{display:grid;grid-template-columns:76px minmax(0,1fr);gap:7px;align-items:center;padding:8px;border:1px solid #5f482b;background:linear-gradient(145deg,#14191b,#0a0e10);box-shadow:inset 0 0 0 1px #000;border-radius:10px}.mobile-menu-label{align-self:stretch;display:flex;flex-direction:column;justify-content:center;padding-right:7px;border-right:1px solid #43341f}.mobile-menu-label span{color:#efd399;font-size:13px;font-weight:950}.mobile-menu-label small{margin-top:2px;color:#8f887b;font-size:8px;line-height:1.25}.mobile-menu-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.mobile-menu-card .btn{min-height:42px;padding:7px;font-size:13px;font-weight:900;border-radius:8px}.battle-menu-card{grid-template-columns:76px minmax(0,1fr) 94px}.battle-menu-card select{min-width:0;width:100%;height:42px;padding:5px 8px;border-color:#71552e;background:#0b1114;color:#f1e6d2;font-size:12px;font-weight:800}.battle-menu-card #mobileBattleStartBtn{height:42px;background:linear-gradient(180deg,#376fc0,#1b477f);border-color:#68a2f1;color:#fff}.mobile-advanced-setup{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:9px;border:1px solid #4a3a24;background:#080c0e;border-radius:9px}.mobile-advanced-setup[hidden]{display:none!important}.mobile-advanced-setup label{display:grid;gap:4px;color:#bdb2a0;font-size:9px;font-weight:800}.mobile-advanced-setup label:last-of-type{grid-column:1/-1}.mobile-advanced-setup select{width:100%;min-width:0;height:36px;padding:5px 7px;font-size:11px}.mobile-advanced-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.mobile-advanced-actions .btn{min-height:36px;padding:5px;font-size:10px}.mobile-combat-summary{display:none;height:42px;grid-template-columns:repeat(5,1fr);border-top:1px solid #2e2519;border-bottom:1px solid #5f431f;background:#080c0e}.mobile-combat-summary>div{display:flex;align-items:center;justify-content:center;gap:4px;border-right:1px solid #2d3132;font-size:9px;color:#9f9a90}.mobile-combat-summary>div:last-child{border-right:0}.mobile-combat-summary b{font-size:13px;color:#f0d99f}.mobile-jump-nav{display:none;grid-template-columns:repeat(4,1fr);height:36px;background:#0c1113;border-bottom:1px solid #392c1b}.mobile-jump-nav button{border:0;border-right:1px solid #2f3537;background:transparent;color:#bfb6a8;font-size:10px;font-weight:900;padding:0}.mobile-jump-nav button:last-child{border-right:0}.mobile-jump-nav button:active{background:#2b2115;color:#f3d595}body.prebattle .mobile-combat-summary,body.prebattle .mobile-jump-nav{display:none!important}body:not(.prebattle) .mobile-prebattle-menu{display:none!important}body:not(.prebattle) .mobile-combat-summary{display:grid!important}body:not(.prebattle) .mobile-jump-nav{display:grid!important}body.prebattle .app{display:none!important}.app{display:block!important;width:100%!important;height:auto!important;min-height:0!important;min-width:0!important;padding:0!important;margin:0!important;overflow:visible!important}.app>.reference-left,.app>.reference-right{display:none!important}.battle-panel{display:flex!important;flex-direction:column!important;width:100%!important;height:auto!important;min-height:0!important;min-width:0!important;margin:0!important;border:0!important;border-radius:0!important;overflow:visible!important;background:#050708!important;box-shadow:none!important}.battle-panel::before,.battle-panel::after{display:none!important}.battle-panel>.reference-topbar{display:none!important}.boardwrap{order:1!important;display:block!important;position:relative!important;flex:none!important;width:100%!important;height:auto!important;min-height:0!important;overflow:visible!important;padding:8px 5px 5px!important;background:linear-gradient(#0003,#0003),linear-gradient(180deg,#4a2928 0 18%,#34402a 18% 82%,#223b50 82% 100%)!important}.battlefield-layout{display:block!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important}.battlefield-layout>.board,.board{display:flex!important;flex-direction:column!important;gap:5px!important;width:100%!important;max-width:none!important;min-width:0!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important}.enemy-hq-row,.mobile-ally-hq-mount .ally-hq-row{display:block!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important}.enemy-hq-row .battle-hq,.mobile-ally-hq-mount .battle-hq{display:flex!important;width:100%!important;max-width:none!important;height:132px!important;min-height:132px!important;max-height:132px!important;margin:0!important;border-width:1px!important;border-radius:10px!important;background-position:center 42%!important}.enemy-hq-row .hq-title,.mobile-ally-hq-mount .hq-title{min-width:0!important;max-width:64%!important;font-size:12px!important;padding:3px 8px!important}.enemy-hq-row .hq-info-overlay,.mobile-ally-hq-mount .hq-info-overlay{left:7px!important;right:7px!important;top:36px!important;display:flex!important;gap:3px!important;flex-wrap:wrap!important;max-width:58%!important}.enemy-hq-row .hq-stat-chip,.mobile-ally-hq-mount .hq-stat-chip{font-size:8px!important;padding:2px 4px!important}.enemy-hq-row .hq-advisor-slot,.mobile-ally-hq-mount .hq-advisor-slot{right:6px!important;top:37px!important;width:38%!important;height:54px!important;min-height:54px!important}.mobile-ally-hq-mount{display:block!important;order:2!important;width:100%!important;padding:5px!important;background:linear-gradient(180deg,#182a3a,#071018)!important;border-top:1px solid #6b4b25!important}.mobile-ally-hq-mount .ally-hq-turn{right:7px!important;bottom:5px!important}.mobile-ally-hq-mount .hq-advisor-console{z-index:150!important}.battlefield-layout .lane{display:block!important;width:100%!important;height:auto!important;min-height:88px!important;margin:0!important;padding:17px 4px 4px!important;border-radius:8px!important;overflow:visible!important}.battlefield-layout .lane .label{left:7px!important;top:3px!important;font-size:9px!important;line-height:12px!important}.battlefield-layout .slots,.battlefield-layout .slots.n4,.battlefield-layout .slots.n3,.battlefield-layout .slots.n2{display:grid!important;width:100%!important;max-width:none!important;height:68px!important;min-height:68px!important;gap:3px!important;margin:0!important;align-items:stretch!important}.battlefield-layout .slots.n4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.battlefield-layout .slots.n3{grid-template-columns:repeat(3,minmax(0,1fr))!important;padding-inline:9%!important}.battlefield-layout .slots.n2{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding-inline:20%!important}.battlefield-layout .slot{width:100%!important;height:68px!important;min-height:68px!important;max-height:68px!important;border-radius:7px!important}.battlefield-layout .unit{height:100%!important;min-height:0!important;border-width:1px!important;border-radius:7px!important;grid-template-rows:16px minmax(0,1fr) 17px!important}.battlefield-layout .uname{height:16px!important;padding:1px 3px!important;font-size:8px!important;line-height:14px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.battlefield-layout .uimg{height:100%!important;min-height:0!important;font-size:17px!important}.battlefield-layout .stats{height:17px!important;padding:1px!important;font-size:8px!important;line-height:14px!important}.battlefield-layout .typeicon{left:2px!important;bottom:18px!important;min-width:16px!important;min-height:16px!important;padding:1px 2px!important;font-size:8px!important}.battlefield-layout .active-buff-badge,.battlefield-layout .smoke-buff{min-width:42px!important;max-width:calc(100% - 6px)!important;padding:1px 2px!important;font-size:6px!important;line-height:1.1!important}.battlefield-layout .lane .capture-tag{right:5px!important;top:2px!important;font-size:7px!important;padding:1px 4px!important}.river{height:24px!important;min-height:24px!important;margin:0!important;border-radius:7px!important;font-size:9px!important;letter-spacing:4px!important}.hq-defense-lane.active{min-height:92px!important;padding-top:17px!important}.hq-defense-lane .hq-battlefield-grid,.enemy-hq-defense-lane .hq-battlefield-grid{height:68px!important;min-height:68px!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:2px!important;padding:2px!important}.hq-defense-lane .hq-field-slot,.enemy-hq-defense-lane .hq-field-slot{height:64px!important;min-height:64px!important;max-height:64px!important}.mobile-hand-mount{display:block!important;order:3!important;position:sticky!important;bottom:calc(var(--mobile-action-height) + env(safe-area-inset-bottom,0px))!important;z-index:78!important;width:100%!important;height:var(--mobile-hand-height)!important;min-height:var(--mobile-hand-height)!important;max-height:var(--mobile-hand-height)!important;padding:0!important;background:#070b0df8!important;border-top:1px solid #8a5b28!important;box-shadow:0 -7px 20px #000c!important;backdrop-filter:blur(8px)}.mobile-hand-mount .right-hand-section{display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;overflow:hidden!important}.mobile-hand-mount .right-hand-section>.ornate-title{display:flex!important;flex:0 0 27px!important;height:27px!important;min-height:27px!important}.mobile-hand-mount .right-hand-section .handbox{display:block!important;flex:1!important;height:auto!important;min-height:0!important;padding:4px 5px 5px!important;overflow:hidden!important;background:transparent!important}.mobile-hand-mount .right-hand-section .handhead{display:none!important}.mobile-hand-mount #hand.hand{display:flex!important;grid-template-columns:none!important;width:100%!important;height:137px!important;min-height:137px!important;gap:5px!important;padding:1px 2px 8px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}.mobile-hand-mount #hand.hand .card{flex:0 0 86px!important;width:86px!important;height:126px!important;min-height:126px!important;max-height:126px!important;display:grid!important;grid-template-rows:17px 67px minmax(0,1fr)!important;scroll-snap-align:start;border-radius:7px!important;overflow:hidden!important;transform:none}.mobile-hand-mount #hand.hand .card.selected,.mobile-hand-mount #hand.hand .card.selected-vivid{transform:translateY(-3px) scale(1.02)!important;z-index:8!important}.mobile-hand-mount #hand.hand .cname{font-size:8px!important;padding:1px 2px!important}.mobile-hand-mount #hand.hand .cimg{height:67px!important;min-height:67px!important}.mobile-hand-mount #hand.hand .cstats{padding:2px!important;gap:2px!important}.mobile-hand-mount #hand.hand .card-stat-grid{gap:2px!important}.mobile-hand-mount #hand.hand .card-stat-cell{min-height:27px!important;padding:1px!important}.mobile-hand-mount #hand.hand .card-stat-cell b{font-size:9px!important}.mobile-hand-mount #hand.hand .card-bottom-icons{gap:2px!important;padding:1px 2px!important;font-size:7px!important}.mobile-hand-mount #hand.hand .opening-hand-flipper{height:100%!important}.mobile-hand-mount #hand.hand .opening-card-face{border-radius:6px!important}.mobile-hand-mount .hand-title-arrow{min-width:30px!important;height:24px!important}.bottom-hud{display:block!important;order:4!important;position:sticky!important;bottom:0!important;z-index:82!important;width:100%!important;height:var(--mobile-action-height)!important;min-height:var(--mobile-action-height)!important;max-height:var(--mobile-action-height)!important;margin:0!important;padding:5px 6px calc(5px + env(safe-area-inset-bottom,0px))!important;border-top:1px solid #8a5b28!important;background:#070b0dfb!important;box-shadow:0 -5px 18px #000c!important}.bottom-hud .hud-status{display:block!important;width:100%!important;height:100%!important;padding:0!important;background:transparent!important}.bottom-hud .hud-status>:not(.hud-actions){display:none!important}.bottom-hud .hud-actions{display:grid!important;grid-template-columns:72px 1fr 1fr!important;gap:6px!important;width:100%!important;height:100%!important;min-width:0!important;margin:0!important}.bottom-hud .hud-actions .btn{display:block!important;width:100%!important;height:44px!important;min-height:44px!important;padding:5px 4px!important;border-radius:8px!important;font-size:11px!important;font-weight:950!important}.bottom-hud #battleControlBtn{order:1!important}.bottom-hud #shuffleBtn{order:2!important}.bottom-hud #endTurnBtn{order:3!important}.field-strategist-menu{position:fixed!important;left:8px!important;right:8px!important;top:auto!important;bottom:calc(var(--mobile-hand-height) + var(--mobile-action-height) + 8px + env(safe-area-inset-bottom,0px))!important;width:auto!important;max-height:42vh!important;overflow-y:auto!important;z-index:180!important}#allyAdvisorConsole.skill-menu-open{position:fixed!important;left:8px!important;right:8px!important;top:auto!important;bottom:calc(var(--mobile-hand-height) + var(--mobile-action-height) + 8px + env(safe-area-inset-bottom,0px))!important;width:auto!important;max-height:48vh!important;overflow-y:auto!important;z-index:181!important}.card-function-tooltip{display:none!important}.game-toast-wrap{top:calc(88px + env(safe-area-inset-top,0px))!important;width:calc(100vw - 18px)!important}.modal{align-items:flex-end!important;padding:0!important}.modalbox{width:100%!important;max-width:none!important;max-height:92dvh!important;border-radius:14px 14px 0 0!important;margin:0!important;padding-bottom:env(safe-area-inset-bottom,0px)!important}.deck-builder-box,.card-shop-box,.card-manager-box{height:92dvh!important;max-height:92dvh!important}.deck-builder-head,.manager-head,.card-shop-head{padding:10px!important;gap:7px!important}.deck-builder-main{grid-template-columns:1fr!important;grid-template-rows:minmax(170px,1fr) minmax(150px,.8fr)!important;min-height:0!important}.deck-builder-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:8px!important}.deck-builder-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:8px!important}.deck-builder-actions .btn{min-width:0!important;font-size:10px!important;padding:7px 4px!important}.card-shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}@media (orientation:landscape){:root{--mobile-hand-height:146px;--mobile-action-height:52px}.mobile-brand-row{height:38px}.mobile-combat-summary{height:34px}.mobile-jump-nav{height:30px}.battlefield-layout .lane{min-height:79px!important}.battlefield-layout .slots,.battlefield-layout .slots.n4,.battlefield-layout .slots.n3,.battlefield-layout .slots.n2{height:60px!important;min-height:60px!important}.battlefield-layout .slot{height:60px!important;min-height:60px!important;max-height:60px!important}.mobile-hand-mount #hand.hand{height:109px!important;min-height:109px!important}.mobile-hand-mount #hand.hand .card{height:100px!important;min-height:100px!important;max-height:100px!important;grid-template-rows:15px 50px 1fr!important}.mobile-hand-mount #hand.hand .cimg{height:50px!important;min-height:50px!important}.bottom-hud .hud-actions .btn{height:39px!important;min-height:39px!important}}#enemyHq,#board,#allyHq,#hand{scroll-margin-top:126px}.battlefield-layout .hq-defense-lane[hidden],
  .battlefield-layout .hq-defense-lane.inactive{display:none!important}.battlefield-layout .hq-defense-lane.active{display:block!important}#enemyBaseSlot,#allyBaseSlot{
    width:100%!important;max-width:100%!important;min-width:0!important;
    overflow:hidden!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }#enemyBaseSlot>.hq-field-slot,#allyBaseSlot>.hq-field-slot{width:auto!important;min-width:0!important;max-width:100%!important}.modal{z-index:500!important}body:not(.prebattle) .mobile-game-header{position:fixed!important;top:0!important;left:0!important;right:0!important}body:not(.prebattle) .app{padding-top:123px!important}@media (orientation:landscape){body:not(.prebattle) .app{padding-top:102px!important}}:root{--mobile-action-height:58px;--mobile-hand-height:216px}.mobile-jump-nav,
  body:not(.prebattle) .mobile-jump-nav{display:none!important}body:not(.prebattle) .app{padding-top:86px!important;padding-bottom:calc(var(--mobile-action-height) + env(safe-area-inset-bottom,0px) + 8px)!important}body:not(.prebattle){padding-bottom:calc(var(--mobile-action-height) + env(safe-area-inset-bottom,0px) + 8px)!important}.enemy-hq-row .battle-hq,.mobile-ally-hq-mount .battle-hq{
    height:150px!important;min-height:150px!important;max-height:150px!important;
  }.battlefield-layout .lane{
    min-height:130px!important;
    padding:18px 4px 5px!important;
  }.battlefield-layout .slots,
  .battlefield-layout .slots.n4,
  .battlefield-layout .slots.n3,
  .battlefield-layout .slots.n2{
    height:106px!important;min-height:106px!important;gap:4px!important;
  }.battlefield-layout .slots.n3{padding-inline:7%!important}.battlefield-layout .slots.n2{padding-inline:17%!important}.battlefield-layout .slot{
    height:106px!important;min-height:106px!important;max-height:106px!important;
  }.battlefield-layout .unit{
    grid-template-rows:19px minmax(0,1fr) 21px!important;
  }.battlefield-layout .uname{
    height:19px!important;font-size:9px!important;line-height:17px!important;padding:1px 3px!important;
  }.battlefield-layout .uimg{font-size:22px!important}.battlefield-layout .stats{
    height:21px!important;font-size:9px!important;line-height:18px!important;padding:1px 2px!important;
  }.battlefield-layout .typeicon{
    bottom:22px!important;min-width:18px!important;min-height:18px!important;font-size:9px!important;
  }.hq-defense-lane.active{min-height:119px!important}.hq-defense-lane .hq-battlefield-grid,.enemy-hq-defense-lane .hq-battlefield-grid{
    height:94px!important;min-height:94px!important;gap:3px!important;
  }.hq-defense-lane .hq-field-slot,.enemy-hq-defense-lane .hq-field-slot{
    height:90px!important;min-height:90px!important;max-height:90px!important;
  }.mobile-hand-mount{
    display:block!important;
    order:3!important;
    position:relative!important;
    bottom:auto!important;
    z-index:20!important;
    height:var(--mobile-hand-height)!important;
    min-height:var(--mobile-hand-height)!important;
    max-height:var(--mobile-hand-height)!important;
    padding:0!important;
    box-shadow:none!important;
  }.mobile-hand-mount .right-hand-section>.ornate-title{
    flex:0 0 30px!important;height:30px!important;min-height:30px!important;
  }.mobile-hand-mount .right-hand-section .handbox{
    padding:5px 6px 8px!important;
  }.mobile-hand-mount #hand.hand{
    height:178px!important;min-height:178px!important;gap:7px!important;padding:2px 3px 10px!important;
  }.mobile-hand-mount #hand.hand .card{
    flex:0 0 112px!important;
    width:112px!important;
    height:164px!important;
    min-height:164px!important;
    max-height:164px!important;
    grid-template-rows:19px 88px minmax(0,1fr)!important;
  }.mobile-hand-mount #hand.hand .cname{font-size:9px!important;padding:2px 3px!important}.mobile-hand-mount #hand.hand .cimg{height:88px!important;min-height:88px!important}.mobile-hand-mount #hand.hand .card-stat-cell{min-height:30px!important}.mobile-hand-mount #hand.hand .card-stat-cell b{font-size:10px!important}.mobile-hand-mount #hand.hand .card-bottom-icons{font-size:8px!important}.bottom-hud{
    position:fixed!important;
    left:0!important;right:0!important;bottom:0!important;
    z-index:92!important;
  }#enemyHq,#board,#allyHq,#hand{scroll-margin-top:92px!important}.mobile-ui-mode-switch{margin-top:1px}.desktop-ui-mode-switch{display:none!important}@media (orientation:landscape){:root{--mobile-action-height:54px;--mobile-hand-height:196px}body:not(.prebattle) .app{padding-top:72px!important}.battlefield-layout .lane{min-height:112px!important}.battlefield-layout .slots,.battlefield-layout .slots.n4,.battlefield-layout .slots.n3,.battlefield-layout .slots.n2{
    height:90px!important;min-height:90px!important;
  }.battlefield-layout .slot{height:90px!important;min-height:90px!important;max-height:90px!important}.mobile-hand-mount #hand.hand{height:158px!important;min-height:158px!important}.mobile-hand-mount #hand.hand .card{
    height:146px!important;min-height:146px!important;max-height:146px!important;grid-template-rows:18px 76px minmax(0,1fr)!important;
  }.mobile-hand-mount #hand.hand .cimg{height:76px!important;min-height:76px!important}}body.prebattle .mobile-game-header{
    position:relative!important;
    min-height:100dvh;
    display:flex!important;
    flex-direction:column;
    background:
      radial-gradient(circle at 50% 8%,#70451e38,transparent 34%),
      linear-gradient(180deg,#11191c,#050809 74%);
  }body.prebattle .mobile-prebattle-menu{
    display:grid!important;
    align-content:start;
    gap:12px;
    width:100%;
    padding:14px 10px calc(18px + env(safe-area-inset-bottom,0px));
  }body.prebattle .mobile-menu-card{
    grid-template-columns:92px minmax(0,1fr);
    gap:9px;
    padding:10px;
    border-radius:12px;
  }body.prebattle .battle-menu-card{
    grid-template-columns:92px minmax(0,1fr);
  }body.prebattle .battle-menu-card .mobile-menu-label{
    grid-row:1 / span 2;
  }body.prebattle .battle-menu-card #mobileBattleDeckSelect,
  body.prebattle .battle-menu-card #mobileBattleStartBtn{
    grid-column:2;
    width:100%;
    min-width:0;
  }body.prebattle .mobile-menu-card .btn,
  body.prebattle .battle-menu-card select{
    min-height:46px!important;
    height:46px!important;
    font-size:13px!important;
  }.mobile-prebattle-guide{
    margin:0;
    padding:10px 12px;
    border:1px solid #4b3a25;
    border-radius:10px;
    background:#080c0ecc;
    color:#bdb2a0;
    font-size:10px;
    line-height:1.5;
    text-align:center;
  }body:not(.prebattle) .mobile-prebattle-guide{display:none!important}body.mobile-battle-active,
  body:not(.prebattle){
    overflow-y:auto!important;
    touch-action:pan-y!important;
    scroll-behavior:smooth;
  }body:not(.prebattle) .mobile-game-header{
    position:sticky!important;
    top:0!important;
    left:auto!important;
    right:auto!important;
    width:100%!important;
  }body:not(.prebattle) .app{
    display:block!important;
    padding-top:0!important;
    padding-bottom:calc(var(--mobile-action-height) + env(safe-area-inset-bottom,0px) + 12px)!important;
  }body:not(.prebattle) .battle-panel{
    display:flex!important;
    flex-direction:column!important;
    overflow:visible!important;
  }body:not(.prebattle) .boardwrap{
    order:1!important;
    position:relative!important;
    overflow:visible!important;
  }body:not(.prebattle) .mobile-ally-hq-mount{
    order:2!important;
    position:relative!important;
  }body:not(.prebattle) .mobile-hand-mount{
    order:3!important;
    position:relative!important;
    inset:auto!important;
    overflow:visible!important;
    margin:0!important;
    height:auto!important;
    min-height:216px!important;
    max-height:none!important;
    scroll-margin-top:90px!important;
  }body:not(.prebattle) .mobile-hand-mount .right-hand-section{
    height:auto!important;
    min-height:216px!important;
    max-height:none!important;
    overflow:visible!important;
  }body:not(.prebattle) .mobile-hand-mount .handbox{
    min-height:184px!important;
    overflow:visible!important;
  }body:not(.prebattle) .mobile-hand-mount #hand.hand{
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
  }body:not(.prebattle) .mobile-hand-mount #hand.hand .card,
  body:not(.prebattle) .battlefield-layout .slot,
  body:not(.prebattle) .battlefield-layout .unit{
    pointer-events:auto!important;
    touch-action:manipulation!important;
  }body:not(.prebattle) .bottom-hud{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
  }.mobile-jump-nav{display:none!important}@media (orientation:landscape){body:not(.prebattle) .app{padding-top:0!important}body:not(.prebattle) .mobile-hand-mount{
    min-height:196px!important;
  }body:not(.prebattle) .mobile-hand-mount .right-hand-section{
    min-height:196px!important;
  }}.mobile-brand-actions{display:flex!important}.mobile-pc-switch{display:grid!important;place-items:center;width:42px;height:32px;padding:0;border:1px solid #604621;border-radius:8px;background:#17130e;color:#e6c27d;font-size:11px;font-weight:950}.mobile-pc-switch.active{border-color:#d2a257;background:#3b2a17;color:#fff0c8}body.prebattle .mobile-menu-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}body.prebattle .mobile-menu-actions .btn{height:52px!important;min-height:52px!important;font-size:15px!important}body.prebattle .battle-menu-card #mobileBattleDeckSelect,
  body.prebattle .battle-menu-card #mobileBattleStartBtn{height:52px!important;min-height:52px!important;font-size:14px!important}body.prebattle .battle-menu-card #mobileBattleStartBtn{font-size:15px!important}.modal.show{display:flex!important;align-items:stretch!important;justify-content:stretch!important;padding:0!important;background:#000d!important}.modal.show>.modalbox{width:100%!important;height:100dvh!important;max-width:none!important;max-height:100dvh!important;margin:0!important;border:0!important;border-radius:0!important;padding-bottom:env(safe-area-inset-bottom,0px)!important;overscroll-behavior:contain!important}.card-manager-box{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;overflow:hidden!important}.manager-head{position:relative!important;z-index:3!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:stretch!important;padding:9px!important;gap:8px!important}.manager-head h2{font-size:16px!important}.manager-head .small{font-size:9px!important;line-height:1.4!important}.manager-head-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important;gap:6px!important}.manager-head-actions .btn{width:100%!important;min-width:0!important;min-height:42px!important;padding:6px 3px!important;font-size:10px!important}.manager-main{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:190px minmax(0,1fr)!important;min-height:0!important;overflow:hidden!important}.manager-list-pane{min-height:0!important;padding:7px!important;gap:6px!important;border-right:0!important;border-bottom:1px solid #2d3d59!important;overflow:hidden!important}.manager-search{grid-template-columns:minmax(0,1fr) 92px!important;gap:5px!important}.manager-search #managerTypeFilter{grid-column:1/-1!important;height:38px!important}.manager-search input,.manager-search select{height:38px!important;min-width:0!important;padding:5px 7px!important;font-size:11px!important}.manager-list{display:grid!important;grid-auto-flow:column!important;grid-auto-columns:minmax(168px,72vw)!important;overflow-x:auto!important;overflow-y:hidden!important;gap:6px!important;padding:0 0 4px!important;scroll-snap-type:x proximity!important;-webkit-overflow-scrolling:touch}.manager-card-row{grid-template-columns:42px minmax(0,1fr) auto!important;min-height:66px!important;padding:5px!important;border-radius:8px!important;scroll-snap-align:start!important}.manager-thumb{width:42px!important;height:52px!important}.manager-row-name{font-size:11px!important}.manager-row-meta{font-size:8px!important}.manager-edit-pane{min-height:0!important;padding:9px!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch}.manager-grid{grid-template-columns:1fr!important;gap:10px!important}.manager-preview-wrap{gap:6px!important;padding-bottom:8px!important;border-bottom:1px solid #2a3b52!important}.manager-preview{height:190px!important;min-height:190px!important;border-radius:10px!important}.manager-upload-label,.manager-preview-wrap>.btn{min-height:42px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:11px!important}.image-adjust-panel{padding:8px!important}.manager-form{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}.manager-field.full,.sss-effect-panel{grid-column:1/-1!important}.manager-field label{font-size:9px!important}.manager-field input,.manager-field select,.manager-field textarea{min-height:40px!important;padding:7px!important;font-size:12px!important}.manager-field textarea{min-height:96px!important}.manager-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;position:sticky!important;bottom:0!important;z-index:4!important;padding:8px 0 calc(8px + env(safe-area-inset-bottom,0px))!important;background:linear-gradient(180deg,transparent,#0c1424 18%)!important}.manager-actions .btn{min-height:44px!important;font-size:11px!important}.sss-effect-stat-list,.sss-trigger-fields{grid-template-columns:1fr!important}.deck-builder-box,.card-shop-box{display:flex!important;flex-direction:column!important;overflow:hidden!important}.deck-builder-head,.card-shop-head{flex:0 0 auto!important;position:sticky!important;top:0!important;z-index:4!important;padding:9px!important;background:#11191d!important}.deck-builder-head h2,.card-shop-head h2{font-size:16px!important}.deck-builder-head .small,.card-shop-head .small{font-size:9px!important}.deck-builder-head .btn,.card-shop-head .btn{min-width:64px!important;min-height:42px!important;font-size:11px!important}.deck-builder-toolbar,.card-shop-toolbar{flex:0 0 auto!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:8px!important;overflow:visible!important}.deck-builder-toolbar label,.card-shop-toolbar label{min-width:0!important;font-size:9px!important}.deck-builder-toolbar input,.deck-builder-toolbar select,.card-shop-toolbar input,.card-shop-toolbar select{width:100%!important;min-width:0!important;height:42px!important;font-size:11px!important}.deck-builder-toolbar>input,.card-shop-toolbar>input{grid-column:1/-1!important}.deck-builder-count,.deck-builder-score,.card-shop-count{min-height:42px!important}.deck-builder-main{flex:1 1 auto!important;grid-template-rows:minmax(190px,1fr) minmax(170px,.9fr)!important;overflow:hidden!important}.deck-builder-pane{min-height:0!important;overflow:hidden!important}.deck-builder-pane-title{height:30px!important;min-height:30px!important;font-size:11px!important}.deck-builder-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-content:start!important;max-height:none!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:7px!important;gap:7px!important;-webkit-overflow-scrolling:touch}.deck-builder-list.selected{grid-template-columns:repeat(2,minmax(0,1fr))!important}.deck-auto-ratio{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:7px!important;gap:5px!important}.deck-auto-ratio>b,.deck-auto-ratio>span{grid-column:1/-1!important}.deck-builder-summary{font-size:9px!important;padding:6px 8px!important}.deck-builder-actions{flex:0 0 auto!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:7px!important;gap:6px!important;background:#0b1012!important}.deck-builder-actions .btn{min-height:44px!important;font-size:10px!important;padding:5px 3px!important}.card-shop-grid{flex:1 1 auto!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-content:start!important;overflow-y:auto!important;overflow-x:hidden!important;padding:8px!important;gap:8px!important;-webkit-overflow-scrolling:touch}.shop-card-entry,.shop-card{min-width:0!important;width:100%!important}

/* assets/css/effects.css */



/* ================================================================
   v115 — 모바일 본진 조건 / 카드 정렬 / 전환 버튼 개선
   ================================================================ */
.mobile-brand-actions{display:flex!important;align-items:center!important;gap:6px!important}
.mobile-ui-switch-btn{display:grid!important;place-items:center;width:42px;height:32px;padding:0;border:1px solid #604621;border-radius:8px;background:#17130e;color:#e6c27d;font-size:11px;font-weight:950;line-height:1}
.mobile-ui-switch-btn.active{border-color:#d2a257;background:#3b2a17;color:#fff0c8}
.mobile-mobile-switch{letter-spacing:-.02em}

/* 핸드 카드: 박스에 딱 맞도록 정렬 */
#hand.hand .card,
.mobile-hand-mount #hand.hand .card{box-sizing:border-box!important;overflow:hidden!important;align-content:stretch!important}
#hand.hand .card-title-area,
.mobile-hand-mount #hand.hand .card-title-area{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;column-gap:4px!important;padding:3px 5px!important;min-height:24px!important;height:auto!important}
#hand.hand .card-name-text,
.mobile-hand-mount #hand.hand .card-name-text{display:block!important;min-width:0!important;line-height:1.15!important;word-break:keep-all!important;overflow:hidden!important;text-overflow:ellipsis!important}
#hand.hand .card-title-grade,
.mobile-hand-mount #hand.hand .card-title-grade{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:1px!important;min-width:28px!important;padding:2px 4px!important;line-height:1!important}
#hand.hand .card-ready-label,
.mobile-hand-mount #hand.hand .card-ready-label{display:block!important;font-size:7px!important;font-weight:900!important;line-height:1!important;color:#fff6cb!important;letter-spacing:-.02em}
#hand.hand .cimg,
.mobile-hand-mount #hand.hand .cimg{position:relative!important;width:100%!important;overflow:hidden!important;display:block!important;background:#18202a!important}
#hand.hand .cimg img,
#hand.hand .cimg .default-art,
.mobile-hand-mount #hand.hand .cimg img,
.mobile-hand-mount #hand.hand .cimg .default-art{width:100%!important;height:100%!important;display:block!important;object-fit:cover!important;object-position:var(--img-x,50%) var(--img-y,50%)!important}
#hand.hand .cstats,
.mobile-hand-mount #hand.hand .cstats{display:block!important;width:100%!important;padding:0!important;overflow:hidden!important}
#hand.hand .card-stat-grid,
.mobile-hand-mount #hand.hand .card-stat-grid{width:100%!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0!important}
#hand.hand .card-stat-cell,
.mobile-hand-mount #hand.hand .card-stat-cell{box-sizing:border-box!important;min-width:0!important;border-right:1px solid rgba(255,255,255,.16)!important}
#hand.hand .card-stat-cell:last-child,
.mobile-hand-mount #hand.hand .card-stat-cell:last-child{border-right:0!important}

/* 필드 카드: 크기와 이미지 밀림 보정 */
.battlefield-layout .slot,
.battlefield-layout .unit,
.hq-field-slot,
.hq-field-slot .base-unit{box-sizing:border-box!important;min-width:0!important;max-width:100%!important;overflow:hidden!important}
.battlefield-layout .slot{padding:0!important}
.battlefield-layout .unit{display:grid!important;grid-template-rows:minmax(0,1fr) 22px!important;align-content:stretch!important}
.battlefield-layout .uimg{position:relative!important;display:block!important;width:100%!important;height:100%!important;min-height:0!important;overflow:hidden!important;background:#10161d!important}
.battlefield-layout .uimg img,
.battlefield-layout .uimg .default-art,
.hq-field-slot .base-unit-art img,
.hq-field-slot .base-unit-art .default-art{width:100%!important;height:100%!important;display:block!important;object-fit:cover!important;object-position:var(--img-x,50%) var(--img-y,50%)!important}
.battlefield-layout .unit-image-meta{left:0!important;right:0!important;top:0!important;border-radius:0!important;padding:2px 4px!important}
.battlefield-layout .stats{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0!important;min-width:0!important}
.battlefield-layout .stats span{min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.hq-field-slot .base-unit{grid-template-rows:minmax(0,1fr) auto!important;padding:2px!important}
.hq-field-slot .base-unit-art{height:auto!important;min-height:0!important}
.hq-field-slot .base-unit-mini{min-width:0!important;overflow:hidden!important}
.hq-field-slot .base-unit-mini b,
.hq-field-slot .base-unit-mini span{display:block!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}

/* 모바일 전투 UI 크기 보정 */
@media (max-width:850px){
  .mobile-combat-summary{height:50px!important}
  .mobile-combat-summary>div{font-size:9px!important;padding:0 2px!important}
  .mobile-combat-summary b{font-size:15px!important}
  .battle-hq .hq-advisor-slot{width:42%!important;min-width:112px!important;height:62px!important;min-height:62px!important;top:38px!important;right:6px!important}
  .battle-hq .hq-info-overlay{right:calc(42% + 12px)!important;max-width:none!important}
  .battle-hq .hq-advisor-summary{right:calc(42% + 12px)!important}
  .mobile-hand-mount #hand.hand .card{grid-template-rows:24px 92px 1fr!important}
  .mobile-hand-mount #hand.hand .cstats{min-height:46px!important}
  .mobile-hand-mount #hand.hand .card-stat-cell{min-height:32px!important}
  .battlefield-layout .slots,
  .battlefield-layout .slots.n4,
  .battlefield-layout .slots.n3,
  .battlefield-layout .slots.n2{align-items:stretch!important}
  .battlefield-layout .slot{height:106px!important;min-height:106px!important;max-height:106px!important}
  .battlefield-layout .unit{height:100%!important;grid-template-rows:minmax(0,1fr) 21px!important;border-radius:7px!important}
  .battlefield-layout .uimg{font-size:20px!important}
  .battlefield-layout .unit-image-meta .field-unit-name{font-size:8px!important}
  .battlefield-layout .unit-image-meta .field-grade{font-size:8px!important;min-width:18px!important;height:14px!important}
  .hq-defense-lane .hq-battlefield-grid,.enemy-hq-defense-lane .hq-battlefield-grid{height:96px!important;min-height:96px!important}
  .hq-defense-lane .hq-field-slot,.enemy-hq-defense-lane .hq-field-slot{height:92px!important;min-height:92px!important;max-height:92px!important}
}
body.ui-mode-mobile-preview .mobile-combat-summary{height:50px!important}
body.ui-mode-mobile-preview .mobile-combat-summary b{font-size:15px!important}
body.ui-mode-mobile-preview .mobile-hand-mount #hand.hand .card{grid-template-rows:24px 92px 1fr!important}
body.ui-mode-mobile-preview .mobile-hand-mount #hand.hand .cstats{min-height:46px!important}
body.ui-mode-mobile-preview .battlefield-layout .unit{grid-template-rows:minmax(0,1fr) 21px!important}
body.ui-mode-mobile-preview .battlefield-layout .unit-image-meta .field-unit-name{font-size:8px!important}
body.ui-mode-mobile-preview .battlefield-layout .unit-image-meta .field-grade{font-size:8px!important;min-width:18px!important;height:14px!important}
body.ui-mode-mobile-preview .hq-defense-lane .hq-field-slot,
body.ui-mode-mobile-preview .enemy-hq-defense-lane .hq-field-slot{height:92px!important;min-height:92px!important;max-height:92px!important}


/* ================================================================
   v116 — 본진 개방 조건 / 동일 카드폭 / 상태 유지 전환 / 하단 플로팅
   ================================================================ */
/* 기존 등급 아래 별도 '가능' 텍스트는 사용하지 않는다. */
#hand.hand .card-ready-label{display:none!important}
/* 기존 행동 가능 박스를 등급 바로 아래로 이동하고 문구를 단순화한다. */
#hand.hand .card.actionable-card:not(.opening-hand-card)::before{
  content:'가능'!important;
  left:auto!important;
  right:5px!important;
  top:27px!important;
  min-width:28px!important;
  padding:2px 4px!important;
  border-radius:4px!important;
  text-align:center!important;
  font-size:8px!important;
  line-height:1.05!important;
  letter-spacing:0!important;
}

/* 양쪽 본진의 책사 슬롯과 턴 표시를 같은 높이에서 나란히 배치 */
.battle-hq .hq-advisor-slot{
  right:58px!important;
  top:36px!important;
  width:112px!important;
  height:62px!important;
  min-height:62px!important;
  max-height:62px!important;
}
.hq-turn-box{
  position:absolute;
  right:6px;
  top:36px;
  z-index:13;
  width:46px;
  height:62px;
  min-height:62px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  border:1px solid #8a6a3f;
  border-radius:5px;
  background:linear-gradient(180deg,#111820e8,#080c10e8);
  color:#dfceb0;
  box-sizing:border-box;
  font-size:10px;
  font-weight:900;
}
.hq-turn-box b{font-size:18px!important;color:#ffe09d!important;line-height:1!important}
.hq-turn-box span{font-size:9px!important;color:#dfceb0!important;line-height:1!important}
.ally-hq-turn{right:6px!important;top:36px!important;bottom:auto!important;width:46px!important;height:62px!important}

@media (max-width:850px){
  :root{
    --mobile-action-height:58px;
    --mobile-hand-float-height:174px;
    --mobile-hq-float-height:104px;
    --mobile-bottom-dock-height:calc(var(--mobile-action-height) + var(--mobile-hand-float-height) + var(--mobile-hq-float-height));
  }
  /* 1·2·3열 모두 1열과 동일한 카드 폭을 사용한다. */
  .battlefield-layout .slots.n4,
  .battlefield-layout .slots.n3,
  .battlefield-layout .slots.n2{
    display:flex!important;
    align-items:stretch!important;
    justify-content:center!important;
    width:100%!important;
    padding-inline:0!important;
    gap:4px!important;
  }
  .battlefield-layout .slots.n4>.slot,
  .battlefield-layout .slots.n3>.slot,
  .battlefield-layout .slots.n2>.slot{
    flex:0 0 calc((100% - 12px)/4)!important;
    width:calc((100% - 12px)/4)!important;
    min-width:0!important;
    max-width:calc((100% - 12px)/4)!important;
  }
  /* 모바일 하단: 아군 본진 + 핸드 + 전투 버튼을 항상 고정 표시 */
  body:not(.prebattle),
  body.mobile-battle-active{
    padding-bottom:calc(var(--mobile-bottom-dock-height) + env(safe-area-inset-bottom,0px) + 8px)!important;
  }
  body:not(.prebattle) .app{
    padding-bottom:calc(var(--mobile-bottom-dock-height) + env(safe-area-inset-bottom,0px) + 8px)!important;
  }
  body:not(.prebattle) .mobile-ally-hq-mount{
    display:block!important;
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:calc(var(--mobile-action-height) + var(--mobile-hand-float-height) + env(safe-area-inset-bottom,0px))!important;
    z-index:88!important;
    width:100%!important;
    height:var(--mobile-hq-float-height)!important;
    min-height:var(--mobile-hq-float-height)!important;
    max-height:var(--mobile-hq-float-height)!important;
    margin:0!important;
    padding:4px!important;
    overflow:hidden!important;
    border-top:1px solid #8a5b28!important;
    background:linear-gradient(180deg,#182a3af7,#071018fa)!important;
    box-shadow:0 -8px 18px #000b!important;
  }
  body:not(.prebattle) .mobile-ally-hq-mount .ally-hq-row{
    display:block!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    margin:0!important;
  }
  body:not(.prebattle) .mobile-ally-hq-mount .battle-hq{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
  }
  body:not(.prebattle) .mobile-ally-hq-mount .hq-title{font-size:10px!important;padding:2px 6px!important}
  body:not(.prebattle) .mobile-ally-hq-mount .hq-subtitle,
  body:not(.prebattle) .mobile-ally-hq-mount .hptxt{display:none!important}
  body:not(.prebattle) .mobile-ally-hq-mount .hq-info-overlay{
    left:6px!important;
    right:180px!important;
    top:30px!important;
    max-width:none!important;
    gap:2px!important;
  }
  body:not(.prebattle) .mobile-ally-hq-mount .hq-stat-chip{padding:2px 3px!important;font-size:7px!important}
  body:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot{
    right:55px!important;
    top:29px!important;
    width:116px!important;
    height:62px!important;
    min-height:62px!important;
  }
  body:not(.prebattle) .mobile-ally-hq-mount .hq-turn-box{
    right:5px!important;
    top:29px!important;
    width:44px!important;
    height:62px!important;
    min-height:62px!important;
  }
  body:not(.prebattle) .mobile-hand-mount{
    display:block!important;
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:calc(var(--mobile-action-height) + env(safe-area-inset-bottom,0px))!important;
    z-index:89!important;
    width:100%!important;
    height:var(--mobile-hand-float-height)!important;
    min-height:var(--mobile-hand-float-height)!important;
    max-height:var(--mobile-hand-float-height)!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    background:#080c0ef8!important;
    border-top:1px solid #6d522e!important;
    box-shadow:0 -5px 14px #000a!important;
  }
  body:not(.prebattle) .mobile-hand-mount .right-hand-section{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    overflow:hidden!important;
  }
  body:not(.prebattle) .mobile-hand-mount .right-hand-section>.ornate-title{
    flex:0 0 27px!important;
    height:27px!important;
    min-height:27px!important;
  }
  body:not(.prebattle) .mobile-hand-mount .handbox{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    padding:3px 5px 5px!important;
    overflow:hidden!important;
  }
  body:not(.prebattle) .mobile-hand-mount .handhead{display:none!important}
  body:not(.prebattle) .mobile-hand-mount #hand.hand{
    width:100%!important;
    height:142px!important;
    min-height:142px!important;
    max-height:142px!important;
    padding:1px 2px 4px!important;
    gap:6px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card{
    flex:0 0 104px!important;
    width:104px!important;
    height:136px!important;
    min-height:136px!important;
    max-height:136px!important;
    grid-template-rows:23px 74px 39px!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .cimg{
    height:74px!important;
    min-height:74px!important;
    max-height:74px!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .cstats{
    height:39px!important;
    min-height:39px!important;
    max-height:39px!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card-stat-cell{
    min-height:39px!important;
    height:39px!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card.actionable-card:not(.opening-hand-card)::before{
    right:4px!important;
    top:25px!important;
    min-width:25px!important;
    font-size:7px!important;
  }
  body:not(.prebattle) .bottom-hud{
    bottom:0!important;
    height:var(--mobile-action-height)!important;
    min-height:var(--mobile-action-height)!important;
    padding-bottom:env(safe-area-inset-bottom,0px)!important;
    z-index:92!important;
  }
}

/* PC에서 모바일 모드를 선택한 미리보기에서도 동일한 하단 플로팅 사용 */
body.ui-mode-mobile-preview:not(.prebattle){
  --mobile-action-height:58px;
  --mobile-hand-float-height:174px;
  --mobile-hq-float-height:104px;
  --mobile-bottom-dock-height:calc(var(--mobile-action-height) + var(--mobile-hand-float-height) + var(--mobile-hq-float-height));
  padding-bottom:calc(var(--mobile-bottom-dock-height) + 8px)!important;
}
body.ui-mode-mobile-preview:not(.prebattle) .app{padding-bottom:calc(var(--mobile-bottom-dock-height) + 8px)!important}
body.ui-mode-mobile-preview .battlefield-layout .slots.n4,
body.ui-mode-mobile-preview .battlefield-layout .slots.n3,
body.ui-mode-mobile-preview .battlefield-layout .slots.n2{display:flex!important;align-items:stretch!important;justify-content:center!important;padding-inline:0!important;gap:4px!important}
body.ui-mode-mobile-preview .battlefield-layout .slots.n4>.slot,
body.ui-mode-mobile-preview .battlefield-layout .slots.n3>.slot,
body.ui-mode-mobile-preview .battlefield-layout .slots.n2>.slot{flex:0 0 calc((100% - 12px)/4)!important;width:calc((100% - 12px)/4)!important;max-width:calc((100% - 12px)/4)!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount{position:fixed!important;left:calc(50vw - 215px)!important;right:auto!important;bottom:calc(var(--mobile-action-height) + var(--mobile-hand-float-height))!important;width:430px!important;height:var(--mobile-hq-float-height)!important;min-height:var(--mobile-hq-float-height)!important;max-height:var(--mobile-hq-float-height)!important;z-index:88!important;padding:4px!important;overflow:hidden!important;background:linear-gradient(180deg,#182a3af7,#071018fa)!important;border-top:1px solid #8a5b28!important;box-shadow:0 -8px 18px #000b!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .ally-hq-row,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .battle-hq{height:100%!important;min-height:0!important;max-height:none!important;margin:0!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-subtitle,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hptxt{display:none!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-info-overlay{left:6px!important;right:180px!important;top:30px!important;max-width:none!important;gap:2px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot{right:55px!important;top:29px!important;width:116px!important;height:62px!important;min-height:62px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-turn-box{right:5px!important;top:29px!important;width:44px!important;height:62px!important;min-height:62px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount{position:fixed!important;left:calc(50vw - 215px)!important;right:auto!important;bottom:var(--mobile-action-height)!important;width:430px!important;height:var(--mobile-hand-float-height)!important;min-height:var(--mobile-hand-float-height)!important;max-height:var(--mobile-hand-float-height)!important;z-index:89!important;overflow:hidden!important;background:#080c0ef8!important;border-top:1px solid #6d522e!important;box-shadow:0 -5px 14px #000a!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount .right-hand-section{height:100%!important;min-height:0!important;overflow:hidden!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount .right-hand-section>.ornate-title{height:27px!important;min-height:27px!important;flex:0 0 27px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount .handbox{min-height:0!important;padding:3px 5px 5px!important;overflow:hidden!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount .handhead{display:none!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand{height:142px!important;min-height:142px!important;max-height:142px!important;padding:1px 2px 4px!important;gap:6px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card{flex:0 0 104px!important;width:104px!important;height:136px!important;min-height:136px!important;max-height:136px!important;grid-template-rows:23px 74px 39px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .cimg{height:74px!important;min-height:74px!important;max-height:74px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .cstats{height:39px!important;min-height:39px!important;max-height:39px!important}

.mobile-mobile-switch{width:54px!important;font-size:10px!important}


/* ================================================================
   v117 — 모바일 본진/핸드 재정렬 및 본진 진영 초기 노출 차단
   ================================================================ */
.hq-defense-lane[hidden],
.hq-defense-lane.inactive:not(.active),
.hq-battlefield-grid[hidden],
.hq-battlefield-grid.inactive:not(.active){
  display:none!important;
  visibility:hidden!important;
  height:0!important;
  min-height:0!important;
  max-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}
.hq-defense-lane.active{visibility:visible!important}

/* PC: 책사 박스와 턴 박스를 고정된 서로 다른 영역에 배치 */
.battle-hq .hq-advisor-slot{
  box-sizing:border-box!important;
  right:56px!important;
  width:112px!important;
  max-width:112px!important;
  overflow:hidden!important;
}
.battle-hq .hq-turn-box{
  box-sizing:border-box!important;
  right:6px!important;
  width:44px!important;
  max-width:44px!important;
  overflow:hidden!important;
}
.battle-hq .hq-advisor-slot + .hq-turn-box{margin-left:6px!important}
.mobile-hq-turn-inline{display:none}

@media (max-width:850px){
  :root{
    --mobile-action-height:58px;
    --mobile-field-card-width:calc((100vw - 22px)/4);
    --mobile-field-card-height:106px;
    --mobile-hand-float-height:136px;
    --mobile-hq-float-height:132px;
    --mobile-bottom-dock-height:calc(var(--mobile-action-height) + var(--mobile-hand-float-height) + var(--mobile-hq-float-height));
  }

  /* 턴은 큰 별도 박스를 숨기고 행동력 칩 오른쪽에 간단히 표시 */
  .battle-hq .hq-turn-box{display:none!important}
  .mobile-hq-turn-inline{
    display:inline-flex!important;
    align-items:center!important;
    gap:1px!important;
    margin-left:3px!important;
    padding-left:4px!important;
    border-left:1px solid rgba(255,255,255,.22)!important;
    color:#ffe1a0!important;
    font-size:8px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
  .mobile-hq-turn-inline b{font-size:9px!important;color:#fff3c7!important}

  /* 적군 본진은 플로팅하지 않고 전투 화면 최상단에 유지 */
  body:not(.prebattle) .enemy-hq-row{
    display:block!important;
    position:relative!important;
    inset:auto!important;
    z-index:2!important;
    width:100%!important;
    height:var(--mobile-hq-float-height)!important;
    min-height:var(--mobile-hq-float-height)!important;
    max-height:var(--mobile-hq-float-height)!important;
    margin:0!important;
    padding:4px!important;
    background:linear-gradient(180deg,#301b1bf5,#130909fa)!important;
    border-bottom:1px solid #8a5b28!important;
    box-shadow:none!important;
  }

  /* 아군 플로팅 본진과 적군 상단 본진을 동일한 카드 형태로 표시 */
  body:not(.prebattle) .enemy-hq-row .battle-hq,
  body:not(.prebattle) .mobile-ally-hq-mount .battle-hq{
    display:block!important;
    position:relative!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    border:1px solid #8b6a3c!important;
    border-radius:9px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body:not(.prebattle) .enemy-hq-row .hq-title,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-title{
    top:4px!important;
    left:5px!important;
    max-width:calc(100% - 150px)!important;
    padding:2px 6px!important;
    font-size:10px!important;
    line-height:16px!important;
  }
  body:not(.prebattle) .enemy-hq-row .hq-subtitle,
  body:not(.prebattle) .enemy-hq-row .hptxt,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-subtitle,
  body:not(.prebattle) .mobile-ally-hq-mount .hptxt{display:none!important}
  body:not(.prebattle) .enemy-hq-row .hq-info-overlay,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-info-overlay{
    position:absolute!important;
    left:6px!important;
    right:146px!important;
    top:31px!important;
    width:auto!important;
    max-width:none!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:3px!important;
    transform:none!important;
  }
  body:not(.prebattle) .enemy-hq-row .hq-stat-chip,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-stat-chip{
    min-width:0!important;
    max-width:100%!important;
    height:25px!important;
    padding:2px 4px!important;
    gap:2px!important;
    font-size:7px!important;
    overflow:hidden!important;
  }
  body:not(.prebattle) .enemy-hq-row .hq-stat-chip b,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-stat-chip b{font-size:9px!important;white-space:nowrap!important}
  body:not(.prebattle) .enemy-hq-row .hq-stat-chip.skill,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-stat-chip.skill{display:none!important}

  /* 책사 박스는 모바일 본진 안에서 정상 크기로 표시 */
  body:not(.prebattle) .enemy-hq-row .hq-advisor-slot,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot{
    display:block!important;
    position:absolute!important;
    right:7px!important;
    top:31px!important;
    width:132px!important;
    min-width:132px!important;
    max-width:132px!important;
    height:91px!important;
    min-height:91px!important;
    max-height:91px!important;
    margin:0!important;
    padding:3px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    border-radius:6px!important;
  }
  body:not(.prebattle) .enemy-hq-row .hq-advisor-slot .advisor-card,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot .advisor-card{
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  /* 아군 본진만 하단 플로팅 */
  body:not(.prebattle) .mobile-ally-hq-mount{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:calc(var(--mobile-action-height) + var(--mobile-hand-float-height) + env(safe-area-inset-bottom,0px))!important;
    z-index:88!important;
    width:100%!important;
    height:var(--mobile-hq-float-height)!important;
    min-height:var(--mobile-hq-float-height)!important;
    max-height:var(--mobile-hq-float-height)!important;
    padding:4px!important;
    overflow:hidden!important;
  }

  /* 핸드 카드를 1열 카드와 같은 폭/높이로 통일 */
  body:not(.prebattle) .mobile-hand-mount{
    height:var(--mobile-hand-float-height)!important;
    min-height:var(--mobile-hand-float-height)!important;
    max-height:var(--mobile-hand-float-height)!important;
  }
  body:not(.prebattle) .mobile-hand-mount .right-hand-section>.ornate-title{
    flex:0 0 26px!important;
    height:26px!important;
    min-height:26px!important;
  }
  body:not(.prebattle) .mobile-hand-mount .handbox{padding:2px 5px 3px!important}
  body:not(.prebattle) .mobile-hand-mount #hand.hand{
    height:107px!important;
    min-height:107px!important;
    max-height:107px!important;
    gap:4px!important;
    padding:0 0 1px!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card{
    position:relative!important;
    flex:0 0 var(--mobile-field-card-width)!important;
    width:var(--mobile-field-card-width)!important;
    min-width:var(--mobile-field-card-width)!important;
    max-width:var(--mobile-field-card-width)!important;
    height:var(--mobile-field-card-height)!important;
    min-height:var(--mobile-field-card-height)!important;
    max-height:var(--mobile-field-card-height)!important;
    display:grid!important;
    grid-template-rows:20px 64px 22px!important;
    row-gap:0!important;
    transform:none!important;
    overflow:hidden!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card-title-area{
    position:relative!important;
    inset:auto!important;
    z-index:3!important;
    width:100%!important;
    height:20px!important;
    min-height:20px!important;
    max-height:20px!important;
    padding:2px 3px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card-name-text{
    font-size:8px!important;
    line-height:16px!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .cimg{
    position:relative!important;
    inset:auto!important;
    z-index:1!important;
    width:100%!important;
    height:64px!important;
    min-height:64px!important;
    max-height:64px!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .cimg img,
  body:not(.prebattle) .mobile-hand-mount #hand.hand .cimg .default-art{
    width:100%!important;
    height:100%!important;
    display:block!important;
    object-fit:cover!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .cstats,
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card-stat-grid,
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card-stat-cell{
    height:22px!important;
    min-height:22px!important;
    max-height:22px!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card-stat-cell b{font-size:9px!important}
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card.actionable-card:not(.opening-hand-card)::before{
    top:22px!important;
    right:3px!important;
    min-width:22px!important;
    padding:1px 3px!important;
    font-size:7px!important;
  }

  body:not(.prebattle),
  body:not(.prebattle) .app{
    padding-bottom:calc(var(--mobile-bottom-dock-height) + env(safe-area-inset-bottom,0px) + 8px)!important;
  }
}

@media (max-width:850px) and (orientation:landscape){
  :root{
    --mobile-field-card-height:90px;
    --mobile-hand-float-height:116px;
    --mobile-hq-float-height:116px;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand{height:91px!important;min-height:91px!important;max-height:91px!important}
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card{grid-template-rows:18px 54px 18px!important}
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card-title-area{height:18px!important;min-height:18px!important;max-height:18px!important}
  body:not(.prebattle) .mobile-hand-mount #hand.hand .cimg{height:54px!important;min-height:54px!important;max-height:54px!important}
  body:not(.prebattle) .mobile-hand-mount #hand.hand .cstats,
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card-stat-grid,
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card-stat-cell{height:18px!important;min-height:18px!important;max-height:18px!important}
  body:not(.prebattle) .enemy-hq-row .hq-advisor-slot,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot{height:76px!important;min-height:76px!important;max-height:76px!important}
}

/* PC에서 모바일 모드 미리보기 */
body.ui-mode-mobile-preview:not(.prebattle){
  --mobile-action-height:58px;
  --mobile-field-card-width:102px;
  --mobile-field-card-height:106px;
  --mobile-hand-float-height:136px;
  --mobile-hq-float-height:132px;
  --mobile-bottom-dock-height:326px;
  padding-bottom:334px!important;
}
body.ui-mode-mobile-preview:not(.prebattle) .app{padding-bottom:334px!important}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row{position:relative!important;inset:auto!important;height:132px!important;min-height:132px!important;max-height:132px!important;padding:4px!important;background:linear-gradient(180deg,#301b1bf5,#130909fa)!important;border-bottom:1px solid #8a5b28!important}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .battle-hq,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .battle-hq{height:100%!important;min-height:0!important;max-height:none!important;border:1px solid #8b6a3c!important;border-radius:9px!important;overflow:hidden!important}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .hq-turn-box,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-turn-box{display:none!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hq-turn-inline{display:inline-flex!important}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .hq-subtitle,
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .hptxt,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-subtitle,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hptxt{display:none!important}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .hq-info-overlay,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-info-overlay{left:6px!important;right:146px!important;top:31px!important;width:auto!important;max-width:none!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:3px!important}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .hq-advisor-slot,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot{right:7px!important;top:31px!important;width:132px!important;min-width:132px!important;max-width:132px!important;height:91px!important;min-height:91px!important;max-height:91px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount{height:132px!important;min-height:132px!important;max-height:132px!important;bottom:194px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount{height:136px!important;min-height:136px!important;max-height:136px!important;bottom:58px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand{height:107px!important;min-height:107px!important;max-height:107px!important;gap:4px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card{flex:0 0 102px!important;width:102px!important;min-width:102px!important;max-width:102px!important;height:106px!important;min-height:106px!important;max-height:106px!important;grid-template-rows:20px 64px 22px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card-title-area{position:relative!important;inset:auto!important;height:20px!important;min-height:20px!important;max-height:20px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .cimg{height:64px!important;min-height:64px!important;max-height:64px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .cstats,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card-stat-grid,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card-stat-cell{height:22px!important;min-height:22px!important;max-height:22px!important}


/* v117.1 — 모바일 책사 위치와 핸드 폭 정밀 보정 */
@media (max-width:850px){
  :root{--mobile-field-card-width:calc((100vw - 32px)/4)}
  body:not(.prebattle) .enemy-hq-row .hq-advisor-slot,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot{
    transform:none!important;
    translate:none!important;
    inset:31px 7px auto auto!important;
  }
}
body.ui-mode-mobile-preview:not(.prebattle){--mobile-field-card-width:99.5px}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .hq-advisor-slot,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot{
  transform:none!important;
  translate:none!important;
  inset:31px 7px auto auto!important;
}


/* ================================================================
   v118 — 국가별 전투 카드 테두리 / 모바일 핸드 페이지 / 본진 동일 크기
   ================================================================ */
:root{
  --faction-wei-border:#45b9ff;
  --faction-shu-border:#51d775;
  --faction-wu-border:#ff6666;
  --faction-other-border:#aeb6c0;
}

/* 등급 테두리보다 국가색 테두리를 우선 표시한다. */
.battlefield-layout .unit.wei,
.hq-field-slot .base-unit.wei,
#hand.hand .card.wei{
  border-color:var(--faction-wei-border)!important;
  box-shadow:inset 0 0 0 1px #164f86,0 0 0 1px #8bdbff,0 2px 8px #0009!important;
}
.battlefield-layout .unit.shu,
.hq-field-slot .base-unit.shu,
#hand.hand .card.shu{
  border-color:var(--faction-shu-border)!important;
  box-shadow:inset 0 0 0 1px #1e6a35,0 0 0 1px #a0f0af,0 2px 8px #0009!important;
}
.battlefield-layout .unit.wu,
.hq-field-slot .base-unit.wu,
#hand.hand .card.wu{
  border-color:var(--faction-wu-border)!important;
  box-shadow:inset 0 0 0 1px #7f2424,0 0 0 1px #ffaaaa,0 2px 8px #0009!important;
}
.battlefield-layout .unit.other,
.hq-field-slot .base-unit.other,
#hand.hand .card.other,
#hand.hand .card.item,
#hand.hand .card.tactic{
  border-color:var(--faction-other-border)!important;
  box-shadow:inset 0 0 0 1px #4a515a,0 0 0 1px #e0e4e9,0 2px 8px #0009!important;
}

@media (max-width:850px){
  :root{
    --mobile-field-card-width:calc((100vw - 32px)/4);
    --mobile-field-card-height:106px;
    --mobile-hq-float-height:138px;
    --mobile-hand-float-height:136px;
    --mobile-bottom-dock-height:calc(var(--mobile-action-height) + var(--mobile-hand-float-height) + var(--mobile-hq-float-height));
  }

  /* 1·2·3열 모두 같은 카드 크기, 열별 개수만 다르게 중앙 정렬 */
  .battlefield-layout .lane:not(.hq-defense-lane) .slots.n4,
  .battlefield-layout .lane:not(.hq-defense-lane) .slots.n3,
  .battlefield-layout .lane:not(.hq-defense-lane) .slots.n2{
    display:grid!important;
    width:100%!important;
    height:var(--mobile-field-card-height)!important;
    min-height:var(--mobile-field-card-height)!important;
    max-height:var(--mobile-field-card-height)!important;
    gap:4px!important;
    padding-inline:0!important;
    justify-content:center!important;
    align-items:stretch!important;
  }
  .battlefield-layout .lane:not(.hq-defense-lane) .slots.n4{grid-template-columns:repeat(4,var(--mobile-field-card-width))!important}
  .battlefield-layout .lane:not(.hq-defense-lane) .slots.n3{grid-template-columns:repeat(3,var(--mobile-field-card-width))!important}
  .battlefield-layout .lane:not(.hq-defense-lane) .slots.n2{grid-template-columns:repeat(2,var(--mobile-field-card-width))!important}
  .battlefield-layout .lane:not(.hq-defense-lane) .slot{
    width:var(--mobile-field-card-width)!important;
    min-width:var(--mobile-field-card-width)!important;
    max-width:var(--mobile-field-card-width)!important;
    height:var(--mobile-field-card-height)!important;
    min-height:var(--mobile-field-card-height)!important;
    max-height:var(--mobile-field-card-height)!important;
  }

  /* 모바일 핸드는 전투필드 카드와 정확히 같은 크기와 국가별 테두리를 사용한다. */
  body:not(.prebattle) .mobile-hand-mount #hand.hand{
    display:flex!important;
    width:100%!important;
    overflow:hidden!important;
    justify-content:flex-start!important;
    align-items:stretch!important;
    gap:4px!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card{
    flex:0 0 var(--mobile-field-card-width)!important;
    width:var(--mobile-field-card-width)!important;
    min-width:var(--mobile-field-card-width)!important;
    max-width:var(--mobile-field-card-width)!important;
    height:var(--mobile-field-card-height)!important;
    min-height:var(--mobile-field-card-height)!important;
    max-height:var(--mobile-field-card-height)!important;
  }

  /* 한 줄에 모두 표시되지 않으면 제목 양옆 화살표로 페이지 이동 */
  body:not(.prebattle) .mobile-hand-mount .hand-title-paged{
    display:grid!important;
    grid-template-columns:32px minmax(0,1fr) 32px!important;
    align-items:center!important;
    width:100%!important;
    gap:3px!important;
  }
  body:not(.prebattle) .mobile-hand-mount #handPrevBtn{grid-column:1!important;grid-row:1!important}
  body:not(.prebattle) .mobile-hand-mount .hand-title-label{grid-column:2!important;grid-row:1!important;text-align:center!important}
  body:not(.prebattle) .mobile-hand-mount #handNextBtn{grid-column:3!important;grid-row:1!important}
  body:not(.prebattle) .mobile-hand-mount .hand-title-page{display:none!important}
  body:not(.prebattle) .mobile-hand-mount .hand-title-arrow{
    display:grid!important;
    place-items:center!important;
    width:30px!important;
    min-width:30px!important;
    height:23px!important;
    padding:0!important;
    border:1px solid #8e6b38!important;
    border-radius:5px!important;
    background:#17110b!important;
    color:#ffe2a7!important;
    font-size:20px!important;
    line-height:1!important;
  }
  body:not(.prebattle) .mobile-hand-mount .hand-title-arrow[hidden]{visibility:hidden!important}

  /* 적군/아군 본진 박스 크기와 내부 배치를 완전히 동일하게 한다. */
  body:not(.prebattle) .enemy-hq-row,
  body:not(.prebattle) .mobile-ally-hq-mount{
    box-sizing:border-box!important;
    width:100%!important;
    height:var(--mobile-hq-float-height)!important;
    min-height:var(--mobile-hq-float-height)!important;
    max-height:var(--mobile-hq-float-height)!important;
    padding:4px!important;
    overflow:hidden!important;
  }
  body:not(.prebattle) .enemy-hq-row .battle-hq,
  body:not(.prebattle) .mobile-ally-hq-mount .battle-hq{
    box-sizing:border-box!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    border-radius:9px!important;
  }
  body:not(.prebattle) .enemy-hq-row .hq-title,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-title{
    max-width:calc(100% - var(--mobile-field-card-width) - 18px)!important;
  }
  body:not(.prebattle) .enemy-hq-row .hq-info-overlay,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-info-overlay{
    right:calc(var(--mobile-field-card-width) + 14px)!important;
  }

  /* 책사 박스를 전투필드 카드와 동일한 폭·높이로 맞춘다. */
  body:not(.prebattle) .enemy-hq-row .hq-advisor-slot,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot{
    inset:27px 6px auto auto!important;
    width:var(--mobile-field-card-width)!important;
    min-width:var(--mobile-field-card-width)!important;
    max-width:var(--mobile-field-card-width)!important;
    height:var(--mobile-field-card-height)!important;
    min-height:var(--mobile-field-card-height)!important;
    max-height:var(--mobile-field-card-height)!important;
    padding:2px!important;
  }
  body:not(.prebattle) .enemy-hq-row .hq-advisor-slot .advisor-card,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot .advisor-card,
  body:not(.prebattle) .enemy-hq-row .hq-advisor-slot .advisor-image-only,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot .advisor-image-only,
  body:not(.prebattle) .enemy-hq-row .hq-advisor-slot .advisor-portrait,
  body:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot .advisor-portrait{
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-width:none!important;
    max-height:none!important;
    overflow:hidden!important;
  }
}

/* PC에서 모바일 모드 미리보기에도 동일 적용 */
body.ui-mode-mobile-preview:not(.prebattle){
  --mobile-field-card-width:99.5px;
  --mobile-field-card-height:106px;
  --mobile-hq-float-height:138px;
  --mobile-hand-float-height:136px;
  --mobile-bottom-dock-height:332px;
}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slots.n4{grid-template-columns:repeat(4,var(--mobile-field-card-width))!important;justify-content:center!important;padding-inline:0!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slots.n3{grid-template-columns:repeat(3,var(--mobile-field-card-width))!important;justify-content:center!important;padding-inline:0!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slots.n2{grid-template-columns:repeat(2,var(--mobile-field-card-width))!important;justify-content:center!important;padding-inline:0!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slot{width:var(--mobile-field-card-width)!important;min-width:var(--mobile-field-card-width)!important;max-width:var(--mobile-field-card-width)!important;height:var(--mobile-field-card-height)!important;min-height:var(--mobile-field-card-height)!important;max-height:var(--mobile-field-card-height)!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand{overflow:hidden!important;justify-content:flex-start!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card{flex:0 0 var(--mobile-field-card-width)!important;width:var(--mobile-field-card-width)!important;min-width:var(--mobile-field-card-width)!important;max-width:var(--mobile-field-card-width)!important;height:var(--mobile-field-card-height)!important;min-height:var(--mobile-field-card-height)!important;max-height:var(--mobile-field-card-height)!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount .hand-title-paged{display:grid!important;grid-template-columns:32px minmax(0,1fr) 32px!important;align-items:center!important;width:100%!important;gap:3px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #handPrevBtn{grid-column:1!important;grid-row:1!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount .hand-title-label{grid-column:2!important;grid-row:1!important;text-align:center!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #handNextBtn{grid-column:3!important;grid-row:1!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount .hand-title-page{display:none!important}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount{height:var(--mobile-hq-float-height)!important;min-height:var(--mobile-hq-float-height)!important;max-height:var(--mobile-hq-float-height)!important;padding:4px!important}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .hq-advisor-slot,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot{inset:27px 6px auto auto!important;width:var(--mobile-field-card-width)!important;min-width:var(--mobile-field-card-width)!important;max-width:var(--mobile-field-card-width)!important;height:var(--mobile-field-card-height)!important;min-height:var(--mobile-field-card-height)!important;max-height:var(--mobile-field-card-height)!important}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .hq-info-overlay,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-info-overlay{right:calc(var(--mobile-field-card-width) + 14px)!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount{bottom:194px!important}


/* ================================================================
   v119 — 핸드/전투필드 카드 디자인 통일 · 모바일 전투열 폭 정렬
   ================================================================ */
:root{
  --tcg-card-head:24px;
  --tcg-card-stat:28px;
  --tcg-card-radius:8px;
}

/* PC 핸드 카드 디자인을 전투필드 카드에도 동일하게 적용 */
#hand.hand .card,
.battlefield-layout .unit{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-rows:var(--tcg-card-head) minmax(0,1fr) var(--tcg-card-stat)!important;
  align-content:stretch!important;
  overflow:hidden!important;
  border-width:2px!important;
  border-style:solid!important;
  border-radius:var(--tcg-card-radius)!important;
  background:#11171d!important;
}
#hand.hand .card .card-title-area,
.battlefield-layout .unit .card-title-area{
  position:relative!important;
  inset:auto!important;
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:4px!important;
  width:100%!important;
  height:var(--tcg-card-head)!important;
  min-height:var(--tcg-card-head)!important;
  max-height:var(--tcg-card-head)!important;
  padding:3px 5px!important;
  border-bottom:1px solid rgba(255,255,255,.16)!important;
  background:linear-gradient(180deg,#2b3440,#141a21)!important;
  color:#f5f7fa!important;
}
#hand.hand .card .card-name-text,
.battlefield-layout .unit .field-unit-name{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:11px!important;
  font-weight:950!important;
  line-height:1!important;
  color:#f7f8fa!important;
  text-shadow:0 1px 2px #000!important;
}
#hand.hand .card .card-title-grade,
.battlefield-layout .unit .field-grade{
  position:static!important;
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:24px!important;
  height:16px!important;
  padding:0 4px!important;
  border-radius:3px!important;
  font-size:8px!important;
  font-weight:1000!important;
  line-height:1!important;
}
#hand.hand .card .cimg,
.battlefield-layout .unit .uimg{
  position:relative!important;
  inset:auto!important;
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  overflow:hidden!important;
  background:#0d1218!important;
  border:0!important;
}
#hand.hand .card .cimg img,
#hand.hand .card .cimg .default-art,
.battlefield-layout .unit .uimg img,
.battlefield-layout .unit .uimg .default-art{
  width:100%!important;
  height:100%!important;
  min-width:100%!important;
  min-height:100%!important;
  display:block!important;
  object-fit:cover!important;
  object-position:var(--img-x,50%) var(--img-y,50%)!important;
}
#hand.hand .card .cstats,
.battlefield-layout .unit .stats{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:0!important;
  width:100%!important;
  height:var(--tcg-card-stat)!important;
  min-height:var(--tcg-card-stat)!important;
  max-height:var(--tcg-card-stat)!important;
  padding:0!important;
  border-top:1px solid rgba(255,255,255,.12)!important;
  background:#131a21!important;
}
#hand.hand .card .card-stat-grid{
  display:contents!important;
}
#hand.hand .card .card-stat-cell,
.battlefield-layout .unit .stats span{
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  height:100%!important;
  padding:0 2px!important;
  border:0!important;
  border-right:1px solid rgba(255,255,255,.18)!important;
  background:rgba(255,255,255,.03)!important;
  color:#eef3f8!important;
  font-size:11px!important;
  font-weight:950!important;
  line-height:1!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
#hand.hand .card .card-stat-cell:last-child,
.battlefield-layout .unit .stats span:last-child{border-right:0!important}

/* 국가별 헤더/테두리 통일 */
#hand.hand .card.wei .card-title-area,
.battlefield-layout .unit.wei .card-title-area{background:linear-gradient(180deg,#3376bd,#173d69)!important}
#hand.hand .card.shu .card-title-area,
.battlefield-layout .unit.shu .card-title-area{background:linear-gradient(180deg,#419552,#225832)!important}
#hand.hand .card.wu .card-title-area,
.battlefield-layout .unit.wu .card-title-area{background:linear-gradient(180deg,#b94e4e,#682929)!important}
#hand.hand .card.other .card-title-area,
#hand.hand .card.item .card-title-area,
#hand.hand .card.tactic .card-title-area,
.battlefield-layout .unit.other .card-title-area{background:linear-gradient(180deg,#68717c,#3c434b)!important}

/* 기존 이미지 위 이름 오버레이 제거 */
.battlefield-layout .unit-image-meta{display:none!important}

@media (max-width:850px){
  :root{
    --mobile-play-width:min(calc(100vw - 12px),430px);
    --mobile-card-gap:4px;
    --mobile-card-width:calc((var(--mobile-play-width) - 20px)/4);
    --mobile-card-height:calc(var(--mobile-card-width) * 1.30);
    --tcg-card-head:21px;
    --tcg-card-stat:22px;
  }

  /* 전투필드·양쪽 본진·핸드 공간 폭을 동일하게 사용 */
  body:not(.prebattle) .boardwrap,
  body:not(.prebattle) .battlefield-layout,
  body:not(.prebattle) .battlefield-layout>.board,
  body:not(.prebattle) .enemy-hq-row,
  body:not(.prebattle) .mobile-ally-hq-mount,
  body:not(.prebattle) .mobile-hand-mount .right-hand-section{
    box-sizing:border-box!important;
    width:var(--mobile-play-width)!important;
    min-width:var(--mobile-play-width)!important;
    max-width:var(--mobile-play-width)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  body:not(.prebattle) .boardwrap{padding:4px!important;overflow:visible!important}
  body:not(.prebattle) .battlefield-layout>.board{padding:0!important;gap:4px!important}

  /* 적/아군 1·2·3열 문구 삭제 */
  .battlefield-layout .lane:not(.hq-defense-lane)>.label{display:none!important}

  /* 열 배경과 카드 그리드를 같은 폭·중앙축으로 고정 */
  .battlefield-layout .lane:not(.hq-defense-lane){
    box-sizing:border-box!important;
    width:100%!important;
    min-width:100%!important;
    max-width:100%!important;
    height:calc(var(--mobile-card-height) + 8px)!important;
    min-height:calc(var(--mobile-card-height) + 8px)!important;
    max-height:calc(var(--mobile-card-height) + 8px)!important;
    margin:0!important;
    padding:4px!important;
    overflow:hidden!important;
    border-radius:8px!important;
  }
  .battlefield-layout .lane:not(.hq-defense-lane) .slots.n4,
  .battlefield-layout .lane:not(.hq-defense-lane) .slots.n3,
  .battlefield-layout .lane:not(.hq-defense-lane) .slots.n2{
    box-sizing:border-box!important;
    display:grid!important;
    width:100%!important;
    min-width:100%!important;
    max-width:100%!important;
    height:var(--mobile-card-height)!important;
    min-height:var(--mobile-card-height)!important;
    max-height:var(--mobile-card-height)!important;
    margin:0!important;
    padding:0!important;
    gap:var(--mobile-card-gap)!important;
    align-items:stretch!important;
    justify-content:center!important;
  }
  .battlefield-layout .lane:not(.hq-defense-lane) .slots.n4{grid-template-columns:repeat(4,var(--mobile-card-width))!important}
  .battlefield-layout .lane:not(.hq-defense-lane) .slots.n3{grid-template-columns:repeat(3,var(--mobile-card-width))!important}
  .battlefield-layout .lane:not(.hq-defense-lane) .slots.n2{grid-template-columns:repeat(2,var(--mobile-card-width))!important}
  .battlefield-layout .lane:not(.hq-defense-lane) .slot,
  .battlefield-layout .lane:not(.hq-defense-lane) .unit{
    box-sizing:border-box!important;
    width:var(--mobile-card-width)!important;
    min-width:var(--mobile-card-width)!important;
    max-width:var(--mobile-card-width)!important;
    height:var(--mobile-card-height)!important;
    min-height:var(--mobile-card-height)!important;
    max-height:var(--mobile-card-height)!important;
    margin:0!important;
  }

  /* 모바일 핸드도 같은 카드 크기와 같은 폭 사용 */
  body:not(.prebattle) .mobile-hand-mount{width:100%!important;padding:0!important}
  body:not(.prebattle) .mobile-hand-mount .right-hand-section{padding:0!important}
  body:not(.prebattle) .mobile-hand-mount .handbox{box-sizing:border-box!important;width:100%!important;padding:4px!important}
  body:not(.prebattle) .mobile-hand-mount #hand.hand{
    box-sizing:border-box!important;
    width:100%!important;
    min-width:100%!important;
    max-width:100%!important;
    height:var(--mobile-card-height)!important;
    min-height:var(--mobile-card-height)!important;
    max-height:var(--mobile-card-height)!important;
    padding:0!important;
    gap:var(--mobile-card-gap)!important;
    overflow:hidden!important;
  }
  body:not(.prebattle) .mobile-hand-mount #hand.hand .card{
    flex:0 0 var(--mobile-card-width)!important;
    width:var(--mobile-card-width)!important;
    min-width:var(--mobile-card-width)!important;
    max-width:var(--mobile-card-width)!important;
    height:var(--mobile-card-height)!important;
    min-height:var(--mobile-card-height)!important;
    max-height:var(--mobile-card-height)!important;
  }

  #hand.hand .card .card-name-text,
  .battlefield-layout .unit .field-unit-name{font-size:9px!important}
  #hand.hand .card .card-title-grade,
  .battlefield-layout .unit .field-grade{min-width:20px!important;height:14px!important;font-size:7px!important;padding:0 3px!important}
  #hand.hand .card .card-stat-cell,
  .battlefield-layout .unit .stats span{font-size:9px!important}
}

/* 데스크톱에서 강제 모바일 미리보기에도 동일 규칙 적용 */
body.ui-mode-mobile-preview:not(.prebattle){--mobile-play-width:418px;--mobile-card-gap:4px;--mobile-card-width:calc((var(--mobile-play-width) - 20px)/4);--mobile-card-height:calc(var(--mobile-card-width) * 1.30);--tcg-card-head:21px;--tcg-card-stat:22px}
body.ui-mode-mobile-preview:not(.prebattle) .boardwrap,
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout,
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout>.board,
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount .right-hand-section{box-sizing:border-box!important;width:var(--mobile-play-width)!important;min-width:var(--mobile-play-width)!important;max-width:var(--mobile-play-width)!important;margin-left:auto!important;margin-right:auto!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane)>.label{display:none!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane){box-sizing:border-box!important;width:100%!important;height:calc(var(--mobile-card-height) + 8px)!important;min-height:calc(var(--mobile-card-height) + 8px)!important;max-height:calc(var(--mobile-card-height) + 8px)!important;margin:0!important;padding:4px!important;overflow:hidden!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slots.n4,
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slots.n3,
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slots.n2{display:grid!important;width:100%!important;height:var(--mobile-card-height)!important;min-height:var(--mobile-card-height)!important;max-height:var(--mobile-card-height)!important;margin:0!important;padding:0!important;gap:var(--mobile-card-gap)!important;align-items:stretch!important;justify-content:center!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slots.n4{grid-template-columns:repeat(4,var(--mobile-card-width))!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slots.n3{grid-template-columns:repeat(3,var(--mobile-card-width))!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slots.n2{grid-template-columns:repeat(2,var(--mobile-card-width))!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slot,
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .unit,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card{width:var(--mobile-card-width)!important;min-width:var(--mobile-card-width)!important;max-width:var(--mobile-card-width)!important;height:var(--mobile-card-height)!important;min-height:var(--mobile-card-height)!important;max-height:var(--mobile-card-height)!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand{width:100%!important;height:var(--mobile-card-height)!important;min-height:var(--mobile-card-height)!important;max-height:var(--mobile-card-height)!important;padding:0!important;gap:var(--mobile-card-gap)!important;overflow:hidden!important}

/* v120 preview bridge */
body.ui-mode-mobile-preview:not(.prebattle){--v120-hand-height:calc(var(--mobile-card-height,136px) + 34px);--v120-hq-height:178px;--v120-bottom-total:calc(var(--v120-hand-height) + var(--v120-hq-height))}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row,body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount{height:var(--v120-hq-height)!important;min-height:var(--v120-hq-height)!important;max-height:var(--v120-hq-height)!important;padding:4px!important}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .hq-info-overlay,body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-info-overlay{left:5px!important;right:5px!important;top:27px!important;width:auto!important;height:25px!important;display:grid!important;grid-template-columns:1.25fr 1fr .8fr .8fr .7fr!important;gap:3px!important}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .desktop-hq-skill-chip,body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .desktop-hq-skill-chip,body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .hq-turn-box,body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-turn-box{display:none!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hq-turn-chip{display:flex!important}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .hq-advisor-slot,body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .hq-advisor-slot{top:56px!important;right:6px!important;width:var(--mobile-card-width,100px)!important;min-width:var(--mobile-card-width,100px)!important;max-width:var(--mobile-card-width,100px)!important;height:84px!important;min-height:84px!important;max-height:84px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount{position:fixed!important;left:50%!important;right:auto!important;bottom:var(--v120-hand-height)!important;transform:translateX(-50%)!important;z-index:92!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount{position:fixed!important;left:50%!important;right:auto!important;bottom:0!important;transform:translateX(-50%)!important;height:var(--v120-hand-height)!important;min-height:var(--v120-hand-height)!important;max-height:var(--v120-hand-height)!important;z-index:93!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .mobile-hq-actions{position:absolute!important;left:6px!important;right:6px!important;bottom:5px!important;height:31px!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;z-index:30!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .mobile-hq-actions .btn{height:31px!important;min-height:31px!important;padding:3px 4px!important;font-size:10px!important}
body.ui-mode-mobile-preview:not(.prebattle) .bottom-hud{display:none!important}
body.ui-mode-mobile-preview:not(.prebattle) .app,body.ui-mode-mobile-preview:not(.prebattle){padding-bottom:calc(var(--v120-bottom-total) + 10px)!important}


/* ================================================================
   v122 final preview override — 실제 모바일과 동일한 본진/책사 크기
   mobile_preview.css는 game.css 뒤에 로드되므로 이 규칙을 마지막에 둔다.
   ================================================================ */
body.ui-mode-mobile-preview:not(.prebattle){
  --mobile-hand-card-w:var(--mobile-card-width,100px);
  --mobile-hand-card-h:var(--mobile-card-height,130px);
  --v122-hq-pad:5px;
  --v122-mobile-hq-h:calc(var(--mobile-hand-card-h) + 16px);
  --v120-hq-height:var(--v122-mobile-hq-h);
  --v120-bottom-total:calc(var(--v120-hand-height) + var(--v122-mobile-hq-h));
}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount{
  box-sizing:border-box!important;
  width:var(--mobile-play-width,418px)!important;
  min-width:var(--mobile-play-width,418px)!important;
  max-width:var(--mobile-play-width,418px)!important;
  height:var(--v122-mobile-hq-h)!important;
  min-height:var(--v122-mobile-hq-h)!important;
  max-height:var(--v122-mobile-hq-h)!important;
  padding:var(--v122-hq-pad)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  overflow:hidden!important;
}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .battle-hq,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .battle-hq{
  box-sizing:border-box!important;
  width:100%!important;
  height:calc(var(--v122-mobile-hq-h) - (var(--v122-hq-pad) * 2))!important;
  min-height:calc(var(--v122-mobile-hq-h) - (var(--v122-hq-pad) * 2))!important;
  max-height:calc(var(--v122-mobile-hq-h) - (var(--v122-hq-pad) * 2))!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .battle-hq .hq-advisor-slot,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .battle-hq .hq-advisor-slot{
  position:absolute!important;
  top:3px!important;
  right:3px!important;
  bottom:3px!important;
  left:auto!important;
  transform:none!important;
  width:var(--mobile-hand-card-w)!important;
  min-width:var(--mobile-hand-card-w)!important;
  max-width:var(--mobile-hand-card-w)!important;
  height:var(--mobile-hand-card-h)!important;
  min-height:var(--mobile-hand-card-h)!important;
  max-height:var(--mobile-hand-card-h)!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .battle-hq .hq-info-overlay,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .battle-hq .hq-info-overlay{
  left:7px!important;
  right:calc(var(--mobile-hand-card-w) + 11px)!important;
  top:31px!important;
  width:auto!important;
  max-width:none!important;
  height:auto!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:4px!important;
  align-items:center!important;
  justify-items:stretch!important;
  overflow:visible!important;
}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .battle-hq .hq-stat-chip,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .battle-hq .hq-stat-chip{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:24px!important;
  min-height:24px!important;
  padding:2px 4px!important;
  display:flex!important;
  font-size:9px!important;
  overflow:hidden!important;
}
body.ui-mode-mobile-preview:not(.prebattle) .enemy-hq-row .battle-hq .hq-stat-chip b,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .battle-hq .hq-stat-chip b{font-size:10px!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount{bottom:var(--v120-hand-height)!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .mobile-hq-actions{
  left:7px!important;
  right:calc(var(--mobile-hand-card-w) + 11px)!important;
  bottom:5px!important;
  height:29px!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:3px!important;
  padding:0!important;
}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount .mobile-hq-actions .btn{
  height:29px!important;
  min-height:29px!important;
  max-height:29px!important;
  font-size:9px!important;
  padding:2px!important;
}
body.ui-mode-mobile-preview:not(.prebattle) .app,
body.ui-mode-mobile-preview:not(.prebattle){padding-bottom:calc(var(--v120-hand-height) + var(--v122-mobile-hq-h) + 10px)!important}

body.ui-mode-mobile-preview:not(.prebattle) #allyHq .hq-advisor-slot,
body.ui-mode-mobile-preview:not(.prebattle) #enemyHq .hq-advisor-slot{position:absolute!important;top:3px!important;right:3px!important;bottom:3px!important;left:auto!important;transform:none!important;width:var(--mobile-hand-card-w)!important;min-width:var(--mobile-hand-card-w)!important;max-width:var(--mobile-hand-card-w)!important;height:var(--mobile-hand-card-h)!important;min-height:var(--mobile-hand-card-h)!important;max-height:var(--mobile-hand-card-h)!important;margin:0!important;padding:0!important;overflow:hidden!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card{flex:0 0 var(--mobile-hand-card-w)!important;width:var(--mobile-hand-card-w)!important;min-width:var(--mobile-hand-card-w)!important;max-width:var(--mobile-hand-card-w)!important;height:var(--mobile-hand-card-h)!important;min-height:var(--mobile-hand-card-h)!important;max-height:var(--mobile-hand-card-h)!important}

/* v129 final mobile-preview bridge: game.css의 실제 모바일 카드 비율과 동일 */
body.ui-mode-mobile-preview:not(.prebattle){
  --mobile-play-width:418px;
  --mobile-card-gap:4px;
  --mobile-card-width:calc((var(--mobile-play-width) - 20px)/4);
  --v129-hand-card-height:calc(var(--mobile-card-width) * 1.632);
  --v129-field-card-height:calc(var(--mobile-card-width) * 1.767);
  --mobile-card-height:var(--v129-field-card-height);
  --mobile-hand-card-w:var(--mobile-card-width);
  --mobile-hand-card-h:var(--v129-hand-card-height);
  --v120-hand-height:calc(var(--v129-hand-card-height) + 34px);
  --v122-mobile-hq-h:calc(var(--v129-hand-card-height) + 16px);
  --v120-hq-height:var(--v122-mobile-hq-h);
  --v120-bottom-total:calc(var(--v120-hand-height) + var(--v122-mobile-hq-h));
}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane){height:calc(var(--v129-field-card-height) + 8px)!important;min-height:calc(var(--v129-field-card-height) + 8px)!important;max-height:calc(var(--v129-field-card-height) + 8px)!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slots.n4,
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slots.n3,
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slots.n2{height:var(--v129-field-card-height)!important;min-height:var(--v129-field-card-height)!important;max-height:var(--v129-field-card-height)!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .slot,
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .lane:not(.hq-defense-lane) .unit{width:var(--mobile-card-width)!important;min-width:var(--mobile-card-width)!important;max-width:var(--mobile-card-width)!important;height:var(--v129-field-card-height)!important;min-height:var(--v129-field-card-height)!important;max-height:var(--v129-field-card-height)!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .unit{grid-template-rows:calc(var(--mobile-card-width) * .2684) minmax(0,1fr) calc(var(--mobile-card-width) * .3131)!important}
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .unit .card-title-area,
body.ui-mode-mobile-preview:not(.prebattle) .battlefield-layout .unit .stats{height:100%!important;min-height:0!important;max-height:none!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount{height:var(--v120-hand-height)!important;min-height:var(--v120-hand-height)!important;max-height:var(--v120-hand-height)!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand{height:var(--v129-hand-card-height)!important;min-height:var(--v129-hand-card-height)!important;max-height:var(--v129-hand-card-height)!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card{flex:0 0 var(--mobile-card-width)!important;width:var(--mobile-card-width)!important;min-width:var(--mobile-card-width)!important;max-width:var(--mobile-card-width)!important;height:var(--v129-hand-card-height)!important;min-height:var(--v129-hand-card-height)!important;max-height:var(--v129-hand-card-height)!important;grid-template-rows:calc(var(--mobile-card-width) * .1705) minmax(0,1fr) calc(var(--mobile-card-width) * .2898)!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card .card-title-area,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card .cstats,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card .card-stat-grid,
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card .card-stat-cell{height:100%!important;min-height:0!important;max-height:none!important}
body.ui-mode-mobile-preview:not(.prebattle) .mobile-ally-hq-mount{bottom:var(--v120-hand-height)!important}
body.ui-mode-mobile-preview:not(.prebattle),body.ui-mode-mobile-preview:not(.prebattle) .app{padding-bottom:calc(var(--v120-hand-height) + var(--v122-mobile-hq-h) + 10px)!important}


/* v129.1 — 모바일 미리보기 핸드 이미지 행의 구형 고정 높이 제거 */
body.ui-mode-mobile-preview:not(.prebattle) .mobile-hand-mount #hand.hand .card .cimg{
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
}
