/* Kingdom UI: broad silhouettes, readable actions and a consistent illustrated frame. */
:root{--ui-edge:#182f3d;--ui-slate:#284556;--ui-blue:#365c70;--ui-paper:#f3ebce;--ui-ink:#263f48;--ui-gold:#ffd577;--ui-green:#77a567;--ui-shadow:#102a37;}
body{background:#1a303d;}#app{background:#233c4c;}
button{touch-action:manipulation;}button:not(:disabled){transition:filter .12s,box-shadow .12s,transform .12s;}button:active:not(:disabled){filter:brightness(1.1);}
#topbar{background:linear-gradient(#35556a,#284454);border-bottom:3px solid var(--ui-edge);box-shadow:inset 0 2px #6e8a8f55;padding:7px 12px;}
#tb-portrait{border:2px solid #efd08c;border-radius:10px;background:#47637a;box-shadow:0 3px #132d3e;}
.tb-name{font-weight:900;font-size:15px;}.tb-title{color:#d2dfd4!important;font-size:10px!important;}.tb-cur>div{border:1px solid #8ba6a3!important;border-radius:6px!important;background:#192f42!important;box-shadow:inset 0 2px #102434;}
#tabs{background:#1c303e;border-top:2px solid #a58e60;box-shadow:0 -3px 0 #142936;}
#tabs button{color:#c3d5d6;gap:2px;}#tabs button.active{background:linear-gradient(#567f78,#315957)!important;box-shadow:inset 0 3px #f6d58a,inset 0 -3px #172f3e!important;color:#fff1c4!important;}
#tabs button>.game-icon{filter:drop-shadow(0 2px #152e3e);width:29px;height:29px;}#tabs button span{font-size:11px;text-shadow:0 2px #1b3746;}
#sheet{background:linear-gradient(125deg,#355363,#233f50);}
#sheet .sheet-head{background:linear-gradient(#426879,#2d4c60);border-bottom:3px solid #173344;box-shadow:inset 0 2px #8fa79b44;min-height:54px;}
#sheet-title{background:none;border:0;box-shadow:none;border-radius:0;padding:4px 0;color:#fff0c5!important;font-size:19px;text-shadow:0 2px #173646;letter-spacing:-.4px;}
#sheet-title .game-icon{width:29px;height:29px;filter:drop-shadow(0 2px #173646);}
#sheet-views{background:#203e50;padding:5px 9px 7px;border-bottom:1px solid #718b8255;}
#sheet-views button{min-height:36px;border:1px solid #142f40;background:#294859;border-bottom-width:3px;font-size:12px;}
#sheet-views button.active{background:linear-gradient(#ffe4a0,#e6bf6b);border-color:#8a683b;color:#513c25;box-shadow:inset 0 2px #fff0bb;}
#panel{padding:12px;color:#e2e9db;}#panel .sec{border:2px solid #243e46;border-bottom:4px solid #162f3a;border-radius:10px;background:linear-gradient(125deg,#f5efd9,#e7e8ce);box-shadow:inset 0 2px #fff7e3; color:var(--ui-ink);padding:12px;margin-bottom:12px;}
#panel .sec h3{font-size:15px;font-weight:900;margin-bottom:10px;color:#2d514d;}#panel .sec h3 small{font-size:10px;color:#63736b;}
#panel .hint{color:#61736e;line-height:1.5;font-size:11px;}
#panel .btn,.modal-actions .btn{border:2px solid #41626a;border-bottom-width:4px;border-radius:8px;background:linear-gradient(#dbe8dd,#b3cdc3);box-shadow:inset 0 2px #f2f7e0;color:#284c4f;font-weight:900;text-shadow:0 1px #ffffff55;}
#panel .btn.gold,#panel .btn.primary,.modal-actions .btn.primary,.modal-actions .btn.gold{background:linear-gradient(#ffe89b,#edc268);border-color:#886135;border-bottom-color:#684a2e;color:#53391e;box-shadow:inset 0 2px #fff5ca;}
#panel .btn.danger,.modal-actions .btn.danger{background:linear-gradient(#bd7054,#984d42);border-color:#633d38;color:#fff2d4;text-shadow:0 1px #69382a;}
#panel .btn:disabled{opacity:.58;filter:saturate(.2);}#panel .btn:active:not(:disabled),.modal-actions .btn:active:not(:disabled){transform:translateY(2px);border-bottom-width:2px;}
/* Kingdom progress is tied to land, not an unrelated row of stage numbers. */
.lobby-heading{background:#284b49;color:#d5e7d5;font-size:11px;}.lobby-heading b{color:#ffe29a;}
#lobby-route{padding:0;background:#254441;border-top:2px solid #152f36;}#lobby-route:before{display:none;}
.kingdom-milestone{width:100%;display:flex;align-items:center;gap:10px;padding:8px 12px;border:0;background:linear-gradient(105deg,#355e54,#263f4b);color:#ebedce;text-align:left;}
.milestone-icon .game-icon{width:32px;height:32px;filter:drop-shadow(0 2px #152e34);}.milestone-copy{flex:1;min-width:0;}.milestone-copy>b{font-size:12px;}.milestone-pips{display:flex;gap:4px;margin-top:5px;}.milestone-pips i{height:6px;flex:1;background:#142e38;border:1px solid #668176;border-radius:2px;}.milestone-pips i.filled{background:#e8c978;border-color:#ffe7a4;box-shadow:0 0 5px #edc77622;}.milestone-count{font-size:10px;text-align:right;color:#c8d9c6;}.milestone-count b{color:#ffe1a0;font-size:16px;}.milestone-count small{display:block;margin-top:2px;font-size:9px;}
.lobby-squad{background:#304f50;padding:6px 12px;}.lobby-squad>div:first-child{font-size:12px;}.lobby-squad>div:first-child>button{min-height:30px!important;color:#ffe3a1;}
.lobby-unit{background:radial-gradient(ellipse at 50% 20%,#608978,#2b4c4c);border-color:#92ac87;border-bottom-color:#182f35;box-shadow:inset 0 2px #c2d5a944;}
#battle-objective{background:#203e47;border:2px solid #8a9b75;border-radius:9px;padding:8px 10px;margin-top:6px;}#battle-objective b{font-size:13px!important;color:#ffe7a4!important;}#battle-objective small{font-size:10px!important;color:#c4d9cb!important;}
.lobby-mode #objective-action{background:linear-gradient(#94b572,#6d9256);color:#fff4cf;border:2px solid #365537;border-bottom-width:4px;text-shadow:0 1px #375735;min-height:40px;padding:5px 10px;}
.lobby-play{background:#304f50;border-top:0;box-shadow:none;padding:8px 14px;}
#lobby-battle{min-height:52px;border:2px solid #76542f;border-bottom:5px solid #573d28;border-radius:10px;background:linear-gradient(#ffe89b,#efbe61);box-shadow:inset 0 3px #fff5bf,0 2px #152f35;font-size:19px;}
#lobby-challenge{min-height:36px!important;border:2px solid #633d35;background:#a45e46;color:#ffe9c5;border-radius:7px;}
/* Growth: the actual lord and the next promotion are the focal point. */
#panel .lord-upgrade{display:grid;grid-template-columns:92px minmax(0,1fr);gap:7px 12px;position:relative;overflow:hidden;background:radial-gradient(ellipse at 15% 45%,#769176,#3c625d 60%,#2f4f59);color:#fff0cb;border-color:#1c3542;padding:13px;}
.growth-portrait{grid-row:1/3;position:relative;display:grid;place-items:center;align-self:stretch;background:radial-gradient(ellipse at 50% 75%,#a5b38155,transparent 65%);}.growth-portrait .lord-art{width:86px!important;height:105px!important;background-size:contain!important;background-repeat:no-repeat;filter:drop-shadow(0 5px 2px #163b4766);}.growth-portrait>span{position:absolute;bottom:0;border:1px solid #e4c17d;border-bottom:3px solid #655332;background:#213f4c;color:#ffe3a0;border-radius:5px;padding:2px 10px;font-size:12px;font-weight:900;}
.growth-identity{min-width:0;}.growth-identity>small{font-size:10px;color:#d6e0c5;}.growth-identity h3{color:#fff2ce!important;font-size:23px!important;margin:3px 0!important;text-shadow:0 2px #244645;}.growth-identity>b{color:#ffe399;font-size:14px;}.growth-identity p{font-size:10px;margin:5px 0 0;color:#d7e4cd;}.growth-action .btn{width:100%;font-size:12px;min-height:42px;padding:5px;}
.growth-promotion{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;margin:0 0 12px;padding:8px 10px;border:2px solid #1d3541;border-bottom-width:4px;border-radius:8px;background:linear-gradient(#53756d,#3c5d59);color:#ffe8ac;text-align:left;}.growth-promotion>span{display:flex;align-items:center;gap:6px;font-size:12px;}.growth-promotion .game-icon{width:26px;height:26px;}.growth-promotion small{font-size:10px;color:#dfdfc3;}
#panel .upgrade-grid{padding:10px;gap:7px;}#panel .upgrade-grid .row{padding:7px;gap:4px;border:1px solid #aabb9f;border-bottom:3px solid #9dae92;background:#dce4cd;border-radius:7px;grid-template-columns:28px 1fr;}#panel .upgrade-grid .row .ic{width:28px;height:28px;}#panel .upgrade-grid .row .game-icon{width:28px;height:28px;}#panel .upgrade-grid .row .t{font-size:12px!important;font-weight:900;}#panel .upgrade-grid .row .d{font-size:10px!important;}#panel .upgrade-grid .row .btn{font-size:12px;min-height:38px;padding:4px;}
/* Recruitment is about units joining the kingdom, not a floating card icon. */
#panel .recruitment{padding:0;overflow:hidden;}#panel .recruitment>h3{margin:0;padding:10px 12px;background:#294f58;color:#f9e7b6;font-size:14px;}#panel .recruitment>h3 small{color:#c2d2c5;}
#panel .summon-stage{padding:16px 12px 0!important;gap:0;isolation:isolate;background:radial-gradient(ellipse at 50% 65%,#b5cb8a 0,#719b7a 40%,#3e6868 85%);position:relative;overflow:hidden;}
.recruit-banner{z-index:1;text-align:center;}.recruit-banner small{color:#d9e8c6;font-size:11px;}.recruit-banner h2{color:#fff0bf!important;font-size:19px!important;font-weight:950;text-shadow:0 2px #315654;margin-top:4px!important;}
.recruit-lineup{display:flex;align-items:flex-end;justify-content:center;width:100%;height:164px;position:relative;gap:0;}
.recruit-lineup:before{content:'';position:absolute;bottom:3px;left:8%;right:8%;height:35px;background:#294e4840;border-radius:50%;box-shadow:0 8px #21463f22;}
.recruit-display{position:relative;width:31%;height:133px;display:grid;place-items:center;filter:drop-shadow(0 6px 2px #214c4b55);}.recruit-display .hero-art{display:block;width:100%;height:100%;background-size:contain!important;}.recruit-1{height:157px;z-index:2;}.recruit-0{transform:rotate(-4deg);}.recruit-2{transform:rotate(4deg);}
.recruit-guarantee{width:calc(100% + 24px);margin:0 -12px;padding:9px;text-align:center;background:#29473fe6;color:#d4e3c5;font-size:12px;}.recruit-guarantee b{color:#ffe292;}
#panel .recruitment .recruit-hint{margin:10px 12px 2px;text-align:center;}#panel .summon-btns{position:static;display:flex;padding:10px 12px 3px;margin:0;background:none;gap:8px;}#panel .summon-btns .btn{min-height:49px;font-size:14px;flex:1;}.recruitment .rates{margin:0 12px 12px;padding-top:10px;border-top:1px solid #aab8a3;}
/* Formation keeps actions on the unit and reserves compact. */
.roster-dock{background:#294952;border-bottom:3px solid #16323d;}.roster-dock-title{font-size:13px;}.deployment-board{background:radial-gradient(ellipse,#71947455,transparent 70%),repeating-linear-gradient(115deg,transparent 0 39px,#d5dfb708 40px 42px),#3e6657;border:2px solid #92aa85;border-bottom:4px solid #1c3c35;border-radius:10px;}
#panel .deployment-member{flex-basis:145px;max-width:156px;padding:5px;background:linear-gradient(#e8e6c9,#cad8b5);border:2px solid #9db58c;border-bottom:4px solid #203f38;border-radius:8px;}
.deployment-member .deployment-unit{height:43px;}.deployment-unit .hero-art{width:43px;height:43px;}.deployment-unit b{font-size:11px;}.deployment-unit small{font-size:10px;}
.deployment-controls{grid-template-columns:1fr 1fr;gap:4px;align-items:stretch;}.deployment-controls .btn{font-size:9px!important;min-height:36px!important;padding:2px!important;line-height:1.3;}.deployment-controls .game-icon{width:11px;height:11px;}
#panel .deployment-dice{flex-direction:column;gap:2px;min-height:36px;border:1px solid #67856b;border-bottom:3px solid #5d7b61;border-radius:6px;background:#b6cfaa;color:#294f40;font-size:9px;}.deployment-dice small{font-size:10px;font-weight:900;}
.deployment-unit.sel{outline:2px solid #f6cf76;background:#f6dda0;}.empty-rank{min-height:29px;color:#c1d7b2;border-color:#bfd2ac44;}.deployment-row{padding:4px 0;}.rank-target{font-size:12px;color:#ffe7a0;}.deployment-heading{font-size:9px;letter-spacing:2px;}
#panel .reserve-section{padding:9px!important;}#panel .reserve-section h3{font-size:12px;margin-bottom:7px;}.reserve-grid{gap:6px;}#panel .reserve-unit{border:2px solid #9bae8e;border-bottom:3px solid #7c9677;border-radius:7px;background:#dce4cb;}.reserve-unit .hero-art{width:48px;height:48px;}.reserve-unit b{font-size:10px;}.reserve-unit small{font-size:9px;}#panel .reserve-unit.placed{border-color:#668f62;background:#c7dcb9;}.reserve-info{background:#829e7f;color:#fff2c9;width:24px;height:24px;}
/* Shared dialogs and territory choices. */
#modal-box:not(.settings-modal){background:linear-gradient(#f6efd6,#e7e8cb);border:3px solid #57717a;border-bottom:6px solid #203c4a;border-radius:11px;box-shadow:inset 0 2px #fff8e1,0 5px #142d3d,0 20px 50px #061e2c88;}
#modal-box:not(.settings-modal)>h2{background:#416e63;border:2px solid #264d49;border-bottom:4px solid #1c3d3b;border-radius:6px;color:#fff0bd;text-shadow:0 2px #274c42;}
#modal-box.settings-modal{border-color:#57717a;background:linear-gradient(#3c6171,#294757);box-shadow:inset 0 2px #94aaa3,0 5px #183440,0 20px 50px #061e2c88;}
#modal-box .hero-detail .hc-ic.big{background:radial-gradient(ellipse,#8eae8870,transparent 70%);}.hero-detail .hc-ic.big .hero-art{filter:drop-shadow(0 6px 2px #45634f33);}
.facility-choice{border:2px solid #789174;border-bottom:5px solid #48634f;border-radius:9px;background:linear-gradient(#e8ecd4,#c9dcb9);}.facility-choice strong{border:1px solid #98713c;border-bottom:3px solid #7a592f;background:linear-gradient(#ffe3a0,#ebbd61);border-radius:6px;color:#5c421f;font-weight:900;}.facility-choice b{font-size:15px;}
.mine-art{background-image:url('assets/kingdom-mine.svg')!important;background-size:contain!important;background-position:center!important;background-repeat:no-repeat;}
.promo-step{border:2px solid #8da58c;border-bottom:4px solid #4d705d;border-radius:8px;background:#dce5cb;color:#47634e;}.promo-step.cur{background:#f5d997;border-color:#aa7e39;color:#644824;}.promo-step .lord-art{filter:drop-shadow(0 4px 2px #4a695644);}
/* Combat uses the same materials, while the field remains unobscured. */
#battle-top{background:linear-gradient(#36586b,#284859);border-bottom:3px solid #183343;}#battle-top #ct-stage{font-size:15px;color:#ffe6a8;}#battle-top .wave{height:8px;border:2px solid #153344;background:#173747;border-radius:4px;}#battle-top .wave i{background:#98bb6d;}
#dice-hud{border-color:#1b3743;background:linear-gradient(#3a5e62,#284b55);box-shadow:inset 0 2px #90a88c44;}#deployment-panel{background:#294c55;border-top:2px solid #173b45;}#controls{background:linear-gradient(#34576b,#203e52);border-top:2px solid #153344;}
#battle-home{border:2px solid #a3b69c;border-bottom:4px solid #172f3c;background:linear-gradient(#628775,#3a6059);border-radius:9px;color:#fff0b8;}.deploy-orb{box-shadow:0 3px #132e39;}.orb-inner{background:radial-gradient(#6e967c,#2d5058);}
@media(max-width:360px){#panel{padding:9px;}.growth-promotion{gap:4px;padding:6px;}.growth-promotion>span{font-size:11px;}.growth-promotion small{font-size:9px;}#panel .lord-upgrade{grid-template-columns:76px 1fr;gap:7px;padding:10px;}.growth-portrait .lord-art{width:72px!important;height:95px!important;}.recruit-banner h2{font-size:16px!important;}.recruit-lineup{height:136px;}.recruit-display{height:110px;}.recruit-1{height:133px;}#panel .deployment-member{flex-basis:112px;padding:3px;}.deployment-unit b{font-size:9px;}.deployment-unit .hero-art{width:32px;height:36px;}.deployment-controls{gap:2px;}.deployment-controls .btn{font-size:8px!important;}.deployment-dice span{font-size:8px;}.reserve-unit b{font-size:9px;}.reserve-grid{grid-template-columns:repeat(4,minmax(0,1fr));}.reserve-unit .hero-art{width:37px;height:42px;}}
@media(max-height:740px){.kingdom-milestone{padding:5px 10px;}.lobby-squad{padding:4px 10px;}.lobby-play{padding:5px 12px;}#lobby-battle{min-height:44px;}#lobby-challenge{min-height:30px!important;}.lobby-squad>div:first-child>button{min-height:26px!important;}.deployment-member .deployment-unit{height:35px;}.deployment-unit .hero-art{height:35px;}.deployment-controls .btn,#panel .deployment-dice{min-height:30px!important;}#panel .deployment-member{padding:3px;}.roster-dock-title{min-height:26px;}.roster-dock p{font-size:9px;margin-top:3px;}.reserve-unit .hero-art{height:36px;}.reserve-unit>button:first-child{padding:3px 1px;}#panel .sec{margin-bottom:8px;}#panel .lord-upgrade{padding:9px;}.growth-portrait .lord-art{height:86px!important;}.recruit-lineup{height:125px;}.recruit-display{height:106px;}.recruit-1{height:124px;}#panel .summon-stage{padding-top:10px!important;}}
@media(prefers-reduced-motion:reduce){button:not(:disabled){transition:none;}}
#lobby-route{display:flex;}
#panel .deployment-member{flex:0 1 calc((100% - 6px)/2);max-width:145px;min-width:0;}
@media(max-width:360px){.deployment-member .deployment-unit{gap:2px;}.deployment-unit .hero-art{width:28px;}#panel .deployment-member{padding:2px;}.deployment-controls .game-icon{width:8px;height:8px;}.deployment-controls .btn{font-size:8px!important;}}
/* A single kingdom upgrade, with a visible route and land gate. */
#panel .kingdom-growth{padding:12px;position:relative;}
.kingdom-growth>header{display:flex;justify-content:space-between;align-items:center;color:#6d7962;font-size:10px;}.kingdom-growth>header>b{color:#536c50;font-size:12px;}
#panel .kingdom-growth>h3{font-size:19px;margin:4px 0 10px;color:#2b5049;}
.growth-track{display:flex;gap:4px;margin-bottom:14px;}.growth-track i{height:7px;flex:1;border:1px solid #9eaf92;border-radius:2px;background:#ccd6bc;}.growth-track i.done{background:#6c9a60;border-color:#4b754d;}.growth-track i.current{background:#f2cf79;border-color:#a37d3c;box-shadow:0 0 0 2px #e9c97844;}
.growth-current{display:flex;align-items:center;gap:10px;min-height:65px;margin-bottom:11px;}.growth-node-icon{width:56px;height:60px;flex:none;display:grid;place-items:center;background:linear-gradient(#8ca680,#587d63);border:2px solid #345547;border-bottom:4px solid #274b40;border-radius:9px;box-shadow:inset 0 2px #d8dca1;}.growth-node-icon .game-icon{width:39px;height:39px;filter:drop-shadow(0 2px #345047);}.growth-current small{font-size:10px;color:#788569;}.growth-current h4{font-size:17px;margin:3px 0;color:#2d5146;}.growth-current p{font-size:11px;margin:0;color:#687c66;line-height:1.5;}.growth-current p span{color:#87917b;}.growth-current p b{color:#3d754b;}
#panel .growth-build{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:46px;font-size:14px;}.growth-build>span{display:flex;align-items:center;gap:4px;}.growth-build .game-icon{width:20px;height:20px;}
.growth-next{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:12px;padding-top:10px;border-top:1px solid #bac5aa;font-size:10px;color:#829179;}.growth-next b{color:#4a684f;font-size:11px;}.growth-next span{margin-left:auto;}
.growth-gate{display:grid;grid-template-columns:1fr auto;gap:3px 8px;align-items:center;border:1px solid #a7b798;border-radius:6px;background:#dbe2cb;padding:8px;}.growth-gate>b{color:#52694d;font-size:12px;}.growth-gate small{font-size:10px;color:#7e8d72;}.growth-gate .btn{grid-column:2;grid-row:1/3;font-size:11px;min-height:40px;padding:5px 8px;}.kingdom-growth.locked .growth-current{opacity:.65;}.kingdom-growth.completed{text-align:center;}.kingdom-growth.completed .growth-node-icon{margin:10px auto;}
@media(max-height:740px){#panel .lord-upgrade{grid-template-columns:70px 1fr;padding:8px;gap:4px 8px;}.growth-portrait .lord-art{width:66px!important;height:81px!important;}.growth-identity h3{font-size:19px!important;margin:1px 0!important;}.growth-identity p{font-size:9px;margin:3px 0;}.growth-identity>b{font-size:12px;}.growth-action .btn{min-height:35px;font-size:11px;}.growth-portrait>span{font-size:10px;padding:1px 7px;}.growth-promotion{margin-bottom:8px;padding:5px 8px;min-height:36px;}#panel .kingdom-growth{padding:10px;}#panel .kingdom-growth>h3{font-size:17px;margin-bottom:7px;}.growth-track{margin-bottom:8px;}.growth-current{min-height:49px;margin-bottom:8px;}.growth-node-icon{width:45px;height:48px;}.growth-node-icon .game-icon{width:32px;height:32px;}.growth-current h4{font-size:15px;}.growth-current p{font-size:10px;}#panel .growth-build{min-height:40px;font-size:12px;}.growth-next{margin-top:8px;padding-top:7px;}.recruit-banner small{display:none;}#panel .recruitment .recruit-hint{font-size:10px;margin:7px 8px 0;}#panel .summon-btns{gap:5px;padding:8px 8px 2px;}#panel .summon-btns .btn{font-size:11px;padding:5px;min-height:43px;}.recruitment>p.hint{font-size:9px!important;margin:6px 0;}.recruitment .rates{margin:0 8px 8px;padding-top:6px;font-size:10px;}.recruit-lineup{height:108px;}.recruit-display{height:94px;}.recruit-1{height:109px;}}
@media(max-height:740px){.growth-identity p{display:none;}.growth-identity h3{line-height:1.1!important;}.growth-identity>small{font-size:9px;}.growth-next{font-size:9px;}.growth-next b{font-size:10px;}.growth-promotion .game-icon{width:21px;height:21px;}}
#boot-start,#creation-next,#btn-start{border:2px solid #7d5d34;border-bottom:5px solid #503e2c;border-radius:9px;background:linear-gradient(#ffe59a,#eab85e);color:#563c22;box-shadow:inset 0 3px #fff3c2,0 3px #1a3544;font-weight:900;}
#setup .choice{border:2px solid #6e8b88;border-bottom:4px solid #284b51;border-radius:9px;box-shadow:inset 0 2px #adbe9b55;}
#setup .choice.sel{border-color:#cfaa61;background:#54776c;box-shadow:inset 0 2px #d7d4a2,0 0 0 2px #f2d68b33;color:#fff1c7;}
#setup .choice.sel small{color:#e0e8cc;}#in-name{border:2px solid #82968d;border-bottom:4px solid #254450;background:#e9ecd8;color:#2a4b4b;border-radius:8px;}
@media(max-height:740px){.kingdom-growth.locked .growth-current{min-height:0;margin:0 0 7px;}.kingdom-growth.locked .growth-current .growth-node-icon,.kingdom-growth.locked .growth-current small,.kingdom-growth.locked .growth-current p{display:none;}}
.merit-label{display:flex;justify-content:space-between;gap:5px;font-size:10px;color:#d7e5ce;margin:0 0 4px;}.merit-label b{color:#ffe6a0;font-variant-numeric:tabular-nums;}
.merit-meter{height:8px;border:1px solid #183b40;background:#163941;border-radius:4px;overflow:hidden;box-shadow:0 1px #819c8955;}.merit-meter i{display:block;height:100%;background:linear-gradient(#d6e69e,#9ec379);transition:width .25s linear;}
#lord-merit-rate{display:block;margin:4px 0 6px;font-size:9px;color:#c2d9c5;}.growth-action #lord-breakthrough{width:100%;}.growth-action #lord-breakthrough:disabled{opacity:.8;filter:none;background:#40625e;color:#abc3b8;border-color:#274b49;box-shadow:inset 0 1px #7a978855;}
.merit-ready{box-shadow:inset 0 2px #fff4c3,0 0 9px #ffd88433!important;}
@media(max-height:740px){#panel .lord-upgrade{grid-template-columns:60px minmax(0,1fr);}.growth-portrait .lord-art{width:60px!important;height:87px!important;}.growth-identity{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}.growth-identity>small{display:none;}.growth-identity h3{font-size:16px!important;}.growth-identity>b{font-size:10px;}.merit-label{font-size:9px;}#lord-merit-rate{font-size:8px;margin:3px 0 4px;}.growth-action #lord-breakthrough{min-height:32px;}}
/* Permanent kingdom rank and automatic milestone supplies. */
#panel .kingdom-growth{display:flex;flex-direction:column;}
.growth-honors{display:flex;align-items:center;gap:7px;padding:6px 0 9px;margin-bottom:8px;border-bottom:1px solid #b6bea0;flex-wrap:wrap;}.growth-honors>b{font-size:16px;color:#3d6154;}.growth-honors>small{margin-left:auto;color:#6e7e65;font-size:9px;}
.kingdom-stars{display:flex;gap:2px;}.kingdom-stars i{width:16px;height:18px;}.kingdom-stars svg{width:100%;height:100%;fill:#bec6ae;stroke:#87987c;stroke-width:1.5;}.kingdom-stars .earned svg{fill:#f4c45e;stroke:#9c7034;filter:drop-shadow(0 1px #fff5bd);}
.growth-prizes{order:10;display:flex;gap:7px;margin-top:9px;padding-top:8px;border-top:1px solid #bdc7ac;}.growth-prizes>div{flex:1;min-width:0;display:grid;grid-template-columns:1fr auto;gap:3px;padding:5px 6px;border:1px solid #b4bda1;border-radius:6px;background:#e0e5ce;}.growth-prizes b{font-size:10px;color:#536f59;}.growth-prizes span{display:flex;align-items:center;gap:2px;font-size:10px;color:#634b32;font-weight:800;}.growth-prizes .game-icon{width:14px;height:14px;}.growth-prizes small{grid-column:1/-1;font-size:9px;color:#7c866f;}.growth-prizes .earned{background:#d1dfb8;border-color:#88a776;}.growth-prizes .earned small{color:#47724c;}
@media(max-height:740px){.growth-honors{padding:0 0 6px;margin-bottom:6px;}.growth-honors>b{font-size:14px;}.growth-prizes{margin-top:6px;padding-top:6px;}.growth-prizes>div{padding:4px;gap:2px;}.growth-prizes b,.growth-prizes span{font-size:9px;}.growth-prizes small{font-size:8px;}#panel .kingdom-growth>h3{margin:3px 0 5px;}.growth-current{margin-bottom:6px;min-height:43px;}.growth-track{margin-bottom:6px;}}
@media(max-width:360px){.kingdom-stars i{width:13px;}.growth-honors{gap:5px;}.growth-honors>small{font-size:8px;}}
#panel .kingdom-growth>h3{display:flex;align-items:center;justify-content:space-between;gap:6px;}
@media(max-height:680px){#panel .lord-upgrade{padding:6px;gap:2px 6px;}.growth-portrait .lord-art{height:67px!important;}.growth-identity h3{font-size:14px!important;}.merit-label{margin-bottom:2px;}#lord-merit-rate{margin:2px 0;}.growth-action #lord-breakthrough{min-height:29px;}#panel .kingdom-growth{padding:8px;}.growth-honors{margin-bottom:4px;padding-bottom:4px;}.growth-current{min-height:35px;margin-bottom:4px;}.growth-node-icon{height:35px;width:35px;}.growth-node-icon .game-icon{height:27px;width:27px;}.growth-current small{font-size:8px;}.growth-current h4{margin:1px 0;font-size:13px;}.growth-track{margin-bottom:4px;}#panel .growth-build{min-height:36px;}.growth-prizes{margin-top:4px;padding-top:4px;}}
.kingdom-star-count{display:flex;align-items:center;gap:4px;color:#8c622b;}.kingdom-star-count .game-icon{width:24px;height:24px;}.kingdom-star-count strong{font-size:20px;}
.growth-star-buff{order:10;margin-top:8px;padding:7px 9px;border:1px solid #afaf7b;border-radius:7px;background:linear-gradient(115deg,#e9dfad,#d8e2c2);display:grid;grid-template-columns:1fr auto;gap:4px;}.growth-star-buff>b{font-size:10px;color:#6f653f;}.growth-star-buff>strong{font-size:12px;color:#37664b;}.growth-star-buff>small{grid-column:1/-1;font-size:9px;color:#778367;}.growth-star-buff>div{grid-column:1/-1;display:flex;justify-content:space-between;border-top:1px solid #b7c39d;padding-top:4px;font-size:10px;color:#657a54;}.growth-star-buff>div b{color:#88642f;}
@media(max-height:680px){.growth-star-buff{padding:5px 7px;margin-top:5px;gap:2px;}.growth-star-buff>strong{font-size:10px;}.growth-star-buff>small{font-size:8px;}.growth-star-buff>div{padding-top:3px;font-size:9px;}.kingdom-star-count strong{font-size:17px;}.kingdom-star-count .game-icon{width:20px;height:20px;}}
@media(max-height:680px){#panel .growth-promotion{margin-bottom:5px;}#panel .kingdom-growth{padding:6px 8px;}.growth-honors{padding-bottom:3px;margin-bottom:3px;}.growth-star-buff{margin-top:3px;}}
/* Star ascension stays inside the growth card and never intercepts input. */
.star-rise-layer{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;z-index:4;}.star-rise-flight{position:absolute;left:50%;top:92px;width:64px;height:64px;filter:drop-shadow(0 0 10px #ffd65f);}.star-rise-flight .game-icon{width:100%;height:100%;}.star-rise-ring{position:absolute;left:50%;top:92px;width:76px;height:76px;border:3px solid #ffe7a4;border-radius:50%;animation:star-ring 1.1s ease-out both;}.star-rise-spark{position:absolute;left:50%;top:92px;width:5px;height:5px;background:#fff2b0;box-shadow:0 0 7px #f1bb45;animation:star-spark .9s var(--delay) ease-out both;}.star-rise .growth-honors{background:linear-gradient(100deg,transparent,#f9d47855,transparent);}.star-landed{animation:star-crest .65s ease-out;}.star-empowered{animation:star-power 1.35s ease-out;}.star-empowered>strong{animation:star-value .55s ease-out;color:#2c713b;}
@keyframes star-ring{0%{transform:translate(-50%,-50%) scale(.1);opacity:0}25%{opacity:.8}100%{transform:translate(-50%,-50%) scale(2.6);opacity:0}}
@keyframes star-spark{0%{transform:rotate(var(--angle)) translateY(0) scale(0);opacity:0}25%{opacity:1}100%{transform:rotate(var(--angle)) translateY(90px) scale(.2);opacity:0}}
@keyframes star-crest{0%{transform:scale(.8)}35%{transform:scale(1.35);filter:drop-shadow(0 0 9px #ffc851)}100%{transform:scale(1)}}
@keyframes star-power{0%{box-shadow:inset 0 0 0 2px #fff1af,0 0 15px #f4c65a;background:#fff1b7}100%{box-shadow:inset 0 0 0 0 transparent,0 0 0 transparent}}
@keyframes star-value{0%{transform:translateY(5px);opacity:.3}50%{transform:translateY(-3px)}100%{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.star-rise-ring,.star-rise-spark,.star-landed,.star-empowered,.star-empowered>strong{animation:none;}}
/* Map buttons use transform for positioning, never replace it with button press motion. */
button.estate-land,button.estate-land:active:not(:disabled){transform:translate(-50%,-50%);transition:filter .12s;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;}
button.estate-land *{-webkit-user-drag:none;user-select:none;-webkit-user-select:none;}
button.estate-land:active:not(:disabled){filter:brightness(1.12);}
.growth-promotion.promotion-ready,.kingdom-milestone.promotion-ready{background:linear-gradient(#ffe3a0,#dcb364);border:2px solid #8c663c;border-bottom:4px solid #67492c;color:#573b21;box-shadow:inset 0 2px #fff2bf;}.promotion-ready .milestone-copy>b,.promotion-ready .milestone-count,.promotion-ready .milestone-count b,.growth-promotion.promotion-ready small{color:#5e4226;}.promotion-ready .milestone-count small,.growth-promotion.promotion-ready small{font-weight:900;}.kingdom-milestone.promotion-ready{border-radius:8px;margin:3px 8px;}.growth-promotion.promotion-ready{min-height:40px;}
/* Eligibility glow: slow light sweep rather than flashing text. */
button.promotion-ready{position:relative;isolation:isolate;overflow:hidden;animation:promotion-aura 2.8s ease-in-out infinite;}
button.promotion-ready::after{content:'';position:absolute;inset:-60% -40%;background:linear-gradient(110deg,transparent 40%,#fff6c877 49%,#fffdf1aa 50%,transparent 59%);transform:translateX(-100%);animation:promotion-sheen 4s ease-in-out infinite;pointer-events:none;z-index:1;}
#tabs button.promotion-notice::after{content:'';position:absolute;top:5px;right:15%;width:7px;height:7px;border:1px solid #fff3b7;border-radius:50%;background:#ffd470;box-shadow:0 0 7px 2px #ffc75e88;pointer-events:none;}
@keyframes promotion-aura{0%,100%{box-shadow:inset 0 0 0 1px #fff0ab88,0 0 4px #efbf4d33}50%{box-shadow:inset 0 0 0 1px #fff6c9,0 0 12px #efbf4d88}}
@keyframes promotion-sheen{0%,45%{transform:translateX(-100%)}80%,100%{transform:translateX(100%)}}
@media(prefers-reduced-motion:reduce){button.promotion-ready{animation:none;box-shadow:inset 0 0 0 1px #fff0ad,0 0 7px #efbf4d66;}button.promotion-ready::after{display:none;}}
#panel .fixed-slot{min-height:76px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;box-sizing:border-box;}.fixed-slot .game-icon{width:23px;height:23px;}.fixed-slot b{font-size:11px;}.fixed-slot small{font-size:9px;}.locked-slot{background:#35584e!important;border-color:#698570!important;color:#b9c8ad;box-shadow:inset 0 2px #193d3766!important;}.locked-slot .game-icon{opacity:.7;}.empty-slot{color:#466348!important;border-style:dashed!important;}.deployment-row .rank-target{display:flex;flex-direction:column;justify-content:center;align-items:center;}.deployment-units{min-height:76px;}
@media(max-height:740px){#panel .fixed-slot,.deployment-units{min-height:66px;}.fixed-slot small{font-size:8px;}}
/* Unit rarity is visible in frame, material and text without enlarging the cards. */
.unit-tier{--tier-edge:#81958e;--tier-light:#e2e8db;--tier-dark:#b9c7bb;--tier-ink:#3d574f;position:relative;}
.unit-tier[data-rarity="R"]{--tier-edge:#417caa;--tier-light:#daedf2;--tier-dark:#95bfd1;--tier-ink:#234f70;}
.unit-tier[data-rarity="H"]{--tier-edge:#b98232;--tier-light:#fff0bc;--tier-dark:#d7b76c;--tier-ink:#725020;}
#panel .unit-tier{border-color:var(--tier-edge);background:radial-gradient(ellipse at 50% 25%,var(--tier-light),transparent 75%),linear-gradient(145deg,var(--tier-light),var(--tier-dark));box-shadow:inset 0 1px #ffffffaa,0 2px #173c3b;}
#panel .unit-tier[data-rarity="R"]{box-shadow:inset 0 0 0 1px #c4e9f6,0 2px #244c65;}
#panel .unit-tier[data-rarity="H"]{box-shadow:inset 0 0 0 1px #fff3bf,inset 0 -4px #9b712b33,0 2px #654b2a;border-top-color:#f8d778;}
.unit-tier[data-rarity="H"]::after{content:'';position:absolute;inset:3px;border:1px solid #e8c576;clip-path:polygon(0 0,18% 0,18% 3%,3% 3%,3% 18%,0 18%,0 0,100% 0,100% 18%,97% 18%,97% 3%,82% 3%,82% 0,100% 0,100% 100%,82% 100%,82% 97%,97% 97%,97% 82%,100% 82%,100% 100%,0 100%,0 82%,3% 82%,3% 97%,18% 97%,18% 100%,0 100%);pointer-events:none;}
.unit-rarity{position:absolute;top:2px;left:3px;z-index:2;display:block;padding:1px 3px;border:1px solid var(--tier-edge);border-radius:2px;background:var(--tier-ink);color:#fff4d3;font-size:8px!important;font-weight:900;line-height:1.2;pointer-events:none;}
.deployment-member>.unit-rarity{top:-6px;left:7px;}.unit-tier .hero-art{filter:drop-shadow(0 2px 1px #26474544);}.unit-tier[data-rarity="H"] .hero-art{filter:drop-shadow(0 0 4px #ffeab177) drop-shadow(0 2px 1px #75582455);}
#panel .reserve-unit.placed{border-color:var(--tier-edge);}.reserve-unit.placed>button:first-child>small{color:var(--tier-ink);font-weight:900;}.reserve-unit.selected{outline:2px solid #fff0a0;outline-offset:2px;}#panel .unit-tier .deployment-unit b{color:var(--tier-ink);}
#panel .reserve-unit.unit-tier.placed{background:radial-gradient(ellipse at 50% 25%,var(--tier-light),transparent 75%),linear-gradient(145deg,var(--tier-light),var(--tier-dark));}
#panel .reserve-unit .reserve-info{top:2px;right:2px;width:18px;height:18px;min-height:18px;padding:0;border:1px solid var(--tier-edge);border-radius:4px;background:var(--tier-light);color:var(--tier-ink);font-size:10px;}
/* Tier metalwork: distinct silhouettes and inset materials, not a larger card. */
#panel .unit-tier{isolation:isolate;}
#panel .unit-tier[data-rarity="C"]{--tier-ink:#465b55;background:linear-gradient(135deg,#d9ded0,#b8c5b5);}
#panel .unit-tier[data-rarity="R"],#panel .reserve-unit.unit-tier.placed[data-rarity="R"]{--tier-edge:#668eaa;--tier-ink:#234c65;background:radial-gradient(ellipse at 50% 25%,#c2e6e0 0,transparent 65%),linear-gradient(145deg,#609495,#345b72);border-color:#b7d9df #4e778f #234557;box-shadow:inset 0 0 0 2px #153b5266,0 2px #152f40;}
#panel .unit-tier[data-rarity="H"],#panel .reserve-unit.unit-tier.placed[data-rarity="H"]{--tier-ink:#64421f;background:radial-gradient(ellipse at 50% 25%,#e6ca7d55 0,transparent 65%),linear-gradient(145deg,#71816a,#2e514c);border-color:#ffe7a5 #bf914b #72512b;box-shadow:inset 0 0 0 1px #64431f,inset 0 0 0 3px #eed19a,0 2px #493822;}
#panel .reserve-unit .reserve-select{display:flex;flex-direction:column;align-items:center;width:100%;padding:5px 1px;border:0;background:transparent;cursor:pointer;color:var(--tier-ink);position:relative;z-index:1;}
#panel .reserve-unit .reserve-select>small{font-size:8px;margin-top:3px;font-weight:700;}
.reserve-select>b{width:100%;padding:1px 0;background:#ebecd5d9;border-top:1px solid #ffffff44;text-align:center;line-height:1.25;}
#panel .unit-tier[data-rarity="R"] .reserve-select>small,#panel .unit-tier[data-rarity="H"] .reserve-select>small{color:#fff0c6;text-shadow:0 1px #27473f;}
#panel .unit-tier[data-rarity="R"] .deployment-unit b,#panel .unit-tier[data-rarity="H"] .deployment-unit b{color:#fff2d4;text-shadow:0 1px #2c4542;}
.unit-tier[data-rarity="R"] .deployment-unit small,.unit-tier[data-rarity="H"] .deployment-unit small{color:#dbe5cb;}
.tier-metalwork{position:absolute;inset:3px;border-radius:5px;pointer-events:none;z-index:3;}.tier-corner{position:absolute;width:10px;height:10px;border-color:#bbd5d7;border-style:solid;border-width:0;}.tl{top:0;left:0;border-top-width:2px;border-left-width:2px;}.tr{top:0;right:0;border-top-width:2px;border-right-width:2px;}.bl{bottom:0;left:0;border-bottom-width:2px;border-left-width:2px;}.br{bottom:0;right:0;border-bottom-width:2px;border-right-width:2px;}
[data-rarity="C"] .tier-metalwork{display:none;}[data-rarity="H"] .tier-metalwork{inset:4px;border:1px solid #d7b37188;}[data-rarity="H"] .tier-corner{width:12px;height:12px;border-color:#ffe7ad;border-width:3px;transform:rotate(45deg);background:#a47d3c;clip-path:polygon(0 0,100% 0,100% 35%,35% 35%,35% 100%,0 100%);}[data-rarity="H"] .tr{transform:rotate(135deg);}[data-rarity="H"] .br{transform:rotate(225deg);}[data-rarity="H"] .bl{transform:rotate(315deg);}
.tier-seal{position:absolute;left:4px;top:16px;width:19px;height:24px;z-index:2;pointer-events:none;filter:drop-shadow(0 1px 1px #19382b88);}.tier-seal svg{width:100%;height:100%;fill:#bddde3;stroke:#37647b;stroke-width:1.6;stroke-linejoin:round;}[data-rarity="H"] .tier-seal svg{fill:#ffe39b;stroke:#91622c;}[data-rarity="C"] .tier-seal{display:none;}.deployment-member .tier-seal{left:auto;right:3px;top:-10px;width:17px;height:19px;}
#panel .unit-tier .unit-rarity{left:5px;top:3px;border:0;background:none;color:#e5f2ed;font-size:7px!important;padding:0;text-shadow:0 1px #29454c;letter-spacing:.5px;}#panel [data-rarity="H"] .unit-rarity{color:#ffe3a1;}#panel [data-rarity="C"] .unit-rarity{color:#40564d;text-shadow:none;}#panel .deployment-member .unit-rarity{top:-6px;left:8px;background:var(--tier-ink);padding:1px 4px;border:1px solid var(--tier-edge);color:#fff0cd;}
#panel .reserve-unit .reserve-info{z-index:4;width:16px;height:16px;min-height:16px;border-radius:50%;top:4px;right:4px;background:#1e3e4666;color:#f7ebc9;border:1px solid #d6dab077;}
.unit-tier[data-rarity="H"]::after{content:'';inset:0;clip-path:none;border:0;border-radius:inherit;background:linear-gradient(115deg,transparent 35%,#fff1b32b 48%,#fff9d14d 50%,transparent 63%);pointer-events:none;z-index:3;animation:card-metal-sheen 6s ease-in-out infinite;}
.unit-tier[data-rarity="H"] .tier-seal{animation:card-seal-glow 3.8s ease-in-out infinite;}
@keyframes card-metal-sheen{0%,50%{opacity:0;transform:translateX(-65%)}58%{opacity:1}82%,100%{opacity:0;transform:translateX(65%)}}
@keyframes card-seal-glow{0%,100%{filter:drop-shadow(0 1px 1px #19382b88)}50%{filter:drop-shadow(0 0 3px #ffe49d99)}}
@media(prefers-reduced-motion:reduce){.unit-tier[data-rarity="H"]::after{animation:none;display:none;}.unit-tier[data-rarity="H"] .tier-seal{animation:none;}}
/* Keep the original compact card footprint; trim is absolutely positioned. */
.reserve-select>b{padding:0;border-top:0;line-height:normal;}
@media(max-height:740px){#panel .reserve-unit .reserve-select{padding:3px 1px;}}
@media(max-width:360px){[data-rarity="H"] .tier-corner{width:9px;height:9px;border-width:2px;}.tier-seal{width:16px;height:20px;left:3px;}.deployment-member .tier-seal{width:14px;height:17px;}.tier-metalwork{inset:2px;}}
