.map-navigation { display: flex; justify-content: center; align-items: stretch; gap: 7px; }
.mode-switch button { font-weight: 650; }
.mode-switch button[aria-pressed="true"] { background: #d9c18f29; }
.language-toggle { color: var(--gold); border-color: #ae98645e; }
:lang(en-US) .identity h1 { font-size: 1.22rem; letter-spacing: .035em; }
#map { z-index: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}
.development-mode .inspector { width: 378px; }
.development-mode .inspector-body { padding-top: 13px; }
.development-mode .inspector-body h2 { font-size: 1.61rem; }
.development-mode .inspector-body h3 { font-size: .9rem; }
.development-mode .legend { min-width: 132px; }
.game-boundary-swatch.swatch.boundary { border-top: 2px solid #ecce89; }

.development-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  margin-bottom: 17px;
  border: 1px solid var(--stroke);
  border-radius: 4px;
  background: #081c20;
}
.development-tabs button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: .84rem;
  color: var(--muted);
}
.development-tabs button[aria-pressed="true"] {
  border-color: #c2a06c82;
  background: #b78e4d32;
  color: #ffdf9e;
}
.development-tabs button:hover { color: var(--ink); }
.start-list, .project-list { display: grid; gap: 8px; margin-top: 16px; }
.opening-choices { margin-top: 12px; }
.opening-choices .start-option:disabled { opacity: .55; cursor: default; }
.opening-choices .start-option[data-dev-action="cancel"] { border-color: #d5b27580; background: #9d7a3726; }
.start-option {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #99baab48;
  border-left: 2px solid #d6af6e;
  border-radius: 3px;
  background: linear-gradient(100deg, #dee3b50f, #e0e4ca05);
  text-align: left;
}
.start-option:hover { background: #d3bb8232; border-color: #d6af6e; }
.start-option strong { font-size: .96rem; display: block; line-height: 1.3; }
.start-option small { margin-top: 4px; color: var(--muted); display: block; font-size: .79rem; }
.start-action { color: var(--gold); font-size: .81rem; white-space: nowrap; }
.campaign-library { display: grid; gap: 17px; padding-bottom: 16px; }
.campaign-library .start-list { margin-top: 0; }
.campaign-library h3 { margin: 0 0 8px; font-size: .91rem; }
.campaign-library .start-option { min-height: 48px; }
.campaign-archive summary { padding: 12px 0; color: var(--gold); cursor: pointer; }
.site-option { border-left-color: #79a89f; }
.development-facts { margin: 16px 0 12px; padding: 0 10px; border: 1px solid #b1c4a43b; border-radius: 4px; background: #e0f0da07; }
.development-facts h3 { margin: 10px 0 9px; color: #d3dec7; }
.development-facts .kv { margin: 9px 0 11px; font-size: .82rem; }
.development-facts .kv a { color: #d6e5d1; }
.development-facts .kv a:hover { color: #f4d199; }
.development-facts dd { color: #f4d199; }
.objective-table thead th { color: var(--muted); font-weight: 500; }
.objective-table tbody .met td:nth-child(2) { color: #a8dfba; }

.development-notice {
  border-left: 2px solid #d2a974;
  background: #bd957826;
  padding: 7px 10px;
}
.text-button { color: var(--gold); text-decoration: underline; text-underline-offset: .2em; text-align: left; }
.inspector-body > .text-button { font-size: .8rem; display: inline-block; margin: 0 0 12px; }
.project-card { padding: 12px; border: 1px solid #b7cbae48; border-radius: 5px; background: #071e231f; }
.development-mode .project-card h3 { margin: 0 0 4px; color: #f0dbab; font-size: 1rem; }
.development-mode .project-card p { margin: 6px 0; font-size: .83rem; line-height: 1.45; }
.development-mode .project-card .project-cost { color: var(--muted); }
.effect-tags { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 10px 0; }
.effect-tags li {
  font-size: .75rem;
  color: #cee4cc;
  background: #8cbc8c20;
  border: 1px solid #b2ccaa35;
  padding: 1px 5px;
  border-radius: 3px;
}
.project-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.project-actions small { color: var(--muted); font-size: .76rem; }
.project-actions button { min-height: 33px; }
.project-actions button:disabled { opacity: .48; cursor: not-allowed; }
.project-status { color: #ebc990; font-size: .81rem; }
.project-status.live { color: #abe3ad; }
.plot-count { padding: 7px 0; border-block: 1px solid var(--stroke); }
.turn-finance dt:nth-last-child(2), .turn-finance dd:last-child { color: #f2cd87; font-weight: 650; }
.completed-list { margin: 5px 0; padding-left: 1.35em; font-size: .85rem; }
.final-outcome { padding: 9px 11px; margin: 12px 0; border: 1px solid #c7a56777; background: #c7a56720; border-radius: 4px; }
.final-outcome strong { color: #ffdda0; font: 650 1.3rem var(--mono); margin-right: 11px; }
.final-outcome span { color: #e4cfaa; font-size: .86rem; }

.development-dock {
  position: absolute;
  left: 184px;
  right: 411px;
  bottom: 29px;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 12px;
  align-items: center;
  padding: 11px 12px;
  background: linear-gradient(135deg, #18363cf2, #0b1f24f6);
  border-top-color: #b6a37591;
}
.dock-turn { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.dock-turn strong { color: #f5d39b; font-size: 1.04rem; white-space: nowrap; }
.advance-button:disabled { opacity: .52; cursor: default; }
.dock-turn small { color: var(--muted); font-size: .77rem; }
.dock-metrics { grid-row: 2; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.dock-stat {
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid #c5d2bf2b;
  border-radius: 3px;
  background: #07181c60;
}
.dock-stat span { display: block; color: var(--muted); font-size: .73rem; }
.dock-stat strong { font: 650 1rem/1.2 var(--mono); white-space: nowrap; }
.capacity-meter { height: 3px; margin-top: 3px; overflow: hidden; border-radius: 2px; background: #b0c1b533; }
.capacity-meter i { display: block; height: 100%; border-radius: 2px; background: #97c5a3; }
.over-capacity strong { color: #ffbb93; }
.over-capacity .capacity-meter i { background: #e89370; }
.advance-button { grid-row: 1; grid-column: 2; min-height: 34px; white-space: nowrap; }

.development-pin {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  z-index: 1;
  color: var(--pin);
}
.development-pin:hover, .development-pin:focus-visible, .development-pin.selected-pin { z-index: 2; }
.pin-glyph {
  display: block;
  width: 21px;
  height: 21px;
  position: relative;
  transform: rotate(45deg);
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: #0c282a;
  box-shadow: 0 3px 9px #091820ad;
}
.pin-glyph::after {
  content: "";
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 1px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.development-pin[data-site-type="rail"] .pin-glyph::after { width: 4px; height: 11px; }
.development-pin[data-site-type="air"] .pin-glyph::after { width: 10px; height: 3px; }
.development-pin[data-site-type="city"] .pin-glyph::after { border-radius: 50%; }
.development-pin[data-site-type="energy"] .pin-glyph::after { clip-path: polygon(0 100%, 48% 0, 100% 100%); height: 11px; width: 11px; }
.pin-name {
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  min-width: max-content;
  padding: 2px 6px;
  color: #faf0d4;
  background: #10282cdd;
  border: 1px solid #d1bd833e;
  border-radius: 3px;
  font-size: .79rem;
  line-height: 1.35;
}
.start-pin .pin-name { color: #ffe1a4; font-weight: 650; }
.development-pin[data-map-marker="singapore"].start-pin .pin-name { left: 25px; transform: none; top: 10px; }
.development-pin[data-map-marker="johor"].start-pin .pin-name { left: auto; right: 26px; transform: none; top: 1px; }
.development-pin[data-map-marker="changi"] .pin-name { left: auto; right: 32px; top: 1px; transform: none; }
.development-pin[data-map-marker="qingbaijiang"] .pin-name { top: auto; bottom: calc(100% + 3px); }
.development-pin[data-map-marker="senai"] .pin-name { top: auto; bottom: calc(100% + 3px); }
.development-pin[data-map-marker="johor-bahru"] .pin-name { left: 33px; top: 0; transform: none; }
.selected-pin { box-shadow: 0 0 0 5px #ebca7b77; }
.building-pin .pin-glyph { border-style: dashed; }
.live-pin .pin-glyph { background: #31674e; box-shadow: 0 0 12px #9fecc0a1; }
.selected-pin .pin-name, .development-pin:hover .pin-name { border-color: #e8cc8e; color: #ffe3a3; }

@media (max-width: 1170px) {
  .topbar { min-height: 60px; column-gap: 10px; padding-inline: 15px; }
  .map-navigation .scenes button { padding-inline: 8px; }
  .top-actions { gap: 5px; }
  .top-action { padding-inline: 8px; }
  .development-dock { left: 160px; }
}

@media (max-width: 970px) {
  .topbar { grid-template-columns: 1fr auto; gap: 8px; padding-block: 7px; }
  .map-navigation { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; }
  .top-actions { grid-column: 2; grid-row: 1; }
  .development-dock { left: 155px; right: 337px; gap: 7px; }
  .development-mode .inspector { width: 316px; }
  .dock-turn { display: grid; gap: 0; }
  .dock-stat { padding-inline: 4px; }
  .dock-stat strong { font-size: .87rem; }
}

@media (max-width: 650px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto; padding-inline: 8px; }
  :lang(en-US) .identity h1 { font-size: .94rem; white-space: normal; }
  .seal { flex: 0 0 27px; height: 27px; }
  .top-actions .search-mark { display: none; }
  .map-navigation { width: 100%; gap: 3px; }
  .map-navigation .scenes { grid-row: auto; grid-column: auto; display: flex; gap: 1px; height: 36px; padding: 2px; }
  .map-navigation #scene-nav, .map-navigation #development-nav { flex: 1; }
  .map-navigation #scene-nav button, .map-navigation #development-nav button { flex: 1; }
  .map-navigation .scenes button { padding-inline: 5px; font-size: .7rem; white-space: normal; line-height: 1.15; }
  :lang(en-US) .layer-buttons button { font-size: .67rem; gap: 2px; }
  :lang(en-US) .layer-buttons .layer-emblem { display: none; }
  .development-mode .inspector { width: auto; max-height: 43%; }
  .development-mode .inspector-body h2 { font-size: 1.35rem; }
  .development-dock {
    top: 9px;
    bottom: auto;
    left: 9px;
    right: 9px;
    padding: 7px;
    gap: 5px;
  }
  .dock-turn { display: flex; flex-direction: column; gap: 0; }
  .dock-turn strong { font-size: .88rem; }
  .dock-turn small { font-size: .7rem; }
  .development-mode .atlas:has(.development-dock:not([hidden])) .map-left,
  .development-mode .atlas:has(.development-dock:not([hidden])) .scale-and-legend { top: calc(17px + var(--dock-height, 116px)); }
  .development-mode .scale-and-legend .legend { display: none; }
  .pin-name { font-size: .68rem; }
  .development-pin[data-map-marker="punggol"] .pin-name { top: auto; bottom: calc(100% + 4px); }
}

@media (max-width: 650px) and (max-height: 740px) {
  .development-mode .camera { grid-auto-flow: column; }
  .development-mode .camera button { width: 36px; height: 38px; }
  .development-mode .camera button + button { border-top: 0; border-inline-start: 1px solid #bacda71f; }
}
