:root{color-scheme:light;--ink:#3f382b;--muted:#746b58;--gold:#bb9250;--cream:#efe6d1;--green:#2f4537;--red:#8b3b32;--line:#c8b891;--paper:#f2ead9;font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink);font-size:14px;background:#233027}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.48;cursor:default}button,a,input,select,textarea{touch-action:manipulation}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #669890;outline-offset:2px}h1,h2,h3,.serif{font-family:Georgia,'Times New Roman',serif;font-weight:500}h1,h2,h3,p{margin:0 0 10px}h1{font-size:32px}h2{font-size:23px}h3{font-size:19px}small,.muted{color:var(--muted)}small{font-size:12px}svg.icon{width:21px;height:21px;vertical-align:middle;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.app-shell{max-width:1500px;margin:auto;background:var(--cream);min-height:100dvh}.topbar{display:flex;align-items:center;gap:12px;padding:9px 16px;background:linear-gradient(110deg,#26372b,#374335 70%,#243025);border-bottom:1px solid #b8995f;color:#eee0bd;min-height:65px}.brand{display:flex;align-items:center;gap:9px;margin-right:auto}.brand .serif{font-size:23px;letter-spacing:.4px}.eyebrow{text-transform:uppercase;font-size:10px;letter-spacing:1.8px;color:#b3bf9d;margin-top:3px}.crest{width:38px;height:44px;display:inline-grid;place-content:center;color:#e7c270;clip-path:polygon(0 0,100% 0,95% 72%,50% 100%,5% 72%);background:linear-gradient(145deg,#873b31,#3f251e);border-top:2px solid #dbc080}.crest svg{width:26px;height:26px}.city-picker{background:#ede3cc;color:#3b362a;border:1px solid #bd9c62;border-radius:5px;max-width:180px;padding:8px}.topbar .ghost{color:#eed9ac;border-color:#8f865f}.resourcebar{display:flex;gap:0;background:linear-gradient(#f6eeda,#e5d5b3);border-bottom:1px solid #b49b70;padding:9px 14px}.resource{display:flex;align-items:center;gap:7px;flex:1;min-width:0;padding:0 10px;border-right:1px solid #cdbc98}.resource:last-child{border:0}.resource .icon{color:#8d703f}.resource b{display:block;font-size:15px;font-weight:650;font-variant-numeric:tabular-nums}.resource small{display:block;font-size:10px;white-space:nowrap}.page-wrap{padding:20px 24px 100px;background:radial-gradient(ellipse at top,#faf4e7,transparent 70%),var(--cream);min-height:calc(100dvh - 120px)}.page-title{display:flex;align-items:center;gap:12px;margin-bottom:16px}.page-title h1{margin:0;font-size:29px}.page-title p{margin:4px 0 0}.page-title .actions{margin-left:auto}.badge{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line);padding:4px 8px;font-size:11px;border-radius:30px;background:#f4eddc;white-space:nowrap}.badge.green{color:#315540;background:#e5eddc;border-color:#adbca0}.badge.red{color:#8c3e34;background:#f3e0d4;border-color:#cfada1}.badge.gold{background:#f0dfb5;border-color:#b99b61;color:#795526}.flex{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.between{justify-content:space-between}.actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.button,.ghost,.primary,.danger{border:1px solid #b8a078;padding:9px 13px;border-radius:5px;background:linear-gradient(#fbf6e9,#e4d5b7);color:#51432e;min-height:38px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:6px}.primary{background:linear-gradient(#48644e,#2c4335);color:#fff0d5;border-color:#243d2d;box-shadow:0 2px 3px #18281d18}.ghost{background:transparent;color:var(--muted);box-shadow:none}.danger{background:#8d4038;color:#fbeddf;border-color:#72392f}.small{padding:6px 9px;min-height:32px;font-size:12px}.square{width:36px;height:36px;padding:6px}.paper{background:linear-gradient(120deg,#faf4e5,#eee2c9);border:1px solid var(--line);border-radius:7px;box-shadow:0 4px 16px #59472d0a;padding:17px}.paper + .paper{margin-top:12px}.grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}.cols{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px}.stack{display:grid;gap:12px}.section-label{font-size:11px;letter-spacing:1.6px;text-transform:uppercase;color:#887047;margin-bottom:10px;font-weight:700}.toolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:15px}.toolbar button.active{background:#354c3a;color:#f5e6c7;border-color:#354c3a}.city-page{padding-top:13px}.city-status{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding-bottom:13px}.city-status h1{font-size:24px;margin:0;margin-right:auto}.city-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px}.scene{position:relative;border:1px solid #a38857;border-radius:8px;overflow:hidden;background:#66744c;box-shadow:0 8px 24px #3c35282b}.scene canvas{display:block;width:100%;height:530px;touch-action:none;cursor:grab}.scene canvas:active{cursor:grabbing}.scene .scene-tag{position:absolute;left:12px;top:12px;pointer-events:none;max-width:calc(100% - 65px);background:#263229df;color:#ecdcb9;padding:7px 11px;border:1px solid #b7a46d;border-radius:5px;font:14px Georgia}.scene .scene-help{position:absolute;bottom:12px;left:12px;background:#243226d9;color:#e3d7b7;border:1px solid #879569;padding:6px 9px;font-size:11px;border-radius:4px;pointer-events:none}.scene-controls{position:absolute;right:12px;top:12px;display:flex;flex-direction:column;gap:6px}.scene-controls button{background:#f6edda;box-shadow:0 2px 5px #0003}.building-select{font-size:13px;width:100%;padding:9px;background:#f4edda;border:1px solid #bfae89;border-radius:4px;margin-bottom:12px}.preview{height:115px;position:relative;margin-top:-5px;margin-bottom:8px;display:grid;place-items:center;background:radial-gradient(ellipse,#bbae8645,transparent 65%)}.preview canvas{width:200px;height:135px}.cost{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0;font-size:12px;font-variant-numeric:tabular-nums}.cost span{display:inline-flex;align-items:center;gap:3px}.cost .icon{width:15px;height:15px;color:#8f754b}.cost .missing{color:#9d3730}.statgrid{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid #d4c39e;border-radius:5px;margin:12px 0;background:#f8f0df}.statgrid div{padding:8px;text-align:center;border-right:1px solid #d4c39e}.statgrid div:last-child{border:0}.statgrid b{display:block;font-size:18px;color:#5c573a}.statgrid small{font-size:10px}.progress{height:6px;border-radius:8px;background:#d8c9a9;overflow:hidden;margin:8px 0}.progress i{display:block;height:100%;background:linear-gradient(90deg,#6d8055,#9aaa6b);border-radius:8px}.queue-row{display:flex;align-items:center;gap:9px;padding:10px 0;border-bottom:1px solid #dbccad;font-size:12px}.queue-row:last-child{border:0}.queue-row .number{width:24px;height:24px;display:grid;place-items:center;border:1px solid #b7a47b;border-radius:50%;flex-shrink:0}.queue-row strong{display:block}.queue-row small{display:block;margin-top:3px}.queue-row .actions{margin-left:auto}.town-links{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:13px 0}.town-links button{padding:10px 5px;display:flex;flex-direction:column;font-size:12px;gap:6px}.notice{padding:11px 13px;border:1px solid #c9b88d;border-radius:5px;background:#f2e7cc;font-size:12px;line-height:1.55;margin-bottom:13px}.notice.green{background:#e9eddd;border-color:#aeb996}.notice.red{background:#f1ded0;border-color:#c5a088}.list-row{display:flex;gap:12px;align-items:center;border-bottom:1px solid #ddcdae;padding:12px 0}.list-row:last-child{border:0}.list-row .right{margin-left:auto;text-align:right}.list-row h3{margin:0 0 3px;font-size:17px}.list-row p{margin:0;font-size:12px}.unit-emblem{width:49px;height:54px;border:1px solid #bba777;border-radius:6px;display:grid;place-items:center;color:#6d7654;background:linear-gradient(135deg,#f2e6c7,#dfd2b5);flex-shrink:0}.unit-emblem .icon{width:31px;height:31px}.unit-card{display:grid;grid-template-columns:55px 1fr;gap:12px;align-items:start}.unit-card h3{margin:0 0 5px}.unit-card.locked{opacity:.7}.unit-card .wide{grid-column:1/-1}.unit-card form{display:flex;gap:8px;margin-top:8px}.unit-card input{width:80px}.unit-card .cost{margin:6px 0}.tech-card{border-top:3px solid #b7a069}.tech-card.done{border-top-color:#657b50;background:#eaf0df}.tech-card.suggested{box-shadow:0 0 0 2px #b18d49}.tech-card h3{font-size:18px;min-height:25px}.tech-card .badge{float:right}.tech-card p{font-size:13px}.tech-card .requirement{font-size:11px;min-height:32px;color:#827559;margin:10px 0}.tech-card .actions{justify-content:space-between;margin-top:8px}.portrait{width:70px;height:83px;border:1px solid #b7a078;background:linear-gradient(120deg,#a5a38b,#47564b);border-radius:6px;display:grid;place-items:center;color:#e4d4aa;box-shadow:inset 0 0 20px #1a271b50;position:relative;overflow:hidden;flex-shrink:0}.portrait .icon{width:55px;height:55px}.portrait:after{content:'';position:absolute;inset:4px;border:1px solid #d9c89f70;border-radius:3px}.commander-head{display:flex;gap:14px;align-items:center;margin-bottom:12px}.commander-head h3{margin:0 0 6px}.commander-head .bonus{font:27px Georgia;color:#816735}.map-layout{display:grid;grid-template-columns:minmax(0,1fr) 315px;gap:16px}.map-scene canvas{height:610px}.map-search{display:flex;gap:7px;margin-bottom:12px}.map-search input{width:100%;min-width:0}.target-list{max-height:280px;overflow:auto}.target-list button{width:100%;border:0;border-bottom:1px solid #d5c4a1;background:transparent;text-align:left;padding:9px 0;color:var(--ink);display:flex;justify-content:space-between;gap:10px}.target-list button:hover{color:#a07e3e}.map-coords{font-variant-numeric:tabular-nums;font-size:12px;color:#7a704f}.nav-bottom{position:fixed;z-index:20;bottom:0;left:0;right:0;max-width:1500px;margin:auto;display:grid;grid-template-columns:repeat(5,1fr);background:linear-gradient(#334637,#233327);border-top:2px solid #b39455;padding:5px 8px max(5px,env(safe-area-inset-bottom));box-shadow:0 -4px 15px #2c352327}.nav-bottom button{position:relative;display:flex;align-items:center;flex-direction:column;gap:3px;border:0;background:none;color:#b7bea8;font-size:11px;padding:7px;min-height:51px}.nav-bottom button.active{color:#f0d39a;background:#75816723;border-radius:5px}.nav-bottom .icon{width:23px;height:23px}.nav-bottom .dot{background:#b8533e;color:white;font-size:9px;position:absolute;top:1px;left:55%;min-width:14px;height:14px;border-radius:9px}.premium-card{border-top:3px solid #b48f42}.premium-card .price{font:30px Georgia;color:#8a692f}.coin-packs{display:flex;gap:10px;flex-wrap:wrap}.coin-pack{flex:1;min-width:120px;text-align:center}.coin-pack b{display:block;font:22px Georgia;margin:10px 0}.coin-pack .button{width:100%}.premium-icon{width:42px;height:42px;border-radius:50%;background:#e5d5ad;display:grid;place-items:center;color:#8c7347;margin-bottom:12px}.empty{padding:25px 15px;text-align:center;color:#87775a;border:1px dashed #c3b18a;border-radius:6px;font-size:13px}.report{width:100%;background:transparent;border:0;border-bottom:1px solid #d2c19e;display:flex;gap:12px;padding:14px 0;text-align:left;color:var(--ink)}.report .icon{color:#9e8045}.report strong{display:block;margin-bottom:4px}.report small{display:block}.report time{margin-left:auto;color:#8b7f64;font-size:11px;white-space:nowrap}.battle-result{padding:18px;border:1px solid #b3bf97;background:#e5ead7;border-radius:5px;text-align:center;margin:12px 0}.battle-result.loss{background:#f1ddd0;border-color:#c49f90}.battle-result h2{margin:0 0 8px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:12px}th,td{padding:8px 7px;text-align:left;border-bottom:1px solid #d1c29f}th{color:#7d6b46;background:#e7dabc}table input{width:75px;min-height:32px;padding:5px}label.field{display:flex;flex-direction:column;gap:6px;font-size:12px;margin-bottom:12px;color:#766749}input,select,textarea{background:#fdf9ee;color:#40392d;border:1px solid #bcab83;border-radius:4px;padding:9px 10px;min-height:38px;max-width:100%}textarea{resize:vertical;width:100%;min-height:70px}form .form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.welcome{min-height:100dvh;background:linear-gradient(90deg,#19251bf0,#26352680),url('assets/city-ground.png') center/cover;color:#f7e8c6;display:grid;grid-template-columns:1fr 460px;gap:50px;align-items:center;padding:50px 8%;max-width:1500px;margin:auto}.welcome .intro h1{font-size:64px;line-height:1.07;margin:15px 0;max-width:450px}.welcome .intro p{max-width:440px;font-size:16px;line-height:1.7;color:#d3d7bd}.welcome .intro .eyebrow{font-size:12px;letter-spacing:3px}.welcome .intro .crest{width:65px;height:78px}.welcome .intro .crest svg{width:45px;height:45px}.welcome .paper{color:var(--ink);padding:25px;border-color:#c1a56d;background:linear-gradient(145deg,#f5ead2f5,#e8dabcfa);box-shadow:0 18px 70px #0c1b0bbb}.faction-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:18px}.faction-option{border:1px solid #beae88;border-radius:5px;padding:11px 6px;text-align:center;cursor:pointer;font-size:11px;background:#efe4ca;position:relative}.faction-option input{position:absolute;opacity:0;width:1px;height:1px}.faction-option:has(input:checked){border:2px solid #8b6938;padding:10px 5px;background:#fbf0d3;box-shadow:0 0 0 2px #b4975530}.faction-option .crest{display:grid;margin:0 auto 9px;width:33px;height:39px}.faction-option span{display:block;line-height:1.35}.welcome .primary{width:100%;margin-bottom:8px}.welcome .legal{font-size:11px;line-height:1.6;color:#847458;margin:14px 0 0}.welcome .divider{border-top:1px solid #c9b58e;margin:16px 0;padding-top:15px}.checkbox{display:flex;gap:9px;align-items:center;font-size:12px;margin:10px 0}.checkbox input{min-height:0;width:16px;height:16px}dialog{color:var(--ink);background:linear-gradient(120deg,#faf3e4,#ede0c5);border:1px solid #b99c60;border-radius:9px;padding:0;width:min(650px,calc(100% - 24px));max-height:88dvh;box-shadow:0 18px 90px #0006}dialog::backdrop{background:#111e18b3;backdrop-filter:blur(3px)}.dialog-head{display:flex;align-items:center;gap:14px;padding:15px 19px;border-bottom:1px solid #c9b58b;background:#e8d8b5;position:sticky;top:0;z-index:2}.dialog-head h2{margin:0;font-size:22px;flex:1}.dialog-body{padding:18px 20px;overflow:auto}.dialog-body .grid{grid-template-columns:1fr 1fr;gap:9px}.dialog-body .paper{padding:12px}.army-picker{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:12px 0}.army-picker label{display:flex;align-items:center;gap:6px;border:1px solid #d2bf95;padding:7px;border-radius:4px;font-size:11px}.army-picker input{width:68px;margin-left:auto;min-height:32px;padding:5px}.army-picker .icon{width:17px;height:17px}#toast{position:fixed;bottom:88px;left:50%;transform:translateX(-50%);background:#2d4636f5;border:1px solid #bda36a;color:#ffefd0;padding:12px 19px;border-radius:7px;box-shadow:0 7px 20px #0003;z-index:100;max-width:90%;width:max-content;display:none;font-size:13px}#toast.visible{display:block}#toast.error{background:#7b3c33f5}.key-number{font-family:Georgia;font-size:36px;line-height:1;color:#64764e}.callout{padding:16px;border-left:3px solid #997c43;background:#e6d7b83d;margin:14px 0}.quests-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:12px}.active-threat{border-left:4px solid #ad4536;padding-left:14px}.compact-form{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.compact-form .field{margin:0;flex:1;min-width:100px}.version{font-size:10px;color:#8a7c5d}.scroll-pad{padding-bottom:10px}.attack-summary{font-size:12px;background:#e6dcbe;padding:10px;border-radius:5px;margin:9px 0}.mobile-only{display:none}
@media(min-width:1100px){.nav-bottom{left:0;right:0;max-width:680px;border-radius:9px 9px 0 0}.city-page .town-links{grid-template-columns:repeat(8,1fr)}}
@media(max-width:900px){.welcome{grid-template-columns:1fr;gap:25px;padding:35px 20px}.welcome .intro{max-width:460px;margin:auto}.welcome .intro h1{font-size:42px}.welcome .intro p{font-size:13px;margin-bottom:0}.welcome .intro .crest{display:none}.welcome .paper{max-width:460px;margin:auto;width:100%}.city-layout,.map-layout,.cols{grid-template-columns:1fr}.city-layout{gap:12px}.scene canvas{height:460px}.map-scene canvas{height:490px}.city-layout .stack{grid-template-columns:1fr 1fr;align-items:start}.city-layout .stack .paper+.paper{margin-top:0}.page-wrap{padding:14px 14px 90px}.resource{padding:0 6px;gap:5px}.resource .icon{width:17px;height:17px}.resource b{font-size:13px}.topbar{padding:9px 12px}.brand .serif{font-size:21px}.city-picker{max-width:160px}.map-layout .target-list{max-height:190px}.page-title h1{font-size:25px}}
@media(max-width:520px){.topbar{gap:7px}.brand{gap:7px}.brand .serif{font-size:18px}.brand .eyebrow{font-size:8px;letter-spacing:1.4px}.crest{width:30px;height:37px}.city-picker{max-width:118px;padding:7px 5px;font-size:11px}.resourcebar{flex-wrap:wrap;padding:6px 6px;row-gap:8px}.resource{flex:0 0 33.333%;padding:1px 9px;gap:7px}.resource:nth-child(3){border:0}.resource:nth-child(6){border:0}.resource b{font-size:13px}.resource small{font-size:9px}.page-wrap{padding:12px 10px 90px}.city-status h1{font-size:22px}.city-status{gap:7px}.city-status .badge{font-size:10px;padding:4px 7px}.scene canvas{height:420px}.city-layout .stack{grid-template-columns:1fr}.map-scene canvas{height:435px}.scene .scene-tag{font-size:12px}.scene .scene-help{font-size:10px;bottom:9px;left:9px}.town-links{grid-template-columns:repeat(4,1fr);gap:6px}.town-links button{font-size:10px;padding:8px 3px;min-height:58px}.paper{padding:14px}.page-title{flex-wrap:wrap;gap:7px}.page-title .actions{margin-left:0}.page-title p{font-size:12px}.grid{grid-template-columns:1fr}.coin-packs{gap:8px}.coin-pack{min-width:calc(33.33% - 8px);padding:10px}.dialog-body{padding:14px}.dialog-body .grid{grid-template-columns:1fr}.army-picker{gap:6px}.army-picker label{font-size:10px;padding:6px}.army-picker input{width:54px}.welcome{padding:25px 16px}.welcome .paper{padding:20px}.welcome .intro h1{font-size:39px}.welcome .intro .eyebrow{font-size:10px}.welcome .intro p{font-size:12px}.scene-controls{right:9px;top:9px}.scene-controls .square{width:32px;height:32px}.statgrid small{font-size:10px}.nav-bottom{padding-left:3px;padding-right:3px}.nav-bottom button{font-size:10px;gap:4px}.desktop-only{display:none}.mobile-only{display:inline}.report time{font-size:10px}.portrait{width:59px;height:75px}.compact-form .field{flex-basis:40%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

.statgrid div:nth-child(3) b{font-size:14px;line-height:1.4}.statgrid{min-height:69px}.statgrid div{display:flex;flex-direction:column;justify-content:center}

.brand{min-width:0}.brand .eyebrow{overflow-wrap:anywhere}

/* Illustrated medieval troops: one shared atlas for fourteen unit types. */
.unit-portrait{display:inline-block;width:88px;height:88px;flex:0 0 auto;vertical-align:middle;border:1px solid #a4874f;border-radius:7px;background-color:#342d1e;background-size:400% 400%;background-position:var(--portrait-x) var(--portrait-y);background-repeat:no-repeat;box-shadow:inset 0 0 0 1px #dfc18655,0 3px 8px #30271825;overflow:hidden}
.unit-portrait.small{width:44px;height:44px;border-radius:5px}.unit-portrait.compact{width:32px;height:32px;border-radius:4px}
.unit-card{grid-template-columns:88px minmax(0,1fr)}.unit-card>div:not(.wide){min-width:0}.unit-card h3{overflow-wrap:break-word}.unit-card.locked{opacity:1}.unit-card.locked>.wide{opacity:.72}.list-row>.unit-portrait{width:56px;height:56px}.list-row>div:not(.right){min-width:0}.list-row .right{flex-shrink:0}
.army-roster{display:inline-flex;flex-wrap:wrap;gap:7px;max-width:100%;margin:4px 0}.army-unit{display:inline-flex;gap:6px;align-items:center;max-width:100%;font-size:11px;padding:3px 7px 3px 3px;background:#e9ddc733;border:1px solid #d3c2a2;border-radius:5px}.army-unit>span:last-child{min-width:0;overflow-wrap:break-word}.table-unit{display:inline-flex;align-items:center;gap:7px}.army-picker label>span:not(.unit-portrait){min-width:0;flex:1;overflow-wrap:break-word}.army-picker input{flex-shrink:0}
@media(max-width:600px){.army-picker{grid-template-columns:1fr}.army-picker label{font-size:12px;padding:8px;gap:9px}.army-picker input{width:68px}.army-picker .unit-portrait{width:48px;height:48px}.unit-card{grid-template-columns:82px minmax(0,1fr);gap:11px}.unit-card>.unit-portrait{width:82px;height:82px}}

/* Building progression */
.building-requirements{display:flex;flex-direction:column;gap:6px;padding:12px 0;font-size:12px;line-height:1.5}.building-requirements strong{color:#79623b}.building-requirements span{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.building-requirements .icon{width:15px;height:15px;flex-shrink:0}.building-requirements .met{color:#506a40}.building-requirements .unmet{color:#984734}.building-requirements small{font-size:10px;color:#8a7856}.building-effect{font-size:12px;margin-top:12px}.building-blocked{font-size:11px;line-height:1.5}.level-overview{width:100%;margin-top:10px;justify-content:center}.building-level-table{min-width:750px;font-variant-numeric:tabular-nums}.building-level-table td{white-space:nowrap}.building-level-table td:last-child{white-space:normal;min-width:175px}.building-level-table .current-level{background:#e1e8d0;font-weight:700}.dialog-body .table-wrap{max-height:60dvh;overflow:auto}.building-level-table thead{position:sticky;top:0;z-index:1}.table-wrap:focus-visible{outline:2px solid #856a38;outline-offset:2px}

dialog:has(.building-level-table){width:min(1100px,calc(100vw - 32px));max-width:1100px}.building-table-hint{font-size:11px;line-height:1.4}

/* City-local research economy */
.research-requirements{display:flex;flex-direction:column;gap:5px;font-size:11px;line-height:1.45;margin:12px 0;min-height:55px}.research-requirements span{display:flex;align-items:center;gap:6px}.research-requirements .icon{width:14px;height:14px;flex-shrink:0}.research-requirements .met{color:#506a40}.research-requirements .unmet,.research-blocked{color:#984734}.research-timing{display:flex;flex-direction:column;gap:4px;margin:12px 0;font-size:12px}.research-timing strong{display:flex;align-items:center;gap:6px}.research-blocked{display:block;line-height:1.5;margin-top:9px;font-size:11px}.research-table{min-width:1060px;font-variant-numeric:tabular-nums}.research-table td{white-space:nowrap}.research-table td:first-child{white-space:normal;min-width:170px}.research-table td:last-child{white-space:normal;min-width:190px}.research-table td small{display:block;color:#506a40;margin-top:3px}.research-table thead{position:sticky;top:0;z-index:1}.research-table .current-level{background:#e1e8d0}.research-active{margin-top:14px}dialog:has(.research-table){width:min(1180px,calc(100vw - 32px));max-width:1180px}

/* Illustrated academy: one original atlas and a scrollable research board. */
.research-portrait{display:inline-block;width:78px;height:78px;flex:0 0 auto;vertical-align:middle;background-color:#302d1c;background-size:600% 600%;background-position:var(--research-x) var(--research-y);background-repeat:no-repeat;border:1px solid #b3995a;border-radius:5px;box-shadow:inset 0 0 0 1px #e2c57555,0 3px 8px #30271825;overflow:hidden}
.research-portrait.small{width:48px;height:48px}.research-portrait.compact{width:32px;height:32px}.research-portrait.large{width:94px;height:94px}.research-portrait.hero{width:68px;height:68px;border-color:#bda467}
.research-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,340px);gap:24px;padding:20px 22px;margin-bottom:16px;border:1px solid #a68a51;border-radius:8px;background:radial-gradient(ellipse at top right,#65805830,transparent 65%),linear-gradient(120deg,#263c2e,#394a37);box-shadow:inset 0 0 0 3px #d4b86b0e,0 5px 18px #302c2814;color:#f1e2be}
.research-summary-identity{display:flex;align-items:center;gap:15px;min-width:0}.research-summary-identity>div{min-width:0}.research-summary h2{font-size:25px;margin:5px 0 6px}.research-summary p{font-size:12px;color:#c0c8af;margin:0;line-height:1.5}.research-summary .eyebrow{color:#b9bf9e;font-size:9px;overflow-wrap:anywhere}
.research-budget{align-self:center;min-width:0}.research-budget>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}.research-budget>div>span{font-size:12px;color:#d4d4b9}.research-budget strong{font:29px Georgia;color:#e6c779;white-space:nowrap}.research-budget strong small{font:17px Georgia;color:#acb596}.research-budget>small{font-size:10px;line-height:1.5;display:block;color:#c5c6a9}.research-budget-track{height:9px;padding:2px;background:#13251b;border:1px solid #718260;border-radius:5px;margin:10px 0 7px;overflow:hidden}.research-budget-track i{height:100%;display:block;background:linear-gradient(90deg,#a48d43,#e8d18d);border-radius:2px}
.research-job{display:flex;align-items:center;gap:13px;border:1px solid #8ba49b;border-left:4px solid #5e8278;border-radius:6px;background:linear-gradient(90deg,#e4eadb,#f3e9d3);padding:14px 16px;margin:0 0 17px}.research-job>div{flex:1;min-width:0}.research-job h3{font-size:18px;margin:3px 0 7px}.research-job .section-label{font-size:9px;margin:0;color:#517568}.research-job small{font-size:11px}.research-job-progress{height:5px;background:#c9d0b9;overflow:hidden;border-radius:4px;margin:5px 0 8px}.research-job-progress i{display:block;background:#628875;height:100%;border-radius:4px}
.research-toolbar{margin:20px 0 16px}.research-categories{margin-bottom:11px}.research-tools{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.research-search{display:flex;align-items:center;gap:6px;flex:1;min-width:180px;background:#faf3e3;border:1px solid #bdad86;border-radius:5px;padding:0 10px}.research-search .icon{width:18px;height:18px;color:#8d7750}.research-search input{border:0;background:transparent;min-width:0;width:100%;padding:9px 4px;outline-offset:0}.research-tools select{font-size:12px;flex:0 1 180px}
.research-layout{display:grid;grid-template-columns:minmax(0,1fr) 332px;gap:18px;align-items:start}.research-tree{min-width:0;border:1px solid #bca371;border-radius:8px;overflow:hidden;background:#e9dcc0;box-shadow:0 5px 20px #59472d0c}.research-board-caption{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:16px 17px 12px;background:linear-gradient(#eadcbb,#e4d2ad)}.research-board-caption h3{font-size:22px;margin:0 0 4px}.research-board-caption small{font-size:11px}.research-board-caption .square{font-size:27px;line-height:1;padding:0;height:34px;width:34px}
.research-legend{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:7px 17px 10px;font-size:10px;line-height:1.4;background:#f4ead4}.research-legend>span{display:inline-flex;align-items:center;gap:5px}.research-legend i{display:inline-block;width:8px;height:8px;border:1px solid #aaa18b;border-radius:50%;background:#bab8ac}.research-legend i.done{background:#6e9455;border-color:#5d8045}.research-legend i.available{background:#d7ad53;border-color:#ad873e}.research-legend i.running{background:#558b92;border-color:#437278}.research-legend i.profile{background:#f1d899;border-color:#a77d36;border-radius:1px}
.research-scroll-hint{display:flex;align-items:center;gap:6px;font-size:10px;color:#82744f;padding:9px 15px;margin:0;border-top:1px solid #d6c198}.research-scroll-hint .icon{width:14px;height:14px;transform:rotate(45deg)}
.research-board{display:flex;gap:0;align-items:stretch;overflow:auto;max-height:610px;min-height:330px;padding:0 4px 12px;scrollbar-color:#aa925e #e4d4b1;scrollbar-width:thin;background:linear-gradient(90deg,#e8dcbd,#f4ead5);overscroll-behavior:contain;scroll-padding:78px 8px;outline-offset:-3px}.research-tier{flex:0 0 140px;min-width:0;border-right:1px solid #c9b890;padding:0 9px;background:#eee3c83b}.research-tier:nth-child(even){background:#e2d1ad55}.research-tier:last-child{border:0}.research-tier-heading{position:sticky;top:0;z-index:2;display:flex;flex-direction:column;align-items:center;padding:12px 0 10px;margin:0 -9px 12px;border-bottom:1px solid #bba273;background:linear-gradient(#f5ebd4,#e4d4b0);box-shadow:0 3px 5px #64533110;text-align:center}.research-tier-heading>span{font-size:9px;text-transform:uppercase;letter-spacing:1.4px;color:#887248}.research-tier-heading strong{font:26px Georgia;color:#6d5c3c;margin:2px 0}.research-tier-heading small{font-size:9px;line-height:1.2;color:#8a7a5b}.research-tier.current .research-tier-heading{border-bottom:3px solid #a78640;padding-bottom:8px;background:linear-gradient(#f4e8c1,#dac68f)}.research-tier.future .research-tier-heading{background:linear-gradient(#eae2d2,#d8cfbb)}.research-tier.future .research-tier-heading strong{color:#8b8675}.research-tier-tiles{display:flex;flex-direction:column;gap:12px;padding-bottom:12px}
.research-tile{position:relative;display:flex;flex-direction:column;align-items:center;gap:0;width:100%;padding:9px 6px 7px;min-height:163px;flex-shrink:0;border:1px solid #bca67b;border-radius:6px;background:linear-gradient(130deg,#f8f0dc,#eaddbd);color:#4a3f2b;font-weight:400;box-shadow:0 3px 8px #4d3d2710;transition:border-color .12s,box-shadow .12s}.research-tile:hover{border-color:#8b733e;box-shadow:0 4px 12px #4d3d272b}.research-tile-art{position:relative;display:block;margin-bottom:7px}.research-tile-mark{display:grid;place-items:center;position:absolute;bottom:-3px;right:-4px;width:21px;height:21px;border-radius:50%;border:1px solid #958d77;background:#d3cbb8;color:#665e4e;box-shadow:0 1px 4px #0003}.research-tile-mark .icon{width:12px;height:12px;stroke-width:2.2}.research-tile-name{font-size:11px;line-height:1.35;font-weight:650;min-height:30px;display:flex;align-items:center;justify-content:center;text-align:center;margin-bottom:6px;overflow-wrap:break-word}.research-tile-meta{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;font-size:9px;color:#7c6b44;padding:5px 0 4px;border-top:1px solid #d5c4a0;white-space:nowrap;font-variant-numeric:tabular-nums}.research-tile-meta>span:first-child{font-weight:700}.research-tile-state{font-size:9px;line-height:1.25;color:#887d61;margin-top:2px}
.research-tile.available{border-color:#bda05a;background:linear-gradient(130deg,#fff5db,#ecddba)}.research-tile.available .research-tile-mark{background:#ddba63;border-color:#94712f;color:#574423}.research-tile.available .research-tile-state{color:#947023}.research-tile.done{border-color:#8ba06e;background:linear-gradient(130deg,#ebf1df,#d8e2c4)}.research-tile.done .research-tile-mark{background:#618548;border-color:#3b6031;color:#fff0ca}.research-tile.done .research-tile-state{color:#52733d}.research-tile.done .research-tile-meta{border-color:#b8c6a1}.research-tile.running{border-color:#5c9296;background:linear-gradient(130deg,#edf1e4,#d2e4dc)}.research-tile.running .research-tile-mark{background:#5c8990;border-color:#3a6368;color:#f9eccd}.research-tile.running .research-tile-state{color:#427879}.research-tile.locked .research-portrait{filter:grayscale(.95) contrast(.85);opacity:.62}.research-tile.locked{border-color:#beb5a0;background:linear-gradient(130deg,#eae3d3,#ded5be)}.research-tile.locked .research-tile-name{color:#827866}.research-tile.selected{outline:2px solid #936d2e;outline-offset:1px;box-shadow:0 3px 10px #a6844536}.research-tile.suggested:after{content:'';position:absolute;top:3px;left:3px;width:7px;height:7px;background:#ae873c;border:1px solid #f4d895;border-radius:2px}.research-tile:focus-visible{outline:3px solid #527e75;outline-offset:1px}
.research-board-foot{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid #c2ab7c;padding:11px 15px;font-size:10px;color:#88724b;background:#ecdfbf}.research-empty{padding:50px 20px;min-width:100%;text-align:center;align-self:center}.research-empty p{font-size:12px;color:#8d7952;line-height:1.5}.research-empty h3{font-size:21px}.research-detail-panel{position:sticky;top:15px;padding:18px;background:linear-gradient(120deg,#fcf5e6,#ede0c3)}.research-detail-heading{display:flex;align-items:center;gap:13px;margin-bottom:15px}.research-detail-heading>div{min-width:0}.research-detail-heading .section-label{font-size:8px;line-height:1.5;letter-spacing:1px;margin:0 0 5px}.research-detail-heading h2{font-size:20px;line-height:1.2;margin:0 0 8px}.research-detail-heading .large{width:80px;height:80px}.research-state-label{display:inline-flex;align-items:center;gap:4px;font-size:10px;color:#837861}.research-state-label .icon{width:13px;height:13px}.research-state-label.done{color:#567844}.research-state-label.available{color:#8e6a23}.research-state-label.running{color:#467c80}.research-effect{font:19px Georgia;line-height:1.35;color:#816737;padding-bottom:13px;margin:0;border-bottom:1px solid #d4c197}.research-detail-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 19px}.research-detail-stats>div{border:1px solid #cfbd94;padding:10px 9px;border-radius:5px;background:#f3ead6}.research-detail-stats b{display:block;font:24px Georgia;color:#5f7249;margin-bottom:4px}.research-detail-stats span{font-size:9px;color:#8c7b5b}.research-detail-label{font:10px system-ui;text-transform:uppercase;letter-spacing:1px;color:#8a7044;margin:17px 0 10px}.research-detail-cost{display:grid;grid-template-columns:1fr 1fr;gap:9px}.research-detail-cost>div{display:flex;align-items:center;gap:8px;padding:8px 9px;border:1px solid #dac8a1;border-radius:4px;background:#f7eedb}.research-detail-cost .icon{color:#97783c;width:20px;height:20px}.research-detail-cost b{display:block;font-size:13px;font-variant-numeric:tabular-nums}.research-detail-cost small{display:block;font-size:9px;margin-top:2px}.research-detail-cost .missing b{color:#9b493a}.research-detail .research-timing{padding:12px 0;border-bottom:1px solid #d1bd96;margin-bottom:18px}.research-detail .research-timing strong{font-size:16px;color:#675435}.research-detail .research-timing small{font-size:10px;line-height:1.5}.research-detail .research-requirements{margin:10px 0 17px;min-height:0;font-size:11px}.research-start{width:100%;margin-top:12px;min-height:42px}.research-start-note{display:block;text-align:center;font-size:10px;line-height:1.4;margin-top:9px}.research-detail .notice{font-size:11px;margin:15px 0 0}.research-detail .research-blocked{line-height:1.5;font-size:10px;margin:11px 0 0}.research-related{display:flex;flex-direction:column;gap:7px;margin:14px 0}.research-related>small{font-size:9px;text-transform:uppercase;letter-spacing:.6px;color:#8c7750;margin-bottom:2px}.research-related-link{display:flex;align-items:center;gap:7px;text-align:left;border:1px solid #cbbb94;border-radius:4px;padding:5px;background:#f7edd7;color:#766342;font-size:11px}.research-related-link>span:not(.research-portrait){flex:1}.research-related-link>.icon{width:13px;height:13px;margin-right:4px}.research-table-title{display:flex;align-items:center;gap:9px}.research-table td:first-child{min-width:215px}.research-table .research-portrait{box-shadow:none}dialog:has(.research-detail){width:min(590px,calc(100vw - 24px))}.dialog-body .research-detail-heading .large{width:98px;height:98px}.dialog-body .research-detail-heading h2{font-size:24px}
@media(max-width:1100px){.research-layout{grid-template-columns:minmax(0,1fr) 300px;gap:13px}.research-detail-panel{padding:15px}.research-summary{grid-template-columns:minmax(0,1fr) 280px;padding:17px 18px;gap:15px}.research-tier{flex-basis:134px;padding:0 8px}.research-tier-heading{margin-left:-8px;margin-right:-8px}.research-detail-heading .large{width:72px;height:72px}}
@media(max-width:960px){.research-layout{grid-template-columns:minmax(0,1fr)}.research-detail-panel{display:none}.research-board{max-height:650px}.research-summary{grid-template-columns:minmax(0,1fr) 240px}.research-summary h2{font-size:22px}}
@media(max-width:600px){.research-summary{grid-template-columns:1fr;padding:16px;gap:17px}.research-summary .hero{width:60px;height:60px}.research-summary-identity{gap:12px}.research-summary h2{font-size:22px}.research-summary .eyebrow{font-size:8px}.research-summary p{font-size:10px}.research-budget{border-top:1px solid #c6be8740;padding-top:13px}.research-budget strong{font-size:25px}.research-budget>small{font-size:9px}.research-job{padding:12px 10px;gap:10px;align-items:center}.research-job h3{font-size:16px}.research-job small{font-size:9px}.research-job .button{font-size:10px;padding:6px}.research-job .small.research-portrait{width:42px;height:42px}.research-tools{gap:7px}.research-search{flex-basis:100%;min-width:0}.research-tools select{flex:1 1 calc(50% - 5px);min-width:0;width:100%;font-size:11px;padding:8px}.research-categories{gap:6px}.research-categories .small{font-size:10px;padding:6px 8px}.research-toolbar{margin:17px 0 13px}.research-board-caption{padding:13px 12px 10px}.research-board-caption h3{font-size:20px}.research-board-caption small{font-size:10px}.research-board-caption .square{height:31px;width:31px}.research-legend{padding:8px 12px;gap:9px;font-size:9px}.research-scroll-hint{font-size:9px;padding:9px 11px;align-items:start;line-height:1.4}.research-scroll-hint .icon{flex-shrink:0}.research-board{max-height:580px;min-height:310px}.research-tier{flex-basis:140px;padding:0 9px}.research-tier-heading{margin-left:-9px;margin-right:-9px}.research-board-foot{padding:10px 12px;font-size:9px;gap:5px}.research-detail-cost b{font-size:15px}.dialog-body .research-detail-heading .large{width:86px;height:86px}.dialog-body .research-detail-heading h2{font-size:21px}.research-detail .research-requirements{font-size:12px}.research-detail .research-blocked{font-size:11px}}
@media(prefers-reduced-motion:reduce){.research-tile{transition:none}}
.research-options,.research-overview-short{display:none}
@media(max-width:600px){
 .page-title:has([data-do="research-overview"]){flex-wrap:nowrap;align-items:flex-start;gap:10px}.page-title:has([data-do="research-overview"])>div:first-child{min-width:0;flex:1}.page-title:has([data-do="research-overview"]) .actions{margin-left:auto;flex-shrink:0}.research-overview-label{display:none}.research-overview-short{display:inline}[data-do="research-overview"]{padding:8px 9px;font-size:11px;gap:5px}[data-do="research-overview"] .icon{width:18px;height:18px}
 .research-summary{grid-template-columns:minmax(0,1fr) 128px;gap:15px;padding:13px 14px}.research-summary-identity .hero{display:none}.research-summary h2{font-size:20px}.research-summary .eyebrow{font-size:7px;line-height:1.5}.research-summary p{font-size:9px;line-height:1.5}.research-budget{border:0;padding:0}.research-budget>div:first-child{flex-direction:column;align-items:flex-start;gap:3px}.research-budget>div>span{font-size:10px}.research-budget strong{font-size:25px}.research-budget strong small{font-size:14px}.research-budget-track{margin:7px 0 6px;height:8px}.research-budget>small{font-size:8px}
 .research-categories{flex-wrap:nowrap;overflow:auto;padding-bottom:5px;scrollbar-width:thin;scrollbar-color:#af9863 #e4d5b7}.research-categories .small{white-space:nowrap;flex:0 0 auto}.research-options{display:inline-flex;font-size:10px;margin-bottom:8px;gap:7px}.research-options .icon{width:14px;height:14px}.research-tools:not(.expanded){display:none}.research-toolbar{margin-top:16px;margin-bottom:7px}.research-tools.expanded{padding-top:3px;padding-bottom:8px}
 .research-tier-heading{padding-top:8px;padding-bottom:8px;margin-bottom:10px}.research-tier-heading strong{font-size:23px}.research-tier.current .research-tier-heading{padding-bottom:6px}.research-tile{padding-top:7px;padding-bottom:6px;min-height:152px}.research-tile .research-portrait{width:72px;height:72px}.research-tile-name{min-height:28px}.research-tile-meta{padding-top:4px}.research-tile-state{font-size:8px}.research-board-caption{padding-top:11px;padding-bottom:9px}.research-scroll-hint{font-size:8px;padding-top:7px;padding-bottom:7px}
}
/* Painted resources, city stocks and the ruler's wallet. */
.resource-portrait{display:inline-block;width:26px;height:26px;flex:0 0 auto;border-radius:5px;background-color:#16301e;background-size:300% 200%;background-position:var(--resource-x) var(--resource-y);background-repeat:no-repeat;box-shadow:inset 0 0 0 1px #b99a59,0 1px 2px #30261825;vertical-align:middle}
.resourcebar{display:grid;grid-template-columns:minmax(0,1fr) minmax(290px,.52fr);gap:18px;padding:10px 24px 12px;background:linear-gradient(100deg,#f2e8cc,#e8daba);border-bottom:1px solid #b39b6b}
.resource-group{min-width:0}.resource-group-caption{display:flex;align-items:center;gap:7px;font-size:9px;letter-spacing:1.5px;text-transform:uppercase;font-weight:700;color:#796342;margin-bottom:6px}.resource-group-caption span{font-size:9px;text-transform:none;letter-spacing:0;font-weight:400;color:#80755e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wallet-group{padding-left:18px;border-left:1px solid #cbb88e}
.stock-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.wallet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.resourcebar .resource{position:relative;display:flex;align-items:center;gap:9px;min-width:0;width:100%;min-height:70px;padding:8px 9px 10px;border:1px solid #cbb689;border-radius:7px;background:linear-gradient(#faf3e1,#f1e4c4);text-align:left;color:var(--ink);box-shadow:0 2px 4px #6b532310;transition:border-color .15s,background .15s}
.resourcebar .resource:hover{background:#fff7e2;border-color:#a68140}.resource-copy{display:block;min-width:0}.resource-name{display:block;font-size:10px;font-weight:650;color:#796342;line-height:1.3}.resourcebar .resource b{font-size:17px;line-height:1.35;font-weight:700;white-space:nowrap;letter-spacing:-.3px}.resourcebar .resource small{font-size:9px;line-height:1.4;color:#80715a}.resource-portrait.header-resource{width:42px;height:42px;border-radius:6px}.stock-meter{position:absolute;left:9px;right:9px;bottom:4px;height:3px;border-radius:4px;background:#dbcdac;overflow:hidden}.stock-meter i{display:block;height:100%;background:#789362;border-radius:4px}.resource.is-full .stock-meter i{background:#b4813c}.resourcebar .currency-gold{background:linear-gradient(125deg,#f9edca,#edddb0);border-color:#c0a36a}.resourcebar .currency-coins{background:linear-gradient(125deg,#eef0e6,#e1e5dc);border-color:#b0b9aa}.currency-coins .resource-name{color:#455c70}.currency-coins .resource-meta{color:#657583}
.cost{gap:6px}.cost>.cost-item{display:inline-flex;align-items:center;gap:5px;background:#e8dbc044;border:1px solid #d7c59e;border-radius:5px;padding:4px 6px;white-space:nowrap}.cost>.cost-item b{font-size:12px;font-weight:650}.cost>.cost-item small{font-size:9px;line-height:1.1}.cost>.cost-item.missing{border-color:#d4a699;background:#f1ddd3}.cost>.cost-item.missing small{color:#9d3730}.cost .resource-portrait{width:24px;height:24px}.unit-card .cost>.cost-item{padding:3px 4px}.unit-card .cost>.cost-item small{display:none}.unit-card .cost .resource-portrait{width:21px;height:21px}.research-detail-cost .resource-portrait{width:32px;height:32px}.research-detail-cost>div{gap:7px}.building-level-table th .resource-portrait,.research-table th .resource-portrait{width:20px;height:20px;margin-right:3px}.coin-pack>.resource-portrait{width:68px;height:68px;margin:auto;border-radius:10px}.premium-icon>.resource-portrait{width:40px;height:40px;border-radius:50%}.unit-emblem>.resource-portrait{width:38px;height:38px}.resource-detail-intro{display:flex;align-items:center;gap:15px;margin-bottom:20px}.resource-portrait.large-resource{width:90px;height:90px;border-radius:10px}.resource-detail-intro h3{font-size:26px;margin:5px 0}.resource-detail-intro p{font-size:12px;line-height:1.5;margin:0;color:var(--muted)}.resource-detail-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:15px}.resource-detail-stat{min-width:0;padding:13px;background:#eee0c0;border:1px solid #d2bc89;border-radius:6px}.resource-detail-stat small{display:block;font-size:10px;line-height:1.4}.resource-detail-stat b{display:block;margin-top:5px;font-size:19px;font-weight:650;font-variant-numeric:tabular-nums}.resource-detail>.muted{font-size:12px;line-height:1.5}.resource-detail .actions{flex-wrap:wrap}.resource-detail .actions button{font-size:12px}
@media(max-width:1100px){.resourcebar{grid-template-columns:1fr;gap:8px;padding:9px 14px}.wallet-group{padding:0;border:0;display:grid;grid-template-columns:140px minmax(0,1fr);align-items:center;gap:10px}.wallet-group .resource-group-caption{display:block;line-height:1.6;margin:0}.wallet-group .resource-group-caption span{display:block}.resourcebar .currency-card{min-height:52px;padding:6px 10px}.currency-card .resource-copy{display:grid;grid-template-columns:1fr auto;column-gap:12px;width:100%;align-items:center}.currency-card .resource-meta{grid-column:1}.currency-card b{grid-column:2;grid-row:1/3}.currency-card .header-resource{width:34px;height:34px}}
@media(max-width:600px){.resourcebar{gap:7px;padding:8px 10px 9px}.resource-group-caption{font-size:8px;letter-spacing:1px;margin-bottom:5px}.resource-group-caption span{font-size:8px}.stock-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.resourcebar .resource{min-height:56px;padding:5px 8px 7px;gap:8px;border-radius:6px}.resource-portrait.header-resource{width:35px;height:35px}.resourcebar .resource-name{font-size:9px}.resourcebar .resource b{font-size:16px}.resourcebar .resource small{font-size:8px}.resource-meta{line-height:1.1!important}.stock-meter{left:8px;right:8px;bottom:3px;height:2px}.wallet-group{display:block}.wallet-group .resource-group-caption{display:flex;line-height:1.3;margin:0 0 5px}.wallet-group .resource-group-caption span{display:inline}.resourcebar .currency-card{min-height:49px;padding:5px 8px;gap:7px}.currency-card .resource-copy{display:block}.currency-card .header-resource{width:35px;height:35px}.resourcebar .currency-card b{font-size:16px}.currency-card .resource-meta{display:none}.resource-detail-intro{align-items:flex-start;gap:12px}.resource-portrait.large-resource{width:70px;height:70px}.resource-detail-intro h3{font-size:23px}.resource-detail-stat{padding:10px}.resource-detail-stat b{font-size:17px}.resource-detail-intro .section-label{font-size:8px}.cost>.cost-item{padding:4px 5px}}
/* Compact top resource strip, following the supplied in-game reference. */
.topbar .resourcebar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr)) minmax(104px,1.3fr);align-items:center;gap:5px;flex:1;max-width:640px;margin-left:auto;padding:0;border:0;background:none;color:#f1dfb7}
.topbar .resourcebar .resource{display:flex;align-items:center;justify-content:center;gap:5px;position:relative;min-height:36px;height:36px;padding:4px 2px 6px;border:0;border-radius:3px;background:none;box-shadow:none;color:#f1dfb7;text-align:center;min-width:0}
.topbar .resourcebar .resource:hover{background:#ffffff0c}.topbar .resourcebar .header-resource{width:22px;height:22px;border-radius:3px;box-shadow:none}.topbar .resourcebar .resource-copy{display:block;min-width:0}.topbar .resourcebar .resource b{font-size:12px;font-weight:650;line-height:1.25;letter-spacing:-.3px;color:inherit}.topbar .resourcebar .resource-name,.topbar .resourcebar .resource-meta{display:none}.topbar .resourcebar .stock-meter{left:4px;right:4px;bottom:1px;height:2px;border-radius:0;background:#ddd0a92b}.topbar .resourcebar .stock-meter i{background:#d6b355;border-radius:0}.topbar .resourcebar .resource.is-full .stock-meter i{background:#e1a558}
.premium-wallet{display:flex;align-items:center;min-width:0;height:36px;padding:2px 3px;border:1px solid #e2bc58;border-radius:3px;background:linear-gradient(180deg,#f0c95b,#c0922e 50%,#bd8624);box-shadow:inset 0 0 0 1px #624915,inset 0 0 0 3px #f9dc8460,0 1px 2px #0005;color:#fff3c6;gap:2px}.topbar .premium-wallet .resource{flex:1;min-width:0;height:30px;min-height:30px;padding:2px 1px;gap:6px;color:#fff5ce;text-shadow:0 1px 1px #654400}.topbar .premium-wallet .resource:hover{background:#ffffff15}.topbar .premium-wallet .header-resource{width:23px;height:23px;border-radius:50%;box-shadow:0 1px 2px #72531555}.premium-add{display:grid;place-items:center;padding:0;width:24px;min-width:24px;height:28px;border:1px solid #795619;border-radius:2px;background:linear-gradient(#71592c,#403719);box-shadow:inset 0 0 0 1px #f2d28177;color:#fff0b9;font:bold 20px/1 Georgia;text-shadow:0 1px #231d0d}.premium-add:hover{background:#6e5727}.premium-add:focus-visible{outline-color:#fff1be}
@media(max-width:1100px){.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:5px 10px;padding:7px 12px 6px;min-height:0}.topbar .brand{min-width:0;grid-column:1;grid-row:1;margin-right:0}.topbar .city-picker{grid-column:2;grid-row:1;max-width:150px}.topbar>[data-do=menu]{grid-column:3;grid-row:1}.topbar .resourcebar{grid-column:1/-1;grid-row:2;width:100%;max-width:none;margin:0;grid-template-columns:repeat(5,minmax(0,1fr)) minmax(82px,1.35fr);gap:4px;padding-top:2px}.topbar .resourcebar .resource{height:40px;min-height:40px;flex-direction:column;gap:0;padding:0 2px 5px}.topbar .resourcebar .header-resource{width:19px;height:19px}.topbar .resourcebar .resource b{font-size:11px;line-height:1.2}.topbar .premium-wallet{height:37px;align-self:center}.topbar .premium-wallet .resource{height:31px;min-height:31px;flex-direction:row;padding:1px;gap:3px}.topbar .premium-wallet .header-resource{width:21px;height:21px}.premium-add{width:22px;min-width:22px;height:28px;font-size:18px}.brand .serif{font-size:20px}.topbar .brand .eyebrow{font-size:8px;letter-spacing:1px}.topbar .crest{width:30px;height:35px}}
@media(max-width:520px){.topbar{padding:6px 9px 5px;gap:4px 7px}.topbar .brand{gap:6px}.topbar .brand .serif{font-size:17px;letter-spacing:0}.topbar .city-picker{max-width:112px;font-size:10px;padding:6px 4px}.topbar>[data-do=menu]{width:31px;min-height:31px;padding:4px}.topbar .resourcebar{gap:3px;grid-template-columns:repeat(5,minmax(0,1fr)) 80px}.topbar .resourcebar .resource b{font-size:10px}.topbar .premium-wallet{height:35px}.topbar .premium-wallet .resource b{font-size:10px}.topbar .resourcebar .stock-meter{left:2px;right:2px;bottom:2px;height:2px}.topbar .brand .eyebrow{font-size:7px;letter-spacing:.6px}.topbar .premium-wallet .resource{gap:2px}.topbar .premium-wallet .header-resource{width:19px;height:19px}.premium-add{width:21px;min-width:21px}}

/* Distance-based army movement. */
.unit-pace{display:block;margin-top:5px;color:#786444}.unit-pace .icon{width:14px;height:14px}.march-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px}.march-summary small,.march-summary strong{display:block}.march-summary strong{font-size:17px;margin-top:5px}.attack-summary p{margin:9px 0}.march-pace{line-height:1.6}

/* City construction score and public rankings. */
.city-points{cursor:pointer}.building-point-gain{color:#76603b;font-size:12px;margin:10px 0}.score-hero strong{display:block;font-size:30px;color:#66502a}.score-hero strong span{font-size:17px;font-weight:normal}.ranking-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;background:#eee4c8;padding:16px;border:1px solid #d2bf95;border-radius:6px;margin-bottom:18px}.ranking-summary small,.ranking-summary strong{display:block}.ranking-summary strong{font-size:24px;color:#72562e;margin-top:4px}.rank-owner,.rank-faction{display:block;font-size:11px;color:#78684c;white-space:normal}.ranking-table{width:100%}.ranking-table td:nth-child(2){min-width:150px}.ranking-table th:nth-child(3),.ranking-score{text-align:right;font-weight:bold;color:#82622e}.ranking-own{background:#f3e8c7}.ranking-pagination{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:18px}.ranking-hint{font-size:12px;margin:12px 0}@media(max-width:520px){.ranking-summary{gap:8px;padding:12px}.ranking-summary strong{font-size:21px}.ranking-summary small{font-size:10px}.ranking-table td,.ranking-table th{padding:10px 7px}.ranking-table td:nth-child(2){min-width:130px}}

/* Floating medieval city action wheel. */
.city-orbit-line{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:5}.city-orbit-line line{stroke:#f0d58c;stroke-width:2;stroke-dasharray:4 4}.city-orbit{position:absolute;width:252px;height:252px;transform:translate(-50%,-50%);z-index:6;pointer-events:none}.city-orbit[hidden],.city-orbit-line[hidden]{display:none}.city-orbit-ring{position:absolute;inset:38px;border:1px solid #e1bf7399;border-radius:50%;box-shadow:0 0 25px #eac57530,inset 0 0 35px #34271635}.city-orbit-title{position:absolute;bottom:calc(100% + 3px);left:14px;right:14px;text-align:center;padding:5px 12px;background:linear-gradient(#f0dfb0,#c9ab6e);border:1px solid #f4d58c;box-shadow:0 3px 10px #0008;border-radius:5px;color:#382b1b}.city-orbit-title strong,.city-orbit-title small{display:block}.city-orbit-title strong{font:600 15px Georgia,serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.city-orbit-title small{font-size:10px;margin-top:2px}.city-orbit-center{position:absolute;left:50%;top:50%;width:88px;height:88px;transform:translate(-50%,-50%);border-radius:50%;border:3px solid #e0bd70;box-shadow:0 0 0 2px #54402b,0 5px 18px #0009,inset 0 0 15px #0008;background:radial-gradient(#6e8561,#293e37);overflow:hidden;padding:0;pointer-events:auto;cursor:pointer}.city-orbit.ally .city-orbit-center{background:radial-gradient(#5a8e85,#203f41)}.city-orbit.enemy .city-orbit-center{background:radial-gradient(#867051,#4a3327)}.city-orbit-center canvas{width:100%;height:70px;display:block;pointer-events:none}.city-orbit-center span{position:absolute;bottom:5px;left:0;right:0;font-size:9px;color:#ffecc5;text-shadow:0 1px 3px #000}.city-orbit-action{position:absolute;left:calc(50% + var(--orbit-x));top:calc(50% + var(--orbit-y));transform:translate(-50%,-50%);width:64px;height:65px;background:none;border:0;padding:0;pointer-events:auto;cursor:pointer;color:#f6e5bd;display:flex;flex-direction:column;align-items:center;justify-content:flex-start}.city-orbit-medallion{display:block;width:48px;height:48px;border:2px solid #e6c37b;border-radius:50%;padding:3px;background:radial-gradient(#3e665f,#172a32);box-shadow:0 0 0 2px #5f4930,0 4px 10px #0009, inset 0 0 6px #fff3;overflow:hidden}.city-orbit-action.war .city-orbit-medallion{background:radial-gradient(#8c5637,#3a2520)}.city-orbit-medallion .research-portrait{width:38px;height:38px;min-width:38px;border:0;border-radius:50%;box-shadow:none;display:block}.city-orbit-label{font-size:10px;font-weight:600;padding:1px 4px;border-radius:3px;background:#182a27e6;white-space:nowrap;text-shadow:0 1px 2px #000;margin-top:4px}.city-orbit-action:hover .city-orbit-medallion{box-shadow:0 0 0 2px #f8d686,0 0 15px #f0ca6488}.city-orbit-action:focus-visible,.city-orbit-center:focus-visible,.city-orbit-close:focus-visible{outline:3px solid #ffeb91;outline-offset:4px}.city-orbit-close{position:absolute;right:0;top:0;width:30px;height:30px;padding:4px;border-radius:50%;border:1px solid #d4b46f;background:#263d35;color:#efd5a5;pointer-events:auto;cursor:pointer}.city-orbit-close .icon{width:19px;height:19px}.city-detail-scene{position:relative;border:2px solid #aa8750;border-radius:7px;overflow:hidden;background:#58664a;margin-bottom:16px}.city-detail-scene canvas{width:100%;height:auto;display:block}.city-detail-scene .badge{position:absolute;left:10px;bottom:10px;background:#eadcb7ed}.city-detail-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}.city-detail-heading h3{margin:4px 0}.city-detail-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:15px}.city-detail-actions .research-portrait{width:28px;height:28px;min-width:28px}.city-detail .statgrid b{font-size:16px}

/* Stationed defense and all-city troop deployment management. */
.support-presence{display:flex;align-items:center;flex-wrap:wrap;gap:7px;background:#dfe9da;border:1px solid #91ac87;border-radius:6px;color:#304a32;padding:9px;margin:12px 0;font-size:12px}.support-presence .icon{width:18px;height:18px}.support-presence.compact{justify-content:center;background:transparent;border:0;padding:0;margin:4px 0 0;font-size:10px;gap:4px}.support-presence.compact .icon{width:13px;height:13px}.deployment-overview{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;border:1px solid #baa16d;border-radius:7px;background:#e6dbc0;padding:15px;margin-bottom:14px}.deployment-overview strong,.deployment-overview small{display:block}.deployment-overview strong{font-size:25px;color:#75582a}.deployment-overview small{font-size:11px}.deployment-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.deployment-list>.paper{margin-top:0}.deployment-card h3{margin:3px 0}.deployment-card .between{flex-wrap:wrap;gap:8px}.deployment-origin{font-size:12px;color:#7a684b;margin:10px 0}.deployment-roster,.deployment-wounded{padding:10px;background:#f3ebd8;border:1px solid #d1bd8f;border-radius:5px}.deployment-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.deployment-actions .button,.deployment-actions .primary{flex:1;justify-content:center;white-space:nowrap}.deployment-wounded{font-size:12px;background:#ecd9ca}.received-heading{margin-top:24px}.received-support{padding:12px;background:#e4ead9;border:1px solid #a4b494;border-radius:5px;margin:8px 0}.received-support p{margin:8px 0}.withdraw-unit{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #d6c6a1}.withdraw-unit>div{flex:1}.withdraw-unit label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;margin-top:8px}.withdraw-unit input{width:90px;min-width:0}@media(max-width:800px){.deployment-list{grid-template-columns:1fr}.deployment-overview{gap:7px;padding:12px}.deployment-overview strong{font-size:22px}.deployment-overview small{font-size:10px}}

.ranking-categories{padding:12px;border:1px solid #c8b48a;border-radius:6px;background:#e8dcc1}.ranking-categories .icon{width:17px;height:17px}.ranking-rule{color:#6f603f;font-size:13px;margin-bottom:14px}.ranking-scopes{gap:8px}@media(max-width:520px){.ranking-categories{display:grid;grid-template-columns:1fr 1fr;padding:8px;gap:7px}.ranking-categories .button{justify-content:flex-start;font-size:11px}.ranking-table th:nth-child(3){min-width:90px}}

/* Battle conditions */
.night-banner{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;margin:0 0 16px;border:1px solid var(--line,#ab936b);border-radius:12px;background:#e9dec4;color:#342b21}.night-banner>div{min-width:0}.night-banner svg{width:20px;vertical-align:middle}.night-banner small{display:block;margin:5px 0 0;font-size:11px}.battle-conditions{margin:16px 0;padding:14px;background:#eee4ce;border:1px solid #c7ae80;border-radius:12px}.battle-conditions>small{color:#756448}.condition-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px}.condition-grid>div{padding:12px 8px;border-radius:8px;background:#f8f2e5;text-align:center}.condition-grid small,.condition-grid span{display:block;font-size:11px}.condition-grid strong{display:block;font-size:24px;color:#68471e;margin:7px 0}.combat-forecast{margin-top:14px;padding:12px;border-left:3px solid #b58b43;background:#f3ead7}.combat-forecast p{font-size:12px;line-height:1.8}.combat-forecast small{font-size:11px}.simulation-conditions{margin-top:14px}@media(max-width:600px){.condition-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.night-banner{align-items:flex-start;padding:10px;gap:6px}.night-banner strong{font-size:12px}.night-banner .ghost{font-size:11px;padding:7px}.condition-grid strong{font-size:22px}}

.training-quote{margin-top:10px}.training-totals{border-top:1px solid #c6af85;padding-top:10px}.training-totals>strong{display:block;font-size:12px}.training-totals>small{display:block;font-size:11px;line-height:1.6;margin-top:5px}.training-totals .cost{margin:8px 0}.training-error{color:#a13d27}.recruitment-table td{white-space:nowrap}.recruitment-table td:first-child{white-space:normal;min-width:140px}

/* Public NPC defenses and historical city intelligence. */
.target-defense{margin:15px 0;padding:15px;border:1px solid #bca77a;border-radius:8px;background:linear-gradient(135deg,#eee3cc,#f7f0df);min-width:0}
.target-defense h3{font-size:16px;margin:0}.target-defense>.flex{gap:10px;flex-wrap:wrap}
.target-defense .intel-label{font-size:11px;color:#655638;margin:9px 0}
.target-defense .intel-roster{margin:10px 0}.target-defense .army-roster{display:flex;flex-wrap:wrap;gap:8px 16px}
.target-defense .army-unit{white-space:normal;font-size:12px;max-width:100%;gap:7px}
.target-defense .intel-hint{font-size:11px;line-height:1.5;margin:10px 0 0}.target-defense button{margin-top:12px}
.intel-unknown{border-style:dashed}.intel-buildings{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:12px}

.intel-supplies{font-size:12px;margin-top:10px}.intel-supplies summary{cursor:pointer;color:#655638}.intel-supplies .cost{margin-top:8px}

.music-button{flex-shrink:0}.music-button[aria-pressed="false"]{opacity:.7}
.welcome-music{position:absolute;right:18px;top:18px;z-index:2}.welcome-music .music-button{color:#eee3c7;border:1px solid #bda56c;background:#233023dd}
.settings-session{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--line)}.settings-session .actions>button{flex:1 1 130px;min-height:44px}
.music-settings .music-track{display:flex;gap:13px;align-items:center;margin-bottom:20px}.music-track h3{margin:0 0 5px}.music-track p{font-size:12px;line-height:1.5;color:#71644d;margin:0}
.music-medallion{display:grid;place-items:center;width:52px;height:52px;flex:0 0 52px;border-radius:50%;border:1px solid #a89155;background:#e9dec2;color:#6b572b}.music-medallion .icon{width:28px;height:28px}
.music-settings .checkbox{margin-bottom:22px}.music-volume-label output{float:right;font-weight:700}.music-settings input[type="range"]{padding:0;height:28px;accent-color:#796431;width:100%;cursor:pointer}.music-settings>p{font-size:12px;line-height:1.6}.music-status{min-height:20px}

@media(max-width:1100px){.topbar{grid-template-columns:minmax(0,1fr) auto auto auto}.topbar>.music-button{grid-column:4;grid-row:1}}
@media(max-width:520px){.topbar>.music-button{width:31px;height:31px;min-height:31px;padding:4px}}
.sound-settings{border-top:1px solid #b69b6c55;margin-top:24px;padding-top:20px}.sound-samples{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.sound-settings small{display:block;line-height:1.55}.incoming-banner{display:flex;align-items:center;gap:12px;width:100%;margin-bottom:18px;padding:14px 18px;border:1px solid #be7559;border-radius:10px;color:#fff2d9;background:linear-gradient(135deg,#6c2a23,#3d211c);text-align:left;box-shadow:0 4px 18px #0003}.incoming-banner span{min-width:0;flex:1}.incoming-banner b,.incoming-banner small{display:block}.incoming-banner small{color:#eed6b3;margin-top:4px;overflow-wrap:anywhere}.incoming-banner>.icon{flex-shrink:0}
/* Public profiles, alliance membership and private forum. */
.social-page-actions,.social-city-links{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.social-profile{min-width:0}.social-profile-heading{display:flex;align-items:center;gap:16px;margin-bottom:18px}.social-profile-heading h2{margin:6px 0}.social-profile .statgrid{margin:18px 0}
.social-description,.forum-post-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
.social-member-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid rgba(76,60,35,.16);min-width:0}.social-member-row>div{min-width:0}.social-member-row strong,.social-member-row button{overflow-wrap:anywhere}.social-member-row small{display:block;margin-top:5px;color:var(--muted,#746a58)}.social-member-row .actions{justify-content:flex-end;margin:0;flex-shrink:0}.social-member-row .right{flex-shrink:0}.social-member-row:last-child{border-bottom:0}
.alliance-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0 20px}.alliance-tabs .active{background:#344534;color:#fff5dd;border-color:#344534}.alliance-content,.alliance-member-list,.forum-thread-list{min-width:0}.alliance-content>.paper+.paper,.social-alliance-list{margin-top:18px}
.alliance-permissions{display:grid;gap:12px;margin:18px 0}.alliance-permissions label,.social-checkbox{display:flex;align-items:center;gap:10px;font-size:14px}.alliance-permissions input,.social-checkbox input{width:18px;height:18px;flex-shrink:0;accent-color:#344534}.social-checkbox{margin:16px 0}.alliance-ranks small{max-width:540px;line-height:1.5}
.social-forum-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:18px;align-items:start}.forum-thread-row{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;gap:12px;padding:16px 0;background:transparent;border:0;border-bottom:1px solid rgba(76,60,35,.16);color:inherit;cursor:pointer;min-width:0}.forum-thread-row>span:first-child{min-width:0}.forum-thread-row strong{display:block;font-size:16px;overflow-wrap:anywhere}.forum-thread-row small{display:block;margin-top:7px;color:var(--muted,#746a58)}.forum-thread-row .badge{flex-shrink:0}
.forum-composer textarea{width:100%;resize:vertical;min-height:100px}.forum-emojis{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0 16px}.forum-emojis button{font-size:20px;padding:6px 9px;min-width:38px;line-height:1.3}.forum-attachment-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0}.forum-attachment-row small{color:var(--muted,#746a58)}.forum-image-picker{position:relative;overflow:hidden;cursor:pointer}.forum-image-picker input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.forum-image-preview{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:15px 0}.forum-image-preview img{max-width:150px;max-height:120px;border-radius:8px;border:1px solid #b6aa92}
.forum-post{padding:18px 0;border-bottom:1px solid rgba(76,60,35,.16)}.forum-post:last-child{border-bottom:0}.forum-post-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.forum-post-meta small{color:var(--muted,#746a58)}.forum-post-text{margin:12px 0}.forum-post .actions{margin:12px 0 0}.forum-thread h2{overflow-wrap:anywhere;margin-top:20px}.forum-thread>.flex.between{align-items:flex-start;flex-wrap:wrap;gap:10px}.forum-thread .forum-composer{margin-top:24px;padding-top:18px;border-top:1px solid #b6aa92}
.forum-image-button{display:block;max-width:100%;padding:0;border:0;background:transparent;cursor:zoom-in;text-align:left}.forum-image-button img{display:block;max-width:min(100%,460px);max-height:360px;object-fit:contain;border-radius:8px}.forum-image-status{display:block;font-size:12px;margin-top:5px;color:var(--muted,#746a58)}.forum-image-full{display:block;max-width:100%;max-height:75vh;object-fit:contain;margin:auto}.social-cargo-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:700px){.social-forum-layout{grid-template-columns:1fr}.social-member-row{flex-wrap:wrap}.social-member-row .actions{justify-content:flex-start;flex-wrap:wrap;flex-shrink:1}.social-profile .statgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.alliance-tabs{gap:6px}.alliance-tabs button{flex:1;min-width:85px;padding:10px 8px}.forum-thread-row{align-items:flex-start}.forum-thread-row .badge{font-size:10px}.social-cargo-grid{gap:8px}.forum-thread .actions{flex-wrap:wrap}.social-player-list .social-member-row .right{margin-left:auto}}

/* Locked recruitment units keep a visible portrait and an accessible lock. */
.unit-portrait-wrap{position:relative;width:100%;aspect-ratio:1;flex:0 0 auto}
.unit-portrait-wrap>.unit-portrait{width:100%;height:100%}
.unit-lock{position:absolute;right:-3px;bottom:-3px;display:flex;align-items:center;justify-content:center;width:31px;height:31px;border:2px solid #e6c787;border-radius:50%;background:#263128;color:#ffe0a1;box-shadow:0 2px 5px #211a1655}
.unit-lock .icon{width:19px;height:19px;stroke-width:2}
.unit-card.locked .unit-portrait{filter:saturate(.4)}
/* Expedition planner: parchment fields, one troop per row, fixed food footer. */
dialog[data-panel="rally"]{width:min(520px,calc(100vw - 24px));max-height:92dvh;overflow:hidden}
dialog[data-panel="rally"][open]{display:flex;flex-direction:column;height:min(900px,92dvh)}
dialog[data-panel="rally"] .dialog-head{padding:13px 16px;gap:10px;flex-shrink:0}
dialog[data-panel="rally"] .dialog-head h2{font-size:23px;line-height:1.2}
dialog[data-panel="rally"] .dialog-body{padding:0;overflow:hidden;flex:1;min-height:0;display:flex;flex-direction:column}
#rally-form{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
.rally-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:13px 16px 16px}
.rally-coords{font-size:12px;margin:0 0 12px}
.rally-defense{border:1px solid #cdb889;border-radius:7px;background:#f6edda;margin-bottom:10px;overflow:hidden}
.rally-defense>summary{display:flex;align-items:center;gap:9px;padding:12px;cursor:pointer;list-style:none}
.rally-defense>summary::-webkit-details-marker{display:none}
.rally-defense>summary>.icon{width:23px;height:23px;color:#867347}
.rally-defense>summary strong{flex:1;font:18px Georgia;min-width:0}
.rally-defense>summary .badge{font-size:11px;white-space:nowrap;background:#f3e6c7}
.rally-chevron{font-size:19px;color:#8a754b}
.rally-defense[open] .rally-chevron{transform:rotate(180deg)}
.rally-defense .target-defense{margin:0;border:0;background:transparent;padding:0 12px 12px}
.rally-defense .target-defense>.flex{display:none}
#rally-intel .npc-reward{margin:0 0 12px;border-radius:7px;padding:12px;background:#f8efdc}
#rally-intel .loot-heading{align-items:baseline;gap:5px;flex-wrap:wrap;margin-bottom:10px}
#rally-intel .loot-heading h3{font-size:18px;margin:0}
#rally-intel .loot-heading b{font-size:14px;color:#365a35}
#rally-intel .loot-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
#rally-intel .loot-resource{padding:4px;gap:4px;background:transparent;border:0;grid-template-columns:auto 1fr}
#rally-intel .loot-resource .resource-portrait{width:30px;height:30px;grid-row:span 2}
#rally-intel .loot-resource b{font-size:12px;white-space:nowrap}
#rally-intel .loot-resource small{font-size:9px}
#rally-intel .loot-gold{margin-top:7px;font-size:11px}
.rally-loot-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:10px 0}
.rally-loot-grid>div{display:flex;align-items:center;flex-direction:column;gap:4px;min-width:0}
.rally-loot-grid .resource-portrait{width:30px;height:30px}.rally-loot-grid b{font-size:13px;white-space:nowrap}.rally-loot-grid small{font-size:9px;color:#89754c}
#rally-intel .npc-reward>small{font-size:10px;line-height:1.4}
.rally-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin:0 0 10px}
.rally-fields .field,.rally-field{display:block;border:1px solid #cfbc90;border-radius:7px;padding:9px 10px;background:#f5ecd7;margin:0 0 10px;font-size:12px;color:#84734e}
.rally-fields .field{margin:0}
.rally-fields .field>.icon,.rally-field>.icon{width:18px;height:18px;vertical-align:middle;margin-right:4px}
.rally-fields select,.rally-field select,.rally-field input{margin-top:6px;min-height:38px;width:100%;font-size:14px;padding:7px 8px;background:#fff9e9;border-color:#d5c49e;color:#3c382b}
.rally-roster-heading{margin:14px 0 8px;gap:8px}
.rally-roster-heading h3{font-size:21px;margin:0}
.rally-roster-heading .ghost{font-size:10px;padding:6px}
#rally-form .army-picker{display:flex;flex-direction:column;gap:8px;margin:0 0 16px}
.rally-unit{display:flex;align-items:center;gap:10px;border:1px solid #cfbc8e;border-radius:7px;padding:9px;background:#f8efda}
.rally-unit.unavailable{opacity:.48}
.rally-unit.invalid{border-color:#a84434;background:#f8e4d9}
.rally-unit .unit-portrait.small{width:50px;height:58px;border-radius:5px;box-shadow:0 1px 3px #42352236}
.rally-unit-main{min-width:0;flex:1}
.rally-unit-top{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:7px}
.rally-unit-top>label{display:block;padding:0;border:0;margin:0;font:15px Georgia;line-height:1.2;min-width:0}
.rally-stepper{display:flex;gap:4px;align-items:center}
.rally-stepper button,.rally-max{border:1px solid #cabb94;border-radius:5px;background:linear-gradient(#fff9e6,#eeddb7);color:#615439;min-height:36px;padding:4px 8px}
.rally-stepper button{width:30px;font-size:19px;padding:0}
#rally-form .rally-stepper input{width:48px;min-height:36px;margin:0;padding:4px;text-align:center;font-size:14px;background:#fff9e8;appearance:textfield}
.rally-stepper input::-webkit-inner-spin-button,.rally-stepper input::-webkit-outer-spin-button{appearance:none;margin:0}
.rally-available{font-size:12px;color:#786d4e;white-space:nowrap}
.rally-unit-bottom{display:flex;align-items:center;gap:10px;margin-top:4px}
#rally-form input[type="range"]{flex:1;min-width:0;width:100%;margin:0;padding:0;height:30px;min-height:30px;background:transparent;border:0;appearance:none;cursor:pointer;touch-action:pan-y}
#rally-form input[type="range"]::-webkit-slider-runnable-track{height:7px;border-radius:10px;background:linear-gradient(to right,#31583b var(--rally-fill,0%),#c5b997 var(--rally-fill,0%))}
#rally-form input[type="range"]::-webkit-slider-thumb{appearance:none;width:21px;height:21px;margin-top:-7px;border:1px solid #ad8d4b;border-radius:50%;background:linear-gradient(#f0d897,#c6a665);box-shadow:0 1px 3px #46372255}
#rally-form input[type="range"]::-moz-range-track{height:7px;border-radius:10px;background:#c5b997}
#rally-form input[type="range"]::-moz-range-progress{height:7px;border-radius:10px;background:#31583b}
#rally-form input[type="range"]::-moz-range-thumb{width:19px;height:19px;border:1px solid #ad8d4b;border-radius:50%;background:#dfbf7c}
.rally-max{font-size:11px;min-height:30px;padding:3px 7px}
.rally-unit-carry{display:block;font-size:9px;color:#8c7b59;line-height:1.35;margin-top:3px}
#rally-summary h3{font-size:20px;border-bottom:1px solid #cfbc93;padding-bottom:7px;margin:0 0 7px}
.rally-information{margin:0}.rally-information>div{display:flex;align-items:center;gap:12px;padding:5px 0}
.rally-information dt{display:flex;align-items:center;gap:8px;flex:1;color:#8a7959;font-size:13px}
.rally-information dt .icon{width:18px;height:18px}.rally-information dd{margin:0;width:46%;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}
.night-arrival{color:#a12e32}.rally-time-note{display:block;font-size:10px;color:#8a7959;margin-top:5px}
.rally-night-warning{display:flex;gap:10px;border:1px solid #bf7065;border-radius:7px;background:#f5dcd0;color:#9a2730;padding:12px;margin:12px 0}
.rally-night-warning>.icon{width:28px;height:28px;flex-shrink:0;align-self:center}.rally-night-warning strong,.rally-night-warning span,.rally-night-warning small{display:block}
.rally-night-warning strong{font-size:11px;line-height:1.4}.rally-night-warning span{font-size:12px;margin:4px 0}.rally-night-warning small{font-size:11px}
.rally-march-details{font-size:11px;color:#796b4d;padding:8px 0}.rally-march-details summary{cursor:pointer}.rally-march-details .combat-forecast{font-size:11px}.rally-carry{margin:10px 0;font-size:11px}.rally-carry small{font-size:10px}
.rally-footer{padding:13px 16px 15px;background:#ecdfbf;border-top:1px solid #c8b085;flex-shrink:0;box-shadow:0 -7px 15px #76624208}
#rally-price>small{font:16px Georgia;color:#79694b}.rally-food-cost{display:flex;align-items:center;gap:11px;margin:6px 0}
.rally-food-cost .resource-portrait{width:42px;height:42px;border-radius:6px}.rally-food-cost strong{font-size:26px;line-height:1}.rally-food-cost strong>span{font:18px Georgia}
.rally-food-balance{margin:3px 0 5px 53px;color:#376039;font-size:12px;font-weight:600}.rally-food-balance.missing{color:#8d7055}
.rally-cost-warning{margin:3px 0 7px 53px;color:#a43132;font-size:12px;font-weight:700}.rally-settle-cost{font-size:10px;color:#816d4b;line-height:1.5;margin:5px 0 9px}
.rally-footer-night{display:flex;align-items:center;gap:6px;font-size:10px;color:#a13234;margin:5px 0 9px}.rally-footer-night>.icon{width:16px;height:16px;flex-shrink:0}
.rally-send{display:flex;justify-content:center;width:100%;min-height:49px;font:21px Georgia;gap:10px;margin-top:10px;border-radius:6px;background:linear-gradient(100deg,#1e4931,#123d28);color:#fff2d2;border:1px solid #59744c}
.rally-send:disabled{background:#a29679;border-color:#a5997e;color:#ddd2b8;opacity:1}
.city-night-badge{position:absolute;top:53px;left:13px;display:flex;align-items:center;gap:8px;padding:8px 11px;background:#081b21;border:1px solid #efca77;border-radius:7px;color:#fff3c9;text-align:left;box-shadow:0 2px 13px #000c,inset 0 0 0 1px #b4823833,0 0 12px #e7b54c25;z-index:2;font:700 14px Georgia}
.city-night-badge>.icon{width:25px;height:25px;color:#ffe4a1;filter:drop-shadow(0 0 4px #e9ac4866)}.city-night-badge small{display:block;font:10px system-ui;margin-top:2px;color:#ead6a3}.city-night-badge[hidden]{display:none}
@media(max-width:370px){.rally-scroll{padding:11px}.rally-footer{padding:11px}.rally-unit{padding:7px;gap:7px}.rally-unit .unit-portrait.small{width:43px;height:53px}.rally-unit-top{gap:4px}.rally-unit-top>label{font-size:13px}.rally-stepper{gap:3px}.rally-stepper button{width:26px}#rally-form .rally-stepper input{width:41px}.rally-available{font-size:10px}.rally-defense>summary{padding:10px;gap:6px}.rally-defense>summary strong{font-size:16px}#rally-intel .loot-resource{display:flex;flex-direction:column;gap:3px;text-align:center}.rally-unit-carry{font-size:8px}.city-night-badge{font-size:12px;top:51px;left:10px}}
/* Named conversations and wall defense history. */
.private-thread-row{align-items:start;text-align:left}.private-thread-content{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:3px}.private-thread-title,.private-thread-preview{padding:0;border:0;background:none;box-shadow:none;text-align:left;color:inherit;max-width:100%;overflow-wrap:anywhere}.private-thread-title strong{font-size:1.05rem}.private-thread-preview{font-size:.85rem;opacity:.75;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.private-participant{font-size:.82rem;text-decoration:underline;text-underline-offset:3px;padding:2px 0;overflow-wrap:anywhere;text-align:left;min-height:28px}.private-thread-meta{display:flex;flex-direction:column;align-items:flex-end;gap:5px;white-space:nowrap}.private-thread-meta small{font-size:.73rem;opacity:.7}.private-thread-meta .report-unread{position:static;display:inline-flex}
dialog[data-panel="private-thread"][open]{display:flex;flex-direction:column;height:min(830px,92dvh)}dialog[data-panel="private-thread"]>.dialog-head{flex-shrink:0}dialog[data-panel="private-thread"]>.dialog-body{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden;padding:14px}.private-thread-header{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-shrink:0;padding-bottom:9px;border-bottom:1px solid #a58b5b55}.private-thread-history{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px 0;display:flex;flex-direction:column;gap:12px}.private-chat-message{max-width:90%;align-self:flex-start;border:1px solid #a58b5b66;background:#fffcf133;border-radius:10px;padding:10px 12px}.private-chat-message.own{align-self:flex-end;background:#d8e6cb;border-color:#75896388}.private-chat-message header{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:.72rem;opacity:.82;margin-bottom:5px}.private-chat-message time{font-size:.68rem;white-space:nowrap}.private-message-text{white-space:pre-wrap;overflow-wrap:anywhere}.private-thread-reply{padding-top:10px;border-top:1px solid #a58b5b55;flex-shrink:0}.private-thread-reply textarea{min-height:65px;max-height:150px;resize:vertical}.private-thread-reply .field{margin-bottom:8px}.private-thread-reply button{width:100%}.private-broadcast-subject{display:flex;flex-direction:column;gap:3px;border-bottom:1px solid #a58b5b44;padding-bottom:7px;margin-bottom:8px}.private-broadcast-subject small{font-size:.72rem}.private-broadcast-roster{margin-bottom:16px}.private-broadcast-roster .private-participant{display:inline-block;margin-right:13px}.inbox-player-actions{flex-wrap:wrap}
.wall-city-picker{margin-bottom:15px;border:1px solid #a58b5b66;padding:12px;border-radius:8px}.wall-city-picker summary{margin-bottom:10px;font-weight:700}.wall-city-picker>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;margin-top:12px}.wall-totals{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.wall-totals>div{padding:12px 6px;border:1px solid #a58b5b66;background:#fffcf144;border-radius:8px;display:flex;flex-direction:column;text-align:center;gap:6px}.wall-totals small{font-size:.75rem}.wall-totals strong{font-size:1.6rem}.wall-city-summary{display:flex;flex-direction:column;gap:8px;margin:12px 0}.wall-city-summary>div{display:flex;flex-direction:column;border-bottom:1px solid #a58b5b44;padding:7px 0;gap:3px}.wall-city-summary span{font-size:.85rem}.wall-city-summary small{font-size:.73rem;opacity:.7}.wall-casualties td{text-align:right}.wall-casualties th{text-align:left}.wall-casualties tbody th{display:flex;align-items:center;gap:7px}
@media(max-width:390px){.private-thread-row{gap:8px}.private-thread-meta time{font-size:.65rem}.private-chat-message{max-width:96%;padding:9px}.private-chat-message header{flex-wrap:wrap;gap:3px}.wall-totals strong{font-size:1.3rem}.wall-totals small{font-size:.7rem}.wall-casualties .unit-portrait.compact{width:30px;height:35px}}
/* The third world is clearly marked; its controls use the same world-scoped UI. */
.experimental-world{border-color:#b59a52;box-shadow:inset 0 0 0 1px #b59a5228}
.frontier-world-notice{display:flex;flex-direction:column;gap:4px;margin:10px 0;padding:10px 12px;border:1px solid #c4ad6b;border-radius:7px;background:#dec98723}
.frontier-world-notice>b{font:700 17px Georgia,serif;color:#5b431b}.frontier-world-notice>span{font-size:13px}.frontier-world-notice>small{font-size:11px;line-height:1.4;color:#6d684e}
.frontier-region{display:flex;flex-direction:column;gap:6px;margin:12px 0;padding:12px;border:1px solid #b9ac7f;border-radius:8px;background:#e8e1c952;color:#2a3f2a}
.frontier-region>div{display:flex;align-items:center;gap:8px}.frontier-region>div>.resource-portrait{width:30px;height:30px;flex-shrink:0}.frontier-region strong{font:17px Georgia,serif}.frontier-region>b{font-size:14px;color:#385c33}.frontier-region small{font-size:11px;line-height:1.5;color:#6c7059}
.frontier-map-help{margin:0;padding:15px;border:1px solid #796e47;border-radius:10px;background:#173b2a;color:#e7dcae}.frontier-map-help h3{margin:10px 0 6px}.frontier-map-help p{font-size:12px;line-height:1.55}.frontier-map-help small{font-size:11px;color:#c9c49b}
.map-night-badge{pointer-events:auto;max-width:calc(100% - 86px)}
@media(max-width:600px){.map-night-badge{font-size:12px;top:49px;left:10px;padding:6px 8px}.map-night-badge>.icon{width:20px;height:20px}.map-night-badge small{font-size:9px}.frontier-world-notice{padding:9px 10px}}
/* Painted test-world views use the same real coordinates and game actions. */
.frontier-map-navigation.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.frontier-map-navigation [data-map-region-label]{white-space:nowrap;font-size:12px;min-width:86px;text-align:center}
.frontier-map-navigation button[aria-pressed=true]{border-color:#b99b5f;background:#e4d1a2;color:#243529}
@media(pointer:coarse){.frontier-map-navigation button{min-height:44px;min-width:44px}}

/* Production unit talents075 */


.forge-workshop{color:#e9dfbf;font:13px/1.35 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;max-width:680px;margin:0 auto;isolation:isolate;color-scheme:dark}
.forge-workshop *{box-sizing:border-box}.forge-workshop button,.forge-workshop select{font:inherit}.forge-workshop button{cursor:pointer;touch-action:manipulation}.forge-workshop button:focus-visible,.forge-workshop select:focus-visible,.forge-workshop summary:focus-visible{outline:3px solid #ebca77;outline-offset:3px}.forge-workshop h1,.forge-workshop h2,.forge-workshop h3,.forge-workshop p{margin:0}.forge-workshop button:disabled{cursor:default}.forge-workshop .fg-shell{padding:13px;border:1px solid #8b7c4e;border-radius:9px;background:radial-gradient(ellipse at 5% 0,#3f5038 0,transparent 52%),#1c3229;box-shadow:0 8px 25px #09150c35}
.forge-workshop .fg-head{display:flex;align-items:center;gap:9px;margin-bottom:10px}.forge-workshop h1{font:24px/1.1 Georgia,"Times New Roman",serif;color:#eee2bb}.forge-workshop .fg-town{font-size:11px;color:#c4c5a8;white-space:nowrap}.forge-workshop .fg-head-main{min-width:0;flex:1}.forge-workshop .fg-town b{font-weight:600;color:#e4ca86}.forge-workshop .fg-proposal{padding:4px 6px;border:1px solid #8c7a4f;border-radius:4px;color:#dcca9b;font-size:9px;letter-spacing:1.5px;line-height:1.1}
.forge-workshop .fg-resources{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid #6e765744;border-bottom:1px solid #b1a67455;padding:6px 0;margin-bottom:6px;gap:6px}.forge-workshop .fg-resources>div{display:flex;flex-direction:column;border-right:1px solid #8b8b602f;padding-left:4px;min-width:0}.forge-workshop .fg-resources>div:last-child{border:0}.forge-workshop .fg-resources small{font-size:11px;color:#b7bea3}.forge-workshop .fg-resources b{font-size:13px;line-height:1.1;color:#f0dfb3;font-variant-numeric:tabular-nums}
.forge-workshop .fg-unitbar{display:flex;align-items:center;gap:9px;margin-bottom:7px}.forge-workshop .fg-unit-art{background-size:400% 400%;background-position:var(--portrait-x) var(--portrait-y);width:44px;height:46px;flex:0 0 auto;border:1px solid #b59a5a;border-radius:5px;background-color:#3c3928;box-shadow:inset 0 0 0 1px #ddc89344}.forge-workshop .fg-unit-label{flex:1;min-width:0;display:block;font-size:11px;color:#bbc1a5}.forge-workshop .fg-unit-label select{display:block;width:100%;min-width:0;min-height:44px;border:1px solid #ab9664;border-radius:4px;padding:6px 25px 6px 9px;background:#ede0bd;color:#40392a;font-size:14px;font-weight:600}.forge-workshop .fg-unit-label option,.forge-workshop .fg-unit-label optgroup{background:#f1e7ce;color:#40392a}
.forge-workshop .fg-unit-summary{display:flex;gap:6px;align-items:center;min-height:28px;margin-bottom:4px}.forge-workshop .fg-bonuses{display:flex;gap:5px;align-items:center;flex:1;flex-wrap:wrap;font-size:11px;color:#dde4c2}.forge-workshop .fg-bonus{padding:2px 6px;background:#47614255;border:1px solid #82916055;border-radius:3px}.forge-workshop .fg-muted{color:#b4bba0}.forge-workshop .fg-link{border:0;background:none;color:#dbca93;text-decoration:underline;text-underline-offset:3px;font-size:11px;padding:4px 0;min-height:44px}.forge-workshop .fg-tree-heading{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px;gap:5px}.forge-workshop .fg-tree-heading h2{font:17px Georgia,serif;color:#eadbb2}.forge-workshop .fg-tree-heading span{font-size:11px;color:#afb89c;white-space:nowrap}
.forge-workshop .fg-tree{position:relative;isolation:isolate;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:58px 10px 60px 10px 84px;column-gap:7px;margin-bottom:8px}.forge-workshop .fg-edges{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;overflow:visible}.forge-workshop .fg-edges path{fill:none;stroke:#b2a06d;stroke-width:1.4;vector-effect:non-scaling-stroke}.forge-workshop .fg-edges .fg-edge-active{stroke:#e1bd68;stroke-width:2}.forge-workshop .fg-node{z-index:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;position:relative;min-width:0;padding:5px 3px 4px;border:1px solid #797f57;border-radius:5px;color:#e4dec1;background:linear-gradient(135deg,#3b5038,#253c30);line-height:1.15;text-align:center;box-shadow:0 2px 3px #091b1466;transition:border-color .15s,box-shadow .15s}.forge-workshop .fg-node:hover{border-color:#c4b277}.forge-workshop .fg-node.fg-root{grid-column:1 / 5;grid-row:1;justify-self:center;width:190px;display:grid;grid-template-columns:39px auto;grid-template-rows:1fr auto;column-gap:8px;text-align:left;padding:5px 8px}.forge-workshop .fg-node.fg-root .fg-art{grid-row:1 / 3}.forge-workshop .fg-node.fg-root .fg-node-meta{position:absolute;right:5px;top:3px;font-size:11px}.forge-workshop .fg-node.fg-root .fg-node-name{align-self:end;padding-right:8px}.forge-workshop .fg-node.fg-root .fg-node-bonus{align-self:start}.forge-workshop .fg-node.fg-branch{grid-row:3;flex-direction:row;column-gap:7px;text-align:left;padding:5px 8px}.forge-workshop .fg-node.fg-branch .fg-node-copy{min-width:0}.forge-workshop .fg-node.fg-branch:nth-of-type(3){grid-column:1 / 3}.forge-workshop .fg-node.fg-branch:nth-of-type(4){grid-column:3 / 5}.forge-workshop .fg-node.fg-leaf{grid-row:5;gap:2px}.forge-workshop .fg-art{display:block;width:34px;height:34px;flex:0 0 auto;border-radius:4px;border:1px solid #b39a61;background-size:600% 600%;background-position:var(--research-x) var(--research-y);background-color:#323222;box-shadow:inset 0 0 0 1px #e8d28c33}.forge-workshop .fg-node-name{display:block;font-size:11px;font-weight:600;overflow-wrap:anywhere}.forge-workshop .fg-node-bonus{display:block;font-size:11px;color:#ddcf9c;margin-top:2px}.forge-workshop .fg-node-meta{display:block;font-size:11px;color:#adb79b;margin-top:3px}.forge-workshop .fg-node.fg-leaf .fg-art{width:30px;height:30px}.forge-workshop .fg-node.fg-leaf .fg-node-name{font-size:11px;line-height:1.15;min-height:13px;display:flex;align-items:center;justify-content:center}.forge-workshop .fg-node.fg-leaf .fg-node-meta{position:static;font-size:11px;margin-top:2px}.forge-workshop .fg-node.fg-selected{border-color:#ebca77;box-shadow:0 0 0 2px #e5bd5b35,0 2px 6px #07180c77}.forge-workshop .fg-node.fg-done{background:linear-gradient(125deg,#4b633b,#314a2f);border-color:#a7ad70}.forge-workshop .fg-node.fg-done .fg-node-meta{color:#dde9ae}.forge-workshop .fg-node.fg-running{border-color:#d8ad56;background:linear-gradient(125deg,#5e5631,#3a432e)}.forge-workshop .fg-node.fg-running .fg-node-meta{color:#ffe1a0}.forge-workshop .fg-node.fg-locked{background:linear-gradient(135deg,#2b3d31,#20342b);border-color:#53664c;color:#acb29c}.forge-workshop .fg-node.fg-locked .fg-art{filter:saturate(.38);opacity:.7}.forge-workshop .fg-node.fg-excluded{border-style:dashed;color:#979e87;background:#22382e}.forge-workshop .fg-node.fg-excluded .fg-art{filter:grayscale(.9);opacity:.48}.forge-workshop .fg-node.fg-excluded .fg-node-bonus{color:#a8ab91}
.forge-workshop .fg-detail{background:linear-gradient(115deg,#f5ecd5,#e5d6af);border:1px solid #b7a16b;border-radius:6px;padding:10px;color:#453c29;margin-bottom:9px}.forge-workshop .fg-detail-top{display:flex;align-items:center;gap:8px;margin-bottom:4px}.forge-workshop .fg-detail h3{font:18px Georgia,serif;flex:1;min-width:0}.forge-workshop .fg-detail-state{font-size:11px;white-space:nowrap;color:#726347}.forge-workshop .fg-detail p{font-size:11px;line-height:1.35;margin-bottom:6px}.forge-workshop .fg-costs{display:flex;gap:8px;flex-wrap:wrap;font-size:11px;color:#786a49;margin-bottom:7px}.forge-workshop .fg-costs b{color:#514427;font-variant-numeric:tabular-nums;font-weight:650}.forge-workshop .fg-costs .fg-short b{color:#a13c30}.forge-workshop .fg-action{width:100%;min-height:44px;display:flex;align-items:center;justify-content:center;gap:6px;border:1px solid #263d2b;border-radius:4px;background:linear-gradient(#4e6640,#314b34);color:#fff0c4;font-size:12px;font-weight:650;padding:7px 10px;box-shadow:inset 0 1px #e9f0c222,0 2px 3px #443d261c}.forge-workshop .fg-action:disabled{color:#8f8d72;background:#ded4b8;border-color:#c3b48a;box-shadow:none}.forge-workshop .fg-detail-reason{color:#775d36;font-size:11px;margin:5px 0 0;line-height:1.3}.forge-workshop .fg-confirm-actions{display:flex;gap:7px}.forge-workshop .fg-confirm-actions button{flex:1}.forge-workshop .fg-cancel{min-height:44px;border:1px solid #aa9568;border-radius:4px;background:#f5ecd6;color:#6c5835;font-size:12px;padding:6px}
.forge-workshop .fg-queue{border:1px solid #6d7753;background:#172c24;border-radius:5px;padding:8px 9px;margin-bottom:8px}.forge-workshop .fg-queue-top{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:11px}.forge-workshop .fg-queue-top b{font-weight:600}.forge-workshop .fg-countdown{font-variant-numeric:tabular-nums;color:#f0d79d;font-weight:650;white-space:nowrap}.forge-workshop .fg-queue-caption{font-size:11px;color:#b6bfa0}.forge-workshop .fg-queue-bottom{display:flex;gap:9px;align-items:center;margin-top:5px}.forge-workshop progress{display:block;min-width:0;flex:1;width:100%;height:5px;border:0;appearance:none;background:#3b4c35;border-radius:5px;overflow:hidden;color:#c0a466}.forge-workshop progress::-webkit-progress-bar{background:#3b4c35}.forge-workshop progress::-webkit-progress-value{background:linear-gradient(90deg,#987938,#efd493);border-radius:5px}.forge-workshop progress::-moz-progress-bar{background:#c9ae6b}.forge-workshop .fg-finish{border:1px solid #727a55;border-radius:4px;background:#2a4030;color:#d8d0a8;font-size:11px;min-height:44px;padding:5px 7px;white-space:nowrap}.forge-workshop .fg-empty-queue{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:34px}.forge-workshop .fg-empty-queue span{font-size:11px;color:#adb99d}.forge-workshop .fg-foot{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;font-size:11px;color:#aeb89a}.forge-workshop .fg-foot details{max-width:100%}.forge-workshop .fg-foot summary{cursor:pointer;min-height:44px;line-height:44px;color:#d3c695}.forge-workshop .fg-foot details p{margin:1px 0 7px;line-height:1.5;max-width:420px}.forge-workshop .fg-live{font-size:11px;color:#e6d49e;min-height:0;line-height:1.4}.forge-workshop .fg-live:not(:empty){margin:6px 0 0;padding:6px 8px;background:#51683c33;border-radius:4px;border:1px solid #81936144}.forge-workshop .fg-loading{padding:18px;font-size:12px}
@media(min-width:560px){.forge-workshop .fg-shell{padding:16px 20px}.forge-workshop .fg-head{margin-bottom:12px}.forge-workshop .fg-town{font-size:11px}.forge-workshop .fg-tree{grid-template-rows:58px 10px 60px 10px 84px;column-gap:12px}.forge-workshop .fg-node.fg-root{width:190px}.forge-workshop .fg-node-name{font-size:11px}.forge-workshop .fg-node.fg-leaf .fg-node-name{font-size:11px}.forge-workshop .fg-node.fg-leaf .fg-art{width:34px;height:34px}.forge-workshop .fg-node.fg-leaf .fg-node-meta{font-size:11px}.forge-workshop .fg-detail{padding:11px 13px}.forge-workshop .fg-detail p{font-size:12px}.forge-workshop .fg-costs{font-size:11px;gap:13px}}
@media(max-width:345px){.forge-workshop .fg-shell{padding:10px}.forge-workshop h1{font-size:21px}.forge-workshop .fg-tree{column-gap:5px}.forge-workshop .fg-node.fg-branch{gap:5px;padding:5px}.forge-workshop .fg-node.fg-branch .fg-art{width:30px;height:30px}.forge-workshop .fg-node-name{font-size:11px}.forge-workshop .fg-node-bonus{font-size:11px}.forge-workshop .fg-node.fg-leaf .fg-node-name{font-size:11px}.forge-workshop .fg-costs{gap:6px}.forge-workshop .fg-detail-state{font-size:11px}.forge-workshop .fg-detail h3{font-size:17px}}

/* Production talent controls: two compact views keep all five tiers readable. */
.forge-page{padding-top:16px}.forge-workshop button:disabled{opacity:1}.forge-workshop .fg-tier-cap{font-size:11px;line-height:1.35;color:#cbbd8f;text-align:right}.forge-workshop .fg-tree-tabs{display:flex;gap:6px;margin-bottom:7px}.forge-workshop .fg-tree-tabs button{flex:1;min-height:44px;border:1px solid #7f8159;border-radius:4px;background:#223a2e;color:#d4cfac;padding:4px 7px;font-size:12px;font-weight:600}.forge-workshop .fg-tree-tabs button small{display:block;font-size:11px;color:#aeb99a;font-weight:400}.forge-workshop .fg-tree-tabs button.active{background:#e7d6ab;color:#433b27;border-color:#bfa566}.forge-workshop .fg-tree-tabs button.active small{color:#796a47}.forge-workshop .fg-tree-hint{margin:0 0 8px;font-size:11px;color:#b8c0a2}.forge-workshop .fg-master-tree{grid-template-rows:98px 10px 98px 10px 98px}.forge-workshop .fg-master-tree .fg-node{grid-column:auto}.forge-workshop .fg-costs{gap:13px;align-items:center}.forge-workshop .fg-cost-item{display:inline-flex;align-items:center;gap:4px;font-size:12px}.forge-workshop .fg-cost-item .resource-portrait{width:21px;height:21px;border:0;background-color:transparent;box-shadow:none}.forge-workshop .fg-detail-top{align-items:baseline;flex-wrap:wrap}.forge-workshop .fg-detail-top h3{flex:1 1 150px}.forge-workshop .fg-detail-state{font-size:11px}.forge-workshop .fg-queue .job-progress{display:block;margin-top:6px;height:5px;background:#3b4c35}.forge-workshop .fg-queue .job-progress i{background:linear-gradient(90deg,#987938,#efd493)}.forge-workshop .fg-legacy{border-top:1px solid #71805866;color:#c1c7aa;font-size:11px}.forge-workshop .fg-legacy>summary{display:flex;align-items:center;justify-content:space-between;gap:7px;min-height:44px;cursor:pointer;color:#d7c995;list-style:none}.forge-workshop .fg-legacy>summary:before{content:'▸';color:#dbc789}.forge-workshop .fg-legacy[open]>summary:before{content:'▾'}.forge-workshop .fg-legacy>summary span{margin-left:auto;color:#bbc3a1;font-variant-numeric:tabular-nums;white-space:nowrap}.forge-workshop .fg-legacy>p{font-size:11px;margin:0 0 9px}.forge-workshop .fg-legacy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}.forge-workshop .fg-legacy-grid>section{min-width:0;padding:8px;border:1px solid #71805888;border-radius:4px;background:#233c2f}.forge-workshop .fg-legacy-grid h3{font:16px Georgia,serif;color:#eddfb6;margin-bottom:7px}.forge-workshop .fg-legacy-grid h3 small{display:block;font:11px system-ui;color:#bdc5a6;margin-top:3px}.forge-workshop .fg-legacy-grid .fg-costs{gap:6px}.forge-workshop .fg-legacy-grid .fg-action{font-size:11px;padding:6px}.forge-workshop .fg-city-note{font-size:11px;color:#aeb99b;margin:4px 0 0}.forge-workshop.fg-respec-dialog{padding:0;color:#4b402d}.forge-workshop.fg-respec-dialog h3{font:22px Georgia,serif;margin-bottom:8px}.forge-workshop.fg-respec-dialog p{margin-bottom:10px;font-size:12px}.forge-workshop.fg-respec-dialog .fg-costs{margin-bottom:12px}.forge-workshop .fg-node.fg-leaf .fg-node-name{overflow-wrap:anywhere}.forge-workshop .fg-node.fg-leaf .fg-node-meta{white-space:nowrap}
@media(max-width:600px){.forge-page{padding:12px 9px 90px}.forge-workshop .fg-shell{padding:11px}.forge-workshop .fg-legacy-grid .fg-action{font-size:11px}.forge-workshop .fg-costs{gap:9px}.forge-workshop .fg-node.fg-root{width:188px}.forge-workshop .fg-legacy>summary{font-size:11px}}
@media(max-width:345px){.forge-workshop .fg-legacy-grid{grid-template-columns:1fr}.forge-workshop .fg-costs{gap:7px}.forge-workshop .fg-detail-top h3{font-size:17px}.forge-workshop .fg-legacy>summary span{font-size:11px}}

.forge-workshop .fg-master-tree .fg-node.fg-leaf .fg-node-name{min-height:26px;line-height:1.15}

/* Personal city-color controls stay compact inside player and alliance profiles. */
.map-color-settings{margin:14px 0 18px;border:1px solid #ac9a6d88;border-radius:7px;background:#f0e5c9;color:#493e29;overflow:hidden}.map-color-settings>summary{display:flex;align-items:center;gap:11px;min-height:62px;list-style:none;cursor:pointer;padding:8px 12px}.map-color-settings>summary::-webkit-details-marker{display:none}.map-color-settings>summary>span{flex:1;font-size:14px;font-weight:650;line-height:1.3}.map-color-settings>summary small{display:block;font-size:11px;color:#7c6c4b;font-weight:400;margin-top:3px}.map-color-settings>summary>b{font-size:20px;color:#756342;font-weight:400}.map-color-settings[open]>summary{border-bottom:1px solid #b5a47766}.map-color-preview{display:block;flex:0 0 auto;width:26px;height:26px;border-radius:50%;border:2px solid #fff4d5;background:var(--map-color);box-shadow:0 0 0 1px #695d4188,0 0 10px 2px color-mix(in srgb,var(--map-color) 65%,transparent)}.map-color-body{padding:11px 12px 6px}.map-color-body>p{font-size:11px;line-height:1.5;margin:0 0 10px;color:#786a4d}.map-color-palette{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 10px}.map-color-swatch{position:relative;display:flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border:2px solid #fff4d6;border-radius:6px;background:var(--map-color);box-shadow:0 0 0 1px #8b7952;color:#172b24}.map-color-swatch:hover,.map-color-swatch:focus-visible{outline:2px solid #76613a;outline-offset:2px}.map-color-swatch.selected{box-shadow:0 0 0 2px #253e30,inset 0 0 0 2px #ffffff66}.map-color-swatch .icon{width:23px;height:23px;stroke-width:2.5;filter:drop-shadow(0 1px 1px #fff8)}.map-color-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.map-color-custom{display:flex;align-items:center;gap:8px;min-height:44px;font-size:12px;cursor:pointer}.map-color-custom input[type=color]{width:44px;height:44px;min-height:44px;padding:3px;border:1px solid #99865c;border-radius:5px;background:#fbf1d6;cursor:pointer}.map-color-reset{min-height:44px;font-size:11px;padding:7px 9px;color:#5f5033}.map-color-body .map-color-status{font-size:11px;min-height:16px;margin:5px 0 0;color:#47603a}.map-color-settings[aria-busy=true]{opacity:.75}.map-color-legend{display:flex;align-items:center;flex-wrap:wrap;gap:6px 15px;color:#d5d2b3;font-size:11px;line-height:1.4;margin:0 0 7px;padding:5px 8px;border:1px solid #6f795144;border-radius:5px;background:#1d362b}.map-color-legend>span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.map-color-legend i{width:9px;height:9px;display:block;border-radius:50%;background:var(--map-color);box-shadow:0 0 6px 1px var(--map-color)}.map-color-legend>small{font-size:11px;color:#aeb99c;margin-left:auto}.map-color-settings button:disabled,.map-color-settings input:disabled{cursor:default}
@media(max-width:420px){.map-color-settings>summary{padding:8px 10px}.map-color-body{padding:10px 10px 6px}.map-color-palette{gap:7px}.map-color-tools{gap:5px}.map-color-legend{gap:5px 12px}.map-color-legend>small{flex-basis:100%;margin-left:0}}

.map-color-settings>summary>b{transition:transform .15s}.map-color-settings[open]>summary>b{transform:rotate(180deg)}

/* Pending weekly alliance event: compact parchment panels, shared map/army accents. */
.weekly-event-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr);gap:18px;align-items:start}.weekly-event-main,.weekly-event-side>*{min-width:0}.weekly-event-main{padding:20px}.weekly-event-heading{display:flex;align-items:center;gap:12px;margin-bottom:13px}.weekly-event-heading h2{font-size:23px;line-height:1.15;margin:4px 0 0;overflow-wrap:anywhere}.weekly-event-emblem,.weekly-bonus-emblem{display:grid;place-items:center;flex:0 0 auto;width:48px;height:48px;background:#264437;border:1px solid #c7af6c;color:#efcf80;border-radius:8px}.weekly-event-emblem .icon{width:28px;height:28px}.weekly-owner-link,.weekly-neutral{display:flex;align-items:center;gap:8px;min-height:44px;width:100%;padding:9px 12px;border:1px solid #9a8b5d;border-radius:5px;background:#e8dcb9;color:#3b4229;text-align:left;font-size:13px}.weekly-owner-link span{overflow-wrap:anywhere}.weekly-neutral{color:#6e6045;background:#eee4cc}.weekly-state-copy{font-size:13px;line-height:1.55;margin:13px 0}.weekly-hold-clock{padding:12px 14px;border:1px solid #a68b4e88;background:#e7dbb7;border-radius:6px;margin:14px 0}.weekly-hold-clock>span{display:block;text-transform:uppercase;letter-spacing:.1em;font-size:10px;color:#786236}.weekly-hold-clock strong{display:block;font-family:Georgia,serif;font-size:29px;line-height:1.25;color:#304b37;margin:3px 0 7px;font-variant-numeric:tabular-nums}.weekly-hold-clock small{display:block;line-height:1.45;color:#77684d;font-size:11px;margin-top:7px}.weekly-hold-clock .job-progress{height:6px;background:#c8bb95}.weekly-hold-clock .job-progress i{background:#5d7b50}.weekly-deadlines{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:13px 0}.weekly-deadlines>div{padding:9px 11px;background:#efe5cd;border:1px solid #bcaa7c66;border-radius:5px}.weekly-deadlines small,.weekly-deadlines b,.weekly-deadlines span{display:block}.weekly-deadlines small{font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:#88754b}.weekly-deadlines b{font-size:12px;line-height:1.4;margin-top:4px;font-weight:600;overflow-wrap:anywhere}.weekly-deadlines span{font-size:11px;color:#526245;margin-top:3px;font-variant-numeric:tabular-nums}.weekly-event-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:15px}.weekly-event-actions button{display:flex;align-items:center;justify-content:center;gap:6px;white-space:normal;min-height:44px;font-size:12px;padding:9px}.weekly-event-actions>.ghost{grid-column:1/-1;min-height:44px}.weekly-action-message{font-size:11px;color:#8a6541;line-height:1.45;margin:10px 0 0}.weekly-event-main>.target-defense{margin-top:16px}.weekly-event-side{display:grid;gap:14px}.weekly-reward h2{display:flex;align-items:flex-start;gap:8px;font-size:21px;line-height:1.2;margin:8px 0 11px}.weekly-reward h2 .icon{width:23px;height:23px;flex-shrink:0}.weekly-reward>p{font-size:13px;line-height:1.5}.weekly-reward>small{display:block;font-size:11px;color:#857451;line-height:1.5;margin-top:13px}.weekly-event-rules,.weekly-legacy{padding:0}.weekly-event-rules>summary,.weekly-legacy>summary{padding:13px 16px;min-height:48px;font-size:13px;font-weight:600;cursor:pointer}.weekly-event-rules ol{padding:0 20px 3px 35px;font-size:12px;line-height:1.55}.weekly-event-rules li{margin-bottom:9px}.weekly-event-rules[open]>summary,.weekly-legacy[open]>summary{border-bottom:1px solid #b7a77955;margin-bottom:12px}.weekly-bonus{display:flex;align-items:flex-start;gap:11px;background:#294435;border:1px solid #b89e55;border-radius:7px;color:#e5d8ae;padding:14px;margin:0 0 15px}.weekly-event-side>.weekly-bonus{margin:0}.weekly-bonus-emblem{width:37px;height:37px;border-color:#bfa56055;background:#20372b}.weekly-bonus-emblem .icon{width:22px;height:22px}.weekly-bonus>div{min-width:0;flex:1}.weekly-bonus b{font-family:Georgia,serif;line-height:1.35;font-size:16px;font-weight:400;color:#f1dd9e}.weekly-bonus p{font-size:12px;line-height:1.45;margin:5px 0 7px}.weekly-bonus small{display:block;font-size:11px;line-height:1.5;color:#c7c09e}.weekly-bonus.compact{margin-bottom:13px;padding:11px 13px}.weekly-bonus.compact p{margin-bottom:4px}.weekly-bonus-ineligible{border-top:1px solid #ad9c6044;padding-top:7px;margin-top:8px}.weekly-own-garrisons h3{font-size:17px;margin:17px 0 8px}.weekly-garrison{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #ac9a6d55;padding:10px 0}.weekly-garrison b,.weekly-garrison small{display:block;line-height:1.4}.weekly-garrison b{font-size:12px}.weekly-garrison small{font-size:11px;color:#847452}.weekly-garrison button{min-height:44px;flex-shrink:0}.weekly-member-list{margin-top:12px}.weekly-member-list>summary{font-size:13px;min-height:44px;padding:10px 0;cursor:pointer}.weekly-member{padding:10px 0;border-top:1px solid #ad9b6c55}.weekly-member>b{font-size:12px}.weekly-member>div{margin-top:7px}.weekly-member>small{font-size:11px;color:#8a7453}.weekly-legacy-shop{padding:0 15px 12px}.weekly-shop-row{display:flex;align-items:center;gap:12px;justify-content:space-between;border-top:1px solid #ad9b6c55;padding:11px 0}.weekly-shop-row b,.weekly-shop-row small{display:block}.weekly-shop-row b{font-size:12px}.weekly-shop-row small{font-size:11px;color:#887858;line-height:1.5;margin-top:4px}.weekly-shop-row button{min-height:44px;flex-shrink:0}.weekly-target-summary{padding:10px 12px;border:1px solid #af9b5b66;border-radius:5px;background:#d9c98e22;margin:10px 0}.weekly-target-summary b,.weekly-target-summary small{display:block;line-height:1.4}.weekly-target-summary b{font-size:12px}.weekly-target-summary small{font-size:11px;color:#b9b592;margin-top:4px}.weekly-phase.held{color:#314b35;background:#d2d9aa}.weekly-phase.open{color:#6b421f;background:#ead4a5}.weekly-phase.won{color:#665119;background:#f0dda4}
@media(max-width:760px){.weekly-event-layout{grid-template-columns:1fr;gap:14px}.weekly-event-main{padding:17px}.weekly-event-side{gap:12px}.weekly-event-heading h2{font-size:22px}.weekly-deadlines{gap:7px}.weekly-deadlines>div{padding:8px 9px}.weekly-event-side .paper{margin:0}}@media(max-width:360px){.weekly-event-main{padding:13px}.weekly-event-heading{gap:9px}.weekly-event-emblem{width:42px;height:42px}.weekly-event-heading h2{font-size:20px}.weekly-deadlines{grid-template-columns:1fr}.weekly-garrison{align-items:flex-start;flex-wrap:wrap}.weekly-event-actions button{font-size:11px}.weekly-bonus{padding:11px;gap:8px}.weekly-bonus b{font-size:15px}}

/* Compact map tools and portrait-only forge selector. */
.app-shell .topbar.topbar-compact{grid-template-columns:220px minmax(0,1fr)auto}.app-shell .topbar.topbar-compact .topbar-actions{width:auto;display:flex;flex-wrap:nowrap;gap:4px;justify-content:flex-end}.app-shell .topbar.topbar-compact .topbar-actions>.square{flex:0 0 36px;width:36px;min-width:36px;height:36px;min-height:36px;padding:6px;position:relative}
.app-shell .world-viewport .world-search{display:flex;align-items:stretch;gap:6px;margin:0 0 7px;min-width:0}.app-shell .world-viewport .world-search input{width:0;min-width:60px;flex:1;min-height:44px;margin:0;padding:7px 9px}.app-shell .world-viewport .compact-map-navigation{display:flex;flex:0 0 auto;flex-wrap:nowrap;align-items:stretch;gap:4px;margin:0}.app-shell .world-viewport .compact-map-navigation button{min-width:44px;min-height:44px;height:44px;padding:5px 8px;font-size:11px;white-space:nowrap}.compact-map-navigation .map-nav-short{display:none}
.forge-workshop .fg-unit-picker{display:flex;gap:5px;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;scrollbar-color:#c1a865 #1a2a21;padding:3px 2px 7px;margin:0 -2px 5px;touch-action:pan-x;scroll-snap-type:x proximity}.forge-workshop .fg-unit-choice{position:relative;display:grid;place-items:center;flex:0 0 44px;width:44px;height:48px;min-width:44px;min-height:48px;padding:2px;border:1px solid #8c825c;border-radius:5px;background:#18291f;box-shadow:inset 0 0 0 1px #213c2b;scroll-snap-align:start;touch-action:pan-x}.forge-workshop .fg-unit-choice .fg-picker-art{display:block;width:38px;height:42px;min-width:0;border:0;border-radius:3px;background-color:#3c3928;pointer-events:none}.forge-workshop .fg-unit-choice.selected{border:2px solid #f3cd68;padding:1px;background:#776339;box-shadow:0 0 0 1px #f3cd6880,inset 0 0 0 1px #ffe7a0}.forge-workshop .fg-unit-choice:focus-visible{outline:3px solid #f3cd68;outline-offset:1px}
@media(max-width:999px){.app-shell .topbar.topbar-compact{grid-template-columns:160px minmax(0,1fr)auto}}
@media(max-width:599px){.app-shell .topbar.topbar-compact{grid-template-columns:86px minmax(0,1fr)auto}.app-shell .world-viewport .world-search{gap:5px}.app-shell .world-viewport .compact-map-navigation{gap:3px}.app-shell .world-viewport .compact-map-navigation button{font-size:10px;padding:4px 6px}.app-shell .compact-map-navigation .map-nav-full,.app-shell .compact-map-navigation .icon{display:none}.app-shell .compact-map-navigation .map-nav-short{display:inline}}

.billing-options{display:grid;gap:10px;margin:16px 0}.billing-options button{width:100%;white-space:normal}.coin-pack button{margin-top:12px}

.settlement-requirements{margin:16px 0;padding:12px;border:1px solid var(--line,#635c43);border-radius:10px}.settlement-requirements ul{list-style:none;padding:0;margin:10px 0}.settlement-requirements li{display:flex;align-items:center;gap:8px;margin:8px 0}.settlement-requirements .met{color:#a4cfa2}.settlement-requirements .missing{color:#f4ac91}

/* 083: compact map tools and an illustrated, aligned royal shop. */
.app-shell .world-viewport .world-search{align-items:center;gap:5px}
.app-shell .world-viewport .world-search input{min-height:32px;height:32px;padding:4px 7px;font-size:11px}
.app-shell .world-viewport .compact-map-navigation{align-items:center;gap:3px}
.app-shell .world-viewport .compact-map-navigation button{height:30px;min-height:30px;min-width:34px;padding:3px 5px;font-size:9px;line-height:1}
.app-shell .compact-map-navigation .map-nav-full,.app-shell .compact-map-navigation .icon{display:none}
.app-shell .compact-map-navigation .map-nav-short{display:inline}
.royal-shop{max-width:1120px;margin:0 auto}
.shop-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.shop-heading h1{font-size:29px;margin:0 0 4px}.shop-world{font-size:11px;margin:0;color:var(--muted)}
.shop-restore{font-size:10px;min-height:30px;padding:5px 7px;flex-shrink:0}
.shop-tabs{display:flex;gap:5px;padding:4px;border:1px solid #b49a63;background:#e5d7b8;border-radius:8px;margin-bottom:14px}
.shop-tabs button{flex:1;display:flex;gap:7px;align-items:center;justify-content:center;min-height:36px;padding:6px 10px;border:1px solid transparent;border-radius:5px;background:transparent;color:#625236;font-weight:650;font-size:13px}
.shop-tabs button.active{background:linear-gradient(#45624b,#263f30);border-color:#304733;color:#fce5a7;box-shadow:0 2px 5px #26332628}
.shop-tabs .resource-portrait,.shop-tabs .icon{width:22px;height:22px;min-width:22px}
.shop-premiums{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.royal-shop .paper{margin:0;min-width:0;overflow:hidden;border-color:#baa06b;box-shadow:0 5px 18px #4e371014}
.shop-premium{display:grid;grid-template-columns:86px minmax(0,1fr);gap:12px;padding:12px;border-top:3px solid #b89142;align-content:start}
.shop-art{display:block;width:100%;height:auto;object-fit:cover;background:#23362a;border-radius:6px;border:1px solid #b99c5c}
.shop-premium>.shop-art{height:105px;align-self:start}
.shop-premium h2{font-size:20px;line-height:1.12;margin:1px 0 7px}
.shop-effect{font-size:12px;line-height:1.4;margin:0 0 8px}
.shop-premium .badge{font-size:10px;padding:3px 6px}
.shop-until{display:block;font-size:9px;margin:5px 0 0;line-height:1.4}
.shop-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;grid-column:1/-1}
.shop-buy{display:flex;flex-direction:column;gap:2px;min-width:0;width:100%;min-height:48px;padding:6px 5px;font-size:11px;line-height:1.15;border-radius:5px;white-space:normal}
.shop-buy>span{font-size:10px}.shop-buy strong{font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}.shop-buy small{color:inherit;opacity:.85;font-size:10px;white-space:nowrap}
.shop-entitlement{grid-column:1/-1;display:flex;align-items:center;gap:6px;justify-content:space-between;font-size:10px;color:var(--muted);line-height:1.4}
.shop-entitlement .small{min-height:28px;padding:4px 6px;font-size:10px}
.shop-bank{grid-column:1/-1;font-size:10px;margin:0}
.shop-coins{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;align-items:stretch}
.shop-coin{display:grid;grid-template-rows:auto 1fr auto;gap:10px;text-align:center;padding:10px}
.shop-coin>.shop-art{aspect-ratio:1/1}
.shop-coin-amount{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:48px}
.shop-coin-amount b{font:29px Georgia,serif;font-variant-numeric:tabular-nums;white-space:nowrap}.shop-coin-amount span{font-size:10px;color:#77613c}
.shop-coin>.shop-buy{margin:0;min-height:43px}
@media(max-width:1050px){.shop-premiums{grid-template-columns:1fr}.shop-premium{grid-template-columns:110px minmax(0,1fr)}.shop-premium>.shop-art{height:110px}.shop-options{grid-column:2;grid-row:2}.shop-premium-intro{grid-column:2}.shop-premium>.shop-art{grid-row:1/3}.shop-coins{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:599px){.shop-heading{align-items:flex-start}.shop-heading h1{font-size:25px}.shop-world{font-size:10px}.shop-restore{font-size:9px;padding:4px 6px}.shop-tabs{margin-bottom:10px}.shop-tabs button{font-size:12px;min-height:34px}.shop-premium{grid-template-columns:86px minmax(0,1fr);gap:9px;padding:10px}.shop-premium>.shop-art{height:104px}.shop-premium h2{font-size:19px;margin-bottom:5px}.shop-effect{font-size:11px;margin-bottom:5px}.shop-options{gap:6px}.shop-buy{min-height:46px;padding:5px 3px}.shop-buy strong{font-size:13px}.shop-buy>span,.shop-buy small{font-size:9px}.shop-coins{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.shop-coin{padding:9px;gap:8px}.shop-coin-amount b{font-size:27px}}

/* Both independent actions own their space; no flex overflow over the city picker. */
.app-shell .topbar.topbar-compact .rewards-entry.reward-ready{color:#f6da91;border-color:#bea365;background:#ffffff09}
.reward-ready-dot{position:absolute;right:3px;top:3px;width:6px;height:6px;border-radius:50%;background:#f1cd67;box-shadow:0 0 0 2px #314333}
@media(max-width:359px){.app-shell .topbar.topbar-compact{grid-template-columns:22px minmax(0,1fr)auto}}
