: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}
.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)}
