:root{font-family:"Malgun Gothic","Apple SD Gothic Neo",system-ui,sans-serif;color:#e4e8de;background:#111e19;font-synthesis:none;--gold:#d7bb7c;--muted:#98a99b;--line:#ffffff12;--green:#80bfa0;--panel:#1b2b23;--ink:#15281f}*{box-sizing:border-box}body{margin:0}button,select,input{font:inherit}button,a,select,input{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.42}button:focus-visible,select:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible,canvas:focus-visible{outline:2px solid #ebc783;outline-offset:3px}button{border:1px solid var(--line);color:inherit;background:#ffffff05;border-radius:7px;padding:9px 12px;transition:background .15s,transform .15s}button:hover:not(:disabled){background:#ffffff0d}select{border:1px solid #ffffff1c;border-radius:6px;background:#203128;color:#d7e1d3;padding:8px 10px;max-width:100%}option{background:#213329}a{color:inherit;text-decoration:none}h1,h2,h3,p{margin:0}small{color:var(--muted)}.topbar{height:92px;display:flex;align-items:center;gap:28px;padding:0 28px 0 24px;border-bottom:1px solid var(--line);background:#17271f}.brand{display:flex;align-items:center;gap:12px;min-width:218px}.brand-seal{display:grid;place-items:center;font-family:serif;font-size:31px;color:var(--gold);border:1px solid #a98c4f;border-radius:3px;width:45px;height:49px;box-shadow:inset 0 0 0 4px #17271f,inset 0 0 0 5px #a98c4f66}.brand b{font-family:serif;font-size:24px;letter-spacing:1px;font-weight:600}.brand small{display:block;font-size:8px;letter-spacing:1.9px;margin-top:6px;color:#a5ac92}.server-picker{display:flex;align-items:center;gap:7px}.server-picker #server{font-size:11px;border:0;background:none;padding:5px}.live-dot,.live i{display:inline-block;width:5px;height:5px;border-radius:50%;background:#7fbe94}.resources{display:flex;gap:24px;flex:1;justify-content:center}.resource{display:flex;gap:9px;align-items:center;white-space:nowrap}.resource-symbol{font-size:21px;color:var(--gold);width:22px;text-align:center}.resource b{display:block;font-size:15px;letter-spacing:.4px;font-variant-numeric:tabular-nums}.resource small{font-size:9px;display:block;margin-top:4px}.profile{display:flex;gap:9px;align-items:center;white-space:nowrap}.avatar{display:grid;place-items:center;background:#45533b;color:#e3d2a9;border:1px solid #b89c6155;border-radius:50%;width:36px;height:36px;font-family:serif}.profile b{font-size:11px}.profile small{display:block;font-size:9px;margin-top:4px}.shell{display:flex;min-height:calc(100vh - 92px)}.sidebar{width:88px;flex-shrink:0;padding:26px 12px;border-right:1px solid var(--line);display:flex;align-items:center;flex-direction:column;gap:13px;background:#15231c}.nav-item{padding:11px 8px;width:64px;font-size:10px;color:#889c8b;border:1px solid transparent;background:none}.nav-item span{display:block;font-size:25px;margin-bottom:5px;font-family:serif}.nav-item.active{color:var(--gold);border-color:#b9984e35;background:#b9a56c0d}.rail-bottom{margin-top:auto;padding-top:60px;color:#637966;text-align:center;font-size:9px;line-height:1.8}.rail-line{height:25px;width:1px;background:#a68f4f70;display:block;margin:0 auto 14px}main{flex:1;min-width:0;padding:23px 26px 16px;max-width:1900px;margin:auto}.war-banner{display:flex;gap:17px;align-items:center;background:linear-gradient(110deg,#3b3c29,#272e21 65%,#26372a);border:1px solid #b39a5640;border-radius:10px;min-height:85px;padding:15px 20px;margin-bottom:20px;position:relative;overflow:hidden}.war-emblem{font-size:39px;color:var(--gold);font-family:serif;line-height:1}.war-copy{flex:1}.eyebrow{display:block;color:#b2aa85;font-size:8px;letter-spacing:1.8px;font-weight:600}.war-copy h2{font-size:15px;font-weight:600;margin-top:5px;letter-spacing:.3px}.war-copy p{color:#acb2a1;font-size:10px;margin-top:7px}.war-time{text-align:right;font-variant-numeric:tabular-nums}.war-time b{font-size:22px;color:#e2cc96;letter-spacing:1.5px;font-weight:500}.war-time small{display:block;font-size:9px;margin-top:5px}.war-banner button{margin-left:8px;font-size:11px;color:var(--gold);border-color:#cfb57344;padding:10px 16px}.war-banner.active{border-color:#d3ab6377}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 332px;gap:20px;align-items:start}.world-column{min-width:0}.map-card{border:1px solid #748c6930;border-radius:10px;overflow:hidden;background:#1b2d22}.map-heading{padding:20px 22px 13px;display:flex;justify-content:space-between;align-items:center}.map-heading .eyebrow{font-size:8px;color:#8f9f82;letter-spacing:2.3px}h1{font-size:24px;font-family:serif;color:#e8e6d4;font-weight:500;margin-top:7px;letter-spacing:1px}h1 span{font-family:"Malgun Gothic",sans-serif;font-size:10px;color:#9aa78f;letter-spacing:0;font-weight:400;margin-left:13px}.map-live{display:flex;align-items:center;gap:7px;font-size:9px;color:#9fb69d}.map-live i{width:5px;height:5px;background:#8bc29a;border-radius:100%}.map-legend{display:flex;align-items:center;gap:15px;padding:0 22px 14px;border-bottom:1px solid #ffffff09;color:#a5b39c;font-size:9px}.map-legend span{display:flex;align-items:center;gap:5px}.dot{display:inline-block;width:6px;height:6px;border-radius:2px}.dot.owned{background:#88c9ac}.dot.npc{background:#bdba8e}.dot.enemy{background:#cc8b79}.dot.royal{background:#e0b765}.map-hint{margin-left:auto;color:#708a74}.map-stage{position:relative;height:clamp(425px,49vh,650px);overflow:hidden}canvas{width:100%;height:100%;display:block;cursor:grab;touch-action:none}canvas:active{cursor:grabbing}.map-compass{position:absolute;left:25px;top:22px;display:flex;flex-direction:column;align-items:center;color:#c4c8aa88;pointer-events:none}.map-compass b{font-family:serif;font-size:10px;font-weight:400}.map-compass span{font-size:34px;font-weight:100}.map-note{position:absolute;left:22px;bottom:23px;pointer-events:none;font-size:9px;color:#aebc9d;line-height:1.8;border-left:2px solid #af9f6366;padding-left:10px}.map-note b{font-weight:400;display:block;color:#d1d6b9;font-size:10px}.map-controls{position:absolute;right:18px;bottom:18px;display:flex;flex-direction:column;gap:5px}.map-controls button{height:29px;width:29px;padding:0;background:#182c23df;border-color:#94ad7950;color:#c8d2b8;font-size:16px}.map-footer{display:flex;align-items:center;justify-content:space-between;padding:12px 20px;font-size:9px;color:#8da086;border-top:1px solid #ffffff09;background:#18291f}.map-footer>span:first-child{display:flex;gap:6px;align-items:center}.section-heading{display:flex;align-items:center;justify-content:space-between;margin:19px 0 12px}.section-heading h2{font-size:12px;font-weight:500}.section-heading h2 span{color:var(--gold);font-size:10px;margin-left:8px}.text-button{padding:0;background:none;border:none;font-size:10px;color:#aab89e}.holding-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.holding-card{min-height:86px;border:1px solid var(--line);border-radius:8px;display:flex;align-items:center;gap:10px;padding:14px;background:#1c2d23;text-align:left}.holding-card.empty{border-style:dashed;background:transparent;color:#718875}.holding-card .slot-icon{font-family:serif;font-size:26px;color:#82977e}.holding-card b{font-size:11px;font-weight:500;display:block}.holding-card small{font-size:9px;display:block;line-height:1.8;margin-top:4px}.holding-card.empty b{color:#a3b099;font-weight:400;font-size:10px}.detail-column{background:#1b2b23;border:1px solid #72816a26;border-radius:10px;overflow:hidden;min-height:658px}.panel-tabs{display:flex;padding:0 16px;border-bottom:1px solid var(--line)}.panel-tabs button{border:0;border-radius:0;background:none;padding:16px 13px;font-size:11px;color:#8d9e8e}.panel-tabs button.active{color:#e5ce93;border-bottom:2px solid #ccaf71}.panel{padding:20px}.panel-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.tag{font-size:9px;color:#c6c09d;background:#b6ae6020;border:1px solid #b6ae6028;border-radius:4px;padding:4px 6px}.tag.green{color:#8ed3b0;background:#54946d20;border-color:#54946d40}.tag.red{color:#d9a294;background:#bb735420;border-color:#bb735440}.coordinate{font-size:9px;color:#869b86}.castle-portrait{height:128px;position:relative;margin:0 -20px 15px;background:radial-gradient(ellipse at center,#71845840,transparent 65%);display:grid;place-items:center}.castle-portrait svg{width:130px;height:120px;filter:drop-shadow(0 10px 10px #071b1b50)}.portrait-caption{position:absolute;bottom:2px;right:20px;color:#7c936f;font-size:8px;letter-spacing:2px}.title-row{display:flex;align-items:center;gap:8px}h2.panel-title{font-family:serif;font-size:24px;letter-spacing:1px;font-weight:500;color:#e8e5d4}.panel-intro{font-size:10px;line-height:1.9;color:#a1ad97;margin-top:9px;margin-bottom:19px}.owner-line{font-size:10px;display:flex;justify-content:space-between;margin-top:11px;color:#b2bda8}.divider{border:0;border-top:1px solid var(--line);margin:18px 0}.mini-heading{font-size:10px;color:#b5c0aa;display:flex;justify-content:space-between;margin-bottom:11px;font-weight:500}.mini-heading small{font-size:9px;color:#859980}.yield-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.yield{border-radius:5px;background:#ffffff04;border:1px solid #ffffff05;padding:9px 10px;font-size:10px;display:flex;justify-content:space-between}.yield span{color:#9bae90}.yield b{color:#d3dec3;font-size:11px;font-weight:500}.population{margin-top:9px;border-radius:5px;padding:10px;background:#af9e5210;display:flex;justify-content:space-between;font-size:10px;color:#a7b095}.population b{color:#d6c58c;font-weight:500}.troops{display:flex;justify-content:space-between;gap:6px}.troop{flex:1;text-align:center;background:#ffffff03;border:1px solid #ffffff08;border-radius:5px;padding:9px 3px}.troop span{font-size:10px;color:#91a28c}.troop b{display:block;font-size:14px;margin-top:6px;color:#cad4bb;font-weight:500}.troop small{display:block;font-size:8px;margin-top:4px}.field-label{display:block;font-size:10px;color:#aebba1;margin-bottom:7px}.full{width:100%}.select-row{display:flex;gap:8px;margin-top:12px;align-items:center}.select-row select{flex:1;font-size:10px}.percentages{display:flex;gap:5px;margin:10px 0}.percentages button{flex:1;font-size:10px;padding:7px 3px}.percentages button.selected{background:#637e5240;color:#dfdb9e;border-color:#a1a26466}.primary{background:#d4b87b;color:#283722;font-size:11px;font-weight:700;border:1px solid #d4b87b;padding:12px 16px}.primary:hover:not(:disabled){background:#e6ca8f}.secondary{font-size:11px;padding:10px}.danger{color:#d6a398;border-color:#ab776b44}.action-note{font-size:9px;text-align:center;color:#879c80;line-height:1.8;margin-top:8px}.notice{background:#bfb05c0c;border-left:2px solid #beab6570;padding:10px 12px;color:#c2be95;font-size:10px;line-height:1.8;margin:12px 0}.notice.error{border-color:#bb7864;color:#d7a194;background:#a6614010}.metric-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;font-size:11px;border-bottom:1px solid #ffffff07}.metric-row span{color:#95a68e}.metric-row b{font-weight:500;color:#d8dfcd}.small-note{font-size:9px;line-height:1.8;color:#8ca181;margin-top:12px}.training-controls{display:flex;gap:8px;align-items:center}.training-controls input{min-width:0;width:75px;border:1px solid #7e937a40;border-radius:5px;background:#12291d;color:#d4dfc7;padding:8px}.training-controls span{font-size:10px;color:#9aab90}.training-controls button{margin-left:auto}.hero-card{border:1px solid #76876544;border-radius:7px;margin-bottom:16px;overflow:hidden}.hero-top{padding:16px;display:flex;align-items:center;gap:12px;background:linear-gradient(130deg,#52633d40,transparent)}.hero-avatar{font-family:serif;font-size:34px;color:#d8c18e;width:45px;text-align:center}.hero-top h3{font-size:15px;letter-spacing:.5px}.hero-top small{display:block;font-size:9px;margin-top:6px}.hero-skills{padding:0 14px 14px}.skill{margin-top:12px;font-size:10px}.skill b{font-weight:500;color:#d5d4b2}.skill small{display:block;font-size:9px;line-height:1.8;margin-top:4px}.skill-type{color:#8da781;font-size:8px;margin-right:6px}.hero-status{font-size:9px;margin-top:12px;color:#b9c98d}.score{margin-top:12px}.score-row{position:relative;padding:12px 10px;background:#ffffff04;margin-bottom:7px;border-radius:5px;overflow:hidden;display:flex;justify-content:space-between;font-size:10px}.score-row .bar{position:absolute;inset:0 auto 0 0;background:#8e9f5c1b;max-width:100%}.score-row span,.score-row b{position:relative}.score-row b{color:#dccc94;font-weight:500}.score-row.me{border:1px solid #9aa36250}.crown-art{font-size:59px;text-align:center;font-family:serif;color:#d6b97a;margin:14px 0}.term{font-size:10px;color:#98aa8c;text-align:center;margin-top:8px}.tax-box{background:#b49a5010;border:1px solid #b49a5030;border-radius:8px;text-align:center;padding:16px;margin:16px 0}.tax-box small{font-size:10px}.tax-box strong{display:block;font-size:28px;font-weight:500;color:#e1c990;margin:10px 0;font-variant-numeric:tabular-nums}.tax-box p{font-size:9px;color:#98a489;line-height:1.8}.office{border:1px solid #ffffff0d;padding:12px;border-radius:7px;margin-bottom:9px}.office-top{display:flex;justify-content:space-between;align-items:center;font-size:11px}.office-top small{font-size:9px}.office .select-row{margin-top:10px}.office button{font-size:10px;padding:7px 9px}.report{border-left:1px solid #72876055;padding:0 0 18px 13px;position:relative}.report:before{content:"";position:absolute;width:5px;height:5px;border-radius:100%;background:#a7b689;left:-3px;top:4px}.report b{font-size:11px;font-weight:500;line-height:1.6}.report p{font-size:10px;color:#98aa8c;line-height:1.8;margin-top:6px}.report small{font-size:8px;display:block;margin-top:6px}.report.victory b{color:#aad1a1}.report.defeat b{color:#d79b86}.report.war b,.report.royal b{color:#ddc084}.test-toolbar{display:flex;align-items:center;gap:7px;border-top:1px solid var(--line);margin-top:18px;padding-top:13px;flex-wrap:wrap}.test-label{font-size:8px;letter-spacing:1px;color:#bea86c;margin-right:5px}.test-toolbar>span{font-size:9px;color:#879a80}.test-toolbar select,.test-toolbar button{font-size:9px;padding:6px 8px}.test-toolbar .reset{color:#b19888;border-color:transparent}.save-status{margin-left:auto}.footnote{font-size:9px;color:#647d69;margin-top:12px}.castle-directory{margin-top:13px;color:#8da083;font-size:10px}.castle-directory summary{cursor:pointer;padding:7px 0}.castle-directory summary span{color:#617e66;font-size:9px;margin-left:8px}#castle-list{display:flex;gap:6px;flex-wrap:wrap;padding:9px 0}#castle-list button{font-size:10px;padding:6px 8px}.march-status{position:absolute;top:16px;right:18px;display:flex;flex-direction:column;gap:6px}.march-pill{border:1px solid #b6b57855;background:#1d3328ec;color:#d0d7b0;font-size:9px;padding:9px 10px;border-radius:5px}.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);max-width:min(540px,90vw);border:1px solid #a3b78e88;background:#263b2a;color:#e5ebd2;padding:14px 24px;border-radius:9px;box-shadow:0 15px 40px #0008;font-size:12px;z-index:20;line-height:1.7}.toast.error{border-color:#ad806b;background:#422e23}#connection{position:fixed;top:0;left:0;right:0;text-align:center;font-size:12px;padding:10px;background:#80572e;z-index:40}dialog{background:#233428;color:#e3e7d4;border:1px solid #a78d5666;border-radius:12px;padding:28px;max-width:400px;width:calc(100% - 32px)}dialog::backdrop{background:#09150ecc;backdrop-filter:blur(3px)}dialog h2{font-size:20px;margin:12px 0}dialog p{font-size:12px;line-height:1.9;color:#b3c1a5}.dialog-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:24px}.empty-report{font-size:12px;color:#99ad8e;line-height:2}.war-banner .score-preview{display:flex;gap:14px;font-size:10px;color:#c3c5a4;margin-top:8px}.busy{opacity:.65;pointer-events:none}[hidden]{display:none!important}
@media(min-width:851px){.detail-column{height:calc(clamp(425px,49vh,650px) + 233px);min-height:0;display:flex;flex-direction:column}.panel-tabs{flex-shrink:0}.panel{overflow:auto;scrollbar-width:thin;scrollbar-color:#566c51 #1b2b23}.panel .panel-intro{font-size:11px}.panel .mini-heading{font-size:11px}.panel .small-note{font-size:10px}}
@media(min-width:1600px){.workspace{grid-template-columns:minmax(0,1fr) 370px}.map-stage{height:clamp(500px,54vh,760px)}.panel{padding:24px}.detail-column{height:calc(clamp(500px,54vh,760px) + 233px)}.topbar{gap:40px}.resources{gap:42px}}
@media(max-width:1200px){.topbar{gap:15px;padding:0 18px}.brand{min-width:180px}.brand b{font-size:21px}.brand small{font-size:7px}.server-picker{display:none}.profile span:last-child{display:none}.resources{gap:16px}main{padding:18px}.workspace{gap:14px;grid-template-columns:minmax(0,1fr) 300px}.panel{padding:17px}.sidebar{width:74px;padding:22px 7px}.map-heading{padding:17px 16px 12px}h1 span{display:none}.map-legend{gap:10px;padding:0 16px 12px}.map-hint{display:none!important}.map-footer{padding:11px;font-size:8px}.map-footer>span:last-child{display:none}.map-stage{height:455px}.holding-cards{gap:6px}.holding-card{padding:10px;gap:6px}.holding-card .slot-icon{font-size:20px}.war-copy p{font-size:9px}}
@media(max-width:850px){.topbar{height:auto;min-height:105px;flex-wrap:wrap;padding:16px;gap:15px}.brand{flex:1}.profile{display:flex}.resources{order:3;flex-basis:100%;justify-content:space-between}.resource b{font-size:13px}.resource small{font-size:8px}.resource-symbol{font-size:17px}.shell{display:block}.sidebar{position:sticky;top:0;z-index:10;width:auto;flex-direction:row;padding:4px 10px;justify-content:space-around;gap:0;border-right:0;border-bottom:1px solid var(--line);background:#14251ff5;backdrop-filter:blur(8px)}.nav-item{padding:7px;width:60px;font-size:9px}.nav-item span{font-size:19px;margin-bottom:2px}.rail-bottom{display:none}main{padding:14px}.workspace{grid-template-columns:1fr}.detail-column{min-height:0}.panel{padding:20px}.map-stage{height:440px}.war-banner{padding:13px;gap:10px;flex-wrap:wrap;margin-bottom:14px}.war-emblem{font-size:30px}.war-copy{min-width:160px}.war-copy h2{font-size:13px}.war-time b{font-size:17px}.war-banner button{margin-left:auto;padding:8px 12px}.map-heading{padding:17px 16px 12px}.holding-card{min-height:78px}.holding-card b{font-size:10px}.holding-card small{font-size:8px}.map-footer{font-size:9px}.test-toolbar{gap:7px}.save-status{display:none}.castle-directory{margin-bottom:0}.hero-card{max-width:none}.castle-portrait{height:110px}.yield-grid{grid-template-columns:repeat(4,1fr)}.yield{padding:10px 8px;font-size:9px;gap:3px}.panel-intro{font-size:11px}.war-copy p{max-width:250px;line-height:1.7}.footnote{line-height:1.8}.war-banner .score-preview{font-size:9px;gap:9px}}
@media(max-width:1200px){.server-picker{display:flex;flex-shrink:0}}
@media(max-width:850px){.server-picker{order:2}.profile{display:none}.brand{min-width:190px}.server-picker #server{font-size:10px}}
@media(max-width:430px){.resources{gap:7px}.resource{gap:4px}.resource-symbol{font-size:16px;width:15px}.map-stage{height:345px}.map-live{font-size:8px}.map-note{left:13px;bottom:17px;font-size:8px}.map-note b{font-size:9px}.map-compass{left:14px;top:15px}.holding-card .slot-icon{display:none}.holding-card{padding:10px 7px}.yield-grid{grid-template-columns:repeat(2,1fr)}.war-time{margin-left:auto}.war-banner button{width:100%;margin-left:0}.brand-seal{width:38px;height:43px}.brand b{font-size:22px}.map-legend{font-size:8px;gap:10px}.map-heading .eyebrow{font-size:7px}.march-pill{font-size:8px}.march-status{right:10px;top:12px}.map-controls{right:10px;bottom:14px}.server-picker{margin-left:auto}}

#battle-result-dialog{max-width:480px;max-height:calc(100dvh - 32px);overflow:auto}.battle-win{color:#96dbb8}.battle-loss{color:#eeaa99}.battle-totals{display:flex;gap:20px;margin:20px 0;padding:14px;background:#ffffff06;border-radius:8px;font-size:12px}.battle-totals b{display:block;font-size:21px;margin-top:5px}.battle-table{width:100%;border-collapse:collapse;font-size:12px;margin:16px 0}.battle-table caption{text-align:left;color:var(--muted);margin-bottom:8px}.battle-table th,.battle-table td{padding:10px 5px;border-bottom:1px solid var(--line);text-align:right}.battle-table th:first-child{text-align:left}.battle-table thead{color:var(--muted)}

.growth-guide{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;margin:16px 0;background:#24392b;color:#e4e8de;border:1px solid #73976a66;border-radius:12px}.growth-guide b,.growth-guide small{display:block;margin-top:5px}.growth-guide small{color:#b1c5a8}.formation-inputs,.formation-selects{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}.formation-selects{grid-template-columns:1fr 1fr}.formation-inputs input,.formation-selects select{width:100%;min-width:0;padding:9px 5px;box-sizing:border-box;border:1px solid #81977366;border-radius:6px;background:#14291e;color:#e4e8de}.formation-inputs label,.formation-selects label{font-size:13px}.formation-inputs small{display:block;margin-top:3px}.recovery-panel{border-top:1px solid #cfd8c4;margin-top:20px;padding-top:14px}.recovery-panel p{font-size:13px;line-height:1.6}@media(max-width:600px){.growth-guide{align-items:stretch;flex-direction:column;padding:14px}.growth-guide button{align-self:flex-start}}

.hero-wallet{display:flex;justify-content:space-between;gap:12px;padding:12px;background:#ffffff08;border-radius:6px;font-size:12px}.hero-wallet b{color:#e1c990;margin-left:5px}.hero-tabs{display:flex;gap:6px;margin:16px 0}.hero-tabs button{flex:1;font-size:12px;padding:10px 4px}.hero-tabs [aria-pressed="true"]{background:#d4b87b;color:#283722}.hero-filter{margin-bottom:16px}.hero-effect{font-size:11px;line-height:1.8;padding-top:12px}.hero-metrics{display:flex;gap:10px;justify-content:space-between;margin:16px 0;font-size:17px}.hero-metrics small{display:block;font-size:10px;color:#9aab90;font-weight:400;margin-top:5px}.hero-stage-track{display:grid;grid-template-columns:repeat(10,1fr);gap:3px;margin-bottom:14px}.hero-stage-track span{text-align:center;border:1px solid #63765a55;padding:5px 0;font-size:9px;color:#7d8e74;border-radius:3px}.hero-stage-track .unlocked{background:#bdac6740;color:#eed69b;border-color:#bdac67}.hero-action-row{display:flex;gap:8px}.hero-action-row button{flex:1}.hero-event-card{border:1px solid #76876544;padding:14px;border-radius:7px;margin:14px 0}.hero-event-card h3{font-size:14px}.hero-event-card p{font-size:11px;line-height:1.9;margin:10px 0}.hero-event-card .field-label{margin-top:16px}.hero-event-card select{margin:0 0 8px}.hero-skills>.primary{margin-top:8px}

.lord-track{border-top:1px solid var(--line);padding-top:10px;margin-top:10px}.lord-track:first-of-type{border-top:0;margin-top:4px;padding-top:0}.lord-track p{margin:6px 0}

/* Approved storybook world: geography first, details on demand. */
.world-tools,.world-selection,#world-minimap,#world-detail-close{display:none}
.world-mode{background:#192b40;color:#eee3c9;--line:#b7c2d322;--muted:#a4b5c9;--gold:#e1bb72}
.world-mode .topbar{background:#1c2d42;border-color:#9bacbf25;height:72px}
.world-mode .brand b{color:#f1dfb6}.world-mode .brand-seal{color:#e1bf78;border-color:#b4996555;background:#243c55}
.world-mode .brand small,.world-mode .resource small,.world-mode .server-picker,.world-mode .profile small{color:#a4b6c8}
.world-mode .resource b{color:#f3e7c9}.world-mode .resource-symbol{color:#dabb7d}
.world-mode .sidebar{background:#1b2d42;border-color:#93a6b42b}.world-mode .nav-item{color:#b2c0cd}.world-mode .nav-item.active{color:#fae6b4;background:#314660;border-color:#bda57466}
.world-mode main{padding:14px;min-width:0}.world-mode .workspace{display:block;position:relative}
.world-mode .war-banner,.world-mode .growth-guide,.world-mode .holdings,.world-mode .footnote,.world-mode .map-legend,.world-mode .map-footer,.world-mode .map-note,.world-mode .castle-directory,.world-mode .rail-bottom{display:none}
.world-mode .map-card{background:#20344c;border:1px solid #acb8c333;border-radius:10px;overflow:hidden}
.world-mode .map-heading{height:62px;display:flex;gap:28px;padding:0 22px;background:#20344c;border-bottom:1px solid #d1b67866}
.world-mode #scene-eyebrow{display:none}.world-mode #scene-title{color:#f3e3b9;font-size:27px;letter-spacing:3px;white-space:nowrap}
.world-mode #scene-title:before{content:'✧';margin-right:14px;font-size:29px;color:#e7c580}
.world-mode .map-live{margin-left:auto;font-size:10px;color:#afbfcb}
.world-mode .world-tools{display:flex;align-self:stretch;align-items:center;gap:8px}
.world-mode .world-tools button{height:100%;border:0;border-radius:0;background:transparent;color:#c2ced7;padding:0 19px;font-size:13px;border-bottom:2px solid transparent}
.world-mode .world-tools button[aria-pressed=true]{color:#f3dfa9;border-bottom-color:#e4be72;background:#ffffff05}
.world-mode .world-tools button:hover{background:#ffffff0b}.world-mode #world-search-toggle{font-size:29px;padding:0 16px}
.world-mode .map-stage{height:calc(100dvh - 165px);min-height:480px;max-height:1100px;background:#64abc2}
.world-mode .map-compass{top:20px;left:25px;color:#243d51;text-shadow:0 1px 0 #fff5}.world-mode .map-compass span{font-size:44px}.world-mode .map-compass b{font-size:11px}
.world-mode .map-controls{right:18px;bottom:18px;gap:6px}.world-mode .map-controls button{width:34px;height:34px;background:#21364fed;border-color:#e1cc9277;color:#f5e6c4;border-radius:6px}
.world-mode #world-minimap{display:block;position:absolute;bottom:18px;right:64px;width:180px;height:117px;background:#397f9d;border:2px solid #e0cc97;border-radius:5px;box-shadow:0 5px 15px #1c334633;cursor:crosshair}
.world-mode .world-selection{display:flex;align-items:center;position:absolute;left:20px;bottom:20px;max-width:380px;min-width:310px;gap:8px;padding:12px 16px 12px 8px;border:1px solid #d9be80;border-radius:8px;background:#20344cf5;box-shadow:0 8px 20px #20344c38;color:#f4e6c8}
.world-mode #world-selection-art{flex:none;width:88px;height:96px;cursor:default}
.world-selection-copy{min-width:0;flex:1}.world-selection-title{display:flex;align-items:center;gap:10px}.world-selection-title b{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:200px}.world-selection-title>span{font-size:10px;white-space:nowrap;border:1px solid #d4b67866;color:#e3c892;padding:3px 5px;border-radius:4px}
.world-selection-metrics{display:flex;gap:16px;color:#ccd6dc;font-size:11px;margin:12px 0}.world-selection-metrics span{white-space:nowrap}
.world-selection-actions{display:flex;gap:7px}.world-selection-actions button{padding:9px 12px;font-size:12px;flex:1;white-space:nowrap}.world-mode .primary{background:#dfbf78;color:#28384b;border-color:#f0dca8}.world-mode .secondary{background:#293f59;color:#e5d9bd;border-color:#a6b7c744}
.world-reserved{display:block;color:#dcc393;font-size:10px;margin:0 0 8px}
.world-mode .detail-column{display:none;position:absolute;right:12px;top:76px;bottom:14px;width:350px;height:auto;min-height:0;max-height:calc(100% - 90px);background:#20334bef;border:1px solid #c4b18099;box-shadow:0 10px 40px #14243755;z-index:4;backdrop-filter:blur(12px);border-radius:8px}
.world-mode.world-detail-open .detail-column{display:flex;flex-direction:column}.world-mode #world-detail-close{display:block;flex-shrink:0;align-self:flex-end;border:0;background:none;color:#ecdbb3;font-size:12px;padding:12px 16px}.world-mode .panel-tabs{display:none}.world-mode .panel{overflow:auto;scrollbar-color:#617992 #20344c;padding:18px;color:#e4e3d6}.world-mode .panel-title{font-size:23px;color:#f2e4c2}.world-mode .panel-intro,.world-mode .small-note,.world-mode .field-label,.world-mode .owner-line,.world-mode .mini-heading,.world-mode .coordinate{color:#bac9d7}.world-mode .panel .castle-portrait{height:100px}.world-mode .panel .portrait-caption{display:none}.world-mode .panel select,.world-mode .panel input{background:#192c42;color:#ecdfc5;border-color:#8498ac55}
.world-mode .world-search{position:absolute;top:14px;right:18px;width:290px;max-width:calc(100% - 36px);padding:16px;background:#20344cf5;border:1px solid #cbb47e;border-radius:8px;z-index:5;box-shadow:0 8px 25px #21334233}
.world-search label{display:block;margin-bottom:8px;color:#e7d6af;font-size:12px}.world-search input{width:100%;padding:10px;background:#f5edda;color:#263c50;border:1px solid #c7b17a;border-radius:5px;font-size:13px}.world-search #world-search-results{max-height:280px;overflow:auto;margin-top:8px}.world-search #world-search-results button{width:100%;display:flex;justify-content:space-between;gap:8px;background:transparent;border:0;border-bottom:1px solid #d4c69d20;color:#f0e3c7;border-radius:0;padding:11px 4px;font-size:12px;text-align:left}.world-search small{color:#a1b3c7}.world-search p{font-size:12px;padding:10px;color:#a1b3c7}
.world-mode .march-status{right:20px;top:18px;max-width:280px;pointer-events:none}.world-mode .march-pill{background:#20344ce8;color:#eddfb9;border-color:#d1bc7a66}.world-mode .test-toolbar{margin-top:6px;padding-top:6px}.world-mode button:focus-visible,.world-mode canvas:focus-visible{outline:2px solid #ffe2a0;outline-offset:-3px}
@media(max-width:1100px){.world-mode .map-live{display:none}.world-mode .map-heading{gap:14px}.world-mode .world-tools button{padding:0 13px}}
@media(max-width:850px){.world-mode main{padding:8px}.world-mode .topbar{height:auto;min-height:100px}.world-mode .sidebar{background:#1b2d42;overflow-x:auto;justify-content:flex-start;gap:8px}.world-mode .nav-item{min-width:50px}.world-mode .map-heading{height:53px;padding:0 12px;gap:12px}.world-mode #scene-title{font-size:21px;letter-spacing:1px}.world-mode #scene-title:before{display:none}.world-mode .world-tools{flex:1;justify-content:flex-end;gap:0}.world-mode .world-tools button{padding:0 10px;font-size:11px}.world-mode .map-stage{height:calc(100dvh - 238px);min-height:430px}.world-mode .world-selection{left:10px;bottom:12px;min-width:0;max-width:calc(100% - 66px);padding:9px;gap:4px}.world-mode #world-selection-art{width:58px;height:70px}.world-selection-title b{font-size:14px;max-width:150px}.world-selection-metrics{font-size:10px;gap:10px;margin:8px 0}.world-selection-actions button{font-size:11px;padding:8px}.world-mode #world-minimap{width:105px;height:68px;top:12px;right:12px;bottom:auto}.world-mode .map-controls{right:12px;bottom:12px}.world-mode .map-controls button{width:32px;height:32px}.world-mode .detail-column{top:65px;right:8px;bottom:8px;width:min(350px,calc(100% - 16px));max-height:calc(100% - 73px)}.world-mode .march-status{top:88px;right:12px;max-width:200px}.world-mode #world-search-toggle{font-size:25px;padding:0 8px}.world-mode .world-search{right:12px;top:12px}.world-mode .map-compass{left:15px;top:15px}}
@media(prefers-reduced-motion:reduce){.world-mode *{scroll-behavior:auto}}
.world-search{display:none}.world-mode .world-search{display:block}
.holding-card.claim{border-color:#d7bb7c88;background:#b49a5014}.holding-card.claim .slot-icon{color:var(--gold)}.claim-option{border:1px solid var(--line);border-radius:7px;padding:12px;margin:10px 0;background:#ffffff03}.claim-option.better{border-color:#80bfa055}.claim-option-head{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;margin-bottom:6px}.claim-option-head b{font-weight:500}.claim-option>small{display:block;font-size:9px;line-height:1.8}.claim-rates{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:9px 0}.claim-rates span{font-size:9px;color:#95a68e;background:#ffffff04;border-radius:4px;padding:6px 4px;text-align:center}.claim-rates b{display:block;font-size:11px;color:#d8dfcd;font-weight:500;margin:3px 0}.claim-rates small{font-size:8px}.up{color:#8ed3b0}.down{color:#d7a194}
#rally-dialog{max-width:520px;max-height:calc(100dvh - 32px);overflow:auto}.rally-table td,.rally-table th{vertical-align:top;font-size:11px}.rally-table small{font-size:9px}.march-status .rally-pill{pointer-events:auto;text-align:left;cursor:pointer}.rally-pill.call{border-color:#e0b765;color:#f1dca6;background:#4a3a1fe8;animation:rally-call 1.6s ease-in-out infinite}@keyframes rally-call{50%{box-shadow:0 0 0 3px #e0b76533}}@media(prefers-reduced-motion:reduce){.rally-pill.call{animation:none}}#rally-dialog .formation-inputs input,#rally-dialog .formation-selects select{background:#14291e;color:#e4e8de;border-color:#81977366}#rally-dialog label{color:#c9d3bf}
/* Narrow phones (360px): four resource totals do not fit on one line and widened the whole page, so they wrap into two rows. */
@media(max-width:400px){.resources{flex-wrap:wrap;row-gap:8px}.resource{flex:0 0 calc(50% - 4px);min-width:0}}
/* Phones: the main menu is a bottom tab bar, within thumb reach and clear of the city map; the page reserves room for it. */
@media(max-width:850px){.sidebar{position:fixed;top:auto;bottom:0;left:0;right:0;z-index:30;border-bottom:0;border-top:1px solid var(--line);padding:3px 4px calc(3px + env(safe-area-inset-bottom));box-shadow:0 -6px 18px #00000026}.world-mode .sidebar{overflow-x:visible;justify-content:space-around;gap:0}.world-mode .map-stage{height:calc(100dvh - 290px);min-height:400px}.shell>.sidebar .nav-item{flex:1 1 0;min-width:0;width:auto;height:50px;padding:4px 1px;display:flex;flex-direction:column;align-items:center;justify-content:center;white-space:nowrap;overflow:hidden;letter-spacing:-.2px;line-height:1.2}.shell>.sidebar .nav-item span{font-size:18px;line-height:1;margin-bottom:4px}body{padding-bottom:calc(57px + env(safe-area-inset-bottom))}.toast{bottom:calc(72px + env(safe-area-inset-bottom))}}
@media(max-width:400px){.world-mode .map-stage{height:calc(100dvh - 330px)}}
.guide-actions{display:flex;gap:8px;flex-wrap:wrap}.guide-actions button{white-space:nowrap}
[data-tab="quests"].has-reward{position:relative}[data-tab="quests"].has-reward:after{content:"";position:absolute;top:8px;right:4px;width:7px;height:7px;border-radius:50%;background:#e0784f}
.quest-meter{position:relative;height:8px;border-radius:4px;background:#ffffff12;margin:8px 0 30px}.quest-meter>i{position:absolute;inset:0 auto 0 0;border-radius:4px;background:#d4b87b;max-width:100%}.quest-mark{position:absolute;top:13px;transform:translateX(-50%);font-size:9px;color:#8ca181}.quest-mark:last-child{transform:translateX(-100%)}.quest-mark.reached{color:#e1c990;font-weight:700}
.quest-list{display:flex;flex-direction:column;gap:6px}.quest-row{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #ffffff0d;border-radius:6px}.quest-row.done{opacity:.62}.quest-check{flex:none;width:20px;height:20px;border-radius:50%;border:1px solid #8ca18166;display:grid;place-items:center;font-size:11px;color:#283722}.quest-row.done .quest-check{background:#80bfa0;border-color:#80bfa0}.quest-copy{flex:1;min-width:0}.quest-copy b{display:block;font-size:11px;font-weight:600}.quest-copy small{display:block;font-size:9px;line-height:1.6;margin-top:3px}.quest-points{font-size:11px;color:#e1c990;font-variant-numeric:tabular-nums}.quest-state{font-size:9px;color:#8ca181}.quest-row .text-button{white-space:nowrap}
.city-mode .quest-meter{background:#d9d3bd}.city-mode .quest-meter>i{background:#168674}.city-mode .quest-row{border-color:#ddd2b7;background:#fff9eb}.city-mode .quest-points,.city-mode .quest-mark.reached{color:#93783c}
.week-strip{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin:10px 0 4px}.week-day{text-align:center;border:1px solid #ffffff12;border-radius:5px;padding:6px 0;min-height:44px}.week-day b{display:block;font-size:11px;font-weight:600}.week-day small{display:block;font-size:9px;margin-top:3px;min-height:12px}.week-day.done{background:#80bfa030;border-color:#80bfa0}.week-day.done small{color:#80bfa0;font-weight:700}.week-day.today{border-color:#d4b87b}.week-day.today small{color:#e1c990}.week-day.missed{opacity:.5}.week-day.upcoming{opacity:.7}
.city-mode .week-day{border-color:#ddd2b7;background:#fff9eb}.city-mode .week-day.done{background:#d2e6cd;border-color:#97bc91}.city-mode .week-day.done small{color:#296c50}.city-mode .week-day.today{border-color:#b89a58}.city-mode .week-day.today small{color:#93783c}
/* Jade (paid currency) chip and instant-finish button — docs/SHOP.md */
.jade{display:flex;align-items:center}.jade-chip{display:flex;align-items:center;gap:8px;padding:5px 8px 5px 10px;border:1px solid #5fc7a355;border-radius:999px;background:#5fc7a314;color:inherit;text-decoration:none;white-space:nowrap}.jade-chip:hover{border-color:#5fc7a3aa;background:#5fc7a322}.jade-symbol{color:#5fc7a3;font-size:15px}.jade-chip b{display:block;font-size:14px;line-height:1.1}.jade-chip small{display:block;font-size:9px;color:var(--muted)}.jade-plus{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#5fc7a3;color:#10261d;font-size:12px;font-weight:700}
.jade-finish{margin-top:8px;padding:9px 12px;border:1px solid #5fc7a399;border-radius:7px;background:#5fc7a31f;color:inherit;font-weight:700;cursor:pointer}.jade-finish.full{width:100%}.jade-finish:hover{background:#5fc7a333}.jade-finish.short{border-style:dashed;font-weight:600;opacity:.9}
.city-mode .jade-chip{border-color:#2f8d6e55;background:#2f8d6e12}.city-mode .jade-symbol{color:#2f8d6e}.city-mode .jade-plus{background:#2f8d6e;color:#fff}.city-mode .jade-finish{border-color:#2f8d6e88;background:#2f8d6e14;color:#1f5b47}.city-mode .jade-finish:hover{background:#2f8d6e26}
@media(max-width:850px){.jade{order:2}.jade-chip small{display:none}}
body{-webkit-user-select:none;user-select:none}input,textarea,[contenteditable]:not([contenteditable=false]){-webkit-user-select:text;user-select:text}
html:has(body.world-mode){scrollbar-width:none}html:has(body.world-mode)::-webkit-scrollbar{display:none}
@media(min-width:851px){html:has(body.world-mode),body.world-mode{overflow:hidden}.world-mode .shell{height:calc(100dvh - 72px);min-height:0}.world-mode .sidebar{overflow-y:auto;scrollbar-width:none}.world-mode .sidebar::-webkit-scrollbar{display:none}.world-mode main{overflow:hidden}}
#sound-toggle{flex-shrink:0;padding:7px 9px;border:1px solid #829c8066;border-radius:6px;background:transparent;color:inherit;font:inherit;font-size:11px;white-space:nowrap;cursor:pointer}#sound-toggle[aria-pressed="false"]{opacity:.65}#sound-toggle:focus-visible{outline:2px solid #e0b765;outline-offset:3px}
.broadcast{position:sticky;top:0;z-index:35;background:#2c3a26;border-bottom:1px solid #b9984e55;color:#e7e3c8;font-size:12px;line-height:1.7;padding:8px 16px}.broadcast.shutdown{background:#5a3521;border-color:#d08b5f88}.broadcast-line{display:flex;align-items:baseline;gap:10px;max-width:1200px;margin:0 auto}.broadcast-line+.broadcast-line{margin-top:4px}.broadcast-tag{flex-shrink:0;font-size:10px;font-weight:700;color:var(--gold);border:1px solid #d7bb7c55;border-radius:4px;padding:1px 6px}.broadcast.shutdown .broadcast-line:first-child .broadcast-tag{color:#ffc9a3;border-color:#ffc9a366}.broadcast-copy{flex:1;min-width:0;overflow-wrap:anywhere;white-space:pre-line}.broadcast-line b{font-variant-numeric:tabular-nums;color:#fff}.broadcast-close{flex-shrink:0;border:0;background:none;padding:0 4px;font-size:16px;line-height:1;color:#c8c3a4}
.formation-sliders{display:grid;gap:6px;margin:14px 0}
.troop-slider{display:grid;grid-template-columns:4.2em minmax(0,1fr) 4.8em;align-items:center;gap:10px}
.troop-slider-name{font-size:13px;line-height:1.2}.troop-slider-name small{display:block;margin-top:2px;opacity:.75;font-size:11px}
.troop-slider .quantity-slider{height:30px;margin:0}
.troop-slider input[type=number]{width:100%;min-width:0;padding:8px 6px;box-sizing:border-box;border:1px solid #81977366;border-radius:6px;background:#14291e;color:#e4e8de;text-align:right;font-variant-numeric:tabular-nums}
.city-mode .troop-slider input[type=number]{background:#f7f2e3;color:#334b38;border-color:#b9c9a9}
