@font-face{font-family:"Noto Serif KR";src:url("assets/noto-serif-kr.woff") format("woff");font-weight:400;font-style:normal;font-display:swap}
:root{color-scheme:dark;--bg:#242626;--panel:#302b2a;--wine:#4b2727;--ink:#f2ebd9;--muted:#b8b2a2;--gold:#dfc183;--line:#766045;--red:#ae4135;--green:#72a58b;--serif:'Noto Serif KR','Batang','바탕',Georgia,serif;--sans:'Malgun Gothic','Apple SD Gothic Neo',Arial,sans-serif}*{box-sizing:border-box}body{margin:0;background:#181918;color:var(--ink);font-family:var(--serif);font-size:16px}button,input,select,textarea{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:not-allowed;opacity:.4}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #f6cf80;outline-offset:3px}button{border:0;background:none}input,select,textarea{color:var(--ink);background:#1c2020;border:1px solid #706553;border-radius:1px;padding:10px 12px;min-width:0}input[type=range]{padding:0;accent-color:#c9a663}input[type=number]{width:80px}button,input,select{min-height:40px}small,.muted{color:var(--muted);font-family:var(--sans);font-size:14px;line-height:1.6}h1,h2,h3,p{margin:0}h1{font-size:30px;font-weight:500}h2{font-size:26px;font-weight:500}h3{font-size:21px}.shell{height:100dvh;min-height:550px;display:flex;flex-direction:column;background:radial-gradient(ellipse at 20% 45%,#30363680,transparent 70%),repeating-linear-gradient(117deg,#ffffff02 0 1px,transparent 1px 9px),var(--bg);overflow:hidden}.topbar{height:76px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 30px;background:radial-gradient(ellipse at left bottom,#842c22 0,transparent 37%),linear-gradient(#292725,#171817);border-bottom:3px solid #5e3830;box-shadow:0 3px 15px #0004;gap:20px}.top-title{display:flex;align-items:center;gap:18px}.top-title small{color:#c8b289}.top-actions{display:flex;align-items:center;gap:12px}.back{font-size:27px;text-shadow:2px 2px #000;padding:3px 20px;border:1px solid #675343;border-radius:40% / 50%;background:linear-gradient(#302a26,#171818);min-width:95px}.back:hover{color:var(--gold)}.metal,.tab,.chip{border:1px solid #7c705b;background:linear-gradient(#e6e3d5,#bbb9ad);color:#302921;box-shadow:inset 0 0 0 2px #f7f2db44,0 2px 4px #0008;padding:7px 20px;min-height:40px}.metal:hover{filter:brightness(1.15)}.metal.primary{background:linear-gradient(#f2d992,#b28b48);border-color:#eed59d}.metal.danger{background:linear-gradient(#6e302c,#3b2423);color:#f2d1c6;border-color:#a35c4f}.ghost{color:var(--gold);border-bottom:1px solid #776143;padding:7px 12px}.icon-btn{font-family:var(--sans);font-size:21px;min-width:42px;border:1px solid #6d604b;background:#191b1b}.icon-btn.active{background:#d7c9a9;color:#292320}.footer{display:flex;align-items:center;gap:14px;flex-shrink:0;min-height:74px;padding:12px 26px;background:linear-gradient(#171817,#080909);border-top:1px solid #63523c;z-index:2}.spacer{flex:1}.search{display:flex;align-items:center;gap:8px;background:#171c1b;border:1px solid #796549;min-width:220px}.search span{padding-left:13px;color:#c3b492;font-size:22px}.search input{border:0;background:transparent;width:100%;font-family:var(--sans)}.count{color:#e9d390;white-space:nowrap}.toolbar{display:flex;align-items:center;gap:12px;padding:14px 24px;border-bottom:1px solid #48443d}.tabs{display:flex;gap:4px;min-width:0}.tab{background:linear-gradient(#302626,#211d1d);color:#bfb7a3;min-width:88px;box-shadow:inset 0 0 0 2px #211d1d;padding:9px 20px;border-radius:2px 18px 0 0;border-color:#554236;font-size:18px}.tab.active{color:#f3d49a;background:linear-gradient(#53332c,#2c211f);border-color:#daa266;box-shadow:inset 0 0 12px #b8793766,0 0 6px #fca54e66}.tabs .tab:hover{color:#ffe5a7}.cards-area{flex:1;overflow:auto;padding:18px 22px}.hero-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:15px 18px;max-width:1800px;margin:auto}.hero-grid.large{grid-template-columns:repeat(6,minmax(0,1fr))}.hero-card{position:relative;display:block;padding:0;aspect-ratio:177/270;border:1px solid #baa15c;background:#312720;overflow:hidden;transition:transform .15s,filter .15s;isolation:isolate}.hero-card img{width:100%;height:100%;object-fit:cover;display:block}.hero-card:hover{transform:translateY(-3px);filter:brightness(1.1);box-shadow:0 0 13px #d9af4c55;z-index:1}.hero-card .card-name{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#19160fec 25%,#534422);padding:22px 2px 6px;font-size:clamp(14px,1.25vw,21px);color:#f2ca8c;text-shadow:1px 1px 2px #000}.card-name b{font-weight:500}.card-name em{font-size:12px;font-style:normal;color:#c2b18e;margin-right:6px}.source-status{position:absolute;top:39%;height:21%;display:flex;align-items:center;justify-content:center;left:0;right:0;background:#2a191afc;color:#e1c792;padding:9px 3px;font-size:14px;letter-spacing:3px}.ribbon{position:absolute;top:5px;right:4px;padding:3px 7px;background:#436a50;color:#fff;font-family:var(--sans);font-size:12px;border:1px solid #b9ba91}.home{display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1;position:relative;overflow:auto;padding:40px 30px;background:radial-gradient(ellipse at 50% 60%,#76624540,transparent 68%)}.home-heading{text-align:center;margin:0 0 36px}.home-heading .seal{display:block;font-size:17px;letter-spacing:8px;color:#ba9880;margin-bottom:15px}.home-heading h1{font-size:42px;letter-spacing:5px;color:#eee4cb;text-shadow:0 3px 3px #000}.home-menus{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;width:min(1020px,100%)}.menu-card{position:relative;min-height:325px;border:1px solid #a18a5e;box-shadow:inset 0 0 0 5px #201b17,0 15px 35px #0005;overflow:hidden;padding:0;text-align:left;background:#282422}.menu-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 25%;filter:brightness(.72) saturate(.75);transition:transform .4s}.menu-card:hover img{transform:scale(1.05);filter:brightness(.95)}.menu-card:after{content:'';position:absolute;inset:0;background:linear-gradient(transparent 5%,#211b1877 45%,#181713 94%)}.menu-label{position:absolute;bottom:24px;left:25px;right:25px;z-index:1}.menu-label small{display:block;color:#c9ae7f;letter-spacing:4px;font-family:var(--serif);margin-bottom:9px}.menu-label strong{display:flex;justify-content:space-between;font-weight:500;font-size:27px}.home-note{margin-top:28px;color:#a9a293;font:14px var(--sans)}.list-body{display:flex;gap:18px;flex:1;min-height:0;padding:26px 24px 0 18px}.card-preview{width:210px;flex-shrink:0;align-self:center;position:relative;padding:12px 0 28px}.card-preview:before,.card-preview:after{content:'';position:absolute;inset:0 20px 10px;background:linear-gradient(140deg,#542924,#242526);border:1px solid #715e43;transform:rotate(-6deg);z-index:0}.card-preview:after{transform:rotate(6deg)}.card-preview img{display:block;width:100%;position:relative;z-index:1;border:2px solid #d2b799;box-shadow:0 0 9px #ec7c6477}.table-main{flex:1;min-width:0;display:flex;flex-direction:column}.table-scroll{overflow:auto;flex:1;min-height:0;scrollbar-color:#927550 #232323}.tactic-header,.tactic-summary{display:grid;grid-template-columns:1.6fr .85fr .65fr 3.8fr .8fr;align-items:center;gap:14px}.tactic-header{background:linear-gradient(#e7e4d8,#b8b8aa);color:#353126;font-size:17px;padding:7px 18px;border:1px solid #847d68;flex-shrink:0;margin:0 0 10px}.tactic-summary{padding:20px 16px;min-height:82px;width:100%;text-align:left}.tactic-row{border-bottom:1px solid #675546;background:linear-gradient(100deg,#252525,#2c2725)}.tactic-row:hover{background:#38302d}.tactic-row.selected{background:linear-gradient(95deg,#4d3538,#332d2d);border-top:2px solid #c9966e;border-bottom:2px solid #c9966e;box-shadow:inset 0 2px 9px #dc97623d}.tactic-name{color:#e5d4a9;display:flex;gap:10px;align-items:center;font-size:20px}.grade{border:1px solid #9a886b;border-radius:50%;width:29px;height:29px;display:inline-grid;place-items:center;flex-shrink:0;font:22px Georgia;color:#e4d5b8}.tactic-description{font-size:16px;line-height:1.6;color:#cdc7b7}.rate,.kind{text-align:center}.tactic-details{display:grid;grid-template-columns:1.6fr .85fr .65fr 3.8fr .8fr;gap:14px;padding:0 16px 15px}.effect-img{grid-column:4 / 6;width:100%;max-width:700px;display:block;mix-blend-mode:lighten}.effect-footer{grid-column:1 / 6;display:flex;align-items:center;justify-content:space-between;border-top:1px solid #81736555;margin-top:10px;padding-top:12px;font-family:var(--sans);font-size:14px;color:#c4b8a5}.empty{padding:70px 20px;text-align:center;color:#c8baa1;line-height:2}.table-footer{display:flex;gap:12px;padding:14px 0;align-items:center;flex-shrink:0}.pill{border:1px solid #85744b;padding:4px 12px;color:#dfc188;font-family:var(--sans);font-size:14px}.overlay{position:fixed;inset:0;background:#080706c9;z-index:20;display:flex;align-items:center;justify-content:center;padding:24px;backdrop-filter:blur(3px)}.dialog{position:relative;border:2px solid #8e7858;box-shadow:0 25px 100px #000b,inset 0 0 0 4px #2e2923;background:linear-gradient(135deg,#333334,#202222);width:min(1020px,95vw);max-height:92dvh;overflow:auto;padding:25px}.dialog-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px;border-bottom:1px solid #796245;padding-bottom:12px;color:#e4d0a6}.close{border:1px solid #bd7661;border-radius:50%;font:26px var(--sans);background:#692c28;width:41px;height:41px;color:#ecddd0}.small-dialog{max-width:550px}.dialog-actions{display:flex;gap:12px;justify-content:flex-end;padding-top:22px}.filter-group{display:grid;grid-template-columns:100px 1fr;align-items:center;gap:16px;margin:18px 0}.filter-options{display:flex;flex-wrap:wrap;gap:10px}.chip{background:linear-gradient(#433130,#292123);color:#c9c1b2;border-color:#715747;min-width:75px}.chip.active{border-color:#e3b571;color:#f1cb88;background:#66513a}.form-row{display:flex;gap:12px;align-items:center;margin:15px 0}.form-row>label{min-width:80px;color:#d6c495}.form-row input:not([type=number]),.form-row textarea{flex:1}.unit-board{flex:1;min-height:0;overflow:auto;display:grid;grid-template-rows:minmax(350px,1fr) auto}.unit-top{display:grid;grid-template-columns:210px minmax(390px,1fr) 230px;gap:30px;padding:30px 40px;background:radial-gradient(ellipse at 48% 35%,#ede8d3b8,#9187758c 63%,#4f4d45);color:#292820}.unit-summary{padding-top:16px}.unit-summary h2{font-size:24px;margin-bottom:22px}.stats-line{display:flex;justify-content:space-between;gap:15px;padding:9px 0;border-bottom:1px solid #3332}.stats-line strong{font-weight:500}.formation-cards{display:grid;grid-template-columns:repeat(3,minmax(0,190px));justify-content:center;align-content:center;gap:18px}.unit-slot{position:relative;min-width:0}.slot-label{text-align:center;background:#3b3430;color:#eee4cc;padding:5px;border:1px solid #bdac80;margin-bottom:6px;font-size:16px}.slot-empty{width:100%;aspect-ratio:177/270;background:linear-gradient(145deg,#48483bd1,#2f3432);border:1px solid #c7bb8a;display:grid;place-content:center;text-align:center;color:#cab783;gap:16px}.slot-empty span{display:block;font:42px var(--serif);border:1px solid #a29264;border-radius:50%;width:58px;height:58px;margin:auto;background:#201e1a77}.slot-actions{display:flex;justify-content:center;gap:10px;margin-top:8px}.slot-actions button{font:14px var(--sans);min-height:30px;color:#28241b;border-bottom:1px solid #675641}.unit-config{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px}.troop-wheel{width:128px;height:128px;border-radius:50%;border:9px double #6e624e;background:radial-gradient(#342f28,#161818);color:#e6d29f;font-size:44px;box-shadow:0 0 0 10px #4d47352b,0 0 0 19px #514c3920}.unit-config select{width:100%;max-width:190px}.unit-bottom{background:radial-gradient(ellipse at center,#48292b,#251d1e);display:grid;grid-template-columns:180px 1fr 180px;padding:24px 40px;gap:25px;align-items:center;border-top:2px solid #827455}.round-button{height:100px;width:100px;justify-self:center;border-radius:50%;border:6px double #ba9e6a;background:radial-gradient(#fae7a6,#bc9846 70%,#433623);color:#5c401d;font-size:22px;box-shadow:0 0 0 4px #202121;line-height:1.2}.round-button:hover{filter:brightness(1.13)}.troop-row{display:grid;grid-template-columns:42px 80px 1fr 55px;align-items:center;gap:15px;margin:10px 0}.troop-row img{width:37px;height:45px;object-fit:cover;object-position:top;border:1px solid #b09662}.unit-list-button{display:flex;flex-direction:column;align-items:center;gap:8px}.unit-list-button strong{font-size:23px;color:#e3c17e}.unit-name{width:190px;background:#d2c8af4a;color:#29271e;border-color:#77644a;padding:8px}.unit-name::placeholder{color:#504736}.hero-info{display:grid;grid-template-columns:34% 1fr;gap:30px;align-items:start}.hero-portrait{position:relative;text-align:center}.hero-portrait>img{width:100%;max-height:63vh;object-fit:contain;object-position:top}.hero-portrait h2{color:#e5c180;margin-top:12px}.hero-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.hero-controls label{color:#b8aa92;font-size:14px}.hero-controls input,.hero-controls select{padding:6px 9px;width:75px}.aptitudes{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.aptitudes span{border:1px solid #80644e;padding:7px;background:#402e30;font:14px var(--sans);color:#d2c9b3}.aptitudes b{margin-left:6px;color:#ebb57b;font-size:18px}.learn-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:82px;background:linear-gradient(90deg,#463031,#242527);border-top:1px solid #7a5c4a;margin-top:8px;padding:13px 16px}.learn-row .learn-main{flex:1;text-align:left}.learn-main strong{font-size:20px;color:#e4d6b6;font-weight:400}.learn-main small{display:block;margin-top:6px}.learn-add{width:100%;text-align:left;display:flex;align-items:center;gap:14px;background:#483136;min-height:75px;padding:15px;margin-top:8px;border:1px solid #8f756b}.plus-circle{display:inline-grid;place-items:center;width:30px;height:30px;border:2px solid #99dc97;color:#9de795;border-radius:50%;box-shadow:0 0 10px #78dc6766;font:26px var(--sans)}.attributes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.attribute{display:flex;align-items:center;justify-content:space-between;padding:8px;background:#20222288;gap:12px}.attribute b{color:#c9b581;font-weight:500}.attr-grid{display:grid;grid-template-columns:80px 1fr 40px 60px 40px;gap:10px;align-items:center;margin:15px 0}.attr-grid input{width:60px;text-align:center;padding:6px}.save-list{display:grid;gap:14px}.saved-unit{display:grid;grid-template-columns:1fr auto;gap:14px;border:1px solid #695640;background:#211f1d;padding:16px}.saved-unit h3{color:#e6ca99}.saved-portraits{display:flex;gap:8px;margin:12px 0}.saved-portraits img{width:50px;height:68px;object-fit:cover;object-position:top}.saved-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.data-note{margin-top:17px;padding-top:12px;border-top:1px solid #77614966;color:#a9a293;font:13px/1.7 var(--sans)}.roster-header,.roster-row{display:grid;grid-template-columns:1.7fr .55fr .55fr .55fr repeat(5,.45fr) .8fr;gap:10px;align-items:center;padding:14px 16px;min-width:760px}.roster-header{background:linear-gradient(#e1decf,#b5b5a9);color:#342e24;min-height:43px;padding-top:6px;padding-bottom:6px}.roster-row{min-height:80px;border-bottom:1px solid #79604770}.roster-row.selected{border-top:2px solid #bc8e62;border-bottom:2px solid #bc8e62;background:#493337}.roster-row>button:first-child{text-align:left;color:#e3ad79;font-size:20px;text-decoration:underline;text-underline-offset:5px}.roster-row span{text-align:center}.deploy-btn{border:1px solid #90b192;background:linear-gradient(#64846a,#284e3b);color:#f1eed9;padding:7px 13px}.event-page{flex:1;display:flex;flex-direction:column;min-height:0;background:radial-gradient(ellipse at 60% 35%,#c5a257,#6a4b2d 75%)}.event-timeline{flex:1;min-height:290px;overflow:auto;position:relative;padding:35px 30px}.event-track{position:relative;display:flex;align-items:center;gap:30px;min-width:max-content;height:100%}.event-track:before{content:'';position:absolute;left:0;right:0;top:50%;height:3px;background:#f0d17b;box-shadow:0 0 9px #f8d078}.event-node{width:165px;z-index:1;align-self:center;position:relative}.event-node:nth-child(even){transform:translateY(-70px)}.event-node:nth-child(odd){transform:translateY(55px)}.event-node:after{content:'';position:absolute;left:50%;top:50%;width:2px;height:70px;background:#edd077;z-index:-1}.event-node:nth-child(odd):after{top:-45px}.event-node .coin{display:grid;place-items:center;width:65px;height:65px;margin:auto auto 10px;background:#392c1c;border:3px solid #bd9256;border-radius:50%;color:#e5c785;font-size:24px;box-shadow:0 0 0 5px #49372166}.event-node.active .coin{border-color:#ffe396;box-shadow:0 0 18px #ffe09a}.event-node strong{font-size:16px;display:block;background:#46311fe3;padding:6px;color:#f4db9a}.event-node small{color:#f4e3bc}.event-detail{padding:15px 28px 22px;background:#302317d9;min-height:185px;border-top:2px solid #b68d4c}.event-detail img{max-width:100%;width:100%;max-height:220px;object-fit:contain;object-position:left top}.event-detail h3{color:#edd093;margin-bottom:12px}.notice{padding:12px 16px;background:#5945304f;border:1px solid #96754766;font:14px/1.7 var(--sans);color:#d3c7b3}.tactic-level{display:flex;align-items:center;gap:14px;padding:12px 0}.tactic-modal{display:grid;grid-template-columns:210px 1fr;gap:25px}.tactic-modal>img{width:100%}.tactic-modal .effect-img{mix-blend-mode:lighten;width:100%;margin:20px 0}#toast{position:fixed;left:50%;top:85px;transform:translateX(-50%);background:#0c0d0dee;color:#f2d8a0;border-block:1px solid #b68b55;box-shadow:0 6px 30px #0008;padding:17px 60px;z-index:50;pointer-events:none;opacity:0;transition:opacity .2s;font-size:20px;text-align:center;max-width:90vw}#toast.show{opacity:1}.hidden{display:none!important}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background:#856e4b;border:2px solid #292724}::-webkit-scrollbar-track{background:#222322}@media(min-width:1800px){.hero-grid{grid-template-columns:repeat(10,minmax(0,1fr))}}@media(max-width:1100px){.hero-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.hero-grid.large{grid-template-columns:repeat(4,minmax(0,1fr))}.card-preview{width:165px}.tab{min-width:60px;padding:8px 12px;font-size:16px}.unit-top{grid-template-columns:150px 1fr 145px;gap:16px;padding:24px}.unit-bottom{grid-template-columns:110px 1fr 110px;padding:24px}.unit-summary h2{font-size:21px}.tactic-summary,.tactic-header,.tactic-details{grid-template-columns:1.5fr .8fr .65fr 2.5fr .7fr;gap:8px}.topbar{padding:0 20px}.tactic-name{font-size:18px}.footer{gap:10px;padding-inline:20px}.formation-cards{gap:12px}.hero-info{gap:20px}.effect-img{grid-column:3/6}.menu-label strong{font-size:23px}}@media(max-width:760px){.shell{min-height:0}.topbar{height:62px;padding:0 14px;gap:8px}.topbar h1{font-size:22px}.top-title small{display:none}.back{font-size:20px;min-width:66px;padding:4px 12px}.top-actions{gap:6px}.top-actions .ghost{font-size:14px;padding:4px}.cards-area{padding:12px}.hero-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.hero-grid.large{grid-template-columns:repeat(3,minmax(0,1fr))}.hero-card .card-name{font-size:14px;padding-top:15px}.card-name em{display:none}.source-status{font-size:10px;padding:5px 0;letter-spacing:1px}.toolbar{padding:8px 12px;overflow:auto;gap:8px}.toolbar .chip{min-width:48px;padding:5px 9px}.footer{padding:9px 12px;gap:8px;min-height:64px;flex-wrap:wrap}.footer .metal{padding:7px 10px;font-size:14px}.search{min-width:150px;flex:1}.count{font-size:14px}.list-body{padding:12px 10px 0;gap:10px}.card-preview{display:none}.tabs{overflow:auto;flex-shrink:0;padding:2px 1px 5px}.tab{font-size:15px;min-width:65px;padding:8px 11px;white-space:nowrap}.tactic-header,.tactic-summary{grid-template-columns:1.5fr .65fr .55fr .6fr;gap:7px}.tactic-header>span:nth-child(4),.tactic-description{display:none}.tactic-summary{padding:15px 8px;min-height:70px}.tactic-name{font-size:16px;gap:7px}.grade{font-size:18px;width:24px;height:24px}.tactic-header{font-size:14px;padding:7px 8px}.kind,.rate{font-size:14px}.tactic-details{display:block;padding:0 10px 12px}.effect-img{max-width:100%;mix-blend-mode:normal}.effect-footer{display:flex;gap:10px;font-size:12px}.table-footer{gap:8px;flex-wrap:wrap}.table-footer .metal{font-size:14px;padding:5px 10px}.home{padding:25px 18px;justify-content:flex-start}.home-heading{margin:15px 0 25px}.home-heading h1{font-size:28px;letter-spacing:2px}.home-heading .seal{font-size:14px}.home-menus{grid-template-columns:1fr;gap:14px;max-width:480px}.menu-card{min-height:160px}.menu-card img{object-position:center 20%;opacity:.8}.menu-label{bottom:22px;left:24px}.menu-label strong{font-size:25px}.home-note{text-align:center;font-size:12px;margin-top:20px;line-height:1.7}.unit-top{grid-template-columns:1fr;gap:18px;padding:16px}.unit-summary{display:flex;gap:12px;flex-wrap:wrap;align-items:center;padding:0}.unit-summary h2{margin:0}.unit-summary .stats-line{font-size:14px;border:0;padding:0}.unit-summary .stats-line.optional{display:none}.formation-cards{grid-template-columns:repeat(3,minmax(0,155px));gap:10px}.unit-config{flex-direction:row;flex-wrap:wrap;gap:15px}.troop-wheel{width:50px;height:50px;border-width:4px;font-size:24px;box-shadow:none}.unit-config select{width:140px}.unit-config .notice{display:none}.unit-board{display:block}.unit-bottom{grid-template-columns:1fr 90px;gap:12px;padding:16px}.unit-list-button{display:none}.troop-row{grid-template-columns:30px 65px 1fr 35px;gap:8px}.troop-row input[type=number]{width:65px;padding:6px}.troop-row img{width:28px;height:37px}.round-button{width:76px;height:76px;font-size:18px}.unit-name{width:155px}.hero-info{grid-template-columns:110px 1fr;gap:12px}.dialog{padding:16px;width:100%;max-height:95dvh}.overlay{padding:10px}.dialog-title{margin-bottom:15px}.hero-portrait>img{width:100%}.hero-portrait h2{font-size:20px}.hero-controls{gap:8px}.hero-controls label{font-size:12px}.hero-controls input,.hero-controls select{width:63px}.aptitudes{gap:5px;margin:12px 0}.aptitudes span{font-size:12px;padding:5px}.aptitudes b{font-size:14px}.learn-main strong{font-size:16px}.learn-row{min-height:69px;padding:10px 8px}.learn-main small{font-size:12px}.learn-add{font-size:14px;padding:10px}.attributes{grid-template-columns:1fr;font-size:14px;gap:4px}.attributes .attribute{padding:5px}.hero-info .notice{font-size:12px}.tactic-modal{grid-template-columns:95px 1fr;gap:12px}.filter-group{grid-template-columns:60px 1fr;gap:9px}.filter-options{gap:7px}.filter-options .chip{min-width:60px;padding:6px 9px}.saved-unit{grid-template-columns:1fr}.saved-actions{justify-content:flex-end}.event-timeline{min-height:270px;padding:20px}.event-detail{padding:15px 10px;min-height:180px}.event-detail img{max-height:none;min-width:680px}.event-detail{overflow:auto}.top-actions .desktop{display:none}#toast{font-size:16px;padding:12px 25px}.attr-grid{grid-template-columns:55px 1fr 35px 48px 35px;gap:6px}.attr-grid input{width:48px}.hero-info .tabs{flex-wrap:wrap}.hero-info .tab{font-size:14px;padding:5px 9px}.tactic-level{flex-wrap:wrap;font-size:14px}}

.creator-credit{flex-shrink:0;width:min(1020px,100%);margin:28px 0 0;padding:18px 20px;border-top:1px solid #806747;color:#efdab0;text-align:center;font-family:var(--sans);font-size:clamp(1.125rem,2vw,1.5rem);font-weight:600;line-height:1.7;word-break:keep-all;overflow-wrap:anywhere}.creator-credit+.home-note{margin-top:10px}

/* Army formation: dark metal headers, pale stone surface and wine-red retreat seals. */
:root{--serif:'Noto Serif KR','Batang','바탕',Georgia,serif;--sans:var(--serif)}
.unit-board{display:flex;background:#c7c8c2;color:#282825}
.unit-top{width:100%;min-height:100%;display:flex;flex-direction:column;align-items:center;gap:24px;padding:24px 36px 28px;background:radial-gradient(ellipse at 48% 30%,#f3f2eddb,transparent 65%),repeating-linear-gradient(115deg,#fff2 0 1px,transparent 1px 7px),linear-gradient(135deg,#9b9f9b,#d2d1c9 48%,#8b918e);box-shadow:inset 0 0 90px #313a3940}
.unit-summary{display:flex;align-items:center;gap:24px;width:100%;max-width:1100px;padding:0 0 16px;border-bottom:1px solid #57564d66;flex-wrap:wrap}
.unit-summary .unit-name{width:240px;color:#25241f;background:#f2eee080;border:1px solid #8c836f;box-shadow:inset 0 1px 5px #51482e20;font-size:19px}
.unit-summary .stats-line{border:0;gap:14px;font-size:17px;font-variant-numeric:tabular-nums}
.unit-summary .ghost{margin-left:auto;color:#514737;border-color:#85765e}
.over-cap{color:#981e25}.formation-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:min(100%,920px);gap:clamp(12px,4vw,54px);align-content:center;flex:1}
.unit-slot{align-self:center;transition:filter .16s}
.slot-label{display:flex;align-items:center;justify-content:space-between;min-height:46px;padding:0 0 0 14px;margin-bottom:7px;border:1px solid #9e8d70;outline:1px solid #342d24;outline-offset:-4px;background:linear-gradient(#3a3935,#222422);box-shadow:0 2px 4px #0005;color:#ece4cf;text-shadow:1px 2px 2px #000;font-size:clamp(16px,2vw,24px)}
.slot-label>span{flex:1;text-align:center;white-space:nowrap}.unit-slot:first-child .slot-label>span{color:#efd59d}
.retreat{align-self:stretch;min-height:46px;padding:3px 15px;margin:-4px -2px -2px 6px;border:3px ridge #94745d;border-radius:4px;background:linear-gradient(#854652 0,#521b29 45%,#39101c);box-shadow:0 2px 4px #0009,inset 0 0 0 1px #c9a08055;color:#fff1db;text-shadow:0 2px 2px #160d0a;font-size:clamp(16px,2vw,23px);white-space:nowrap}.retreat:hover{filter:brightness(1.2)}
.unit-slot .hero-card{width:100%;border:2px solid #554b38;box-shadow:0 3px 9px #2228;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
.unit-slot .hero-card img{-webkit-user-drag:none;pointer-events:none}.unit-slot .hero-card:hover{transform:none}.unit-slot .hero-card:active{cursor:grabbing}
.unit-slot .hero-card .card-name{font-size:clamp(16px,2vw,24px);padding-bottom:9px}
.slot-empty{position:relative;border:2px solid #6d6b58;background:radial-gradient(ellipse at center,#62696170,#2e3733d9),linear-gradient(135deg,#737971,#424b46);box-shadow:inset 0 0 0 4px #bbc0ac22,0 3px 9px #2225;gap:18px;justify-items:center;color:#e2d4aa}
.slot-empty b{font-size:clamp(16px,2vw,23px);font-weight:400;text-shadow:0 2px 2px #202921}
.slot-empty .empty-plus{display:block;position:relative;width:clamp(44px,6vw,76px);height:auto;aspect-ratio:1;border:1px solid #cdbd91;background:#25302b55;box-shadow:inset 0 0 0 4px #cdbd910c;margin:0;border-radius:50%}
.empty-plus:before,.empty-plus:after{content:'';position:absolute;left:50%;top:50%;background:#d9c89a;transform:translate(-50%,-50%)}.empty-plus:before{width:56%;height:2px}.empty-plus:after{height:56%;width:2px}
.slot-aptitude{display:flex;align-items:center;justify-content:center;gap:8px;min-height:42px;margin-top:7px;padding:5px 6px;border:1px solid #8b816d;background:linear-gradient(#555752,#383d39);box-shadow:inset 0 0 0 2px #c6baa92b;color:#e9dfc8;font-size:clamp(14px,1.9vw,22px);text-shadow:0 1px 2px #000;white-space:nowrap}
.slot-aptitude strong{font-size:1.16em;font-weight:600}.slot-aptitude.grade-S{color:#ffa966}.slot-aptitude.grade-A strong{color:#efd58c}.slot-aptitude.grade-B strong{color:#b6d6b8}.slot-aptitude.grade-C strong{color:#d0d4d3}
.unit-config{flex-direction:row;gap:14px;flex-shrink:0}.troop-wheel{display:grid;place-items:center;width:auto;height:48px;border:0;border-radius:0;background:none;color:#342f26;font-size:21px;box-shadow:none}.unit-config select{width:190px;max-width:none;border:2px ridge #a5987d;background:linear-gradient(#3c413c,#212925);color:#f2e7cd;font-size:19px;min-height:48px;box-shadow:0 2px 5px #36393140}
.formation-help{font-size:14px;color:#444b43;text-align:center;line-height:1.8;margin-top:-10px}.formation-help span{display:block;font-size:12px;color:#555c54}
.army-footer .formation-save{min-width:126px;font-size:18px}.drag-source{opacity:.35}.drag-ghost{position:fixed!important;z-index:100;pointer-events:none!important;transform:translate(-50%,-50%) rotate(3deg)!important;opacity:.9;box-shadow:0 15px 35px #0009!important}.drop-target{filter:brightness(1.15);outline:3px solid #fff1a6;outline-offset:5px}
@media(max-width:760px){.unit-top{padding:18px 12px 20px;gap:22px}.unit-summary{gap:12px;padding-bottom:12px}.unit-summary .unit-name{width:160px;font-size:16px}.unit-summary .stats-line{font-size:14px;gap:8px}.unit-summary .ghost{padding:5px;font-size:14px}.formation-cards{gap:10px;max-width:610px;width:100%}.slot-label{padding-left:3px;min-height:40px;font-size:16px}.retreat{font-size:16px;padding:3px 7px;min-height:40px;margin-left:3px;border-width:2px}.slot-aptitude{gap:4px;min-height:36px;font-size:14px}.slot-aptitude strong{font-size:16px}.unit-slot .hero-card .card-name{font-size:14px;padding-inline:1px}.slot-empty{gap:14px}.slot-empty b{font-size:14px}.formation-help{font-size:14px;max-width:330px}.formation-help span{display:none}.army-footer{gap:6px}.army-footer .ghost{font-size:14px;padding:7px 6px}.army-footer .formation-save{font-size:16px;min-width:90px}.army-footer .metal{padding:7px 8px}.unit-config select{font-size:18px}.troop-wheel{font-size:18px}}
@media(max-width:380px){.unit-top{padding-inline:8px}.formation-cards{gap:7px}.retreat{padding-inline:4px;font-size:14px}.slot-label{font-size:14px}.army-footer{padding-inline:8px}.army-footer .spacer{display:none}.army-footer .formation-save{margin-left:auto}.slot-aptitude{font-size:12px;gap:3px}}
@media(prefers-reduced-motion:reduce){.hero-card,.unit-slot{transition:none}}
.apt-source{display:block;margin:-8px 0 16px;line-height:1.7}.apt-source a{color:#efd39e;text-underline-offset:3px}
.hero-card img[src$="h015-reference.jpg"],.hero-portrait>img[src$="h015-reference.jpg"]{aspect-ratio:177/270;object-fit:cover;object-position:left center}
.data-note a{color:#e2c387;text-underline-offset:3px}
.hero-card img[src$="-official.png"]{object-fit:cover;object-position:center;background:#282823;image-rendering:auto}
.card-cost{position:absolute;top:0;left:4px;display:flex;flex-direction:column;align-items:center;gap:0;padding:2px 7px 12px;clip-path:polygon(0 0,100% 0,100% 80%,50% 100%,0 80%);background:linear-gradient(90deg,#57292d,#9e565a 52%,#56282c);border-inline:1px solid #d3ad93;color:#f7e8d5;font:bold clamp(16px,2vw,28px)/1.1 Georgia,serif;text-shadow:1px 2px 2px #34171a;pointer-events:none}.card-cost small{font:inherit;font-size:.75em;color:inherit}
.art-window{display:block;position:relative;width:100%;height:100%;overflow:hidden;pointer-events:none}.art-window>img,.hero-card .art-window>img,.hero-portrait .art-window>img{position:absolute;width:var(--art-width);height:var(--art-height);max-width:none;max-height:none;left:var(--art-left);top:var(--art-top);object-fit:fill;aspect-ratio:auto;border:0;box-shadow:none}.hero-portrait>.art-window{height:auto;aspect-ratio:177/270}.saved-art{display:block;width:50px;height:68px;overflow:hidden}.saved-art>img{width:100%;height:100%;object-fit:cover}
.share-trigger{color:#473920;font-size:19px;font-weight:600;text-shadow:0 1px #eee4c2;border-bottom:1px solid #806d48;padding:8px 4px;white-space:nowrap}.share-dialog{width:min(940px,96vw);padding:18px;display:flex;flex-direction:column;overflow:hidden;max-height:94dvh}.share-dialog .dialog-title{margin-bottom:10px;padding-bottom:10px;flex-shrink:0}.share-preview{min-height:0;overflow:auto;text-align:center;flex:1}.share-preview>img{display:block;max-width:100%;max-height:calc(94dvh - 155px);width:auto;height:auto;margin:auto}.share-preview>p{padding:65px 20px;line-height:1.7;color:#ddc9a4}.share-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:12px;flex-shrink:0;font-size:14px;color:#c5baa5}.share-bottom a{display:inline-flex;align-items:center;text-decoration:none;font-size:16px}.share-dialog h2{font-size:24px}@media(max-width:760px){.share-trigger{font-size:16px}.share-dialog{padding:10px}.share-preview>img{max-height:calc(94dvh - 140px)}.share-bottom{gap:6px}.share-bottom a{padding:8px 12px}}
/* Five-army working set and consistent hero controls. */
.set-title{width:100%;max-width:1100px;display:flex;justify-content:space-between;align-items:center;gap:16px;color:#484b42;font-size:14px}.set-title label{display:flex;align-items:center;gap:12px;flex:1}.set-title input{background:#eeeaddb3;color:#2f322c;border:1px solid #94856a;width:min(300px,65%);font-size:17px}.set-title>span{white-space:nowrap}.army-carousel{position:relative;display:grid;grid-template-columns:44px minmax(0,920px) 44px;column-gap:14px;row-gap:14px;align-items:center;width:min(100%,1040px);flex:1}.army-position{grid-column:2;display:flex;align-items:center;justify-content:center;gap:20px;color:#35382f}.army-position strong{font-size:25px;font-weight:500}.army-position>span{display:flex;gap:8px}.army-position i{width:9px;height:9px;border:1px solid #7c725c;border-radius:50%;background:transparent}.army-position i.filled{background:#a8915c}.army-position i.current{background:#562b27;outline:2px solid #c7ad78;outline-offset:3px}.army-carousel>.formation-cards{grid-column:2;grid-row:2;width:100%;gap:clamp(10px,2.6vw,38px)}.army-arrow{grid-row:2;padding:0;min-width:40px;min-height:70px;font:36px Georgia,serif;color:#725832;text-shadow:0 1px #fff5cf,0 2px 4px #3e301d66;background:linear-gradient(90deg,transparent,#b5ab9144,transparent);border-block:1px solid #9b8b6b88}.army-arrow.previous{grid-column:1}.army-arrow.next{grid-column:3}.army-arrow:hover{color:#3c2c18;background:#b9aa8588}.saved-armies{margin-top:16px;display:grid;gap:8px}.saved-army{display:flex;gap:14px;align-items:center;padding:8px 0;border-bottom:1px solid #76604455}.saved-army>b{color:#e2c287;white-space:nowrap}.saved-army>span{flex:1;line-height:1.7;overflow-wrap:anywhere}.saved-army .ghost{font-size:14px;white-space:nowrap}
.hero-controls{gap:20px;align-items:center}.hero-controls label{display:inline-flex;align-items:center;gap:9px;font:16px var(--serif)}.hero-controls select[data-field="memberRank"]{width:132px;min-width:132px;padding:10px 30px 10px 14px;font:18px var(--serif);min-height:48px}.hero-controls input[data-field="memberLevel"]{width:92px;min-height:48px;font-size:18px}.hero-info{grid-template-columns:minmax(170px,28%) minmax(0,1fr)}.hero-info>div{min-width:0}.dialog:has(.hero-info){width:min(1200px,97vw)}.hero-info .tabs{flex-wrap:wrap;overflow:visible}.hero-info .learn-main{min-width:0}.learn-main strong{overflow-wrap:anywhere;line-height:1.6}.learn-row{background:linear-gradient(105deg,#393d37,#252b26);border:1px solid #8d795c66;box-shadow:inset 0 1px #d5c39c14;padding:16px 20px}.learn-add{min-height:80px;gap:18px;background:linear-gradient(110deg,#41483d,#2e352d);border:1px solid #a5946c;box-shadow:inset 0 0 0 3px #191f1855,0 3px 7px #0003;color:#efe6cc;font:18px/1.6 var(--serif);padding:18px 20px}.learn-add:hover{background:linear-gradient(110deg,#535c48,#384131);border-color:#d6bb80}.plus-circle{position:relative;display:block;flex:0 0 34px;width:34px;height:34px;border:1px solid #bcaa78;border-radius:50%;background:#21281e;box-shadow:inset 0 0 8px #a8935622;font-size:0}.plus-circle:before,.plus-circle:after{content:'';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#dcc58c;border:0}.plus-circle:before{width:17px;height:2px}.plus-circle:after{width:2px;height:17px}
.rank-marks{display:flex;align-items:center;justify-content:center;gap:6%;width:100%;height:30px}.rank-mark{width:clamp(12px,2vw,23px);height:100%;overflow:visible;fill:#f2d15d;stroke:#ac8339;stroke-width:.7;filter:drop-shadow(1px 2px 1px #0008)}.rank-mark.promoted{fill:#f07250;stroke:#b94832}.rank-mark circle{fill:#41301c;stroke:none}.hero-card .card-name.with-rank{top:72%;bottom:0;padding:8px 3px 6px;background:linear-gradient(#181a14,#514121);display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:7px}.card-name.with-rank .rank-marks{flex-basis:100%}.detail-art{position:relative;overflow:hidden;aspect-ratio:177/270;border:1px solid #aa8d5a}.detail-art>img{width:100%;height:100%;object-fit:cover;display:block}.detail-rank{position:absolute;top:72%;bottom:0;left:0;right:0;background:linear-gradient(#181a14,#514121);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;color:#ead49b}.detail-rank>span:last-child{font-size:15px}.detail-rank .rank-marks{height:32px}.detail-art .art-window{height:100%;aspect-ratio:auto}.hero-portrait h2{font-size:clamp(18px,2.5vw,26px);overflow-wrap:anywhere}
.tactic-details{background:#302e2c;padding:18px 20px;border-top:1px solid #90795b55}.tactic-details .effect-img{grid-column:1 / -1;width:100%;max-width:900px;justify-self:center;mix-blend-mode:lighten;border:0;padding:12px 16px;background:#302e2c;box-shadow:0 0 20px 12px #302e2c;border-radius:3px}.tactic-row.selected{background:linear-gradient(100deg,#464038,#302e2c);border-color:#a78b60}.effect-footer{position:relative;background:#302e2c;margin-top:16px;line-height:1.8}.tactic-modal .effect-img{background:#302e2c;mix-blend-mode:lighten;padding:16px;border:1px solid #77664c66}.tactic-modal{background:#302e2c;padding:18px}.effect-footer .metal{flex-shrink:0}
@media(max-width:760px){.unit-top{gap:16px}.set-title{gap:8px;font-size:13px}.set-title label{gap:7px}.set-title input{font-size:15px}.army-carousel{grid-template-columns:28px minmax(0,1fr) 28px;gap:10px 5px}.army-arrow{min-width:28px;font-size:27px;min-height:64px}.army-position strong{font-size:22px}.hero-controls{gap:14px}.hero-controls label{font-size:15px}.hero-controls select[data-field="memberRank"]{width:124px;min-width:124px;font-size:17px;padding-right:27px}.hero-info{grid-template-columns:minmax(105px,25%) minmax(0,1fr);gap:16px}.learn-add{font-size:16px;line-height:1.7;min-height:76px;padding:15px 12px;gap:12px}.plus-circle{flex-basis:32px;width:32px;height:32px}.hero-card .card-name.with-rank{padding:3px 1px;gap:2px;font-size:13px}.rank-marks{height:23px}.detail-rank{gap:4px}.detail-rank .rank-marks{height:25px}.detail-rank>span:last-child{font-size:12px}.saved-army{gap:8px}.saved-army .ghost{padding:6px 3px}.tactic-details{padding:14px 8px}.tactic-details .effect-img{padding:10px 6px;mix-blend-mode:lighten}.tactic-modal{padding:10px;grid-template-columns:80px minmax(0,1fr)}.army-footer .formation-save{font-size:15px;min-width:105px}}
@media(max-width:420px){.hero-info{grid-template-columns:90px minmax(0,1fr);gap:10px}.hero-controls{gap:10px}.hero-controls input[data-field="memberLevel"]{width:70px}.hero-controls select[data-field="memberRank"]{width:114px;min-width:114px}.hero-info .aptitudes span{font-size:13px}.learn-add{gap:10px;font-size:15px}.detail-rank .rank-marks{height:20px}}
@media(max-width:420px){.army-carousel .slot-label{font-size:14px;padding-left:2px}.army-carousel .retreat{font-size:14px;padding-inline:4px;margin-left:2px}.army-carousel .hero-card .card-name.with-rank{top:65%;padding-top:2px;gap:2px;line-height:1.25}.army-carousel .rank-marks{height:17px}.army-carousel .card-name b{font-size:12px;overflow-wrap:anywhere}.army-carousel .card-name em{display:none}.saved-army{flex-wrap:wrap}.saved-army>span{min-width:130px}}
/* Original artwork is clipped to its content, with a matching continuous surface. */
.effect-surface{grid-column:1/-1;box-sizing:border-box;width:100%;padding:20px 22px;background:var(--effect-bg,#3c3032);border:0;box-shadow:none}
.effect-crop{position:relative;overflow:hidden;width:100%;max-width:900px;margin:0 auto}
.effect-crop>img{position:absolute;inset:0 auto auto 0;display:block;width:100%;height:auto;max-width:none;margin:0;padding:0;border:0;box-shadow:none;mix-blend-mode:normal}
.tactic-details{display:block;padding:0;background:#30282a;border-top:1px solid #8d775447}
.tactic-details .effect-footer{margin:0;padding:12px 22px;background:#30282a;border-top:1px solid #8d775430}
.tactic-row.selected{background:linear-gradient(100deg,#51413b,#30282a)}
.tactic-modal{background:linear-gradient(145deg,#30282a,#242020);padding:22px;gap:22px;border:1px solid #8d775430}
.tactic-modal>div{min-width:0}.tactic-modal .effect-surface{margin-top:20px}
.tactic-modal .stats-line{background:transparent;border-bottom:1px solid #a18d6c28}
.tactic-modal .data-note{line-height:1.8;border-color:#a18d6c30;margin-top:20px}
.event-page{flex:1;min-height:0;display:block;overflow:auto;background:radial-gradient(ellipse at 35% 0,#51453688,transparent 65%),linear-gradient(130deg,#2d2925,#201d1b);color:#e6d8bb}
.event-heading{max-width:1220px;margin:auto;padding:26px 28px 0;display:flex;justify-content:space-between;gap:16px;align-items:center;color:#d6bb87}.event-heading>span{font-size:21px}.event-heading small{color:#aa9e8b;font-size:13px}
.event-timeline{flex:none;min-height:0;height:auto;padding:22px 28px 24px;overflow-x:auto;overflow-y:hidden;border-bottom:1px solid #aa8d5440;background:transparent;scrollbar-width:thin;scroll-snap-type:x proximity}
.event-track{display:flex;gap:14px;align-items:stretch;height:auto;min-width:max-content;max-width:1164px;margin:auto}
.event-track:before,.event-node:after{display:none}
.event-node,.event-node:nth-child(even),.event-node:nth-child(odd){transform:none;align-self:stretch;width:170px;padding:18px 12px 15px;scroll-snap-align:center;border:1px solid #a88b5145;background:linear-gradient(150deg,#3b332c,#252321);transition:background .18s,border-color .18s;box-shadow:inset 0 0 0 3px #201d1b44}
.event-node:hover{border-color:#c8aa70;background:#44382d}.event-node.active{border-color:#dbc089;background:linear-gradient(145deg,#66513b,#3b3028);box-shadow:inset 0 0 0 3px #b69b6330,0 6px 18px #0003}
.event-node .coin{width:46px;height:46px;margin-bottom:12px;font-size:23px;border:1px solid #b59a68;background:#282421;box-shadow:0 0 0 3px #b59a6818}.event-node.active .coin{border-color:#e9d29b;box-shadow:0 0 0 3px #d4b47730;color:#f5dfa9}
.event-node small{display:block;font-size:12px;line-height:1.6;color:#c5b79d;min-height:38px}.event-node strong{font-size:17px;line-height:1.6;padding:0;background:none;color:#ead5ab}
.event-detail{max-width:1164px;min-height:0;margin:30px auto 40px;padding:0 28px;background:none;border:0}
.event-detail-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:0 0 20px;border-bottom:1px solid #b1935b60}.event-kicker{color:#b4a184;letter-spacing:.1em;font-size:12px}.event-detail h3{font-size:28px;font-weight:500;color:#f1dfba;margin:8px 0 0}.event-tactic-name{padding:10px 20px;color:#e8c98e;border:1px solid #aa8e5d55;background:#3d3027;font-size:19px}
.event-story{display:grid;grid-template-columns:240px minmax(0,1fr);gap:28px;align-items:center;padding:28px 0}
.event-illustration{position:relative;overflow:hidden;aspect-ratio:350/244;border:1px solid #af956455;box-shadow:0 8px 25px #0004}
.event-detail .event-illustration img{position:absolute;top:0;left:-15.7143%;width:450.8572%;height:auto;min-width:0;max-width:none;max-height:none;object-fit:fill}
.event-description{min-width:0;background:linear-gradient(130deg,#42382b,#30251e);border-block:1px solid #98784540;padding:18px 14px 22px}.event-description h4{font-size:14px;font-weight:400;color:#c6b08a;margin:0 0 16px;letter-spacing:.06em}
.event-original{position:relative;overflow:hidden;aspect-ratio:1118/173;background:#392d21}
.event-detail .event-original img{position:absolute;top:-8.0925%;left:-41.1449%;width:141.1449%;height:auto;min-width:0;max-width:none;max-height:none;object-fit:fill;mix-blend-mode:lighten}
@media(max-width:900px){.event-story{grid-template-columns:180px minmax(0,1fr);gap:18px}.event-detail{margin-top:24px}.event-detail h3{font-size:24px}}
@media(max-width:760px){.effect-surface{padding:16px 12px}.tactic-details .effect-footer{padding:12px}.tactic-modal{padding:12px;gap:12px}.tactic-modal .effect-surface{margin-top:14px}.event-heading{padding:20px 18px 0;align-items:flex-start}.event-heading small{max-width:180px;text-align:right;line-height:1.6}.event-timeline{min-height:0;padding:18px;height:auto}.event-node{width:144px;padding:14px 8px}.event-node .coin{width:40px;height:40px}.event-node strong{font-size:16px}.event-detail{padding:0 18px;min-height:0;overflow:visible}.event-detail-heading{gap:12px}.event-detail h3{font-size:22px}.event-tactic-name{font-size:15px;padding:8px 12px;white-space:nowrap}.event-story{grid-template-columns:1fr;gap:18px;padding:22px 0}.event-illustration{width:min(100%,350px);justify-self:center}.event-description{padding:16px 10px 20px}.event-description h4{font-size:13px}}
@media(max-width:520px){.tactic-modal{display:block}.tactic-modal>img{float:left;width:64px;max-width:64px;margin:0 12px 12px 0}.tactic-modal .stats-line{margin-left:76px;font-size:14px}.tactic-modal .effect-surface{clear:both}.event-description{overflow-x:auto}.event-description .event-original{min-width:600px}.event-description:after{content:'좌우로 밀어 원문을 확인하세요';display:block;font-size:11px;color:#bdab8e;margin-top:12px}.event-tactic-name{font-size:13px}.event-detail h3{font-size:20px}}
/* Named formations and explicit rename dialogs. */
.name-control{display:flex;align-items:center;gap:12px;min-width:0;flex:1}.name-label{white-space:nowrap;color:#c2b392;font-size:15px}.name-value{min-width:0;overflow-wrap:anywhere;font-size:20px;color:#ede0c2;padding:12px 16px;border:1px solid #9b825340;background:#29271f88;flex:1}.rename-trigger{flex-shrink:0;font-size:14px;padding:10px 14px;white-space:nowrap}.set-title{max-width:1100px;align-items:center}.set-title>.name-control{max-width:820px}.set-title>span{color:#c2b392}.army-name-control{max-width:650px}.unit-summary>.ghost{margin-left:auto;white-space:nowrap}.formation-status{grid-column:1/-1;grid-row:1;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px}.formation-status .army-position{grid-column:auto;display:flex;color:#ddcfaf;gap:18px}.formation-cost{display:flex;align-items:center;gap:12px;color:#d8c9aa;font-size:17px;white-space:nowrap}.formation-cost strong{font-weight:500;color:#eed5a0}.formation-cost strong.over-cap{color:#ef7d69}.rename-label{display:block;margin-bottom:16px;color:#d4c5aa;line-height:1.6}.rename-input{width:100%;box-sizing:border-box;font-size:20px;padding:14px}.rename-error{color:#ee9988;min-height:24px;margin-top:10px}.settings-name{overflow-wrap:anywhere;min-width:0}
@media(max-width:760px){.name-control{gap:8px;flex-wrap:wrap}.name-value{font-size:17px;padding:10px;min-width:100px}.name-label{font-size:14px}.rename-trigger{padding:10px;font-size:14px}.set-title{gap:10px;flex-wrap:wrap}.set-title>.name-control{flex-basis:100%}.set-title>span{margin-left:auto;font-size:14px}.unit-summary{gap:12px}.army-name-control{flex:1;min-width:220px}.formation-status{gap:8px;grid-template-columns:1fr auto 1fr}.formation-cost{gap:6px;font-size:14px}.formation-status .army-position{gap:10px}.formation-status .army-position strong{font-size:21px}}
@media(max-width:440px){.formation-status{grid-template-columns:1fr auto}.formation-status>span:last-child{display:none}.name-label{flex-basis:100%}.army-name-control{min-width:100%;order:3}.unit-summary>.ghost{margin-left:auto}.formation-status .army-position{gap:8px}.formation-status .army-position i{width:7px;height:7px}}
/* Attribute growth and promotion bonuses */
.hero-controls .bonus-check{display:inline-flex;align-items:center;gap:9px;padding:10px 14px;border:1px solid #75613b;background:linear-gradient(135deg,#29281e,#171b18);color:#e8dfca;cursor:pointer;white-space:nowrap}
.hero-controls .bonus-check input{width:22px;height:22px;min-width:22px;margin:0;accent-color:#c9a960;cursor:pointer}
.hero-controls .bonus-check:has(input:checked){border-color:#d5b56e;background:#383021}
.stat-table{margin-top:22px;border:1px solid #514632;background:linear-gradient(130deg,#24251e,#171b18);font-variant-numeric:tabular-nums}
.stat-head,.stat-row{display:grid;grid-template-columns:1fr repeat(4,1.15fr);gap:8px;padding:13px 16px;align-items:center;border-bottom:1px solid #66573a40}
.stat-head{color:#bba980;background:#121713;font-size:.82em}.stat-row span,.stat-row strong,.stat-head span:not(:first-child){text-align:right}.stat-row strong{color:#e5c989}.stat-row b{font-weight:400}.stat-row:last-child{border:0}
.stat-note{color:#aaa491;font-size:.8em;margin:12px 0 20px;line-height:1.7}.stat-discrepancy{font-size:.8em;color:#ccb48a;margin:12px 0 20px}.stat-discrepancy summary{cursor:pointer}.stat-discrepancy p{margin:6px 0}
.bonus-total{margin-top:24px;display:flex;align-items:center;gap:24px;color:#c8b57e}.bonus-total strong{font-size:1.65em;color:#f1dfb4}.bonus-breakdown{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 18px}.bonus-breakdown span{padding:7px 11px;background:#292a20;border:1px solid #5b5036;color:#d9c897;font-size:.85em}
.event-catalog{overflow-y:auto;min-height:0;flex:1;padding:26px clamp(18px,4vw,70px) 40px;background:radial-gradient(ellipse at top,#343328,#181e1a 65%)}
.event-catalog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px;color:#c5b185}.event-catalog-heading h2{margin:0;font-weight:400}.event-catalog-heading small{font-size:.6em;margin-left:10px}.event-catalog-heading>span{font-size:.8em;color:#aaa38f}
.event-columns,.event-material-row{display:grid;grid-template-columns:minmax(140px,23%) 1fr;gap:24px;padding:20px 24px}.event-columns{color:#b9a575;border-bottom:1px solid #877449;background:#161c18}.event-material-row{margin:0;border-bottom:1px solid #5b503640;background:#23271f80}.event-material-row:nth-child(even){background:#181e1b80}.event-material-row h3{margin:0;color:#e4ce9c;font-weight:400;font-size:1em;align-self:center}.event-material-row>div{display:flex;flex-wrap:wrap;gap:8px}.material-chip{padding:7px 10px;color:#dbd7c8;background:#10181380;border:1px solid #73634550;font-size:.88em;line-height:1.6}
@media(max-width:600px){.stat-head,.stat-row{padding:12px 7px;gap:4px;font-size:.8em}.event-columns,.event-material-row{grid-template-columns:110px 1fr;padding:16px 12px;gap:12px}.event-catalog-heading{align-items:flex-start;flex-direction:column;gap:8px}.hero-controls .bonus-check{padding:9px 10px}}
/* Preserve full card art; replace only the original promotion row. */
.hero-card img.rank-strip,.detail-art img.rank-strip{position:absolute;display:block;object-fit:fill;max-width:none;min-height:0;z-index:2;pointer-events:none;border:0;aspect-ratio:auto}
.hero-card .card-name.with-rank{top:auto;bottom:0;padding:3px 2px;background:linear-gradient(transparent,#19160fbb);display:block;font-size:clamp(12px,1.5vw,20px);line-height:1.25;height:12%;align-content:center}
.hero-card .card-name.with-rank em{display:none}.hero-card .card-name.with-rank b{font-weight:400}
.stat-head,.stat-row{grid-template-columns:.8fr 1fr 1fr 1.35fr}.allocated-bonus{display:inline-block;color:#8dd8ac;white-space:nowrap;font-size:.88em}.stat-row strong{font-weight:400}.innate-button{text-align:left;width:100%;cursor:pointer}.innate-button:hover{background:#b8994c15}.innate-owner{display:block;margin-top:8px}.innate-description{line-height:1.9;padding:20px;background:linear-gradient(120deg,#292b22,#1c211c);border:1px solid #685937}.innate-description p{margin:22px 0;white-space:pre-line}.innate-description small{display:block}.innate-source{display:inline-block;margin-top:18px;color:#dec588}.attr-grid .muted{color:#bfc8b9;font-variant-numeric:tabular-nums}
.army-carousel .hero-card .card-name.with-rank{top:auto;bottom:0;height:12%;padding:3px 2px;line-height:1.25}
/* Shared spacing and alignment across the catalog, editor and dialogs. */
:root{--space:clamp(16px,2vw,28px);--content-width:1280px}
button,input,select{min-height:44px}input[type=checkbox]{min-height:22px}
.topbar,.footer,.toolbar{padding-inline:var(--space)}
.topbar h1,.dialog-title h2{line-height:1.45;overflow-wrap:anywhere}
.dialog{width:min(1180px,calc(100vw - 32px));padding:var(--space);line-height:1.6}
.dialog-title{gap:20px;align-items:center;margin-bottom:24px;padding-bottom:16px}
.dialog-title h2{font-size:clamp(22px,2.4vw,30px)}.dialog-title .close{flex:0 0 44px;width:44px;height:44px;min-height:44px;display:grid;place-items:center;line-height:1;padding:0}
.hero-info{display:grid;grid-template-columns:clamp(160px,22vw,240px) minmax(0,1fr);gap:var(--space);align-items:start}
.hero-info>div{min-width:0}.hero-portrait{display:flex;flex-direction:column;align-items:stretch;gap:12px;text-align:center}
.hero-portrait .detail-art{width:100%}.hero-portrait h2{font-size:22px;margin:0}.hero-portrait p{margin:0;line-height:1.8}
.hero-portrait .metal{margin-top:0!important;width:100%}.hero-info .tabs{gap:8px;margin:0 0 20px;flex-wrap:wrap;overflow:visible}.hero-info .tab{font-size:16px;min-height:44px;padding:8px 18px}
.hero-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:start;margin:0 0 20px}
.hero-level-row,.hero-bonus-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%}
.hero-level-row>label{display:grid;grid-template-columns:46px minmax(0,1fr);align-items:center;gap:10px;font-size:16px;min-width:0}
.hero-level-row input[data-field=memberLevel],.hero-level-row select[data-field=memberRank]{width:100%;min-width:0;min-height:48px;font-size:18px;padding:10px 14px}
.hero-controls .bonus-check{display:flex;justify-content:flex-start;gap:12px;padding:12px 16px;min-height:48px;font-size:16px;width:100%;margin:0}
.hero-controls .bonus-check input{flex:0 0 22px;width:22px;min-height:22px;height:22px;padding:0}
.hero-controls .hero-variant,.hero-controls>.pill{justify-self:start;font-size:14px;padding:6px 12px}
.hero-info .aptitudes{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:0 0 8px}
.hero-info .aptitudes span{display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 4px;font-size:14px;white-space:nowrap}
.hero-info .aptitudes b{font-size:18px}.hero-info .apt-source{margin:0 0 20px;font-size:14px}
.stat-table-wrap{width:100%;margin-top:0;overflow-x:auto}
.stat-table{width:100%;border-collapse:collapse;table-layout:fixed;margin:0;font-size:16px;font-variant-numeric:tabular-nums}
.stat-table th,.stat-table td{text-align:center;vertical-align:middle;border-bottom:1px solid #76634244;padding:16px 10px;font-weight:400;line-height:1.5}
.stat-table th:first-child{width:19%}.stat-table th:last-child{width:35%}
.stat-table thead{background:#1e231c;color:#cdb88c;font-size:14px}.stat-table tbody tr:last-child>*{border-bottom:0}
.stat-table tbody tr:nth-child(even){background:#ffffff03}.stat-current{display:inline-flex;justify-content:center;align-items:baseline;gap:6px;color:#ead3a0;white-space:nowrap}
.stat-current>.allocated-bonus{min-width:5ch;text-align:left;font-size:14px}.stat-note,.stat-discrepancy{font-size:14px;margin:12px 0 20px;line-height:1.75}
.attr-grid{display:grid;grid-template-columns:64px minmax(100px,1fr) 44px 64px 44px;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid #76634244;font-size:16px}
.attr-grid>span:nth-child(2){text-align:center}.attr-grid input{width:100%;text-align:center;padding:8px}.attr-grid .icon-btn{width:44px;height:44px;padding:0;display:grid;place-items:center}
.dialog-actions{gap:12px;flex-wrap:wrap;margin-top:24px;padding-top:16px}.dialog-actions button{min-width:100px}
.learn-row,.learn-add{margin-top:12px;min-height:76px;padding:16px;gap:16px}.learn-main{min-width:0;flex:1}.learn-main strong{font-size:18px;line-height:1.6}.learn-main small{font-size:14px;line-height:1.7}.learn-add{font-size:16px}.learn-row>.ghost{flex-shrink:0}
.data-note{font-size:14px;line-height:1.8;margin-top:24px;padding-top:16px}.notice{line-height:1.8;padding:16px;font-size:14px}
.cards-area{padding:var(--space)}.hero-grid{gap:18px;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));max-width:1600px}.hero-grid.large{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
.list-body{padding:var(--space);gap:var(--space)}.table-main{min-width:0}.table-footer{padding:16px 0;gap:12px;align-items:center;flex-wrap:wrap}.table-footer .search{flex:0 1 300px}
.tactic-header,.tactic-summary{align-items:center}.tactic-summary{padding:16px;gap:16px}.tactic-name{line-height:1.6;min-width:0}.tactic-description{line-height:1.7}.effect-surface{padding:20px}.tactic-modal{gap:24px;padding:16px}.tactic-modal .stats-line{padding:12px 0;gap:16px;font-size:16px}.tactic-modal .data-note{margin-top:20px}
.unit-top{padding:var(--space);gap:24px}.set-title,.unit-summary,.army-carousel{width:100%;max-width:var(--content-width);margin-inline:auto}.set-title{gap:16px}.name-control{gap:12px}.name-value{min-height:48px;display:flex;align-items:center;font-size:18px;line-height:1.6}.rename-trigger{min-height:44px}.unit-summary{gap:20px}.formation-cards{gap:clamp(10px,2vw,24px)}.unit-config{margin:0;gap:16px}.formation-help{margin:0 auto;max-width:900px;font-size:14px;line-height:1.8}
.saved-unit{padding:20px;gap:20px}.saved-actions{gap:10px;flex-wrap:wrap}.saved-army{padding-block:12px;gap:12px}
.event-catalog{padding:var(--space)}.event-catalog-heading,.event-columns,.event-material-row{max-width:var(--content-width);margin-inline:auto}.event-catalog-heading{margin-bottom:20px}.event-columns,.event-material-row{grid-template-columns:minmax(145px,22%) minmax(0,1fr);gap:24px;padding:20px}.event-material-row>div{gap:10px}.event-material-row h3{font-size:18px;line-height:1.7}.material-chip{font-size:16px;padding:9px 12px;line-height:1.8;color:#c6c3b7}.material-rarity{white-space:nowrap}.rarity-5{color:#e5a06c}.rarity-4{color:#cc8ad8}.rarity-3{color:#92b9e4}.rarity-2{color:#acd0a1}
@media(max-width:900px){.hero-info{grid-template-columns:170px minmax(0,1fr)}.stat-table th,.stat-table td{padding:14px 6px}.hero-info .aptitudes{gap:5px}.hero-info .aptitudes span{gap:5px;font-size:14px}.tactic-summary{gap:10px}}
@media(max-width:700px){
 .dialog{width:100%;padding:16px;max-height:95dvh}.overlay{padding:8px}.dialog-title{margin-bottom:20px}.hero-info{display:block}
 .hero-portrait{display:grid;grid-template-columns:110px minmax(0,1fr);column-gap:20px;row-gap:8px;align-items:center;text-align:left;margin-bottom:24px}
 .hero-portrait .detail-art{grid-column:1;grid-row:1/4}.hero-portrait h2,.hero-portrait p,.hero-portrait>.metal{grid-column:2}.hero-portrait h2{font-size:22px;align-self:end}.hero-portrait>.metal{width:auto;justify-self:start;margin:0!important}.hero-portrait p{align-self:start;font-size:14px}
 .hero-info .tabs{margin-bottom:16px}.hero-level-row,.hero-bonus-row{gap:12px}.hero-level-row>label{grid-template-columns:36px minmax(0,1fr);gap:6px;font-size:14px}
 .hero-controls .bonus-check{font-size:15px;padding:12px;gap:10px}.hero-controls{gap:12px}.hero-info .aptitudes{gap:5px}.hero-info .aptitudes span{padding:9px 3px;font-size:13px;gap:5px}.hero-info .aptitudes b{font-size:16px}
 .stat-table{font-size:15px}.stat-table thead{font-size:13px}.stat-table th:first-child{width:17%}.stat-table th:last-child{width:37%}.stat-table th,.stat-table td{padding:14px 4px}.stat-current{gap:4px}.stat-current>.allocated-bonus{font-size:13px;min-width:4.8ch}
 .attr-grid{grid-template-columns:44px minmax(78px,1fr) 40px 52px 40px;gap:6px;font-size:14px}.attr-grid .icon-btn{min-width:40px;width:40px}.attr-grid input{font-size:16px}.learn-main strong{font-size:16px}
 .hero-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.hero-grid.large{grid-template-columns:repeat(2,minmax(0,1fr))}.toolbar{gap:8px;flex-wrap:wrap;overflow:visible}.toolbar .search{min-width:160px}.footer{gap:8px;flex-wrap:wrap;padding-block:12px}
 .list-body{padding:12px;gap:12px}.table-footer .search{flex:1;min-width:180px}.table-footer>.muted{flex-basis:100%}.table-scroll{overflow:auto}.roster-header,.roster-row{min-width:660px}
 .unit-summary{gap:12px}.set-title .name-control,.army-name-control{display:grid;grid-template-columns:minmax(0,1fr) auto;width:100%;min-width:0}.name-label{grid-column:1/-1}.name-value{min-width:0;font-size:16px}.rename-trigger{font-size:14px;padding:10px}.army-name-control{flex-basis:100%;order:2}.unit-config select{width:180px}.army-footer .formation-save{margin-left:auto}
 .event-columns,.event-material-row{grid-template-columns:105px minmax(0,1fr);gap:12px;padding:16px 10px}.event-material-row h3{font-size:16px}.material-chip{padding:7px 9px;font-size:14px}.event-material-row>div{gap:8px}
 .tactic-modal{padding:12px;gap:16px}.tactic-modal .effect-surface{padding:14px}.filter-group{grid-template-columns:60px minmax(0,1fr);gap:12px}.filter-options{gap:8px}
}
@media(max-width:380px){.dialog{padding:12px}.hero-level-row>label{display:flex;flex-direction:column;align-items:stretch;gap:5px}.hero-portrait{grid-template-columns:96px minmax(0,1fr);gap:12px}.hero-info .aptitudes{grid-template-columns:repeat(3,minmax(0,1fr))}.stat-table{font-size:14px}.stat-current{flex-wrap:wrap;gap:0}.stat-current>.allocated-bonus{text-align:center;min-width:0;width:100%}.event-columns{display:none}.event-material-row{grid-template-columns:1fr;gap:10px}.hero-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.dialog.small-dialog{width:min(620px,calc(100vw - 24px))}.dialog.share-dialog{width:min(940px,calc(100vw - 24px))}.form-row{display:grid;grid-template-columns:110px minmax(0,1fr);gap:12px;align-items:center;margin:16px 0}.form-row>.metal{grid-column:2;justify-self:start}.form-row textarea,.form-row select{width:100%}.settings-name{line-height:1.7}
@media(max-width:700px){.form-row{grid-template-columns:85px minmax(0,1fr);gap:10px}.share-bottom{flex-wrap:wrap;gap:12px}.dialog.small-dialog,.dialog.share-dialog{width:100%}}
/* Linked, bounded card selector above the selection lists. */
.list-body.selection-page{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding-block:12px;overflow:hidden;min-height:0}.selection-page>.card-preview{display:none}.selection-page>.table-main{width:100%;max-width:1120px;align-self:center;flex:1;min-height:0;display:flex;flex-direction:column}.selection-page .table-scroll{flex:1;min-height:130px;overscroll-behavior:contain;overflow:auto;scroll-behavior:auto}.selection-page .table-footer{flex-shrink:0;padding-block:10px}.selection-page .tabs{flex-shrink:0;flex-wrap:nowrap;overflow-x:auto}.selection-page .roster-header{position:sticky;top:0;z-index:3;background:#25281f}.selection-page .roster-row.selected{background:linear-gradient(90deg,#68503988,#b48b4633);box-shadow:inset 3px 0 #efc87e}
.selection-carousel{width:100%;max-width:1120px;align-self:center;flex-shrink:0;overflow:hidden;background:radial-gradient(ellipse at 50% 80%,#ab844d28,transparent 68%);border-bottom:1px solid #a58a4938}.card-fan{position:relative;height:clamp(155px,26dvh,280px);width:100%;overflow:hidden;touch-action:none;user-select:none;cursor:grab;outline-offset:-3px}.card-fan:active{cursor:grabbing}.fan-card{position:absolute;top:10px;left:50%;height:calc(100% - 24px);width:auto;aspect-ratio:177/270;padding:0;border:1px solid #ac8e52;background:#181d19;transform:translateX(calc(-50% + var(--offset)*clamp(38px,8vw,83px))) scale(calc(1 - var(--distance)*.12));transform-origin:center 72%;filter:brightness(calc(1 - var(--distance)*.16));transition:transform .16s,filter .16s;box-shadow:0 5px 14px #0009;overflow:hidden;cursor:inherit}.fan-card.current{border:2px solid #ffe0a0;box-shadow:0 0 6px #fff0d1,0 0 20px #d78f51a0}.fan-card img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;-webkit-user-drag:none}.fan-card .art-window>img{position:absolute;width:var(--art-width);height:var(--art-height);left:var(--art-left);top:var(--art-top);object-fit:fill;max-width:none}.fan-nav{display:flex;align-items:center;justify-content:center;gap:20px;height:32px;margin-bottom:4px}.fan-nav button{min-height:30px;width:44px;font-size:26px;line-height:1;color:#e8c487;padding:0}.fan-nav button:disabled{opacity:.25}.fan-position{min-width:78px;text-align:center;color:#d9c79f;font-size:14px;font-variant-numeric:tabular-nums}.carousel-empty{display:grid;place-items:center;height:100%;color:#bdb49f}.selection-page .tactic-header{flex-shrink:0}.selection-page .table-footer>.muted{flex-basis:auto}
@media(max-width:700px){.list-body.selection-page{padding:8px 12px;gap:8px}.selection-page .table-footer{gap:8px;padding:8px 0}.selection-page .table-footer>.muted{font-size:13px}.selection-page .table-footer .search{min-width:140px}.selection-page .table-scroll{min-height:120px}.selection-page .tab{font-size:15px;padding:8px 12px;min-width:64px}.card-fan{height:clamp(145px,25dvh,230px)}.fan-nav{height:28px;gap:12px}.selection-page .roster-header,.selection-page .roster-row{min-width:620px}}
@media(max-height:600px){.card-fan{height:130px}.fan-nav{height:24px;margin:0}.selection-page .table-footer{padding:4px 0}.list-body.selection-page{gap:6px}.selection-page .table-scroll{min-height:80px}}
@media(prefers-reduced-motion:reduce){.fan-card{transition:none}}
/* Continuous gesture positioning, larger cards and full-width fan. */
.selection-page .selection-carousel,.selection-page>.table-main{width:100%;max-width:1120px}
.selection-carousel .card-fan{height:clamp(230px,35dvh,380px);contain:layout paint}
.selection-carousel .fan-card{transition:none;will-change:transform;backface-visibility:hidden;transform-origin:center center}
.selection-carousel .fan-nav{height:30px;margin:0 0 8px}
@media(max-width:700px){.selection-carousel .card-fan{height:clamp(210px,33dvh,330px)}}
@media(max-height:600px){.selection-carousel .card-fan{height:clamp(135px,32dvh,205px)}.selection-carousel .fan-nav{height:24px;margin-bottom:2px}}

.hero-controls .bonus-check.unavailable{color:#a5a29a;border-color:#5d594a;background:#20221e}.hero-controls .bonus-check.unavailable input{opacity:.5}

.selection-page .table-scroll{user-select:none;-webkit-user-select:none;overflow-anchor:none}
/* Smooth small source-card edges at enlarged display sizes without inventing detail. */
.hero-card>img,.detail-art>img,.fan-card>img{image-rendering:auto;image-rendering:smooth;filter:blur(.18px)}

.attr-grid [data-action="attr-plus"],.attr-grid [data-action="attr-minus"]{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}

/* Army board: consistent readable controls on the light parchment. */
.unit-top{gap:22px;color:#292e29}
.unit-top .set-title,.unit-top .unit-summary{display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.unit-top .name-control{display:grid;grid-template-columns:80px minmax(0,1fr) auto;gap:14px;align-items:center;flex:1;max-width:850px;min-width:0;order:0}
.unit-top .name-label{grid-column:auto;color:#3b4038;font-size:16px;font-weight:600}
.unit-top .name-value{background:#faf8efcf;border:1px solid #797666;color:#282e29;font-size:18px;min-height:48px;padding:10px 16px;line-height:1.5;box-shadow:inset 0 1px 3px #34382d12}
.unit-top .rename-trigger{font-size:15px;min-height:46px;padding:10px 16px;white-space:nowrap;color:#302b21}
.unit-top .set-title>span{color:#434a40;font-size:15px;white-space:nowrap;margin-left:auto}
.unit-top .unit-summary{padding-bottom:18px;border-color:#62675855}
.unit-top .unit-summary>.ghost{color:#343c31;font-size:16px;min-height:46px;padding:10px 16px;margin-left:auto}
.unit-top .formation-status .army-position{color:#29342a}
.unit-top .army-position strong{color:#29342a;font-size:27px;font-weight:600}
.unit-top .army-position i{border-color:#625c48;background:#eee9d7}
.unit-top .army-position i.filled{background:#84713b}
.unit-top .army-position i.current{background:#79382d;outline-color:#756331}
.unit-top .formation-cost{color:#363d32;font-size:16px}
.unit-top .formation-cost strong{color:#29342a;font-size:20px}
.unit-top .formation-cost strong.over-cap{color:#9a251e}
.unit-top .unit-config{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:24px;flex-wrap:wrap;width:100%;padding-top:4px}
.troop-select-group{display:flex;align-items:center;gap:14px}
.unit-top .troop-wheel{color:#343c31;font-size:18px;white-space:nowrap}
.unit-top .unit-config select{width:190px;min-height:48px;font-size:18px}
.unit-top .share-trigger{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:10px 18px;font-size:18px;line-height:1.2;color:#ead393;background:linear-gradient(#3c4037,#242b24);border:1px solid #796c46;border-radius:3px;text-shadow:0 1px 1px #000;box-shadow:0 2px 4px #272c2526}
.share-icon{display:block;width:28px;height:28px;flex-shrink:0}
.unit-top .share-trigger:hover{background:#414737;color:#ffebac}
.unit-top .formation-help{color:#3a4337;font-size:14px}.unit-top .formation-help span{color:#465040}
@media(max-width:700px){
 .unit-top{gap:18px;padding:18px 14px}
 .unit-top .name-control{grid-template-columns:minmax(0,1fr) auto;gap:9px;width:100%;flex-basis:100%}
 .unit-top .name-label{grid-column:1/-1;font-size:14px}
 .unit-top .name-value{font-size:16px;padding:10px 12px;min-height:46px}
 .unit-top .rename-trigger{font-size:14px;padding:9px 12px}
 .unit-top .set-title,.unit-top .unit-summary{gap:10px}
 .unit-top .set-title>span{font-size:14px}.unit-top .unit-summary>.ghost{font-size:14px}
 .unit-top .unit-config{gap:14px}.troop-select-group{gap:8px}
 .unit-top .unit-config select{width:135px;font-size:16px}
 .unit-top .share-trigger{font-size:16px;padding:10px 12px;gap:6px}
 .unit-top .troop-wheel{font-size:16px}.share-icon{width:24px;height:24px}
 .unit-top .army-position strong{font-size:23px}
}
/* City overview of the lord's five armies. */
.estate{position:relative;isolation:isolate;flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;padding:0 20px 14px;background:#9eabb1 url('assets/city-courtyard.png') center center/cover no-repeat;color:#fff0ca}
.estate:before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(#18201935,transparent 28%,transparent 65%,#161b1acc)}
.estate-resourcebar{display:flex;align-items:center;gap:8px;margin:0 -20px;padding:9px 20px;background:#232820ed;border-bottom:2px ridge #a5946a;flex-shrink:0}
.estate-resourcebar>div{flex:1;display:grid;grid-template-columns:auto auto;column-gap:8px;align-items:center;font-size:14px;border-right:1px solid #b49d6944;padding-right:8px}.estate-resourcebar b{font-size:17px;font-weight:500;color:#fff3d0}.estate-resourcebar span{color:#e3cf9e}.estate-resourcebar small{grid-column:1/-1;color:#ded5b6;font-size:12px;line-height:1.2}.estate-resourcebar .back{font-size:20px;min-width:64px;color:#fff1cd}
.estate-heading{width:min(760px,calc(100% - 210px));margin-top:22px;z-index:4}
.lord-banner{display:flex;gap:14px;align-items:center;padding:14px 18px;background:linear-gradient(100deg,#292d26f5,#30362adc);border:1px solid #b09b6d;box-shadow:0 3px 14px #18231e50}.lord-banner>span{font-size:14px;color:#e1c78e;white-space:nowrap}.lord-banner h1{font-size:clamp(18px,2.1vw,28px);line-height:1.5;overflow-wrap:anywhere;flex:1;min-width:0}.lord-banner button{font-size:14px;white-space:nowrap;padding:8px 12px}
.lord-picker{position:relative;width:min(320px,100%);margin-top:12px;font-size:16px}.lord-picker summary{display:flex;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;padding:12px 16px;border:1px solid #b09b6d;background:#292d26ed;color:#f4dfae}.lord-picker summary::-webkit-details-marker{display:none}.lord-picker>div{position:absolute;inset:100% 0 auto;background:#242921f5;max-height:330px;overflow:auto;border:1px solid #a18c60;box-shadow:0 8px 16px #0006}.lord-picker button{width:100%;display:flex;gap:12px;justify-content:space-between;text-align:left;padding:14px;border-bottom:1px solid #7a735744;color:#f4e7c3}.lord-picker small{color:#d3c5a2;white-space:nowrap}.lord-picker p{padding:16px;color:#e5dbc1}.lord-picker button:hover{background:#65573f}
.estate-shortcuts{position:absolute;right:20px;top:104px;width:180px;display:grid;gap:10px}.estate-shortcuts>button{display:flex;align-items:center;gap:14px;border:1px solid #ac9667;background:linear-gradient(#363c30f0,#20291eea);box-shadow:0 2px 8px #0003;padding:12px 16px;color:#f5e2b1;font-size:17px}.estate-shortcuts svg{width:27px;height:27px;flex-shrink:0}.estate-shortcuts button:hover{background:#5d5940}.estate-power{padding:12px;background:#242b24e8;border:1px solid #ad9a71}.estate-power span{display:block;font-size:14px;color:#e1c78e}.estate-power b{display:block;font-size:18px;font-weight:500;margin-top:6px}
.estate-armies{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin-top:auto;padding-top:230px;width:100%}.estate-army{min-width:0;display:block;text-align:left;border:3px ridge #a69565;background:linear-gradient(#393729f5,#201e16f5);padding:5px;color:#f9eacc;box-shadow:0 3px 10px #0005;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}.estate-army:active{cursor:grabbing}.estate-army header{display:flex;align-items:baseline;gap:8px;padding:4px 3px 7px;min-width:0}.estate-army header>span{font-size:12px;white-space:nowrap;color:#deca97}.estate-army strong{font-size:16px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.estate-portraits{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}.estate-portraits>span{position:relative;overflow:hidden;aspect-ratio:2/2.5;background:#626252}.estate-portraits img{width:100%;height:100%;object-fit:fill;display:block;pointer-events:none}.estate-portraits img.rank-strip{position:absolute}.estate-empty{display:grid;place-items:center;font-size:27px;color:#e5d4a5;border:1px solid #9a8e6d}.estate-army footer{display:flex;justify-content:space-between;gap:5px;padding:8px 3px 3px;font-size:13px;color:#f0e0bb}.estate-army footer span:last-child{color:#d9c89b}.estate-army.dragging{opacity:.55}.estate-army.drop-target{outline:3px solid #ffdf84;outline-offset:2px}
.estate-actions{display:flex;gap:12px;align-items:center;padding-top:12px;flex-shrink:0}.estate-actions button{font-size:15px;min-height:42px}.estate-actions>span{margin-left:auto;font-size:14px;color:#fff0cc;text-shadow:0 1px 3px #000}.estate-share-preview img{display:block;width:100%;height:auto}.estate-share-preview p{padding:40px;text-align:center}
@media(min-width:1500px){.estate-armies{max-width:1700px;align-self:center}.estate-army strong{font-size:20px}.estate-army footer{font-size:16px}.estate-army header>span{font-size:14px}}
@media(max-width:900px){.estate-resourcebar{flex-wrap:wrap}.estate-resourcebar>div{min-width:90px}.estate-heading{width:calc(100% - 170px)}.estate-shortcuts{width:150px;top:125px}.estate-shortcuts>button{font-size:15px;gap:8px;padding:10px}.lord-banner{flex-wrap:wrap;gap:8px;padding:12px}.lord-banner button{margin-left:auto}.estate-army strong{font-size:14px}.estate-army footer{font-size:12px}.estate-actions{flex-wrap:wrap}.estate-actions>span{font-size:13px}}
@media(max-width:600px){.estate{padding-inline:12px;background-position:40% center}.estate-resourcebar{margin-inline:-12px;padding:7px 12px;gap:6px}.estate-resourcebar>div{min-width:66px;font-size:12px}.estate-resourcebar b{font-size:14px}.estate-resourcebar .back{font-size:16px;min-width:50px;padding:4px 10px}.estate-heading{width:100%;margin-top:14px}.lord-banner h1{font-size:18px}.lord-picker{width:100%;font-size:14px}.estate-shortcuts{position:static;width:100%;display:flex;gap:8px;margin-top:12px}.estate-power{display:none}.estate-shortcuts>button{flex:1;justify-content:center;font-size:14px;padding:9px 5px;gap:6px}.estate-shortcuts svg{width:20px;height:20px}.estate-armies{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-top:120px}.estate-army header{gap:4px}.estate-army header>span{font-size:11px}.estate-army strong{font-size:13px}.estate-portraits>span{aspect-ratio:2/2.3}.estate-army footer{font-size:11px;flex-wrap:wrap}.estate-actions{gap:8px}.estate-actions>span{width:100%;text-align:center;margin:0}.estate-actions button{font-size:14px;flex:1}}
/* Supplied main-menu artwork, with the carousel arrows removed. */
.shell:has(.home){background:#241713 url('assets/home-lubu.png') center/cover no-repeat}
.home{justify-content:flex-end;padding:32px 28px 18px;background:linear-gradient(transparent 30%,#120e0b44 57%,#100d0bd9 100%);min-height:450px}
.home-heading{margin:0 0 18px}.home-heading .seal{display:none}.home-heading h1{font-size:clamp(22px,2.5vw,34px);letter-spacing:2px;text-shadow:0 2px 6px #000}
.home-menus{gap:16px;width:min(1000px,100%)}.home .menu-card{min-height:105px;background:#201b15e8;border:2px ridge #c0a677;box-shadow:0 3px 12px #0007}.home .menu-card img{display:none}.home .menu-card:after{display:none}.home .menu-label{position:relative;display:block;inset:auto;padding:18px 22px}.home .menu-label small{color:#d4c7ab}.home .menu-label strong{font-size:22px;color:#fff0cc}.home .menu-card:hover{background:#493927ed}
.home .creator-credit{margin-top:18px;padding:12px 16px;font-size:18px;color:#fff0ce;text-shadow:0 1px 4px #000;background:#19150d88;border-color:#b99c6955}.home .home-note{margin-top:7px;color:#e1d8c5;text-shadow:0 1px 3px #000}
@media(max-width:700px){.shell:has(.home){background-position:65% center}.home{padding:20px 16px 12px;min-height:560px}.home-menus{grid-template-columns:1fr;gap:10px;max-width:480px}.home .menu-card{min-height:72px}.home .menu-label{padding:10px 16px}.home .menu-label strong{font-size:19px}.home .menu-label small{font-size:13px}.home .creator-credit{font-size:16px;margin-top:14px;padding:10px}.home-heading{margin-bottom:12px}.home-heading h1{font-size:22px}}
/* Fit the complete artwork at every viewport ratio. */
.shell:has(.home){background-color:#211813;background-size:contain;background-position:center;background-repeat:no-repeat}
.estate{background-size:contain;background-position:center;background-color:#78858b}
.estate-hud-scroll{flex-shrink:0;margin:0 -20px;overflow-x:auto;scrollbar-width:thin}
.estate-hud{position:relative;width:100%;min-width:900px;aspect-ratio:1575/96;background:url('assets/city-original.png') top left/100% auto no-repeat;container-type:inline-size;font-family:'Noto Serif KR',serif}
.hud-number{position:absolute;display:flex;align-items:center;justify-content:center;background:#252625;color:#fff0c5;font-size:1.43cqw;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums;text-shadow:1px 1px 2px #000}
.hud-number.hud-second{background:#505053}
.hud-lord{position:absolute;left:6.54%;top:69.8%;width:34%;height:30.2%;padding-left:.4%;display:flex;align-items:center;background:linear-gradient(100deg,#c6c4be,#bdbdbbaa);color:#22211f;font-size:1.4cqw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hud-return{position:absolute;right:0;top:0;width:5.4%;height:68%;border:0;background:transparent}
.estate-shortcuts{top:145px;gap:6px}.estate-shortcuts>button{min-height:39px;padding:7px 12px;font-size:15px}.estate-shortcuts svg{width:23px;height:23px}.estate-armies{padding-top:460px}
@media(max-width:900px){.estate-shortcuts{top:150px}.estate-armies{padding-top:470px}}
@media(max-width:600px){.estate-hud-scroll{margin-inline:-12px}.estate-shortcuts{position:static;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.estate-shortcuts>button{font-size:13px;min-height:42px;padding:6px}.estate-armies{padding-top:100px}.estate{background-position:center}.shell:has(.home){background-position:center;background-size:contain}}
/* Original game artwork, stretched to the viewport as requested. */
.shell:has(.home),.estate{background-size:100% 100%;background-position:center}
.estate-shortcuts>button,.lord-banner button,.lord-picker summary{position:relative;isolation:isolate;justify-content:center;min-height:46px;padding:9px 14px;border:0;border-radius:0;background:url('assets/game-button.png') center/100% 100% no-repeat;box-shadow:none;color:#29251f;text-shadow:0 1px 0 #f8f1d7;font-weight:600}
.estate-shortcuts>button:before,.lord-banner button:before,.lord-picker summary:before{content:'';position:absolute;inset:16% 8%;z-index:-1;background:url('assets/game-button-fill.png') center/100% 100% no-repeat}
.estate-shortcuts>button:hover{background:url('assets/game-button.png') center/100% 100% no-repeat;filter:brightness(1.12)}
.estate-shortcuts svg{width:21px;height:21px;color:#3b3323}
.estate-armies{gap:4px;max-width:none}
.estate-army{padding:7px 8px 9px;border:0;background:url('assets/game-army-frame.png') center/100% 100% no-repeat;box-shadow:none}
.estate-army header{margin:0 0 5px;padding:3px 5px;min-height:29px;background:url('assets/game-army-title.png') center/100% 100%;color:#fff5da;text-shadow:1px 2px 2px #17160f}
.estate-army header>span{font-size:13px}.estate-army strong{font-size:16px}
.estate-portraits{gap:0;background:#3a3024}
.estate-portraits>span{aspect-ratio:1.45; background:#4a4030;border:0}
.estate-portraits img{object-fit:cover;object-position:center 22%}
.estate-portraits img.rank-strip{display:none}
.estate-army footer{align-items:center;min-height:47px;padding:10px 4px 5px;background:#3b3023;color:#fff0cb;font-size:15px;text-shadow:1px 2px 1px #17140e}
.estate-army footer span:last-child{color:#e8c676}
@media(max-width:600px){.estate-armies{grid-template-columns:repeat(2,minmax(0,1fr));padding-top:80px}.estate-army strong{font-size:14px}.estate-army footer{font-size:12px;min-height:36px}.estate-shortcuts>button{font-size:12px;gap:3px}.estate-shortcuts svg{width:17px;height:17px}.shell:has(.home),.estate{background-size:100% 100%}}
.portrait-hud{display:none}
@media(max-aspect-ratio:3/4){
 .estate{padding:0 4px 8px;min-height:calc(100svh - 56px);background-size:100% 100%;overflow:auto}
 .estate-hud-scroll{display:none}.portrait-hud{display:block;flex-shrink:0;margin:0 -4px}
 .portrait-resources{position:relative;aspect-ratio:730/66;background:url('assets/game-resources.png') center/100% 100%;container-type:inline-size}
 .portrait-resource{position:absolute;top:0;width:25%;height:100%;font-size:2.5cqw;color:#f7e8b6;line-height:1;text-shadow:1px 1px #222}
 .portrait-resource b{position:absolute;left:45%;top:4%;width:54%;height:43%;display:grid;place-items:center;background:#414244;font-weight:400}
 .portrait-resource small{position:absolute;left:3%;top:52%;width:93%;height:43%;display:grid;place-items:center;background:#454548;font-size:2.5cqw}
 .portrait-profile{position:relative;aspect-ratio:758/96;background:url('assets/game-profile.png') center/100% 100%;container-type:inline-size}
 .portrait-profile .hud-number{font-size:2.6cqw}.portrait-lord{position:absolute;left:13.6%;top:70%;height:30%;width:85%;display:flex;align-items:center;padding-left:1%;font-size:2.8cqw;background:#c5c4be;color:#28241e;overflow:hidden;white-space:nowrap}
 .estate-heading{margin:8px 0 0 4px;width:calc(100% - 132px)}
 .lord-banner{padding:5px;gap:5px;flex-wrap:wrap}.lord-banner>span,.lord-banner h1{display:none}.lord-banner button{font-size:11px;min-height:30px;padding:5px 10px;width:100%}
 .lord-picker{margin-top:5px;font-size:11px}.lord-picker summary{min-height:30px;padding:5px 8px}.lord-picker>div{min-width:200px}
 .estate-shortcuts{position:absolute;top:clamp(113px,25vw,190px);right:5px;width:120px;display:grid;grid-template-columns:1fr;gap:4px;margin:0}
 .estate-power{display:block;padding:5px}.estate-power span{font-size:10px}.estate-power b{font-size:12px;margin-top:2px}
 .estate-shortcuts>button{min-height:31px;padding:5px 8px;font-size:11px;gap:4px}.estate-shortcuts svg{width:16px;height:16px}
 .estate-armies{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding-top:340px;margin-top:auto}
 .estate-army{padding:5px 3px 6px}.estate-army header{display:block;min-height:32px;padding:2px;margin-bottom:3px}.estate-army header>span{display:block;font-size:9px;line-height:1.2}.estate-army strong{display:block;font-size:10px;line-height:1.5}
 .estate-portraits{grid-template-columns:repeat(2,minmax(0,1fr));gap:1px}.estate-portraits>span:first-child{grid-column:1/-1;aspect-ratio:1.6}.estate-portraits>span{aspect-ratio:1}
 .estate-army footer{display:block;min-height:36px;padding:5px 1px;font-size:9px;line-height:1.5}.estate-army footer span{display:block}.estate-actions{padding-top:6px}.estate-actions>span{font-size:10px}
}
/* Clean, text-free source button: one artwork layer and live labels. */
.estate-shortcuts>button,.estate-shortcuts>button:hover,.lord-banner button,.lord-picker summary{background-image:url('assets/game-button-clean.png');font-family:var(--serif);font-weight:400;letter-spacing:.01em;text-shadow:0 1px 1px #f7f0df80}
.estate-shortcuts>button:before,.lord-banner button:before,.lord-picker summary:before{display:none}
.estate-shortcuts>button{background-color:transparent}
/* Clip the HUD at its real lower edge; never include the city name plate. */
.estate-hud{background:none;isolation:isolate}
.estate-hud:before{content:'';position:absolute;inset:0 0 auto;height:68.75%;background:url('assets/city-original.png') left top/100% auto no-repeat;z-index:-1;pointer-events:none}
.estate-hud:after{content:'';position:absolute;left:0;top:0;width:6.54%;height:100%;background:url('assets/game-profile.png') left top/736% 100% no-repeat;z-index:-1;pointer-events:none}
.hud-number{font-family:var(--serif);font-weight:400;font-size:1.32cqw;letter-spacing:-.035em;text-shadow:0 1px 2px #12120e;color:#f0e1ba;background:linear-gradient(90deg,#252625b0,#252625 8%,#252625 92%,#252625b0)}
.hud-number.hud-second{background:linear-gradient(90deg,#505053aa,#505053 10%,#505053 90%,#505053aa)}
.hud-lord{font-size:1.2cqw;line-height:1.25;background:linear-gradient(90deg,#c6c4beed,#c6c4bea0 75%,transparent);height:30.2%;padding-block:0}
.estate-hud-scroll{overflow-y:hidden;padding-bottom:7px;margin-bottom:-7px;mask-image:linear-gradient(#000 calc(100% - 7px),transparent)}
.portrait-profile{mask-image:linear-gradient(#000 85%,#000b 94%,transparent)}
.portrait-profile .hud-number{font-size:2.5cqw;letter-spacing:-.025em}.portrait-lord{font-family:var(--serif);font-weight:400;font-size:2.65cqw}
/* One consistent Korean serif across the application, including form controls. */
:root{--sans:var(--serif)}
body,button,input,select,textarea,small,.muted,.hud-number,.portrait-resource,.portrait-lord,.hud-lord{font-family:var(--serif);font-synthesis:none}
button,input,select,textarea,h1,h2,h3,strong,b{font-weight:400}
button{letter-spacing:.015em}.estate{color:#eee5c8}.estate-shortcuts>button{color:#302b23;text-shadow:0 1px #eee5cc}
/* Preserve only the original nine-slice frame; no embedded labels are stretched. */
.estate-army{border:8px solid transparent;border-image:url('assets/army-border-clean.png') 8 stretch;background:linear-gradient(#4a4232,#352b20);padding:0;box-shadow:0 2px 3px #0005}
.estate-army header{margin:0;padding:5px 3px;min-height:28px;background:linear-gradient(#4b4c3c,#57523c);border-bottom:1px solid #817452;color:#f0edda;text-shadow:0 1px 2px #1b190f;line-height:1.2}
.estate-army header strong{font-size:clamp(12px,1.2vw,19px);font-weight:400}
.estate-portraits{gap:1px;margin:0;background:#786b4e}.estate-portraits>span{aspect-ratio:1.25}
.estate-army footer{background:linear-gradient(#40372a,#352a20);border-top:1px solid #65573e;padding:10px 4px;min-height:43px;font-size:clamp(11px,1.1vw,18px);color:#f4ead2}
@media(max-aspect-ratio:3/4){.estate-army{border-width:4px}.estate-army header{min-height:24px;padding:4px 1px}.estate-army header strong{font-size:10px}.estate-army footer{font-size:9px;padding:5px 1px}.estate-portraits>span:first-child{aspect-ratio:1.6}.estate-portraits>span{aspect-ratio:1}}
/* Muted decorative video with a real buffered-loading gauge and poster fallback. */
.shell:has(.home){background:#171b13}.home{position:relative;isolation:isolate;background:linear-gradient(transparent 25%,#10130c65 65%,#10130ce8);overflow:hidden}
.home-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2;pointer-events:none;background:#1d281e;opacity:1}
.home-loading{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:flex-end;flex-direction:column;gap:14px;padding:0 10% 7vh;background:#281a13 url('assets/home-lubu.png') center/100% 100% no-repeat;color:#fff1cf;text-shadow:0 2px 4px #000;font-size:18px;transition:opacity .4s}
.home-loading:before{content:'';position:absolute;inset:65% 0 0;background:linear-gradient(transparent,#100b08e8);z-index:-1}.home-loading.finished{opacity:0;pointer-events:none}
.home-loading progress{appearance:none;width:min(800px,90%);height:12px;border:1px solid #b69b61;border-radius:8px;overflow:hidden;background:#282017;box-shadow:0 0 0 3px #110d0877}
.home-loading progress::-webkit-progress-bar{background:#282017}.home-loading progress::-webkit-progress-value{background:linear-gradient(#f9e3a2,#b5853f)}.home-loading progress::-moz-progress-bar{background:#d6ad63}
.home-video{object-fit:fill}
/* Keep the original scene ratio, with controls outside the letterbox. */
.shell:has(.home){min-height:0;background:#131911}
.home{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:0;padding:0;min-height:0;overflow:auto;background:#151b13;flex:1}
.home-scene{position:relative;flex:1 0 180px;min-height:180px;width:100%;background:radial-gradient(ellipse,#293328,#10170f);overflow:hidden}
.home-video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:auto;display:block}
.home-controls{flex-shrink:0;width:100%;display:flex;flex-direction:column;align-items:center;padding:12px 24px 10px;background:linear-gradient(#25291e,#171b14);border-top:1px solid #8c7d5155}
.home-heading{margin:0 0 10px}.home-heading h1{font-size:22px;letter-spacing:.06em;line-height:1.4}
.home-menus{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:min(1000px,100%);max-width:none}
.home .menu-card{min-height:70px;border-width:1px;background:#2c2b20;box-shadow:inset 0 0 0 2px #a9966030,0 2px 5px #0003}
.home .menu-label{padding:10px 14px}.home .menu-label small{font-size:12px;line-height:1.4;letter-spacing:.035em;color:#c9bea0}.home .menu-label strong{font-size:18px;line-height:1.5;letter-spacing:0;color:#f5ecd0}
.home .creator-credit{margin:10px 0 0;padding:6px 10px;font-size:13px;line-height:1.5;background:none;border:0;color:#d5c9a9}
.home .home-note{margin-top:2px;font-size:11px;line-height:1.4;color:#ada88f;text-align:center}
.home-footer{flex-wrap:wrap;gap:8px;min-height:48px;padding:8px 20px}.home-ratio-note{color:#e7d7ab;font-size:13px;line-height:1.5}.home-footer .ghost{font-size:14px;padding:6px 10px;min-height:32px}
@media(max-width:600px){.home-controls{padding:10px 14px}.home-heading h1{font-size:18px}.home-heading{margin-bottom:8px}.home-menus{grid-template-columns:1fr;gap:6px}.home .menu-card{min-height:44px}.home .menu-label{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px}.home .menu-label small{order:2;font-size:10px}.home .menu-label strong{font-size:15px;white-space:nowrap}.home .creator-credit{font-size:11px;margin-top:8px;padding:4px}.home .home-note{font-size:10px}.home-footer{padding:7px 12px;gap:4px}.home-ratio-note{font-size:11px}.home-footer .ghost{font-size:12px}.home-scene{flex-basis:200px;min-height:200px}}
@media(max-height:550px) and (min-aspect-ratio:4/3){.home{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,30%);overflow:auto}.home-scene{height:100%;min-height:220px}.home-controls{justify-content:center;padding:10px;border-top:0;border-left:1px solid #8c7d5155}.home-menus{grid-template-columns:1fr}.home .menu-card{min-height:42px}.home .menu-label{padding:7px 10px}.home .menu-label small{display:none}.home .menu-label strong{font-size:15px}.home .creator-credit{font-size:11px}.home-heading h1{font-size:17px}.home .home-note{display:none}}
.home-loading{background-size:contain;background-color:#20170f}
/* Approved forest-green and antique-gold main-menu design. */
.shell:has(.home){background:#142018}
.shell:has(.home)>.topbar{height:90px;background:radial-gradient(ellipse at center,#263426,#142018 75%);border-bottom:1px solid #9b855b55;box-shadow:none;padding:15px 28px}
.shell:has(.home) .top-title{flex:1;justify-content:center;color:#ebd5a4;text-shadow:0 2px 3px #0008;letter-spacing:.045em}
.shell:has(.home) .top-title:before,.shell:has(.home) .top-title:after{content:'';height:1px;flex:1;max-width:110px;background:linear-gradient(90deg,transparent,#a68c50)}
.shell:has(.home) .top-title:after{transform:rotate(180deg)}
.shell:has(.home) .top-title h1{font-size:clamp(18px,2.3vw,31px)}
.home,.home-scene{background:#172119}.home-scene{box-shadow:inset 0 10px 24px #090f0920}
.home-controls{padding:20px 28px 12px;background:radial-gradient(ellipse at top,#233020,#142018 75%);border-top:1px solid #9b855b55}
.home-heading{display:none}.home-menus{gap:16px;width:min(1120px,100%)}
.home .menu-card{display:flex;align-items:center;gap:14px;min-height:76px;padding:13px 20px;border:1px solid #c4a768;border-radius:2px;background:linear-gradient(115deg,#253024,#171e17);box-shadow:inset 0 0 0 3px #0f170e,0 2px 8px #0002;color:#e6ca90}
.home .menu-card:hover{background:linear-gradient(115deg,#354332,#222c20);border-color:#eed39a;transform:translateY(-2px)}
.home-menu-icon{display:block;width:32px;height:32px;flex-shrink:0;filter:drop-shadow(0 1px 1px #0008)}
.home .menu-label{display:block;padding:0;flex:1;min-width:0;text-align:left}.home .menu-label small{display:none}.home .menu-label strong{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:clamp(15px,1.55vw,22px);color:#f0dfb5;white-space:nowrap;text-shadow:0 1px 2px #0007}
.home .menu-label strong>span{font-size:28px;color:#c9ab6d}
.home .creator-credit{color:#b5ab8e;font-size:12px;margin-top:14px}.home .home-note{color:#a39e87;font-size:10px}
.home-footer{background:#142018;border-top:1px solid #88754844;box-shadow:none;min-height:48px}.home-ratio-note{color:#c6b487;font-size:12px;letter-spacing:.04em}.home-ratio-note:before{content:'◇';color:#b89b60;margin-right:10px}
@media(max-width:700px){.shell:has(.home)>.topbar{height:74px;padding:12px 16px;gap:10px}.shell:has(.home) .top-title{gap:8px;justify-content:flex-start}.shell:has(.home) .top-title:before,.shell:has(.home) .top-title:after{display:none}.shell:has(.home) .top-title h1{font-size:18px;letter-spacing:0}.shell:has(.home) .top-actions .ghost{font-size:12px;padding:6px}.home-controls{padding:16px 20px 10px}.home-menus{grid-template-columns:1fr;gap:10px}.home .menu-card{min-height:57px;padding:10px 16px;gap:15px}.home-menu-icon{width:28px;height:28px}.home .menu-label strong{font-size:18px}.home .creator-credit{font-size:11px;margin-top:10px}.home-footer{padding:8px 14px}.home-ratio-note{font-size:10px}.home-scene{min-height:210px;flex-basis:210px}}
@media(max-height:550px) and (min-aspect-ratio:4/3){.shell:has(.home)>.topbar{height:54px}.home-controls{padding:12px}.home-menus{grid-template-columns:1fr;gap:8px}.home .menu-card{min-height:48px;padding:8px 12px}.home-menu-icon{width:24px;height:24px}.home .menu-label strong{font-size:15px}.home .creator-credit{font-size:10px;margin-top:8px}}
/* In-game parchment formation: information / three generals / troop selector. */
.unit-board{display:flex;overflow:auto;background:#8e8678 url('assets/formation-parchment.png') center/100% 100% no-repeat}
.unit-top{display:grid;grid-template-columns:minmax(170px,22%) minmax(360px,1fr) minmax(190px,24%);gap:24px;align-items:center;width:100%;max-width:1600px;margin:auto;padding:32px 24px;background:none;min-height:0}
.game-army-info{align-self:center;color:#f4e7c5;text-shadow:1px 1px 2px #211b14}
.game-share{display:flex;align-items:center;gap:8px;font-size:22px;color:#edce82;text-shadow:1px 2px 2px #15120b;padding:8px 0 18px}.game-share svg{width:26px;height:26px}
.game-info-name{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 6px;background:linear-gradient(90deg,#393127b8,transparent);border-bottom:1px solid #d7c39988}.game-info-name strong{font-size:21px}.game-info-name button{font-size:12px;padding:5px 8px;min-height:32px}.game-custom-name{padding:8px;font-size:16px;overflow-wrap:anywhere;color:#fff1c8;background:#302c2360}
.game-army-info dl{margin:0;background:linear-gradient(90deg,#3931278c,transparent)}.game-army-info dl>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 6px;border-bottom:1px solid #d7c39966}.game-army-info dt{font-size:20px;color:#ead497}.game-army-info dd{margin:0;font-size:20px}.game-info-actions{display:flex;gap:8px;flex-wrap:wrap;padding-top:18px}.game-info-actions .metal{background:linear-gradient(#ead4ac,#744525);color:#fff2d5;border:2px ridge #b4976c;text-shadow:1px 1px #251a13}.game-info-actions .ghost{color:#eee4c9;text-shadow:1px 1px #272016}
.unit-top .army-carousel{width:100%;padding:0 25px;min-width:0}.unit-top .formation-status{display:flex;justify-content:center;margin:0 0 14px}.unit-top .army-position strong{font-size:20px;color:#51422a;text-shadow:0 1px #e7dfca}.unit-top .formation-cards{gap:14px;width:100%}.unit-top .slot-label{height:32px;min-height:32px;font-size:16px;background:linear-gradient(#39352e,#25221f);border:2px ridge #b8a47b;color:#ecd9a7;padding:0 8px}.unit-top .slot-label .retreat{min-height:30px;padding:4px 8px;font-size:14px}.unit-top .unit-slot .hero-card,.unit-top .slot-empty{width:100%;aspect-ratio:177/270;min-height:0}.unit-top .slot-aptitude{min-height:30px;padding:4px;font-size:14px;background:#665c48bc;color:#f9eacb;border:1px solid #b09b71}.unit-top .army-arrow{width:28px;font-size:30px;color:#bfa16b;text-shadow:1px 2px #403322}.unit-top .army-arrow.previous{left:-3px}.unit-top .army-arrow.next{right:-3px}.unit-top .formation-help{grid-column:1/-1;color:#443c30;text-align:center;margin:0;font-size:12px}.unit-top .formation-help span{color:#574c39}
.game-troop-panel{width:100%;max-width:300px;justify-self:center;align-self:center}.game-panel-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px}.game-panel-tabs button{color:#c1b59d;background:linear-gradient(#38312a,#211e1b);border:2px ridge #756551;border-radius:5px;font-size:16px;min-height:37px}.game-panel-tabs button.active{color:#ffedb3;border-color:#c8a36c;box-shadow:0 0 7px #d9a253;background:linear-gradient(#51432d,#29231c)}.game-troop-art{position:relative;overflow:hidden;mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent)}.game-troop-art img{width:100%;display:block}.strategist-plus{position:absolute;left:30%;top:29%;width:42%;height:30%;border-radius:50%;background:transparent;cursor:pointer}.strategist-plus:focus-visible{outline:2px solid #f4d794}.game-troop-nav{display:grid;grid-template-columns:40px 1fr 40px;gap:4px;padding:4px 8px;background:#51493b66}.game-troop-nav button{background:url('assets/game-button-clean.png') center/100% 100%;color:#3b3023;font-size:16px;min-height:34px;padding:4px}.troop-picker-list{display:grid;gap:12px}
.buff-anchor{position:relative;display:inline-block}.faction-buff{color:#eee1c6;background:#42382ecc;border:1px solid #9a8061;padding:3px 8px;min-height:30px;touch-action:none;user-select:none;-webkit-touch-callout:none}.faction-tooltip{position:absolute;z-index:50;left:0;bottom:calc(100% + 10px);width:320px;padding:10px;background:#29231eee;border:3px ridge #867252;color:#eee6d3;font-size:17px;line-height:1.6;text-align:left;box-shadow:0 4px 14px #0006;pointer-events:none}.faction-tooltip[hidden]{display:none}.faction-tooltip strong{display:block;text-align:center;border-bottom:1px solid #9b865a66;padding-bottom:5px;margin-bottom:5px;color:#ddc487}.faction-tooltip b{display:block;color:#d9bc7e}.faction-tooltip>span{display:block;white-space:nowrap}
.game-filter-dialog{max-width:920px;background:linear-gradient(#29231fed,#211e1bef);border:4px ridge #837157;color:#e3d8be;box-shadow:0 10px 50px #000a}.game-filter .dialog-title{margin-bottom:0}.game-filter .dialog-title h2,.game-filter-heading h3{color:#d4ba79;font-size:24px}.game-sort{display:grid;grid-template-columns:repeat(6,1fr);padding:10px 0 20px;gap:4px}.game-sort button{font-size:20px;border-bottom:1px solid transparent}.game-sort button.active{color:#ffdea0;border-color:#c9aa64;background:linear-gradient(transparent,#94662c44)}.game-filter-heading{display:flex;justify-content:space-between;align-items:center;padding:10px 4px;border-block:1px solid #8d795444}.game-filter-heading button{min-height:34px;padding:5px 16px}.game-filter-row{display:grid;grid-template-columns:120px 1fr;gap:16px;align-items:center;padding:12px 0}.game-filter-row>span{text-align:center;font-size:19px}.game-filter-row>div{display:flex;gap:12px;flex-wrap:wrap}.game-check{min-width:108px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:2px ridge #675343;background:linear-gradient(#352724,#211b19);padding:6px 10px;font-size:18px;min-height:38px}.game-check i{display:grid;place-items:center;width:22px;height:22px;background:#372526;border:2px inset #75615a;font-style:normal;color:#f7d795}.game-check.checked{border-color:#b0955d;color:#f9e6b7}.game-check:disabled{opacity:.5;cursor:not-allowed}.filter-grade.option-0{color:#e29550}.filter-grade.option-1{color:#c486c8}.filter-grade.option-2,.filter-faction.option-0{color:#7ca2c5}.filter-grade.option-3,.filter-faction.option-1{color:#8db38e}.filter-faction.option-2{color:#c98275}.filter-faction.option-3{color:#d4b377}
@media(max-width:1000px){.unit-top{grid-template-columns:160px minmax(280px,1fr) 190px;gap:12px;padding:24px 12px}.unit-top .formation-cards{gap:7px}.game-share{font-size:18px}.game-info-name{flex-wrap:wrap}.game-info-name strong{font-size:18px}.game-troop-panel{max-width:220px}}
@media(max-width:700px){.unit-top{grid-template-columns:minmax(0,1fr) minmax(130px,40%);gap:18px 12px;padding:16px 12px}.game-army-info{grid-column:1;grid-row:1}.game-troop-panel{grid-column:2;grid-row:1;max-width:210px}.unit-top .army-carousel{grid-column:1/-1;grid-row:2;padding-inline:20px}.unit-top .formation-help{grid-row:3}.game-army-info dt,.game-army-info dd{font-size:17px}.game-army-info dl>div{padding:12px 4px}.game-panel-tabs button{font-size:12px;min-height:30px}.game-troop-nav{grid-template-columns:28px 1fr 28px;padding:3px}.game-troop-nav button{font-size:12px;min-height:29px}.game-info-actions{padding-top:10px;gap:4px}.game-info-actions button{font-size:12px;padding:6px}.game-share{font-size:17px;padding-bottom:10px}.faction-tooltip{position:fixed;left:12px;bottom:auto;top:110px;width:min(330px,calc(100vw - 24px));font-size:16px}.game-filter-row{grid-template-columns:75px 1fr;gap:8px;padding:10px 0}.game-filter-row>span{font-size:14px}.game-filter-row>div{gap:6px}.game-check{min-width:75px;font-size:13px;padding:5px 7px;gap:6px}.game-check i{width:18px;height:18px}.game-sort button{font-size:14px;padding:6px}.game-filter-dialog{padding:12px}.game-filter .dialog-title h2{font-size:21px}}
.exchange-dialog{width:min(1220px,98vw);background:#28231ff5;border:4px ridge #8d7652;padding:16px;max-height:96dvh}.exchange-help{font-size:13px;color:#c3b594;margin:0 0 12px}.exchange-list{display:grid;gap:8px;overflow-x:auto}.exchange-army{display:grid;grid-template-columns:140px minmax(480px,1fr) 105px;gap:12px;padding:10px;background:#191714;border:1px solid #4e4230;min-width:800px}.exchange-army>header{display:flex;flex-direction:column;justify-content:center;gap:7px;color:#e0c792;padding:4px 8px;border-left:5px ridge #86683e}.exchange-army>header strong{font-size:18px}.exchange-army>header>span{font-size:12px;overflow-wrap:anywhere}.exchange-army small{font-size:13px;color:#d3c5aa}.exchange-army small b{color:#f4e4bc;font-size:20px}.exchange-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.exchange-slot{position:relative;display:grid;grid-template-columns:1fr 84px;gap:6px;text-align:left;border:2px ridge #a9925c;background:linear-gradient(#2c291c,#51452d);padding:4px;touch-action:none;user-select:none;min-height:110px}.exchange-slot-info{display:flex;flex-direction:column;gap:5px;font-size:13px;color:#e2d5b5}.exchange-slot-info>b{font-size:16px}.exchange-slot-info>span{border-top:1px solid #b2a07355;padding-top:5px}.exchange-art{height:94px;overflow:hidden;background:#27251e;display:grid;place-items:center;border:2px ridge #bda56b}.exchange-art img{width:100%;height:100%;object-fit:cover;object-position:50% 22%;pointer-events:none}.exchange-art>span{font-size:30px;color:#d3bb79}.exchange-slot>small{grid-column:1/-1;line-height:1.2;font-size:11px;color:#e8c487}.exchange-slot.chosen,.exchange-slot.drop-target{outline:2px solid #f7d582;outline-offset:1px}.exchange-slot.dragging{opacity:.45}.exchange-military{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-size:13px;color:#ab9b7b}.exchange-military button{width:65px;height:65px;border-radius:50%;border:3px ridge #71603c;background:radial-gradient(#3d4733,#181c16);font-size:34px;color:#c7b987}
@media(max-width:700px){.exchange-dialog{padding:10px}.exchange-dialog .dialog-title h2{font-size:20px}.exchange-army{grid-template-columns:95px minmax(390px,1fr) 75px;min-width:640px;gap:8px;padding:7px}.exchange-slot{grid-template-columns:1fr 64px}.exchange-art{height:78px}.exchange-slot-info{font-size:11px}.exchange-slot-info>b{font-size:13px}.exchange-army>header strong{font-size:14px}.exchange-military button{width:50px;height:50px}}
/* 군사 임명: combat and adviser positions remain distinct. */
.strategist-dialog{width:min(1450px,98vw);max-height:94dvh;background:linear-gradient(120deg,#192329e8,#352a29f5 40%,#252322fa);border:2px solid #85745a;color:#e7ddc8;padding:22px}.strategist-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:24px}.strategist-layout aside{text-align:center;padding-top:30px}.strategist-seal{border:3px double #63868a;border-radius:50%;width:160px;height:160px;display:grid;place-content:center;margin:0 auto 30px;background:radial-gradient(circle,#2f515c,#142128 65%);color:#c2d5cc;font-size:25px;box-shadow:0 0 24px #527c8b66}.strategist-members{display:flex;gap:5px;height:82px}.strategist-members img{width:31%;object-fit:cover;object-position:top}.strategist-tabs{display:flex;justify-content:space-around;border-bottom:2px solid #b7a37c;padding:14px;color:#bcae92}.strategist-tabs b{color:#f2d388}.strategist-head,.strategist-row{display:grid;grid-template-columns:1.1fr 1fr .45fr .65fr .5fr 1.5fr 1fr;align-items:center;gap:8px;text-align:center}.strategist-head{background:#bcb6a5;color:#26251e;padding:10px 6px;margin:8px 0;font-size:14px}.strategist-list{max-height:64dvh;overflow:auto;overscroll-behavior:contain;scrollbar-color:#97815a #252221;touch-action:pan-y}.strategist-row{padding:20px 6px;border-bottom:1px solid #73665688;min-height:84px}.strategist-row.selected{min-height:210px;background:linear-gradient(90deg,#75575960,#4d3c3050);border-block:2px solid #bd8860;box-shadow:inset 0 2px 7px #eac29655}.strategist-name{background:none;border:0;color:#df963f;display:grid;justify-items:center;gap:10px;font:inherit;cursor:pointer}.strategist-name img{width:94px;height:110px;object-fit:cover;object-position:top;border:2px solid #c2a366}.strategist-status{display:grid;gap:10px;justify-items:center;font-size:16px}.available{color:#9cd5ab}.unavailable{color:#df8e87}.appoint{background:linear-gradient(#486248,#173c22);border:2px solid #172a18;box-shadow:inset 0 0 3px #cedabb,0 2px 3px #000;color:#f4f0df;font:inherit;font-size:22px;padding:8px 18px;cursor:pointer}.appoint.dismiss{background:linear-gradient(#72414b,#38131e);border-color:#341017}.appoint:disabled{background:linear-gradient(#777,#414141);color:#2c2c2c;border-color:#2a2a2a;box-shadow:inset 0 0 4px #aaa;cursor:not-allowed}.strategist-assignment{grid-column:1/-1;text-align:center;border-top:1px solid #94826777;padding-top:12px;margin-bottom:0;color:#d5c39b}.skill-pending{font-size:14px;color:#bbae9b}.adviser-summary{position:relative;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:8px}.adviser-summary>span{width:100%;text-align:center}.adviser-summary .exchange-adviser{width:66px;height:70px;border:2px solid #9a8253;border-radius:3px;overflow:hidden;touch-action:none;padding:0;background:#222c25;color:#dbc387;font-size:28px}.exchange-adviser img{width:100%;height:100%;object-fit:cover;object-position:top;pointer-events:none}.exchange-adviser.dragging{opacity:.5}.exchange-adviser.drop-target{outline:3px solid #eac777}.adviser-change{background:#60432c;border:1px solid #c0a275;color:#e9e1d1;font-size:22px;cursor:pointer}.exchange-military b{font-size:14px}.game-troop-art .strategist-plus.appointed{background:radial-gradient(ellipse,#233d32 20%,#1a2820 70%);border:2px solid #758b69;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#eee3bc;font:inherit;gap:8px}.strategist-plus.appointed span{font-size:14px}.strategist-dialog .dialog-title{margin-bottom:10px}
@media(max-width:800px){.strategist-layout{grid-template-columns:1fr;gap:10px}.strategist-layout aside{display:none}.strategist-dialog{padding:10px}.strategist-head,.strategist-row{grid-template-columns:1.1fr .6fr .4fr .5fr .4fr 1fr 1fr;gap:4px;font-size:12px}.strategist-name img{width:62px;height:78px}.strategist-status{font-size:13px}.appoint{font-size:17px;padding:8px}.strategist-list{max-height:70dvh}.skill-pending{font-size:12px}.strategist-row.selected{min-height:170px}}
/* Clean source crops and align live controls to the game frames. */
.game-panel-tabs{position:relative;z-index:1;margin:0;gap:3px}.game-troop-art{margin:0}.game-troop-nav{margin-top:0;padding:7px 0 0;background:none;grid-template-columns:44px minmax(0,1fr) 44px;gap:4px}.game-troop-nav button{min-height:42px;font-size:18px}.game-troop-art.military-art .strategist-plus{left:33%;top:39%;width:33%;height:32%;border-radius:50%}.game-troop-art.military-art .strategist-plus.appointed{background:radial-gradient(#344b39,#18231c);border:2px solid #a9a177;font-size:18px;box-shadow:0 0 12px #14261a}.military-caption{font-size:18px;text-align:center;line-height:1.6;color:#f2e7cb;background:#302e27c9;padding:10px 8px;border-block:1px solid #92826788}.game-troop-panel .adviser-summary{background:#383229ba;border:1px solid #aa9673;flex-wrap:nowrap;justify-content:flex-start;margin-top:10px}.game-troop-panel .adviser-summary>span{display:none}.game-troop-panel .adviser-summary b{font-size:20px;color:#e8ad65;flex:1}.game-troop-panel .adviser-change{margin-left:auto;min-width:44px}.unit-top .slot-label{position:relative;display:flex;padding:0;min-height:40px;height:auto;font-size:20px}.unit-top .slot-label>span{padding:5px 50px 5px 8px}.unit-top .slot-label .retreat{position:absolute;right:0;top:0;bottom:0;margin:0;min-height:100%;font-size:16px;padding:5px 9px;border:2px ridge #af986e;background:linear-gradient(#713f34,#3e2724)}.unit-top .slot-aptitude{font-size:clamp(18px,1.7vw,26px);min-height:43px;gap:12px}.unit-top .slot-aptitude strong{font-size:1.15em}.exchange-dialog{background:#25211fed;border:3px ridge #81715d;box-shadow:0 15px 70px #000c,inset 0 0 0 9px #302b27;padding:18px}.exchange-dialog .dialog-title{border-bottom:1px solid #615448;padding-bottom:8px;margin-bottom:8px}.exchange-help{font-size:14px;margin:0 0 12px;color:#baaf9b}.exchange-army{background:#191817;border:0;border-bottom:6px solid #332c28;padding:6px;gap:9px;grid-template-columns:145px minmax(480px,1fr) 120px}.exchange-army>header{position:relative;border:0;padding:7px 7px 7px 42px;justify-content:center}.exchange-army>header>strong{position:absolute;left:0;top:0;bottom:0;width:34px;writing-mode:vertical-rl;text-orientation:upright;background:linear-gradient(90deg,#2f2115,#694522,#302116);border:1px solid #5c3c21;padding:8px 4px;font-size:19px;color:#e1c88d}.exchange-army>header>span{color:#ded4bb;font-size:16px}.exchange-army>header small{font-size:17px;line-height:1.5}.exchange-army>header small b{font-size:21px}.exchange-slot{border:3px ridge #a4916a;background:linear-gradient(100deg,#29231a,#161713);grid-template-columns:minmax(70px,1fr) 100px;padding:3px;gap:4px;min-height:138px;box-shadow:inset 0 0 0 2px #1b1915}.exchange-slot-info{font-size:18px;color:#d7cfb9}.exchange-slot-info b{font-weight:400;font-size:21px}.exchange-slot-info span{border-bottom:1px solid #544a3a;padding:5px 0}.exchange-slot-info span:last-child{color:#f2a267}.exchange-art{height:125px;border:2px ridge #bba275;background:#24251f}.exchange-art img{object-fit:contain;width:100%;height:100%}.exchange-slot>small{font-size:16px;color:#dfa262}.exchange-military{background:radial-gradient(ellipse,#293f33,#171c18 70%);color:#c4cbb8}.exchange-military .adviser-change{min-height:30px;line-height:1}.share-dialog:has(.share-preview){background:#202120ee;border:3px ridge #847659;padding:18px}.share-dialog .share-preview{background:#20201d;padding:0}.share-dialog .dialog-title{margin-bottom:12px;padding-bottom:8px}.share-dialog .share-bottom{font-size:17px}.estate-armies{align-items:end}.estate-army{background:linear-gradient(#34362c,#312a22);border:3px ridge #97866d;box-shadow:inset 0 0 0 2px #191917,0 2px 7px #000a;padding:4px}.estate-army header{background:linear-gradient(#252824,#464333);border-bottom:1px solid #74684f;box-shadow:inset 0 1px #99907555;color:#e5dfc9;padding:7px 5px}.estate-portraits{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;background:#25231e}.estate-portraits>span,.estate-portraits>span:first-child{grid-column:auto;aspect-ratio:177/270;background:#292721}.estate-portraits>span>img:not(.rank-strip){object-fit:contain;object-position:center;width:100%;height:100%}.estate-portraits img.rank-strip{display:block}.estate-army footer{background:linear-gradient(#24241f,#34281e);padding:10px 5px;color:#e3ddc9;border-top:1px solid #61543e;display:flex;flex-wrap:wrap;gap:5px;justify-content:space-between;font-size:16px}.estate-adviser-label{color:#c5aa6d}.estate-adviser-label b{font-weight:400;color:#e5dcc3}
@media(max-width:700px){.game-troop-nav{grid-template-columns:32px minmax(0,1fr) 32px}.game-troop-nav button{font-size:14px;min-height:36px}.game-troop-panel .adviser-summary b{font-size:16px}.military-caption{font-size:14px}.unit-top .slot-label{font-size:16px;min-height:36px}.unit-top .slot-label>span{padding-right:38px}.unit-top .slot-label .retreat{font-size:14px;padding:3px 5px}.unit-top .slot-aptitude{font-size:18px;gap:5px}.estate-armies{grid-template-columns:repeat(5,minmax(145px,1fr));overflow-x:auto;align-items:end;padding-bottom:8px}.estate-army footer{font-size:14px}.exchange-army{grid-template-columns:110px minmax(480px,1fr) 95px}.exchange-slot-info{font-size:16px}}
/* Reference-matched military surfaces; each state owns its own layout. */
.hud-number{background:linear-gradient(#393c3c,#414345);color:#e3d8b6;text-shadow:0 1px 1px #272825}.hud-number.hud-second{background:linear-gradient(#49494d,#414145);color:#e3d8b6}.portrait-resource b{background:linear-gradient(#393c3c,#414345);color:#e3d8b6}.portrait-resource small{background:linear-gradient(#49494d,#414145);color:#e3d8b6}
.unit-top .slot-aptitude{font-size:clamp(14px,1.12vw,18px);min-height:32px;padding:4px;gap:8px}.unit-top .slot-aptitude strong{font-size:1em;font-weight:400}.unit-top .slot-empty{position:relative;display:block;padding:0;background:none;border:0;box-shadow:none;aspect-ratio:222/333;width:100%;overflow:hidden;cursor:pointer}.unit-top .slot-empty img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none}.unit-top .slot-empty:hover{filter:brightness(1.08)}
.game-troop-art.military-art{position:relative;mask-image:none;overflow:hidden}.game-troop-art.military-art>img{width:100%;display:block;pointer-events:none}.game-troop-art.military-art .strategist-plus{left:39%;top:30%;width:29%;height:23%;min-height:0;background:transparent;border:0;border-radius:50%;box-shadow:none;padding:0}.game-troop-art.military-art.has-adviser{aspect-ratio:320/310}.game-troop-art.military-art.has-adviser>img{position:absolute;top:0;left:0;width:100%;height:auto}.game-troop-art.military-art.has-adviser .strategist-plus{left:32%;top:39%;width:42%;height:29%;border-radius:4px;background:linear-gradient(#29382a,#1a251d);border:3px ridge #727b55;box-shadow:0 0 12px #0b2418;font-size:18px;color:#e5e1c6}.game-troop-art.military-art.has-adviser .strategist-plus span{font-size:18px}.game-troop-panel .adviser-summary.adviser-panel{display:grid;grid-template-columns:70px minmax(0,1fr) 46px;align-items:center;gap:12px;margin:0 5% 0;padding:7px 10px 7px 0;border:0;background:url('assets/adviser-strip.png') center/100% 100%;box-shadow:none;min-height:82px}.adviser-panel .adviser-portrait{display:block;width:70px;height:74px;border:3px ridge #bb9b57;overflow:hidden;background:#29271e}.adviser-panel .adviser-portrait img{width:100%;height:100%;object-fit:cover;object-position:50% 16%}.game-troop-panel .adviser-panel b{font-size:20px;line-height:1.2;text-align:center;color:#e18c3e;font-weight:500;text-shadow:1px 1px #382219}.adviser-panel .adviser-change{display:block;width:46px;height:48px;min-height:0;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:url('assets/adviser-change.png') center/100% 100% no-repeat}
/* Exchange is five short rows, matching the game's 3+1 grid. */
.exchange-dialog{width:min(1200px,98vw);height:auto;max-height:94dvh;padding:14px 14px 12px;background:#27231fee;border:2px solid #71604d;box-shadow:inset 0 0 0 5px #39332c,0 20px 60px #000a}.exchange-dialog .dialog-title{margin:0 0 4px;padding:0 0 5px;min-height:34px}.exchange-dialog .dialog-title h2{font-size:21px}.exchange-dialog .close{width:34px;height:34px;min-height:0;font-size:25px}.exchange-help{font-size:12px;line-height:1.3;margin:3px 0 8px}.exchange-list{display:grid;gap:4px;max-height:calc(94dvh - 100px);overflow:auto}.exchange-army{display:grid;grid-template-columns:174px minmax(0,1fr) 100px;gap:7px;padding:5px 3px;border:0;background:#191715;min-width:850px;min-height:0;height:116px;align-items:stretch}.exchange-army>header{position:relative;min-height:0;height:106px;padding:6px 4px 4px 40px;display:flex;flex-direction:column;justify-content:center;gap:3px}.exchange-army>header>strong{width:32px;font-size:17px;line-height:1.2;padding:5px 3px;writing-mode:vertical-rl;text-orientation:upright;border:1px solid #4e341f}.exchange-army>header>span{font-size:14px;line-height:1.2}.exchange-army>header small{font-size:15px;line-height:1.4}.exchange-army>header small b{font-size:19px}.exchange-slots{gap:6px;height:106px;align-items:stretch}.exchange-slot{display:grid;grid-template-columns:minmax(66px,1fr) 94px;grid-template-rows:minmax(0,1fr);height:106px;min-height:0;padding:2px;gap:4px;border:2px solid #8a7957;border-radius:2px;background:linear-gradient(100deg,#29231a,#171613);box-shadow:inset 0 0 0 1px #4a3e29;overflow:hidden}.exchange-slot-info{display:flex;flex-direction:column;justify-content:space-between;gap:0;font-size:16px;padding:0 0 2px}.exchange-slot-info>b{font-size:18px;line-height:1.3;white-space:nowrap}.exchange-slot-info>span{padding:3px 0;border-top:1px solid #55452e;border-bottom:0;line-height:1.25;white-space:nowrap}.exchange-slot-info>span:last-child{font-size:17px;color:#df965c}.exchange-art{position:relative;height:98px;width:94px;display:block;border:3px ridge #b39155;overflow:hidden}.exchange-art>img{width:100%;height:100%;object-fit:cover;object-position:50% 16%}.exchange-art>small{position:absolute;bottom:0;left:0;right:0;padding:2px 1px;background:#191713c9;font-size:12px;line-height:1.2;text-align:center;color:#e7af62}.exchange-art>span:not(.art-window){display:grid;place-items:center;height:100%}.adviser-summary.adviser-exchange{display:grid;grid-template-rows:20px 62px 18px;justify-items:center;align-content:center;gap:0;min-height:0;height:106px;padding:0;background:none;border:0}.adviser-exchange .adviser-slot-label{font-size:13px;line-height:1.2;color:#c7bfaa}.adviser-exchange .exchange-adviser{width:60px;height:60px;min-height:0;border:2px ridge #938050;border-radius:3px;background:#22271e;padding:0;font-size:28px}.adviser-exchange b{font-size:12px;font-weight:400;line-height:18px;white-space:nowrap;color:#d3bd88}.adviser-exchange.no-adviser{grid-template-rows:20px 62px}.adviser-exchange.no-adviser .exchange-adviser{border-radius:50%;border-color:#6b7052;background:radial-gradient(#353f2d,#19221a);color:#c3b277}
/* Appointment table: reference proportions, tabs, gold portrait rings and textured separators. */
.strategist-dialog{width:min(1560px,98vw);height:min(860px,94dvh);max-height:94dvh;padding:0;border:1px solid #554a3a;background:linear-gradient(100deg,#1b2528ed,#302727f7 35%,#272625f5);box-shadow:inset 0 0 0 3px #332e27,0 15px 70px #000b;overflow:hidden;display:flex;flex-direction:column}.strategist-dialog>.dialog-title{flex:none;height:65px;margin:0;padding:10px 22px;background:radial-gradient(ellipse at left bottom,#673323,transparent 40%),linear-gradient(#24201deb,#171918dd);border-bottom:3px ridge #684336}.strategist-dialog>.dialog-title h2{color:#e9e0d0;font-size:30px}.strategist-layout{flex:1;min-height:0;display:grid;grid-template-columns:19% minmax(0,1fr);gap:12px;padding:24px 12px 12px 0}.strategist-layout aside{display:flex;flex-direction:column;text-align:center;align-items:center;justify-content:center;padding:40px 10px 18px;min-height:0;background:url('assets/adviser-backdrop.png') center/100% 100%}.strategist-seal{position:relative;display:block;border:0;border-radius:0;box-shadow:none;background:none;width:100%;height:240px;margin:0 0 22px;overflow:hidden}.strategist-seal img{position:absolute;left:0;top:0;width:100%;height:auto;mask-image:radial-gradient(ellipse at 50% 52%,#000 36%,transparent 70%)}.strategist-seal>span{position:absolute;left:17%;right:17%;top:43%;font-size:22px;color:#dddac5;border:3px ridge #73805c;border-radius:3px;background:linear-gradient(#253a2d,#15251e);padding:5px 2px}.strategist-layout aside h3{font-size:18px;line-height:1.6;border-block:1px solid #8c79565c;padding:12px 5px;margin-bottom:14px;color:#d9c9a9}.strategist-members{display:flex;justify-content:center;width:100%;height:76px;gap:8px}.strategist-members>img,.strategist-members>.art-window{width:29%;height:76px;object-fit:cover;object-position:top;border:2px ridge #aa8a58}.strategist-main{min-height:0;display:flex;flex-direction:column}.strategist-tabs{flex:none;display:flex;justify-content:flex-start;gap:5px;height:58px;padding:0 0 5px;border-bottom:2px solid #9a8c6c}.adviser-type-tab{width:15%;min-width:80px;display:flex;align-items:center;justify-content:center;background-position:center;background-repeat:no-repeat;background-size:100% 100%;color:transparent!important;font-size:0}.adviser-type-tab.type-0{background-image:url('assets/adviser-tab-0.png')}.adviser-type-tab.type-1{background-image:url('assets/adviser-tab-1.png')}.adviser-type-tab.type-2{background-image:url('assets/adviser-tab-2.png')}.adviser-type-tab.type-3{background-image:url('assets/adviser-tab-3.png')}.adviser-type-tab.type-4{background-image:url('assets/adviser-tab-4.png')}.strategist-head,.strategist-row{grid-template-columns:11% 14% 6% 8% 7% minmax(0,1fr) 15%;gap:3px}.strategist-head{flex:none;background:none;border:0;padding:0;margin:7px 0 14px;min-height:32px;color:#393328;font-size:17px}.strategist-head>span{display:grid;place-items:center;min-height:32px;border:1px solid #a79f8c;border-radius:2px;box-shadow:inset 0 1px #f6efe4aa;background:linear-gradient(#e0dcd0,#b0ada1)}.strategist-list{flex:1;min-height:0;max-height:none;overflow:auto;scrollbar-width:thin;scrollbar-color:#7c6a4e #232522}.strategist-row{padding:10px 5px;min-height:76px;border-bottom:1px solid #68625288;background:linear-gradient(100deg,#32272866,#20292a77);font-size:18px;position:relative}.strategist-row.selected{min-height:270px;background:linear-gradient(90deg,#48383bdd,#4b3d3ddd 48%,#292825ba);border:0;border-bottom:1px solid #9d7452;box-shadow:inset 0 4px 10px #dc99542b;padding:27px 5px 30px}.strategist-row.selected:before,.strategist-row.selected:after{content:'';position:absolute;left:0;right:0;height:9px;background:url('assets/adviser-divider.png') center/100% 100%;pointer-events:none}.strategist-row.selected:before{top:0}.strategist-row.selected:after{bottom:0}.strategist-name{font-size:20px;color:#df853c;gap:4px;padding:0;text-shadow:1px 1px #281d18}.strategist-name b{font-weight:500;border-bottom:1px solid #b87539;line-height:1.35}.adviser-round-portrait{display:block;width:86px;height:90px;overflow:hidden;border-radius:50%;border:3px ridge #d6bd68;background:#3c392c;box-shadow:0 3px 4px #1119}.adviser-round-portrait>img{width:100%;height:145%;object-fit:cover;object-position:top;border:0;transform:translateY(-4%)}.adviser-rank{font-size:16px;letter-spacing:1px;color:#db6735;text-shadow:1px 2px #492518}.strategist-status{font-size:18px;gap:10px}.strategist-status .appoint{display:block;width:124px;height:57px;min-height:0;padding:0;border:0;border-radius:0;background:url('assets/adviser-appoint.png') center/100% 100%;box-shadow:none;color:transparent;font-size:0;opacity:1}.strategist-status .appoint.dismiss{background-image:url('assets/adviser-dismiss.png')}.strategist-status .appoint:disabled{background-image:url('assets/adviser-disabled.png');opacity:1;color:transparent;border:0;box-shadow:none}.strategist-assignment{font-size:17px;color:#d7cbb1;padding-top:9px;margin-top:10px}.skill-pending{font-size:16px;line-height:1.7;color:#b9ac9b}.strategist-row:not(.selected) .skill-pending{color:#a79b86}
@media(max-width:800px){.unit-top .slot-aptitude{font-size:14px;min-height:30px}.game-troop-panel .adviser-summary.adviser-panel{grid-template-columns:45px minmax(0,1fr) 33px;gap:5px;padding:5px 4px 5px 0;min-height:58px}.adviser-panel .adviser-portrait{width:45px;height:49px}.adviser-panel .adviser-change{width:33px;height:35px}.game-troop-panel .adviser-panel b{font-size:15px}.game-troop-art.military-art.has-adviser .strategist-plus span{font-size:13px}.strategist-layout{grid-template-columns:1fr;padding:12px 8px;gap:0}.strategist-layout aside{display:none}.strategist-dialog>.dialog-title{height:52px;padding:8px 14px}.strategist-dialog>.dialog-title h2{font-size:23px}.strategist-tabs{height:44px}.adviser-type-tab{min-width:0;width:19%}.strategist-head,.strategist-row{grid-template-columns:17% 12% 6% 9% 6% minmax(0,1fr) 19%;gap:2px;font-size:13px}.strategist-head>span{font-size:12px;min-height:30px}.strategist-name{font-size:14px}.adviser-round-portrait{width:56px;height:60px}.adviser-rank{font-size:10px;letter-spacing:0}.strategist-status{font-size:13px}.strategist-status .appoint{width:76px;height:36px}.strategist-row.selected{min-height:220px}.skill-pending{font-size:12px}.strategist-assignment{font-size:13px}.exchange-dialog{padding:10px}.exchange-army{height:116px}.exchange-slot-info{font-size:16px}.exchange-art{height:98px}}
/* All five troop types occupy one stable viewport. */
.game-troop-panel{min-width:0;align-self:start}.game-troop-art:not(.military-art){width:100%;aspect-ratio:336/390;height:auto;position:relative}.game-troop-art:not(.military-art)>img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom}.game-troop-nav{height:49px;min-height:49px;align-items:stretch}.game-panel-tabs{height:43px;min-height:43px;align-items:stretch}.game-panel-tabs button{min-width:0;white-space:nowrap}
.game-troop-art.military-art{mask-image:linear-gradient(90deg,transparent,#000 5%,#000 97%,transparent)}
.unit-top .slot-label{border:2px solid #857c6b;outline:1px solid #302a24;outline-offset:-4px;background:linear-gradient(#3f3b38,#2b2826);box-shadow:none;clip-path:polygon(3% 0,97% 0,100% 16%,100% 84%,97% 100%,3% 100%,0 84%,0 16%)}
/* One lord label in the HUD, with a compact adjacent rename control. */
.estate-heading{margin-top:5px}.hud-lord{width:32%;background:linear-gradient(90deg,#c2c1baed,#c2c1ba88 80%,transparent);padding-left:.6%}.hud-rename{position:absolute;left:39%;top:71%;width:9%;height:27%;min-height:0;padding:0 3px;border:0;background:url('assets/game-button-clean.png') center/100% 100% no-repeat;color:#312d25;font-family:var(--serif);font-size:.9cqw;line-height:1;white-space:nowrap;box-shadow:0 1px 2px #30292350;text-shadow:0 1px #f4ecdb88;z-index:2}.hud-rename:hover{filter:brightness(1.08)}
.hud-number.hud-profile-number:not(.hud-second){background:linear-gradient(90deg,#262a27,#292c29 50%,#262a27);color:#e3d8b6}.hud-number.hud-profile-number.hud-second{background:linear-gradient(#4b4b4e,#454549);color:#e3d8b6}.hud-number.hud-resource-number{background:linear-gradient(#393c3c,#414345)}.hud-number.hud-resource-number.hud-second{background:linear-gradient(#49494d,#414145)}
.estate-hud:after{mask-image:radial-gradient(ellipse at 48% 43%,#000 48%,#000 63%,#000b 72%,transparent 87%);background-size:736% 100%}.estate-hud-scroll{padding-bottom:9px;margin-bottom:-9px;mask-image:linear-gradient(#000 calc(100% - 9px),transparent)}
@media(max-aspect-ratio:4/5){.portrait-profile{mask-image:none}.portrait-lord{width:63%;background:linear-gradient(90deg,#c2c1baee,#c2c1bab0 85%,transparent);font-size:2.65cqw}.hud-rename.portrait-rename{left:auto;right:2%;top:72%;width:20%;height:27%;font-size:2.1cqw}.estate-heading{margin-top:4px}.portrait-profile{background:none;isolation:isolate}.portrait-profile:before{content:'';position:absolute;inset:0 0 auto;height:69%;background:url('assets/game-profile.png') top left/100% auto no-repeat;z-index:-1}.portrait-profile:after{content:'';position:absolute;left:0;top:0;width:13.6%;height:100%;background:url('assets/game-profile.png') left top/736% 100% no-repeat;mask-image:radial-gradient(ellipse at 48% 43%,#000 48%,#000 63%,#000b 72%,transparent 87%);z-index:-1}}
/* Trimmed button artwork has no outer black matte. */
.estate-shortcuts>button,.lord-picker summary,.hud-rename,.game-troop-nav button{background-color:transparent;background-origin:border-box;border:0;border-radius:2px;box-shadow:none;overflow:hidden}.estate-shortcuts>button:hover,.lord-picker summary:hover{background-color:transparent}
/* Shared game controls: softened metal edges, consistent across catalogs and editor. */
.metal,.chip,.icon-btn,.deploy-btn,.learn-add,.learn-row,.filter-options button,.game-check,.game-sort button,.form-row select,.search,.search input,.rename-input{border-radius:5px}.tab{border-radius:5px 17px 3px 3px}.metal,.deploy-btn{border:1px solid #72614b;box-shadow:inset 0 0 0 1px #e8d6ab66,0 2px 3px #100e0c88}.deploy-btn{background:linear-gradient(#4b6750,#2b4935 45%,#173b25);border:2px solid #26331f;box-shadow:inset 0 0 3px #c1d5a5,0 2px 3px #0009;color:#e9e9d4;font-size:20px;min-height:44px;border-radius:5px}.metal{background-image:url('assets/game-button-clean.png');background-size:100% 100%;background-color:#c6bca5;border:0;color:#342c23}.metal.danger{background-image:linear-gradient(#6e302c,#3b2423);color:#f2d1c6}.metal.primary{background-image:linear-gradient(#f2d992,#b28b48)}.game-check{background:linear-gradient(#382825,#28201e);border:2px ridge #655244;padding:7px 10px;box-shadow:inset 0 1px #7e6d5733}.game-check i{border-radius:3px;background:#362026;border:2px inset #5d4c43}.game-filter-dialog{background:linear-gradient(115deg,#2a2421f5,#211f1df2);border:2px ridge #826747;padding:18px 22px}.game-filter-heading,.game-filter .dialog-title{background:linear-gradient(90deg,#48322288,transparent);border-bottom:2px ridge #5f594b;padding:7px 14px;color:#d6bb83}.game-sort button{border:0;background:transparent;color:#d8cbb6;font-size:20px;min-height:52px}.game-sort button.active{color:#ead3a3;background:linear-gradient(transparent,#744e3933);border-bottom:2px solid #ad794d}.game-filter-row{padding:10px 0}.game-filter-row>span{color:#c1b69f}.game-check.checked{color:#e8d9b7;border-color:#967b57}
/* Center labels and place help beneath the complete formation. */
.unit-top .slot-aptitude{display:flex;align-items:center;justify-content:center;padding:0 6px;height:34px;min-height:34px;line-height:1;font-size:clamp(14px,1.12vw,18px)}.unit-top .slot-aptitude span,.unit-top .slot-aptitude strong{display:flex;align-items:center;justify-content:center;height:100%;line-height:1;margin:0;padding:0;transform:translateY(-1px)}.unit-board{display:flex;flex-direction:column}.unit-top{flex:1;align-content:center}.unit-top .formation-help{grid-column:1/-1;grid-row:auto;justify-self:center;align-self:end;margin:26px auto 0;padding:10px 20px;max-width:850px;width:fit-content;text-align:center;line-height:1.7;font-size:15px;font-weight:600;color:#3f3527;text-shadow:0 1px #f1e8d0;background:linear-gradient(90deg,transparent,#e5dcc2b0 20%,#e5dcc2b0 80%,transparent);border-radius:7px}.unit-top .formation-help span{display:block;font-size:13px;font-weight:500;color:#554935}.unit-top .army-position strong{font-weight:700;color:#483822;text-shadow:0 1px #f2ead2}.army-position>span{gap:0;align-items:center}.army-dot{display:grid;place-items:center;width:32px;height:32px;min-width:32px;min-height:32px;padding:0;border:0;background:transparent;border-radius:50%}.army-dot>span{display:block;width:12px;height:12px;border:1.5px solid #766346;border-radius:50%;background:#e7dfc9}.army-dot.current>span{background:#774332;outline:2px solid #9d8147;outline-offset:3px}.army-dot:hover>span{filter:brightness(1.2)}
/* Dynamic, integrated nameplate: level follows the current configured officer. */
.hero-card,.fan-card,.detail-art{container-type:inline-size}.live-card-caption{position:absolute;left:30%;right:3%;bottom:2.6%;height:8.2%;display:flex;align-items:center;justify-content:center;gap:5%;padding:0 2%;font:500 8.1cqw/1 'Noto Serif KR',Batang,serif;letter-spacing:-.035em;color:#cf8f58;text-shadow:1px 1px 1px #110c06,-1px -1px 1px #211309;background:linear-gradient(180deg,#282213ee,#33280fe8 65%,#4b3815b0);mask-image:linear-gradient(90deg,transparent,#000 7%,#000 96%,transparent);pointer-events:none;white-space:nowrap;z-index:3}.live-card-caption>span:last-child{overflow:hidden;text-overflow:clip}.live-card-caption .live-card-level{color:#e8e3c9;font-size:1em;letter-spacing:-.03em;flex:none}.live-card-caption.collection-caption{bottom:4.6%;height:9%;left:28%;right:3%;font-size:8.3cqw;background:linear-gradient(#171b15ee,#292c17ee 70%,#444222bb)}.detail-art .live-card-caption{z-index:4}.fan-card .rank-strip{position:absolute;object-fit:fill;pointer-events:none}
/* Every tab owns the corresponding headers and numeric columns. */
.selection-page .roster-header,.selection-page .roster-row{grid-template-columns:1.8fr .5fr .6fr .6fr .8fr repeat(5,.55fr) .9fr;min-width:900px;gap:5px}.selection-page .roster-header.stats-columns,.selection-page .roster-row.stats-columns{grid-template-columns:1.8fr .5fr .6fr .6fr .8fr repeat(4,.75fr) .9fr}.selection-page .roster-header.skills-columns,.selection-page .roster-row.skills-columns{grid-template-columns:1.8fr .5fr .6fr .6fr .8fr 3.2fr .9fr}.selection-page .roster-header{padding:6px 8px;background:#22251fe8;color:#302b22;min-height:47px;border-bottom:2px solid #72664b}.column-sort,.selection-page .roster-header>span{display:flex;align-items:center;justify-content:center;gap:5px;min-height:33px;padding:4px 3px;border:1px solid #8f8876;border-radius:4px;background:linear-gradient(#dddace,#b5b3a7);box-shadow:inset 0 1px #fbf8eb99;font-size:16px;font-weight:600;color:#352f27;line-height:1.2;white-space:nowrap}.column-sort.sorted{color:#302619;background:linear-gradient(#eddfbe,#c2ae89)}.column-sort>span{font-size:19px;line-height:1}.selection-page .roster-row{padding:12px 12px;min-height:77px;background:linear-gradient(100deg,#30252755,#1b242444)}.selection-page .roster-row.selected{border-block:2px solid #c28b5a;background:linear-gradient(90deg,#573f40bb,#59423bbb,#302b2666);box-shadow:inset 0 2px 6px #f3b06b44}.selection-page .roster-row>span{font-size:18px}.selection-page .roster-row>button:first-child{font-size:20px;color:#df955d;text-decoration-thickness:1px}.roster-affiliation{color:#d8c790}.roster-skills{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;text-align:center;color:#dfc995;font-size:16px}.roster-skills span{min-width:0;overflow-wrap:anywhere}.roster-skills small{display:block;font-size:13px;color:#afa690}.stat-value{font-variant-numeric:tabular-nums}.selection-page .tactic-header{background:#22251f;color:#e4d7b9;border-radius:4px}.selection-page .tactic-header .column-sort{font-size:16px}.selection-page .tabs{gap:5px}.selection-page .tab{min-width:130px;min-height:49px;border:2px ridge #655443;clip-path:polygon(0 0,88% 0,100% 25%,100% 100%,0 100%);background:linear-gradient(#34282a,#211b1c);font-size:21px;color:#c8bda7;border-radius:5px 16px 0 0}.selection-page .tab.active{color:#e7cf95;border-color:#c38a53;box-shadow:inset 0 0 10px #f3a24c66;background:linear-gradient(#4b332b,#2a211f)}
@media(max-width:700px){.unit-top .formation-help{font-size:13px;padding:8px 12px;margin-top:14px}.unit-top .formation-help span{font-size:12px}.army-dot{width:30px;min-width:30px;height:32px}.unit-top .army-position strong{font-size:20px}.selection-page .roster-header,.selection-page .roster-row{min-width:850px}.game-filter-dialog{padding:12px}.game-sort button{font-size:16px}.selection-page .tab{min-width:96px;min-height:43px;font-size:17px}}
.creator-credit{font-size:clamp(18px,1.65vw,24px);font-weight:600;line-height:1.65;color:#f1e6c8;text-align:center;text-shadow:0 2px 3px #000;padding:12px 20px}.notices-button{font-size:20px;font-weight:600;color:#efdab0;min-height:46px;padding:8px 14px;border-radius:5px}.notice-dialog{max-width:730px}.notice-dialog p{font-size:18px;line-height:1.9!important;color:#e7dfcf;word-break:keep-all;overflow-wrap:break-word;text-wrap:pretty}.notice-dialog h2{font-size:29px}.topbar{align-items:center}.top-title{height:100%;align-items:center}.top-title h1{display:flex;align-items:center;margin:0;padding:0;line-height:1.25;transform:translateY(-1px)}.shell:has(>.home)>.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;min-height:78px;height:auto;padding-block:12px}.shell:has(>.home)>.topbar .top-title{justify-content:center;padding-left:100px}.shell:has(>.home)>.topbar h1{font-size:clamp(22px,2.1vw,34px);text-align:center;justify-content:center}.home-footer .spacer{display:none}.home-footer{justify-content:center}
@media(max-width:700px){.shell:has(>.home)>.topbar{gap:8px;padding-inline:12px;min-height:70px}.shell:has(>.home)>.topbar .top-title{padding-left:0;justify-content:flex-start}.shell:has(>.home)>.topbar h1{font-size:clamp(17px,4.4vw,25px);text-align:left}.notices-button{font-size:16px;padding:6px 8px}.creator-credit{font-size:18px;padding:10px 12px}.notice-dialog p{font-size:16px}}
.shell:has(>.home)>.topbar{grid-template-columns:130px minmax(0,1fr) 130px}.shell:has(>.home)>.topbar .top-title{grid-column:2;padding:0;justify-content:center}.shell:has(>.home)>.topbar .top-actions{grid-column:3;justify-content:flex-end}.shell:has(>.home)>.topbar h1{justify-content:center;text-align:center}.shell:has(>.home)>.topbar h1:before,.shell:has(>.home)>.topbar h1:after{align-self:center}
@media(max-width:700px){.shell:has(>.home)>.topbar{grid-template-columns:minmax(0,1fr);gap:3px;padding:9px 12px;min-height:87px}.shell:has(>.home)>.topbar .top-title{grid-column:1;grid-row:1;justify-content:center}.shell:has(>.home)>.topbar .top-actions{grid-column:1;grid-row:2;justify-content:flex-end}.shell:has(>.home)>.topbar h1{font-size:23px}.shell:has(>.home)>.topbar .notices-button{min-height:28px;padding:3px 8px}}

/* Small, consistent game-frame corners across controls and dialogs. */
button:not(.close):not(.army-dot):not(.back):not(.fan-card):not(.hero-card):not(.adviser-circle),input:not([type=range]):not([type=checkbox]),select,textarea,.metal,.chip,.search,.saved-unit,.saved-army,.notice,.learn-row,.learn-add,.aptitudes>span,.stats-table,.exchange-row,.exchange-slot,.share-preview,.tactic-modal,.tactic-row,.game-check,.slot-aptitude{border-radius:4px}
.dialog,.small-dialog,.exchange-dialog,.strategist-dialog,.game-filter-dialog,.share-dialog,.notice-dialog,.menu-card{border-radius:6px;overflow:hidden}
.dialog{overflow-y:auto}.tab,.selection-page .tab{clip-path:none;border-radius:5px 9px 3px 3px}.game-panel-tabs button{border-radius:4px 8px 3px 3px}.column-sort{border-radius:4px}.hero-info .hero-controls:empty{display:none}.hero-info>div>.aptitudes:first-child{margin-top:0}
/* All original effect text uses one measured glyph scale and the host surface. */
.tactic-details,.tactic-modal{background:#2b2928}.dialog:has(.tactic-modal){background:#2b2928}.tactic-modal{border:0;box-shadow:none}.effect-surface,.tactic-modal .effect-surface{background:transparent!important;padding:18px 0;margin:0;width:100%;overflow-x:auto;overflow-y:hidden;isolation:isolate}.effect-original{display:block;flex:none;max-width:none;margin:0;overflow:hidden}.tactic-details .effect-surface{padding:18px 20px}.tactic-modal .effect-surface{margin-top:16px}.effect-footer{background:transparent}.hero-info .aptitudes{margin-top:0}
.event-catalog{cursor:grab;user-select:none;touch-action:pan-y}.event-catalog.grabbing{cursor:grabbing}.event-columns,.event-material-row,.material-chip{border-radius:4px}
.tab,.selection-page .tab{position:relative;clip-path:polygon(0 0,calc(100% - 12px) 0,100% 12px,100% 100%,0 100%);border:1px solid #b69868;border-radius:4px 0 3px 3px}.tab:after{content:'';position:absolute;right:-3px;top:5px;width:20px;border-top:1px solid #b69868;transform:rotate(45deg);pointer-events:none}.tab.active:after{border-color:#efbb75}
.hud-rename{left:27%;top:69.8%;height:30.2%;width:9%;display:flex;align-items:center;justify-content:center;font-weight:700;line-height:1;font-synthesis:weight}.estate-shortcuts>button,.lord-picker summary{font-weight:700;font-size:18px;line-height:1.2;display:flex;align-items:center;justify-content:center;text-shadow:0 .4px currentColor}.unit-top .formation-help{font-weight:700;-webkit-text-stroke:.15px currentColor}.unit-top .formation-help span{font-weight:600}
@media(max-width:760px){.hud-rename.portrait-rename{left:48%;right:auto;top:69.8%;height:30.2%;width:22%;font-weight:700}.estate-shortcuts>button,.lord-picker summary{font-size:16px}}
.unit-top .formation-cards{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}.unit-top .unit-slot{min-width:0;display:grid;grid-template-rows:40px auto 34px;gap:8px;align-content:start}.unit-top .slot-label{height:40px;min-height:40px;max-height:40px;margin:0;overflow:hidden}.unit-top .unit-slot .hero-card,.unit-top .unit-slot .slot-empty{aspect-ratio:222/333;width:100%;height:auto;min-height:0;max-height:none;margin:0;box-sizing:border-box}.unit-top .slot-aptitude{height:34px;min-height:34px;max-height:34px;margin:0}.unit-top .army-carousel{align-self:center}.unit-top .formation-status{height:40px;min-height:40px}.unit-top .formation-help{min-height:72px}
.rank-live{position:absolute;overflow:hidden;pointer-events:none;z-index:3;filter:hue-rotate(-45deg) saturate(1.45)}.rank-live img{position:absolute;max-width:none!important;object-fit:fill!important;margin:0;border:0;transform:none}

/* Shared portrait settings in catalog and formation details. */
.hero-portrait .portrait-settings{width:100%;margin:0;gap:8px;text-align:left}
.portrait-rank{display:flex;align-items:center;justify-content:space-between;gap:12px;font-weight:600}.portrait-rank select{flex:1;max-width:140px}
.portrait-settings .bonus-check{padding:8px 10px;gap:10px;border:1px solid #766045;border-radius:4px;background:#302b2a;font-weight:600}
.portrait-settings .bonus-check input{accent-color:#c9a663}.portrait-settings .bonus-check small{margin-left:auto}
@media(max-width:700px){.hero-info .hero-portrait{display:flex;max-width:240px;width:100%;margin:0 auto 24px}.hero-portrait .detail-art{width:100%}}

.deployment-badge{position:absolute;z-index:5;left:0;right:0;top:43%;padding:8px 5px;display:flex;flex-direction:column;gap:2px;align-items:center;background:linear-gradient(90deg,#35201de6,#251b15eb,#35201de6);border-block:1px solid #b18f58;color:#e9cf8c;text-shadow:1px 2px 2px #000;pointer-events:none;text-align:center;line-height:1.3}.deployment-badge strong{font-size:clamp(16px,1.8vw,27px);font-weight:700}.deployment-badge>span{font-size:clamp(12px,1.4vw,20px);color:#eee4cd;max-width:100%;overflow-wrap:anywhere}.roster-affiliation{overflow-wrap:anywhere}

.strategist-row{cursor:pointer}.strategist-row:not(.selected):hover{background:#73574530}

.metal.transfer-accept{background:linear-gradient(#497c54,#24472c);border-color:#91ba88;color:#fff4d8}.metal.transfer-reject{background:linear-gradient(#99453c,#632822);border-color:#cd8070;color:#fff0e3}

.preload-actions{display:flex;gap:12px}.home-loading>span{text-align:center;line-height:1.6}
.download-consent{min-height:100dvh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at top,#443630,#181b19 75%)}.download-consent>section{width:min(580px,100%);padding:32px;border:1px solid #af935d;border-radius:6px;background:#292a27;box-shadow:0 12px 50px #0008}.download-consent h1{font-size:26px;color:#dfc183;margin-bottom:24px}.download-consent p{line-height:1.9;margin-top:18px}.download-consent .download-size{padding:14px;background:#1b201b;border-radius:4px}.download-size strong{color:#f0d48a}.download-consent .dialog-actions{flex-wrap:wrap}.download-consent #download-consent-status:empty{display:none}

body.awaiting-download-consent{font-family:var(--sans)}

.roster-row{cursor:pointer}.roster-row:not(.selected):hover{background:#73574530}
/* Match the existing home selectors so earlier compact layouts cannot shrink the credit. */
.home .creator-credit{font-size:clamp(22px,2.1vw,30px);font-weight:700;line-height:1.6;color:#ffe3a2;text-shadow:0 2px 3px #000;margin-top:16px;padding:10px 14px;overflow-wrap:anywhere}
.effect-mobile-words{display:none}
.reset-scope-options{display:grid;gap:14px;margin:24px 0 10px}.reset-scope-options .metal{min-height:52px;font-size:19px;font-weight:600}

/* Fill each visible card row before wrapping. */
.hero-grid{width:100%;max-width:none;margin:0;grid-auto-flow:row;align-content:start}

/* Menu icon and caption form one centered group, without trailing arrows. */
.home .menu-card{justify-content:center;gap:10px;padding-inline:12px}
.home .menu-label{flex:0 1 auto;text-align:center;padding:0}
.home .menu-label strong{justify-content:center;gap:0;white-space:normal;word-break:keep-all;line-height:1.35}
.home .home-menu-icon{position:static;flex:0 0 24px;width:24px;height:24px;transform:none;margin:0}

/* Keep rarity distinct even when two filter options share the same label. */
.game-check .filter-rarity{font-size:12px;margin-left:6px;white-space:nowrap}
.game-check.filter-grade.option-2{color:#8ebff5}
.game-filter .data-note strong{color:#e3d8be}
