/* The signed-in game uses one visual system across its mounted views. */
.play-shell {
  --game-blue:#295d9b; --game-blue-soft:#e8f2ff; --game-green:#287e63;
  --game-gold:#b77924; --game-red:#bc4a4d; --game-ink:#203044;
  --game-muted:#485c70; --game-line:#d7e3ee; --game-surface:#fff;
  color:var(--game-ink); background:#eef5fb; font-family:Segoe UI,system-ui,sans-serif;
}
.play-topbar { min-height:56px; background:linear-gradient(100deg,#fff,#eef6ff); border-bottom:1px solid var(--game-line); box-shadow:0 2px 12px #2c5b8e14; }
.game-brand-name,.player-context b { color:var(--game-ink); }
.game-brand-name span { color:var(--game-blue); }
.game-brand-mark { transform:none; border:0; border-radius:12px; background:linear-gradient(145deg,#4d91d8,#2966ae); color:#fff; box-shadow:0 3px 9px #275d9940; }
.player-context { color:var(--game-muted); }
.player-context>span+span { border-color:var(--game-line); }
.player-gold-display { padding-left:14px; border-left:1px solid var(--game-line); color:var(--game-muted); }
.player-gold-display>span { color:#c68a16; margin-right:4px; }
.player-gold-display b { color:#8a5a08; }
.topbar-button { border-color:#cbdcec; background:#fff; color:#315775; box-shadow:0 1px 4px #31577512; }
.topbar-button:hover { border-color:#8db9e4; background:var(--game-blue-soft); color:var(--game-blue); }
.global-village-switcher>summary { border-color:#a8c8e7; background:linear-gradient(#fff,#edf6ff); color:var(--game-blue); }
.global-village-switcher>summary>b { color:var(--game-ink); }
.global-village-menu { border-color:#b7d0e8; background:#fff; }
.global-village-menu .village-switcher-options button.active,.global-village-menu .village-switcher-options button:hover { border-color:#96bee5; background:var(--game-blue-soft); }
.resource-bar { gap:8px; background:#f5f9fd; border-bottom:1px solid var(--game-line); }
.resource-item { min-height:52px; border:1px solid var(--game-line); border-left:4px solid var(--resource-accent); border-radius:12px; background:#fff; box-shadow:0 2px 8px #39699112; }
.resource-wood { --resource-accent:#54a776; }.resource-clay { --resource-accent:#d39456; }.resource-iron { --resource-accent:#718cae; }.resource-crop { --resource-accent:#d9ad44; }
.resource-copy span { color:var(--game-muted); }.resource-copy strong { color:var(--game-ink); font-size:17px; }.resource-rate { color:var(--game-green); }
.play-shell .resource-bar .resource-item .resource-heading>span:first-child { color:#35485b; }
.play-shell .resource-bar .resource-item .resource-heading .resource-rate { color:#246746; font-weight:700; }
.play-shell .resource-bar .resource-state { color:#42576b; }
.play-shell .resource-bar .unit-roster-heading { color:#42576b; }
.play-shell .resource-bar .unit-roster-heading>span { color:#24394e; }
.play-shell .resource-bar .unit-roster-heading small,.play-shell .resource-bar .unit-roster-item small,
.play-shell .resource-bar .unit-roster-item em,.play-shell .resource-bar .merchant-roster small { color:#465b6e; }
.play-shell .resource-bar .unit-roster-item { color:#2f4357; }
.play-shell .resource-bar .merchant-roster b { color:#33495e; }
.play-shell .reports-open-button { color:#294a68; }
.play-container { grid-template-columns:76px minmax(0,1fr); gap:10px; padding:10px; background:radial-gradient(ellipse at 50% 25%,#f7fbff,#eaf3f9 72%,#dceaf4); }
.game-side-nav { gap:7px; border:1px solid var(--game-line); border-radius:14px; background:#fff; box-shadow:0 5px 20px #335e8c18; }
.game-side-nav-label { color:#52677b; }
.game-side-nav>button,.game-nav-dialog .leaderboard-trigger { min-height:54px; border-radius:10px; color:#48647e; font-size:12px; }
.game-side-nav>button:hover,.game-nav-dialog .leaderboard-trigger:hover { background:#edf5fd; color:var(--game-blue); }
.game-side-nav>button.active { border-color:#9dc5ed; background:linear-gradient(145deg,#e6f2ff,#d7eaff); box-shadow:inset 3px 0 #438bd3; color:var(--game-blue); }
.game-side-nav>button i { display:block; width:22px; height:22px; margin:auto; font-size:0; background-color:currentColor; background-repeat:no-repeat; background-position:center; background-size:contain; color:#5c87b1; }
.game-side-nav>button.active i { color:var(--game-blue); }
.game-side-nav>button:nth-of-type(n) i { background:none; border:0; border-radius:0; box-shadow:none; transform:none; }
.game-side-nav>button i svg { display:block; width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.game-view-heading { min-height:48px; border-bottom:1px solid #bfd5e8; }
.game-view-heading small { color:#4d6175; text-shadow:none; font-size:11px; }.game-view-heading h1 { color:var(--game-ink); text-shadow:none; font-size:25px; }
.game-view-heading>span { border-color:var(--game-line); background:#fff; color:var(--game-muted); }
.game-view .panel,.hex-board-panel,.building-detail-panel,.alliance-view-content { border:1px solid var(--game-line); border-radius:14px; background:var(--game-surface); box-shadow:0 4px 18px #36608c14; color:var(--game-ink); }
.game-view .panel .ph { min-height:40px; border-bottom:1px solid var(--game-line); color:#355a79; font-size:13px; }
/* Keep helper text readable on the light game cards and panels. */
.game-view .panel small,.game-view .panel label,.game-view .panel .muted,
.building-detail-panel small,.building-detail-panel label,
.available-building small,.unit-type-option small,.unit-stat-card small,.unit-queue-slot small,
.context-block small,.tile-context-panel small { color:#4b5c6d; }
.game-view .panel p,.building-detail-panel p,.available-building span,
.unit-type-option span,.unit-stat-card span,.unit-queue-slot span,
.context-block p,.tile-context-panel p { color:#3f5061; }
.unit-type-option.locked { opacity:.82; }
.hex-board-panel { background:radial-gradient(ellipse at center,#fff,#edf7ee 75%,#e7f2e7); }
.hex-slot { filter:drop-shadow(0 2px 2px #446b5040); }.hex-slot:hover { filter:brightness(1.06) drop-shadow(0 5px 7px #39735a55); }
.hex-slot.selected { filter:drop-shadow(0 0 7px #4c9bc2); }
.building-detail-panel { gap:10px; }.building-detail-heading { border-color:var(--game-line); }.building-detail-heading h3 { color:var(--game-ink); }
.available-building,.unit-type-option,.unit-stat-card,.unit-queue-slot { border:1px solid var(--game-line); border-radius:11px; background:#fff; box-shadow:0 2px 8px #38648c12; }
.available-building:hover,.unit-type-option:hover { border-color:#93c3e6; background:#f1f8ff; }
.available-building.active,.unit-type-option.selected { border-color:#4e9bd2; background:#e9f5ff; box-shadow:inset 0 0 0 1px #70b4e3; }
.unit-type-option.locked { opacity:.78; }.unit-stat-card.attack-stat { border-left:3px solid var(--game-red); }.unit-stat-card.defense-stat { border-left:3px solid var(--game-blue); }.unit-stat-card.utility-stat { border-left:3px solid #53a7aa; }
.army-view-content>.units-panel>.ph { flex:0 0 auto; min-height:46px; padding-inline:15px; }
.army-view-content>.units-panel>.pc { padding:14px 16px; }
.unit-barracks-content { grid-template-columns:minmax(330px,.78fr) minmax(0,1.55fr); gap:18px; align-items:start; }
.unit-picker-column,.unit-detail-column,.unit-production-column { padding:12px; border:1px solid #d8e3ec; border-radius:13px; background:linear-gradient(155deg,#fff,#f6f9fc); box-shadow:0 3px 12px #345d8110; }
.unit-detail-train-column { grid-template-columns:minmax(0,1fr) minmax(320px,.92fr); gap:16px; align-items:start; }
.unit-type-picker { gap:9px; }
.unit-type-option { column-gap:11px; row-gap:5px; }
.unit-production-queue { margin-top:2px; padding:13px; border:1px solid #d8e3ec; border-radius:13px; background:linear-gradient(155deg,#fff,#f6f9fc); box-shadow:0 3px 12px #345d8110; }
.unit-queue-slots { gap:10px; }
.unit-queue-slot { grid-template-columns:24px 40px minmax(0,1fr); gap:7px; min-height:82px; padding:11px 10px; }
.queue-slot-glyph,.free-slot-icon { width:38px; height:38px; margin-left:0; }
.queue-slot-progress { margin:0; }
.unit-section-heading small,.unit-queue-heading small,.unit-production-heading small,.unit-selected-heading>div>small { color:#66512f; }
.queue-slot-copy>small { color:#5b4b35; }
.free-slot small { color:#5d523f; }
.unit-queue-slot.free-slot { background:#f7fafc; border-style:dashed; }.unit-queue-slot.active-slot { border-left:4px solid var(--game-gold); background:#fffaf0; }
.unit-queue-slot.currently-producing { border-left-color:var(--game-green); background:#f1fbf5; }.queue-slot-progress i { background:var(--game-green); }
.building-action,.unit-train-button,.server-save-button { border-color:#358c70; background:linear-gradient(#43aa82,#268465); color:#fff; box-shadow:0 3px 9px #2a8a6740; }
.building-action:hover:not(:disabled),.unit-train-button:hover:not(:disabled) { filter:brightness(1.06); transform:translateY(-1px); }
.play-shell .building-demolition-card {
  display:grid; gap:8px; margin-top:9px; padding:10px; border:1px solid #e7c9c2;
  border-radius:11px; background:linear-gradient(145deg,#fffaf8,#fff3f0);
}
.play-shell .building-demolition-copy { display:grid; gap:3px; }
.play-shell .building-demolition-copy>b { color:#793d35; font-size:13px; }
.play-shell .building-demolition-copy>small,.play-shell .building-demolition-confirm-note { margin:0; color:#705c58; font-size:11px; line-height:1.4; }
.play-shell .building-demolition-cost { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
.play-shell .building-demolition-cost>span { display:flex; align-items:center; gap:4px; min-width:0; padding:5px; border:1px solid #efdfd9; border-radius:7px; background:#fff; color:#594b48; font-size:10px; font-variant-numeric:tabular-nums; }
.play-shell .building-demolition-cost img { width:19px; height:19px; object-fit:contain; }
.play-shell .building-demolition-confirm { min-height:34px; padding:7px 10px; border:1px solid #a84c42; border-radius:8px; background:linear-gradient(#c56558,#a94339); color:#fff; font-size:12px; font-weight:800; cursor:pointer; }
.play-shell .building-demolition-confirm:hover:not(:disabled) { filter:brightness(1.05); }
.play-shell .building-demolition-confirm:disabled { border-color:#c8bcb8; background:#d7ceca; color:#766e6b; cursor:not-allowed; }
.play-shell .building-demolition-actions { display:flex; flex-wrap:wrap; gap:6px; }
.play-shell .building-demolition-actions>.building-demolition-confirm { flex:1 1 180px; }
.play-shell .building-demolition-cancel { min-height:34px; padding:6px 10px; border:1px solid #d6c6c1; border-radius:8px; background:#fff; color:#604e49; font-size:11px; font-weight:700; cursor:pointer; }
.play-shell .building-demolition-warning { color:#9b4037!important; font-size:11px; font-weight:700; }
.world-map-panel>.pc.map-panel-content { padding:5px!important; }.world-map-viewport { border-radius:0 0 13px 13px; overflow:hidden; }
.tile-context-panel { max-width:320px; }.world-view-content.has-tile { grid-template-columns:minmax(0,1fr) minmax(270px,320px); }
.game-context-rail[open] { border:1px solid var(--game-line); background:#fff; box-shadow:0 12px 28px #315c8b26; }
.context-rail-toggle { border-color:#accce7; background:#fff; color:var(--game-blue); }.context-rail-count { background:var(--game-red); }
.context-block { border-color:var(--game-line); background:#fff; }.context-block>header { border-color:var(--game-line); color:var(--game-blue); }
.village-event { border-color:#e2c17d; background:#fff9e9; color:#77541d; }.attack-event { border-color:#ecadb2; background:#fff0f0; color:#a2343b; }
.global-event-strip { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:8px; flex:0 0 auto; margin:0; padding:8px 12px 10px; border-top:1px solid #cad9e6; background:#eaf2f8; }
.global-event-strip .village-event { min-width:0; min-height:36px; padding:7px 10px; color:#5a431d; font-weight:650; }
.global-event-strip .attack-event { color:#762f30; }
.global-event-strip .build-event { color:#674814; }
.play-shell :focus-visible { outline:3px solid #539ad7; outline-offset:2px; }
@media(max-width:1500px){.play-container{grid-template-columns:70px minmax(0,1fr);gap:8px;padding:8px}.building-layout{grid-template-columns:minmax(0,1fr) minmax(315px,35%)}.unit-queue-slot{padding:8px}.unit-type-option{min-height:70px}}
@media(max-width:1450px){.unit-detail-train-column{grid-template-columns:minmax(0,1fr)}.unit-production-column{gap:9px}}
@media(max-width:1000px){.unit-barracks-content{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;gap:12px}.unit-picker-column,.unit-detail-train-column,.unit-production-queue{grid-column:1}.unit-picker-column{grid-row:1}.unit-detail-train-column{grid-row:2}.unit-production-queue{grid-row:3}}
@media(max-width:1100px){.world-view-content.has-tile{grid-template-columns:minmax(0,1fr) 270px}.game-side-nav>button{min-height:48px}}
@media(max-width:900px){.play-container{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}.game-side-nav{flex-direction:row}.game-side-nav>button i{margin:0}.world-view-content.has-tile{display:flex;flex-direction:column}.world-view-content.has-tile>.tile-context-panel{max-width:none}.unit-queue-slots{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.play-container{padding:5px}.resource-bar{gap:5px}.resource-item{min-height:46px}.building-layout{grid-template-columns:minmax(0,1fr)}.unit-queue-slots{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.play-shell *{transition-duration:.01ms!important;animation-duration:.01ms!important}}
.game-nav-dialog .leaderboard-trigger>span:first-child { display:inline-flex; align-items:center; } .leaderboard-crown-icon { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }


/* Always-visible bottom rail for the live game context. */
.play-shell > .game-events-bottom {
  position:relative; inset:auto; z-index:1; display:grid!important;
  grid-template-columns:minmax(145px,.78fr) minmax(145px,.78fr) minmax(250px,1.35fr) minmax(205px,1.12fr) minmax(170px,.92fr) minmax(125px,.62fr);
  flex:0 0 176px; width:100%; max-width:none; max-height:176px; min-height:150px;
  gap:9px; margin:0; padding:8px 10px; overflow:hidden;
  border:0; border-top:1px solid var(--game-line); border-radius:0;
  background:#eaf2f8; box-shadow:0 -3px 12px #315c8b12;
}
.play-shell > .game-events-bottom > .context-block,
.play-shell > .game-events-bottom > .quick-actions-panel {
  display:flex; flex-direction:column; min-width:0; min-height:0; max-height:none;
  margin:0; overflow:hidden; border:1px solid var(--game-line); border-radius:10px;
  background:#fff; box-shadow:0 2px 8px #38648c10;
}
.play-shell > .game-events-bottom .context-block > header { min-height:31px; padding:6px 9px; font-size:12px; }
.play-shell > .game-events-bottom .context-block-body {
  flex:1 1 auto; min-width:0; min-height:0; overflow:auto; padding:6px;
}
.play-shell > .game-events-bottom .event-list { display:flex; flex-direction:column; gap:6px; }
.play-shell > .game-events-bottom .village-event { display:flex; align-items:center; gap:6px; min-width:0; line-height:1.3; }
.play-shell > .game-events-bottom .village-event b { flex:none; }
.play-shell > .game-events-bottom .context-empty { margin:0; padding:5px 3px; font-size:12px; }
.play-shell > .game-events-bottom .queue-section { margin:0 0 7px; }
.play-shell > .game-events-bottom .queue-section h3 { margin:0 0 5px; font-size:12px; }
.play-shell > .game-events-bottom .movement-list { display:grid; gap:5px; }
.play-shell > .game-events-bottom .movement-card { min-width:0; padding:6px; }
.play-shell > .game-events-bottom .support-summary-list { display:flex; flex-direction:column; gap:6px; }
.play-shell > .game-events-bottom .support-summary-entry { display:grid; gap:3px; min-width:0; padding:6px 7px; border:1px solid #d6e5ed; border-radius:8px; background:#f5fafc; }
.play-shell > .game-events-bottom .support-summary-entry b { overflow:hidden; color:#29475f; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.play-shell > .game-events-bottom .support-summary-entry span { color:#40566a; font-size:10px; line-height:1.35; }
.play-shell > .game-events-bottom .outgoing-support-summary { border-color:#c8dfcf; background:#f2faf4; }
.play-shell > .game-events-bottom .sidebar-secondary.quick-actions-panel > summary { flex:none; padding:8px 9px; }
.play-shell > .game-events-bottom .quick-actions-content { min-height:0; overflow:auto; padding:5px; }

/* Free queue slots have a dedicated icon/text grid; the slot badge never occupies that grid. */
.play-shell .unit-queue-slot.free-slot {
  display:grid; grid-template-columns:34px minmax(0,1fr); grid-template-rows:minmax(0,auto);
  align-items:center; column-gap:9px; row-gap:0; min-width:0; min-height:76px;
  padding:10px 31px 10px 10px; overflow:hidden;
}
.play-shell .unit-queue-slot.free-slot > .queue-slot-number {
  position:absolute; top:6px; right:6px; left:auto; z-index:1; display:grid;
  place-items:center; width:20px; height:20px; margin:0; border-radius:50%;
  background:#e5edf4; color:#40586c; font-size:11px; line-height:1;
}
.play-shell .unit-queue-slot.free-slot > .free-slot-icon {
  grid-column:1; grid-row:1; width:32px; height:32px; margin:0; font-size:21px;
}
.play-shell .unit-queue-slot.free-slot > div {
  grid-column:2; grid-row:1; display:grid; gap:4px; min-width:0; margin:0;
}
.play-shell .unit-queue-slot.free-slot > div b,
.play-shell .unit-queue-slot.free-slot > div small {
  display:block; min-width:0; white-space:normal; overflow-wrap:anywhere; word-break:normal;
}
.play-shell .unit-queue-slot.free-slot > div b { font-size:12px; line-height:1.2; }
.play-shell .unit-queue-slot.free-slot > div small { font-size:11px; line-height:1.25; }

@media(max-width:1200px) {
  .play-shell > .game-events-bottom { grid-template-columns:repeat(2,minmax(0,1fr)); flex-basis:260px; max-height:260px; }
}
@media(max-width:900px) {
  .play-shell > .game-events-bottom { flex:none; max-height:340px; min-height:200px; }
}
@media(max-width:680px) {
  .play-shell > .game-events-bottom { grid-template-columns:minmax(0,1fr); max-height:none; min-height:0; overflow:visible; padding:7px; }
  .play-shell > .game-events-bottom > .context-block,
  .play-shell > .game-events-bottom > .quick-actions-panel { min-height:86px; max-height:180px; }
  .play-shell > .game-events-bottom > .events-context { min-height:64px; }
}


/* Resource economy and unit roster: narrower resource cards, naturally wrapped troops. */
@media(min-width:1101px) {
  .play-shell .resource-bar { grid-template-columns:repeat(4,minmax(92px,.8fr)) minmax(340px,2.3fr); align-items:stretch; }
}
.play-shell .resource-bar .unit-roster {
  position:relative; display:grid; grid-template-columns:minmax(0,1fr); align-content:start;
  align-items:start; gap:3px; min-width:0; min-height:58px; padding:4px 132px 4px 8px;
  overflow:visible; border-left:1px solid var(--game-line);
}
.play-shell .resource-bar .unit-roster-heading {
  display:flex; align-items:baseline; justify-content:space-between; gap:6px; min-width:0;
  padding-right:2px; font-size:11px; text-align:left;
}
.play-shell .resource-bar .unit-roster-heading>span { white-space:nowrap; font-size:12px; }
.play-shell .resource-bar .unit-roster-list {
  display:flex; flex-wrap:wrap; align-content:flex-start; align-items:center; gap:3px;
  min-width:0; overflow:visible; scrollbar-width:none;
}
.play-shell .resource-bar .unit-roster-item {
  display:inline-flex; align-items:center; gap:3px; min-width:0; padding:3px 5px;
  border-radius:7px; white-space:nowrap; font-size:11px;
}
.play-shell .resource-bar .unit-roster-item .roster-unit-icon { display:grid; place-items:center; width:17px; height:17px; flex:none; }
.play-shell .resource-bar .unit-roster-item .roster-unit-icon svg { width:16px; height:16px; }
.play-shell .resource-bar .unit-roster-item b { font-size:11px; }
.play-shell .resource-bar .unit-roster-item small { font-size:10px; }
.play-shell .resource-bar .unit-roster-item em { font-size:9px; }
.play-shell .resource-bar .merchant-roster {
  position:absolute; top:5px; right:5px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:2px; width:120px; height:58px; padding:4px 6px; border:1px solid #c8d9e7; border-radius:12px;
  background:linear-gradient(145deg,#fff,#edf5fb); color:#345c7b; box-shadow:0 2px 6px #31577518;
  white-space:nowrap; cursor:help;
}
.play-shell .resource-bar .merchant-roster-icon { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.play-shell .resource-bar .merchant-count { color:#294f6e; font-size:10px; font-weight:800; line-height:1; }
.play-shell .resource-bar .merchant-capacity { color:#3c566e; font-size:9px; font-weight:700; line-height:1.1; white-space:nowrap; }

/* Five compact training-slot cards replace the dense empty queue text. */
.play-shell > .game-events-bottom .unit-queue-section { margin:6px 0 0; padding:0; border:0; }
.play-shell > .game-events-bottom .unit-queue-section h3 { display:flex; align-items:center; justify-content:space-between; gap:5px; margin:0 0 7px; padding:0; font-size:12px; }
.play-shell > .game-events-bottom .unit-queue-section h3 span { flex:none; font-size:10px; }
.play-shell > .game-events-bottom .queue-slot-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; min-width:0; }
.play-shell > .game-events-bottom .queue-slot-card {
  display:grid; grid-template-rows:28px minmax(20px,1fr) 16px; justify-items:center; align-items:center;
  gap:3px; min-width:0; min-height:75px; padding:5px 3px; overflow:hidden;
  border:1px solid #d7e3ee; border-radius:9px; background:#f8fbfe; text-align:center;
}
.play-shell > .game-events-bottom .queue-slot-card-icon {
  display:grid; place-items:center; width:27px; height:27px; border-radius:50%;
  background:#e7f0f8; color:#365f7e; font-size:17px; line-height:1;
}
.play-shell > .game-events-bottom .queue-slot-card-icon svg { width:19px; height:19px; }
.play-shell > .game-events-bottom .queue-slot-card-icon { overflow:hidden; border-radius:7px; }
.play-shell > .game-events-bottom .queue-slot-card-icon>img { display:block; width:100%; height:100%; border-radius:inherit; object-fit:cover; }
.play-shell > .game-events-bottom .queue-slot-card small { display:block; max-width:100%; overflow:hidden; color:#354a5d; font-size:9px; line-height:1.15; text-overflow:ellipsis; }
.play-shell > .game-events-bottom .queue-slot-card time { color:#365f7e; font-size:10px; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
.play-shell > .game-events-bottom .queue-slot-free { border-style:dashed; background:#f6faf7; }
.play-shell > .game-events-bottom .queue-slot-free .queue-slot-card-icon { background:#e4f2e9; color:#397659; }
.play-shell > .game-events-bottom .queue-slot-active { border-color:#e5c98c; background:linear-gradient(160deg,#fffdf7,#fff7e8); }
.play-shell > .game-events-bottom .queue-slot-active .queue-slot-card-icon { background:#f5ead0; color:#8a6327; }
.play-shell > .game-events-bottom .queue-slot-loading { opacity:.7; }

/* Vertical navigation keeps every caption visible and centers its vector icon. */
@media(min-width:901px) {
  .play-shell .play-container { grid-template-columns:86px minmax(0,1fr); }
  .play-shell .game-side-nav { align-items:stretch; gap:6px; padding:8px 5px; }
  .play-shell .game-side-nav-label { display:block; padding:7px 2px 4px; color:#687d91; font-size:9px; letter-spacing:.1em; text-align:center; }
  .play-shell .game-side-nav-label.secondary { margin-top:5px; padding-top:9px; border-top:1px solid #d5e0e9; }
  .play-shell .game-side-nav>button,
  .play-shell .game-nav-dialog .leaderboard-trigger {
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px;
    width:100%; min-width:0; min-height:63px; padding:7px 3px; border-radius:10px;
    text-align:center; white-space:normal; font-size:11px; line-height:1.15;
  }
  .play-shell .game-side-nav>button i { display:grid; place-items:center; width:25px; height:25px; margin:0; flex:none; }
  .play-shell .game-side-nav>button i svg { display:block; width:23px; height:23px; }
  .play-shell .game-side-nav>button span,
  .play-shell .game-nav-dialog .leaderboard-trigger { overflow-wrap:anywhere; }
  .play-shell .game-nav-dialog { width:100%; min-width:0; }
  .play-shell .game-nav-dialog .leaderboard-trigger>span:first-child { display:grid; place-items:center; width:25px; height:25px; }
  .play-shell .game-nav-dialog .leaderboard-crown-icon { width:23px; height:23px; }
}
@media(min-width:681px) and (max-width:1100px) {
  .play-shell .resource-bar { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .play-shell .resource-bar .unit-roster { grid-column:1/-1; border-top:1px solid var(--game-line); border-left:0; }
  .play-shell .game-context-rail .unit-queue-section { margin-top:5px; }
}
@media(max-width:680px) {
  .play-shell .resource-bar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .play-shell .resource-bar .unit-roster { padding-right:132px; }
  .play-shell .resource-bar .unit-roster-item em { display:none; }
  .play-shell > .game-events-bottom .queue-slot-grid { gap:4px; }
  .play-shell > .game-events-bottom .queue-slot-card { min-height:68px; padding:4px 2px; }
  .play-shell > .game-events-bottom .queue-slot-card small { font-size:8px; }
}


/* Construction and unit training are independent bottom-rail columns. */
.play-shell > .game-events-bottom > .queues-context,
.play-shell > .game-events-bottom > .queues-context > .context-block-body { display:contents!important; }
.play-shell > .game-events-bottom > .queues-context > header { display:none!important; }
.play-shell > .game-events-bottom .queue-section {
  display:flex; flex-direction:column; min-width:0; min-height:0; max-height:100%;
  margin:0; padding:8px; overflow:hidden; border:1px solid var(--game-line);
  border-radius:10px; background:#fff; box-shadow:0 2px 8px #38648c10;
}
.play-shell > .game-events-bottom .building-queue-section { grid-column:auto; }
.play-shell > .game-events-bottom .queue-building-card { min-width:0; }
.play-shell > .game-events-bottom .building-queue-section .queue-empty { margin:auto 0; padding:8px 5px; line-height:1.35; }
.play-shell > .game-events-bottom .unit-queue-section { margin:0; padding:8px; border:1px solid var(--game-line); }
@media(max-width:1200px) {
  .play-shell > .game-events-bottom .unit-queue-section { margin:0; }
}

/* Keep the unit total and food consumption under its heading, out of the roster row. */
.play-shell .resource-bar .unit-roster-heading {
  display:grid; grid-template-columns:minmax(0,1fr); justify-content:start; justify-items:start;
  align-content:start; gap:1px; padding:0; text-align:left;
}
.play-shell .resource-bar .unit-roster-heading>b { font-size:11px; line-height:1.1; }
.play-shell .resource-bar .unit-roster-heading>span { white-space:nowrap; font-size:11px; line-height:1.15; }
.play-shell .resource-bar .unit-roster-heading>span small { font-size:10px; }
.play-shell .roster-unit-icon { overflow:hidden; border-radius:7px; }
.play-shell .roster-unit-icon>img { display:block; width:100%; height:100%; border-radius:inherit; object-fit:cover; }
.attack-unit-heading { flex-direction:row; align-items:center; min-width:0; }
.attack-unit-heading>b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attack-unit-avatar { flex:none; width:30px; height:30px; overflow:hidden; border:1px solid #d8c9ad; border-radius:7px; }
.attack-unit-avatar>img { display:block; width:100%; height:100%; object-fit:cover; }
.report-unit-icon>img { display:block; width:100%; height:100%; border-radius:inherit; object-fit:cover; }


/* Unit picker cards scale with viewport height and stay inside their grid cells. */
.play-shell .unit-picker-column { min-width:0; min-height:0; overflow:visible; }
.play-shell .unit-picker-column > .unit-section-heading { min-width:0; margin:0 0 7px; }
.play-shell .unit-type-picker {
  grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:minmax(clamp(52px,6.5dvh,68px),auto);
  gap:7px; width:100%; min-width:0; max-width:100%; align-content:start;
}
.play-shell .unit-type-picker > .unit-type-option {
  box-sizing:border-box; width:100%; min-width:0; min-height:clamp(52px,6.5dvh,68px);
  grid-template-columns:clamp(32px,4.1dvh,42px) minmax(0,1fr) auto;
  column-gap:clamp(5px,.55vw,9px); row-gap:2px; padding:clamp(4px,.5vw,7px);
  border-width:1px; border-radius:10px; transform:none;
}
.play-shell .unit-type-picker > .unit-type-option:not(:disabled):hover { transform:none; }
.play-shell .unit-type-picker > .unit-type-option .unit-type-glyph {
  box-sizing:border-box; width:clamp(32px,4.1dvh,42px); height:clamp(32px,4.1dvh,42px);
  border-radius:8px; font-size:clamp(21px,3dvh,28px);
}
.play-shell .unit-type-option { position:relative; overflow:visible; z-index:0; }
.play-shell .unit-type-option:hover,
.play-shell .unit-type-option:focus-visible { z-index:8; }
.play-shell .unit-type-glyph img,
.play-shell .unit-selected-glyph img,
.play-shell .queue-slot-glyph img { display:block; width:100%; height:100%; border-radius:inherit; object-fit:cover; }
.play-shell .unit-type-option .unit-hover-preview {
  position:absolute; z-index:20; top:calc(100% + 7px); left:50%; display:none;
  grid-template-columns:80px minmax(0,1fr); gap:10px; width:min(330px,calc(100vw - 32px));
  padding:9px; border:1px solid #b9cddd; border-radius:11px; background:#fff;
  box-shadow:0 12px 30px #213d5533; color:#243e54; text-align:left; white-space:normal;
  transform:translateX(-50%); pointer-events:none;
}
.play-shell .unit-type-option:hover .unit-hover-preview,
.play-shell .unit-type-option:focus-visible .unit-hover-preview { display:grid; }
.play-shell .unit-hover-preview > img { width:80px; height:80px; border:1px solid #d9e4ec; border-radius:9px; object-fit:cover; }
.play-shell .unit-hover-copy { display:grid; gap:4px; min-width:0; }
.play-shell .unit-hover-copy > b { color:#213e55; font-size:13px; }
.play-shell .unit-hover-copy > small { color:#526b7e; font-size:10px; line-height:1.35; }
.play-shell .unit-hover-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px 7px; margin-top:2px; }
.play-shell .unit-hover-stats > i { color:#64788a; font-size:9px; font-style:normal; }
.play-shell .unit-hover-stats > i > b { display:block; color:#2b4b65; font-size:10px; font-style:normal; }
.play-shell .unit-selected-glyph { overflow:hidden; border-radius:12px; }
.play-shell .queue-slot-glyph { overflow:hidden; border-radius:8px; }
.play-shell .unit-type-picker > .unit-type-option .unit-card-name { min-width:0; font-size:clamp(11px,1.15dvh,13px); }
.play-shell .unit-type-picker > .unit-type-option .unit-available-count { min-width:0; font-size:clamp(14px,1.6dvh,17px); }
.play-shell .unit-type-picker > .unit-type-option .unit-card-state { min-width:0; font-size:clamp(9px,1.05dvh,11px); line-height:1.15; }
@media(max-height:820px) {
  .play-shell .unit-section-heading { margin-bottom:5px; }
  .play-shell .unit-type-picker { gap:6px; grid-auto-rows:minmax(52px,auto); }
  .play-shell .unit-type-picker > .unit-type-option { min-height:52px; }
}
@media(max-height:700px) {
  .play-shell .unit-type-picker { gap:5px; grid-auto-rows:minmax(48px,auto); }
  .play-shell .unit-type-picker > .unit-type-option { min-height:48px; column-gap:5px; padding-block:3px; }
  .play-shell .unit-type-picker > .unit-type-option .unit-type-glyph { width:30px; height:30px; font-size:20px; }
  .play-shell .unit-type-picker > .unit-type-option .unit-card-state { font-size:9px; }
}


/* Battle reports button was retaining the legacy pale-on-pale text via !important. */
.play-shell .play-topbar .reports-open-button {
  color:#263b50!important; background:#fff!important; border:1px solid #b8cddd!important;
  box-shadow:0 1px 4px #31577518!important; text-shadow:none!important;
}
.play-shell .play-topbar .server-details-button {
  display:inline-flex; align-items:center; justify-content:center; gap:6px; flex:none;
  min-height:32px; padding:7px 10px!important; border:1px solid #b8cddd!important;
  border-radius:8px; color:#263b50!important; background:#fff!important;
  box-shadow:0 1px 4px #31577518!important; font:600 11px system-ui,sans-serif!important;
  line-height:1; text-shadow:none!important; cursor:pointer;
}
.play-shell .play-topbar .server-details-button span { color:#263b50!important; }
.play-shell .play-topbar .server-details-icon { width:20px; height:20px; fill:none; stroke:#315d7a; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.play-shell .play-topbar .server-details-button:hover { color:#183e60!important; background:#eaf4fc!important; border-color:#86b3d6!important; }
.play-shell .play-topbar .server-details-button:hover .server-details-icon { stroke:#183e60; }
.play-shell .play-topbar .reports-open-button>span:not(.report-count-badge) { color:#263b50!important; }
.play-shell .play-topbar .reports-open-icon { color:#315d7a!important; stroke:#315d7a!important; }
.play-shell .play-topbar .reports-open-button:hover:not(:disabled) {
  color:#183e60!important; background:#eaf4fc!important; border-color:#86b3d6!important;
}
.play-shell .play-topbar .reports-open-button:disabled { opacity:1!important; color:#3d5265!important; }
.play-shell .play-topbar .reports-open-button:disabled .reports-open-icon { color:#55758e!important; stroke:#55758e!important; }
.play-shell .play-topbar .reports-open-button .report-count-badge { color:#fff!important; background:#a3343b!important; }

/* Add a little breathing room between the unit area and the village training queue. */
.play-shell .unit-barracks-content > .unit-production-queue { margin-top:10px; }


/* World map tile inspector: a proper vertical companion panel with the tile facts retained. */
.play-shell .world-view-content.has-tile {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,clamp(300px,26vw,370px));
  grid-template-rows:minmax(0,1fr); align-items:stretch; gap:10px; min-width:0; min-height:0; overflow:hidden;
}
.play-shell .world-view-content.has-tile > .world-map-panel { min-width:0; min-height:0; }
.play-shell .world-view-content.has-tile > .tile-context-panel {
  display:flex!important; flex:initial; flex-direction:column; width:auto; max-width:none; min-width:0; min-height:0;
  overflow:hidden; border:1px solid #cbdceb; border-radius:15px; background:#fff; box-shadow:0 5px 18px #315b8118;
}
.play-shell .tile-context-panel > .ph { min-height:43px; padding:10px 13px; border-bottom:1px solid #dbe6ef; background:linear-gradient(110deg,#f4f9fd,#eaf3fa); color:#315b7b; font-size:13px; }
.play-shell .tile-context-panel > .pc { display:flex; flex:1; min-width:0; min-height:0; overflow:auto!important; padding:10px!important; }
.play-shell .tile-context-panel .tile-detail-card {
  display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:13px;
  box-sizing:border-box; width:100%; height:auto; min-height:100%; padding:13px;
  border:1px solid #d6e3ed; border-radius:12px; background:linear-gradient(155deg,#fff,#f5f9fc); color:#20364a;
  box-shadow:0 2px 8px #315b8110;
}
.play-shell .tile-context-panel .tile-card-summary { align-items:flex-start; gap:10px; min-width:0; overflow:visible; }
.play-shell .tile-context-panel .tile-card-icon { width:42px; height:42px; border:1px solid #b9d0e2; background:#eaf4fb; color:#326a91; font-size:22px; }
.play-shell .tile-context-panel .tile-card-copy { gap:7px; min-width:0; overflow:visible; }
.play-shell .tile-context-panel .tile-card-copy b { color:#203a50; font-size:15px; line-height:1.3; white-space:normal; overflow-wrap:anywhere; }
.play-shell .tile-context-panel .tile-card-copy span { color:#425a6e; font-size:12px; line-height:1.45; white-space:normal; overflow:visible; overflow-wrap:anywhere; text-overflow:clip; }
.play-shell .tile-context-panel .tile-monster-power { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:9px 0; }
.play-shell .tile-context-panel .tile-monster-power>span { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; padding:7px 9px; border:1px solid #e3d5c2; border-radius:8px; background:linear-gradient(135deg,#fffaf2,#f8efe2); }
.play-shell .tile-context-panel .tile-monster-power small { color:#684a35; font-size:11px; font-weight:700; }
.play-shell .tile-context-panel .tile-monster-power b { color:#7f382e; font-size:13px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.play-shell .tile-context-panel .tile-card-copy i { color:#8ba4b7; }
.play-shell .tile-context-panel .monster-matchup-details { margin:0; padding:9px 10px; border-color:#d7e4ed; border-radius:9px; background:#f3f8fc; color:#36536b; font-size:11px; }
.play-shell .tile-context-panel .monster-matchup-details summary { line-height:1.35; }
.play-shell .tile-context-panel .monster-matchup-details>div { gap:6px; padding:5px 2px; border-color:#e0e9f0; }
.play-shell .tile-context-panel .tile-monster-portrait {
  position:relative; flex:none; display:block; width:46px; height:46px; padding:0; border:1px solid #d8bd8d;
  border-radius:11px; background:#f6ead4; box-shadow:0 2px 7px #5a45231f; z-index:2; cursor:pointer;
}
.play-shell .tile-context-panel .tile-monster-portrait>img { display:block; width:100%; height:100%; border-radius:inherit; object-fit:cover; }
.play-shell .tile-context-panel .monster-image-hover {
  position:absolute; z-index:30; top:0; left:calc(100% + 8px); display:none;
  grid-template-columns:76px minmax(0,1fr); gap:9px; width:min(320px,calc(100vw - 36px));
  padding:8px; border:1px solid #d7c5a2; border-radius:10px; background:#fffdf8;
  box-shadow:0 10px 25px #3e332533; color:#3d4e5b; white-space:normal;
}
.play-shell .tile-context-panel .tile-monster-portrait:hover .monster-image-hover,
.play-shell .tile-context-panel .tile-monster-portrait:focus-within .monster-image-hover { display:grid; }
.play-shell .tile-context-panel .monster-image-hover>img { width:76px; height:76px; border-radius:8px; object-fit:cover; }
.play-shell .tile-context-panel .monster-image-hover>span { display:grid; align-content:start; gap:4px; }
.play-shell .tile-context-panel .monster-image-hover b { color:#473b2b; font-size:12px; }
.play-shell .tile-context-panel .monster-image-hover small { color:#5e6870; font-size:10px; line-height:1.35; }
.play-shell .tile-context-panel .monster-image-hover i { color:#75432e; font-size:10px; font-style:normal; font-weight:700; }
.play-shell .tile-context-panel .monster-profile {
  min-width:0; padding:7px 8px; border:1px solid #d7e3ec; border-radius:10px;
  background:linear-gradient(135deg,#fffdf8,#f7f9fa); color:#30485b;
}
.play-shell .tile-context-panel .monster-profile>header { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#304b60; font-size:12px; font-weight:800; }
.play-shell .tile-context-panel .monster-profile>header>button { width:24px; height:24px; padding:0; border:1px solid #d8e3ea; border-radius:7px; background:#fff; color:#526d80; cursor:pointer; }
.play-shell .tile-context-panel .monster-profile-hero { display:grid; grid-template-columns:92px minmax(0,1fr); align-items:center; gap:10px; margin-top:8px; }
.play-shell .tile-context-panel .monster-profile-hero>img { display:block; width:92px; aspect-ratio:1; border:1px solid #d8c7a6; border-radius:10px; object-fit:cover; }
.play-shell .tile-context-panel .monster-profile-hero h3 { margin:0 0 4px; color:#453a2b; font-size:15px; }
.play-shell .tile-context-panel .monster-profile-hero p { margin:0 0 5px; color:#576b79; font-size:11px; line-height:1.4; }
.play-shell .tile-context-panel .monster-profile-hero span { color:#7b543a; font-size:10px; font-weight:700; }
.play-shell .tile-context-panel .monster-profile-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; margin-top:8px; }
.play-shell .tile-context-panel .monster-profile-stats>span { display:flex; justify-content:space-between; gap:6px; padding:5px 6px; border:1px solid #e1e8ec; border-radius:7px; background:#fff; }
.play-shell .tile-context-panel .monster-profile-stats small { color:#607485; font-size:10px; }
.play-shell .tile-context-panel .monster-profile-stats b { color:#354f64; font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.play-shell .tile-context-panel .tile-card-actions { display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:8px; min-width:0; margin-top:auto; }
.play-shell .tile-context-panel .tile-card-note { display:block; box-sizing:border-box; width:100%; padding:9px 10px; border:1px solid #e3d39f; border-radius:9px; background:#fff9e8; color:#70551c; font-size:12px; line-height:1.4; white-space:normal; }
.play-shell .tile-context-panel .tile-scout-action { display:block; width:100%; }
.play-shell .tile-context-panel .tile-card-action { box-sizing:border-box; width:100%; min-height:40px; padding:9px 11px; border:1px solid #b9d0e1; border-radius:9px; background:#f3f8fc; color:#2b5879; font-size:13px; text-align:center; white-space:normal; }
.play-shell .tile-context-panel .tile-card-action:hover:not(:disabled) { border-color:#81b2d4; background:#eaf5fc; }
.play-shell .tile-context-panel .tile-card-action.primary { border-color:#33816c; background:linear-gradient(135deg,#3ca387,#287d68); color:#fff; box-shadow:0 3px 8px #287d6828; }
.play-shell .tile-context-panel .tile-card-action:disabled { opacity:.62; }

/* Diplomacy: one section title, clear alliance count, and distinct pending states. */
.play-shell .alliance-view-content { display:block; min-width:0; min-height:0; overflow:auto; padding:12px; border:1px solid var(--game-line); border-radius:15px; background:linear-gradient(150deg,#f8fbfe,#edf4f9); }
.play-shell .alliance-view-content > .alliances-panel { min-height:100%; border:1px solid #d6e3ed; border-radius:13px; background:#fff; box-shadow:0 4px 14px #315b8110; }
.play-shell .alliances-panel > .pc { display:grid; align-content:start; gap:11px; padding:14px; }
.play-shell .alliance-overview { display:flex; align-items:center; gap:9px; min-height:45px; padding:8px 11px; border:1px solid #d6e5ef; border-radius:11px; background:linear-gradient(110deg,#f5faff,#eaf4fb); color:#345870; }
.play-shell .alliance-overview>b { display:grid; place-items:center; min-width:29px; height:29px; padding:0 6px; border-radius:9px; background:#d8ebf8; color:#24608a; font-size:15px; }
.play-shell .alliance-overview>span { font-size:12px; font-weight:700; }
.play-shell .alliance-empty-state { display:grid; justify-items:center; gap:7px; padding:25px 16px; border:1px dashed #c7d9e7; border-radius:12px; background:#f8fbfd; text-align:center; }
.play-shell .alliance-empty-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; background:#e8f2f8; color:#477899; font-size:21px; }
.play-shell .alliance-empty-state>b { color:#2b465d; font-size:14px; }
.play-shell .alliance-empty-state>span:last-child { max-width:440px; color:#576d7f; font-size:12px; line-height:1.45; }
.play-shell .alliance-subheading { margin:8px 0 0; padding:0 2px 6px; border-bottom:1px solid #e0e9f0; color:#536f83; font-size:11px; letter-spacing:.08em; }
.play-shell .alliance-card { gap:11px; padding:11px; border:1px solid #d7e4ec; border-radius:11px; background:#fff; color:#263e52; box-shadow:0 2px 7px #315b810c; }
.play-shell .alliance-card.active { border-color:#c3ddce; background:linear-gradient(110deg,#fff,#f4fbf6); }
.play-shell .alliance-emblem { width:36px; height:36px; border:1px solid #c8dce8; background:#edf6fb; color:#33719a; }
.play-shell .alliance-card b { color:#263f53; font-size:13px; }
.play-shell .alliance-card small { color:#5a7183; font-size:11px; }
.play-shell .alliance-notice { padding:10px 12px; border-color:#d7e4ed; border-radius:10px; background:#f4f9fc; color:#415b70; font-size:12px; }
.play-shell .alliance-notice.pending { border-left:3px solid #d6a449; background:#fffaf0; color:#69501f; }
.play-shell .alliance-notice.accepted { border-left:3px solid #4a9a70; background:#f1faf4; color:#37684c; }
.play-shell .alliance-notice.declined { border-left:3px solid #bd716b; background:#fff5f3; color:#80504d; }
.play-shell .alliance-actions button { min-height:34px; padding:7px 12px; border-radius:8px; font-size:11px; }

/* Battle reports and player statistics share the light blue game UI. */
.play-shell .report-modal { border:1px solid #c4d7e6; border-radius:18px; background:#f7fafc; color:#24394c; box-shadow:0 24px 80px #142b3e55; }
.play-shell .report-modal-header { background:linear-gradient(120deg,#f9fcfe,#e7f2f9); border-color:#d5e3ed; }
.play-shell .report-modal-header h1 { color:#233e54; }
.play-shell .report-modal-header h1 span { border-color:#bfd4e3; background:#eaf4fa; color:#38617e; }
.play-shell .report-modal .report-list { border-color:#d7e4ed; background:#edf4f9; }
.play-shell .report-modal .report-item { border-color:#d4e1ea; border-radius:10px; background:#fff; color:#2c4357; box-shadow:0 2px 7px #315b8110; }
.play-shell .report-modal .report-item:hover { border-color:#8eb8d4; background:#f3f9fd; }
.play-shell .report-modal .report-item.active { border-color:#68a5ca; background:#e7f3fa; box-shadow:inset 0 0 0 1px #b5d6e9; }
.play-shell .report-modal .report-detail { background:#fff; color:#2a4154; }
.play-shell .report-modal .report-detail-hero { border-color:#c7dce9; border-radius:12px; background:linear-gradient(130deg,#f1f8fc,#e7f2f8); color:#29465e; }
.play-shell .report-modal .report-detail-hero h2 { color:#203d54; }
.play-shell .report-modal .report-filter-tab { border-color:#d2e0e9; border-radius:8px; background:#f4f8fb; color:#50687b; }
.play-shell .report-modal .report-filter-tab.active { border-color:#80b2d2; background:#e4f1f8; color:#2b6287; }
.play-shell .report-modal .report-resource-grid>div,
.play-shell .report-modal .report-resource-grid>span { border-color:#d9e5ed; border-radius:9px; background:#f7fafc; color:#344f64; }
.play-shell .leaderboard-modal { border-color:#c4d7e6; border-radius:18px; background:#f7fafc; color:#24394c; box-shadow:0 24px 80px #142b3e55; }
.play-shell .leaderboard-header { background:linear-gradient(120deg,#f9fcfe,#e7f2f9); border-color:#d5e3ed; }
.play-shell .leaderboard-header h2 { color:#233e54; }
.play-shell .leaderboard-header p,.play-shell .leaderboard-header small { color:#587185; }
.play-shell .leaderboard-close { border-color:#c6d9e6; border-radius:9px; background:#fff; color:#345b76; }
.play-shell .leaderboard-tools { border-color:#dce7ee; }
.play-shell .leaderboard-search { border-color:#c8dce9; border-radius:9px; background:#fff; color:#416a86; }
.play-shell .leaderboard-search input { color:#24394c; }
.play-shell .leaderboard-expand { border-color:#bcd3e3; border-radius:9px; background:#eaf4fa; color:#315d7b; }
.play-shell .leaderboard-list { display:grid; gap:4px; }
.play-shell .leaderboard-row { min-height:54px; border:1px solid transparent; border-radius:10px; }
.play-shell .leaderboard-row:hover { border-color:#d5e4ed; background:#f1f7fb; }
.play-shell .leaderboard-row.is-current-player { border-color:#9bc5df; background:#e8f4fa; box-shadow:inset 3px 0 #3b83ad; }
.play-shell .leaderboard-player b,.play-shell .leaderboard-score { color:#29445a; }
.play-shell .leaderboard-villages,.play-shell .leaderboard-footer { color:#5b7183; }
.play-shell .leaderboard-rank { background:#eaf1f5; color:#4c667a; }
.play-shell .leaderboard-footer { border-color:#dce7ee; }
.play-shell .score-frozen-badge { display:inline-flex; margin-left:5px; padding:2px 5px; border:1px solid #e7bbb3; border-radius:8px; background:#fff0ed; color:#a4483c; font-size:8px; font-weight:850; vertical-align:middle; }
.ruler-victory-backdrop { z-index:12000; display:grid; place-items:center; padding:18px; background:#17252dcc; backdrop-filter:blur(5px); }
.ruler-victory-dialog { position:relative; width:min(590px,100%); max-height:min(88vh,800px); overflow:auto; padding:30px clamp(20px,5vw,42px) 26px; border:1px solid #d7e2e9; border-radius:22px; background:linear-gradient(145deg,#fff,#f3f8fb); color:#263b4e; box-shadow:0 24px 90px #0d1b2d70; text-align:center; }
.ruler-victory-emblem { display:grid; place-items:center; width:58px; height:58px; margin:0 auto 12px; border:1px solid #d4c49f; border-radius:18px; background:linear-gradient(145deg,#fff8e7,#f1e3c2); color:#94733b; font-size:31px; }
.ruler-victory-eyebrow { margin:0 0 7px; color:#75879a; font-size:10px; font-weight:850; letter-spacing:.15em; }
.ruler-victory-dialog h2 { margin:0; color:#293f51; font:700 clamp(24px,4vw,32px)/1.15 system-ui,sans-serif; }
.ruler-victory-copy { max-width:470px; margin:12px auto 19px; color:#5d7283; font-size:14px; line-height:1.6; }
.ruler-final-results { padding:14px; border:1px solid #dbe6ed; border-radius:14px; background:#f8fbfd; text-align:left; }
.ruler-final-results h3 { margin:0 0 8px; color:#40596c; font-size:13px; }
.ruler-final-row { display:grid; grid-template-columns:26px minmax(0,1fr) auto minmax(75px,auto); align-items:center; gap:9px; min-height:39px; border-top:1px solid #e4ebf0; color:#40596c; font-size:12px; }
.ruler-final-rank { display:grid; place-items:center; width:23px; height:23px; border-radius:8px; background:#eaf1f5; color:#4b667a; font-weight:800; }
.ruler-final-row>b { overflow:hidden; color:#2e465a; text-overflow:ellipsis; white-space:nowrap; }
.ruler-final-row>span:nth-last-child(2) { color:#778a99; font-size:10px; }
.ruler-final-row>strong { color:#2d5775; text-align:right; font-variant-numeric:tabular-nums; }
.ruler-final-row>strong small { color:#718595; font-size:9px; }
.ruler-results-empty { margin:12px 0; color:#7b8c99; font-size:12px; }
.ruler-victory-dismiss { min-height:43px; margin-top:17px; padding:10px 20px; border:1px solid #3677a0; border-radius:10px; background:linear-gradient(180deg,#4d91ba,#36769e); color:white; font:700 13px system-ui,sans-serif; box-shadow:0 5px 14px #36769e2a; }
.ruler-victory-dismiss:hover { filter:brightness(1.05); transform:translateY(-1px); }
.play-shell .ruler-defeated-chip { display:inline-flex; align-items:center; gap:5px; padding:5px 8px; border:1px solid #efc9c1; border-radius:10px; background:#fff2ef; color:#9e493d; font-size:10px; font-weight:800; white-space:nowrap; }
.play-shell .ruler-defeated-chip>span { color:#b65346; font-size:13px; }

/* The World navigation target has the same hit area and icon scale as its siblings. */
@media(min-width:901px) {
  .play-shell .game-side-nav>button:nth-of-type(2) { display:flex; width:100%; min-height:63px; flex:none; padding:7px 3px; }
  .play-shell .game-side-nav>button:nth-of-type(2) i { width:25px; height:25px; margin:0; }
  .play-shell .game-side-nav>button:nth-of-type(2) i svg { width:23px; height:23px; }
}
/* Active training slots: text remains left-aligned and the unit emblem sits at the right edge. */
.play-shell .unit-queue-slot.active-slot {
  grid-template-columns:minmax(0,1fr) 36px; grid-template-rows:minmax(0,1fr) 5px auto;
  column-gap:7px; row-gap:5px; align-items:center;
}
.play-shell .unit-queue-slot.active-slot > .queue-slot-copy { grid-column:1; grid-row:1; min-width:0; padding-left:24px; }
.play-shell .unit-queue-slot.active-slot > .queue-slot-glyph { grid-column:2; grid-row:1; width:34px; height:34px; margin:0; }
.play-shell .unit-queue-slot.active-slot > .queue-slot-copy > small,
.play-shell .unit-queue-slot.active-slot > .queue-slot-copy > b,
.play-shell .unit-queue-slot.active-slot > .queue-slot-copy > span { min-width:0; white-space:nowrap; }
.play-shell .unit-queue-slot.active-slot > .queue-slot-copy > small { overflow:hidden; text-overflow:ellipsis; }
.play-shell .unit-queue-slot.active-slot > .queue-slot-copy > b { font-size:12px; }
.play-shell .unit-queue-slot.active-slot > .queue-slot-progress { grid-column:1/-1; grid-row:2; width:100%; margin:0; }
.play-shell .unit-queue-buyout { display:flex; align-items:center; gap:12px; margin-top:10px; padding:10px 12px; border:1px solid #e5c66f; border-radius:10px; background:linear-gradient(100deg,#fff9e8,#fffdf6); color:#493716; }
.play-shell .unit-queue-buyout>div { display:grid; gap:3px; min-width:0; flex:1; }
.play-shell .unit-queue-buyout>div b { font-size:13px; }
.play-shell .unit-queue-buyout>div span,.play-shell .unit-queue-buyout-short { color:#644d28; font-size:12px; }
.play-shell .unit-queue-buyout button { min-height:36px; padding:7px 12px; border:1px solid #be911e; border-radius:8px; background:linear-gradient(135deg,#f5d678,#e8b844); color:#382707; font:750 12px system-ui,sans-serif; white-space:nowrap; cursor:pointer; }
.play-shell .unit-queue-buyout button:hover:not(:disabled) { filter:brightness(1.04); box-shadow:0 2px 8px #98751e35; }
.play-shell .unit-queue-buyout button:disabled { opacity:.55; cursor:not-allowed; }
.play-shell .unit-queue-buyout-short { white-space:nowrap; }
@media (max-width:640px) { .play-shell .unit-queue-buyout { align-items:stretch; flex-direction:column; } .play-shell .unit-queue-buyout button { white-space:normal; } }

@media(max-width:1100px) {
  .play-shell .world-view-content.has-tile { grid-template-columns:minmax(0,1fr) minmax(270px,300px); }
}
@media(max-width:900px) {
  .play-shell .world-view-content.has-tile { display:flex; flex-direction:column; overflow:auto; }
  .play-shell .world-view-content.has-tile > .world-map-panel { flex:none; height:56dvh; min-height:390px; }
  .play-shell .world-view-content.has-tile > .tile-context-panel { flex:none; width:100%; max-height:45dvh; min-height:260px; }
}
@media(max-width:680px) {
  .play-shell .world-view-content.has-tile > .world-map-panel { height:52dvh; min-height:320px; }
  .play-shell .world-view-content.has-tile > .tile-context-panel { max-height:none; min-height:260px; }
  .play-shell .leaderboard-row { grid-template-columns:30px minmax(60px,1fr) 40px minmax(70px,auto); }
}


/* Account settings and destructive confirmation follow the light game shell. */
.play-shell .account-settings-menu { border-color:#c8d9e6; border-radius:11px; background:#fff; box-shadow:0 12px 28px #254d6b2b; }
.play-shell .account-settings-danger { border-radius:8px; color:#9c3e43; }
.play-shell .account-settings-danger:hover { background:#fff0f0; color:#822e35; }
.play-shell .account-delete-backdrop { background:#17334a66; backdrop-filter:blur(4px); }
.play-shell .account-delete-dialog { border-color:#c8d9e6; border-radius:17px; background:linear-gradient(155deg,#fff,#f1f7fb 80%); box-shadow:0 24px 70px #132e4355; color:#263d50; }
.play-shell .account-delete-dialog header small { color:#577b95; }
.play-shell .account-delete-dialog h2 { color:#203d54; }
.play-shell .account-delete-dialog p { color:#4a6174; }
.play-shell .account-delete-close { border-color:#c8d9e6; border-radius:9px; background:#fff; color:#45647b; }
.play-shell .account-delete-dialog>label { color:#38566d; }
.play-shell .account-delete-dialog>input { border-color:#c4d7e4; border-radius:9px; background:#fff; color:#23394b; }
.play-shell .account-delete-dialog>input:focus { border-color:#6ca8cc; box-shadow:0 0 0 3px #6ca8cc2b; }
.play-shell .account-delete-error { border-color:#e5b8b8; border-radius:9px; background:#fff1f1; color:#8c3439; }
.play-shell .account-delete-confirm { border-color:#a8494f; border-radius:9px; background:linear-gradient(#c65a60,#a83e46); }
.play-shell .account-delete-confirm:hover:not(:disabled) { background:#96333c; }
.play-shell .announcement-dialog { border-color:#c5dceb; }

/* Compact game context panels, world map controls, and world information. */
.play-shell > .game-events-bottom {
  grid-template-columns:minmax(155px,.82fr) minmax(170px,.9fr) minmax(280px,1.55fr) minmax(180px,.95fr);
}
.play-shell > .game-events-bottom .movements-context > .context-block-body {
  display:flex; flex-direction:column; gap:6px; overflow:auto;
}
.play-shell .support-panel {
  display:grid; gap:5px; margin:0; padding:0; border:0; background:transparent; color:var(--game-ink);
}
.play-shell .support-panel > header {
  min-height:20px; color:#345c7d; font-size:11px; letter-spacing:0; text-transform:none;
}
.play-shell .support-panel > header > span {
  min-width:18px; height:18px; background:#e8f2ff; color:#295d9b; font-size:10px;
}
.play-shell .support-card-list { display:grid; gap:4px; }
.play-shell .support-entry {
  display:grid; grid-template-columns:25px minmax(0,1fr) auto; align-items:center; gap:5px;
  min-width:0; padding:5px 6px; border:1px solid #dce7ef; border-radius:8px;
  background:#f8fbfe; font-size:11px;
}
.play-shell .support-entry-mark { display:grid; place-items:center; width:23px; height:23px; border-radius:7px; background:#e8f2ff; color:#397cb4; }
.play-shell .support-entry-mark svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.play-shell .support-entry-copy { display:grid; gap:2px; min-width:0; }
.play-shell .support-entry-copy strong { overflow:hidden; color:#29465e; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.play-shell .support-entry-copy strong small { color:#65798b; font-size:10px; font-weight:500; }
.play-shell .support-entry-copy > span { overflow:hidden; color:#40566a; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.play-shell .support-entry button {
  grid-column:auto; grid-row:auto; padding:4px 6px; border:1px solid #d9b7b3; border-radius:6px;
  background:#fff4f2; color:#a14342; font-size:10px; font-weight:700; white-space:nowrap;
}
.play-shell .hosted-support-entry .support-entry-mark { background:#eaf7ef; color:#39845f; }
.play-shell .support-action-message { color:#287e63; font-size:10px; }
.play-shell .movement-empty { padding:6px 8px; border:1px dashed #d6e2eb; border-radius:7px; background:#f8fbfe; color:#52677a; font-size:11px; }

.play-shell > .game-events-bottom > .quick-actions-panel > summary {
  display:flex; align-items:center; justify-content:space-between; gap:5px; min-height:32px;
  padding:6px 8px; color:#315b7b; font-size:11px; font-weight:750;
}
.play-shell .quick-actions-title { display:inline-flex; align-items:center; gap:5px; min-width:0; }
.play-shell .quick-actions-title > span { color:#d39a36; font-size:13px; }
.play-shell .quick-actions-panel > summary::after { color:#4c7597; font-size:13px; }
.play-shell .quick-actions-content { display:grid; align-content:start; gap:5px; min-height:0; padding:5px; }
.play-shell .quick-action-save { grid-template-columns:minmax(0,1fr) auto; gap:4px; }
.play-shell .quick-action-save input { min-width:0; width:100%; padding:5px 6px; border-color:#cbdce9; border-radius:6px; background:#fff; color:#263d52; font-size:11px; }
.play-shell .quick-action-save button,.play-shell .quick-action-buttons button {
  display:inline-flex; align-items:center; justify-content:center; gap:3px; min-height:27px; padding:4px 6px;
  border-color:#cbdce9; border-radius:6px; background:#f2f7fb; color:#315b7b; font-size:10px;
}
.play-shell .quick-action-save button { background:#e9f5ed; border-color:#c6e1ce; color:#287e63; }
.play-shell .quick-action-save button > span { font-size:14px; line-height:1; }
.play-shell .quick-actions-empty { margin:0; color:#506478; font-size:10px; line-height:1.25; }
.play-shell .quick-action-list { gap:4px; max-height:110px; }
.play-shell .quick-action-card { padding:5px; border-color:#dce7ef; border-radius:7px; background:#fbfdff; }
.play-shell .quick-action-card > header { gap:4px; margin-bottom:4px; color:#29465e; font-size:10px; }
.play-shell .quick-action-buttons { gap:3px; }
.play-shell .quick-action-buttons .quick-action-delete { margin-left:auto; color:#a14342; }

.play-shell .world-map-panel > .ph {
  display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:37px;
  padding:6px 11px; border-bottom:1px solid #d7e3ee; background:linear-gradient(100deg,#fff,#f1f7fc);
  color:#294d6c; font-size:13px; font-weight:800;
}
.play-shell .world-map-panel > .ph .panel-hint { color:#536a7e; font-size:11px; font-weight:550; }
.play-shell .world-map-frame { position:relative; }
.play-shell .map-legend { position:absolute; z-index:5; top:8px; left:8px; align-self:auto; margin:0; }
.play-shell .map-legend > summary {
  display:inline-flex; align-items:center; gap:6px; min-height:31px; padding:5px 9px;
  border:1px solid #cbdce9; border-radius:9px; background:#fff; color:#315b7b;
  box-shadow:0 2px 8px #294d6c20; font:700 11px Segoe UI,system-ui,sans-serif;
}
.play-shell .map-legend-symbol { display:grid; place-items:center; width:17px; height:17px; }
.play-shell .map-legend-symbol svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; }
.play-shell .map-legend > .world-map-legend {
  top:37px; left:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 10px;
  width:min(400px,78vw); max-height:min(42dvh,340px); margin:0; padding:10px;
  border:1px solid #cbdce9; border-radius:11px; background:#fff; color:#344c61;
  box-shadow:0 10px 28px #294d6c2c; font-size:11px;
}
.play-shell .world-map-legend > span { min-width:0; gap:6px; color:#344c61; }
.play-shell .map-navigation { display:flex; align-items:center; gap:4px; padding:5px; border:1px solid #cbdce9; border-radius:11px; background:#ffffffed; box-shadow:0 3px 12px #294d6c22; }
.play-shell .map-navigation button { min-width:29px; min-height:29px; padding:4px 7px; border:1px solid #d9e4ed; border-radius:7px; background:#fff; color:#315b7b; font-size:12px; font-weight:700; }
.play-shell .map-navigation button:hover { border-color:#8fb7d8; background:#edf6ff; }
.play-shell .map-compass { gap:2px; }
.play-shell .map-compass button { min-width:24px; min-height:24px; padding:2px; }
.play-shell .map-compass span { color:#61788b; font-size:9px; }
.play-shell .map-scale { padding:5px 7px; border:1px solid #cbdce9; border-radius:7px; background:#ffffffed; color:#344c61; font-size:10px; }

.server-quick-info .server-details-button { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:5px 9px; border:1px solid #cbdcec; border-radius:9px; background:#fff; color:#315b7b; font-size:11px; box-shadow:0 2px 7px #31577512; }
.server-quick-info .server-details-button:hover { background:#edf6ff; }
.world-details-modal { border-color:#cbdce9; border-radius:16px; background:#f4f8fc; color:#203044; box-shadow:0 24px 80px #18365444; }
.world-details-header { padding:16px 20px 12px; border-color:#d7e3ee; background:linear-gradient(120deg,#fff,#edf5fc); }
.world-details-header small,.world-detail-section h3 { color:#4c7597; letter-spacing:.06em; }
.world-details-header h2 { color:#203044; font:700 22px Segoe UI,system-ui,sans-serif; }
.world-details-header p { color:#536a7e; }
.world-details-header > button { border-color:#cbdce9; border-radius:9px; background:#fff; color:#315b7b; }
.world-details-content { padding:13px 18px 18px; }
.world-detail-section { margin-bottom:13px; }
.world-detail-cards article,.world-setting-grid > div { border-color:#d7e3ee; border-radius:10px; background:#fff; box-shadow:0 2px 7px #3157750d; }
.world-detail-icon,.world-setting-grid > div > span { border-radius:8px; background:#eaf3fb; color:#397bb2; }
.world-detail-cards small,.world-setting-grid label { color:#536a7e; }
.world-detail-cards b,.world-setting-grid b { color:#203044; }
.world-detail-cards em { color:#62778a; }
.world-speed-card { border-color:#d7e3ee; border-radius:10px; background:#fff; }
.world-speed-icon { border-radius:8px; background:#e9f5ed; color:#32835f; }
.world-speed-card small,.world-speed-card > div > span { color:#536a7e; }
.world-speed-card b { color:#287e63; }
.world-overview-panel .world-overview { color:#203044; }
.world-overview-panel .world-overview-hero { border-color:#d7e3ee; border-radius:14px; background:linear-gradient(120deg,#fff,#edf5fc); box-shadow:0 3px 12px #31577512; }
.world-overview-panel .world-eyebrow { color:#4c7597; }
.world-overview-panel .world-overview-title h2 { color:#203044; }
.world-overview-panel .world-overview-title p { color:#536a7e; }
.world-overview-panel .world-running-card,.world-overview-panel .world-metric-card,.world-overview-panel .world-speed-card { border-color:#d7e3ee; border-radius:10px; background:#fff; }
.world-overview-panel .world-running-card > span,.world-overview-panel .world-speed-card small { color:#536a7e; }
.world-overview-panel .world-running-card > b,.world-overview-panel .world-metric-card b { color:#203044; }
.world-overview-panel .world-running-card > small,.world-overview-panel .world-metric-card small,.world-overview-panel .world-metric-card div > span { color:#536a7e; }
.world-overview-panel .world-metric-icon,.world-overview-panel .world-speed-icon { border-color:#d7e3ee; border-radius:8px; background:#eaf3fb; color:#397bb2; }
.world-overview-panel .world-overview-footer { border-color:#d7e3ee; color:#536a7e; }
@media(max-width:1200px) {
  .play-shell > .game-events-bottom { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:900px) {
  .play-shell .support-entry { grid-template-columns:23px minmax(0,1fr) auto; }
  .play-shell > .game-events-bottom { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:680px) {
  .play-shell > .game-events-bottom { grid-template-columns:minmax(0,1fr); }
  .play-shell .map-legend > .world-map-legend { grid-template-columns:minmax(0,1fr); }
}
/* Keep the four bottom context panels on one row throughout desktop/tablet widths.
   The old <=1200px two-column rule wrapped Quick Actions onto a second row. */
@media(min-width:681px) {
  .play-shell > .game-events-bottom {
    grid-template-columns:minmax(0,.86fr) minmax(0,.92fr) minmax(0,1.45fr) minmax(0,.92fr);
    grid-auto-flow:column;
    grid-auto-rows:minmax(0,1fr);
    align-items:stretch;
  }
}
@media(min-width:681px) and (max-width:1200px) {
  .play-shell > .game-events-bottom {
    grid-template-columns:minmax(0,.82fr) minmax(0,.9fr) minmax(0,1.35fr) minmax(0,.82fr);
    gap:6px;
    padding:7px;
  }
}
/* Movement feed lives in its own right rail; bottom rail keeps only short summaries. */
.play-shell > .play-container {
  grid-template-columns:76px minmax(0,1fr) minmax(280px,320px);
  align-items:stretch;
}
.play-shell .movement-sidebar {
  display:flex; flex-direction:column; min-width:0; min-height:0; overflow:hidden;
  border:1px solid #cbdce9; border-radius:13px; background:#fff;
  box-shadow:0 4px 14px #31577514;
}
.play-shell .movement-sidebar > .movements-context {
  display:flex; flex:1 1 auto; flex-direction:column; min-width:0; min-height:0; overflow:hidden;
  border:0; border-radius:inherit; background:transparent;
}
.play-shell .movement-sidebar > .movements-context > header {
  min-height:39px; padding:8px 10px; border-bottom:1px solid #d7e3ee;
  background:linear-gradient(100deg,#fff,#f1f7fc); color:#315b7b; font-size:12px;
}
.play-shell .movement-sidebar > .movements-context > header > span {
  display:grid; place-items:center; min-width:21px; height:21px; padding:0 5px;
  border-radius:8px; background:#e7f1f8; color:#295d9b; font-size:11px;
}
.play-shell .movement-sidebar .context-block-body {
  display:flex; flex:1 1 auto; flex-direction:column; gap:9px; min-width:0; min-height:0;
  overflow:auto; padding:8px;
}
.play-shell .movement-sidebar .support-panel { padding:0; }
.play-shell .movement-sidebar .support-panel > header { padding:0 1px 4px; }
.play-shell .movement-sidebar .support-entry { grid-template-columns:26px minmax(0,1fr) auto; padding:6px; }
.play-shell .movement-sidebar .movement-list { display:grid; gap:7px; min-width:0; }
.play-shell .movement-sidebar .movement-card {
  min-width:0; padding:8px; border:1px solid #d8e4ed; border-radius:9px;
  background:#fbfdff; box-shadow:0 1px 4px #3157750c;
}
.play-shell .movement-sidebar .movement-card.incoming-attack { border-color:#edc6c2; background:#fff8f6; }
.play-shell .movement-sidebar .movement-card-header { gap:6px; }
.play-shell .movement-sidebar .movement-mission { min-width:0; color:#34566f; font-size:11px; }
.play-shell .movement-sidebar .movement-eta { flex:none; color:#2f668c; font-size:11px; }
.play-shell .movement-sidebar .movement-route { display:grid; gap:3px; margin-top:6px; }
.play-shell .movement-sidebar .movement-route > span { color:#657a8b; font-size:10px; }
.play-shell .movement-sidebar .movement-route b { color:#29465e; font-size:11px; line-height:1.3; overflow-wrap:anywhere; }
.play-shell .movement-sidebar .movement-units { display:grid; gap:2px; margin-top:5px; }
.play-shell .movement-sidebar .movement-units > span { color:#65798a; font-size:10px; }
.play-shell .movement-sidebar .movement-units > b { color:#334f65; font-size:10px; line-height:1.35; overflow-wrap:anywhere; }
.play-shell .movement-sidebar .movement-card-footer { gap:5px; margin-top:6px; padding-top:5px; border-color:#e5edf2; color:#65798a; font-size:10px; }
.play-shell .movement-sidebar .movement-card-footer time { color:#45677f; font-size:10px; }
.play-shell .movement-sidebar .movement-empty { padding:8px; border-radius:8px; font-size:11px; }
.play-shell > .game-events-bottom {
  grid-template-columns:minmax(0,.95fr) minmax(0,1.25fr) minmax(0,.95fr);
  grid-auto-flow:column; grid-auto-rows:minmax(0,1fr);
}
@media(min-width:901px) and (max-width:1500px) {
  .play-shell > .play-container { grid-template-columns:64px minmax(0,1fr) minmax(245px,270px); }
}
@media(max-width:900px) {
  .play-shell > .play-container { grid-template-columns:minmax(0,1fr); grid-template-rows:auto minmax(0,1fr) auto; }
  .play-shell .movement-sidebar { min-height:260px; max-height:55dvh; }
  .play-shell > .game-events-bottom { grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-flow:row; }
}
@media(max-width:680px) {
  .play-shell .movement-sidebar { min-height:300px; max-height:none; }
  .play-shell > .game-events-bottom { grid-template-columns:minmax(0,1fr); }
}
/* Constrain the game workspace row so the movement sidebar can scroll vertically
   instead of being pushed below or clipped by long movement feeds. */
.play-shell > .play-container {
  grid-template-columns:76px minmax(0,1fr) minmax(310px,350px);
  grid-template-rows:minmax(0,1fr);
  align-items:stretch;
}
.play-shell > .play-container > .game-side-nav { grid-column:1; grid-row:1; }
.play-shell > .play-container > .play-main-area { grid-column:2; grid-row:1; min-width:0; min-height:0; overflow:hidden; }
.play-shell > .play-container > .movement-sidebar {
  grid-column:3; grid-row:1; min-width:0; min-height:0; height:100%; max-height:100%;
}
.play-shell .movement-sidebar > .movements-context > header {
  position:sticky; top:0; z-index:2; flex:none;
}
.play-shell .movement-sidebar .context-block-body {
  flex:1 1 0; min-height:0; max-height:none; height:auto; overflow-x:hidden; overflow-y:auto;
  overscroll-behavior:contain; scrollbar-gutter:stable;
}
.play-shell .movement-sidebar .support-panel { flex:none; }
.play-shell .movement-sidebar .support-card-list { display:flex; flex-direction:column; gap:7px; }
.play-shell .movement-sidebar .support-entry { grid-template-columns:30px minmax(0,1fr) auto; gap:8px; padding:9px; }
.play-shell .movement-sidebar .support-entry-copy { display:grid; gap:4px; min-width:0; }
.play-shell .movement-sidebar .support-entry-copy strong { color:#263e52; font-size:12px; line-height:1.35; }
.play-shell .movement-sidebar .support-entry-copy strong small { color:#52697c; font-size:11px; }
.play-shell .movement-sidebar .support-entry-copy > span { color:#344e63; font-size:11px; line-height:1.45; white-space:normal; overflow-wrap:anywhere; }
.play-shell .movement-sidebar .support-entry > button {
  grid-column:3; grid-row:1; justify-self:end; align-self:center;
  width:max-content; max-width:100%; min-width:0; min-height:26px; padding:3px 7px;
  font-size:10px; line-height:1.2; white-space:nowrap;
}
.play-shell .movement-sidebar .movement-list {
  display:flex; flex:0 0 auto; flex-direction:column; align-content:start; gap:9px;
  width:100%; height:auto; min-height:0; max-height:none; overflow:visible; padding:1px;
}
.play-shell .movement-sidebar .movement-card { flex:0 0 auto; height:auto; min-height:0; max-height:none; }
.play-shell .movement-sidebar .movement-card-header {
  display:flex; align-items:flex-start; justify-content:space-between; min-width:0;
}
.play-shell .movement-sidebar .movement-mission,
.play-shell .movement-sidebar .movement-eta { font-size:12px; }
.play-shell .movement-sidebar .movement-route { display:grid; gap:3px; min-width:0; margin-top:8px; }
.play-shell .movement-sidebar .movement-route > span,
.play-shell .movement-sidebar .movement-units > span { display:block; color:#52697c; font-size:11px; }
.play-shell .movement-sidebar .movement-route b {
  display:block; color:#263e52; font-size:12px; line-height:1.4; white-space:normal; overflow-wrap:anywhere;
}
.play-shell .movement-sidebar .movement-repeat-status { margin-top:7px; color:#725220; font-size:11px; line-height:1.4; }
.play-shell .movement-sidebar .movement-units { display:grid; gap:3px; margin-top:8px; }
.play-shell .movement-sidebar .movement-units > b {
  display:block; color:#263e52; font-size:11px; line-height:1.45; white-space:normal; overflow-wrap:anywhere;
}
.play-shell .movement-sidebar .movement-card-footer { flex-wrap:wrap; justify-content:space-between; font-size:11px; line-height:1.4; }
.play-shell .movement-sidebar .movement-card-footer time { font-size:11px; }
.play-shell .movement-sidebar .movement-card.allied-movement {
  border-left:3px solid #5b9bc7;
  background:linear-gradient(115deg,#f2f8fd 0%,#fff 72%);
}
.play-shell .movement-sidebar .movement-ally-route {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  min-width:0; margin-top:5px; padding:5px 7px;
  border:1px solid #dce9f2; border-radius:7px; background:#f4f9fc;
}
.play-shell .movement-sidebar .movement-ally-route > span {
  flex:0 1 42%; min-width:0; overflow:hidden; color:#55748c; font-size:10px;
  font-weight:700; text-overflow:ellipsis; white-space:nowrap;
}
.play-shell .movement-sidebar .movement-ally-route > b {
  flex:1 1 auto; min-width:0; color:#294b66; font-size:11px; line-height:1.25;
  text-align:right; overflow-wrap:anywhere;
}
.play-shell .movement-sidebar .movement-ally-units {
  grid-template-columns:auto minmax(0,1fr); align-items:start; gap:6px;
  margin-top:5px;
}
.play-shell .movement-sidebar .movement-ally-units > span { padding-top:1px; white-space:nowrap; }
.play-shell .movement-sidebar .movement-card.allied-movement .movement-card-footer {
  margin-top:5px; padding-top:4px;
}
.play-shell .movement-sidebar .support-panel > header { padding:2px 1px 6px; font-size:12px; }
.play-shell .movement-sidebar .support-panel > header > span { color:#2e5e8d; font-weight:700; }
.play-shell .movement-sidebar .movements-context > .context-block-body { max-height:none; }
.play-shell > .game-events-bottom {
  flex-basis:150px; min-height:132px; max-height:150px;
  grid-template-columns:minmax(0,.95fr) minmax(0,1.25fr) minmax(0,.95fr);
}
@media(min-width:901px) and (max-width:1500px) {
  .play-shell > .play-container {
    grid-template-columns:64px minmax(0,1fr) minmax(280px,310px);
    grid-template-rows:minmax(0,1fr);
  }
}
@media(max-width:900px) {
  .play-shell > .play-container {
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr) minmax(280px,auto);
    align-content:start;
  }
  .play-shell > .play-container > .game-side-nav { grid-column:1; grid-row:1; }
  .play-shell > .play-container > .play-main-area { grid-column:1; grid-row:2; }
  .play-shell > .play-container > .movement-sidebar {
    grid-column:1; grid-row:3; height:auto; max-height:55dvh; min-height:280px;
  }
  .play-shell > .game-events-bottom { flex-basis:auto; max-height:280px; min-height:120px; }
}
@media(max-width:680px) {
  .play-shell > .play-container { grid-template-rows:auto minmax(60dvh,auto) auto; }
  .play-shell > .play-container > .movement-sidebar { max-height:60dvh; min-height:320px; }
  .play-shell > .game-events-bottom { max-height:none; }
}

/* Give quick actions a real, roomy desktop column; the rail has four actual
   items after the queue component exposes its construction and training cards. */
@media(min-width:901px) {
  .play-shell > .game-events-bottom {
    grid-template-columns:minmax(150px,.7fr) minmax(205px,.95fr) minmax(300px,1.4fr) minmax(340px,1.85fr);
    grid-auto-flow:row;
  }
  .play-shell > .game-events-bottom > .events-context { grid-column:1; }
  .play-shell > .game-events-bottom > .building-queue-section { grid-column:2; }
  .play-shell > .game-events-bottom > .unit-queue-section { grid-column:3; }
  .play-shell > .game-events-bottom > .quick-actions-panel { grid-column:4; }
}
@media(min-width:901px) and (max-width:1200px) {
  .play-shell > .game-events-bottom {
    flex:0 0 250px; min-height:240px; max-height:260px;
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
    grid-template-rows:minmax(0,1fr) minmax(0,1fr); grid-auto-flow:row;
  }
  .play-shell > .game-events-bottom > .events-context { grid-column:1; grid-row:1; }
  .play-shell > .game-events-bottom > .building-queue-section { grid-column:2; grid-row:1; }
  .play-shell > .game-events-bottom > .unit-queue-section { grid-column:1; grid-row:2; }
  .play-shell > .game-events-bottom > .quick-actions-panel { grid-column:2; grid-row:2; }
}

/* Mobile game shell: turn the fixed desktop workspace into a natural page
   flow so every game view, movement, queue, and action remains reachable. */
@media(max-width:900px) {
  .play-shell {
    display:flex; width:100%; height:auto; min-height:100dvh; min-width:0;
    overflow:visible; padding-bottom:env(safe-area-inset-bottom,0px);
  }
  .play-topbar {
    position:relative; z-index:30; flex:0 0 auto; flex-wrap:wrap;
    height:auto; min-height:54px; gap:7px; padding:7px 10px;
  }
  .game-brand { flex:0 0 auto; }
  .player-context {
    order:3; flex:1 0 100%; width:100%; min-width:0; flex-wrap:wrap;
    justify-content:space-between; gap:5px 9px; font-size:12px;
  }
  .player-context>span+span { padding-left:0; }
  .player-context b { font-size:12px; }
  .global-village-switcher { flex:1 1 210px; min-width:0; max-width:100%; }
  .global-village-switcher>summary { min-width:0; max-width:100%; min-height:40px; }
  .global-village-switcher>summary>b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .global-village-menu { z-index:80; width:min(380px,calc(100vw - 20px)); }
  .topbar-actions { display:flex; flex:1 1 auto; flex-wrap:wrap; justify-content:flex-end; min-width:0; gap:5px; }
  .topbar-button { min-height:38px; padding:7px 9px; font-size:12px; }
  .session-restart-notice { position:fixed; top:8px; right:8px; z-index:90; max-width:min(280px,70vw); }

  .resource-bar {
    flex:0 0 auto; grid-template-columns:repeat(4,minmax(0,1fr));
    gap:5px; padding:6px 8px;
  }
  .resource-item { min-width:0; min-height:55px; padding:5px 6px; }
  .resource-item img { width:25px; height:25px; flex:none; }
  .resource-copy { min-width:0; }
  .resource-heading { flex-wrap:wrap; gap:1px 4px; }
  .resource-heading>span:first-child { font-size:12px; }
  .resource-rate { overflow-wrap:anywhere; font-size:10px; }
  .resource-copy strong { font-size:14px; }
  .play-shell .resource-bar .unit-roster {
    grid-column:1/-1; min-height:0; padding:6px 132px 6px 7px;
    border-top:1px solid var(--game-line); border-left:0;
  }
  .play-shell .resource-bar .unit-roster-list { flex-wrap:wrap; overflow:visible; }
  .play-shell .resource-bar .unit-roster-item { min-height:29px; }
  .play-shell .resource-bar .merchant-roster { width:120px; height:58px; }

  .play-shell > .play-container {
    display:grid; flex:0 0 auto; grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto auto; gap:8px; min-height:0; padding:8px;
    overflow:visible;
  }
  .play-shell > .play-container > .game-side-nav {
    grid-column:1; grid-row:1; display:grid; grid-template-columns:repeat(5,minmax(0,1fr));
    align-items:stretch; gap:4px; min-width:0; min-height:0; padding:5px;
    border-radius:12px; overflow:visible;
  }
  .play-shell .game-side-nav-label { display:none; }
  .play-shell .game-side-nav>button,
  .play-shell .game-nav-dialog .leaderboard-trigger {
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
    min-width:0; min-height:54px; padding:5px 2px; border-radius:9px;
    text-align:center; white-space:normal; font-size:10px; line-height:1.15;
  }
  .play-shell .game-side-nav>button i,
  .play-shell .game-nav-dialog .leaderboard-trigger>span:first-child {
    display:grid; place-items:center; width:23px; height:23px; margin:0; flex:none;
  }
  .play-shell .game-side-nav>button i svg,
  .play-shell .game-nav-dialog .leaderboard-crown-icon { width:22px; height:22px; }
  .play-shell .game-side-nav>button span { display:block; max-width:100%; overflow-wrap:anywhere; }
  .play-shell .game-nav-dialog { display:block; min-width:0; width:100%; }
  .play-shell > .play-container > .play-main-area {
    grid-column:1; grid-row:2; display:flex; width:100%; min-width:0; min-height:0;
    height:auto; overflow:visible;
  }
  .play-shell .game-view { width:100%; height:auto; min-width:0; min-height:0; }
  .play-shell .game-view.active { min-height:0; }
  .play-shell .game-view-heading { min-height:48px; padding:4px 2px 8px; }
  .play-shell .game-view-heading small { font-size:10px; }
  .play-shell .game-view-heading h1 { font-size:22px; }
  .play-shell .game-view-content { flex:0 0 auto; width:100%; min-width:0; min-height:0; }

  .play-shell .village-view-content>.building-layout {
    display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto;
    height:auto; min-height:0; gap:9px; overflow:visible;
  }
  .play-shell .hex-board-panel { width:100%; height:auto; min-width:0; min-height:52svh; padding:8px; overflow:auto; }
  .play-shell .hex-board { --hex-size:clamp(38px,10vw,58px); max-width:100%; }
  .play-shell .building-detail-panel { width:100%; max-width:none; max-height:none; min-height:0; padding:12px; overflow:visible; }
  .play-shell .building-detail-panel .available-buildings { grid-template-columns:repeat(2,minmax(0,1fr)); }

  .play-shell .world-view-content { display:flex; flex-direction:column; min-height:0; gap:8px; }
  .play-shell .world-map-panel { flex:0 0 auto; width:100%; height:64svh; min-height:390px; max-height:720px; }
  .play-shell .world-map-panel>.pc.map-panel-content { min-width:0; min-height:0; }
  .play-shell .world-view-content.has-tile { display:flex; flex-direction:column; }
  .play-shell .world-view-content.has-tile>.tile-context-panel {
    display:flex; flex:0 0 auto; width:100%; max-width:none; max-height:none; min-height:0; overflow:visible;
  }
  .play-shell .world-view-content.has-tile>.tile-context-panel>.pc { max-height:none; overflow:visible; }

  .play-shell .army-view-content>.units-panel { min-height:0; }
  .play-shell .army-view-content>.units-panel>.pc { max-height:none; overflow:visible; padding:8px; }
  .play-shell .unit-barracks-content { grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto; gap:9px; height:auto; overflow:visible; }
  .play-shell .unit-picker-column,
  .play-shell .unit-detail-column,
  .play-shell .unit-detail-train-column,
  .play-shell .unit-production-column,
  .play-shell .unit-production-queue { grid-column:1; min-width:0; max-height:none; overflow:visible; }
  .play-shell .unit-picker-column { grid-row:1; }
  .play-shell .unit-detail-train-column { grid-row:2; grid-template-columns:minmax(0,1fr); gap:9px; }
  .play-shell .unit-production-queue { grid-row:3; }
  .play-shell .unit-type-picker { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .play-shell .unit-type-option { min-width:0; min-height:70px; }
  .play-shell .unit-queue-slots { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .play-shell .unit-queue-slots>.unit-queue-slot:last-child { grid-column:auto; }

  .play-shell .movement-sidebar {
    grid-column:1; grid-row:3; width:100%; height:auto; max-height:none; min-height:0;
    overflow:visible;
  }
  .play-shell .movement-sidebar>.movements-context { min-height:0; max-height:none; overflow:visible; }
  .play-shell .movement-sidebar .context-block-body { min-height:0; max-height:none; overflow:visible; padding:8px; }
  .play-shell .movement-sidebar .support-entry { grid-template-columns:26px minmax(0,1fr) auto; }
  .play-shell .movement-sidebar .movement-list { max-height:none; overflow:visible; }

  .play-shell > .game-events-bottom {
    display:grid!important; grid-template-columns:minmax(0,1fr); grid-auto-flow:row;
    grid-auto-rows:auto; flex:0 0 auto; width:100%; max-height:none; min-height:0;
    gap:8px; padding:8px; overflow:visible;
  }
  .play-shell > .game-events-bottom > .events-context,
  .play-shell > .game-events-bottom > .building-queue-section,
  .play-shell > .game-events-bottom > .unit-queue-section,
  .play-shell > .game-events-bottom > .quick-actions-panel {
    grid-column:1; width:100%; min-width:0; min-height:0; max-height:none;
    overflow:visible; border-radius:10px;
  }
  .play-shell > .game-events-bottom .context-block-body,
  .play-shell > .game-events-bottom .queue-section,
  .play-shell > .game-events-bottom .quick-actions-content { max-height:none; overflow:visible; }
  .play-shell > .game-events-bottom .queue-slot-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .play-shell > .game-events-bottom .queue-slot-card { min-height:76px; padding:7px; }
  .play-shell > .game-events-bottom .queue-slot-card small { font-size:10px; }
  .play-shell > .game-events-bottom > .quick-actions-panel { display:block; }
  .play-shell > .game-events-bottom > .quick-actions-panel>summary { min-height:42px; padding:9px 11px; font-size:13px; }
  .play-shell .quick-actions-content { display:grid; gap:8px; padding:8px; }
  .play-shell .quick-action-save { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; }
  .play-shell .quick-action-save input { min-width:0; min-height:40px; font-size:14px; }
  .play-shell .quick-action-save button,
  .play-shell .quick-action-buttons button { min-width:42px; min-height:40px; padding:7px 9px; font-size:12px; }
  .play-shell .quick-action-list { display:grid; gap:7px; }
  .play-shell .quick-action-card { min-width:0; }
  .play-shell .quick-action-buttons { display:flex; flex-wrap:wrap; gap:5px; }
  .play-shell .quick-action-buttons button { flex:1 1 72px; }

  .play-shell .alliance-view-content,
  .play-shell .statistics-view-content { width:100%; min-width:0; max-height:none; overflow:visible; padding:7px; }
  .play-shell .td-modal-backdrop { align-items:center; padding:10px; }
  .play-shell .td-modal,
  .play-shell .leaderboard-modal,
  .play-shell .account-delete-dialog { width:min(100%,600px); max-width:100%; max-height:calc(100svh - 20px); overflow:auto; }
}

@media(max-width:680px) {
  .play-shell .topbar-actions { flex:1 1 100%; justify-content:flex-start; }
  .play-shell .topbar-actions .topbar-button { flex:1 1 auto; }
  .play-shell .player-context>span:nth-child(2),
  .play-shell .player-context>span:nth-child(3) { display:none; }
  .play-shell .global-village-switcher { flex:1 1 170px; }
  .play-shell .resource-bar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .play-shell .resource-item { min-height:52px; }
  .play-shell .resource-copy strong { font-size:14px; }
  .play-shell .resource-heading>span:first-child { font-size:12px; }
  .play-shell .resource-rate { font-size:10px; }
  .play-shell .resource-bar .unit-roster { padding:6px 100px 6px 6px; }
  .play-shell .resource-bar .merchant-roster { top:auto; right:5px; bottom:5px; width:92px; height:50px; padding:3px; border-radius:9px; }
  .play-shell .resource-bar .merchant-roster-icon { width:19px; height:19px; }
  .play-shell .resource-bar .merchant-capacity { max-width:84px; overflow:hidden; font-size:8px; text-overflow:ellipsis; }
  .play-shell .game-side-nav { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .play-shell .game-side-nav>button,
  .play-shell .game-nav-dialog .leaderboard-trigger { min-height:52px; font-size:9px; }
  .play-shell .game-side-nav>button i,
  .play-shell .game-nav-dialog .leaderboard-trigger>span:first-child { width:21px; height:21px; }
  .play-shell .game-side-nav>button i svg,
  .play-shell .game-nav-dialog .leaderboard-crown-icon { width:20px; height:20px; }
  .play-shell .play-container { gap:7px; padding:7px; }
  .play-shell .hex-board-panel { min-height:48svh; padding:6px; }
  .play-shell .hex-board { --hex-size:clamp(35px,10vw,48px); }
  .play-shell .hex-slot img { width:clamp(24px,7vw,34px); height:clamp(24px,7vw,34px); }
  .play-shell .available-buildings { grid-template-columns:minmax(0,1fr); }
  .play-shell .world-map-panel { height:60svh; min-height:340px; }
  .play-shell .unit-type-picker { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .play-shell .unit-type-option { grid-template-columns:32px minmax(0,1fr) auto; gap:4px; padding:6px; }
  .play-shell .unit-type-glyph { width:29px; height:29px; }
  .play-shell .unit-queue-slots { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .play-shell .unit-stat-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .play-shell .unit-batch-resources { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .play-shell .support-entry { grid-template-columns:24px minmax(0,1fr) auto; gap:5px; }
  .play-shell .movement-sidebar .support-entry-copy strong { white-space:normal; overflow-wrap:anywhere; }
  .play-shell .movement-sidebar .support-entry-copy>span { line-height:1.4; }
  .play-shell .movement-sidebar .support-entry>button { min-height:34px; }
  .play-shell .movement-sidebar .movement-card-footer { align-items:flex-start; }
  .play-shell .quick-action-save { grid-template-columns:minmax(0,1fr); }
  .play-shell .quick-action-save button { width:100%; }
}

@media(max-width:380px) {
  .play-shell .play-topbar { padding-inline:7px; }
  .play-shell .game-brand-name { font-size:14px; }
  .play-shell .topbar-actions .topbar-button { flex:1 1 42%; font-size:11px; }
  .play-shell .game-side-nav { gap:2px; padding:4px; }
  .play-shell .game-side-nav>button,
  .play-shell .game-nav-dialog .leaderboard-trigger { min-height:48px; padding:4px 1px; font-size:8px; }
  .play-shell .resource-item { gap:4px; padding:4px; }
  .play-shell .resource-item img { width:21px; height:21px; }
  .play-shell .resource-copy strong { font-size:12px; }
  .play-shell .resource-rate { font-size:9px; }
  .play-shell .unit-type-picker { grid-template-columns:minmax(0,1fr); }
  .play-shell .movement-sidebar .support-entry { grid-template-columns:22px minmax(0,1fr); }
  .play-shell .movement-sidebar .support-entry>button { grid-column:2; grid-row:2; justify-self:start; }
  .play-shell .queue-slot-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Give the movement/support rail enough room for full village names and unit lists. */
@media(min-width:1501px) {
  .play-shell > .play-container { grid-template-columns:76px minmax(0,1fr) clamp(420px,26vw,500px); }
}
@media(min-width:1201px) and (max-width:1500px) {
  .play-shell > .play-container { grid-template-columns:64px minmax(0,1fr) clamp(370px,29vw,430px); }
}
@media(min-width:901px) and (max-width:1200px) {
  .play-shell > .play-container { grid-template-columns:60px minmax(0,1fr) clamp(320px,32vw,380px); }
}

.play-shell .village-view-heading {
  display:flex; align-items:center; gap:10px; min-width:0;
}
.play-shell .village-view-title { flex:1 1 auto; min-width:0; }
.play-shell .village-view-title h1 {
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.play-shell .village-rename-button {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  flex:0 0 auto; min-height:38px; padding:7px 10px; border:1px solid #bdd3e5;
  border-radius:9px; background:#fff; color:#315b7b; font-family:inherit; font-size:12px; font-weight:600; line-height:1.2;
  cursor:pointer; transition:background .15s ease,border-color .15s ease,color .15s ease;
}
.play-shell .village-rename-button:hover { border-color:#8db9e4; background:#edf5fd; color:#295d9b; }
.play-shell .village-rename-button svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.play-shell .village-coordinates { flex:0 0 auto; }

/* Keep training costs and controls at readable sizes across legacy responsive
   rules that previously reduced these labels to 6–9px. */
.play-shell .unit-production-compact .unit-resource-heading { font-size:12px; font-weight:800; }
.play-shell .unit-production-compact .unit-batch-resources { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.play-shell .unit-production-compact .unit-resource-cost { min-height:44px; gap:6px; padding:6px 8px; }
.play-shell .unit-production-compact .unit-resource-cost img { width:24px; height:24px; }
.play-shell .unit-production-compact .unit-resource-cost small { display:block; font-size:11px; line-height:1.2; }
.play-shell .unit-production-compact .unit-resource-cost b { font-size:15px; line-height:1.2; }
.play-shell .unit-production-compact .unit-quantity-heading { font-size:12px; font-weight:800; }
.play-shell .unit-production-compact .unit-max-button span { font-size:11px; }
.play-shell .unit-production-compact .unit-max-button b { font-size:14px; }
.play-shell .unit-production-compact .unit-train-button { min-height:44px; font-size:14px; }
.play-shell .unit-production-compact .unit-train-button b { font-size:13px; }

@media(max-width:480px) {
  .play-shell .village-view-heading { flex-wrap:wrap; gap:6px 8px; }
  .play-shell .village-view-title { flex-basis:calc(100% - 126px); }
  .play-shell .village-rename-button { min-height:36px; padding:6px 8px; }
  .play-shell .village-coordinates { margin-left:auto; }
}

/* Let support unit details use the full card width below the title/action row. */
.play-shell .movement-sidebar .support-entry {
  grid-template-columns:26px minmax(0,1fr) auto;
  grid-template-rows:auto auto;
  align-items:center;
}
.play-shell .movement-sidebar .support-entry-copy { display:contents; }
.play-shell .movement-sidebar .support-entry-copy > strong { grid-column:2; grid-row:1; min-width:0; }
.play-shell .movement-sidebar .support-entry-copy > span {
  grid-column:1/-1; grid-row:2; min-width:0; white-space:normal; overflow-wrap:anywhere;
}
.play-shell .movement-sidebar .support-entry > button { grid-column:3; grid-row:1; }

/* Keep the pre-Blazor bootstrap screen on the same light game canvas. */
html, body, #app { background:#eef5fb; }

/* Keep side rails below every modal backdrop. */
.play-shell > .play-container > .movement-sidebar { position:relative; z-index:0; }
.play-shell .game-context-rail,
.play-shell > .game-events-bottom { z-index:0; }
.play-shell .td-modal-backdrop,
.play-shell .founding-dialog-backdrop,
.play-shell .village-overview-backdrop { z-index:20000; }
#app:empty { display:block; min-height:100vh; background:radial-gradient(ellipse at 50% 25%,#f7fbff,#eaf3f9 72%,#dceaf4); }

.play-shell .player-context { flex-wrap:wrap; white-space:normal; }
.play-shell .village-production-bonus-inline { display:flex; flex:0 0 auto; align-items:center; gap:5px; padding:3px 5px 3px 8px; border:1px solid #d5e5da; border-radius:8px; background:#f2fbf5; color:#28563e; font-size:11px; font-weight:700; white-space:nowrap; }
.play-shell .village-production-bonus-inline select { max-width:170px; min-height:29px; padding:3px 6px; border:1px solid #bfd5c5; border-radius:6px; background:#fff; color:#294c3a; font:600 11px system-ui,sans-serif; }
.play-shell .village-bonus-status { color:#536b7d; font-size:10px; font-weight:400; }
@media(max-width:680px) { .play-shell .village-production-bonus-inline { flex-wrap:wrap; } .play-shell .village-production-bonus-inline select { max-width:calc(100vw - 100px); } }

.play-shell .village-overview-open { display:inline-flex; align-items:center; gap:5px; min-height:31px; padding:4px 8px; border:1px solid #c7d9e8; border-radius:8px; background:#fff; color:#315775; font:650 11px system-ui,sans-serif; white-space:nowrap; cursor:pointer; }
.play-shell .village-overview-open:hover { border-color:#8db9e4; background:#edf5fd; }
.play-shell .village-overview-open>span { color:#4680af; font-size:14px; }
.play-shell .village-overview-open>b { display:grid; place-items:center; min-width:19px; height:19px; padding:0 4px; border-radius:6px; background:#e7f0f8; color:#245987; font-size:10px; }

.play-shell .unit-queue-slot.active-slot { position:relative; padding-right:58px; }
.play-shell .queue-slot-cancel { position:absolute; top:7px; right:7px; z-index:2; min-height:27px; padding:3px 7px; border:1px solid #e7c2bc; border-radius:7px; background:#fff; color:#9c4941; font:700 10px system-ui,sans-serif; white-space:nowrap; cursor:pointer; }
.play-shell .queue-slot-cancel:hover:not(:disabled) { border-color:#d8978d; background:#fff2ef; }
.play-shell .queue-slot-cancel:disabled { opacity:.6; cursor:wait; }

.play-shell .movement-recall-attack { display:inline-flex; align-items:center; justify-content:center; min-height:27px; margin:5px 0 0 auto; padding:3px 9px; border:1px solid #e5bcb5; border-radius:7px; background:#fff8f6; color:#9b453c; font:700 11px system-ui,sans-serif; cursor:pointer; }
.play-shell .movement-recall-attack:hover:not(:disabled) { border-color:#d78e83; background:#ffefec; }
.play-shell .movement-recall-attack:disabled { opacity:.58; cursor:wait; }
.play-shell .movement-action-message { margin:6px 2px; padding:7px 9px; border:1px solid #cfe2d4; border-radius:8px; background:#f1faf3; color:#315b40; font-size:12px; line-height:1.4; }
