@font-face {
  font-family: Barlow;
  src: url(../fonts/barlow-latin-400-normal.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url(../fonts/barlow-latin-600-normal.woff2) format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url(../fonts/barlow-latin-700-normal.woff2) format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url(../fonts/barlow-condensed-latin-600-normal.woff2) format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url(../fonts/barlow-condensed-latin-700-normal.woff2) format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url(../fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Black Ops One';
  src: url(../fonts/BlackOpsOne-Regular.woff2) format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0a0f17;
  --panel: #101823;
  --soft: #15202c;
  --line: #26313e;
  --text: #eff4f9;
  --muted: #9aaabd;
  --subtle: #77899e;
  --cyan: #55e2d0;
  --amber: #f5b965;
  --green: #83daa4;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --hud-heading-size: 17px;
  --hud-heading-font: 600 var(--hud-heading-size)/1.13 var(--display);
  --bar: 66px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar) + 12px);
  scrollbar-color: #344555 var(--bg);
  scrollbar-width: thin;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.45 Barlow,
    'Segoe UI',
    Arial,
    sans-serif;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.08;
}
button,
a,
input,
select {
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cyan);
}
a {
  text-decoration: none;
  color: inherit;
}
[hidden] {
  display: none !important;
}
.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  vertical-align: middle;
}
.symbol-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.muted {
  color: var(--muted);
}
.cyan {
  --tone: var(--cyan);
}
.amber {
  --tone: var(--amber);
}
.green {
  --tone: var(--green);
}
.masthead {
  --brand-size: clamp(20px, 1.6vw, 24px);
  height: var(--bar);
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 2.35vw 0 19px;
  border-bottom: 1px solid var(--line);
  background: #0d141e;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: var(--brand-size);
  line-height: 1;
  direction: ltr;
}
.brand img {
  width: 34px;
  height: 34px;
  flex: none;
  object-fit: contain;
}
.brand-wordmark, .slogan-banner.brand-slogan {
  font-family: 'Black Ops One', Barlow, 'Segoe UI', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-synthesis: none;
}
.brand-wordmark { color: #F5F7F8; }
.brand-wars { color: #20CCC4; }
.live-badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  font: 500 10px/1.2 var(--mono);
  white-space: nowrap;
}
.live-badge {
  padding: 4px 7px;
  background: #321c23;
  border: 1px solid #80353e;
  color: #ff7678;
  font-size: 9px;
  letter-spacing: 1px;
}
.live-badge i,
.dot {
  width: 6px;
  height: 6px;
  background: var(--tone, var(--cyan));
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.live-badge i {
  width: 5px;
  height: 5px;
  background: #ff484f;
  box-shadow: 0 0 6px #ff485485;
  animation: liveBlink 1.6s ease-in-out infinite;
}
@keyframes liveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}
@media (prefers-reduced-motion: reduce) {
  .live-badge i { animation: none; }
}
.lang-switcher {
  display: flex;
  direction: ltr;
  align-items: center;
  gap: 2px;
}
.masthead .lang-switcher {
  border-inline-start: 1px solid var(--line);
  margin-inline-start: 4px;
  padding-inline-start: 15px;
}
.lang-switcher button {
  font: 500 10px/1 var(--mono);
  padding: 6px 5px;
  min-width: 24px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 3px;
  background: none;
}
.lang-switcher button:hover,
.lang-switcher .active {
  color: var(--cyan);
}
.lang-switcher .active {
  border-color: #27534f;
  background: #142d30;
}
.mast-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}
.mast-actions time {
  font: 500 11px var(--mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.profile-btn,
.icon-button,
.choice,
.increments button {
  background: #182331;
  border: 1px solid #304050;
  border-radius: 5px;
  color: var(--text);
}
.profile-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
}
.profile-btn .icon {
  width: 16px;
  height: 16px;
  color: var(--cyan);
}
.profile-btn:hover,
.icon-button:hover,
.choice:hover,
.increments button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
main {
  max-width: 1840px;
  margin-inline: auto;
  padding: 26px clamp(18px, 2.25vw, 42px) 38px;
}
.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font: 500 9px/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: 1.75px;
}
.eyebrow i {
  width: 17px;
  height: 2px;
  background: var(--cyan);
}
h1 {
  font: 600 clamp(34px, 3vw, 50px) / 1 var(--display);
  letter-spacing: -0.55px;
  margin-top: 5px;
}
.summary {
  display: flex;
  align-items: center;
}
.metric {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 clamp(12px, 1.7vw, 30px);
  border-inline-start: 1px solid var(--line);
}
.metric:first-child {
  border: 0;
}
.metric:last-child {
  padding-inline-end: 0;
}
.metric-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  color: var(--tone);
  border: 1px solid color-mix(in srgb, var(--tone) 23%, transparent);
  background: color-mix(in srgb, var(--tone) 7%, #0d151f);
}
.metric-label {
  display: block;
  font: 500 9px/1.2 var(--mono);
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 1px;
}
.metric strong {
  font: 600 26px/1.15 var(--display);
  white-space: nowrap;
}
.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 2.7fr) minmax(272px, 1fr);
  gap: 18px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  min-width: 0;
  overflow: hidden;
}
.panel-head {
  height: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2,
.rank-dialog h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font: var(--hud-heading-font);
  letter-spacing: 0.1px;
}
.panel-head h2 .icon,
.rank-dialog h2 .icon {
  width: 18px;
  height: 18px;
  color: var(--cyan);
}
.icon-button {
  display: grid;
  place-items: center;
  padding: 0;
  width: 28px;
  height: 28px;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.icon-button .icon {
  width: 15px;
  height: 15px;
}
.map-panel {
  display: flex;
  flex-direction: column;
}
.legend {
  display: flex;
  align-items: center;
  gap: 13px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend b {
  color: var(--muted);
  font: 500 9px var(--mono);
}
.dot.open {
  background: #8297af;
}
.dot.amber {
  box-shadow: 0 0 5px #ecb75b42;
}
.map-stage {
  position: relative;
  isolation: isolate;
  flex: 1;
  height: clamp(345px, 27.8vw, 470px);
  min-height: 0;
  background: #0b1624;
}
.map-stage #world-map {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  direction: ltr;
}
.map-zoom {
  position: absolute;
  z-index: 2;
  bottom: 13px;
  right: 13px;
  display: flex;
  border: 1px solid #344656;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 3px 12px #0004;
}
.map-zoom button {
  border-radius: 0;
  background: #111e2b;
  color: #c8d7e6;
  width: 30px;
  height: 29px;
}
.map-zoom button + button {
  border-inline-start: 1px solid #344656;
}
.map-zoom button:hover {
  color: white;
  background: #233847;
}
#drawer-location > .flag, .reclaim-city > strong > .flag { height: 0.95em; }
.ruler-card small {
  font: 500 9px/1.5 var(--mono);
  letter-spacing: 1.15px;
  text-transform: uppercase;
  color: var(--subtle);
}
.intel {
  height: calc(53px + clamp(345px, 27.8vw, 470px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 15px;
  min-width: 0;
}
.rank-list {
  padding: 3px 15px 7px;
}
.rank-row {
  display: grid;
  grid-template-columns: 18px 29px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 37px;
}
.rank-row + .rank-row {
  border-top: 1px solid #23303c;
}
.rank-no {
  font: 500 10px var(--mono);
  color: var(--subtle);
}
.rank-row:first-child .rank-no,
.rank-row:first-child .rank-value {
  color: var(--amber);
}
.flag {
  width: 23px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px #ffffff1a;
}
.rank-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-value {
  font: 500 11px var(--mono);
  color: #d5e1ec;
}
.feed-panel {
  display: flex;
  flex-direction: column;
}
.feed-panel .panel-head {
  flex: none;
}
.feed-list {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #2e3e4d transparent;
}
.feed-panel .feed-list {
  padding: 0 16px;
  flex: 1;
}
.feed-item {
  display: flex;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid #23303c;
}
.feed-item:last-child {
  border: 0;
}
.feed-icon {
  width: 27px;
  height: 27px;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, var(--tone) 23%, transparent);
  background: color-mix(in srgb, var(--tone) 8%, transparent);
  display: grid;
  place-items: center;
  color: var(--tone);
  margin-top: 3px;
  flex: none;
}
.feed-icon .icon {
  width: 14px;
  height: 14px;
}
.feed-body {
  min-width: 0;
  flex: 1;
}
.feed-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 13px;
}
.feed-title button,
.city-link {
  background: none;
  border: 0;
  padding: 0;
  font-weight: 700;
  color: var(--text);
  text-align: start;
}
.feed-title button:hover,
.city-link:hover {
  color: var(--cyan);
}
.feed-title time,
.event-kind {
  font: 500 9px var(--mono);
  color: var(--subtle);
}
.feed-info {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.feed-info .amount {
  color: var(--tone);
  white-space: nowrap;
}
.feed-previous-owner {
  display: inline-flex;
  align-items: center;
  gap: .25em;
  max-width: 100%;
}
.feed-info .feed-transfer {
  width: 1em;
  height: 1em;
  flex: none;
  transform: rotate(180deg);
}
.signal-bars {
  display: flex;
  gap: 2px;
  height: 12px;
  direction: ltr;
  align-items: flex-end;
}
.signal-bars i {
  width: 2px;
  border-radius: 1px;
  background: var(--cyan);
  height: 35%;
}
.signal-bars i:nth-child(2) {
  height: 80%;
}
.signal-bars i:nth-child(3) {
  height: 55%;
}
.signal-bars i:nth-child(4) {
  height: 100%;
}
.fresh {
  position: relative;
  isolation: isolate;
  animation: feedEnter 1.1s ease-out;
}
.fresh::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #1a4947;
  opacity: 0;
  pointer-events: none;
  animation: feedFlash 1.1s ease-out;
}
@keyframes feedFlash {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes feedEnter {
  from { transform: translate3d(0, -4px, 0); }
  to { transform: translate3d(0, 0, 0); }
}
#flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 52% 40%, #8bf8dc42, transparent 72%);
}
.directory-panel {
  container: city-directory / inline-size;
  grid-column: 1/-1;
}
.directory-head {
  height: 60px;
  border: 0;
}
.count {
  font: 500 10px var(--mono);
  padding: 3px 7px;
  background: #1c2935;
  color: #bccbd9;
  border: 1px solid #32404e;
  border-radius: 4px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 230px;
  border: 1px solid #2d3946;
  border-radius: 5px;
  background: #0d141e;
  color: var(--subtle);
  padding: 6px 9px;
}
.search-box:focus-within {
  border-color: var(--cyan);
}
.search-box .icon {
  width: 14px;
  height: 14px;
}
.search-box input {
  border: 0;
  outline: none;
  background: none;
  min-width: 0;
  width: 100%;
  font-size: 12px;
}
.search-box input::placeholder {
  color: var(--muted);
}
.directory-head .search-box {
  inline-size: min(100%, 12.5rem);
  max-inline-size: min(100%, 12.5rem);
  align-self: flex-start;
  padding: 4px 8px;
}
.honor-push[aria-pressed="true"] {
  border-color: var(--amber);
  box-shadow: inset 0 0 0 1px var(--amber);
}
.region-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 0 18px 13px;
}
.region-tabs button, .front-country-tabs button, .front-retry {
  font: 600 12px Barlow, sans-serif;
}
.region-tabs button {
  white-space: nowrap;
  border: 1px solid #2c3845;
  background: #16202c;
  color: var(--muted);
  border-radius: 4px;
  padding: 5px 11px;
}
.region-tabs button.active,
.region-tabs button:hover,
.choice.active {
  background: #153132;
  border-color: #35615d;
  color: var(--cyan);
}
.directory-scroll {
  --city-row-height: 2.75rem;
  --city-heading-height: 2rem;
  max-height: calc(var(--city-visible-rows-height, 3 * var(--city-row-height)) + var(--city-heading-height) + var(--city-scrollbar-height, 0px));
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #344555 transparent;
  scroll-padding-block-start: var(--city-heading-height);
  scroll-snap-type: y proximity;
}
.directory-scroll thead { position: sticky; top: 0; z-index: 1; }
.directory-scroll thead tr {
  height: var(--city-heading-height);
}
.directory-scroll .city-row {
  height: var(--city-row-height);
  scroll-snap-align: start;
}
.directory-scroll .city-row td { padding-block: 4px; }
.directory-scroll table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 13px;
  white-space: nowrap;
}
th {
  font: 500 9px var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9aaabd;
  text-align: start;
  position: sticky;
  top: 0;
  z-index: 1;
  background: #141e2a;
  border-block: 1px solid var(--line);
}
th,
td {
  padding: 8px 12px;
}
th:first-child,
td:first-child {
  padding-inline-start: 18px;
}
th:last-child,
td:last-child {
  padding-inline-end: 17px;
}
td {
  border-bottom: 1px solid #222d39;
  color: var(--muted);
}
tr:last-child td {
  border: 0;
}
tbody tr:hover,
tbody tr:focus-within {
  background: #17232e;
}
tbody tr {
  cursor: pointer;
}
td.price, .front-price {
  text-align: end;
  font: 500 12px var(--mono);
  color: var(--text);
}
th.price {
  text-align: end;
}
.city-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.city-cell, .front-name, .front-single-country, .front-brief, .front-motto, .front-empty {
  line-height: 1.25;
}
.city-cell .city-places--compact { max-inline-size: 30ch; }
.city-name { display: flex; align-items: center; gap: 5px; }
.city-control-status {
  font-size: .84em;
  font-weight: 400;
  color: var(--muted);
  white-space: normal;
}
.city-control-status.foreign-control { color: #fff; }
.city-rivalry { display: inline-flex; color: var(--amber); }
.city-rivalry .icon { width: 12px; height: 12px; }
.city-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  background: #1a2633;
  color: #9eafc2;
  border: 1px solid #2a3a49;
  border-radius: 5px;
}
.city-icon .icon {
  width: 15px;
  height: 15px;
}
.city-cell .city-link, .front-name strong, .front-single-country,
.rank-name, .enemy-code, #inspected-country-badge {
  font-size: 14px;
}
.city-cell .city-link, .front-name strong, .front-single-country {
  display: block;
}
.city-country, .front-name small, .front-brief, .front-motto, .front-empty {
  font-size: 11px;
}
.city-country {
  display: block;
}
.city-row.selected .city-icon {
  color: var(--amber);
  background: #302c27;
  border-color: #574737;
}
.pill {
  font-size: 10px;
  padding: 4px 7px;
  background: #1a2632;
  border: 1px solid #2c3a48;
  color: var(--muted);
}
.pill i {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.pill.claimed {
  background: #132c2d;
  border-color: #244744;
  color: var(--cyan);
}
.city-arrow {
  width: 24px;
  text-align: end;
}
.city-arrow .icon {
  width: 14px;
  color: var(--subtle);
}
.counter-small {
  color: var(--amber);
  background: #2b2824;
  border: 1px solid #544532;
  border-radius: 3px;
  line-height: 1.3;
  font-size: 9px;
  padding: 3px 5px;
  margin-inline-start: 5px;
}
.feed-info .counter-small {
  margin: 4px 0 0;
  display: block;
}
#no-results,
.empty {
  color: var(--muted);
  padding: 20px;
  text-align: center;
}
.load-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #705537;
  padding: 10px;
  margin-bottom: 12px;
}
.load-status button {
  background: none;
  color: var(--cyan);
  border: 0;
}
dialog {
  background: #121d29;
  color: var(--text);
  border: 1px solid #374a5b;
  border-radius: 10px;
  box-shadow: 0 24px 90px #0009;
  padding: 22px;
  max-height: calc(100dvh - 28px);
  overflow: auto;
  scrollbar-width: thin;
}
dialog::backdrop {
  background: #050910a8;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font: 600 31px var(--display);
}
.drawer {
  width: min(400px, calc(100% - 24px));
  margin: auto 18px auto auto;
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
}
.dialog-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font: normal 400 12px/1.5 'Black Ops One', Barlow, 'Segoe UI', sans-serif;
  font-synthesis: none;
  letter-spacing: 1.15px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  color: var(--cyan);
}
.dialog-label .icon {
  flex: none;
  width: 15px;
  height: 15px;
}
.dialog-top .icon-button {
  border-color: var(--line);
  background: #182431;
}
.drawer .muted {
  font-size: 13px;
}
.ruler-card {
  margin-top: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0e1720;
}
.ruler-card strong,
.ruler-card small {
  display: block;
}
.ruler-card small {
  font-size: 14px;
}
.ruler-card strong {
  font-size: 15px;
}
.ruler-card #drawer-ruler-meta {
  color: var(--muted);
  font-size: 12px;
}
.value-line,
.split-preview > div,
.radar-kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.value-line {
  padding: 10px 1px;
  color: var(--muted);
  font-size: 13px;
}
.value-line strong {
  font: 500 14px var(--mono);
  color: var(--amber);
}
.rivalry {
  display: grid;
  gap: 7px;
  border: 1px solid #5b4833;
  border-radius: 5px;
  background: #2a271f;
  color: #f4c27c;
  padding: 10px;
  font-size: 12px;
  margin-bottom: 12px;
}
.rivalry > span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.rivalry .icon {
  width: 15px;
  height: 15px;
}
.rivalry button {
  border: 0;
  text-align: start;
  background: transparent;
  color: var(--amber);
  font-weight: 700;
  font-size: 12px;
  padding: 0;
}
.drawer label,
.auth-dialog label,
legend {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: #bdcad8;
  margin: 0 0 5px;
}
.amount-field,
.auth-dialog input,
.auth-dialog select {
  border: 1px solid #364655;
  border-radius: 5px;
  background: #0d1620;
}
.amount-field {
  display: flex;
  align-items: center;
}
.amount-field > span {
  padding: 0 10px;
  font: 500 10px var(--mono);
  color: var(--muted);
}
.amount-field input {
  padding: 8px 10px;
  outline-offset: 0;
  background: none;
  border: 0;
  font: 500 17px var(--mono);
  min-width: 0;
  width: 100%;
}
.increments,
.payments,
.mode-grid {
  display: grid;
  gap: 6px;
}
.increments,
.payments {
  grid-template-columns: repeat(3, 1fr);
}
.increments {
  margin: 6px 0 14px;
}
.increments button,
.choice {
  padding: 6px;
  font-size: 12px;
}
.choice .icon {
  width: 15px;
  height: 15px;
}
.choice {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.split-preview {
  padding: 11px 10px;
  background: #0e1720;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  margin: 12px 0;
}
.split-preview > div + div {
  margin-top: 4px;
}
.split-preview b {
  color: var(--text);
  font: 500 12px var(--mono);
}
.cta {
  width: 100%;
  background: var(--cyan);
  color: #0a2425;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 10px 13px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
}
.cta:hover:enabled {
  background: #88eede;
}
.cta .icon {
  width: 16px;
  height: 16px;
}
.demo-note,
.auth-subtitle {
  color: var(--muted);
  font-size: 12px;
}
.demo-note {
  text-align: center;
  margin-top: 7px;
}
.form-error {
  font-size: 13px;
  color: #ffd396;
  margin: 6px 0;
}
.form-error:empty {
  display: none;
}
.auth-dialog {
  width: min(760px, calc(100% - 24px));
}
.auth-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr;
  gap: 25px;
}
.auth-subtitle {
  margin: 6px 0 14px;
}
.auth-dialog input,
.auth-dialog select {
  display: block;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 11px;
}
.mode-grid {
  grid-template-columns: repeat(2, 1fr);
}
.mode-card {
  display: grid;
  gap: 3px;
  background: #0e1720;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: start;
  padding: 10px;
  color: var(--muted);
}
.mode-card .icon {
  width: 17px;
  height: 17px;
  margin-bottom: 4px;
}
.mode-card b {
  font-size: 13px;
  color: var(--text);
}
.mode-card small {
  font-size: 11px;
}
.mode-card.selected {
  background: #15302f;
  border-color: #3c7067;
}
.mode-card.selected .icon {
  color: var(--cyan);
}
#save-auth-btn {
  margin-top: 14px;
}
.auth-radar {
  background: #0d1822;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  padding: 13px;
  display: flex;
  flex-direction: column;
  max-height: 440px;
}
.auth-radar h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 600 18px var(--display);
}
.auth-radar h3 .icon {
  color: var(--cyan);
}
.radar-screen {
  height: 95px;
  flex: none;
  margin: 10px 0;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    repeating-radial-gradient(circle at center, #4ab7aa36 0 1px, transparent 1px 17px),
    linear-gradient(transparent 49%, #3a8a8a45 50%, transparent 51%),
    linear-gradient(90deg, transparent 49%, #3a8a8a45 50%, transparent 51%), #0b1b23;
  border: 1px solid #263d43;
  border-radius: 4px;
}
.radar-screen i {
  width: 135px;
  height: 135px;
  border-radius: 50%;
  background: conic-gradient(from 65deg, transparent 70%, #48e4bc38 99%, #70e7c9 100%);
  animation: sweep 4s linear infinite;
}
@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}
.radar-kpi {
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 7px;
}
.radar-kpi b {
  font: 500 12px var(--mono);
  color: var(--cyan);
}
.rank-dialog {
  width: min(400px, calc(100% - 24px));
}
.rank-dialog .rank-row {
  height: 42px;
}
.toast {
  position: fixed;
  z-index: 15;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  bottom: 22px;
  padding: 10px 15px;
  border: 1px solid #3b605a;
  border-radius: 6px;
  color: #c4f8e8;
  background: #152d2b;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  box-shadow: 0 4px 20px #0008;
}
.toast .icon {
  width: 16px;
  height: 16px;
}
[dir='rtl'] main {
  padding-inline-start: 2.25vw;
  padding-inline-end: 2.25vw;
}
[dir='rtl'] .drawer {
  margin: auto auto auto 18px;
}
@media (min-width: 1700px) {
  main {
    padding-top: 34px;
  }
  .overview-head {
    margin-bottom: 31px;
  }
  .rank-row {
    min-height: 44px;
  }
  .feed-item {
    padding: 14px 0;
  }
}
@media (max-width: 1100px) {
  :root { --hud-heading-size: 15px; }
  .dashboard {
    grid-template-columns: minmax(0, 2.1fr) minmax(255px, 1fr);
    gap: 13px;
  }
  .metric {
    padding-inline: 12px;
  }
  .metric-icon {
    width: 30px;
    height: 30px;
  }
  .panel-head {
    padding-inline: 13px;
  }
  .legend {
    gap: 8px;
  }
  .rank-list,
  .feed-panel .feed-list {
    padding-inline: 12px;
  }
}
@media (max-width: 780px) {
  :root {
    --bar: 59px;
  }
  .masthead {
    --brand-size: 19px;
    padding-inline: 13px;
    gap: 8px;
  }
  .brand {
    gap: 7px;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .masthead .lang-switcher {
    padding-inline-start: 6px;
    margin: 0;
  }
  .mast-actions {
    gap: 8px;
  }
  .mast-actions time {
    display: none;
  }
  .overview-head {
    align-items: flex-end;
  }
  .metric {
    padding-inline: 8px;
    gap: 6px;
  }
  .metric-icon {
    display: none;
  }
  .metric strong {
    font-size: 23px;
  }
  .metric-label {
    font-size: 8px;
  }
  .dashboard {
    grid-template-columns: minmax(0, 1fr);
  }
  .intel {
    grid-row: 3;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 215px;
    height: auto;
  }
  .directory-panel {
    grid-row: 2;
  }
  .map-stage {
    min-height: clamp(260px, 45vw, 345px);
  }
  main {
    padding: 20px 13px;
  }
  .overview-head {
    margin-bottom: 16px;
  }
}
@media (max-width: 550px) {
  :root {
    --bar: 81px;
  }
  .masthead {
    --brand-size: clamp(16px, 4.2vw, 19px);
    height: var(--bar);
    flex-wrap: wrap;
    align-content: center;
    gap: 0 8px;
  }
  .masthead .lang-switcher {
    order: 4;
    flex-basis: 100%;
    border: 0;
    padding: 4px 0 0;
    gap: 4px;
  }
  .lang-switcher button {
    padding: 4px 5px;
  }
  .profile-btn {
    font-size: 11px;
    padding: 5px 7px;
    max-width: 36vw;
    overflow: hidden;
    white-space: nowrap;
  }
  .overview-head {
    display: block;
  }
  .page-heading h1 {
    font-size: 35px;
  }
  .summary {
    justify-content: space-between;
    margin-top: 15px;
    border-block: 1px solid var(--line);
    padding: 9px 0;
  }
  .metric {
    padding-inline: 10px;
    gap: 7px;
  }
  .metric:first-child {
    padding-inline-start: 0;
  }
  .metric-icon {
    display: grid;
    width: 27px;
    height: 27px;
  }
  .metric-icon .icon {
    width: 14px;
    height: 14px;
  }
  .metric strong {
    font-size: 21px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .metric-label {
    font-size: 7px;
  }
  .panel-head h2 {
    gap: 6px;
  }
  .panel-head h2 .icon {
    width: 16px;
  }
  .panel-head {
    height: 44px;
    padding-inline: 10px;
  }
  .legend {
    gap: 5px;
  }
  .legend b {
    font-size: 8px;
  }
  .legend .dot {
    height: 4px;
    width: 4px;
  }
  .map-stage {
    min-height: 262px;
  }
  .map-zoom {
    right: 7px;
    bottom: 7px;
  }
  .map-zoom button {
    height: 26px;
    width: 26px;
  }
  .intel {
    grid-template-columns: 1fr;
    grid-template-rows: auto 250px;
  }
  .directory-head {
    height: auto;
    align-items: stretch;
    flex-direction: column;
    padding: 12px 10px 8px;
  }
  .search-box {
    width: 100%;
  }
  .region-tabs {
    padding: 0 10px 9px;
  }
  .directory-scroll th,
  .directory-scroll td {
    padding: 7px;
  }
  .directory-scroll th:first-child,
  .directory-scroll td:first-child {
    padding-inline-start: 10px;
  }
  .directory-scroll th:nth-child(2),
  .directory-scroll td:nth-child(2),
  .directory-scroll th:nth-child(4),
  .directory-scroll td:nth-child(4),
  .directory-scroll th:last-child,
  .directory-scroll td:last-child {
    display: none;
  }
  .city-icon {
    display: none;
  }
  .counter-small {
    display: block;
    margin: 4px 0 0;
    max-width: 110px;
    white-space: normal;
  }
  .drawer {
    margin: auto;
    width: calc(100% - 18px);
  }
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .auth-radar {
    max-height: 215px;
  }
  .radar-screen {
    height: 45px;
  }
  .dialog-top {
    margin-bottom: 4px;
  }
  dialog {
    padding: 14px;
  }
  .drawer[open] {
    margin: auto;
  }
  .toast {
    min-width: 65%;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::after,
  *::before {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* The desktop map follows the repository's floating directory, standings, feed and command dock. */
:root {
  --panel-left: clamp(245px, 19vw, 283px);
  --panel-right: clamp(225px, 18vw, 275px);
}
.command-dock {
  position: fixed;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  bottom: 15px;
  z-index: 6;
  display: flex;
  gap: 4px;
  align-items: center;
  background: #101924f5;
  border: 1px solid #34404d;
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 6px 20px #04081166;
}
.dock-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: #b6c4d2;
  cursor: pointer;
  padding: 7px 12px;
  font: 600 14px var(--display);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dock-item .icon {
  width: 15px;
  height: 15px;
}
.dock-item.active,
.dock-item:hover {
  background: #382624;
  border-color: #76423d;
  color: #ffa399;
}
.compact-owner {
  display: none;
}
.honor-push {
  display: block;
  border: 1px solid #5d4830;
  color: #f2c484;
  background: #29251f;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  margin: 6px 0;
}
.drawer {
  position: fixed;
  inset-block: calc(var(--bar) + 10px) auto;
  inset-inline: auto 16px;
  margin: 0 !important;
  z-index: 8;
  max-height: calc(100dvh - var(--bar) - 24px);
  box-shadow: 0 8px 50px #0009;
}
.drawer[open] {
  animation: drawerIn 0.2s ease-out;
}
@keyframes drawerIn {
  from {
    transform: translateX(8px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.radar-screen {
  height: 125px;
  position: relative;
  background:
    repeating-radial-gradient(circle at center, #49928942 0 1px, transparent 1px 23px),
    linear-gradient(transparent 49.5%, #478b8d55 50%, transparent 50.5%),
    linear-gradient(90deg, transparent 49.5%, #478b8d55 50%, transparent 50.5%), #0b1922;
}
.radar-screen i {
  position: absolute;
  width: 120%;
  height: auto;
  aspect-ratio: 1;
  opacity: 0.86;
}
.radar-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 9px;
}
.radar-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  background: #14222c;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 4px;
}
.radar-stats b {
  color: var(--amber);
  font: 500 11px var(--mono);
}
.radar-stats span {
  color: var(--muted);
  font-size: 10px;
}
.cta {
  background: #ff7569;
  color: #231313;
}
.cta:hover:enabled {
  background: #ff9285;
}
.auth-dialog {
  border-top: 2px solid #cc6c5b;
}
.auth-dialog .dialog-top {
  margin-bottom: 8px;
}
@media (min-width: 1101px) {
  html,
  body {
    overflow: hidden;
  }
  .masthead {
    background: #0c141cf5;
  }
  .overview-head {
    display: none;
  }
  .dashboard {
    display: contents;
  }
  main {
    padding: 0;
  }
  .panel {
    background: #101923f5;
    box-shadow: 0 5px 22px #07101c44;
  }
  .map-panel {
    position: fixed;
    inset: var(--bar) 0 0;
    border-radius: 0;
    border: 0;
    background: #0a1522;
    z-index: 0;
  }
  .map-stage {
    position: absolute;
    inset: 0;
    height: auto;
  }
  .map-zoom {
    bottom: 18px;
    right: auto;
    inset-inline-end: calc(var(--panel-right) + 35px);
  }
  .directory-panel,
  .rank-panel,
  .feed-panel {
    position: fixed;
    z-index: 2;
  }
  .directory-panel {
    top: calc(var(--bar) + 16px);
    inset-inline-start: 16px;
    width: var(--panel-left);
    max-height: calc(100dvh - var(--bar) - 38px);
    display: flex;
    flex-direction: column;
  }
  .directory-head {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 11px;
    padding: 13px 13px 9px;
  }
  .directory-head .count {
    margin-inline-start: auto;
  }
  .search-box {
    width: 100%;
  }
  .directory-panel .region-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 13px 11px;
    flex-shrink: 0;
  }
  .region-tabs button {
    padding: 3px 6px;
  }
  .region-tabs button, .front-country-tabs button, .front-retry {
    font-size: 11px;
  }
  .directory-scroll {
    --city-heading-height: 0px;
    min-height: 0;
  }
  .directory-scroll thead {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .directory-scroll td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--line);
  }
  .directory-scroll td:first-child {
    padding-inline-start: 12px;
  }
  .directory-scroll td.price {
    padding-inline-end: 12px;
    width: 1%;
    vertical-align: middle;
  }
  .directory-scroll td.price, .front-price { font-size: 11px; }
  .directory-scroll td:nth-child(2),
  .directory-scroll td:nth-child(3),
  .directory-scroll td:nth-child(4),
  .directory-scroll td:last-child {
    display: none;
  }
  .city-cell {
    gap: 7px;
  }
  .city-icon {
    width: 25px;
    height: 25px;
  }
  .city-country {
    display: none;
  }
  .compact-owner {
    display: block;
    color: var(--muted);
    font-size: 11px;
  }
  .city-row.selected {
    background: #252620;
  }
  .city-link {
    font-size: 13px;
  }
  .directory-scroll tbody tr:first-child td {
    border-top: 1px solid var(--line);
  }
  .intel {
    display: contents;
  }
  .rank-panel,
  .feed-panel {
    inset-inline-end: 16px;
    width: var(--panel-right);
  }
  .rank-panel {
    top: calc(var(--bar) + 16px);
  }
  .feed-panel {
    bottom: 18px;
    max-height: min(38dvh, 325px);
  }
  .rank-panel .panel-head,
  .feed-panel .panel-head {
    height: 44px;
  }
  .rank-panel .panel-head,
  .feed-panel .panel-head,
  .feed-panel .feed-list,
  .rank-panel .rank-list {
    padding-inline: 12px;
  }
  .rank-row {
    grid-template-columns: 14px 23px minmax(0, 1fr) auto;
    gap: 6px;
  }
  .feed-panel:focus {
    outline: 1px solid var(--cyan);
    outline-offset: 2px;
  }
  .drawer {
    inset-inline-end: calc(var(--panel-right) + 32px);
    inset-block-start: calc(var(--bar) + 16px);
    max-height: calc(100dvh - var(--bar) - 40px);
  }
  .load-status {
    position: fixed;
    top: calc(var(--bar) + 60px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    gap: 14px;
    background: var(--panel);
  }
}
@media (max-width: 1100px) {
  main {
    padding-bottom: 80px;
  }
  .drawer {
    inset-inline-end: 12px;
  }
  .command-dock {
    bottom: 10px;
  }
}
@media (max-width: 550px) {
  .drawer {
    inset: calc(var(--bar) + 5px) 9px auto;
    max-height: calc(100dvh - var(--bar) - 15px);
  }
  .auth-radar {
    max-height: 260px;
  }
  .radar-screen {
    height: 60px;
  }
  .dock-item {
    padding: 6px 10px;
  }
  .radar-stats {
    padding-bottom: 4px;
  }
}
@media (max-width: 350px) {
  .metric-icon {
    display: none;
  }
  .metric {
    padding-inline: 6px;
  }
  .legend {
    gap: 3px;
  }
  .legend b {
    font-size: 7px;
  }
}
[dir='rtl'] .command-dock {
  transform: translateX(50%);
}
#topbar-anchor.reserved {
  height: var(--bar);
}
.auth-dialog {
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: calc(var(--bar) + 14px) 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.auth-dialog[open] {
  display: flex;
  align-items: safe center;
  justify-content: center;
}
.auth-dialog > .masthead {
  position: fixed;
  inset: 0 0 auto;
  height: var(--bar);
}
.auth-card {
  width: min(780px, 100%);
  max-height: calc(100dvh - var(--bar) - 28px);
  overflow: auto;
  scrollbar-width: thin;
  background: #121d29;
  border: 1px solid #374a5b;
  border-top: 2px solid #cc6c5b;
  border-radius: 10px;
  box-shadow: 0 24px 90px #0009;
  padding: 22px;
}
.auth-card h2:focus {
  outline: 0;
}
.auth-radar .feed-item {
  padding-block: 9px;
}
@media (max-width: 550px) {
  .auth-card {
    padding: 14px;
  }
  .auth-dialog > .masthead {
    position: fixed;
  }
}
@media (prefers-reduced-motion: reduce) {
  .drawer[open] {
    animation: none;
  }
}
.ruler-avatar {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  border: 1px solid #786343;
}
.radar-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}
.radar-map > * { pointer-events: none; }
.radar-zoom { display: inline-flex; gap: 2px; }
.radar-zoom .icon-button { border: 1px solid var(--line); }
.radar-zoom .icon-button:disabled { opacity: .4; }
@media (max-width: 768px), (pointer: coarse) {
  .radar-zoom .icon-button { width: 44px; height: 44px; }
}
.radar-map image {
  opacity: 0.78;
}
.radar-map circle {
  fill: var(--cyan);
  stroke: #bff8e7;
  stroke-width: 2;
  filter: drop-shadow(0 0 6px #51e9cb);
}
.radar-map circle.selected {
  fill: var(--amber);
  stroke: #fce2a8;
}
.auth-radar h3 .live-badge {
  margin-inline-start: auto;
}
.radar-screen i {
  pointer-events: none;
}
.rivalry-inline {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: var(--amber);
}
.rivalry-inline + .counter-small {
  margin-inline-start: 0;
}
.event-action {
  color: var(--tone);
}
.start-label { display: block; font: 400 10px Barlow, sans-serif; color: var(--muted); }

.identity {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  max-width: 100%;
  vertical-align: baseline;
}
.identity bdi { overflow-wrap: anywhere; min-width: 0; }
.flag {
  display: inline-block;
  object-fit: contain;
  width: auto;
  height: 15px;
  max-width: 31px;
  vertical-align: middle;
  flex: none;
  border-radius: 1px;
}
.identity .flag, #drawer-ruler-meta .flag, #rivalry-text .flag {
  height: .94em;
  max-width: 2.1em;
}
.rank-row .flag { max-width: 100%; justify-self: start; }
#profile-caption { min-width: 0; }
#profile-caption .identity { max-width: 100%; }
#profile-caption .identity bdi { overflow: hidden; text-overflow: ellipsis; }
.origin-field { margin: 0 0 11px; }
#country-picker { position: relative; }
#country-picker summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  padding: 8px 10px;
  background: #0d1620;
  border: 1px solid #364655;
  border-radius: 5px;
  list-style: none;
}
#country-picker summary::-webkit-details-marker { display: none; }
#country-picker summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
#country-picker summary .icon { width: 14px; height: 14px; color: var(--muted); }
#country-picker[open] summary .icon { transform: rotate(180deg); }
#auth-origin-current { display: inline-flex; align-items: center; gap: 8px; }
.origin-menu {
  margin-block-start: 3px;
  background: #14212d;
  border: 1px solid #394c5b;
  border-radius: 5px;
  padding: 5px;
}
#origin-search { margin: 0 0 4px; }
.origin-options {
  display: grid;
  max-height: min(220px, 32dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.origin-options button {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  text-align: start;
  gap: 8px;
  padding: 7px;
  background: none;
  border: 0;
  border-radius: 3px;
}
.origin-options button.active, .origin-options button:hover, .origin-options button:focus-visible {
  color: var(--cyan);
  background: #1c3639;
}
.origin-options .flag { justify-self: center; max-width: 32px; }
@media (pointer: coarse) { .origin-options button { min-height: 44px; } }
@media (max-width: 550px) {
  .profile-btn { min-width: 0; }
  .identity .flag { max-width: 1.8em; }
}

.slogan-banner {
  min-width: 0;
  margin: 0;
  text-align: center;
  text-wrap: balance;
  font-size: var(--brand-size);
  line-height: 1.2;
  color: #ccdcdf;
}
.ranking-stack { display: grid; align-content: start; gap: 10px; min-width: 0; }
.rank-list {
  --rank-row-height: 37px;
  padding-block: 0;
  block-size: calc(var(--rank-row-height) * 3);
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #506471 transparent;
}
.rank-list .rank-row { block-size: var(--rank-row-height); min-block-size: var(--rank-row-height); }
button.rank-row {
  width: 100%;
  background: transparent;
  border: 0;
  padding-inline: 4px;
  text-align: start;
}
button.rank-row + button.rank-row { border-top: 1px solid #23303c; }
button.rank-row:hover, button.rank-row[aria-pressed="true"] { background: #182d34; }
button.rank-row[aria-pressed="true"] { box-shadow: inset 2px 0 var(--cyan); }
[dir="rtl"] button.rank-row[aria-pressed="true"] { box-shadow: inset -2px 0 var(--cyan); }
button.rank-row:focus-visible { outline-offset: -2px; }
.influence-panel .panel-head { padding-inline: 12px; min-height: 42px; height: auto; padding-block: 7px; gap: 6px; }
#inspected-country-badge { flex: none; display: inline-flex; align-items: center; gap: 4px; max-width: 42%; line-height: 1.16; overflow-wrap: anywhere; }
#inspected-country-badge .flag { height: 15px; }
#enemy-influence-bars { padding: 6px 12px; max-height: 88px; overflow: auto; scrollbar-width: thin; }
.enemy-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 8px; min-height: 29px; }
.enemy-code { display: flex; align-items: center; gap: 6px; min-width: 0; line-height: 1.15; }
.enemy-code > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.enemy-code .flag { height: 12px; max-width: 24px; }
.enemy-track {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 17px;
  position: relative;
  isolation: isolate;
  background: #101923;
  border: 1px solid #324350;
  border-radius: 3px;
  overflow: hidden;
}
.enemy-fill { position: absolute; z-index: -1; inset-block: 0; inset-inline-start: 0; background: #53515f; transition: width .3s ease-out; }
.enemy-fill.red { background: #874b43; }
.enemy-fill.blue { background: #205674; }
.enemy-label { color: #edf4f9; font: 500 10px/1.15 var(--mono); text-align: center; overflow-wrap: anywhere; }

#defense-boost-panel { display: grid; gap: 8px; margin-block-start: 9px; }
.boost-console, .defenders-panel {
  min-width: 0;
  border: 1px solid #3c6774;
  border-radius: 8px;
  background: linear-gradient(150deg, #1b2d3b, #111e2c 55%, #101a25);
}
.boost-console { padding: 12px; }
#boost-city-title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--cyan); font: 600 18px/1.15 var(--display); }
#boost-city-title .icon { width: 16px; height: 16px; }
.boost-price { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.boost-price bdi { color: var(--amber); font: 600 14px/1.2 var(--mono); }
.boost-price > span { font-size: 12px; color: var(--muted); }
#boost-value-rule { display: block; margin-block: 3px 10px; color: var(--muted); font: 400 12px/1.35 Barlow, sans-serif; }
.shield-summary { display: flex; justify-content: space-between; gap: 9px; font-size: 12px; }
.shield-summary + .shield-summary { margin-block-start: 4px; }
.shield-summary b { color: var(--cyan); font-family: var(--mono); font-size: 11px; }
#boost-shield-meter { height: 10px; overflow: hidden; margin-block: 5px 14px; border: 1px solid #355b64; border-radius: 4px; background: #07131d; }
#boost-shield-fill { height: 100%; width: 0; background: linear-gradient(90deg,#07848e,#4fdfc8 72%,#ebcd7f); }
.boost-amount-picker {
  padding: 11px 14px;
  border: 1px solid #355661;
  background: #142833;
  border-radius: 6px;
}
.boost-amount-heading, .boost-amount-limits { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.boost-amount-heading label {
  color: #e2edf1;
  font: 600 15px/1.25 Barlow, sans-serif;
}
.boost-amount-field {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-inline-start: 5px;
  border: 1px solid #355661;
  border-radius: 4px;
  background: var(--bg);
  color: var(--cyan);
}
#boost-amount {
  inline-size: 5.5ch;
  padding: 3px 0;
  background: transparent;
  border: 0;
  color: var(--cyan);
  font: 700 clamp(24px, 4.8vw, 30px)/1 var(--display);
  font-variant-numeric: tabular-nums;
  text-align: end;
  appearance: textfield;
}
#boost-amount::-webkit-inner-spin-button, #boost-amount::-webkit-outer-spin-button { appearance: none; }
#boost-clear-amount { display: grid; place-items: center; background: transparent; color: var(--muted); border: 0; min-inline-size: 32px; min-block-size: 36px; }
.boost-add-buttons { display: flex; gap: 6px; margin-block-start: 9px; }
.boost-add-buttons .choice { flex: 1; min-width: 0; min-height: 36px; color: var(--cyan); direction: ltr; touch-action: manipulation; }
.boost-add-buttons button:disabled, #boost-clear-amount:disabled { opacity: .45; }
@media (pointer: coarse) {
  .boost-add-buttons .choice, #boost-clear-amount { min-height: 44px; }
  #boost-clear-amount { min-width: 44px; }
}
#boost-amount-hint { margin-block-start: 6px; color: #ffaaa1; font-size: 12px; }
#boost-range {
  display: block;
  inline-size: 100%;
  block-size: 44px;
  margin: 0;
  accent-color: var(--cyan);
  cursor: pointer;
  touch-action: pan-y;
  outline-offset: 0;
}
#boost-range:disabled { cursor: default; }
.boost-amount-limits { color: var(--muted); font: 500 11px/1.35 var(--mono); }
#boost-step-hint { margin-block-start: 7px; color: var(--muted); font-size: 12px; }
.boost-console .demo-note { margin: 8px 0 0; }
#boost-languages { justify-content: center; margin-top: 7px; }
.boost-console .form-error:empty { display: none; }
#boost-error.success { color: var(--cyan); }
.defenders-panel { padding: 13px; border-color: #394b58; background: #121e2a; }
.defenders-panel h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 13px; font: 600 18px/1.1 var(--display); }
.defenders-panel h3 .icon { height: 16px; width: 16px; color: var(--cyan); }
.defenders-panel .count { margin-inline-start: auto; }
.defenders-city, .defenders-ruler { display: flex; align-items: center; gap: 6px; }
.defenders-city { font-size: 14px; font-weight: 600; }
.defenders-ruler { color: var(--muted); font-size: 11px; flex-wrap: wrap; margin-block: 4px 9px; }
.defenders-ruler .flag { height: 11px; }
#defenders-list, #drawer-defenders-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  scrollbar-width: thin;
}
#defenders-list { max-height: min(260px, 38dvh); }
.defender-list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
  border-block-start: 1px solid var(--line);
}
.defender-list-item > .player-socials { margin-inline-start: auto; }
.defender-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  flex: 1 1 160px;
  min-width: 0;
  min-height: 44px;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: start;
  line-height: 1.25;
}
.defender-row:is(:hover, :focus-visible) { background: #1c303b; }
.defender-row:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.defender-avatar, #defender-profile-avatar {
  display: block;
  width: 30px;
  height: 30px;
  border: 1px solid #405361;
  border-radius: 50%;
  object-fit: cover;
}
.defender-initials {
  --avatar-ink: #9ee5d4;
  --avatar-bg: #183b37;
  display: grid;
  place-items: center;
  background: var(--avatar-bg);
  color: var(--avatar-ink);
  border-color: color-mix(in srgb, var(--avatar-ink) 30%, var(--avatar-bg));
  font: 700 12px/1 Barlow, sans-serif;
}
.defender-initials[data-tone="1"] { --avatar-ink: #b1d7ff; --avatar-bg: #223d57; }
.defender-initials[data-tone="2"] { --avatar-ink: #e8c3ff; --avatar-bg: #43304e; }
.defender-initials[data-tone="3"] { --avatar-ink: #ffd39c; --avatar-bg: #4d382b; }
.defender-initials[data-tone="4"] { --avatar-ink: #f6bbcf; --avatar-bg: #492d3e; }
.defender-initials[data-tone="5"] { --avatar-ink: #d2e39f; --avatar-bg: #35402b; }
.defender-name { display: grid; justify-items: start; min-width: 0; gap: 2px; font-size: 13px; font-weight: 600; }
.defender-name .identity { max-width: 100%; }
.defender-name .identity bdi { overflow-wrap: anywhere; white-space: normal; }
.defender-name small { color: var(--muted); font: 400 11px/1.2 Barlow, sans-serif; text-transform: none; letter-spacing: normal; }
.defender-amount { display: grid; gap: 2px; color: var(--cyan); font: 500 11px/1.3 var(--mono); text-align: end; }
@media (min-width: 1101px) {
  .ranking-stack {
    position: fixed;
    z-index: 2;
    inset-block-start: calc(var(--bar) + 16px);
    inset-inline-end: 16px;
    inline-size: var(--panel-right);
  }
  .ranking-stack .rank-panel { position: static; width: auto; }
  .feed-panel { max-height: min(38dvh, max(95px, calc(100dvh - var(--bar) - 330px)), 325px); }
}
@media (min-width: 1040px) {
}
@media (max-width: 1100px) {
  .overview-head { display: none; }
  .mast-actions time { display: none; }
  .ranking-stack { gap: 8px; }
  .intel { gap: 8px; }
}
@media (max-width: 780px) {
  :root { --bar: 100px; }
  .masthead { height: var(--bar); flex-wrap: wrap; align-content: center; gap: 2px 8px; }
  .slogan-banner { order: 5; flex-basis: 100%; border: 0; padding: 2px 0; }
  main { padding-block-start: 8px; }
  .dashboard { gap: 8px; }
  .intel { grid-row: 2; grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-rows: auto; height: auto; align-items: stretch; }
  .intel .feed-list { max-height: 246px; }
  .directory-panel { grid-row: 3; }
  .map-stage { min-height: clamp(188px, 29dvh, 280px); }
}
@media (max-width: 550px) {
  /* Reserve room for two slogan lines in longer translations. */
  :root { --bar: clamp(106px, calc(80px + 7vw), 116px); }
  .masthead {
    display: grid;
    grid-template-columns: auto auto minmax(0,1fr);
    grid-template-areas: "brand live profile" "language language language" "slogan slogan slogan";
    gap: 2px 6px;
  }
  .masthead .brand { grid-area: brand; }
  .masthead > .live-badge { grid-area: live; }
  .masthead .mast-actions { grid-area: profile; min-width: 0; max-width: 100%; justify-self: end; }
  .masthead .profile-btn { min-width: 0; max-width: 100%; }
  #profile-caption { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .masthead .lang-switcher { grid-area: language; padding-block-start: 1px; }
  .slogan-banner { grid-area: slogan; font-size: clamp(12px, 3.9vw, var(--brand-size)); }
  .intel { gap: 6px; }
  .ranking-stack { gap: 6px; }
  .rank-list { --rank-row-height: 33px; padding-inline: 5px; }
  .rank-panel .panel-head, .feed-panel .panel-head, .influence-panel .panel-head { padding: 6px 7px; min-height: 35px; height: auto; gap: 4px; }
  .intel .panel-head h2 { overflow-wrap: anywhere; }
  .intel .panel-head h2 .icon { display: none; }
  .rank-panel .icon-button { width: 23px; height: 23px; flex: none; }
  .rank-list .rank-row { grid-template-columns: 12px 18px minmax(0,1fr) auto; gap: 3px; }
  .rank-row .flag { height: 11px; }
  .rank-list .rank-value, .rank-list .rank-no { font-size: 9px; }
  #inspected-country-badge .flag { height: 11px; }
  #enemy-influence-bars { padding: 4px 6px; max-height: 73px; }
  .enemy-bar-row { gap: 4px; min-height: 27px; }
  .enemy-code { gap: 3px; }
  .enemy-code .flag { height: 9px; }
  .enemy-label { font-size: 8px; }
  .intel .feed-list { padding-inline: 6px; max-height: 215px; }
  .intel .feed-item { padding-block: 6px; gap: 3px; }
  .intel .feed-icon { display: none; }
  .intel .feed-title { gap: 3px; flex-wrap: wrap; }
  .intel .feed-info { font-size: 10px; }
  .boost-console, .defenders-panel { padding: 12px; }
  #defenders-list { max-height: 22dvh; }
}
@media (prefers-reduced-motion: reduce) {
  .enemy-fill { transition: none; }
}
@media (max-width: 380px) {
  .masthead { --brand-size: clamp(14px, calc(5vw - 2px), 16px); padding-inline: 9px; column-gap: 5px; }
  .masthead .brand { gap: 4px; }
  .masthead .brand img { width: clamp(21px, 6vw, 23px); height: auto; }
  .masthead .live-badge { padding: 3px 4px; font-size: 8px; letter-spacing: 0; }
  .masthead .profile-btn { max-width: 29vw; padding-inline: 5px; }
}
@media (max-width: 780px) and (max-height: 620px) {
  .map-stage { min-height: clamp(132px, 26dvh, 160px); }
  .map-panel .panel-head { min-height: 32px; height: 33px; }
}
@media (min-width: 1101px) and (max-height: 540px) {
  .ranking-stack { inset-block-start: calc(var(--bar) + 8px); gap: 6px; }
  .rank-list { --rank-row-height: 30px; }
  .ranking-stack .panel-head, .feed-panel .panel-head { min-height: 32px; height: 33px; padding-block: 3px; }
  .enemy-bar-row { min-height: 23px; }
  .feed-panel { bottom: 8px; }
}

button.enemy-bar-row {
  width: 100%;
  padding: 3px 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text);
  text-align: start;
  background: transparent;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) 7px;
  gap: 5px;
}
button.enemy-bar-row::after {
  content: '';
  width: 5px;
  height: 5px;
  border-block-start: 1.5px solid currentColor;
  border-inline-end: 1.5px solid currentColor;
  transform: rotate(45deg);
  color: var(--muted);
}
[dir="rtl"] button.enemy-bar-row::after { transform: rotate(-45deg); }
button.enemy-bar-row:hover, button.enemy-bar-row:focus-visible { background: #193039; }
button.enemy-bar-row:focus-visible { outline-offset: -2px; }
button.enemy-bar-row[aria-pressed="true"] { background: #1b3337; border-color: #365b5b; }
button.enemy-bar-row[aria-pressed="true"]::after { color: var(--cyan); }
.reclaim-panel .panel-head {
  height: auto;
  min-height: 42px;
  padding: 8px 12px;
  gap: 8px;
  flex-wrap: wrap;
}
.reclaim-panel .panel-head h2 .icon { color: var(--amber); }
#reclaim-country { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; line-height: 1.25; }
#reclaim-country .flag { height: 12px; }
#reclaim-cities { max-block-size: clamp(90px, 23dvh, 196px); overflow-y: auto; padding-inline: 12px; scrollbar-width: thin; }
.reclaim-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 2px 6px;
  min-width: 0;
  padding-block: 7px;
}
.reclaim-row + .reclaim-row { border-block-start: 1px solid var(--line); }
.reclaim-row > div { min-width: 0; grid-row: 1 / span 2; }
.reclaim-city { display: block; grid-column: 1; grid-row: 1; color: var(--text); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.reclaim-ruler, .soldier-select .identity { font-size: 11px; }
.reclaim-ruler { display: block; grid-column: 1; grid-row: 2; color: var(--muted); overflow-wrap: anywhere; }
.reclaim-ruler .flag { height: 11px; }
.reclaim-row button[data-reclaim-city] {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid #755243;
  border-radius: 4px;
  background: #302622;
  color: #ffbd95;
  font: 600 12px/1.15 var(--display);
}
.reclaim-row button[data-reclaim-city]:is(:hover,:focus-visible) { background: #493328; border-color: var(--amber); }
#reclaim-cities :is(.empty,.reclaim-empty) { margin: 0; padding: 12px 0; color: var(--muted); font-size: 12px; }
@media (min-width: 1101px) {
  .intel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    z-index: 2;
    inset-block: calc(var(--bar) + 10px) 12px;
    inset-inline-end: 16px;
    inline-size: var(--panel-right);
    height: auto;
    gap: 10px;
    pointer-events: none;
  }
  .intel :is(.ranking-stack,.feed-panel) {
    position: static;
    width: 100%;
    min-height: 0;
    pointer-events: auto;
  }
  .intel .ranking-stack {
    flex: 0 1 auto;
    grid-auto-rows: max-content;
    overflow: auto;
    scrollbar-width: thin;
  }
  .reclaim-panel { display: flex; flex-direction: column; align-self: start; max-height: 100%; }
  .reclaim-panel .panel-head { flex: none; }
  #reclaim-cities { min-height: 0; }
  .intel .feed-panel {
    flex: 0 0 clamp(100px,22dvh,210px);
    max-height: none;
  }
}
@media (min-width: 1101px) and (max-height: 730px) {
  .intel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    scrollbar-width: thin;
    pointer-events: auto;
    overscroll-behavior: contain;
  }
  .intel .ranking-stack { display: contents; }
  .intel .ranking-stack > .panel { flex: none; }
  .intel .feed-panel { flex: 0 0 clamp(85px,24dvh,160px); }
  #reclaim-panel { align-self: stretch; max-height: none; scroll-margin-block-end: 40px; }
  #reclaim-cities { max-block-size: 90px; }
}
@media (min-width: 781px) and (max-width: 1100px) {
  .intel { height: auto; grid-template-rows: max-content minmax(135px, 185px); }
}
@media (max-width: 780px) {
  .intel {
    grid-template-areas: "ranking feed" "influence feed";
    grid-template-rows: auto auto;
  }
  .intel .ranking-stack { display: contents; }
  .intel .rank-panel { grid-area: ranking; }
  .intel .influence-panel { grid-area: influence; }
  #reclaim-panel, #soldiers-panel { grid-column: 1 / -1; }
  .intel .feed-panel { grid-area: feed; }
  #reclaim-panel { scroll-margin-block-end: 72px; }
  #reclaim-cities { max-block-size: clamp(110px, 28dvh, 200px); }
  .reclaim-row button[data-reclaim-city] { min-height: 34px; }
}
@media (max-width: 550px) {
  button.enemy-bar-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 5px; min-height: 30px; padding-inline: 2px; gap: 3px; }
}
@media (max-width: 360px) {
  body:has(#reclaim-panel:not([hidden])) .dock-item { padding-inline: 6px; gap: 4px; }
}


/* The slogan stays on the header centreline as the profile and language controls change width. */
@media (min-width: 1850px) {
  .masthead .slogan-banner {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 1184px);
  }
}
@media (780px < width < 1850px) {
  :root { --bar: 77px; }
  .masthead {
    display: grid;
    grid-template-columns: auto auto auto minmax(0, 1fr);
    grid-template-areas: "brand live language profile" "slogan slogan slogan slogan";
    align-content: center;
    row-gap: 4px;
    padding-inline: 18px;
  }
  .masthead .brand { grid-area: brand; }
  .masthead > .live-badge { grid-area: live; }
  .masthead .lang-switcher { grid-area: language; }
  .masthead .mast-actions { grid-area: profile; justify-self: end; }
  .masthead .slogan-banner { grid-area: slogan; }
}
@media (max-width: 780px) {
  .masthead .slogan-banner { width: 100%; justify-self: stretch; }
}

.left-hud, .rulers-slot { display: contents; }
.rulers-column { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.top-rulers-panel, #occupied-countries { overflow: hidden; pointer-events: auto; }
#top-rulers-heading, #occupied-heading, #mercenary-heading { margin: 0; font: var(--hud-heading-font); }
#open-top-rulers, #open-occupied {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 39px;
  padding: 7px 12px;
  border: 0;
  background: #14212c;
  color: var(--text);
  font: inherit;
  text-align: start;
}
#open-top-rulers .icon { width: 16px; height: 16px; color: var(--amber); }
#open-occupied .icon { width: 16px; height: 16px; color: var(--cyan); }
.occupied-heading-text { display: grid; gap: 2px; }
.occupied-heading-text strong { font-weight: 600; }
.occupied-heading-text small { font: 400 11px/1.2 Barlow, sans-serif; color: var(--muted); }
#open-top-rulers .rulers-expand { width: 13px; height: 13px; margin-inline-start: auto; color: var(--muted); flex: none; }
:is(#open-top-rulers, #open-occupied):is(:hover, :focus-visible) { background: #21313c; }
#top-rulers-list, #occupied-list {
  overflow-y: auto;
  scrollbar-width: thin;
  padding-inline: 8px;
}
#top-rulers-list { max-height: 194px; }
#occupied-list {
  --occupied-row-height: 2.5rem;
  max-height: calc(7 * var(--occupied-row-height));
  overscroll-behavior-y: contain;
}
#occupied-list .occupied-country-row { min-height: var(--occupied-row-height); align-content: center; }
.ruler-rank-row, .ruler-territory {
  display: grid;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 4px;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  font: 600 13px/1.25 Barlow, sans-serif;
  text-align: start;
}
.ruler-rank-row { grid-template-columns: 18px minmax(0, 1fr) auto; }
.header-account { display: flex; align-items: center; gap: 3px; min-width: 0; }
#share-player { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
@media (max-width: 900px) {
  .masthead .header-account { grid-area: profile; justify-self: end; max-width: 100%; }
}
.ruler-rank-row:hover, .ruler-territory:hover { background: #1b303a; }
.ruler-rank-row:focus-visible, .ruler-territory:focus-visible, #open-top-rulers:focus-visible { outline-offset: -2px; }
.ruler-rank-no { color: var(--amber); font: 500 10px/1 var(--mono); }
.ruler-rank-person { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ruler-rank-person bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ruler-rank-person .flag { flex: none; height: 12px; }
.ruler-rank-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.ruler-champion { color: #281e0e; background: linear-gradient(104deg, #efd392, #dab66a 56%, #c9a14e); }
.ruler-champion:is(:hover, :focus-visible) { background: #efcf83; }
.ruler-champion .identity, .ruler-champion .ruler-rank-no, .ruler-champion .ruler-rank-count { color: inherit; }
.ruler-champion .identity .icon { width: 13px; height: 13px; flex: none; color: #49320b; }
.ruler-rank-person .identity { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
#top-rulers-list, #rulers-content.rulers-overview { --ruler-row-height: 36px; max-height: calc(4 * var(--ruler-row-height)); overflow-y: auto; overscroll-behavior: contain; }
:is(#top-rulers-list, #rulers-content.rulers-overview) .ruler-rank-row { box-sizing: border-box; height: var(--ruler-row-height); min-height: var(--ruler-row-height); padding-block: 4px; }
.rulers-dialog {
  width: min(460px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 16px;
}
.rulers-dialog[open] { display: flex; flex-direction: column; overflow: auto; }
.rulers-dialog-head { display: flex; align-items: center; gap: 8px; }
.rulers-dialog-head h2 { min-width: 0; flex: 1; font: var(--hud-heading-font); overflow-wrap: anywhere; }
.rulers-dialog-head h2 .flag { height: 15px; vertical-align: middle; }
#rulers-back .icon { transform: rotate(180deg); }
[dir="rtl"] #rulers-back .icon { transform: none; }
#rulers-content {
  overflow-y: auto;
  margin-block: 10px;
  min-height: 0;
  max-height: min(56dvh, 430px);
  scrollbar-width: thin;
}
#rulers-content.rulers-overview {
  --ruler-row-height: 44px;
  display: grid;
  gap: 6px;
  max-height: calc(4 * var(--ruler-row-height) + 18px);
  scrollbar-gutter: stable;
}
#rulers-content.rulers-overview .ruler-rank-row {
  padding-inline: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
#rulers-content.rulers-overview .ruler-rank-row:not(.ruler-champion) { background: #0e1720; }
#rulers-content.rulers-overview .ruler-rank-row:not(.ruler-champion):is(:hover,:focus-visible) { background: #1b303a; }
#rulers-languages { flex: none; justify-content: center; flex-wrap: wrap; }
.ruler-territory { grid-template-columns: minmax(0, 1fr) auto; }
.ruler-territory-name { display: grid; gap: 2px; min-width: 0; }
.ruler-territory-name strong { overflow-wrap: anywhere; }
.ruler-territory-name small { color: var(--muted); font-weight: 400; }
.ruler-territory-action { color: var(--amber); font: 600 13px var(--display); }
#enemy-influence-bars > .empty { padding: 7px 0; margin: 0; font-size: 12px; line-height: 1.4; text-align: start; }

@media (min-width: 1101px) {
  .left-hud {
    position: fixed;
    z-index: 2;
    inset-block-start: calc(var(--bar) + 16px);
    inset-inline-start: 16px;
    width: var(--panel-left);
    max-height: calc(100dvh - var(--bar) - 32px);
    display: flex;
    flex-direction: column;
    gap: 7px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
  }
  .left-hud::-webkit-scrollbar { display: none; }
  .left-hud > .panel { position: static; width: 100%; flex: none; }
  .rulers-slot {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 100%;
    flex: none;
  }
  .rulers-column, #occupied-countries {
    flex: none;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .rulers-column > .panel { display: flex; flex-direction: column; min-height: 0; }
  .rulers-column h2 { flex: none; }
}
@media (max-width: 1100px) {
  .left-hud { display: flex; flex-direction: column; grid-column: 1 / -1; gap: 8px; }
  .rulers-slot {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  #top-rulers, #occupied-countries {
    min-width: 0;
    box-shadow: 0 4px 15px #04081180;
  }
  #top-rulers-list { display: none; }
  #open-top-rulers, #open-occupied { min-height: 39px; padding: 5px 8px; gap: 5px; }
}
@media (max-width: 1000px) {
  main { padding-bottom: 135px; }
}
@media (max-width: 600px) {
  .command-dock, [dir="rtl"] .command-dock {
    inset-inline: auto 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    transform: none;
    width: clamp(151px, 46vw, 190px);
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    padding: 3px;
    gap: 1px;
  }
  .dock-item {
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    padding: 4px 1px;
    font-size: 10px;
    line-height: 1.1;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }
  #open-top-rulers .rulers-expand { display: none; }
}

.occupied-country-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 3px 6px;
  width: 100%;
  padding: 5px 4px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  text-align: start;
}
.occupied-country-row:is(:hover, :focus-visible) { background: #1b303a; outline-offset: -2px; }
.occupied-country-name { display: flex; align-items: center; gap: 5px; min-width: 0; font: 600 13px/1.2 Barlow, sans-serif; }
.occupied-country-name .flag, .occupied-city-card .flag { height: 12px; }
.occupied-country-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.occupied-share { color: var(--cyan); font: 500 11px/1.3 var(--mono); }
.occupied-country-count { color: var(--muted); font-size: 11px; }
.occupied-track { display: block; grid-column: 1 / -1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.occupied-fill { display: block; height: 100%; background: var(--cyan); }
#occupied-back .icon { transform: rotate(180deg); }
[dir="rtl"] #occupied-back .icon { transform: none; }
#occupied-content {
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: min(50dvh, 312px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}
:is(#occupied-content, #rulers-content):has(.occupied-city-card) {
  display: grid;
  grid-template-columns: repeat(auto-fill, min(196px, 100%));
  grid-auto-rows: 192px;
  align-content: start;
  justify-content: start;
  gap: 6px;
  max-height: min(52dvh, 390px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.occupied-card-info { overflow: auto; min-height: 0; scrollbar-width: thin; }
#occupied-content .occupied-country-row, .occupied-city-card {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0e1720;
}
#occupied-content .occupied-country-row:is(:hover, :focus-visible) { background: #1b303a; }
.occupied-city-card { display: flex; flex-direction: column; font: 400 12px/1.25 Barlow, sans-serif; }
.occupied-city-card > .city-places { margin-block-end: 3px; }
.occupied-city-name { font: 600 16px/1.15 var(--display); }
.occupied-city-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 1px 5px; margin-bottom: 3px; }
.occupied-city-heading .occupied-ruler { font-size: 11px; }
.occupied-city-heading .occupied-ruler .identity { color: var(--text); }
.occupied-ruler, .occupied-team, .occupied-price { color: var(--muted); overflow-wrap: anywhere; }
.occupied-card-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  margin-block-start: auto;
  padding-block-start: 6px;
}
.occupied-card-actions:has(:nth-child(2)) { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.occupied-action { overflow-wrap: anywhere; font: 600 13px/1.15 var(--display); }
#occupied-list .empty, #occupied-content .empty { padding: 6px 0; margin: 0; color: var(--muted); font-size: 12px; }

.city-action-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.city-action-choices > button, .occupied-action {
  flex: 0 1 auto;
  width: auto;
  min-height: 32px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 11px;
  font-size: 13px;
  border: 1px solid #97653a;
  border-radius: 5px;
  background: #302419;
  color: #ffd09c;
}
#city-defend-toggle { background: #132d34; border-color: #38717c; color: #a9f3eb; }
#city-action-toggle:is(:hover,:focus-visible,[aria-expanded="true"]),
.occupied-action:is(:hover, :focus-visible) { background: #47331f; border-color: var(--amber); }
.occupied-card-actions .occupied-action { gap: 2px; padding-inline: 3px; }
.occupied-action.view-territory { background: var(--soft); border-color: var(--line); color: var(--text); }
.occupied-action.view-territory:is(:hover, :focus-visible) { background: #1b303a; border-color: var(--cyan); }
@media (max-width: 768px), (pointer: coarse) {
  .occupied-card-actions .occupied-action { min-height: 44px; }
}
#city-defend-toggle:is(:hover,:focus-visible,[aria-expanded="true"]) { background: #1e4047; border-color: var(--cyan); }
.city-action-choices > button .icon, .occupied-action .icon { width: 14px; height: 14px; flex: none; }
.city-action-choices ~ #bid-form { margin-block-start: 9px; }
#action-drawer .ruler-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px 11px; }
#drawer-defenders { grid-column: 1 / -1; min-width: 0; border-block-start: 1px solid var(--line); }
#drawer-defenders summary { padding-block: 8px 2px; color: var(--cyan); cursor: pointer; font-size: 13px; }
#drawer-defenders[open] summary { padding-block-end: 8px; }
#drawer-defenders-list { max-height: min(210px, 35dvh); }
@media (min-width: 780px) {
  #action-drawer, #occupied-dialog, #country-purchase, #rulers-dialog { width: 454px; }
}

#defender-profile-dialog {
  width: min(400px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 18px;
  border-color: #41616e;
  background: #121e29;
}
.defender-profile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.defender-profile-head h2 { display: flex; align-items: center; gap: 7px; margin: 0; font: 600 23px/1.1 var(--display); overflow-wrap: anywhere; }
.defender-profile-head h2 .icon { flex: none; width: 18px; height: 18px; color: var(--cyan); }
.defender-profile-head .icon-button { flex: none; }
.defender-profile-person { display: flex; align-items: center; gap: 12px; min-width: 0; margin-block: 14px; }
#defender-profile-avatar, #defender-profile-initials { flex: none; width: 52px; height: 52px; }
#defender-profile-initials { font-size: 20px; }
.defender-profile-person > :last-child { min-width: 0; overflow-wrap: anywhere; }
#defender-social-note { margin-block: 6px 12px; color: var(--muted); font-size: 13px; }
#defender-profile-handle { font-size: 17px; font-weight: 700; }
.defender-profile-facts, .defender-profile-stats { margin: 0; }
.defender-profile-facts > div {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: baseline;
  gap: 10px;
  padding-block: 6px;
  border-block-start: 1px solid var(--line);
}
.defender-profile-facts dt, .defender-profile-stats dt { color: var(--muted); font-size: 12px; }
.defender-profile-facts dd, .defender-profile-stats dd { margin: 0; overflow-wrap: anywhere; }
.defender-profile-facts dd { text-align: end; font-size: 13px; }
.defender-profile-facts .flag { height: 12px; vertical-align: middle; }
.defender-profile-card > h3 { margin-block: 12px 6px; font: 600 18px/1.2 var(--display); }
.defender-profile-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.defender-profile-stats > div { display: grid; align-content: start; gap: 4px; padding: 7px 9px; border-radius: 4px; background: #1b2c38; }
.defender-profile-stats dd { color: var(--cyan); font: 500 13px/1.25 var(--mono); }
#defender-profile-socials { flex-wrap: wrap; margin: 10px 0 0; gap: 6px; }
#defender-profile-socials a { display: inline-flex; align-items: center; min-height: 32px; padding-inline: 8px; border: 1px solid var(--line); border-radius: 4px; }
@media (pointer: coarse) {
  .defender-profile-head .icon-button { width: 44px; height: 44px; }
  #drawer-defenders summary { min-height: 44px; padding-block: 12px; }
}
#boost-payments { margin-block: 9px; }
#boost-payments .choice { min-width: 0; }
#boost-submit { width: 100%; }
#boost-submit:disabled { opacity: .6; }
#checkout-result { margin: auto; width: min(420px, calc(100% - 24px)); padding: 16px; box-shadow: 0 4px 24px #0008; }
#checkout-result:not([open]) { display: none; }
#checkout-result div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
#checkout-result :is(button,a) { display: inline-block; border: 1px solid var(--line); background: var(--soft); color: var(--cyan); border-radius: 4px; padding: 6px 10px; font: 600 13px Barlow,sans-serif; }
.payments .choice { min-width: 0; overflow-wrap: anywhere; }

.profile-photo, .force-avatar { width: 23px; height: 23px; flex: none; border-radius: 50%; object-fit: cover; }
.public-socials, .force-socials { display: flex; align-items: center; gap: 8px; }
.public-socials a, .force-socials a { color: var(--cyan); font: 600 11px/1.2 Barlow, sans-serif; text-decoration: underline; }
.public-socials { margin-block: 5px; }
#avatar-preview { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; }
.profile-media-hint { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.avatar-editor { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.avatar-editor button { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--soft); }
.profile-social-inputs { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 4px 8px; margin-top: 7px; }
.profile-social-inputs label, .profile-social-inputs input { margin: 0; }
#avatar-file { max-width: 100%; height: auto; }
#avatar-remove { padding: 5px 9px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
#avatar-error:empty { display: none; }
.ruler-avatar { object-fit: cover; }

#soldiers-panel .panel-head { min-height: 38px; height: auto; padding: 7px 12px; }
#soldiers-country { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
#soldiers-country .flag, .force-person .flag, .force-country .flag { height: 12px; }
#enemy-influence-bars, #soldiers-list {
  --entry-height: 38px;
  padding-block: 0;
  max-block-size: calc(3 * var(--entry-height));
  max-height: calc(3 * var(--entry-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
#soldiers-list { --entry-height: 44px; padding-inline: 9px; }
#enemy-influence-bars .enemy-bar-row, #soldiers-list .soldier-row { block-size: var(--entry-height); min-block-size: var(--entry-height); }
.soldier-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.soldier-row + .soldier-row { border-top: 1px solid var(--line); }
.soldier-select {
  align-self: stretch;
  flex: 1;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: start;
}
.soldier-select:is(:hover,:focus-visible) { background: #1b303a; }
.soldier-select:focus-visible { outline-offset: -2px; }
.soldier-select .soldier-next { flex: none; width: 12px; height: 12px; margin-inline-start: auto; color: var(--amber); }
[dir="rtl"] .soldier-select .soldier-next { transform: rotate(180deg); }
.force-person { display: flex; align-items: center; gap: 4px; min-width: 0; }
.force-details { display: grid; min-width: 0; gap: 1px; }
.force-name-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mercenary-conquered { flex: none; color: var(--muted); font-size: 12px; }
.force-person .identity { min-width: 0; }
@media (max-width: 768px), (pointer: coarse) {
  #soldiers-panel { container: soldier-roster / inline-size; }
  #soldiers-list { --entry-height: 70px; }
}
@container soldier-roster (max-width: 220px) {
  #soldiers-list { --entry-height: 90px; padding-inline: 1px; }
  .soldier-row { display: grid; grid-template: 44px auto / minmax(0, 1fr); gap: 0; }
  .soldier-row > .player-socials { justify-self: start; }
}
@container soldier-roster (max-width: 140px) {
  #soldiers-list { --entry-height: 134px; }
  .soldier-row > .player-socials { flex-wrap: wrap; align-self: start; }
}
.force-person bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soldier-investments, .mercenary-count { color: var(--muted); font-size: 11px; }
.soldier-investments { text-align: start; }
#mercenary-ranking { pointer-events: auto; min-width: 0; }
#open-mercenaries { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 37px; padding: 6px 10px; background: #14212c; border: 0; text-align: start; color: var(--text); }
#open-mercenaries:hover, #open-mercenaries:focus-visible { background: #21313c; }
#open-mercenaries .icon { width: 16px; color: var(--amber); }
#open-mercenaries .rulers-expand { width: 13px; margin-inline-start: auto; color: var(--muted); }
#mercenary-list { --ranking-row-height: 30px; padding-inline: 8px; }
#mercenary-content { --ranking-row-height: 44px; }
#mercenary-list, #mercenary-content:has(> .mercenary-country-row) {
  --ranking-height-limit: calc(3 * var(--ranking-row-height));
  flex: none;
  max-height: var(--ranking-height-limit);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.mercenary-country-row, .mercenary-city { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; padding: 6px 4px; border: 0; border-top: 1px solid var(--line); color: var(--text); background: transparent; font: 600 13px/1.2 Barlow, sans-serif; text-align: start; }
.mercenary-country-row { height: var(--ranking-row-height); }
.mercenary-country-row .force-country { min-width: 0; }
.mercenary-country-row .force-country > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mercenary-country-row .flag { flex: none; }
.mercenary-country-row:is(:hover,:focus-visible), .mercenary-city:is(:hover,:focus-visible) { background: #1b303a; }
.force-country { display: inline-flex; align-items: center; gap: 5px; }
#mercenary-content { overflow: auto; max-height: min(56dvh,430px); margin-block-start: 8px; scrollbar-width: thin; }
#mercenary-back .icon { transform: rotate(180deg); }
[dir="rtl"] #mercenary-back .icon { transform: none; }
.mercenary-card { padding: 8px; margin-block-end: 6px; border: 1px solid var(--line); background: #101c27; border-radius: 5px; }
.mercenary-cities { margin-block-start: 4px; }
.mercenary-action { color: var(--amber); }
.mercenary-city > span:first-child { display: grid; gap: 2px; min-width: 0; }
.mercenary-city small { font: 400 11px Barlow, sans-serif; color: var(--muted); }
.mercenary-city-details .flag { height: 12px; vertical-align: middle; }
.mercenary-no-cities, :is(#mercenary-content,#mercenary-list,#soldiers-list) .empty { margin: 0; padding: 7px 4px; color: var(--muted); font-size: 12px; }
@media (pointer: coarse) {
  #mercenary-list { --ranking-row-height: 44px; }
}
@media (max-width: 1100px) {
  body > main {
    max-height: calc(100dvh - var(--bar) - var(--controls-space, 124px));
    overflow-y: auto;
    padding-block-end: 12px;
    scroll-padding-block: 6px;
  }
}

.masthead .mast-actions { min-width: 0; max-width: 100%; gap: clamp(6px, 1vw, 14px); }
#share-game, .share-conquest-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #375e63;
  border-radius: 5px;
  background: #172d34;
  color: #b9f1e9;
  font: 600 13px/1.2 Barlow, sans-serif;
}
#share-game { flex: none; white-space: nowrap; }
#share-game .icon, .share-conquest-btn .icon { flex: none; width: 15px; height: 15px; color: var(--cyan); }
#share-game:is(:hover, :focus-visible), .share-conquest-btn:is(:hover, :focus-visible) {
  border-color: var(--cyan);
  background: #203f45;
}
#share-conquest { width: 100%; margin-block-start: 6px; }
.feed-item .share-conquest-btn { max-width: 100%; min-height: 25px; margin-block-start: 4px; padding: 3px 7px; font-size: 11px; }
.feed-item .share-conquest-btn .icon { width: 12px; height: 12px; }

#welcome-dialog {
  width: min(748px, calc(100vw - 28px)); max-width: none; max-height: calc(100dvh - 28px);
  margin: auto; padding: 0; border: 1px solid #455c69; border-radius: 10px;
  background: #101b26; color: var(--text); box-shadow: 0 18px 64px #010811b3; overflow: auto;
  overscroll-behavior: contain; scrollbar-width: thin;
}
#welcome-dialog::backdrop {
  background: rgb(5 13 23 / 54%);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.welcome-header, .welcome-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 20px; background: #0c1620;
}
.welcome-header { border-bottom: 1px solid var(--line); }
#welcome-languages { margin-inline-start: auto; }
#welcome-languages .lang-switcher { display: flex; position: static; flex-wrap: wrap; gap: 2px; padding: 0; border: 0; background: transparent; }
#welcome-languages button { width: auto; min-width: 24px; padding: 3px; }
.welcome-brand { display: flex; align-items: center; gap: 8px; font-size: 19px; line-height: 1; }
.welcome-brand img { display: block; }
.welcome-body { padding: 18px 20px; display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 22px; }
.welcome-gallery, .welcome-story { min-width: 0; }
.welcome-gallery figure { margin: 0; overflow: hidden; border: 1px solid #3b505e; border-radius: 6px; background: #122330; }
.welcome-gallery figure > img { display: block; width: 100%; object-fit: cover; }
.welcome-gallery figcaption { font: 600 14px/1.1 'Barlow Condensed', Barlow, sans-serif; color: #e6f0f3; }
.welcome-berlin { position: relative; }
.welcome-berlin > img { height: 116px; }
.welcome-berlin figcaption { position: absolute; inset: auto auto 6px 6px; display: flex; align-items: center; gap: 5px; background: #0a1925f2; border: 1px solid #45606b; border-radius: 4px; padding: 4px 6px; }
.welcome-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.welcome-examples figure > img { height: 66px; object-fit: contain; background: #10202d; }
.welcome-examples figcaption { padding: 5px 6px 6px; }
.welcome-share { margin-top: 10px; }
.welcome-share ul { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.welcome-share button { display: grid; place-items: center; width: 31px; height: 30px; border: 1px solid #37505d; border-radius: 4px; color: #d3e4e9; background: #10232d; }
.welcome-share button:is(:hover, :focus-visible) { color: #75e4d7; border-color: #69c5bc; }
.welcome-share svg { width: 15px; height: 15px; fill: currentColor; }
.welcome-story .welcome-kicker { font: 400 12px/1.3 'Black Ops One', Barlow, 'Segoe UI', sans-serif; color: #88d9cc; letter-spacing: .8px; text-transform: uppercase; margin: 1px 0 4px; }
#welcome-title { font: 700 27px/1.1 'Barlow Condensed', Barlow, sans-serif; margin: 0 0 5px; }
.welcome-story p { margin: 0; }
.welcome-intro, .welcome-breakdown, .welcome-terms { color: var(--muted); font: 400 13px/1.35 Barlow, sans-serif; }
.welcome-story h3 { margin: 12px 0 4px; font: 600 18px/1.2 'Barlow Condensed', Barlow, sans-serif; }
.welcome-receipt { margin: 0 0 7px; }
.welcome-receipt div { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; padding: 5px 0; border-bottom: 1px solid #344650; font-size: 14px; }
.welcome-receipt dd { font: 500 13px/1.25 var(--mono); margin: 0; white-space: nowrap; }
.welcome-receipt div:nth-child(3) dd { color: #73e1d2; }
.welcome-receipt div:nth-child(4) dd { color: #fac976; }
.welcome-story .welcome-terms { margin-top: 7px; font-size: 12px; }
.welcome-footer { border-top: 1px solid var(--line); flex-wrap: wrap; }
.welcome-footer label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; }
.welcome-footer input { width: 15px; height: 15px; margin: 0; accent-color: #69d7c8; }
.welcome-footer > div { display: flex; gap: 7px; margin-inline-start: auto; }
.welcome-footer button { border: 1px solid #435863; border-radius: 4px; padding: 6px 11px; color: inherit; background: #11202b; font-size: 13px; font-weight: 600; }
#welcome-register { border-color: #6ad8c9; background: #76ddce; color: #092627; }
.welcome-footer button:is(:hover, :focus-visible) { border-color: #86edde; }
@media (max-width: 580px) {
  #welcome-dialog { width: min(412px, calc(100vw - 20px)); max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px); }
  .welcome-header, .welcome-footer { padding: 7px 12px; }
  .welcome-header { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 6px; }
  #welcome-close { grid-column: 2; grid-row: 1; }
  #welcome-languages { grid-row: 2; grid-column: 1 / -1; }
  #welcome-languages button, .welcome-share button { min-width: 44px; min-height: 44px; }
  .welcome-body { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .welcome-gallery { display: grid; grid-template-columns: 1fr 2fr; gap: 5px; align-items: stretch; }
  .welcome-examples { gap: 5px; margin: 0; }
  .welcome-berlin > img, .welcome-examples figure > img { height: 57px; object-fit: contain; background: #10202d; }
  .welcome-berlin figcaption { position: static; border: 0; background: none; padding: 5px; }
  .welcome-gallery figcaption { font-size: 13px; }
  .welcome-share { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
  .welcome-share ul { margin: 0; gap: 7px; }
  #welcome-title { font-size: 24px; }
  .welcome-footer { position: sticky; bottom: 0; z-index: 1; gap: 4px; }
  .welcome-footer label { font-size: 12px; }
  .welcome-footer label, .welcome-footer button, #welcome-close { min-height: 44px; }
  #welcome-close { min-width: 44px; }
}
#share-dialog {
  width: min(464px, calc(100% - 20px));
  max-height: calc(100dvh - 20px);
  margin: auto;
  padding: clamp(14px, 3vw, 20px);
  border-color: #41616e;
  background: #121e29;
  overscroll-behavior: contain;
}
.share-card { min-width: 0; }
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 12px; }
.share-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 24px/1.12 var(--display); overflow-wrap: anywhere; }
.share-head h2 .icon { flex: none; width: 18px; height: 18px; color: var(--cyan); }
.share-head .flag { flex: none; height: 18px; width: auto; }
.share-head .icon-button { flex: none; }
#share-world-preview:not([hidden]) {
  display: block;
  width: 100%;
  height: auto;
  margin-block-end: 10px;
  border: 1px solid #354958;
  border-radius: 5px;
}
.share-actions a[aria-disabled="true"] { opacity: .6; cursor: progress; }
.share-preview label { display: block; margin-block-end: 4px; color: #cbd8e3; font-size: 13px; font-weight: 600; }
#share-post-text, #share-link {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #354958;
  border-radius: 5px;
  color: var(--text);
  background: #0c1721;
  font: 400 14px/1.4 Barlow, sans-serif;
}
#share-post-text { field-sizing: content; min-height: 4.6em; max-height: max(5em, 28dvh); resize: vertical; }
#share-link-row { margin-block-start: 9px; }
#share-link { direction: ltr; text-align: left; font: 500 12px/1.4 var(--mono); }
#share-local-note, #share-image-hint, .share-status { margin-block-start: 8px; font-size: 12px; line-height: 1.4; }
#share-local-note, #share-image-hint { color: var(--muted); }
.share-status { color: var(--cyan); }
.share-status:empty { margin: 0; }
.share-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 14px; }
.share-actions > :is(button, a) {
  display: inline-flex;
  flex: 1 1 calc(50% - 6px);
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 36px;
  padding: 6px;
  border: 1px solid #354b5c;
  border-radius: 5px;
  background: var(--soft);
  color: var(--text);
  font: 600 13px/1.2 Barlow, sans-serif;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.share-actions :is(#share-whatsapp, #share-telegram, #share-x) { flex-basis: calc(33.333% - 6px); }
.share-actions .icon { width: 15px; height: 15px; flex: none; }
.share-actions #share-copy-post { background: #19373c; border-color: #3b656a; color: #c4f4ee; }
.share-actions > :is(a[href], button:enabled):is(:hover, :focus-visible) { background: #203843; border-color: var(--cyan); }
.public-socials { flex-wrap: wrap; }
.soldier-row .force-socials { flex-wrap: wrap; gap: 1px 4px; }
.profile-social-inputs input { width: 100%; min-width: 0; }

@media (min-width: 901px) {
  .masthead #dock-auth { min-width: 0; max-width: min(22vw, 230px); }
}
@media (min-width: 701px) and (max-width: 900px) {
  :root { --bar: 100px; }
}
@media (max-width: 900px) {
  .masthead {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-template-areas: "brand live profile" "language language share" "slogan slogan slogan";
    align-content: center;
    gap: 2px 6px;
  }
  .masthead .brand { grid-area: brand; }
  .masthead > .live-badge { grid-area: live; }
  .masthead .mast-actions { display: contents; }
  .masthead #dock-auth { grid-area: profile; justify-self: end; max-width: 100%; }
  .masthead #share-game { grid-area: share; justify-self: end; min-height: 28px; padding: 3px 8px; font-size: 12px; }
  .masthead .lang-switcher { grid-area: language; justify-self: start; margin: 0; padding: 0; border: 0; }
  .masthead .slogan-banner { grid-area: slogan; }
}
@media (max-width: 420px) {
  .masthead .lang-switcher { gap: 3px; }
  .masthead .lang-switcher button { min-width: 22px; padding-inline: 2px; }
}
@media (pointer: coarse) {
  .share-head .icon-button { width: 44px; height: 44px; }
  .share-actions > :is(button, a), #share-conquest { min-height: 44px; }
}

/* The desktop sidebar and the mobile command panel can both be narrow. */
@container city-directory (max-width: 540px) {
  .directory-scroll :is(table, thead, tbody) { display: block; white-space: normal; }
  .directory-scroll tr { display: grid; grid-template-columns: minmax(0, 1fr) clamp(4.25rem, 22cqi, 7rem); }
  .directory-scroll .city-row { height: auto; min-height: var(--city-row-height); }
  .directory-scroll td { align-content: center; }
  .directory-scroll tr > :is(th, td):not(:first-child, .price) { display: none; }
  .directory-scroll tr > .price { width: auto; overflow-wrap: anywhere; }
  .directory-scroll .city-cell > div, .directory-scroll .city-name { min-width: 0; }
  .directory-scroll .city-link { overflow-wrap: anywhere; text-align: start; }
  .directory-scroll .city-icon { flex-shrink: 0; }
  .directory-scroll .compact-owner { display: flex; flex-wrap: wrap; align-items: center; gap: 1px 4px; }
}

.region-tabs .free-city-filter { display: inline-flex; align-items: center; gap: 5px; border-color: #476456; color: #b6e4cc; }
.free-city-filter .icon { width: 14px; height: 14px; }
.free-city-filter[aria-pressed="true"] { background: #244b3e; color: #bdf2d5; border-color: #6aab8f; }
.country-offer {
  flex: none;
  display: grid; width: calc(100% - 16px); margin: 4px 8px 8px; padding: 9px 10px;
  grid-template-columns: minmax(0, 1fr) auto 14px; align-items: center; gap: 3px 8px; text-align: start;
  background: linear-gradient(110deg, #183232, #172933); border: 1px solid #3b655f; border-radius: 6px; color: var(--text);
}
.country-offer:enabled:hover { border-color: var(--cyan); }
.country-offer-name { display: flex; align-items: center; gap: 9px; }
.country-offer-name .flag { width: 26px; height: 18px; object-fit: cover; }
.country-offer-name :is(small, strong) { display: block; }
.country-offer-name small { color: var(--cyan); font: 500 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.country-offer-name strong { font: 600 21px/1.1 var(--display); }
.country-offer-count { grid-row: 2; grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.country-offer-action { grid-area: 1 / 2; display: grid; text-align: end; gap: 1px; color: var(--cyan); font: 600 13px var(--display); }
.country-offer bdi { color: var(--amber); font: 500 13px var(--mono); }
.country-offer > .icon { grid-area: 1 / 3; width: 14px; color: var(--cyan); }
#country-offer-header {
  position: sticky; inset-block-start: 0; z-index: 2;
  padding-block: 4px 10px; margin-block-end: 10px; border-bottom: 1px solid var(--line);
  background: #121d29;
}
.country-offer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.country-offer-heading > div { min-width: 0; }
.country-offer-heading .dialog-label { margin-bottom: 3px; }
.country-offer-heading .icon-button { flex: none; }
#country-purchase-title { display: flex; align-items: center; gap: 10px; margin: 0; overflow-wrap: anywhere; }
#country-purchase-title .flag { width: 33px; height: 22px; object-fit: cover; }
.country-offer-actions {
  display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center; gap: 5px 12px; margin-top: 6px;
}
.country-offer-actions small { display: block; color: var(--muted); line-height: 1.15; }
.country-offer-actions strong { color: var(--amber); font: 600 15px/1.2 var(--mono); overflow-wrap: anywhere; }
#country-owner-price { grid-column: 1 / -1; }
#country-checkout-toggle[aria-expanded="true"] { grid-column: 2; justify-self: end; width: auto; padding: 3px 8px; }
#country-motto { margin: 4px 0 10px; color: var(--muted); }
.titled-country #country-motto { margin-bottom: 4px; color: var(--cyan); font: 600 19px/1.2 var(--display); }
#country-title-holder { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.country-details { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 12px; align-items: start; }
.country-details > * { min-width: 0; }
.country-details h3 { margin: 0 0 4px; font: 600 17px/1.15 var(--display); overflow-wrap: anywhere; }
.country-details > :is(form, #country-owner-actions, .country-city-detail),
#country-map-preview[hidden] + #country-places[hidden] + .country-cities { grid-column: 1 / -1; }
#country-map-preview { margin: 0; background: #112634; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
#country-preview-art svg { display: block; width: 100%; height: clamp(90px, 15dvh, 150px); }
#country-preview-label { padding: 5px 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.country-cities { container-type: inline-size; }
#country-city-prices {
  --country-row: 44px;
  margin: 0; padding: 0; max-height: calc(4 * var(--country-row));
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; list-style: none;
}
#country-city-prices li { height: var(--country-row); }
.country-city-link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; align-items: center; gap: 2px 6px;
  width: 100%; height: 100%; padding: 2px; border: 0; border-top: 1px solid var(--line);
  background: transparent; color: inherit; text-align: start; font-size: 14px; line-height: 1.1;
}
.country-city-link:focus-visible { outline-offset: -2px; }
.country-city-link strong, .country-city-link small, .country-city-link .identity bdi {
  min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.country-city-link:is(:hover, :focus-visible) strong { color: var(--cyan); text-decoration: underline; }
.country-city-link[aria-expanded="true"] { background: #17313a; box-shadow: inset 2px 0 var(--cyan); }
.country-city-link[aria-expanded="true"] strong { color: var(--cyan); }
.country-city-detail { padding: 10px 12px; border: 1px solid #34525c; border-radius: 6px; background: #0e1922; }
.country-city-detail h3 { display: flex; align-items: center; gap: 7px; }
.country-city-detail dl { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 6px 0 0; }
.country-city-detail dt { color: var(--muted); font-size: 12px; }
.country-city-detail dd { overflow-wrap: anywhere; margin: 1px 0 0; }
#country-city-detail-price { color: var(--amber); font-family: var(--mono); }
.country-city-link small { grid-area: 2 / 1; color: var(--muted); }
.country-city-link > bdi { grid-area: 1 / 2 / span 2; max-width: 13ch; color: var(--amber); text-align: end; overflow-wrap: anywhere; font: 500 11px/1.1 var(--mono); }
.country-city-link .country-city-status { color: var(--muted); font: 400 12px/1.1 Barlow, sans-serif; }
@container (max-width: 195px) {
  #country-city-prices:has(.country-city-status) { --country-row: 62px; }
  .country-city-link:has(.country-city-status) { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .country-city-link .country-city-status { grid-area: 3 / 1; max-width: none; text-align: start; }
}
#country-form fieldset { margin: 14px 0 0; }
#country-form legend { font-weight: 600; margin-bottom: 5px; }
#country-form .split-preview { margin: 0; }
#country-message:empty { display: none; }
#country-submit { background: #64deca; color: #0c2628; }
#country-submit:enabled:hover { background: #90ecde; }
#country-checkout-toggle { border: 1px solid #337c7b; background: #174449; color: #a4fff2; }
#country-checkout-toggle:is(:hover, :focus-visible, [aria-expanded="true"]) { border-color: var(--cyan); background: #205157; }
#country-places h3 { color: var(--cyan); }
#country-place-list { max-height: 176px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; overflow-wrap: anywhere; }
#country-place-list > ul { margin: 0; padding: 0; list-style: none; }
#country-place-list > ul > li { padding: 5px 0; border-top: 1px solid var(--line); }
#country-place-list li ul { margin: 4px 0 2px; padding-inline-start: 18px; color: var(--muted); font-size: 13px; }
#country-owner-actions .split-preview { margin: 0 0 10px; }
#country-owner-actions :is(.cta, input, progress) { width: 100%; }
#country-owner-actions .cta { background: #174449; border: 1px solid #337c7b; color: #a4fff2; }
#country-defense-form { margin-top: 12px; }
#country-defense-form label { font-weight: 600; }
#land-shield-amount { float: inline-end; color: var(--cyan); font-family: var(--mono); }
#land-shield-range { height: 36px; margin: 3px 0; accent-color: var(--cyan); }
#land-shield-meter { accent-color: var(--cyan); height: 8px; }
#country-defense-form small { color: var(--muted); }
#country-defense-form fieldset { margin: 12px 0; }
#land-shield-status { color: var(--cyan); }
#land-shield-status:empty { display: none; }
@media (max-width: 560px) {
  #region-tabs [data-region="ALL"] { order: -2; }
  #region-tabs .free-city-filter { order: -1; }
  #land-shield-range { min-height: 44px; }
  .country-details { gap: 10px; }
  #country-purchase :is(.choice, .icon-button, .cta) { min-height: 44px; }
}

/* "How To" box next to the language buttons; opens the welcome dialog. Hidden while the switcher sits inside that dialog. */
.lang-switcher .how-to-btn {
  margin-inline-start: 6px; padding: 5px 8px; min-width: 0;
  font: 600 10px/1 var(--mono); color: var(--cyan); white-space: nowrap;
  border: 1px solid var(--cyan); border-radius: 4px; background: #0e1720;
}
.lang-switcher .how-to-btn:hover, .lang-switcher .how-to-btn:focus-visible { background: #1e4047; color: #fff; }
#welcome-languages .how-to-btn { display: none; }
