/* Omni Capital: navy, blue, white and silver throughout the game interface. */
:root{color-scheme:dark;--bg:#071423;--panel:#10263d;--line:#345878;--text:#f5f8ff;--muted:#b9cee3;--gold:#79baff;--green:#90e5bc;--red:#ff9a9a;--ink:#f5f8ff;--parchment:#10263d;--omni-blue:#237ce2}
body{background:radial-gradient(ellipse at top,#163959,#071423 70%);color:var(--text)}
body header,body .game-toolbar{background:linear-gradient(110deg,#0b2138,#143959);border-color:#70b2f5;box-shadow:0 3px 15px #0004}
body .brand,body .brand small,body .crest{color:#f5f8ff}
body .layout>aside{background:#0c2035;border-color:var(--line)}
body :is(.panel,.queue,.building,.unit-card,.target-panel,.account-panel,.player-profile,.kingdom-village,.keep-upgrades,.battle-outcome,.mail-row,.world-gate>.panel){background:#10263d;border:1px solid #49759d;border-radius:6px;color:var(--text)}
body :is(.panel-heading,.town-panel .panel-heading){background:linear-gradient(110deg,#173e63,#102d48);color:#fff;border-color:#49759d}
body :is(.panel-heading h2,.panel-heading span,.overview-queue h2,.overview-economy h2){color:#fff}
body :is(.resource-bar,.overview-troops,.garrison-strip){background:#102d48;border-color:#49759d}
body .resource{border-color:#345878;color:#f5f8ff}
body .resource small,body .resource-name{color:#c7ddf2}
body .resource .rate,body .positive{color:#90e5bc}
body .negative{color:#ff9a9a}
body button:not(.tile):not(.scene-building):not(.scene-label):not(.troop-portrait-button){background:#1a446c;color:#f5f8ff;border-color:#639ed5;border-radius:5px}
body button:not(.tile):not(.scene-building):not(.scene-label):hover{background:#245f96;border-color:#c4e2ff;color:#fff}
body button:disabled{opacity:.5}
body .primary,body button.primary{background:#237ce2;color:#fff;border-color:#89c5ff}
body .tabs button{background:transparent!important;color:#c7ddf2!important;border-radius:0!important}
body .tabs button[aria-current]{color:#fff!important;border-bottom:3px solid #79baff}
body :is(input,select,textarea){background:#091b2e;color:#f5f8ff;border:1px solid #639ed5}
body :is(button,a,input,select,textarea):focus-visible{outline:2px solid #e4f2ff;outline-offset:2px}
body :is(.panel,.queue,.building,.unit-card,.target-panel,.account-panel,.player-profile,.kingdom-village,.keep-upgrades,.battle-outcome) :is(p,label,h2,h3,small,.cost,.level,.eyebrow,.activity-order b){color:#dceafa}
body :is(.panel,.queue,.building,.unit-card,.target-panel,.account-panel,.player-profile) :is(h2,h3){color:#fff}
body .building-detail{background:linear-gradient(120deg,#163a5b,#0c233c);border-color:#639ed5;color:#f5f8ff}
body .building-detail :is(p,h2,.eyebrow,.cost){color:#dceafa}
body :is(.classic-buildings,.mobile-settlement-buildings,.classic-building-row,.keep-upgrade-table th,.keep-upgrade-table td){background:#10263d;color:#f5f8ff;border-color:#345878}
body :is(.classic-building-row small,.mobile-settlement-buildings small){color:#c7ddf2}
body dialog{background:#10263d;border:2px solid #79baff;color:#f5f8ff;box-shadow:0 18px 70px #0009}
body dialog::backdrop{background:#04101dd9}
body dialog :is(h2,h3,p,label,small,.eyebrow){color:#dceafa}
body :is(.onboarding-strip,.guide-tip,.protection-notice,.alert){background:#163a5b;color:#f5f8ff;border-color:#79baff}
body :is(.town-panel,.settlement-scene-viewport){background:#0c2035}
body .scene-label-layer .scene-label{background:#071b32db;color:#fff;border-color:#d6eaff}
body .scene-label-layer .scene-label small{color:#bdddff}
body .town-panel .panel-heading #mobileVersion{background:#237ce2;color:#fff;border-color:#c7e3ff}
body .town-panel .panel-heading #townStage,body .building-navigation label{color:#c7ddf2}
body :is(.mail-row,.profile-link){color:#dceafa}
body .mail-row.unread{background:#1a446c;color:#fff}
body :is(.alliance-badge,.player-alliance-badge){background:#1a446c;color:#fff;border-color:#79baff}
body .world-gate{background:#071423ed}

/* The login page keeps its approved illustration and shares the game palette. */
body .hero:after{background:linear-gradient(90deg,#061629ed,#0c2843ba 32%,#0d213833 65%,#07142322)}
body .login{background:#0c233ce8;border:1px solid #79baff;border-radius:8px}
body .hero :is(.intro,.help,.brand,.world,.preview-note,label){color:#dceafa}
body .hero .brand strong{color:#fff}
@media(max-width:650px){body .hero:after{background:linear-gradient(0deg,#061629f5,#0c2843aa 65%,#0d213833)}}

/* Square, close-up world view with fixed coordinate gutters. */
.map-axis-frame{display:grid;grid-template-columns:28px minmax(0,1fr);grid-template-rows:auto 26px;padding:0 10px 6px 0}.map-axis-frame .map-wrap{margin:0;aspect-ratio:1;width:100%}.map-axis-y{display:grid;grid-template-rows:repeat(6,1fr);align-items:center;text-align:center;color:#d4eaff;font-size:12px;font-variant-numeric:tabular-nums}.map-axis-x{grid-column:2;display:grid;grid-template-columns:repeat(6,1fr);align-items:center;text-align:center;color:#d4eaff;font-size:12px;font-variant-numeric:tabular-nums}#worldMap{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(6,minmax(0,1fr))}.tile.village .village-art,.tile.village.is-camp .village-art{width:100%;height:100%;max-width:none;max-height:none}.tile{border-color:#ffffff12}.tile.selected{outline:3px solid #f7fcff;outline-offset:-3px;z-index:2}#miniMap{image-rendering:pixelated}

/* Approved terrain atlas: coordinate-stable ground variation under transparent sites. */
#worldMap .tile:not(.lake){background-image:url("assets/world-approved/terrain-v3.png");background-size:400% 400%;background-color:#849849}#worldMap .tile:not(.lake):hover{filter:brightness(1.08)}#worldMap .tile.village .village-art{width:100%;height:100%;filter:drop-shadow(0 2px 2px #18352255)}#worldMap .tile .terrain-art{width:100%;height:100%;max-width:none;max-height:none}#worldMap .map-rock{width:65%;height:65%}
#worldMap .tile:not(.lake)[data-ground="0"]{background-position:0.0000% 0.0000%}
#worldMap .tile:not(.lake)[data-ground="1"]{background-position:33.3333% 0.0000%}
#worldMap .tile:not(.lake)[data-ground="2"]{background-position:66.6667% 0.0000%}
#worldMap .tile:not(.lake)[data-ground="3"]{background-position:100.0000% 0.0000%}
#worldMap .tile:not(.lake)[data-ground="4"]{background-position:0.0000% 33.3333%}
#worldMap .tile:not(.lake)[data-ground="5"]{background-position:33.3333% 33.3333%}
#worldMap .tile:not(.lake)[data-ground="6"]{background-position:66.6667% 33.3333%}
#worldMap .tile:not(.lake)[data-ground="7"]{background-position:100.0000% 33.3333%}
#worldMap .tile:not(.lake)[data-ground="8"]{background-position:0.0000% 66.6667%}
#worldMap .tile:not(.lake)[data-ground="9"]{background-position:33.3333% 66.6667%}
#worldMap .tile:not(.lake)[data-ground="10"]{background-position:66.6667% 66.6667%}
#worldMap .tile:not(.lake)[data-ground="11"]{background-position:100.0000% 66.6667%}
#worldMap .tile:not(.lake)[data-ground="12"]{background-position:0.0000% 100.0000%}
#worldMap .tile:not(.lake)[data-ground="13"]{background-position:33.3333% 100.0000%}
#worldMap .tile:not(.lake)[data-ground="14"]{background-position:66.6667% 100.0000%}
#worldMap .tile:not(.lake)[data-ground="15"]{background-position:100.0000% 100.0000%}

/* Map labels and coordinate gutters share the navy theme for clear contrast. */
body #mapView .map-panel{background:#10263d;color:#f5f8ff;border-color:#79baff}
body #mapView .map-controls{background:#173e63;color:#e2efff;border-color:#49759d}
body #mapView :is(.map-panel,.minimap-panel) .panel-heading span{color:#d6eaff}
body #mapView :is(.map-size,.mini-coordinates,.mini-caption,.legend,.coordinate-form label,#mapCoordinates){color:#d6eaff}
body #mapView .coordinate-form input{background:#091b2e;color:#f5f8ff;border-color:#639ed5}
body #mapView :is(.target-coords,.march-summary,.troop-input small){color:#d6eaff}
body #mapView :is(.map-axis-x,.map-axis-y){color:#f5f8ff;font-weight:600}

/* One world-space landscape connects across grid edges rather than restarting in every tile. */
#mapViewport{isolation:isolate}#mapGround{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1}body #worldMap{gap:0;background:transparent}body #worldMap>.tile:not(.lake){background:none;border:0;box-shadow:inset -1px -1px #ffffff0a}body #worldMap>.tile:not(.lake):hover{filter:none;box-shadow:inset 0 0 0 2px #d6eaff99}body #worldMap .village-art.map-sprite{width:96%;height:96%;max-width:none;max-height:none}body #worldMap>.tile.selected{outline:3px solid #f5f8ff;outline-offset:-3px}body #worldMap .terrain-art.map-sprite{width:94%;height:94%}

/* Approved neighborhood-selected puzzle terrain is painted behind the hit grid. */
body #worldMap>.tile,body #worldMap>.tile.lake{background:none;border:0;box-shadow:inset -1px -1px #ffffff0a}body #worldMap>.tile.lake::after{display:none}body #worldMap>.tile .terrain-art{display:none}#mapGround{background:#87b347;image-rendering:auto}body #worldMap>.tile.selected{outline:3px solid #fff;outline-offset:-3px}body #worldMap>.tile:hover{filter:none}

/* Approved painted resources share one transparent atlas. */
body .sprite.art-resource-0{background-image:url('assets/world-approved/sites-resources-v4.png');background-size:554.512635% 369.675090%;background-position:3.177125% 96.251673%;background-repeat:no-repeat}
body .sprite.art-resource-1{background-image:url('assets/world-approved/sites-resources-v4.png');background-size:640.000000% 426.666667%;background-position:28.086420% 93.622449%;background-repeat:no-repeat}
body .sprite.art-resource-2{background-image:url('assets/world-approved/sites-resources-v4.png');background-size:546.619217% 364.412811%;background-position:51.713147% 96.366083%;background-repeat:no-repeat}
body .sprite.art-resource-3{background-image:url('assets/world-approved/sites-resources-v4.png');background-size:584.030418% 389.353612%;background-position:96.700707% 94.809461%;background-repeat:no-repeat}
body .sprite.art-resource-4{background-image:url('assets/world-approved/sites-resources-v4.png');background-size:688.789238% 459.192825%;background-position:74.105103% 92.946317%;background-repeat:no-repeat}

/* Battle dispatches: readable documents with approved troop illustrations. */
#battleReportDialog{width:min(850px,calc(100vw - 20px));padding:0;max-height:92svh;background:#f4f8fd;color:#17314b;border:2px solid #75a9de}
#battleReportDialog .dialog-close{z-index:3;background:#14324f;color:white;right:10px;top:10px}
.battle-document{padding:24px}.report-document-heading{display:flex;gap:14px;align-items:center;padding-right:35px;border-bottom:2px solid #94b9db;padding-bottom:16px}.report-document-heading h2{margin:4px 0;color:#183f66;font-size:27px}.report-document-heading .eyebrow{color:#506f8a;font-size:11px}.report-seal{display:grid;place-items:center;width:46px;height:46px;flex-shrink:0;background:#17466f;color:#eef7ff;border:2px solid #94b9db;border-radius:50%;font-size:24px}.report-metadata{display:grid;grid-template-columns:130px minmax(0,1fr);margin:14px 0;font-size:14px}.report-metadata dt,.report-metadata dd{margin:0;padding:9px 12px;border-bottom:1px solid #cad9e8}.report-metadata dt{font-weight:700;background:#e1ebf5}.report-metadata dd{overflow-wrap:anywhere}.report-illustration{height:175px;display:flex;align-items:end;justify-content:center;overflow:hidden;background:linear-gradient(180deg,#113252,#2e5e85 70%,#233d4c);border:1px solid #abc9e4;border-radius:5px}.report-illustration img{height:170px;width:150px;object-fit:contain}.report-result{align-self:center;display:flex;flex-direction:column;align-items:center;text-align:center;color:#fff;padding:12px;gap:8px}.report-result span{font-size:10px;letter-spacing:2px;color:#c2dcef}.report-result strong{font-family:Georgia,serif;font-size:25px;line-height:1.2}.report-narrative{font-size:14px;line-height:1.6;color:#3b536a}.report-army{margin:18px 0;border:1px solid #b2c9df;border-radius:5px;overflow:hidden}.report-army header{display:flex;gap:16px;align-items:center;background:#244f76;color:white;padding:10px 14px;flex-wrap:wrap}#battleReportDialog .report-army h3{margin:0;font-size:17px;color:#fff}.report-location{margin:0;padding:10px 14px;background:#eaf1f8;font-size:13px}.report-force-table{text-align:center;table-layout:fixed;min-width:440px}.report-force-table th,.report-force-table td{color:#203d59;border-bottom:1px solid #c4d7e8;padding:10px 6px;font-size:14px}.report-force-table th:first-child{width:85px;text-align:left;padding-left:12px}.report-force-table thead th{background:#f2f6fb}.report-force-table thead th span:not(.unit-art){display:block;font-size:11px;margin-top:3px}.report-force-table .unit-art{width:30px;height:30px}.report-losses td{color:#9f3441;background:#fff1f2}.report-strengths{display:flex;justify-content:space-between;gap:12px;padding:12px;background:#e0edf9;border-radius:4px;font-size:14px}.report-strengths b{display:block;font-size:20px}.report-aftermath{padding:14px;border:1px solid #b2c9df;background:white;border-radius:5px;margin-top:18px}#battleReportDialog .report-aftermath h3{margin:0 0 10px;color:#234d74}.report-aftermath p{font-size:14px}.battle-loot{display:flex;gap:12px;flex-wrap:wrap}.battle-loot>span{display:flex;align-items:center;gap:5px;font-size:11px}.battle-loot b{display:block;font-size:15px}.report-capital-discovery{display:block;margin-top:7px;padding:8px;background:#dceeff;border-left:3px solid #357eb8}.report-combat-notes{margin-top:14px;font-size:13px}.battle-document footer{display:flex;justify-content:flex-end;margin-top:18px}.report-register .report{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;padding:16px}.report-register .report-seal{width:36px;height:36px;font-size:20px}.report-list-copy strong,.report-list-copy small{display:block}.report-list-copy small{font-size:12px;margin-top:6px;color:#c3d8ef}.report-register time{font-size:12px;color:#c3d8ef}.report-register .report-open{grid-column:2/4;font-size:12px;color:#9dccff}.report-register .good .report-seal{background:#205d58}.report-register .bad .report-seal{background:#71364b}
@media(max-width:600px){.battle-document{padding:14px}.report-document-heading h2{font-size:21px}.report-metadata{grid-template-columns:92px minmax(0,1fr);font-size:12px}.report-metadata dt,.report-metadata dd{padding:8px}.report-illustration{height:135px}.report-illustration img{height:125px;width:80px}.report-result{padding:4px}.report-result strong{font-size:19px}.report-register .report{grid-template-columns:36px minmax(0,1fr)}.report-register time{grid-column:2}.report-register .report-open{grid-column:2}.report-strengths{font-size:12px}.report-strengths b{font-size:17px}}

/* Keep the portrait mounted while live building values and timers update. */
.building-detail-stable{align-items:start}.building-detail-stable .building-portrait{position:sticky;top:12px}.building-detail-stable #buildingDetailLive{min-width:0}.building-detail-copy{min-width:0}.building-detail-stable .building-construction{margin-top:18px}
@media(max-width:760px){
.layout[data-view="village"] .village-scene{width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;aspect-ratio:1402/1122;background-size:100% 100%!important;background-position:center!important;margin-inline:auto;flex:none}
.layout[data-view="village"] .village-overview{min-width:0;max-width:100%;overflow:hidden}
.layout[data-view="village"] .settlement-art-frame{min-width:0;max-width:100%;overflow:hidden}
.building-detail-stable{display:block}.building-detail-stable .building-portrait{position:static;width:min(100%,280px);margin:0 auto 14px}.building-detail-stable #buildingDetailLive{width:100%}
}

@media(max-width:760px){.settlement-scene-viewport{min-width:0!important;width:100%;height:auto!important;overflow:hidden}.layout[data-view="village"] .scene-label-layer .scene-label{font-size:clamp(8px,2vw,11px);padding:2px 4px;max-width:25%}.layout[data-view="village"] .scene-label-layer .scene-label small{font-size:inherit}.layout[data-view="village"] .settlement-workspace{min-width:0;grid-template-columns:minmax(0,1fr)}}

body header .brand img.kingdom-crest{width:36px;height:36px;object-fit:contain;flex-shrink:0}@media(max-width:650px){body header .brand img.kingdom-crest{width:28px;height:28px}}

.standings .panel-heading{flex-wrap:wrap;gap:12px}.standings .panel-heading label{display:flex;align-items:center;gap:8px}.standings select{max-width:100%;font-size:14px}.ranking-note{font-size:13px;color:#c5dbef;padding:0 16px 12px;line-height:1.5}@media(max-width:650px){.standings .panel-heading label{width:100%;flex-wrap:wrap}.standings select{width:100%}}

/* Sheet crops must remain square even in compressed flex rows. */
body .sprite[class*="art-resource-"]{aspect-ratio:1;flex-shrink:0;overflow:hidden}
body .unit-art{aspect-ratio:1;flex-shrink:0;overflow:hidden}

#serverClock{display:block;font-size:12px;color:#c3d8ef;font-variant-numeric:tabular-nums}.keep-upgrade-table button[data-upgrade]{white-space:normal}

/* Consistent Keep grid: cell surfaces span the full column, never the label. */
body .keep-upgrade-table{table-layout:fixed;width:100%;border-collapse:collapse}
body .keep-upgrade-table th,body .keep-upgrade-table td{border:1px solid #345878;overflow-wrap:anywhere}
body .keep-upgrade-table th{background:#214564;color:#f5f8ff}
body .keep-upgrade-table td:first-child,body .keep-upgrade-table td:last-child{background:#173650}
body .keep-upgrade-table .keep-building-link{width:100%;min-height:56px;white-space:normal;background:transparent;box-shadow:none;border:0;border-radius:0;color:#f5f8ff;padding:0;gap:10px}
body .keep-upgrade-table .keep-building-link:hover{background:#244966}
body .keep-upgrade-table td:last-child button[data-upgrade]{width:100%;min-height:44px;white-space:normal;padding:8px;line-height:1.35;overflow-wrap:anywhere}
body .keep-upgrade-table td:last-child button:disabled{opacity:1;color:#b6ccdf;background:#193750;border-color:#446b8c}
@media(min-width:701px){
 body .keep-upgrade-table th:nth-child(1){width:22%}
 body .keep-upgrade-table th:nth-child(2){width:10%}
 body .keep-upgrade-table th:nth-child(3){width:29%}
 body .keep-upgrade-table th:nth-child(4){width:10%}
 body .keep-upgrade-table th:nth-child(5){width:29%}
 body .keep-upgrade-table th,body .keep-upgrade-table td{padding:10px}
}
@media(max-width:700px){
 body .keep-upgrade-table tr{gap:0;padding:0;border:1px solid #345878;margin-bottom:12px;background:#10263d}
 body .keep-upgrade-table td{padding:10px;border:1px solid #345878}
 body .keep-upgrade-table .keep-building-link{min-height:44px}
}
.troop-art-pending{display:flex;min-height:140px;align-items:center;justify-content:center;flex-direction:column;color:#fff;background:#173650;padding:12px}.troop-art-pending small{font-size:12px;color:#c6dbed}.troop-text-icon{display:inline-flex;padding:4px;color:white;background:#214564;border:1px solid #b9d9f4;font-size:12px}.legion-troop-inputs{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}.legion-troop-inputs input{width:100%;min-width:0}#legionForm{display:grid;gap:12px}#legionRoster{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:16px}#marchLegions label{display:flex;align-items:center;gap:10px}#marchLegions input{width:auto}.garrison-strip{flex-wrap:wrap}.overview-troops{flex-wrap:wrap}

#overviewTroops{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));}#overviewTroops button{min-width:0;white-space:normal;}@media(max-width:700px){#overviewTroops{grid-template-columns:repeat(3,minmax(0,1fr));}#legionsPanel .general-card select{max-width:100%;}#marchLegions{min-width:0;}}

.unit-art.approved-troop-icon{background-size:contain;background-position:center;background-repeat:no-repeat}

.map-hover-card{position:fixed;z-index:10000;width:320px;max-width:calc(100vw - 24px);pointer-events:none;background:#10263df5;color:#edf6ff;border:2px solid #a8d4ff;border-top:4px solid #3184e8;border-radius:10px;box-shadow:0 12px 35px #00112699;overflow:hidden;font:14px/1.4 system-ui,sans-serif}
.map-hover-card[hidden]{display:none}.map-hover-heading{display:flex;gap:12px;align-items:center;padding:14px;background:linear-gradient(135deg,#204c76,#10263d);border-bottom:1px solid #618caf}.map-hover-heading .map-hover-art{width:72px;height:62px;flex:none}.map-hover-heading span{font-size:12px;color:#b2d8ff;letter-spacing:1px}.map-hover-heading h3{font:600 20px/1.2 Georgia,serif;color:#fff;margin:5px 0 0;overflow-wrap:anywhere}.map-hover-details{padding:8px 14px}.map-hover-row{display:grid;grid-template-columns:1fr 1.25fr;gap:12px;padding:7px 0;border-bottom:1px solid #51799a44}.map-hover-row:last-child{border-bottom:0}.map-hover-row span{color:#bcd3e8}.map-hover-row strong{text-align:right;font-weight:600;overflow-wrap:anywhere;color:#fff}.map-hover-hint{margin:0;padding:10px 14px;background:#1b3c5d;color:#c6def5;font-size:12px}

.unit-card.recruitment-locked .troop-full-body{opacity:.3;filter:grayscale(.65)}
.unit-card.recruitment-locked .troop-portrait-button:hover .troop-full-body{opacity:.45}
.unit-card .recruitment-status{font-size:14px;line-height:1.4;margin:0 0 14px;padding:8px 10px;border:1px solid #638aae;border-radius:4px;background:#173b5d;color:#e6f3ff}
.unit-card.recruitment-locked .recruitment-status{background:#182b3d;border-color:#a1b6c9;color:#fff}
.unit-card .troop-research-heading{margin:0 0 6px;font-size:14px;color:#fff}

body .sprite.art-resource-4{background-image:url('assets/resource-gold-omni-v2.png');background-size:contain;background-position:center;background-repeat:no-repeat}

#help .quick-play-guide{padding-left:24px}#help .quick-play-guide li{margin:0 0 16px;line-height:1.55}#help .quick-play-guide b{color:#fff}

/* Battle reports use an explicit palette, independent of page header/panel styles. */
body #battleReportDialog{background:#0d2237;color:#e9f3ff;border:2px solid #91c8ff;width:min(940px,calc(100vw - 24px));padding:0;color-scheme:dark}
#battleReportDialog .battle-document{padding:24px;color:#e9f3ff}
#battleReportDialog header{position:static;top:auto;z-index:auto;height:auto;min-height:0;box-shadow:none;flex-wrap:wrap}
#battleReportDialog .report-document-heading{justify-content:flex-start;gap:14px;padding:16px 46px 16px 16px;background:#183f62;border-bottom:1px solid #7aa8cf;border-radius:5px}
#battleReportDialog .report-document-heading>div{min-width:0;flex:1}
#battleReportDialog .report-document-heading h2{color:#fff;line-height:1.25;overflow-wrap:anywhere;margin:6px 0 0}
#battleReportDialog .report-document-heading .eyebrow{color:#c1def8;font-size:12px;line-height:1.4;letter-spacing:1px}
#battleReportDialog .report-metadata{color:#e9f3ff;font-size:14px}
#battleReportDialog .report-metadata dt{background:#244866;color:#f3f8ff}
#battleReportDialog .report-metadata dd{background:#142e46;color:#e9f3ff}
#battleReportDialog .report-metadata dt,#battleReportDialog .report-metadata dd{border-color:#537a9d}
#battleReportDialog .report-narrative,#battleReportDialog .report-location{color:#d5e9fa;line-height:1.6}
#battleReportDialog .report-location{background:#1a3751;font-size:14px}
#battleReportDialog .report-army{background:#142e46;border-color:#638aaf}
#battleReportDialog .report-army header{justify-content:space-between;padding:12px 14px;background:#244f76;border-bottom:1px solid #638aaf}
#battleReportDialog .report-army h3,#battleReportDialog .report-army b{color:#fff}
#battleReportDialog .report-force-table{min-width:850px;table-layout:fixed}
#battleReportDialog .report-force-table th,#battleReportDialog .report-force-table td{color:#e9f3ff;border-color:#537a9d;background:#142e46}
#battleReportDialog .report-force-table thead th{background:#1c3c59;color:#fff}
#battleReportDialog .report-force-table thead th span:not(.unit-art){font-size:12px;white-space:normal;overflow-wrap:anywhere;line-height:1.3}
#battleReportDialog .report-force-table .report-losses td{background:#422839;color:#ffb8c4}
#battleReportDialog .report-strengths{background:#244866;color:#e9f3ff;flex-wrap:wrap}
#battleReportDialog .report-strengths b{color:#fff}
#battleReportDialog .report-aftermath{background:#142e46;border-color:#638aaf;color:#e9f3ff}
#battleReportDialog .report-aftermath h3{color:#fff;margin:0 0 12px}
#battleReportDialog .report-aftermath p,#battleReportDialog .report-aftermath strong,#battleReportDialog .report-aftermath b,#battleReportDialog .report-combat-notes{color:#e9f3ff}
#battleReportDialog .report-capital-discovery{background:#244866;color:#fff;border-left-color:#83bdff}
#battleReportDialog .battle-loot>span{font-size:14px;color:#e9f3ff}
#battleReportDialog .report-army>h3,#battleReportDialog .report-army>p{padding-inline:14px}
@media(max-width:600px){#battleReportDialog .battle-document{padding:14px}#battleReportDialog .report-document-heading{padding:12px 36px 12px 12px}#battleReportDialog .report-document-heading .report-seal{width:36px;height:36px;font-size:20px}#battleReportDialog .report-metadata{grid-template-columns:100px minmax(0,1fr);font-size:14px}}

/* Banner Hall progression: readable controls and stable candidate portraits. */
body .banner-tabs{display:flex;gap:8px;margin:16px 0;flex-wrap:wrap}body .banner-tabs [aria-selected="true"]{background:#2079dc;border-color:#f4f8ff;color:#fff}
body .banner-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}body .banner-counts>div{padding:12px;background:#112f51;border:1px solid #548ac0;border-radius:8px}body .banner-counts dt{font-size:12px;color:#bbd4ee}body .banner-counts dd{margin:5px 0 0;font-size:22px;color:#fff;font-weight:700}
body .flagman-permits input{max-width:120px;margin:8px}body .general-stars{display:block;color:#f1c75b;font-size:22px;letter-spacing:3px}body .daily-general img{width:100%;height:200px;object-fit:contain}body .daily-general.general-hired img,body .daily-general.general-locked img{opacity:.3;filter:grayscale(.6)}body .general-card{min-width:0}body .general-card button{width:100%;margin:5px 0}body .general-dismiss{color:#ffb4b4;border-color:#af6262}body #dismissGeneralDialog{background:#0b2340;color:#eff6ff;border:2px solid #6da7e7;max-width:520px}body #dismissGeneralDialog h2,body #dismissGeneralDialog p{color:#eff6ff}
@media(max-width:700px){body .banner-counts{grid-template-columns:repeat(2,minmax(0,1fr))}body .daily-general-grid{grid-template-columns:1fr}body .flagman-permits .cost{display:flex;flex-wrap:wrap}}

/* Keep navigation from compressing hourly incomes into adjacent resources. */
body .game-toolbar{display:flex;flex-wrap:wrap;gap:0;padding-bottom:5px}
body .game-toolbar .tabs{flex:0 1 100%;width:100%;max-width:100%;min-width:0;justify-content:flex-start}
body .game-toolbar .resource-strip{display:flex;flex:0 1 100%;width:100%;max-width:100%;min-width:0;gap:8px;overflow:visible;flex-wrap:nowrap}
body .game-toolbar .resource-bar{flex:1 1 0;width:auto;min-width:0;max-width:100%;grid-template-columns:repeat(5,minmax(0,1fr))}
body .game-toolbar .resource{min-width:0;display:flex;align-items:center;padding:4px 8px;gap:6px}
body .game-toolbar .resource-content{min-width:0;flex:1}
body .game-toolbar .resource-total,body .game-toolbar .resource-detail{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:0 6px;min-width:0;text-align:left}
body .game-toolbar .resource-name{font-size:12px}
body .game-toolbar .resource strong{font-size:14px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
body .game-toolbar .resource .rate{display:block;max-width:100%;margin:0;font-size:12px;font-variant-numeric:tabular-nums;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
body .game-toolbar .resource-detail small{display:block;font-size:11px;white-space:normal;overflow-wrap:anywhere}
body .game-toolbar .movement-flags{flex:0 0 auto;margin:0;width:auto}
@media(max-width:1000px){body .game-toolbar .resource-detail small{display:none}}
@media(max-width:700px){
 body .game-toolbar .resource-strip{display:grid;grid-template-columns:minmax(0,1fr);gap:3px}
 body .game-toolbar .resource-bar{width:100%}
 body .game-toolbar .resource{flex-direction:column;padding:3px 1px;gap:0}
 body .game-toolbar .resource-content{width:100%;text-align:center}
 body .game-toolbar .resource-total,body .game-toolbar .resource-detail{display:block;text-align:center}
 body .game-toolbar .resource .rate{font-size:clamp(10px,2.8vw,12px)}
 body .game-toolbar .movement-flags{width:100%;justify-content:flex-end}
}

/* Commander management stays readable in desktop and touch layouts. */
body .army-sections,body .general-scope{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}body :is(.army-sections,.general-scope) button[aria-pressed="true"]{background:#2079dc;border-color:#dceeff;color:#fff}
body .general-roster-heading{display:flex;justify-content:space-between;gap:14px;align-items:start;flex-wrap:wrap}body .general-card-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}body .general-status{font-size:14px;color:#c8e2ff}body .general-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}body .general-stat-grid>div{background:#0e2947;padding:10px;border-radius:6px;border:1px solid #3d6792}body .general-stat-grid dt{font-size:14px;color:#bed4ee}body .general-stat-grid dd{margin:2px 0 0;font-size:24px;font-weight:700;color:#fff}body .general-location,body .general-role{overflow-wrap:anywhere;color:#dcecff}body .general-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}body .general-actions button{margin:0;min-height:40px}body .general-actions small{width:100%;color:#b5cce7}body .legion-command-summary{color:#a9dfc8}
body #generalCommandDialog{background:#0c2543;border:2px solid #75b4f1;color:#eef5ff}body #generalCommandDialog h2,body #generalCommandDialog p{color:#eef5ff}body #generalCommandDialog select{width:100%;margin:8px 0}
body #battleReportDialog .report-commanders{margin-top:18px;padding:16px;border:1px solid #5585b2;background:#102d4d;border-radius:8px}body #battleReportDialog .report-command-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:12px}body #battleReportDialog .report-command-card{min-width:0;background:#0a223d;border:1px solid #3d6792;padding:12px;border-radius:6px}body #battleReportDialog .report-command-card dl{display:grid;grid-template-columns:1fr 1fr;gap:8px}body #battleReportDialog .report-command-card dt{font-size:14px;color:#b9d8f5}body #battleReportDialog .report-command-card dd{margin:0;color:#fff;font-weight:700}body #battleReportDialog .report-general-xp{color:#91e6bd}body #battleReportDialog .report-command-note{font-size:12px;color:#bed4ec}
@media(max-width:700px){body .owned-general-grid{grid-template-columns:minmax(0,1fr)}body .general-actions button{min-height:44px}}

/* Rarity frames stay visible when a candidate portrait is dimmed. */
body .general-card{--general-rarity-color:#aeb8c4}
body .general-card[data-rarity="2"]{--general-rarity-color:#65c88a}
body .general-card[data-rarity="3"]{--general-rarity-color:#63aaf2}
body .general-card[data-rarity="4"]{--general-rarity-color:#b391ee}
body .general-card[data-rarity="5"]{--general-rarity-color:#f1ca61}
body .general-card .general-portrait-frame{width:100%;max-width:340px;margin:0 auto 14px;border:4px solid var(--general-rarity-color);border-radius:10px;background:#102945;box-shadow:0 0 0 1px #071a2e,0 0 12px color-mix(in srgb,var(--general-rarity-color) 30%,transparent);overflow:hidden;box-sizing:border-box}
body .general-card .general-portrait{display:block;width:100%;height:auto;aspect-ratio:1;max-width:none;margin:0;object-fit:contain;border:0;border-radius:0;background:#102945;box-sizing:border-box}
body .daily-general.general-hired .general-portrait,body .daily-general.general-locked .general-portrait{opacity:.3;filter:grayscale(.6)}
@media(max-width:700px){body .general-card .general-portrait-frame{max-width:300px}}

/* Banner Hall: status first, compact mobile identities and stable live countdown. */
body .general-offers-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
body .general-refresh{display:grid;gap:2px;background:#0b2340;border:1px solid #6da7e7;border-radius:8px;padding:10px 14px;min-width:175px}
body .general-refresh span{font-size:14px;color:#c8e0f7}body .general-refresh strong{font-size:22px;color:#fff;font-variant-numeric:tabular-nums}body .general-refresh small{font-size:12px;color:#c8e0f7}
body .general-rarity-help{margin:12px 0 18px;color:#c8e0f7;font-size:14px}body .general-rarity-help summary{cursor:pointer}body .general-rarity-help p{margin:8px 0}
body .general-candidate-status{display:inline-block;padding:5px 9px;border:1px solid #79addc;border-radius:6px;color:#eaf4ff;background:#173b61;font-size:14px;margin:4px 0 8px}body .general-candidate-status.available{color:#b9f1d1;border-color:#62ae87;background:#133b35}body .general-candidate-status.unavailable{color:#ffdfb3;border-color:#b3976b;background:#3b3227}
body .general-identity h3{margin:8px 0}body .general-location,body .general-role,body .general-experience{overflow-wrap:anywhere}body .general-card progress{width:100%;height:10px;accent-color:#6dabef}
body .banner-tabs button{min-height:44px;flex:1;max-width:220px}body .flagman-permits label{display:inline-flex;align-items:center;flex-wrap:wrap;gap:8px}
@media(max-width:700px){
body .general-card{padding:14px}body .general-card .general-identity{display:grid;grid-template-columns:100px minmax(0,1fr);column-gap:12px;align-content:start;align-items:start}
body .general-card .general-identity .general-portrait-frame{grid-column:1;grid-row:1 / 5;width:100px;margin:0}
body .general-identity>.general-stars,body .general-identity>.general-card-heading,body .general-identity>h3,body .general-identity>.general-specialty,body .general-identity>.general-candidate-status{grid-column:2;min-width:0}
body .general-identity h3{font-size:20px;margin:3px 0;overflow-wrap:anywhere}body .general-identity .general-specialty{font-size:14px;margin:4px 0}body .general-identity .general-stars{font-size:18px;letter-spacing:1px}body .general-candidate-status{font-size:14px;margin:4px 0}
body .general-card p{margin:10px 0}body .general-roster-heading{flex-wrap:wrap;gap:10px}body .general-roster-heading button{width:auto}
body .banner-counts{gap:6px}body .banner-counts>div{padding:8px}body .banner-counts dt{font-size:14px}body .banner-counts dd{font-size:20px;margin-top:2px}
body .flagman-permits label{display:flex}body .flagman-permits input{margin:4px 0;flex:1;min-width:80px}body .flagman-permits button{max-width:100%;white-space:normal;min-height:44px}body .general-refresh{min-width:0}
}
@media(max-width:360px){body .general-card .general-identity{grid-template-columns:76px minmax(0,1fr);gap:8px}body .general-card .general-identity .general-portrait-frame{width:76px}}

/* Mobile command space: compact pinned chrome and complete screen navigation. */
body .view-navigation{display:contents}
@media(max-width:650px){
body>header{height:52px;padding:0 8px;gap:6px;display:grid;grid-template-columns:minmax(0,1fr) auto auto}
body>header .brand{font-size:13px;gap:4px;letter-spacing:.5px}body>header .kingdom-crest{width:24px;height:28px;object-fit:contain}body>header .brand small{font-size:8px;margin-top:2px}
body>header .world{position:static;min-width:0}body>header #playerNameButton{min-height:44px;max-width:70px;padding:4px;font-size:14px}body>header #serverClock{position:absolute;right:8px;top:52px;font-size:12px;pointer-events:none;display:none}body>header #helpBtn{min-height:44px;padding:4px 8px}
body .game-toolbar{top:52px;padding:0 6px 3px}
body .view-navigation{display:flex;width:100%;min-width:0;align-items:center;gap:6px}
body .game-toolbar .view-navigation .tabs{flex:1 1 0;width:0;overflow-x:auto;gap:16px;margin:0;border:0;scrollbar-width:thin;scroll-snap-type:x proximity}
body .game-toolbar .tabs button{flex-shrink:0;min-height:44px;scroll-snap-align:start;padding:8px 0;font-size:14px;white-space:nowrap}

body .game-toolbar .resource{display:grid;grid-template-columns:17px minmax(0,1fr);align-items:center;padding:3px 2px;column-gap:2px}
body .game-toolbar .resource-content{display:contents}body .game-toolbar .resource-total{text-align:center;min-width:0}body .game-toolbar .resource-detail{grid-column:1/-1;text-align:center;min-width:0}
body .game-toolbar .resource strong{font-size:14px;line-height:1.2}body .game-toolbar .resource .rate{font-size:12px;line-height:1.2;letter-spacing:-.3px}
body .game-toolbar .resource-bar{margin:0}body .game-toolbar .movement-flags{display:flex;justify-content:flex-end;gap:4px}body .game-toolbar .movement-flags button{min-height:44px;padding:4px 8px;gap:4px;font-size:14px}body .game-toolbar .movement-flags small{font-size:14px}
body #buildingDetail,body .keep-upgrades,body .keep-table-scroll,body .keep-upgrade-table{width:100%;min-width:0;max-width:100%}body .keep-upgrade-table{table-layout:fixed}body .keep-upgrade-table td button{max-width:100%;overflow-wrap:anywhere}body .keep-upgrade-table td small{white-space:normal}
body .recruit-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(80px,auto);gap:8px}body .recruit-form input{width:100%;min-width:0;font-size:16px}body .recruit-form button{min-width:0;white-space:normal}
body .quantity-shortcuts,body .march-shortcuts{display:flex;flex-wrap:wrap;gap:6px}body .quantity-shortcuts button,body .march-shortcuts button{flex:1;min-width:65px;padding:7px;font-size:14px}
body #marchDialog{width:calc(100vw - 16px);max-width:100%;max-height:calc(100svh - 24px);padding:14px;box-sizing:border-box;overflow-y:auto}
body #marchForm{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}body #marchForm>*{min-width:0;max-width:100%}body #marchForm fieldset{width:100%;margin:0;padding:10px;box-sizing:border-box}body #marchForm select,body #marchForm input,body #sourceSelect{width:100%;min-width:0;font-size:16px;box-sizing:border-box}body #marchForm .troop-input{grid-template-columns:minmax(0,1fr) 54px}body #marchForm button{min-height:44px;max-width:100%;overflow-wrap:anywhere}body #marchSummary,body #marchWarning{overflow-wrap:anywhere}
}

@media(max-width:650px){body .game-toolbar #serverClock{display:block;flex:1;min-width:0;margin-right:auto;font-size:12px;line-height:1.2;overflow-wrap:anywhere;color:#c3d8ef}body .game-toolbar .movement-flags button{flex-shrink:0}}

@media(max-width:650px){}

body .army-overview-panel{padding:18px}body .army-total-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:16px 0}body .army-total-grid>div{background:#0b2340;border:1px solid #5589b9;border-radius:8px;padding:12px}body .army-total-grid span,body .army-total-grid strong{display:block}body .army-total-grid strong{font-size:24px;color:#fff}body .army-location-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:12px}body .army-location-card{min-width:0;padding:14px;background:#102d4d;border:1px solid #5589b9;border-radius:8px}body .army-location-card h3{margin:0 0 10px}body .army-location-link{color:#b8ddff;background:transparent;border:0;text-align:left;padding:5px 0;white-space:normal;overflow-wrap:anywhere}body .army-troop-breakdown,body .legion-location{overflow-wrap:anywhere}body .dispatch-review{padding:14px;grid-column:1/-1}body .dispatch-review-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}body .dispatch-review-stats dt{font-size:14px;color:#c1dbf3}body .dispatch-review-stats dd{margin:4px 0;color:#fff;font-weight:700;overflow-wrap:anywhere}body .legion-card select{width:100%;min-width:0}body .army-sections{flex-wrap:wrap;gap:8px}body .army-sections button{min-height:44px}
@media(max-width:650px){body .army-total-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}body .army-total-grid>div{padding:8px}body .army-total-grid span{font-size:14px}body .army-location-card button{min-height:44px}body .dispatch-review{padding:12px}body .dispatch-review-stats{gap:8px}body .dispatch-review p{overflow-wrap:anywhere}body .legion-troop-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}body .legion-troop-inputs input{width:100%;min-width:0;font-size:16px}}

#rankingsView .standings{margin-top:0}#rankingsView .profile-link{font-size:14px;min-height:44px}#rankingsView .standings th{font-size:14px}

/* Server time shares the pinned screen navigation row. */
body .view-navigation{display:flex;align-items:center;gap:16px;min-width:0;width:100%}
body .game-toolbar .view-navigation .tabs{flex:1 1 0;min-width:0;width:0;margin:0;overflow-x:auto}
body .game-toolbar .view-navigation #serverClock{display:block;flex:0 0 auto;margin-left:auto;text-align:right;color:#c3d8ef;font-size:14px;line-height:1.3;white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:650px){body .view-navigation{gap:6px}body .game-toolbar .view-navigation #serverClock{flex:0 0 98px;width:98px;margin:0;font-size:12px;white-space:normal;overflow-wrap:normal}}
/* Task-focused density: keep artwork and General details intact. */
body .game-toolbar .resource-strip{justify-content:flex-end;flex-basis:100%;gap:0}
body .game-toolbar .movement-flags{margin-left:auto}
body .village-heading{gap:12px;margin-bottom:10px;align-items:center}
body .village-heading h1{font-size:25px;line-height:1.2;margin:2px 0 4px}
body .village-meta{margin:0;gap:4px 10px;line-height:1.4}
body .village-tools{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
body .village-tools .village-switch{display:flex;align-items:center;gap:6px;font-size:14px}
body .village-tools select{max-width:250px;font-size:16px;min-height:40px}
body .village-tools>button{padding:6px 10px;min-height:40px;font-size:14px}
body .onboarding-strip{padding:7px 10px;margin-bottom:10px;gap:8px}
body .onboarding-strip button{min-height:36px;padding:5px 10px;font-size:14px}
body .settlement-sidebar{min-width:0;display:flex;flex-direction:column;gap:8px}
body .settlement-resources{border:1px solid #49759d;border-radius:6px;background:#10263d;padding:4px}
body .settlement-resources .resource-bar{display:grid;grid-template-columns:1fr;margin:0;gap:0;overflow:visible}
body .settlement-resources .resource{display:flex;align-items:center;gap:8px;min-width:0;padding:6px;border:0;border-bottom:1px solid #345878;background:transparent}
body .settlement-resources .resource:last-child{border-bottom:0}
body .settlement-resources .resource-icon{width:26px;height:26px;flex:0 0 26px}
body .settlement-resources .resource-content{display:block;min-width:0;flex:1}
body .settlement-resources .resource-total,body .settlement-resources .resource-detail{display:flex;justify-content:space-between;align-items:baseline;gap:6px;flex-wrap:wrap}
body .settlement-resources .resource-name{font-size:14px}
body .settlement-resources .resource strong{font-size:16px;line-height:1.3}
body .settlement-resources .resource small{font-size:12px}
body .settlement-resources .resource .rate{display:block;font-size:13px;margin:0;line-height:1.3}
body .page-resources{margin:0 0 10px;position:static}
body .page-resources[hidden]{display:none}
body .page-resources .resource-bar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;margin:0;overflow:visible}
body .page-resources .resource{padding:6px 8px;display:flex;align-items:center;gap:6px;min-width:0}
body .page-resources .resource-icon{width:24px;height:24px;flex:0 0 24px}
body .page-resources .resource-content{flex:1;min-width:0}
body .page-resources .resource-total{display:flex;align-items:baseline;justify-content:space-between;gap:5px;flex-wrap:wrap}
body .page-resources .resource strong{font-size:16px;line-height:1.3}
body .page-resources .resource-name{font-size:14px}
body .page-resources .resource-detail{display:flex;flex-wrap:wrap;gap:0 6px;justify-content:space-between}
body .page-resources .resource small{font-size:12px}
body .page-resources .resource .rate{display:block;font-size:13px;margin:0;line-height:1.3}
body .layout[data-view="village"] .village-activity{display:flex;flex-direction:column;gap:8px}
body .village-activity .queue{padding:10px}
body .village-activity .queue h2{font-size:17px;margin:0 0 6px}
body .village-activity .queue p{margin:4px 0;font-size:14px;line-height:1.4}
body .village-activity .queue button{min-height:36px;font-size:14px;padding:5px 8px}
body .village-activity .overview-economy{display:none}
body .town-panel>.panel-heading{padding:10px 12px;gap:8px;flex-wrap:wrap}
body .town-panel>.panel-heading h2{font-size:22px}
body .town-panel>.panel-heading button{font-size:14px;padding:6px 10px;min-height:36px}
body .section-heading{margin:0 0 12px;gap:10px;align-items:center}
body .section-heading h2{font-size:25px;margin:0}
body .section-heading p{margin:4px 0;line-height:1.4}
body .building-navigation{margin-bottom:10px;gap:8px}
body .building-detail-stable{display:grid;grid-template-columns:160px minmax(0,1fr);gap:16px;padding:14px;align-items:start}
body .building-detail-stable .building-portrait{position:static;width:160px;max-width:100%;margin:0}
body .building-detail-copy h2{font-size:26px;margin:4px 0 8px}
body .building-detail-copy p{margin:6px 0;font-size:16px;line-height:1.4}
body #buildingDetail[data-building-key="keep"] .building-detail-stable{display:block}
body #buildingDetail[data-building-key="keep"] .building-portrait{float:left;width:140px;margin:0 16px 10px 0}
body #buildingDetail[data-building-key="keep"] .building-detail-copy{min-height:140px}
body #buildingDetail[data-building-key="keep"] .building-construction{clear:both;margin-top:10px;padding:12px}
body .keep-upgrades{margin-top:12px;padding:12px}
body .keep-upgrade-table th,body .keep-upgrade-table td{padding:8px;font-size:14px;line-height:1.35}
body .keep-upgrade-table .keep-building-link{min-height:44px;gap:8px}
body .keep-upgrade-table .keep-building-link .building-icon{width:42px;height:42px}
body .keep-upgrade-table td:last-child button[data-upgrade]{padding:6px}
body :is(#buildView,#armyView,#marketView) .section-heading{margin-bottom:10px}
body :is(#buildings,#armyCards){gap:12px}
body .unit-card{padding:12px}
body .unit-card h3{margin:6px 0;font-size:21px}
body .unit-card p{min-height:0;margin:5px 0 8px;line-height:1.4;font-size:14px}
body .unit-card .troop-full-body{height:165px}
body .unit-card .unit-stats{gap:8px;margin:8px 0;font-size:14px}
body .unit-card .recruitment-status{margin:6px 0;padding:6px 8px}
body .unit-card .recruit-form{margin-top:8px}
body .unit-card .troop-research-heading{margin-top:10px}
body :is(#rallyView,#marketView,#kingdomView) .panel{padding:12px}
body :is(#rallyView,#marketView,#kingdomView) .panel-heading{padding:10px 12px}
body .merchant-row{padding:10px;gap:10px}
body .kingdom-village{margin-bottom:10px}
body .kingdom-stats{gap:12px}
body .kingdom-title h2{font-size:23px}
body .standings th,body .standings td{padding:8px 12px}
body :is(#reportsView,#mailView) .panel-heading{padding:10px 12px}
body .mail-row{padding:10px 12px}
body .account-panel{padding:16px}
body .account-panel h3{margin:8px 0}
body .setting-row{padding:8px 0;gap:10px}
body .build-grid .building{padding:14px}
body .build-grid .building p{min-height:0;margin:6px 0 10px;font-size:14px;line-height:1.4}
@media(max-width:1000px){body .page-resources .resource-name{display:none}}
@media(max-width:760px){
 body .village-heading{align-items:stretch;gap:8px}
 body .village-tools .village-switch{width:100%;min-width:0}
 body .village-tools select{max-width:100%;flex:1;min-width:0}
 body .settlement-sidebar{display:contents}
 body .settlement-resources{grid-row:1}
 body .layout[data-view="village"] .settlement-scene-viewport{grid-row:2}
 body .layout[data-view="village"] .village-activity{grid-row:3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 body .settlement-resources .resource-bar{grid-template-columns:repeat(5,minmax(0,1fr))}
 body .settlement-resources .resource{flex-direction:column;gap:2px;padding:5px 2px;border-bottom:0;border-right:1px solid #345878}
 body .settlement-resources .resource:last-child{border-right:0}
 body .settlement-resources .resource-content{width:100%}
 body .settlement-resources .resource-total,body .settlement-resources .resource-detail{display:block;text-align:center}
 body .settlement-resources .resource-name{display:none}
 body .settlement-resources .resource small{font-size:12px}
 body .settlement-resources .resource .rate{font-size:12px;overflow-wrap:anywhere}
 body .page-resources .resource{flex-direction:column;gap:2px;padding:5px 2px}
 body .page-resources .resource-total,body .page-resources .resource-detail{display:block;text-align:center}
 body .page-resources .resource strong{font-size:14px}
 body .page-resources .resource .rate{font-size:12px;overflow-wrap:anywhere}
 body .page-resources .resource small{font-size:12px}
 body .building-detail-stable{grid-template-columns:110px minmax(0,1fr);gap:10px;padding:12px}
 body .building-detail-stable .building-portrait{width:110px}
 body #buildingDetail[data-building-key="keep"] .building-portrait{width:110px}
 body #buildingDetail[data-building-key="keep"] .building-detail-copy{min-height:110px}
 body .building-detail-copy h2{font-size:23px}
 body .unit-card .troop-full-body{height:145px}
 body .town-panel>.panel-heading{padding:8px}
 body .account-panel{padding:12px}
 body .section-heading h2{font-size:23px}
}
@media(max-width:420px){body .layout[data-view="village"] .village-activity{grid-template-columns:1fr}body .building-detail-stable{grid-template-columns:90px minmax(0,1fr)}body .building-detail-stable .building-portrait{width:90px}}
@media(min-width:761px){
 body:is(.classic-overview,.mobile-version) .settlement-workspace{grid-template-columns:1fr}
 body:is(.classic-overview,.mobile-version) .settlement-sidebar{display:grid;grid-template-columns:250px minmax(0,1fr);align-items:start}
 body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .village-activity{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
}
body .resource-icon{position:relative}
body .resource .negative{color:#ffaaa5}
body .village-activity .activity-order{width:100%;text-align:left}
/* One pinned toolbar row; no empty line beneath the tabs. */
body .toolbar-status{display:flex;align-items:center;gap:10px;flex:0 0 auto;margin-left:auto}
body .toolbar-status .movement-flags{display:flex;width:auto;margin:0;gap:6px;flex-wrap:nowrap}
body .toolbar-status .movement-flags button{min-height:36px;padding:5px 8px;font-size:14px;gap:5px}
body .toolbar-status .movement-flags small{font-size:14px}
body .game-toolbar{padding-bottom:0}
body .game-toolbar .view-navigation{gap:10px}
body .onboarding-strip{justify-content:flex-start;align-items:center;padding:0;margin:0 0 8px;border:0;box-shadow:none;background:transparent;gap:8px;min-height:0}
body .capital-protection-status{display:flex;align-items:center;gap:6px;width:auto;max-width:100%;padding:3px 8px;background:#163a5b;border:1px solid #79baff;border-radius:5px;font-size:14px;line-height:1.3}
body .capital-protection-status[hidden],body #dismissCapitalProtection[hidden]{display:none}
body .onboarding-strip #beginnerStatus{flex:0 1 auto;min-width:0}
body .onboarding-strip #dismissCapitalProtection{padding:0;min-height:32px;min-width:32px;border:0;background:transparent;font-size:22px;line-height:1;color:#fff}
body .onboarding-strip .guide-launch{display:flex;flex:0 0 auto}
body .onboarding-strip #guideButton{min-height:36px;padding:5px 9px;font-size:14px;margin:0}
@media(max-width:650px){
 body .game-toolbar .view-navigation{gap:5px}
 body .toolbar-status{gap:5px}
 body .toolbar-status .movement-flags{gap:4px}
 body .toolbar-status .movement-flags button{min-height:44px;min-width:40px;padding:4px;gap:2px}
 body .toolbar-status .movement-flags small{display:none}
 body .toolbar-status .movement-flags svg{width:12px;height:20px}
 body .game-toolbar .view-navigation #serverClock{flex:0 0 88px;width:88px}
 
 body .onboarding-strip{gap:6px}
 body .capital-protection-status{padding:2px 6px}
 body .onboarding-strip #dismissCapitalProtection{min-height:44px;min-width:36px}
 body .onboarding-strip #guideButton{min-height:44px}
}
/* The world map is a primary play surface, not a compact management panel. */
@media(min-width:651px){
 body .layout[data-view="map"] .map-layout{width:100%;max-width:none;margin:0;grid-template-columns:minmax(0,1fr) clamp(150px,15vw,210px);gap:14px;align-items:start}
 body .layout[data-view="map"] .map-panel{width:100%;min-width:0}
 body .layout[data-view="map"] .map-wrap{height:auto;aspect-ratio:1 / 1}
 body .layout[data-view="map"] .map-side{position:static;width:100%;min-width:0}
 body .layout[data-view="map"] .minimap-panel{width:100%;max-width:210px}
}
/* Fit the square play map to both available viewport dimensions. */
@media(min-width:651px){
 body .layout[data-view="map"] .map-layout{grid-template-columns:minmax(0,var(--fitted-map-width,calc(100svh - 200px))) var(--fitted-mini-width,160px);justify-content:center;width:100%;max-width:100%;gap:14px}
 body .layout[data-view="map"] .map-axis-frame .map-wrap{width:100%;margin:0;height:auto;aspect-ratio:1}
}
@media(max-width:650px){
 body .layout[data-view="map"] .map-layout{width:100%;max-width:100%;display:grid;grid-template-columns:minmax(0,var(--fitted-map-width,100%));justify-content:center;position:relative}
 body .layout[data-view="map"] .map-axis-frame .map-wrap{width:100%;margin:0;height:auto;aspect-ratio:1}
 body .layout[data-view="map"] .map-side{position:absolute;width:84px;top:82px;right:max(10px,calc((100% - var(--fitted-map-width,100%))/2 + 10px))}
}

body .settlement-resources .resource:nth-child(5){order:-1}
@media(min-width:761px){body .settlement-resources .resource:nth-child(5){border-bottom:1px solid #345878}body .settlement-resources .resource:nth-child(4){border-bottom:0}}
@media(max-width:760px){body .settlement-resources .resource:nth-child(5){border-right:1px solid #345878}body .settlement-resources .resource:nth-child(4){border-right:0}}

/* Keep map chrome from creating a shrinking size feedback loop. */
body .layout[data-view="map"] .map-panel>.panel-heading{display:flex;align-items:center;gap:8px;padding:8px 12px}
body .layout[data-view="map"] .map-panel>.panel-heading h2{font-size:22px;line-height:1.2;margin:0;white-space:nowrap}
body .layout[data-view="map"] .map-panel>.panel-heading span{display:none}
body .layout[data-view="map"] .map-controls{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;gap:8px;flex-wrap:nowrap}
body .layout[data-view="map"] .map-controls button{white-space:nowrap;font-size:14px;min-height:36px}
body .layout[data-view="map"] .map-side{display:flex;flex-direction:column;gap:10px}
body .layout[data-view="map"] .map-side .minimap-panel{order:0}
body .layout[data-view="map"] .map-side .legend{order:1;display:flex;flex-direction:column;align-items:flex-start;margin:0;padding:6px;font-size:12px;gap:6px;line-height:1.4}
@media(max-width:650px){body .layout[data-view="map"] .map-side .legend{display:none}body .layout[data-view="map"] .map-panel>.panel-heading h2{font-size:18px}}

/* Map fills the usable height; legend left, world overview right. */
body .layout[data-view="map"] main{display:flex;flex-direction:column;padding-top:8px}
body .layout[data-view="map"] #mapView{order:-1}
body .layout[data-view="map"] .map-layout{align-items:start;margin-inline:auto}
body .layout[data-view="map"] .map-panel>.map-heading{justify-content:space-between;padding:6px 10px;min-height:54px;box-sizing:border-box}
body .layout[data-view="map"] .map-heading h2{font-size:18px;line-height:1.1}
body .layout[data-view="map"] #mapCoordinates{font-size:13px;line-height:1.4;color:#d6eaff;white-space:nowrap}
body .layout[data-view="map"] .map-heading button{min-height:34px;padding:4px 8px;white-space:nowrap;font-size:14px}
body .layout[data-view="map"] .map-legend{display:block;width:auto;min-height:0;margin:0;padding:10px 0;border:0;background:transparent}
body .layout[data-view="map"] .map-legend .legend{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin:0;padding:0;font-size:14px;line-height:1.4;color:#d6eaff}
body .layout[data-view="map"] .map-legend .legend span{font-size:14px;white-space:normal}
body .layout[data-view="map"] .map-side .minimap-panel{width:100%;max-width:none;margin:0}
@media(min-width:651px){
 body .layout[data-view="map"] .map-layout{grid-template-columns:140px minmax(0,var(--fitted-map-width,calc(100svh - 180px))) 150px;gap:12px;justify-content:center}
 body .layout[data-view="map"] .map-legend{grid-column:1;grid-row:1}
 body .layout[data-view="map"] .map-panel{grid-column:2;grid-row:1}
 body .layout[data-view="map"] .map-side{grid-column:3;grid-row:1;position:static;width:150px}
}
@media(max-width:650px){
 body .layout[data-view="map"] .map-panel{grid-row:1}
 body .layout[data-view="map"] .map-legend{grid-row:2;padding:8px 0}
 body .layout[data-view="map"] .map-legend .legend{flex-direction:row;flex-wrap:wrap;gap:6px 14px}
 body .layout[data-view="map"] .map-legend .legend span{font-size:12px}
 body .layout[data-view="map"] .map-side{top:64px}
 body .layout[data-view="map"] .map-heading h2{font-size:16px}
 body .layout[data-view="map"] #mapCoordinates{font-size:12px}
}
body .game-toolbar .toolbar-status .movement-flags button{display:flex;align-items:center;white-space:nowrap}

/* Recruitment and research share troop identities, with separate controls. */
.recruitment-tabs{display:flex;gap:8px;margin:12px 0;flex-wrap:wrap}
body .recruitment-tabs button{padding:8px 18px;min-height:42px}
body .recruitment-tabs button[aria-selected="true"]{background:#2869a8;border-color:#b6ddff;color:#fff}
#armyCards[data-recruitment-mode="recruitment"] .troop-upgrade{display:none}
#armyCards[data-recruitment-mode="research"] :is(.troop-recruitment,.recruitment-duration,.recruitment-status){display:none}
#bannerControls[data-recruitment-mode="research"] .flagman-permits{display:none}
/* Entire battle report fits the viewport width; only vertical scrolling. */
body #battleReportDialog{box-sizing:border-box;max-width:calc(100vw - 16px);width:min(940px,calc(100vw - 16px));overflow-x:hidden;overflow-y:auto}
body #battleReportDialog :is(.battle-document,.report-army,.report-aftermath,.report-commanders){min-width:0;max-width:100%;box-sizing:border-box}
body #battleReportDialog .battle-table-wrap{overflow:visible;min-width:0}
body #battleReportDialog .report-force-table{width:100%;min-width:0;max-width:100%;table-layout:fixed;white-space:normal}
body #battleReportDialog .report-force-table :is(th,td){padding:8px 6px;white-space:normal;overflow-wrap:anywhere;font-size:14px}
body #battleReportDialog .report-force-table :is(th,td):first-child{width:40%}
body #battleReportDialog .report-force-table td{text-align:center;font-variant-numeric:tabular-nums}
body #battleReportDialog .report-force-table thead th{text-align:center}
body #battleReportDialog .report-force-table thead th:first-child{text-align:left}
body #battleReportDialog .report-troop-name{display:flex;align-items:center;gap:8px;min-width:0}
body #battleReportDialog .report-troop-name .unit-art{flex:0 0 26px;width:26px;height:26px}
body #battleReportDialog .report-force-table td.report-losses{background:#422839;color:#ffb8c4}
body #battleReportDialog :is(p,dd,b,h3,.report-location,.report-command-card){overflow-wrap:anywhere;min-width:0}
body #battleReportDialog .report-illustration{min-width:0;overflow:hidden}
body #battleReportDialog .report-result{min-width:0;flex:1}
body #battleReportDialog .battle-loot{flex-wrap:wrap}
@media(max-width:600px){
 body #battleReportDialog .battle-document{padding:10px}
 body #battleReportDialog .report-force-table :is(th,td){padding:8px 3px}
 body #battleReportDialog .report-troop-name{gap:4px}
 body #battleReportDialog .report-illustration img{width:58px;flex-shrink:1}
 body #battleReportDialog .report-army header{padding:10px;gap:5px}
}
/* Battle report management */
.report-tools{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-bottom:12px}.report-tools label{display:grid;gap:5px;flex:1;min-width:140px}.report-bulk-actions{display:flex;flex-wrap:wrap;gap:8px;width:100%}.report-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:8px;margin-bottom:8px}.report-row .report{width:100%;margin:0;text-align:left}.report-select{display:grid;place-items:center;min-height:44px}.report-select input{width:20px;height:20px}.report-unread{border-left:4px solid #81c2ff!important}.unread-report-label{color:#a8d5ff}.report-delete-button{padding:8px 12px}.battle-document footer{gap:10px;flex-wrap:wrap}@media(max-width:600px){.report-tools{gap:8px}.report-row{grid-template-columns:26px minmax(0,1fr)}.report-delete-button{grid-column:2;justify-self:end}.report-bulk-actions button{flex:1;min-width:130px}}

.achievement-list{display:grid;gap:8px;margin:10px 0}.achievement{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid #6096c7;border-radius:6px;background:#102f4c;color:#e5f0ff}.achievement small{display:block;color:#bdd3e8;margin-top:3px}.achievement-emblem{display:grid;place-items:center;flex:0 0 52px;height:52px;border:3px solid #7090aa;border-radius:8px;background:#0c2339}.achievement-emblem .unit-art{width:40px;height:40px}.achievement-emblem .resource-icon{width:36px;height:36px}.tier-1 .achievement-emblem{border-color:#c58955}.tier-2 .achievement-emblem{border-color:#d1dce8}.tier-3 .achievement-emblem{border-color:#f4c65b}.tier-4 .achievement-emblem{border-color:#77bfff;box-shadow:0 0 0 1px white}.locked .achievement-emblem{opacity:.45}#profileAchievements summary{cursor:pointer;color:#d7eaff;padding:8px 0}@media(max-width:600px){.achievement strong{font-size:14px}.achievement small{font-size:12px}}

.ranking-record-date{display:block;font-size:11px;color:#bdd3e8}

/* Recruitment queues share the opening building header. */
#buildingView[data-recruitment-building="true"] .building-top-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr);gap:16px;align-items:start}
.building-top-layout>*,#buildingTrainingQueue,#buildingTrainingQueue #training{min-width:0}
#buildingTrainingQueue #training{display:block;margin:0}
#buildingTrainingQueue .queue{margin:0;padding:14px}
#buildingTrainingQueue .queue h2{margin:0 0 10px;font-size:22px}
#buildingTrainingQueue .queue-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
#buildingTrainingQueue .queue-item>span{min-width:0;overflow-wrap:anywhere}
@media(max-width:900px){#buildingView[data-recruitment-building="true"] .building-top-layout{grid-template-columns:minmax(0,1fr)}#buildingTrainingQueue{margin-bottom:12px}}
@media(max-width:480px){#buildingTrainingQueue .queue-item{grid-template-columns:minmax(0,1fr)}#buildingTrainingQueue .queue-item>span:last-child{padding-left:0}}

/* Grow the overview into spare horizontal space without reducing the main map. */
@media(min-width:651px){
 body .layout[data-view="map"] .map-layout{grid-template-columns:140px minmax(0,var(--fitted-map-width,calc(100svh - 180px))) var(--fitted-mini-width,150px)}
 body .layout[data-view="map"] .map-side{width:var(--fitted-mini-width,150px)}
}

body #routes{z-index:8;pointer-events:none;filter:drop-shadow(0 1px 2px #071423);overflow:hidden}body #routes[hidden]{display:none}
body .layout[data-view="map"] .map-panel>.map-heading{flex-wrap:wrap}
#troopRoutesToggle[aria-pressed="true"]{background:#225e97;border-color:#9dccff;color:#fff}

/* Keep resource identities visible in the compact mobile strips. */
@media(max-width:760px){
 body :is(.settlement-resources,.page-resources) .resource-icon.sprite{display:block;width:24px;height:24px;flex:0 0 24px;margin:0 auto}
}

.map-banner.camp-hold-marker{right:1%;top:1%;width:clamp(8px,30%,18px);height:42%;max-height:26px;z-index:6;pointer-events:none}

.general-secondary-perks{margin:12px 0}.general-secondary-perks h4{margin:0 0 8px}.general-perk{padding:10px;margin-bottom:8px;border:1px solid #6096c7;border-radius:6px;background:#102f4c;color:#e5f0ff}.general-perk>b,.general-perk>span{display:block}.general-perk>span{margin-top:4px;color:#9ed0ff}.general-perk p{margin:6px 0 0;font-size:14px;line-height:1.5}


/* The stationed roster uses a table, independent of the old overview strip. */
body .settlement-troops{min-width:0;padding:8px;background:#10263d;border:1px solid #49759d;border-radius:6px}
body .settlement-troops h3{margin:0 0 6px;font-size:17px;color:#e7f2ff}
#overviewTroops.stationed-roster{display:block;min-width:0;width:100%;margin:0;padding:0;background:transparent;border:0}
#overviewTroops .stationed-troop-table{display:table;width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px;background:transparent;margin:0}
#overviewTroops .stationed-name-column{width:60%}
#overviewTroops .stationed-level-column{width:14%}
#overviewTroops .stationed-count-column{width:26%}
#overviewTroops .stationed-troop-table :is(th,td){padding:5px 2px;border:0;border-bottom:1px solid #345878;color:#e7f2ff;background:transparent;white-space:normal;overflow-wrap:anywhere;vertical-align:middle;line-height:1.3}
#overviewTroops .stationed-troop-table thead th{font-size:11px;color:#accae4;font-weight:400;text-align:left}
#overviewTroops .stationed-troop-table :is(th,td):nth-child(2){text-align:center}
#overviewTroops .stationed-troop-table :is(th,td):last-child{text-align:right;font-variant-numeric:tabular-nums}
#overviewTroops .stationed-troop-table tbody tr:last-child :is(th,td){border-bottom:0}
#overviewTroops button.stationed-troop-link{display:flex;width:100%;min-width:0;min-height:34px;gap:6px;align-items:center;justify-content:flex-start;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#e7f2ff;text-align:left;font-size:12px;font-weight:400;white-space:normal;line-height:1.3}
#overviewTroops button.stationed-troop-link:hover{color:#fff;background:#214563}
#overviewTroops .stationed-troop-link>span:last-child{min-width:0;flex:1;overflow-wrap:anywhere}
#overviewTroops .stationed-troop-link .unit-art{display:block;width:24px;height:30px;flex:0 0 24px;margin:0}
@media(max-width:760px){body .settlement-troops{grid-row:3}body .layout[data-view="village"] .settlement-scene-viewport{grid-row:2}body .layout[data-view="village"] .village-activity{grid-row:4}}
@media(min-width:761px){body:is(.classic-overview,.mobile-version) .settlement-resources{grid-column:1;grid-row:1}body:is(.classic-overview,.mobile-version) .settlement-troops{grid-column:1;grid-row:2}body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .village-activity{grid-column:2;grid-row:1 / span 2}}

#marchDialog .troop-input[hidden],#marchDialog .army-presets[hidden]{display:none} .recon-intel-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:6px;margin:8px 0 16px}.recon-intel-grid>div{display:flex;align-items:center;gap:6px;padding:6px;border:1px solid #49759d;background:#102d48;min-width:0}.recon-intel-grid>div>span{min-width:0;overflow-wrap:anywhere}.recon-intel-grid b{margin-left:auto}.recon-intel-grid .unit-art{width:24px;height:28px;flex:0 0 24px}

.recon-force-table{width:100%;table-layout:fixed;border-collapse:collapse;margin:8px 0}.recon-force-table :is(th,td){padding:7px 5px;border-bottom:1px solid #49759d;overflow-wrap:anywhere;white-space:normal}.recon-force-table th:first-child{width:50%;text-align:left}.recon-force-table :is(th,td):not(:first-child){text-align:right}.recon-force-table th>span{display:flex;align-items:center;gap:6px}.recon-force-table .unit-art{width:24px;height:28px;flex:0 0 24px}.report-capital-status{padding:8px;background:#173b60;border:1px solid #71a7d3;border-radius:4px}
/* Dedicated troop dispatch workspace. */
body .layout:is([data-view="dispatch"],[data-view="dispatchPreview"]){display:block;max-width:1280px;margin-inline:auto}
body .layout:is([data-view="dispatch"],[data-view="dispatchPreview"])>aside,body .layout:is([data-view="dispatch"],[data-view="dispatchPreview"]) .village-heading,body .layout:is([data-view="dispatch"],[data-view="dispatchPreview"]) #onboardingStrip{display:none}
body .dispatch-page{padding-bottom:20px;min-width:0}
body .dispatch-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
body .dispatch-heading h1{font-size:26px;margin:4px 0;overflow-wrap:anywhere}
body .dispatch-heading h1 small{font:400 16px system-ui;color:#b5cde2}
body .dispatch-modes{display:flex;gap:8px;margin-bottom:14px}
body .dispatch-modes button[aria-pressed="true"]{background:#2676c4;color:white;border-color:#a4d4ff;box-shadow:inset 0 -3px #b8dcff}
body .dispatch-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}
body .dispatch-selection,body .dispatch-summary-panel{margin:0;padding:18px;min-width:0}
body .dispatch-source{display:flex;align-items:center;gap:14px;margin-bottom:16px;font-weight:600}
body .dispatch-source select{flex:1;min-width:0}
body .dispatch-page .march-shortcuts{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 12px}
body .dispatch-column-labels,body .dispatch-troop{display:grid;grid-template-columns:minmax(120px,1fr) 90px 240px;gap:12px;align-items:center}
body .dispatch-column-labels{font-size:14px;color:#b8cfe3;padding:8px 0;border-bottom:1px solid #53789b}
body .dispatch-troop{padding:9px 0;border-bottom:1px solid #355675}
body .dispatch-troop[hidden]{display:none}
body .dispatch-troop label{display:flex;align-items:center;gap:9px;margin:0;font-size:16px;min-width:0}
body .dispatch-troop label img,body .dispatch-troop label .troop-icon{width:28px;height:32px;object-fit:contain;flex:none}
body .dispatch-troop>span{font-size:16px;font-variant-numeric:tabular-nums;color:#c4d9ec}
body .dispatch-quantity{display:grid;grid-template-columns:34px minmax(60px,1fr) 34px 48px;gap:5px;align-items:center}
body .dispatch-quantity input{width:100%;min-width:0;text-align:center;margin:0;padding:8px 3px;appearance:textfield;font-size:16px}
body .dispatch-quantity input::-webkit-inner-spin-button{appearance:none}
body .dispatch-quantity button{padding:8px 2px;min-width:0;min-height:38px;font-size:14px}
body .dispatch-advanced{margin-top:16px;border-top:1px solid #53789b;padding-top:14px}
body .dispatch-advanced summary{cursor:pointer;color:#bfe0ff;font-size:15px}
body .dispatch-advanced>label{display:grid;gap:6px;margin:14px 0 8px}
body .dispatch-advanced small{display:block;color:#adc5dc;font-size:14px}
body .dispatch-advanced fieldset{margin-top:14px;min-width:0}
body .dispatch-advanced .army-presets{display:flex;flex-wrap:wrap;gap:8px}
body .dispatch-advanced .army-presets label{width:100%}
body .dispatch-advanced .army-presets select,body .dispatch-advanced .army-presets input{max-width:100%}
body .dispatch-summary-panel{position:sticky;top:110px;min-height:0}
body .dispatch-summary-panel h2{font-size:20px;margin:0 0 12px}
body .dispatch-page .march-summary{margin:0;padding:0;border:0;background:none}
body .dispatch-facts{margin:0}
body .dispatch-facts>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #355675}
body .dispatch-facts dt{font-size:14px;color:#bed3e7}
body .dispatch-facts dd{margin:0;font-size:16px;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
body .dispatch-purpose,body .dispatch-page #marchWarning{font-size:14px;line-height:1.5;margin:12px 0 0}
body .dispatch-actions{display:flex;justify-content:flex-end;gap:10px;padding:12px 0;margin-top:4px}
body .dispatch-actions button{min-height:44px}
@media(max-width:1000px){body .dispatch-layout{grid-template-columns:minmax(0,1fr) 250px}body .dispatch-column-labels,body .dispatch-troop{grid-template-columns:minmax(100px,1fr) 75px 205px;gap:8px}}
@media(max-width:760px){body .dispatch-heading{align-items:flex-start;gap:10px}body .dispatch-heading h1{font-size:22px}body .dispatch-heading button{font-size:14px;padding:8px;flex:none}body .dispatch-layout{display:block}body .dispatch-selection,body .dispatch-summary-panel{padding:12px}body .dispatch-source{display:grid;gap:6px;font-size:14px}body .dispatch-column-labels{display:none}body .dispatch-troop{grid-template-columns:minmax(0,1fr) minmax(170px,1.1fr);gap:3px 8px}body .dispatch-troop label{grid-column:1;font-size:14px;gap:5px}body .dispatch-troop>span{grid-column:1;font-size:14px;padding-left:33px}body .dispatch-troop>span::before{content:'Available: ';font-size:12px}body .dispatch-quantity{grid-column:2;grid-row:1 / span 2;grid-template-columns:30px minmax(50px,1fr) 30px 38px;gap:3px}body .dispatch-quantity button{min-height:44px}body .dispatch-summary-panel{position:static;margin-top:12px}body .dispatch-facts{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}body .dispatch-facts>div{display:block;padding:8px 0}body .dispatch-facts dd{margin-top:4px}body .dispatch-actions{position:sticky;bottom:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#0d2842;border-top:1px solid #6ba0cf;z-index:30;margin-top:12px}body .dispatch-actions .primary{flex:1}body .dispatch-page{padding-bottom:0}body .dispatch-modes button{flex:1}}

body .command-preview{max-width:820px;margin:0 auto;padding:20px}body .command-preview .dispatch-facts dd{white-space:normal;text-align:right;overflow-wrap:anywhere}body .preview-troops>div{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid #355675}body .preview-troops b{margin-left:auto}body .preview-troops .troop-icon{width:28px;height:32px}body .command-preview h2{font-size:20px;margin-top:18px}

body .camp-details{margin:14px 0;padding:14px;border:1px solid #527ea5;border-radius:8px;background:#102d49}body .camp-status{font-weight:700;color:#cae5ff;margin-bottom:10px}body .camp-status.ready{color:#a1e4c6}body .camp-status.recovering{color:#f1d39a}body .camp-details .dispatch-facts dd{white-space:normal;text-align:right}body .camp-details p,body .camp-command-preview p{font-size:14px;line-height:1.5;margin:10px 0}body .camp-command-preview{margin-top:16px;padding:12px;border:1px solid #527ea5;border-radius:8px}body .camp-command-preview h2{margin:0 0 8px}body .camp-map-status{font-size:14px;margin:8px 0;color:#c5ddf4}
body .raid-assistant-heading{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px}body .raid-assistant-heading h2{font-size:23px;margin:0}body .raid-assistant-controls{display:flex;flex-wrap:wrap;gap:12px}body .raid-assistant-controls label{display:grid;gap:4px;font-size:14px;min-width:180px}body #raidPresetNote{font-size:14px;color:#bed5e8;margin:12px 0}body .raid-targets-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:12px}body .raid-target-card{border:1px solid #527ea5;border-radius:8px;background:#102c46;padding:14px;min-width:0}body .raid-target-title{display:flex;justify-content:space-between;gap:12px;align-items:start}body .raid-target-title h3{font-size:19px;margin:0;overflow-wrap:anywhere}body .raid-target-title small,body .raid-latest-report small{font-size:13px;color:#b8d1e6}body .raid-target-title>button{font-size:13px;padding:6px 9px}body .raid-target-card p{font-size:14px;margin:9px 0}body .raid-latest-report{display:grid;gap:5px;margin:12px 0;min-width:0}body .raid-latest-report button{text-align:left;font-size:14px;white-space:normal;overflow-wrap:anywhere}body .raid-target-actions{display:flex;flex-wrap:wrap;gap:8px}body .raid-target-actions button{font-size:14px;min-height:42px}@media(max-width:760px){body .raid-assistant-controls{width:100%}body .raid-assistant-controls label{flex:1;min-width:0}body .raid-assistant-controls select{width:100%;min-width:0}body #raidAssistant{padding:12px}body .raid-targets-list{grid-template-columns:1fr}}

/* Rankings use complete cells and aligned columns, rather than name-sized buttons. */
body #rankingsView .standings-scroll{overflow-x:visible}
body #rankingsView table{width:100%;table-layout:fixed;white-space:normal}
body #rankingsView th,body #rankingsView td{padding:10px 12px;border-right:1px solid #416486;overflow-wrap:anywhere;vertical-align:middle}
body #rankingsView th:last-child,body #rankingsView td:last-child{border-right:0}
body #rankingsView th:nth-child(1){width:65px}
body #rankingsView th:nth-child(3){width:24%}
body #rankingsView th:nth-child(4){width:18%}
body #rankingsView thead{background:#1c4164}
body #rankingsView tbody tr{background:#102b44}
body #rankingsView tbody tr:nth-child(even){background:#163650}
body #rankingsView tbody tr.your-standing{background:#20517d}
body #rankingsView tbody tr:hover{background:#244968}
body #rankingsView .profile-link,body #rankingsView .alliance-tag{background:transparent;border:0;border-radius:0;box-shadow:none;color:#e8f3ff;padding:4px 0;text-align:left;white-space:normal;overflow-wrap:anywhere;max-width:100%;font-size:14px}
body #rankingsView .profile-link{display:block;width:100%;min-height:44px;font-weight:600}
body #rankingsView .profile-link:hover,body #rankingsView .alliance-tag:hover{background:transparent;color:#fff;text-decoration:underline;border-color:transparent}
body #rankingsView .alliance-tag{min-height:32px;font-size:12px;color:#a8d5ff}
body #rankingsView .ranking-record-date{display:block;font-size:11px;white-space:normal}
@media(max-width:650px){
 body #rankingsView th,body #rankingsView td{padding:7px 8px;font-size:12px;letter-spacing:0}
 body #rankingsView th:nth-child(1){width:38px}
 body #rankingsView th:nth-child(3){width:25%}
 body #rankingsView th:nth-child(4){width:20%}
 body #rankingsView .profile-link{font-size:13px}
}

/* Primary map action precedes details so long owner information cannot bury it. */
body #targetPanel .village-actions,body #villageDetailsContent .village-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:10px 0}
body #targetPanel .village-actions button,body #villageDetailsContent .village-actions button{width:100%;margin:0;padding:8px 6px;min-height:44px;white-space:normal;overflow-wrap:anywhere;font-size:14px}
body #targetPanel .village-actions [data-village-attack],body #villageDetailsContent .village-actions [data-village-attack]{display:block;grid-column:1/-1;background:#2678bc;color:#fff;border:1px solid #a9d9ff;font-weight:700}
body #targetPanel .village-actions [data-village-attack]:hover,body #villageDetailsContent .village-actions [data-village-attack]:hover{background:#328ace}
body #targetPanel .target-ownership p{margin:6px 0;line-height:1.4}

/* Settlement actions expand naturally below the map; no clipped popup or inner scroll. */
body .layout[data-view="map"] #targetPanel{position:relative;inset:auto;width:100%;max-width:none;max-height:none;height:auto;overflow:visible;margin:12px 0 0;padding:14px;box-sizing:border-box;cursor:default;user-select:text}
body #targetPanel h2{padding-right:36px;overflow-wrap:anywhere}
body #targetPanel .village-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
body #targetPanel .support-recall-row{grid-template-columns:minmax(0,1fr) auto}
@media(max-width:650px){body #targetPanel .village-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Troop management: readable actions and compact conquest status. */
#rallySections{flex-wrap:wrap}#rallyTransferLayout{align-items:start}.support-actions,.command-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.support-management-row{align-items:start;gap:12px}.command-actions{margin-top:8px}.command-actions small,.cancel-expired{font-size:.8rem;color:#b7cde0}.compact-conquest{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;border:1px solid #639dd0;background:#102d48;border-radius:6px;margin-bottom:6px}.compact-conquest button{padding:6px 10px}.recall-troop-input{display:grid;grid-template-columns:32px minmax(0,1fr) 90px;align-items:center;gap:8px;padding:8px 0}.recall-troop-input small{display:block;color:#b7cde0}.recall-troop-input input{width:100%;min-width:0}#partialRecallDialog{width:min(560px,calc(100vw - 24px));max-height:85dvh;overflow-y:auto}#partialRecallForm{min-width:0}.support-management-row .garrison-strip{flex-wrap:wrap}.support-management-row small{display:block}.march-row>div,.attack-list-row>div{min-width:0;overflow-wrap:anywhere}@media(max-width:650px){.support-management-row{display:flex;flex-direction:column;align-items:stretch}.support-actions button{flex:1}.compact-conquest{align-items:start;flex-wrap:wrap}.command-actions button{padding:8px}#rallySections button{flex:1;min-width:100px}}
/* Desktop map tools live beside the play surface, leaving its full height free. */
@media(min-width:651px){
 body .layout[data-view="map"] .map-legend>.map-heading{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:0 0 14px;margin:0 0 12px;border-bottom:1px solid #446f95;background:transparent;min-height:0}
 body .layout[data-view="map"] .map-legend>.map-heading h2{font-size:22px;line-height:1.2;margin:0 0 6px;white-space:normal}
 body .layout[data-view="map"] .map-legend #mapCoordinates{white-space:normal;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
 body .layout[data-view="map"] .map-legend>.map-heading button{width:100%;min-height:36px;padding:6px 8px;font-size:14px;white-space:normal}
 body .layout[data-view="map"] .map-panel>.map-axis-frame{padding-top:8px}
}

/* Keep relocated map controls inside their own column. */
body .layout[data-view="map"] #mapTools{min-width:0;max-width:100%;height:auto;overflow:visible}
body .layout[data-view="map"] #mapTools>div{min-width:0;max-width:100%}
body .layout[data-view="map"] #mapTools #mapCoordinates{white-space:normal;overflow-wrap:anywhere}
body .layout[data-view="map"] #mapTools>button{display:inline-flex;align-items:center;justify-content:center;visibility:visible;opacity:1;position:static;color:#f5f8ff;background:#1a476b;border:1px solid #8cb9e3;min-height:38px;max-width:100%;white-space:normal}
@media(min-width:651px){
 body .layout[data-view="map"] .map-legend>#mapTools{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:0 0 14px;margin-bottom:12px;min-height:0;background:transparent}
 body .layout[data-view="map"] .map-legend>#mapTools>button{width:100%;padding:7px 8px;font-size:14px}
 body .layout[data-view="map"] .map-legend>#mapTools h2{font-size:22px;white-space:normal}
}

/* Selection actions open in view rather than below the full-height map. */
body .layout[data-view="map"] dialog#targetPanel{position:fixed;inset:0;width:min(560px,calc(100vw - 24px));max-width:560px;height:fit-content;max-height:calc(100dvh - 32px);margin:auto;padding:18px;overflow-x:hidden;overflow-y:auto;background:#102b43;color:#f5f8ff;border:2px solid #8cbfff;border-radius:8px;box-shadow:0 14px 50px #0009;user-select:text}
body dialog#targetPanel::backdrop{background:#06121c99}
body dialog#targetPanel .selection-close{position:absolute;top:10px;right:10px;width:36px;height:36px;padding:0;font-size:24px;color:#fff;background:#1e4a70;border:1px solid #86b9e7}
body dialog#targetPanel .target-owner{padding-right:38px}
@media(max-width:650px){body .layout[data-view="map"] dialog#targetPanel{padding:14px;width:calc(100vw - 20px)}body dialog#targetPanel h2{font-size:24px;margin-top:8px}}

.siege-target-control{display:grid;gap:.4rem;margin:.8rem 0;padding:.75rem;border:1px solid var(--border);border-radius:.5rem}.siege-target-control select{width:100%}.report-siege table{width:100%;table-layout:fixed}.report-siege th,.report-siege td{padding:.4rem;overflow-wrap:anywhere}
/* Approved conquest banner: prominent without covering the settlement or its flag. */
body #worldMap .conquest-map-marker{position:absolute;left:0;bottom:0;width:44%;height:62%;object-fit:contain;object-position:left bottom;z-index:6;pointer-events:none;filter:drop-shadow(0 1px 1px #fff) drop-shadow(0 2px 2px #071626);}
body button:not(:disabled):active,body button.button-pressed:not(:disabled){filter:brightness(1.2);box-shadow:inset 0 0 0 2px #d7edff,inset 0 3px 8px #001326aa!important;border-color:#fff!important;}
.troop-upgrade progress{display:block;width:100%;height:14px;accent-color:#53adff;margin:8px 0;}

/* Settlement-specific Warehouse balances and live fill estimates. */
.warehouse-storage{margin-top:1rem;min-width:0}.warehouse-storage h3{margin:0 0 .75rem}.warehouse-storage-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:.6rem}.warehouse-resource{min-width:0;border:1px solid var(--border,#6794bc);border-radius:8px;background:#102d48;padding:.75rem;color:#e9f4ff}.warehouse-resource h4{display:flex;align-items:center;gap:.5rem;margin:0 0 .6rem;font-size:1rem}.warehouse-resource .sprite{display:inline-block;width:28px;height:28px;flex:0 0 28px}.warehouse-amount{display:flex;flex-wrap:wrap;align-items:baseline;gap:.35rem;overflow-wrap:anywhere}.warehouse-amount strong{font-size:1.15rem}.warehouse-amount span{font-size:.875rem;color:#bad1e5}.warehouse-resource p{margin:.45rem 0 0;font-size:.875rem;line-height:1.4;overflow-wrap:anywhere}.warehouse-income{color:#97e0bd}.warehouse-resource progress{display:block;width:100%;height:10px;margin-top:.6rem;accent-color:#57adff}.warehouse-fill-time{font-variant-numeric:tabular-nums}.warehouse-storage-note{font-size:.875rem;color:#bad1e5;margin:.6rem 0 0}

/* Achievement progress stays readable without exposing rivals' private economy. */
.achievement-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));}
.achievement-copy{min-width:0;flex:1;}
.achievement-emblem img{width:44px;height:44px;object-fit:contain;}
.achievement-progress{height:6px;border-radius:4px;background:#071a2c;margin:7px 0;overflow:hidden;}
.achievement-progress span{display:block;height:100%;background:#67b4ff;border-radius:4px;}
.achievement-note{font-size:.85rem;color:#c1d6e9;}
.achievement small{overflow-wrap:anywhere;}

/* Approved heraldic category artwork and milestone frames. */
.achievement-emblem{position:relative;flex:0 0 82px;width:82px;height:82px;border:0;border-radius:0;background:transparent;box-shadow:none!important}.achievement-emblem img.achievement-category-art{width:72px;height:82px;object-fit:contain}.achievement-emblem img.achievement-tier-art{position:absolute;right:-6px;bottom:-2px;width:32px;height:40px;object-fit:contain;border:1px solid #5b7895;border-radius:4px;background:#082138}.locked .achievement-emblem{opacity:.45}.achievement{min-width:0}.achievement-copy{overflow-wrap:anywhere}

.race-places{padding-left:20px;margin:8px 0}.race-places li{margin:5px 0}.race-places .profile-link{font-size:inherit}.achievement-tier-targets{display:flex;flex-wrap:wrap;gap:4px;margin:7px 0}.achievement-tier-targets span{font-size:12px;padding:3px 5px;border:1px solid #46627c;border-radius:4px;color:#adc2d8}.achievement-tier-targets .completed{color:#ffe7ad;border-color:#a98949;background:#293524}.race-achievement{align-items:flex-start}

.world-outcome{margin:12px;padding:14px;border:1px solid #c3a257;border-radius:6px;background:#102f4c;color:#ffe6a9}

/* World domination dashboard */
.world-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.world-kpis .panel{display:flex;flex-direction:column;gap:10px}.world-kpis span{font-size:14px;color:#c6d0dd}.world-kpis strong{font-size:30px;color:#f1d28b}.world-personal{display:grid;grid-template-columns:1fr 1fr;gap:16px}.world-leader{margin-bottom:16px}.world-meter{height:22px;background:#16243a;border:1px solid #8c9cac;border-radius:7px;position:relative;overflow:hidden}.world-meter span{display:block;height:100%;background:linear-gradient(90deg,#30689c,#efd38c)}.world-meter i{position:absolute;left:75%;top:0;height:100%;border-left:3px solid #fff}.world-meter-label{display:flex;justify-content:space-between;gap:12px;font-size:14px;margin:8px 0}.world-own-row{background:#23426555}#worldDashboard>.panel{margin-bottom:16px}#worldDashboard table{min-width:650px}#worldDashboard p{font-size:14px}#worldDashboard .standings-scroll{overflow-x:auto}@media(max-width:700px){.world-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.world-personal{grid-template-columns:1fr}.world-meter-label{font-size:12px}}

.victory-alert-banner{background:#142a43;border:1px solid #bd9a53;border-left:4px solid #ebc675;border-radius:8px;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0}.victory-alert-banner[hidden]{display:none}.victory-alert-banner strong{color:#f1d28b}.victory-alert-banner p{margin:5px 0;font-size:14px}.victory-alert-banner small,.victory-alert-history time{color:#bcc9d8;font-size:12px}.victory-alert-history{list-style:none;padding:0;margin:0}.victory-alert-history li{border-top:1px solid #385069;padding:12px 0}.victory-alert-history p{margin:0 0 6px}.victory-alert-reset p{color:#efbfab}.victory-alert-completed p{color:#f1d28b}@media(max-width:700px){.victory-alert-banner{align-items:stretch;flex-direction:column}.victory-alert-banner button{width:100%}}

.alliance-plan-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.alliance-plan-card{margin:12px 0;border-left:4px solid #5688bc}.alliance-plan-card.plan-high{border-left-color:#e9b76f}.alliance-plan-card small{color:#d3bc90}.alliance-plan-notes{white-space:pre-wrap;overflow-wrap:anywhere}.alliance-plan-card .alliance-actions{display:flex;flex-wrap:wrap;gap:8px}.alliance-plan-card h3{overflow-wrap:anywhere}#alliancePlansList details>summary{cursor:pointer;padding:14px 0}@media(max-width:700px){.alliance-plan-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.alliance-plan-card .panel-heading{align-items:stretch;flex-direction:column}}
.champions-tools{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-bottom:16px}.champion-world{margin:16px 0}.champion-world .panel-heading small{color:#ddc18a}.champion-world .panel-heading span{color:#c3cedc;font-size:14px}.champion-victory{background:#142a4355;border-left:4px solid #e3bb6e;padding:16px;margin:16px 0}.champion-victory>strong{font-size:24px;color:#f1d28b}.champion-member{display:inline-block;padding:6px 12px;border:1px solid #687b96;border-radius:18px;margin:4px 6px 4px 0;font-size:14px}.champion-facts{display:flex;flex-wrap:wrap;gap:12px;color:#c4cedc;font-size:14px}.champion-honors{margin:12px 0 20px}.champion-honors p{font-size:14px;overflow-wrap:anywhere}.champion-world summary{padding:14px 0;cursor:pointer}.champion-world table{width:100%;min-width:450px}#championsMore{margin:12px 0 24px}.champions-empty p{max-width:80ch}@media(max-width:700px){.champion-world .panel-heading{align-items:flex-start;flex-direction:column}.champion-victory>strong{font-size:21px}}
.achievement-tracker{border-block:1px solid #b89b57;padding:1rem 0;margin:1rem 0}.goal-tools{display:flex;flex-wrap:wrap;gap:1rem;margin:1rem 0}.goal-tools label{display:grid;gap:.4rem;flex:1;min-width:12rem;font-size:.875rem}.achievement-tracker button{margin-top:.5rem}.achievement-tracker .achievement-copy{min-width:0}.achievement-tracker .achievement-copy small{overflow-wrap:anywhere}
/* Keep text and meters inside their card borders. */
body :is(#worldDashboard .panel,.champion-world,.champions-empty,.alliance-plan-card){padding:20px;min-width:0;box-sizing:border-box}
body :is(#worldDashboard .panel,.champion-world,.champions-empty,.alliance-plan-card)>:first-child{margin-top:0}
body :is(#worldDashboard .panel,.champion-world,.champions-empty,.alliance-plan-card)>:last-child{margin-bottom:0}
body #worldDashboard .world-kpis .panel{padding:16px 20px}
body #worldDashboard :is(h2,h3,p,strong,span){overflow-wrap:anywhere}
@media(max-width:700px){body :is(#worldDashboard .panel,.champion-world,.champions-empty,.alliance-plan-card){padding:16px}body #worldDashboard .world-kpis .panel{padding:14px 16px}}
/* Compact battle records with separate, accessible navigation links. */
body .battle-link{display:inline-block;background:transparent;border:0;border-radius:0;box-shadow:none;color:#a8d6ff;text-decoration:underline;text-underline-offset:3px;padding:4px 0;min-height:32px;font-size:14px;line-height:1.4;text-align:left;white-space:normal;overflow-wrap:anywhere}
body .battle-link:hover{color:#fff;background:transparent}
body .battle-link:focus-visible,body .report-title-link:focus-visible{outline:2px solid #e8c982;outline-offset:3px}
.report-participants{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;margin:8px 0}
.report-participants>div{min-width:0;overflow-wrap:anywhere}.report-participants small{display:block;color:#bdd3e8;font-size:14px}
body .report-register .report{display:block;padding:10px 14px}.report-list-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
body .report-title-link{border:0;box-shadow:none;background:transparent;color:#edf5ff;text-align:left;padding:4px 0;min-height:32px;font-size:14px;white-space:normal;overflow-wrap:anywhere}
body .report-list-heading time{font-size:14px}.report-list-result{display:block;font-size:14px;color:#d5e2ef;margin:4px 0}
body .report-row{margin-bottom:6px}.report-summary-line{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 0;font-size:14px}
body #battleReportDialog .report-document-heading{padding:12px 36px 12px 14px}body #battleReportDialog .report-document-heading h2{font-size:22px;margin:0}
body #battleReportDialog .report-document-heading .report-seal{width:32px;height:32px;font-size:18px}
.report-armies-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
body #battleReportDialog .report-armies-grid .report-army{margin:0}body #battleReportDialog .report-army header{padding:10px 12px;gap:4px}
body #battleReportDialog .report-location{padding:6px 12px;font-size:14px}body #battleReportDialog .report-force-table :is(th,td){padding:6px;font-size:14px}
body #battleReportDialog .report-narrative{margin:8px 0 12px}.report-extra-details{margin-top:12px;border-top:1px solid #54789d}.report-extra-details>summary{padding:12px 0;cursor:pointer;font-size:14px;color:#cce7ff}
@media(max-width:700px){.report-armies-grid{grid-template-columns:1fr}body #battleReportDialog .battle-document{padding:16px}body .report-row{grid-template-columns:24px minmax(0,1fr) auto}body .report-row .report-delete-button{grid-column:auto;padding:8px;font-size:14px}body .report-register .report{padding:10px}}
@media(max-width:420px){.report-participants{grid-template-columns:1fr}body .report-row{grid-template-columns:24px minmax(0,1fr)}body .report-row .report-delete-button{grid-column:2;justify-self:end}}
/* Every troop and detail remains visible; compactness comes from shared grids. */
.report-detail-grid,.report-intel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
body #battleReportDialog .report-detail-grid>*{margin:12px 0 0;padding:12px;min-width:0}
body #battleReportDialog .report-intelligence{border:1px solid #54789d;border-radius:6px;padding:14px;margin:12px 0;min-width:0}
body #battleReportDialog .report-intelligence h3{margin:0 0 8px;font-size:18px}.report-intelligence h4{margin:8px 0;font-size:16px}
body #battleReportDialog .recon-force-table{width:100%;min-width:0;table-layout:fixed;font-size:14px}
body #battleReportDialog .recon-force-table :is(th,td){padding:6px;overflow-wrap:anywhere;white-space:normal}
body #battleReportDialog .recon-force-table th:first-child{width:48%;text-align:left}.report-intel-grid>section{min-width:0}
body #battleReportDialog .recon-intel-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
body #battleReportDialog .recon-intel-grid>div{padding:8px;min-width:0;overflow-wrap:anywhere}
body #battleReportDialog .report-commanders{margin-top:12px;padding:12px}body #battleReportDialog .report-command-card{padding:10px}
@media(max-width:700px){.report-detail-grid,.report-intel-grid{grid-template-columns:1fr}body #battleReportDialog .report-intelligence{padding:12px}}
.incoming-support-panel{padding:18px;margin:12px 0;min-width:0;box-sizing:border-box}.incoming-support-panel>h3:first-child{margin-top:0}.incoming-support-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:16px;align-items:start}.incoming-support-source{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid #456482}.incoming-support-source>div{min-width:0;overflow-wrap:anywhere}.incoming-support-source small{display:block;font-size:14px;color:#bdd3e8}.incoming-support-source>button{flex-shrink:0}.incoming-support-troops{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}.incoming-support-troops label{display:grid;font-size:14px;gap:4px}.incoming-support-troops small{color:#bdd3e8}.incoming-support-troops input{width:100%;box-sizing:border-box;min-width:0}.incoming-support-estimate{padding:12px 0;line-height:1.6}.incoming-support-fill{display:flex;flex-wrap:wrap;gap:8px}.incoming-support-panel>label{display:grid;gap:6px;font-size:14px}.incoming-support-panel>label select{max-width:100%}@media(max-width:760px){.incoming-support-layout{grid-template-columns:1fr}.incoming-support-troops{grid-template-columns:repeat(2,minmax(0,1fr))}.incoming-support-panel{padding:16px}.incoming-support-source{flex-wrap:wrap}}
/* Reports index: one line per report, navigation only inside the opened report. */
body .report-register-compact .report-row{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:8px;margin-bottom:5px}
body .report-register-compact .report{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;padding:10px 14px;font-size:14px;line-height:1.4;background:#10263d;color:#e7f0fa;border:1px solid #49759d;border-radius:5px;text-align:left}
body .report-register-compact .report:hover{background:#193b59;border-color:#94c2ea}
body .report-register-compact .report-single-summary{display:block;min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body .report-register-compact time{display:block;flex-shrink:0;white-space:nowrap;font-size:14px;color:#bdcfe1}
body .report-register-compact .report-delete-button{grid-column:auto;justify-self:auto;min-height:44px;padding:8px 12px}
@media(max-width:650px){body .report-register-compact .report{gap:8px;padding:10px;font-size:14px}body .report-register-compact time{font-size:12px}body .report-register-compact .report-row{gap:5px}body .report-register-compact .report-delete-button{padding:8px}}

body .report-register-compact .report-result-dot{display:block;width:14px;height:14px;flex:0 0 14px;border-radius:50%;border:1px solid #ffffff75;box-shadow:0 0 0 2px #071a2b}
body .report-result-red{background:#ff505c}body .report-result-green{background:#46de87}body .report-result-yellow{background:#ffd54a}body .report-result-blue{background:#52a8ff}

#keepManagerContent .panel{padding:24px} .keep-manager-grid{display:grid;grid-template-columns:minmax(130px,1fr) minmax(60px,100px) minmax(60px,100px);gap:12px;align-items:center;margin:20px 0}.keep-manager-grid small{display:block}.keep-manager-controls{display:flex;flex-wrap:wrap;gap:20px;margin:20px 0}.keep-manager-grid input{width:100%;min-width:0}#keepManagerContent p{line-height:1.6}@media(max-width:650px){#keepManagerContent .panel{padding:16px}.keep-manager-grid{gap:8px}}
body #profileView .account-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,460px);align-items:start;gap:20px}.profile-sidebar{display:grid;gap:20px;min-width:0}#profileGrowth{padding:20px;min-width:0}#profileGrowth h2{margin:0 0 8px}.profile-growth-chart{width:100%;display:block;min-height:220px}.profile-growth-chart text{fill:#cad9e9;font-size:14px}.growth-grid{stroke:#ffffff20;stroke-width:1}.growth-line{fill:none;stroke:#69baff;stroke-width:3;stroke-linejoin:round}.growth-point{fill:#f5c967;stroke:#10263d;stroke-width:1.5}.growth-caption{font-weight:700}#profileGrowth small{display:block;line-height:1.6}#profileGrowth details{margin-top:16px}#profileGrowth table{width:100%}@media(max-width:1000px){body #profileView .account-layout{grid-template-columns:minmax(0,1fr)}.profile-sidebar{width:100%;max-width:580px}.profile-growth-chart{min-height:0}}

/* Building List: two building columns, troops, Keep Manager/resources, then recruitment/queues. */
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .settlement-workspace{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;align-items:start}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] #classicBuildings{grid-column:1 / span 2;grid-row:1 / span 3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;background:transparent;align-self:start}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .settlement-sidebar{display:contents}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .settlement-resources{display:contents}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .settlement-troops{grid-column:3;grid-row:1 / span 3;margin:0;align-self:start}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] [data-open-keep-manager]{grid-column:4;grid-row:1;margin:0;min-width:0;align-self:start}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] [data-open-mass-recruit]{grid-column:5;grid-row:1;margin:0;min-width:0;align-self:start}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] #resources{grid-column:4;grid-row:2;grid-template-columns:1fr;margin:0;padding:4px;border:1px solid #49759d;border-radius:6px;background:#10263d;min-width:0}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .village-activity{grid-column:5;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0;min-width:0}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .classic-building-row{min-width:0;width:100%;align-self:start;overflow-wrap:anywhere}
@media(max-width:1100px){
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .settlement-workspace{grid-template-columns:repeat(2,minmax(0,1fr))}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] #classicBuildings{grid-column:1 / -1;grid-row:1}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .settlement-troops{grid-column:1;grid-row:2 / span 4}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] [data-open-keep-manager]{grid-column:2;grid-row:2}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] [data-open-mass-recruit]{grid-column:2;grid-row:4}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] #resources{grid-column:2;grid-row:3}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .village-activity{grid-column:2;grid-row:5}
}
@media(max-width:550px){
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .settlement-workspace{grid-template-columns:minmax(0,1fr)}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] #classicBuildings{grid-column:1;grid-row:1}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .settlement-troops{grid-column:1;grid-row:2}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] [data-open-keep-manager]{grid-column:1;grid-row:3}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] [data-open-mass-recruit]{grid-column:1;grid-row:5}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] #resources{grid-column:1;grid-row:4}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] .village-activity{grid-column:1;grid-row:6}
}

.raid-pages{display:flex;align-items:center;justify-content:space-between;gap:12px;grid-column:1/-1;padding:12px 0}.raid-pages span{text-align:center;font-size:14px}@media(max-width:500px){.raid-pages{gap:6px}.raid-pages button{padding:8px}}
.keep-bulk{padding:18px;border:1px solid #49759d;border-radius:8px;margin-bottom:24px;background:#10263d}.keep-bulk-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:14px 0}.keep-bulk-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.keep-bulk-row{display:flex;align-items:start;gap:10px;padding:12px;background:#19334c;border-radius:5px}.keep-bulk-row input{width:20px;flex:0 0 20px}.keep-bulk-row span{min-width:0}.keep-bulk-row small{display:block;line-height:1.5;margin-top:6px;overflow-wrap:anywhere}@media(max-width:700px){.keep-bulk-list{grid-template-columns:minmax(0,1fr)}}
/* Keep Manager ordered upgrade editor */
.keep-manager-entry{display:block;width:100%;margin-top:10px;padding:12px;white-space:normal}.keep-plan-actions{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.keep-plan-editor{display:grid;grid-template-columns:minmax(240px,1fr) minmax(300px,1.4fr);gap:24px;margin:20px 0}.keep-building-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.keep-building-picker button{padding:12px;white-space:normal;text-align:left}.keep-building-picker small,.keep-upgrade-list small{display:block;margin-top:4px}.keep-upgrade-list{list-style:none;padding:0;max-height:580px;overflow:auto}.keep-upgrade-list li{display:flex;align-items:center;gap:12px;border:1px solid #77623e;border-radius:6px;padding:10px 12px;margin-bottom:8px;background:rgba(20,17,12,.2)}.keep-upgrade-list li>span:nth-child(2){flex:1;min-width:0}.keep-upgrade-list li>div{display:flex;gap:4px}.keep-upgrade-list button{padding:6px 10px}.keep-drag{cursor:grab;font-size:24px}.keep-plan-editor h2 small{font-size:13px;font-weight:normal}.keep-manager-controls{display:flex;gap:16px;flex-wrap:wrap;margin-top:16px}@media(max-width:760px){.keep-plan-editor{grid-template-columns:1fr}.keep-upgrade-list{max-height:480px}.keep-upgrade-list li{gap:8px}}
.keep-templates{padding:16px;margin:20px 0;border:1px solid #77623e;border-radius:8px}.keep-template-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.keep-template-fields label,.keep-template-bulk label{display:grid;gap:6px;min-width:0}.keep-template-fields input,.keep-template-fields select,.keep-template-bulk select{width:100%;min-width:0}.keep-templates h2 small{font-size:13px;font-weight:normal}.keep-template-bulk{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:16px 0}.keep-template-bulk label{flex:1;min-width:180px}@media(max-width:600px){.keep-template-fields{grid-template-columns:1fr}.keep-templates{padding:12px}.keep-templates .keep-plan-actions button{white-space:normal}}
.mass-recruit-presets{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:20px 0}.mass-recruit-presets label{display:grid;gap:6px}.mass-recruit-mix{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.mass-recruit-mix label{display:grid;gap:6px;padding:12px;border:1px solid #77623e;border-radius:6px}.mass-recruit-mix input{width:80px}.mass-recruit-table-wrap{overflow:auto;margin:16px 0}.mass-recruit-table{width:100%;border-collapse:collapse;min-width:1200px}.mass-recruit-table th,.mass-recruit-table td{padding:12px 10px;border:1px solid #77623e;text-align:left}.mass-recruit-table th:first-child{min-width:180px}.mass-recruit-table td:last-child{min-width:230px}.mass-recruit-table input[type=number]{width:82px;padding:8px}.mass-recruit-table small{display:block}.mass-locked{opacity:.65;font-size:12px}.mass-recruit-pages{display:flex;align-items:center;gap:12px;margin:16px 0}#massRecruitSummary{padding:16px 0;overflow-wrap:anywhere}@media(max-width:750px){.mass-recruit-mix{grid-template-columns:repeat(2,minmax(0,1fr))}.mass-recruit-presets>*{max-width:100%}}
.keep-plan-checks{margin:20px 0;padding:16px;border:1px solid #77623e;border-radius:8px;overflow-wrap:anywhere}.keep-plan-checks.has-warnings{border-color:#c6953d}.keep-check-success{color:#7dc69a}.keep-check-note{font-size:12px;opacity:.8}.keep-plan-warning-list{list-style:none;padding:0;max-height:320px;overflow:auto}.keep-plan-warning-list li{display:flex;align-items:flex-start;gap:12px;padding:12px 8px;border-bottom:1px solid #77623e}.keep-plan-warning-list li>div{min-width:0;flex:1}.keep-plan-warning-list li p{margin:6px 0}.keep-plan-warning-list button{flex-shrink:0}.keep-upgrade-list li.keep-plan-blocked{border-color:#d9a142;background:rgba(183,122,20,.15)}.keep-upgrade-list li:focus{outline:2px solid #d9a142;outline-offset:2px}@media(max-width:500px){.keep-plan-checks{padding:12px}.keep-plan-warning-list li{flex-direction:column;gap:8px}}
.recruit-template-tools{padding:16px;margin:18px 0;border:1px solid #77623e;border-radius:8px}.recruit-template-tools h2 small{font-size:13px;font-weight:normal}.recruit-template-tools label{display:grid;gap:6px;max-width:380px}.recruit-template-tools input{width:100%}.recruit-template-tools p{overflow-wrap:anywhere}.recruit-template-tools button{white-space:normal}

.mass-recruit-targets input{width:100%;max-width:180px}.mass-target-progress{min-width:140px;max-width:190px;margin-bottom:8px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}

.kingdom-management{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding:20px 0;margin:20px 0;border-top:1px solid #77623e}.kingdom-management>div{min-width:0}.kingdom-management p{margin:10px 0;line-height:1.5;overflow-wrap:anywhere}.kingdom-management progress{width:100%;height:12px;accent-color:#c6953d}.kingdom-management button{white-space:normal;margin:4px 4px 4px 0}.kingdom-management-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:16px 0}.kingdom-management-metrics>div{display:grid;gap:6px;min-width:0}.kingdom-management-metrics b{font-size:24px}.kingdom-management-filters{display:flex;flex-wrap:wrap;gap:8px}.kingdom-management-filters button{white-space:normal}@media(max-width:1000px){.kingdom-management{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.kingdom-management,.kingdom-management-metrics{grid-template-columns:1fr}.kingdom-management{gap:16px}.kingdom-management-metrics{gap:12px}}

.mass-transfer-room,.mass-transfer-reviewed{padding:16px;margin:18px 0;border:1px solid #77623e;border-radius:8px}.mass-transfer-planning{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:20px 0}.mass-transfer-planning section{min-width:0}.mass-transfer-resource-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.mass-transfer-resource-grid>div,.mass-transfer-resource-grid label{display:grid;gap:8px;min-width:0}.mass-transfer-resource-grid input{width:100%;min-width:0}.mass-transfer-table-wrap{overflow:auto;margin:18px 0}.mass-transfer-table{width:100%;min-width:1050px;border-collapse:collapse}.mass-transfer-table th,.mass-transfer-table td{padding:12px;border:1px solid #77623e;text-align:left}.mass-transfer-table small{display:block;margin:6px 0;font-size:14px;line-height:1.5}.mass-transfer-table input[type=number]{width:120px}.mass-transfer-review-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.mass-transfer-review-list article{padding:12px;border:1px solid #77623e;overflow-wrap:anywhere}#massTransferSummary{padding:16px 0;overflow-wrap:anywhere}.mass-transfer-reviewed p{line-height:1.5}.mass-transfer-reviewed[hidden]{display:none}@media(max-width:1000px){.mass-transfer-planning{grid-template-columns:1fr}.mass-transfer-review-list{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.mass-transfer-resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mass-transfer-review-list{grid-template-columns:1fr}}

/* Keep Manager: shared settlement context and four focused sections. */
#keepManagerContent [hidden]{display:none!important}
.keep-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:22px 0}
.keep-tabs button{padding:14px 12px;white-space:normal}
.keep-tabs button[aria-selected="true"]{background:var(--gold);color:#17130c;border-color:var(--gold);font-weight:700}
.keep-tabs button:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
#keepManagerContent [role="tabpanel"]{padding:8px 0 18px}
.keep-overview-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0}
.keep-overview-summary>div,.keep-default-template{padding:16px;border:1px solid var(--line);border-radius:8px}
.keep-overview-summary small,.keep-overview-summary b{display:block;overflow-wrap:anywhere}
.keep-overview-summary small{margin-bottom:8px}
.keep-save-bar{padding:16px 0 0;margin-top:12px;border-top:1px solid var(--line)}
.keep-save-bar p{margin:0 0 12px}.keep-save-bar small{display:block;margin-top:10px}
@media(max-width:600px){.keep-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.keep-overview-summary{grid-template-columns:1fr}.keep-save-bar button{width:100%}}

.map-search-panel{padding:18px;margin-bottom:16px;min-width:0}.map-search-panel h2{margin-bottom:14px}.map-search-panel form{display:grid;gap:10px}.map-search-panel input,.map-search-panel select{width:100%;min-width:0}.map-search-actions,.map-search-pages{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.map-search-result{display:block;width:100%;text-align:left;padding:12px;margin-bottom:8px;overflow-wrap:anywhere}.map-search-result b,.map-search-result small{display:block}.map-search-result small{margin-top:5px;color:var(--muted);font-size:.875rem}.map-search-note{font-size:.875rem}.map-search-pages{justify-content:space-between;margin-top:14px}#worldMap .map-search-muted{opacity:.3}#worldMap .map-search-match{box-shadow:inset 0 0 0 3px #f1d48a}#worldMap .map-search-muted:hover,#worldMap .map-search-muted:focus-visible{opacity:1}

.map-search-panel form{grid-template-columns:minmax(200px,2fr) minmax(170px,1fr) auto;align-items:end}.map-search-panel label{display:grid;gap:6px}.map-search-panel h2{font-size:1.25rem}#mapSearchResults{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px;max-height:180px;overflow:auto}#mapSearchResults>p,#mapSearchResults>.map-search-pages{grid-column:1/-1}.map-search-result{margin-bottom:0}@media(max-width:750px){.map-search-panel form{grid-template-columns:1fr}.map-search-panel{padding:14px}#mapSearchResults{grid-template-columns:1fr;max-height:220px}}

.farm-unit-picker{margin:18px 0 22px;padding:16px;border:1px solid var(--line);border-radius:8px;min-width:0}.farm-unit-picker legend{font-weight:700;padding:0 8px}.farm-unit-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.farm-unit-choices label{display:flex;align-items:center;gap:12px;padding:12px;background:#19334c;border-radius:6px;min-width:0;cursor:pointer}.farm-unit-choices input{width:20px;height:20px;flex:0 0 20px;margin:0;accent-color:var(--gold)}.farm-unit-choices span{min-width:0;overflow-wrap:anywhere}.farm-unit-choices b,.farm-unit-choices small{display:block}.farm-unit-choices small{margin-top:4px;font-size:.875rem;color:var(--muted)}.farm-unit-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.farm-unit-note{font-size:.875rem}@media(max-width:450px){.farm-unit-choices{grid-template-columns:1fr}.farm-unit-picker{padding:12px}}

.map-travel-preview{margin:16px 0;padding:14px;border:1px solid var(--line);border-radius:6px;background:#0b2034;min-width:0}.map-travel-preview h3{margin:0 0 12px;font-size:1.125rem}.map-travel-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.map-travel-controls label{display:grid;gap:6px;font-size:.875rem}.map-travel-controls select{min-width:0;width:100%}.map-travel-summary{display:grid;gap:10px;margin:14px 0}.map-travel-summary>div{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}.map-travel-summary dt{font-size:.875rem;color:var(--muted)}.map-travel-summary dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.map-travel-note,.map-travel-availability{font-size:.875rem;line-height:1.5}.map-travel-note{margin-bottom:0}@media(max-width:450px){.map-travel-controls{grid-template-columns:1fr}}

#worldMap{grid-template-columns:repeat(var(--map-cells,6),minmax(0,1fr));grid-template-rows:repeat(var(--map-cells,6),minmax(0,1fr))}.map-axis-y{grid-template-rows:repeat(var(--map-cells,6),1fr)}.map-axis-x{grid-template-columns:repeat(var(--map-cells,6),1fr)}.map-zoom-controls{display:flex;gap:6px;align-items:end;flex-wrap:wrap;width:100%}.map-zoom-controls label{display:grid;gap:4px;font-size:.875rem}.map-zoom-controls select{min-width:0;max-width:100%;padding:6px}.map-zoom-controls button{min-width:34px}body #routes .map-route-hit{pointer-events:stroke;cursor:pointer}body #routes .map-route-marker{pointer-events:all;cursor:pointer}.map-route-line,.map-route-countdown{pointer-events:none}.map-route-countdown{fill:white;stroke:#071423;stroke-width:5px;paint-order:stroke;stroke-linejoin:round;font-weight:700}.map-command-route:hover .map-route-line,.map-command-route:focus-visible .map-route-line{stroke-width:7px}.map-command-route:focus-visible .map-route-marker{stroke:white;stroke-width:5px}#mapCommandDialog{width:min(560px,calc(100vw - 24px));max-height:85dvh;overflow:auto}.map-command-journey{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.map-command-journey>div{min-width:0;overflow-wrap:anywhere}.map-command-journey small{display:block}.map-command-timer{font-size:1.5rem;font-weight:700;font-variant-numeric:tabular-nums}.map-command-troops{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.map-command-troops span{display:flex;gap:10px;justify-content:space-between;overflow-wrap:anywhere}@media(max-width:450px){.map-command-journey,.map-command-troops{grid-template-columns:1fr}}

#movementDialog{width:min(1080px,calc(100vw - 24px));max-height:88dvh;overflow:auto}.incoming-overview-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0}.incoming-overview-summary>div{display:grid;gap:6px;padding:14px;background:#102d48;border:1px solid var(--line);border-radius:6px;min-width:0}.incoming-overview-summary strong{font-size:1.5rem}.incoming-overview-summary span,.incoming-overview-note,.incoming-overview-row span{font-size:.875rem;line-height:1.5}.incoming-overview-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.incoming-overview-filters label{display:grid;gap:6px;min-width:0}.incoming-overview-filters select{width:100%;min-width:0}.incoming-overview-list{margin:16px 0}.incoming-overview-row{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) auto auto;align-items:center;gap:18px;padding:16px;border:1px solid var(--line);border-radius:6px;margin-bottom:10px;background:#0b2034}.incoming-overview-row>div{min-width:0;overflow-wrap:anywhere;display:grid;gap:7px}.incoming-overview-row.incoming-soon{border-left:4px solid #efb35e}.incoming-overview-arrival{text-align:right;font-variant-numeric:tabular-nums}.incoming-overview-arrival strong{font-size:1.125rem}.incoming-defense-status{font-weight:700}.incoming-unprotected{color:#ffb1a7}.incoming-overview-actions button{min-height:38px}.incoming-overview-note{color:var(--muted);margin:16px 0}@media(max-width:800px){.incoming-overview-row{grid-template-columns:minmax(0,1fr) auto}.incoming-overview-defense{grid-row:2}.incoming-overview-arrival{grid-column:2;grid-row:1}.incoming-overview-actions{grid-column:2;grid-row:2}.incoming-overview-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:450px){.incoming-overview-filters{grid-template-columns:1fr}.incoming-overview-row{gap:12px;padding:12px}.incoming-overview-summary{gap:8px}.incoming-overview-summary>div{padding:10px}}

.army-availability-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:18px 0}.army-availability-summary>div{display:grid;gap:6px;min-width:0;padding:14px;border:1px solid var(--line);background:#102d48;border-radius:6px}.army-availability-summary strong{font-size:1.5rem}.army-availability-summary span,.army-availability-filter p,.army-availability-time span{font-size:.875rem;line-height:1.5}.army-availability-filter{display:flex;align-items:end;gap:18px;margin:18px 0}.army-availability-filter label{display:grid;gap:6px;min-width:0;flex:0 1 300px}.army-availability-filter select{width:100%;min-width:0}.army-availability-filter p{flex:1;margin:0;color:var(--muted)}.army-availability-row{padding:18px;margin-bottom:14px}.army-availability-heading{display:flex;justify-content:space-between;gap:18px;align-items:start}.army-availability-heading>div{min-width:0;overflow-wrap:anywhere}.army-availability-heading h3{margin:0 0 10px}.army-availability-time{display:grid;gap:6px;text-align:right;font-variant-numeric:tabular-nums}.availability-troops{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin:18px 0}.availability-troops span{display:flex;justify-content:space-between;gap:12px;padding:10px;background:#102d48;border-radius:4px}.army-availability-actions{display:flex;gap:10px;flex-wrap:wrap}.army-availability-actions:empty{display:none}@media(max-width:850px){.army-availability-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:550px){.army-availability-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.army-availability-filter,.army-availability-heading{flex-direction:column;align-items:stretch}.army-availability-filter label{flex:auto}.army-availability-time{text-align:left}.army-availability-row{padding:14px}}

body #battleReportDialog .report-haul{padding:12px 14px;border-top:1px solid #638aaf;display:flex;flex-direction:column;gap:10px}body #battleReportDialog .report-haul .battle-loot{gap:12px 18px}

/* Compact report controls and haul use the troop table typography. */
body #battleReportDialog .battle-link{display:inline-flex;align-items:center;max-width:100%;padding:3px 6px;min-height:28px;border:1px solid transparent;border-radius:4px;background:transparent;box-shadow:none;text-decoration:none;font-family:inherit;font-size:14px;font-style:normal;font-weight:600;color:#dcefff;line-height:1.4;transition:none}
body #battleReportDialog .battle-link:hover{background:#284c6b;border-color:#7ba5ca;color:#fff;text-decoration:none}
body #battleReportDialog .battle-link:focus-visible{outline:2px solid #e8c982;outline-offset:2px}
body #battleReportDialog .report-luck{margin:10px 0;font-family:inherit;font-size:14px;line-height:1.5}
body #battleReportDialog .report-haul,body #battleReportDialog .report-haul .battle-loot>span,body #battleReportDialog .report-haul .battle-loot>span>span{font-family:inherit;font-size:14px;font-style:normal;line-height:1.4;font-variant-numeric:tabular-nums}
body #battleReportDialog .report-haul .battle-loot{margin:0;gap:10px 14px}
body #battleReportDialog .report-haul .battle-loot>span{display:inline-flex;align-items:center;gap:6px;font-weight:400}
body #battleReportDialog .report-haul .sprite{display:inline-block;width:26px;height:26px;flex:0 0 26px}

body #battleReportDialog .report-wall{margin:0;padding:8px 12px;font-size:14px;background:#1a3751;color:#d5e9fa}body .report-haul-icon{flex:0 0 22px;font-size:18px;line-height:1;text-align:center}body .report-haul-icon.haul-partial{opacity:.28}

body #overviewTroops .stationed-name-column{width:50%}body #overviewTroops .stationed-level-column{width:12%}body #overviewTroops .stationed-count-column{width:38%}body #overviewTroops .stationed-troop-table td:last-child{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}

/* Compact target filters share the map's left control column. */
body .layout[data-view="map"] .map-legend .map-search-panel{padding:10px;margin:0 0 12px;width:100%;box-sizing:border-box;min-width:0}
body .layout[data-view="map"] .map-search-panel h2{font-size:16px;margin:0 0 8px}
body .layout[data-view="map"] .map-search-panel form{grid-template-columns:minmax(0,1fr);gap:8px}
body .layout[data-view="map"] .map-search-panel label{font-size:14px;gap:4px}
body .layout[data-view="map"] .map-search-panel :is(input,select,button){font-size:14px;min-height:32px;padding:5px 7px;box-sizing:border-box}
body .layout[data-view="map"] .map-search-actions{gap:6px}
body .layout[data-view="map"] #mapSearchResults{grid-template-columns:minmax(0,1fr);max-height:180px;gap:6px}
body .layout[data-view="map"] #mapSearchResults>p{font-size:14px;margin:8px 0}
body .layout[data-view="map"] .map-search-result{padding:7px;font-size:14px}
body .layout[data-view="map"] .map-search-result small{margin-top:3px}
@media(min-width:651px){body .layout[data-view="map"] .map-layout{grid-template-columns:220px minmax(0,var(--fitted-map-width,calc(100svh - 180px))) 150px}}
@media(max-width:650px){body .layout[data-view="map"] .map-search-panel form{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}body .layout[data-view="map"] .map-search-actions{grid-column:1/-1}}

/* Incoming links use consistent padded controls rather than text-width backgrounds. */
body #movementDialog .incoming-overview-row .battle-link{display:flex;align-items:center;width:100%;box-sizing:border-box;min-height:36px;padding:7px 10px;border:1px solid #51769a;border-radius:5px;background:#193a57;box-shadow:none;text-decoration:none;font-family:inherit;font-size:14px;line-height:1.4;color:#e7f3ff;font-weight:600;white-space:normal;text-align:left;transition:none}
body #movementDialog .incoming-overview-row .battle-link:hover{background:#285474;border-color:#98bfdf;text-decoration:none}
body #movementDialog .incoming-overview-row .battle-link:focus-visible{outline:2px solid #e6c064;outline-offset:2px}
body .report-army .report-wall{border-top:1px solid #51769a;padding:12px 14px}

/* Compact Farm Assistant controls extend the existing game theme. */
body .farm-unit-picker{margin:12px 0;padding:10px 12px}
body .farm-unit-choices{display:grid;grid-template-columns:repeat(9,minmax(150px,1fr));gap:6px;overflow-x:auto;padding-bottom:4px}
body .farm-unit-choices label{gap:6px;padding:7px;border:1px solid #43617c;border-radius:5px;min-width:0}
body .farm-unit-choices input{width:16px;height:16px;flex:0 0 16px}
body .farm-unit-choices img{width:28px;height:36px;object-fit:contain;flex:0 0 28px}
body .farm-unit-choices span{overflow-wrap:normal}
body .farm-unit-choices b{font-size:14px;line-height:1.3}
body .farm-unit-choices small{font-size:12px;line-height:1.3;margin-top:2px}
body .farm-unit-actions{gap:8px;align-items:center;margin-top:6px}
body .farm-unit-actions button{min-height:32px;padding:5px 12px;font-size:14px}
body .farm-unit-actions .farm-unit-note{margin:0;font-size:13px;color:var(--muted)}
body .farm-target-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:end;padding:10px 12px;border:1px solid #43617c;border-radius:6px;background:#19334c}
body .farm-target-filters label{font-size:14px;display:flex;flex-direction:column;gap:4px}
body .farm-target-filters select,body .farm-target-filters button{font-size:14px;min-height:34px;padding:5px 10px}
body .farm-target-filters .farm-outgoing-filter{flex-direction:row;align-items:center;align-self:center}
body .farm-outgoing-filter input{width:16px;height:16px;margin:0;accent-color:var(--gold)}
body .farm-filter-note{font-size:13px;margin:6px 0 12px;color:var(--muted)}
body .farm-haul-status{display:block;font-weight:600}

/* Farm report totals use padded, consistently sized cards. */
body .farm-income-panel{margin:12px 0;padding:12px;border:1px solid #43617c;border-radius:6px;background:#132c43}
body .farm-income-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
body .farm-income-heading h3{margin:0}
body .farm-income-heading label{display:flex;align-items:center;gap:8px;font-size:14px}
body .farm-income-heading select{font-size:14px;padding:5px 10px;min-height:34px}
body .farm-income-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
body .farm-income-metrics>div{padding:10px 12px;border:1px solid #43617c;border-radius:5px;background:#19334c;min-width:0}
body .farm-income-metrics span{display:block;font-size:14px;color:var(--muted)}
body .farm-income-metrics strong{display:block;font-size:20px;margin-top:4px;overflow-wrap:anywhere}
body .farm-income-resources{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:8px}
body .farm-income-resources>span{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid #43617c;border-radius:5px;min-width:0}
body .farm-income-resources .resource-icon{width:24px;height:24px;flex:0 0 24px}
body .farm-income-resources b{font-size:14px;overflow-wrap:anywhere}
body .farm-loss-breakdown{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
body .farm-loss-breakdown>span{display:flex;gap:6px;align-items:center;padding:6px 10px;background:#19334c;border:1px solid #43617c;border-radius:5px;font-size:14px}
body .farm-loss-breakdown img{object-fit:contain}
body .farm-summary-note{font-size:13px;color:var(--muted);margin:8px 0 0;line-height:1.5}
@media(max-width:700px){body .farm-income-metrics,body .farm-income-resources{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Every Building List box shares the height needed by the longest label. */
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] #classicBuildings{grid-auto-rows:1fr;align-items:stretch}
body:is(.classic-overview,.mobile-version) .layout[data-view="village"] #classicBuildings .classic-building-row{align-self:stretch;height:100%;box-sizing:border-box;min-height:5rem}

/* Incoming participant controls span the card instead of a narrow side column. */
body #movementDialog .incoming-overview-row .incoming-overview-route{grid-column:1 / -1;grid-row:1;width:100%}
body #movementDialog .incoming-overview-row .incoming-overview-defense{grid-column:1 / span 2;grid-row:2}
body #movementDialog .incoming-overview-row .incoming-overview-arrival{grid-column:3;grid-row:2}
body #movementDialog .incoming-overview-row .incoming-overview-actions{grid-column:4;grid-row:2}
@media(max-width:800px){
body #movementDialog .incoming-overview-row{grid-template-columns:minmax(0,1fr)}
body #movementDialog .incoming-overview-row .incoming-overview-arrival{grid-column:1;grid-row:2;text-align:left}
body #movementDialog .incoming-overview-row .incoming-overview-defense{grid-column:1;grid-row:3}
body #movementDialog .incoming-overview-row .incoming-overview-actions{grid-column:1;grid-row:4}
body #movementDialog .incoming-overview-row .incoming-overview-actions button{width:100%;box-sizing:border-box;white-space:normal}
}

.report-pagination{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:16px}.report-pagination:empty{display:none}.report-pagination span{font-size:14px;color:#d4eaff}

/* Small settlement arrows share the existing name row. */
body .settlement-name-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
body .settlement-step-buttons{display:contents}
body .settlement-step-buttons[hidden]{display:none}
body .settlement-step-buttons button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:30px;height:30px;min-width:30px;min-height:30px;padding:0;margin:0;font-size:23px;line-height:1;border-radius:5px}
body #settlementPrevious{order:-1}

/* Player score belongs to the compact profile button in the global header. */
body>header #playerNameButton{text-align:center;max-width:220px}
body>header #playerNameButton .header-player-name{display:block;padding:0;color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body>header #playerNameButton .header-kingdom-points{display:block;margin-top:2px;font-size:11px;line-height:1.2;letter-spacing:0;color:#dceafa;white-space:nowrap}
@media(max-width:650px){body>header #playerNameButton{max-width:140px;padding:4px 6px}body>header #playerNameButton .header-kingdom-points{font-size:10px}}

/* Compact report cycling, matching settlement arrows. */
body #battleReportDialog .report-title-row{display:flex;align-items:center;gap:8px;min-width:0;margin-top:6px}
body #battleReportDialog .report-title-row h2{flex:1;min-width:0}
body #battleReportDialog [data-report-cycle]{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:30px;height:30px;min-width:30px;min-height:30px;padding:0;margin:0;font-size:23px;line-height:1;border-radius:5px}
/* Compact resource figures in the five-cell mobile overview. */
@media(max-width:700px){
 body :is(.settlement-resources,.page-resources) .resource strong{display:block;font-size:clamp(10px,2.75vw,12px);line-height:1.35;font-variant-numeric:tabular-nums;letter-spacing:-.2px;overflow-wrap:anywhere}
 body :is(.settlement-resources,.page-resources) .resource .rate{font-size:clamp(9px,2.4vw,10.5px);line-height:1.35;font-variant-numeric:tabular-nums;letter-spacing:-.2px;overflow-wrap:anywhere}
}

body .resource-at-capacity{color:#f06b74!important}

/* Match native dropdown menus to the game theme, including empty states. */
body select{color-scheme:dark}body select :is(option,optgroup){background:#091b2e;color:#f5f8ff}body select:disabled{opacity:1;color:#bed5e8}

body .mass-section-tabs{display:flex;gap:8px;margin:16px 0;flex-wrap:wrap}body .mass-section-tabs button{min-height:40px;flex:0 1 140px}body .mass-section-tabs [aria-selected="true"]{background:#2079dc;border-color:#f4f8ff;color:#fff}body #massRecruitContent [role="tabpanel"][hidden]{display:none!important}body #massRecruitContent [role="tabpanel"]>h2{font-size:21px;margin:18px 0 12px}body #massPanel-templates{padding:16px;border:1px solid #527ea5;border-radius:6px;background:#102c46}body #massPanel-templates>label{display:grid;gap:6px;max-width:480px;margin:12px 0}body #massPanel-templates :is(input,select){width:100%;min-width:0}body .mass-recruit-mix label{border-color:#527ea5;padding:9px}body .mass-recruit-presets{margin:12px 0}body .mass-recruit-presets label{flex:1;min-width:180px}body .mass-recruit-presets select{width:100%;min-width:0}@media(max-width:650px){body .mass-section-tabs button{flex:1;padding:8px}body .mass-recruit-presets label{min-width:0;width:100%;flex-basis:100%}}

/* Mounted special editions show the complete rider and horse. */
body .special-edition-general .general-identity{display:block}
body .special-edition-general .general-identity .general-portrait-frame{width:100%;max-width:300px;margin:0 auto 12px}
body .special-edition-general .general-special-edition{color:#e6bd68;font-weight:700;margin:8px 0}

/* Clock in the header; compact trial currency beside movement flags. */
body>header #serverClock{display:block;position:static;flex:0 0 auto;margin:0 8px;color:#c3d8ef;font-size:13px;line-height:1.3;white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:0}body .toolbar-status .header-test-crowns{display:inline-flex;align-items:center;gap:5px;color:#f1d28b;font-size:13px;line-height:1.3;white-space:nowrap;font-variant-numeric:tabular-nums}body .header-test-crowns[hidden]{display:none!important}body .header-test-crowns .test-crown-icon{font-size:19px;line-height:1}body .header-test-crowns small{font-size:11px;color:#c3d8ef}
@media(max-width:650px){body>header{height:76px;grid-template-rows:52px 20px}body>header .brand,body>header .world,body>header #helpBtn{grid-row:1}body>header #serverClock{grid-row:2;grid-column:1/-1;justify-self:end;margin:0;font-size:11px}body .game-toolbar{top:76px}body .toolbar-status .header-test-crowns{font-size:11px;gap:3px}body .header-test-crowns small{font-size:10px}body .header-test-crowns .test-crown-icon{font-size:17px}}

/* Center all approved milestone shields, including their canvas padding. */
.achievement-emblem{align-self:center;display:grid;place-items:center;line-height:0;flex-shrink:0}.achievement-art-window{display:grid;place-items:center;width:72px;height:82px;overflow:hidden}.achievement-emblem .achievement-art-window img.achievement-category-art{display:block;width:72px;height:82px;object-fit:contain;object-position:center;transform:translate(var(--achievement-offset-x,0%),var(--achievement-offset-y,0%))}

.world-sync-status{position:fixed;z-index:1100;bottom:12px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);padding:12px 16px;border:1px solid #78b4ef;border-radius:6px;background:#102f4c;color:#e5f0ff;box-shadow:0 4px 18px #0006;font-size:13px;line-height:1.4}.world-sync-status[hidden]{display:none!important}.world-sync-status button{margin-left:10px;padding:5px 9px}

/* Keep map layers on composited surfaces during pointer panning. */
#mapViewport.dragging :is(#worldMap,#mapGround,#routes){will-change:transform;pointer-events:none}#mapViewport.dragging .tile{transition:none!important}#mapViewport{contain:layout paint;touch-action:none}#mapViewport.dragging{cursor:grabbing}#mapViewport.dragging #routes *{animation:none!important}

