/* Moonbid — dark by default; light mode is a paper chart around the same globe. */

:root {
  color-scheme: dark;
  --accent: #c8b273;
  --accent-hover: #dcc687;
  --accent-ink: #12100a;
  --accent-soft: rgba(200, 178, 115, 0.16);
  --bg: #06070b;
  --panel: #0c0e14;
  --panel-2: #11141c;
  --inset: #07080e;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8e6e1;
  --muted: #8d8f99;
  --muted-2: #5f626d;
  --danger: #e2685f;
  --danger-text: #f0a49d;
  --success: #63c99a;
  --topbar-bg: rgba(8, 9, 13, 0.92);
  --modal-scrim: rgba(3, 4, 7, 0.78);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  --toast-bg: rgba(12, 14, 20, 0.97);
  --ticker-from: rgba(6, 7, 11, 0.96);
  --selection-bg: rgba(10, 11, 16, 0.95);
  --parcel-line: rgba(236, 226, 204, 0.16);
  --parcel-fill: rgba(255, 244, 214, 0.06);
  --badge-ink: #f3ead4;
  --hud-text: #e8e6e1;
  --hud-muted: #8d8f99;
  --btn-primary-bg: var(--accent);
  --btn-primary-fg: var(--accent-ink);
  --btn-primary-hover: var(--accent-hover);
  --parcel-selected-bg: rgba(228, 197, 122, 0.42);
  --parcel-selected-border: #e4c57a;
  --drawer-w: 396px;
  --topbar-h: 62px;
  --radius: 12px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  /* Wall-chart voice for the globe, matched to the canvas label font. */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  /* Dark bronze for prices/links — pale gold on cream is unreadable. */
  --accent: #6b4a08;
  --accent-hover: #4e3506;
  --accent-ink: #ffffff;
  --accent-soft: rgba(22, 20, 16, 0.08);
  /* Ink button, white label. Never white-on-tan. */
  --btn-primary-bg: #161410;
  --btn-primary-fg: #ffffff;
  --btn-primary-hover: #000000;
  --bg: #ddd9d0;
  --panel: #ffffff;
  --panel-2: #f7f5f0;
  --inset: #1c1a16;
  --line: #c9c4b8;
  --line-strong: #8f8878;
  --text: #14120e;
  --muted: #3f3b34;
  --muted-2: #5a554c;
  --danger: #b42318;
  --danger-text: #8f1d14;
  --success: #176f4a;
  --topbar-bg: #ffffff;
  --modal-scrim: rgba(20, 18, 14, 0.5);
  --shadow: 0 12px 32px rgba(20, 18, 14, 0.12);
  --toast-bg: #ffffff;
  --ticker-from: rgba(255, 255, 255, 0.98);
  --selection-bg: #ffffff;
  --parcel-line: rgba(247, 240, 220, 0.58);
  --parcel-fill: rgba(247, 240, 220, 0.16);
  --parcel-selected-bg: #e8b84a;
  --parcel-selected-border: #fff8e6;
  --badge-ink: #ffffff;
}

* {
  box-sizing: border-box;
}

/**
 * Several elements below are toggled with the `hidden` attribute but also carry a
 * `display` rule, which would otherwise win over the user-agent `[hidden]` style
 * and leave a full-screen overlay swallowing clicks.
 */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

html[data-theme="light"],
html[data-theme="light"] body {
  /* Grayscale antialiasing washes thin type into the cream page. */
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

button,
input {
  font-family: inherit;
  color: inherit;
}

a {
  color: var(--accent);
}

.app {
  display: grid;
  grid-template-columns: 1fr var(--drawer-w);
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas:
    "top top"
    "stage drawer";
  height: 100%;
  transition: grid-template-columns 0.25s ease;
}

.app.drawer-collapsed {
  grid-template-columns: 1fr 0px;
}

/* ---------------------------------------------------------------- topbar -- */

.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  z-index: 900;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.brand:hover .brand-mark {
  transform: scale(1.06);
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #efe6cd 0%, #cbbd97 42%, #8e8468 100%);
  box-shadow: 0 0 22px rgba(200, 178, 115, 0.4), inset -5px -4px 9px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 15px;
  letter-spacing: 0.16em;
}

.brand-tagline {
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 0.03em;
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 340px;
}

.search-input {
  width: 100%;
  padding: 8px 13px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: 0.15s;
}

.search-input:focus {
  border-color: var(--accent);
  background: var(--panel);
}

.search-input::placeholder {
  color: var(--muted-2);
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 340px;
  overflow-y: auto;
  margin: 0;
  padding: 5px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 1000;
}

.search-results li {
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.search-results li:hover,
.search-results li.is-active {
  background: var(--panel-2);
}

.search-results .r-name {
  font-size: 13px;
}

.search-results .r-kind {
  font-size: 10px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.search-results .r-price {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}

.headline-stats {
  display: flex;
  gap: 22px;
  margin: 0 0 0 auto;
  flex-shrink: 0;
}

.headline-stats div {
  text-align: right;
}

.headline-stats dt {
  font-size: 9.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.headline-stats dd {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}

/* ----------------------------------------------------------------- stage -- */

.stage {
  grid-area: stage;
  position: relative;
  overflow: hidden;
}

.map {
  position: absolute;
  inset: 0;
  cursor: crosshair;
}

.leaflet-container {
  background-color: #05060a;
}

/**
 * An equirectangular map is 2:1 and screens are not, so there is always some
 * empty space above and below the poles. Stars make that read as deliberate
 * rather than as a rendering failure.
 */
.map.is-space {
  background-color: #05060a;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 22%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 47% 8%, rgba(214, 226, 255, 0.7), transparent),
    radial-gradient(1.4px 1.4px at 78% 31%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 91% 68%, rgba(255, 244, 220, 0.6), transparent),
    radial-gradient(1.2px 1.2px at 24% 74%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 61% 88%, rgba(214, 226, 255, 0.55), transparent),
    radial-gradient(1.6px 1.6px at 35% 52%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 5% 46%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 68% 15%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 40% 34%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 85% 51%, rgba(214, 226, 255, 0.45), transparent),
    radial-gradient(1px 1px at 17% 60%, rgba(255, 255, 255, 0.35), transparent);
  background-size: 380px 290px;
}

.leaflet-container {
  font-family: var(--font);
  outline: none;
}

.leaflet-control-attribution {
  background: rgba(6, 7, 11, 0.78) !important;
  color: var(--muted-2) !important;
  font-size: 10px !important;
  border-radius: 5px 0 0 0;
}

.leaflet-control-attribution a {
  color: var(--muted) !important;
}

.leaflet-bar a {
  background: var(--panel) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}

.leaflet-bar a:hover {
  background: var(--panel-2) !important;
}

.tile-notice {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 620;
  padding: 6px 13px;
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(10, 11, 16, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ------------------------------------------------------------- globe -- */

.globe-stage {
  position: absolute;
  inset: 0;
  z-index: 600;
  background: #12182b;
}

.globe-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.globe-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--serif);
  font-size: 11px;
  color: rgba(232, 226, 210, 0.45);
  pointer-events: none;
  letter-spacing: 0.04em;
}

.featured-deal {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 630;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid rgba(228, 197, 122, 0.7);
  border-radius: 999px;
  background: rgba(8, 9, 13, 0.92);
  color: #f3ead4;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.featured-deal strong {
  color: #e4c57a;
  font-weight: 600;
}

.featured-deal:hover {
  border-color: #e4c57a;
  background: rgba(16, 14, 10, 0.96);
}

.deal-card {
  position: absolute;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  z-index: 640;
  min-width: 200px;
  padding: 14px 16px 12px;
  background: rgba(10, 12, 18, 0.96);
  border: 1px solid rgba(228, 197, 122, 0.55);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  color: var(--hud-text);
  text-align: center;
}

.deal-card .dc-kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c8b273;
}

.deal-card .dc-price {
  display: block;
  margin: 4px 0 2px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: #f3ead4;
}

.deal-card .dc-place {
  margin-bottom: 12px;
  color: var(--hud-muted);
  font-size: 13px;
}

.deal-card .primary-btn {
  width: 100%;
}

.globe-credit {
  position: absolute;
  right: 18px;
  bottom: 14px;
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(186, 199, 224, 0.38);
  pointer-events: none;
}

.globe-tools {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.globe-tool-group {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(224, 213, 186, 0.28);
  background: rgba(12, 18, 34, 0.82);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.globe-tool-group button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid rgba(224, 213, 186, 0.16);
  background: transparent;
  color: rgba(239, 230, 207, 0.78);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.globe-tool-group button:last-child {
  border-right: 0;
}

.globe-tool-group button svg {
  width: 15px;
  height: 15px;
}

.globe-tool-group button:hover,
.globe-tool-group button.is-active {
  color: #f3ead4;
  background: rgba(228, 197, 122, 0.16);
}

.globe-tool-group button.is-active {
  color: var(--world-accent, #c8b273);
}

.globe-tool-pointer {
  display: none;
}

.globe-stage.is-close .globe-tool-pointer {
  display: flex;
}

.globe-reset {
  position: absolute;
  left: 18px;
  bottom: 36px;
  transform: none;
  z-index: 2;
  border: 1px solid rgba(224, 213, 186, 0.28);
  background: rgba(12, 18, 34, 0.72);
  color: #efe6cf;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 14px;
  cursor: pointer;
}

.globe-reset:hover {
  border-color: rgba(224, 213, 186, 0.55);
}

.globe-masthead {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.globe-masthead h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.01em;
  color: #f3ead4;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.globe-masthead p {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(224, 213, 186, 0.58);
}

.fact-cards {
  display: none;
}

.fact-cards-left {
  left: 16px;
}

.fact-cards-right {
  right: 16px;
  left: auto;
}

.globe-stage.is-close .fact-cards,
.globe-stage.is-close .globe-masthead {
  opacity: 0;
  pointer-events: none;
}

.fact-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  background: rgba(10, 16, 32, 0.55);
  border: 1px solid rgba(186, 199, 224, 0.14);
  border-radius: 2px;
}

.fact-card .fc-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: rgba(214, 206, 188, 0.7);
}

.fact-card .fc-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke-width: 1.2;
}

.fact-card .fc-label {
  font-family: var(--serif);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(186, 199, 224, 0.7);
}

.fact-card .fc-value {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 14px;
  color: #f0e9d8;
}

.fact-card .fc-note {
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.4;
  color: rgba(170, 182, 206, 0.58);
}

@media (max-width: 1280px) {
  .fact-cards {
    display: none;
  }
}

.basemap-divider {
  width: 1px;
  margin: 4px 3px;
  background: var(--line-strong);
}

/* --------------------------------------------------------- map labels -- */

.map-label {
  display: block;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
  color: #e4e1d8;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.95),
    0 0 10px rgba(0, 0, 0, 0.8),
    0 1px 2px rgba(0, 0, 0, 1);
}

.map-label.is-lg {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.map-label.is-md {
  font-size: 11px;
  letter-spacing: 0.1em;
}

.map-label.is-sm {
  font-size: 9.5px;
  color: #b9b6ad;
}

/* Label colour matches how the feature is drawn on the map. */
.map-label.kind-landing {
  color: #f2907f;
}

.map-label.kind-polar {
  color: #8cc4ec;
}

.map-label.kind-anomaly {
  color: #bda2ea;
}

.map-label.kind-mountain,
.map-label.kind-valley {
  color: #d7c088;
}

.map-label.kind-mare {
  color: #a8bcd8;
}

/* ------------------------------------------------------ basemap switch -- */

.basemap-switch {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 620;
  display: flex;
  gap: 3px;
  padding: 3px;
  background: rgba(10, 11, 16, 0.9);
  border: 1px solid var(--line);
  border-radius: 9px;
  backdrop-filter: blur(10px);
}

.basemap-switch button {
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s;
}

.basemap-switch button:hover {
  color: var(--text);
}

.basemap-switch button.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.hover-chip {
  position: absolute;
  z-index: 640;
  pointer-events: none;
  padding: 8px 12px;
  background: rgba(8, 9, 13, 0.94);
  border: 1px solid rgba(228, 197, 122, 0.7);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
  color: var(--hud-text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.hover-chip .hc-region {
  color: var(--hud-text);
}

.hover-chip .hc-price {
  font-family: var(--mono);
  color: #c8b273;
}

.hover-chip .hc-owner {
  color: var(--hud-muted);
}

.office-card {
  position: absolute;
  z-index: 650;
  min-width: 198px;
  max-width: 248px;
  padding: 12px 30px 12px 12px;
  background: rgba(10, 12, 18, 0.95);
  border: 1px solid rgba(228, 197, 122, 0.5);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--hud-text);
  transform-style: preserve-3d;
}

.card-tilt {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.office-card .oc-logo,
.office-card .oc-dot {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
  background: #1a1712;
  border: 1px solid var(--line);
}

.office-card .oc-dot {
  border-radius: 50%;
}

.office-card .oc-kicker {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c8b273;
}

.office-card .oc-name {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  color: var(--hud-text);
}

.office-card .oc-tagline,
.office-card .oc-lots {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--hud-muted);
  line-height: 1.35;
}

.office-card .oc-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: #c8b273;
}

.office-card .oc-close {
  position: absolute;
  top: 4px;
  right: 6px;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--hud-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.office-card .oc-close:hover {
  color: var(--hud-text);
}

.map-hint {
  position: absolute;
  left: 14px;
  /* Clear of the activity ticker running along the bottom edge. */
  bottom: 40px;
  z-index: 610;
  margin: 0;
  font-size: 11px;
  color: var(--muted-2);
  pointer-events: none;
}

/* Owner logo pins drawn over claimed plots. */
.plot-pin {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 3px;
  background: rgba(8, 9, 13, 0.85);
  border: 1px solid var(--pin-color, var(--accent));
  border-radius: 999px;
  font-size: 10.5px;
  white-space: nowrap;
  color: var(--hud-text);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: 0.12s;
}

.plot-pin:hover {
  background: rgba(20, 22, 30, 0.95);
  transform: translate(-50%, -50%) scale(1.06);
}

.plot-pin img,
.plot-pin .pin-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.plot-pin .pin-dot {
  background: var(--pin-color, var(--accent));
}

.plot-pin .pin-name {
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------- selection -- */

.selection-bar {
  position: absolute;
  left: 50%;
  bottom: 46px;
  transform: translateX(-50%);
  z-index: 650;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 12px 10px 18px;
  background: var(--selection-bg);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.selection-summary {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.selection-summary strong {
  font-size: 13px;
}

.selection-summary span {
  font-size: 11px;
  color: var(--muted);
}

.selection-actions {
  display: flex;
  gap: 8px;
}

.primary-btn {
  border: 0;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 9px;
  cursor: pointer;
  transition: 0.15s;
}

.primary-btn:hover:not(:disabled) {
  background: var(--btn-primary-hover);
}

.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ghost-btn {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 8px 13px;
  border-radius: 9px;
  cursor: pointer;
  transition: 0.15s;
}

.ghost-btn:hover {
  color: var(--text);
  border-color: var(--muted-2);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  flex-shrink: 0;
}

.theme-toggle .theme-icon {
  width: 16px;
  height: 16px;
}

.theme-toggle .theme-icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-toggle .theme-icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle .theme-icon-moon {
  display: block;
}

:root[data-theme="light"] .topbar {
  border-bottom: 1px solid var(--line-strong);
}

:root[data-theme="light"] .drawer {
  border-left: 1px solid var(--line-strong);
}

:root[data-theme="light"] .ghost-btn {
  background: #fff;
  color: var(--text);
  border-color: var(--line-strong);
  font-weight: 600;
}

:root[data-theme="light"] .ghost-btn:hover {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--text);
}

:root[data-theme="light"] .tab {
  color: var(--muted);
  font-weight: 600;
}

:root[data-theme="light"] .tab.is-active {
  color: var(--text);
  font-weight: 700;
}

:root[data-theme="light"] .primary-btn {
  font-weight: 700;
  letter-spacing: 0.01em;
}

:root[data-theme="light"] .price-block {
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--line-strong);
}

:root[data-theme="light"] .price-block .primary-btn {
  width: 100%;
  min-height: 44px;
  font-size: 14px;
}

:root[data-theme="light"] .price-block .pb-value {
  color: var(--text);
  font-weight: 700;
}

:root[data-theme="light"] .price-block .pb-label,
:root[data-theme="light"] .price-block .pb-sub,
:root[data-theme="light"] .price-block .pb-land,
:root[data-theme="light"] .panel-aka,
:root[data-theme="light"] .deed-code,
:root[data-theme="light"] .parcel-board-label,
:root[data-theme="light"] .parcel-board-hint,
:root[data-theme="light"] .pitch-copy {
  color: var(--muted);
}

:root[data-theme="light"] .place-story,
:root[data-theme="light"] .owner-card,
:root[data-theme="light"] .receipt {
  background: #fff;
  border: 1.5px solid var(--line-strong);
}

:root[data-theme="light"] .place-story-toggle {
  color: var(--text);
  font-weight: 700;
  background: var(--panel-2);
}

:root[data-theme="light"] .search-input,
:root[data-theme="light"] .field input,
:root[data-theme="light"] .field textarea {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--line-strong);
}

:root[data-theme="light"] .search-input::placeholder {
  color: var(--muted);
}

:root[data-theme="light"] .search-results {
  background: #fff;
  border-color: var(--line-strong);
}

:root[data-theme="light"] .parcel-grid {
  border: 2px solid #1c1a16;
  gap: 4px;
}

:root[data-theme="light"] .parcel-arrow {
  background: #fff;
  color: #161410;
  border-color: var(--line-strong);
}

:root[data-theme="light"] .parcel-arrow:hover:not(:disabled) {
  background: var(--panel-2);
  border-color: #161410;
  color: #161410;
}

:root[data-theme="light"] .district-badge {
  color: #fff;
  font-weight: 700;
}

:root[data-theme="light"] .district-downtown { background: #8a3d32; }
:root[data-theme="light"] .district-basin { background: #5c5144; }
:root[data-theme="light"] .district-suburb { background: #6b5420; }
:root[data-theme="light"] .district-heights { background: #7a5614; }
:root[data-theme="light"] .district-village { background: #4a5a32; }
:root[data-theme="light"] .district-outpost { background: #4e4a46; }
:root[data-theme="light"] .district-quarter { background: #6a4a62; }
:root[data-theme="light"] .district-remote { background: #5a4a2a; }

:root[data-theme="light"] .stat-grid div {
  background: #fff;
}

:root[data-theme="light"] .stat-grid dt {
  color: var(--muted);
}

:root[data-theme="light"] .modal {
  background: #fff;
  border: 1px solid var(--line-strong);
}

:root[data-theme="light"] .headline-stats dt {
  color: var(--muted);
  font-weight: 600;
}

:root[data-theme="light"] .empty-state {
  color: var(--muted);
}

:root[data-theme="light"] .empty-state strong {
  color: var(--text);
}

:root[data-theme="light"] .ticker-item {
  color: var(--text);
}

:root[data-theme="light"] .ticker-item b {
  font-weight: 700;
}

:root[data-theme="light"] .meta-chip {
  background: #fff;
  border: 1.5px solid var(--line-strong);
  color: var(--text);
}

/* Rubber-band rectangle for shift-drag selection. */
.select-rect {
  position: absolute;
  z-index: 645;
  border: 1.5px dashed var(--accent);
  background: rgba(200, 178, 115, 0.12);
  pointer-events: none;
}

/* ---------------------------------------------------------------- ticker -- */

.ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32px;
  z-index: 605;
  overflow: hidden;
  background: linear-gradient(to top, var(--ticker-from), transparent);
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.ticker-track {
  display: flex;
  gap: 36px;
  padding-left: 100%;
  white-space: nowrap;
  animation: ticker-scroll 120s linear infinite;
  will-change: transform;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  to {
    transform: translateX(-100%);
  }
}

.ticker-item {
  font-size: 11.5px;
  color: var(--muted);
}

.ticker-item b {
  color: var(--text);
  font-weight: 500;
}

.ticker-item .t-amount {
  font-family: var(--mono);
  color: var(--accent);
}

.ticker-item .t-took {
  color: var(--danger);
}

/* ---------------------------------------------------------------- drawer -- */

.drawer {
  grid-area: drawer;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
  overflow: hidden;
}

.app.drawer-collapsed .drawer {
  display: none;
}

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 13px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: 0.15s;
}

.tab:hover {
  color: var(--muted);
}

.tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.tab-panel {
  display: none;
  padding: 18px;
}

.tab-panel.is-active {
  display: block;
}

.drawer-toggle {
  position: absolute;
  right: var(--drawer-w);
  top: calc(var(--topbar-h) + 14px);
  z-index: 910;
  width: 22px;
  height: 44px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: var(--panel);
  cursor: pointer;
  transition: right 0.25s ease;
}

.app.drawer-collapsed .drawer-toggle {
  right: 0;
}

.drawer-toggle span {
  display: block;
  width: 6px;
  height: 6px;
  margin: 0 auto;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
}

.app.drawer-collapsed .drawer-toggle span {
  transform: rotate(135deg);
}

/* ------------------------------------------------------- drawer contents -- */

.empty-state {
  padding: 34px 8px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.7;
}

.empty-state strong {
  display: block;
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 8px;
}

.fomo-rail {
  margin-bottom: 16px;
}

.fomo-rail .prose {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.fomo-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px 12px;
  align-items: start;
  padding: 14px;
  margin-bottom: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}

.fomo-card-hero {
  grid-template-columns: 1fr;
}

.fomo-card-hero .primary-btn {
  width: 100%;
  margin-top: 4px;
}

.tab-panel .board-lead {
  margin: 0 0 18px;
}

.fomo-logo,
.fomo-dot {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.fomo-dot {
  border-radius: 50%;
}

.fomo-kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.fomo-card strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
}

.fomo-place,
.fomo-price {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

.fomo-price {
  font-family: var(--mono);
  color: var(--accent);
}

.fomo-card .primary-btn {
  grid-column: 1 / -1;
  width: 100%;
}

.fomo-vacant {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

.fomo-vacant strong {
  display: block;
  font-size: 15px;
}

.fomo-vacant p {
  margin: 6px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.fomo-vacant .ghost-btn {
  width: 100%;
}

.panel-head {
  margin-bottom: 14px;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--mono);
}

.district-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.12em;
  color: var(--badge-ink);
  background: rgba(228, 197, 122, 0.2);
}

.meta-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.1em;
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: var(--panel-2);
  font-weight: 600;
}

.district-downtown { background: rgba(196, 132, 112, 0.45); }
.district-basin { background: rgba(140, 126, 112, 0.55); }
.district-suburb { background: rgba(200, 180, 130, 0.28); }
.district-heights { background: rgba(186, 142, 78, 0.4); }
.district-village { background: rgba(140, 148, 118, 0.5); }
.district-outpost { background: rgba(168, 160, 152, 0.45); }
.district-quarter { background: rgba(176, 154, 166, 0.45); }
.district-remote { background: rgba(110, 100, 82, 0.4); }

.place-story {
  margin: 0 0 16px;
  padding: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.place-story-toggle {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.place-story-caret {
  color: var(--muted-2);
  transition: transform 0.15s ease;
}

.place-story-toggle[aria-expanded="true"] .place-story-caret {
  transform: rotate(90deg);
}

.place-story-body {
  padding: 0 12px 12px;
}

.place-story-kicker {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.place-story-where {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  margin-bottom: 8px;
}

.place-story-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.place-story-why {
  margin: 12px 0 4px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.place-story-fit {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
}

.place-story .wiki-link {
  display: inline-block;
  margin-top: 8px;
}

.panel-title {
  margin: 5px 0 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
}

.panel-aka {
  margin-top: 2px;
  font-size: 12px;
  font-style: italic;
  color: var(--muted-2);
}

.deed-code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 3px;
}

.minimap {
  height: 148px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--inset);
}

.office-pitch {
  margin: 12px 0 14px;
}

.pitch-kicker {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.pitch-copy {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

.parcel-board {
  margin: 0 0 14px;
}

.parcel-board-label,
.parcel-board-hint {
  font-size: 11px;
  color: var(--muted-2);
}

.parcel-board-label {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.parcel-board-hint {
  margin-top: 8px;
  line-height: 1.4;
}

.parcel-stage {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  grid-template-rows: 28px auto 28px;
  grid-template-areas:
    ". up ."
    "left grid right"
    ". down .";
  align-items: stretch;
  gap: 4px;
}

.parcel-arrow {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}

.parcel-arrow span {
  font-size: 9px;
  line-height: 1;
}

.parcel-arrow-up { grid-area: up; }
.parcel-arrow-left { grid-area: left; }
.parcel-arrow-right { grid-area: right; }
.parcel-arrow-down { grid-area: down; }

.parcel-arrow:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.parcel-arrow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.parcel-arrow:disabled {
  opacity: 0.28;
  cursor: default;
}

.parcel-grid {
  grid-area: grid;
  display: grid;
  grid-template-columns: repeat(var(--parcel-size, 7), 1fr);
  gap: 3px;
  aspect-ratio: 1;
  padding: 6px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  touch-action: pan-y;
}

.parcel {
  appearance: none;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--parcel-line);
  background: var(--parcel-fill);
  border-radius: 2px;
  padding: 0;
  cursor: pointer;
  min-height: 0;
}

.parcel:hover {
  background: rgba(228, 197, 122, 0.28);
  border-color: rgba(228, 197, 122, 0.7);
}

.parcel.is-selected {
  background: var(--parcel-selected-bg);
  border: 2px solid var(--parcel-selected-border);
}

.parcel.is-active {
  box-shadow: inset 0 0 0 1px #f3ead4;
}

.parcel.is-claimed {
  background: color-mix(in srgb, var(--parcel-color, #7aa2c4) 78%, #14120e);
  border-color: color-mix(in srgb, var(--parcel-color, #7aa2c4) 85%, #f3ead4);
}

.parcel.is-claimed::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    rgba(8, 7, 5, 0.38) 3px,
    rgba(8, 7, 5, 0.38) 4px
  );
  pointer-events: none;
}

.parcel-mark {
  position: absolute;
  inset: 20%;
  width: 60%;
  height: 60%;
  object-fit: cover;
  border-radius: 1px;
  z-index: 1;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(8, 7, 5, 0.45);
}

.parcel-mark.is-office {
  inset: 28%;
  width: 44%;
  height: 44%;
  background: #f3ead4;
  border-radius: 1px;
  clip-path: polygon(18% 100%, 18% 42%, 50% 12%, 82% 42%, 82% 100%);
  box-shadow: none;
}

.parcel.is-claimed.is-selected {
  background: color-mix(in srgb, var(--parcel-color, #7aa2c4) 62%, #e4c57a);
  border-color: #e4c57a;
  box-shadow: inset 0 0 0 1px rgba(20, 16, 10, 0.55);
}

.parcel.is-claimed:hover {
  background: color-mix(in srgb, var(--parcel-color, #7aa2c4) 70%, #e4c57a);
  border-color: #e4c57a;
}

.parcel.is-other {
  opacity: 0.45;
}

.parcel.is-void {
  border: none;
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.price-block .pb-land {
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 4px;
}

.price-block {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.price-block .pb-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.price-block .pb-value {
  font-family: var(--mono);
  font-size: 26px;
  color: var(--accent);
  line-height: 1.1;
  margin-top: 4px;
}

.price-block .pb-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}

.stat-grid div {
  background: var(--panel);
  padding: 11px 12px;
}

.stat-grid dt {
  font-size: 9.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.stat-grid dd {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 14px;
}

.owner-card {
  display: flex;
  gap: 11px;
  padding: 13px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--owner-color, var(--accent));
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.owner-card img,
.owner-card .owner-dot {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--owner-color, var(--accent));
}

.owner-card .owner-name {
  font-size: 14px;
  font-weight: 600;
}

.owner-card .owner-tagline {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 3px;
}

.owner-card .owner-link {
  display: inline-block;
  margin-top: 7px;
  font-size: 11.5px;
  font-family: var(--mono);
  text-decoration: none;
}

.owner-card .owner-link:hover {
  text-decoration: underline;
}

.section {
  margin-bottom: 18px;
}

.section-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 9px;
  font-family: var(--mono);
}

.prose {
  font-size: 13px;
  line-height: 1.68;
  color: var(--muted);
  margin: 0;
}

.fact-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.fact-list li {
  position: relative;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 7px;
}

.fact-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
}

.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.history-list li:last-child {
  border-bottom: 0;
}

.history-list .h-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-list .h-amount {
  font-family: var(--mono);
  color: var(--accent);
}

.history-list .h-when {
  font-size: 10.5px;
  color: var(--muted-2);
  min-width: 62px;
  text-align: right;
}

.wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
  text-decoration: none;
  margin-top: 10px;
}

.wiki-link:hover {
  color: var(--accent);
}

.report-link {
  display: block;
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--muted-2);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.report-link:hover {
  color: var(--danger);
}

/* --------------------------------------------------------------- ranking -- */

.rank-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 3px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.rank-toggle button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 11px;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.rank-toggle button.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: 0.12s;
}

.rank-row:hover {
  background: var(--panel-2);
}

.rank-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  min-width: 20px;
}

.rank-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--rank-color, var(--accent));
  flex-shrink: 0;
}

.rank-main {
  flex: 1;
  min-width: 0;
}

.rank-name {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-sub {
  font-size: 10.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.rank-value {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  text-align: right;
  flex-shrink: 0;
}

.rank-value small {
  display: block;
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 2px;
}

/* --------------------------------------------------------------- explore -- */

.region-group-title {
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-family: var(--mono);
  margin: 16px 0 7px;
}

.region-group-title:first-child {
  margin-top: 0;
}

.region-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 9px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.region-row-apollo {
  align-items: center;
}

.region-row:hover {
  background: var(--panel-2);
}

.region-row .rr-name {
  flex: 1;
  font-size: 12.5px;
}

.region-row .rr-price {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}

/* ----------------------------------------------------------------- modal -- */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 16px calc(12px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  background: var(--modal-scrim);
  backdrop-filter: blur(6px);
  contain: layout style;
}

.modal {
  width: 100%;
  max-width: 520px;
  min-height: 0;
  max-height: min(88vh, calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom, 0px));
}

.modal h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.modal .modal-sub {
  margin: 0 0 20px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.field {
  position: relative;
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  outline: none;
  resize: vertical;
  transition: 0.15s;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field .hint {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 5px;
}

.signin-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.signin-form label {
  font-size: 12px;
  color: var(--muted);
}

.signin-form input {
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.signin-or {
  text-align: center;
  margin: 12px 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.google-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 8px;
}

#signInBtn[data-signed-in] {
  color: var(--accent);
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.logo-pick-btn {
  margin-top: 4px;
}

.logo-preview {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 8px;
  border: 1px solid var(--line);
  background: var(--inset);
}

.receipt {
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 16px 0 0;
}

.receipt-fold summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--accent);
  list-style: none;
}

.receipt-fold summary::-webkit-details-marker {
  display: none;
}

.receipt-fold[open] .receipt-scroll {
  margin-top: 8px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 0;
  color: var(--muted);
}

.receipt-row.total {
  border-top: 1px solid var(--line);
  margin-top: 7px;
  padding-top: 10px;
  font-size: 15px;
  color: var(--text);
}

.receipt-row .r-amount {
  font-family: var(--mono);
  color: var(--accent);
}

.receipt-scroll {
  max-height: 132px;
  overflow-y: auto;
}

.modal-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 20px;
}

.powered-by {
  margin: 18px 0 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.powered-by a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.form-error {
  padding: 10px 12px;
  background: rgba(226, 104, 95, 0.11);
  border: 1px solid rgba(226, 104, 95, 0.35);
  border-radius: 9px;
  color: var(--danger-text);
  font-size: 12px;
  margin-bottom: 14px;
}

.success-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(99, 201, 154, 0.14);
  border: 1px solid rgba(99, 201, 154, 0.4);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.modal-root.is-ownership {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(200, 178, 115, 0.22), transparent 42%),
    var(--modal-scrim);
}

.ownership-modal {
  max-width: 560px;
  min-height: 0;
  max-height: min(88vh, calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  text-align: center;
  padding: 28px 28px calc(22px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.ownership-modal .title-card,
.ownership-modal .field,
.ownership-modal .form-error,
.ownership-modal .modal-actions {
  text-align: left;
}

.own-stage {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 4px auto 22px;
}

.own-ring {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px solid rgba(200, 178, 115, 0.38);
  box-shadow: 0 0 0 10px rgba(200, 178, 115, 0.06);
  animation: own-pulse 2.4s ease-in-out infinite;
}

.own-disc {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 28%, #f4ead0 0%, #d4c49a 38%, #9a8c6c 78%, #6e6450 100%);
  box-shadow:
    0 0 42px rgba(200, 178, 115, 0.38),
    inset -14px -10px 18px rgba(20, 16, 10, 0.45);
  animation: own-spin 22s linear infinite;
}

.own-disc i {
  position: absolute;
  border-radius: 50%;
  background: rgba(90, 78, 58, 0.35);
}

.own-disc i:nth-child(1) { width: 22px; height: 22px; left: 20%; top: 26%; }
.own-disc i:nth-child(2) { width: 13px; height: 13px; left: 58%; top: 20%; }
.own-disc i:nth-child(3) { width: 28px; height: 28px; left: 46%; top: 50%; }

.own-flag {
  position: absolute;
  left: 62%;
  top: 42%;
  width: 3px;
  height: 0;
  background: #f4ead0;
  border-radius: 2px;
  transform-origin: bottom center;
  animation: own-plant 0.9s 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.own-flag::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  width: 0;
  height: 16px;
  background: #c8b273;
  clip-path: polygon(0 0, 100% 40%, 0 80%);
  animation: own-unfurl 0.45s 1.1s ease-out forwards;
}

.own-seal {
  position: absolute;
  right: -8px;
  bottom: -4px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid #8a6a1a;
  background:
    radial-gradient(circle at 40% 35%, #f3e0a8, #c8b273 58%, #8a6a1a);
  color: #3d2a06;
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(20, 16, 10, 0.28);
  transform: scale(0) rotate(-18deg);
  animation: own-stamp 0.55s 1.35s cubic-bezier(0.15, 1.4, 0.3, 1) forwards;
}

.own-kicker {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.own-headline {
  margin: 0 0 8px !important;
  font-family: var(--serif);
  font-size: 32px !important;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1.15;
  animation: own-rise 0.7s 0.2s ease both;
}

.own-sub {
  margin-bottom: 18px !important;
  font-size: 14px !important;
  animation: own-rise 0.7s 0.35s ease both;
}

@keyframes own-spin {
  to { transform: rotate(360deg); }
}

@keyframes own-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes own-plant {
  from { height: 0; top: 42%; }
  to { height: 54px; top: 8%; }
}

@keyframes own-unfurl {
  from { width: 0; }
  to { width: 22px; }
}

@keyframes own-stamp {
  0% { transform: scale(1.6) rotate(-28deg); opacity: 0; }
  70% { transform: scale(0.92) rotate(-8deg); opacity: 1; }
  100% { transform: scale(1) rotate(-8deg); opacity: 1; }
}

@keyframes own-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .own-ring,
  .own-disc,
  .own-flag,
  .own-flag::after,
  .own-seal,
  .own-headline,
  .own-sub {
    animation: none !important;
  }
  .own-flag { height: 54px; top: 8%; }
  .own-flag::after { width: 22px; }
  .own-seal { transform: scale(1) rotate(-8deg); }
}

.title-card {
  margin: 0 0 16px;
  padding: 16px 16px 14px;
  background: #f7f5f0;
  border: 1px solid #8f8878;
  color: #14120e;
}

:root[data-theme="light"] .title-card {
  background: #fffdf8;
}

.title-card-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b4a08;
}

.title-card-place-name {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  line-height: 1.2;
}

.title-card-holder {
  margin: 6px 0 14px;
  font-size: 12.5px;
  color: #3f3b34;
}

.title-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.title-card-meta span {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5a554c;
}

.title-card-meta strong {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  word-break: break-all;
}

.title-card-row,
.title-card-total {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid #c9c4b8;
  font-size: 12px;
}

.title-card-deed,
.title-card-amt,
.title-card-total strong {
  font-family: var(--mono);
}

.title-card-place {
  color: #3f3b34;
}

.title-card-total {
  font-size: 13px;
}

.token-box {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 11px;
  background: var(--panel-2);
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  word-break: break-all;
  color: var(--accent);
  margin: 8px 0 4px;
}

.mine-find {
  display: grid;
  gap: 8px;
  margin: 16px 0 18px;
}

.mine-find label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.mine-find input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.mine-find .primary-btn,
.mine-find .ghost-btn {
  justify-self: end;
}

.mine-list {
  display: grid;
  gap: 12px;
}

.mine-card {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 12px;
  overflow: visible;
}

.mine-card-face {
  padding: 4px 14px 14px;
  perspective: 900px;
}

.mine-card .mine-row {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.mine-value {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 14px 12px;
}

.mine-value dt {
  font-size: 9.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mine-value dd {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 13px;
}

.mine-value dd.is-up {
  color: var(--accent);
}

.mine-plot {
  padding: 8px 14px 10px;
  border-top: 1px solid var(--line);
}

.mine-plot-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.mine-plot-meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.mine-bid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 12px;
}

.mine-bid span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.mine-bid-actions {
  display: flex;
  gap: 6px;
}

.mine-bid-actions .primary-btn,
.mine-bid-actions .ghost-btn {
  padding: 6px 10px;
  font-size: 12px;
}

.mine-sold {
  margin: 0;
  padding: 8px 14px 12px;
  font-size: 12px;
  color: var(--muted);
}

.mine-share {
  display: flex;
  justify-content: flex-end;
  padding: 0 14px 12px;
}

/* ---------------------------------------------------------- share card -- */

.ownership-modal .share-block,
.ownership-modal .share-card,
.ownership-modal .share-actions {
  text-align: left;
}

.share-block {
  margin: 4px 0 18px;
}

.share-card {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 18px;
  color: #1a1814;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, transparent 18%, transparent 82%, rgba(0, 0, 0, 0.16) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.045) 0px,
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px,
      transparent 3px
    ),
    linear-gradient(145deg, #cfd4da 0%, #9aa3ad 28%, #b8c0c8 52%, #8b949e 76%, #aeb6be 100%);
  border: 1px solid #6d747c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 0 0 3px #8f969e,
    inset 0 0 0 4px rgba(200, 178, 115, 0.55),
    0 10px 28px rgba(0, 0, 0, 0.22);
  text-align: left;
}

.share-grain,
.share-glint,
.share-rule,
.share-place,
.share-deed,
.share-hero,
.share-foot {
  position: relative;
  z-index: 1;
}

.share-grain {
  pointer-events: none;
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.share-glint {
  pointer-events: none;
  position: absolute;
  z-index: 0;
  inset: -40%;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(255, 255, 255, 0.28) 48%,
    transparent 56%
  );
  transform: translateX(-60%);
  animation: share-glint 6s ease-in-out 1.2s infinite;
}

.share-rule {
  margin: 0 0 10px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c8b273;
}

.share-place {
  margin: 0;
  font-family: var(--serif);
  font-style: normal;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.15;
}

.share-deed {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #5a5448;
}

.share-hero {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(26, 24, 20, 0.16);
}

.share-pct {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #1a1814;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.42),
    0 -1px 0 rgba(0, 0, 0, 0.22);
}

.share-pct-label {
  margin-top: 6px;
  font-size: 13px;
  color: #5a5448;
}

.share-lots,
.share-area {
  margin-top: 4px;
  font-size: 13px;
  color: #1a1814;
}

.share-area {
  color: #5a5448;
}

.share-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.share-owner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.share-owner strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-logo {
  height: 22px;
  width: auto;
  max-width: 72px;
  object-fit: contain;
  flex: none;
  background: transparent;
}

.share-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  flex: none;
  border: 1px solid #c8b273;
  background: #c8b273;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: #3d2a06;
}

.share-site {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5a5448;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.ownership-modal .share-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  justify-content: center;
  margin: 0;
  padding: 10px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--panel) 72%, transparent);
}

.ownership-modal .share-actions .ghost-btn,
.ownership-modal .share-actions .primary-btn,
.ownership-modal .share-actions .share-x-btn {
  flex: 1 1 7.5rem;
  min-width: 0;
  justify-content: center;
}

.share-actions .ghost-btn,
.share-actions .primary-btn,
.share-x-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.share-modal {
  max-width: 480px;
}

.modal-root.is-share {
  background: var(--modal-scrim);
}

@keyframes share-glint {
  0%, 70% { transform: translateX(-60%); }
  85% { transform: translateX(60%); }
  100% { transform: translateX(60%); }
}

@media (prefers-reduced-motion: reduce) {
  .share-glint {
    animation: none !important;
  }
}

.mine-row {
  display: grid;
  gap: 4px;
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
}

.mine-row:hover {
  border-color: var(--accent);
}

.mine-row span {
  font-size: 12px;
  color: var(--muted);
}

.mine-row code {
  font-size: 11px;
  color: var(--muted-2);
  word-break: break-all;
}

.how-modal {
  max-width: 720px;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.how-steps li {
  margin: 0;
  padding: 14px 12px 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: center;
}

.how-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  margin-bottom: 8px;
}

.how-art svg {
  width: 72px;
  height: 56px;
}

.how-step {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.how-steps strong {
  display: block;
  font-size: 15px;
  color: var(--text);
}

.how-steps p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.how-fine {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.how-fine p {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted-2);
}

@media (max-width: 640px) {
  .how-steps {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------ boot state -- */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(200, 178, 115, 0.08), transparent 42%),
    var(--bg);
}

.boot-card {
  text-align: center;
  max-width: 400px;
  padding: 0 24px;
}

.boot-moon {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0 auto 22px;
}

.boot-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(200, 178, 115, 0.28);
  box-shadow: 0 0 0 8px rgba(200, 178, 115, 0.04);
  animation: boot-pulse 2.6s ease-in-out infinite;
}

.boot-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 28%, #f4ead0 0%, #d4c49a 38%, #9a8c6c 78%, #6e6450 100%);
  box-shadow:
    0 0 36px rgba(200, 178, 115, 0.28),
    inset -14px -10px 18px rgba(20, 16, 10, 0.45);
  animation: boot-spin 18s linear infinite;
}

.boot-disc i {
  position: absolute;
  border-radius: 50%;
  background: rgba(90, 78, 58, 0.35);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.12);
}

.boot-disc i:nth-child(1) { width: 18px; height: 18px; left: 22%; top: 28%; }
.boot-disc i:nth-child(2) { width: 11px; height: 11px; left: 58%; top: 22%; }
.boot-disc i:nth-child(3) { width: 24px; height: 24px; left: 48%; top: 52%; }

.boot-bar {
  width: 132px;
  height: 2px;
  margin: 18px auto 0;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}

.boot-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: boot-bar 1.5s ease-in-out infinite;
}

@keyframes boot-spin {
  to { transform: rotate(360deg); }
}

@keyframes boot-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes boot-bar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.boot-card h1 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.24em;
}

.boot-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.boot-detail {
  margin-top: 12px;
  padding: 10px 13px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted-2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
}

#bootRetry {
  margin-top: 16px;
}

/* ---------------------------------------------------------------- toasts -- */

.toast-root {
  position: fixed;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  z-index: 2500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 10px 17px;
  background: var(--toast-bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 12.5px;
  box-shadow: var(--shadow);
  animation: toast-in 0.22s ease;
}

.toast.is-error {
  border-color: rgba(226, 104, 95, 0.5);
  color: var(--danger-text);
}

.toast.is-success {
  border-color: rgba(99, 201, 154, 0.45);
  color: var(--success);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: -2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 1180px) {
  .headline-stats div:nth-child(4) {
    display: none;
  }
}

@media (max-width: 960px) {
  :root {
    --drawer-w: 320px;
  }

  .headline-stats,
  .brand-tagline {
    display: none;
  }
}

@media (max-width: 720px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: var(--topbar-h) 1fr auto;
    grid-template-areas:
      "top"
      "stage"
      "drawer";
  }

  .app.drawer-collapsed {
    grid-template-rows: var(--topbar-h) 1fr 0;
  }

  .drawer {
    max-height: 46vh;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .drawer-toggle {
    display: none;
  }

  .topbar {
    gap: 10px;
    padding: 0 10px;
  }

  .map-hint {
    display: none;
  }

  .selection-bar {
    left: 10px;
    right: 10px;
    bottom: 40px;
    transform: none;
  }
}
