:root {
  color-scheme: dark;
  --bg: #050708;
  --surface: #0f1619;
  --surface-2: #172126;
  --border: #283941;
  --text: #edf2f4;
  --muted: #a7b4ba;
  --teal: #1f8794;
  --green: #3b8a64;
  --rust: #b06038;
  --red: #c75858;
  --yellow: #d9c178;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.app-main {
  min-width: 0;
  overflow-x: auto;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  background: #080d0f;
  color: #ffffff;
  box-shadow: 4px 0 22px rgba(0, 0, 0, .34);
  z-index: 20;
}

.sidebar-brand {
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.sidebar-title {
  font-size: 18px;
  font-weight: 750;
}

.sidebar-subtitle {
  margin-top: 4px;
  color: #b8c5cc;
  font-size: 12px;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
  padding-top: 12px;
}

.sidebar-nav a {
  min-height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 9px 10px;
  color: #dbe3e8;
  font-size: 14px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
}

.demo-sidebar-foot {
  margin-top: 18px;
  padding: 12px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.demo-sidebar-foot .button { width: 100%; }

.demo-notice {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(217, 193, 120, .28);
  background: rgba(217, 193, 120, .1);
  color: #e6d89d;
  font-size: 12px;
  line-height: 1.45;
}

.demo-filter-form { grid-template-columns: repeat(4, minmax(120px, 1fr)) minmax(140px, 1fr) auto; }
.demo-image-stage img { width: 100%; height: 100%; object-fit: cover; }

.demo-page {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 18px 16px 40px;
}

.demo-page .demo-notice,
.visit-shell > .demo-notice { margin-bottom: 14px; border: 1px solid rgba(217, 193, 120, .28); border-radius: 6px; }

.demo-map-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.demo-map-canvas {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: radial-gradient(circle at 34% 28%, #334b43 0 4%, transparent 5%), linear-gradient(125deg, transparent 0 22%, rgba(104, 127, 112, .3) 23% 24%, transparent 25% 100%), repeating-linear-gradient(32deg, #172421 0 30px, #1d2c27 31px 60px);
}

.demo-map-canvas::before,
.demo-map-canvas::after {
  content: "";
  position: absolute;
  background: rgba(150, 167, 155, .35);
  transform: rotate(-18deg);
}

.demo-map-canvas::before { width: 120%; height: 8px; left: -10%; top: 48%; }
.demo-map-canvas::after { width: 8px; height: 120%; left: 56%; top: -10%; }

.demo-marker {
  position: absolute;
  z-index: 2;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px #000;
}

.demo-marker.advanced { background: #245c8f; }
.demo-marker.urbex { background: var(--rust); }
.demo-marker.found { background: var(--teal); }
.demo-map-label { position: absolute; left: 14px; top: 14px; padding: 7px 9px; border-radius: 5px; background: rgba(5, 7, 8, .8); font-size: 12px; }
.demo-map-legend { position: static; max-width: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.demo-explainer { margin-top: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.demo-explainer p { margin-bottom: 0; color: var(--muted); line-height: 1.6; }

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button,
input,
select,
textarea,
.button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 7px 10px;
}

button,
.button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

button:disabled {
  cursor: not-allowed;
  opacity: .72;
}

textarea {
  width: 100%;
  resize: vertical;
}

.topbar {
  min-height: 72px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout-form {
  margin: 0;
}

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

.title-group {
  min-width: 0;
}

h1,
h2 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: 21px;
}

h2 {
  font-size: 16px;
}

.subtle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.primary {
  color: #ffffff;
  border-color: var(--teal);
  background: var(--teal);
}

.secondary {
  color: #ffffff;
  border-color: var(--muted);
  background: var(--muted);
}

button.active {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px #050708, 0 0 0 2px rgba(31, 135, 148, .42);
}

button.secondary.active {
  border-color: var(--green);
  background: var(--green);
}

.ghost {
  background: var(--surface-2);
}

.disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.messages {
  display: grid;
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 12%, rgba(217, 193, 120, .16), transparent 28%),
    linear-gradient(145deg, #050505 0%, #101619 48%, #050505 100%);
  color: #edf2f4;
}

.login-shell {
  width: min(360px, calc(100vw - 32px));
}

.login-form {
  position: relative;
  overflow: hidden;
  background: rgba(12, 18, 21, .94);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .42);
  display: grid;
  gap: 14px;
  padding: 20px;
}

.login-form::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, .07) 42%, transparent 55%);
  transform: translateX(-70%);
}

.easter-active .login-form::before {
  animation: flashlight-sweep 1.3s ease-out;
}

.login-kicker {
  margin: 0;
  color: #d9c178;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.login-form input {
  background: #050505;
  border-color: rgba(255, 255, 255, .22);
  color: #ffffff;
}

.login-form .primary {
  border-color: #d9c178;
  background: #d9c178;
  color: #172026;
  font-weight: 800;
}

.invitation-shell {
  width: min(620px, calc(100vw - 32px));
  padding: 32px 0;
}

.invitation-form {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 20px;
  padding: clamp(22px, 5vw, 36px);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: rgba(12, 18, 21, .96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5);
}

.invitation-form::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #b06038, #d9c178 52%, #1f8794);
}

.invitation-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.invitation-header h1,
.invitation-invalid h1 {
  margin: 3px 0 0;
  font-size: clamp(25px, 5vw, 34px);
  line-height: 1.08;
}

.invitation-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 193, 120, .55);
  border-radius: 12px;
  background: linear-gradient(145deg, #28383d, #101719);
  color: #d9c178;
  font-size: 22px;
  font-weight: 900;
}

.invitation-intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.invitation-username {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.invitation-username span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.invitation-username strong {
  grid-row: span 2;
  align-self: center;
  color: #d9c178;
}

.invitation-username small {
  color: #718188;
}

.invitation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.invitation-grid label {
  display: grid;
  gap: 7px;
  color: #dce5e8;
  font-size: 13px;
  font-weight: 700;
}

.invitation-grid input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-color: rgba(255, 255, 255, .2);
  background: #070a0b;
}

.invitation-grid input:focus {
  outline: 2px solid rgba(217, 193, 120, .3);
  border-color: #d9c178;
}

.invitation-grid small {
  color: #809198;
  font-weight: 400;
  line-height: 1.4;
}

.invitation-grid .errorlist,
.invitation-errors .errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #ef8d8d;
  font-size: 12px;
  font-weight: 500;
}

.invitation-grid .has-error input {
  border-color: var(--red);
}

.invitation-submit {
  min-height: 48px;
  border-color: #d9c178;
  background: #d9c178;
  color: #172026;
  font-weight: 850;
  cursor: pointer;
}

.invitation-submit:hover {
  background: #ead58f;
}

.invitation-footnote {
  margin: -5px 0 0;
  color: #718188;
  font-size: 11px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.invitation-invalid {
  justify-items: start;
}

@media (max-width: 560px) {
  .invitation-grid { grid-template-columns: 1fr; }
  .invitation-shell { padding: 16px 0; }
}

.loose-brick {
  --knock: 0;
  width: 58px;
  min-height: 24px;
  margin: -2px auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border-color: rgba(217, 193, 120, .28);
  background: transparent;
  opacity: .38;
  transform: translateY(calc(var(--knock) * -1px));
  transition: opacity .16s ease, transform .16s ease, border-color .16s ease;
}

.loose-brick span {
  display: block;
  min-height: 12px;
  background: linear-gradient(180deg, #7b4129, #4d281e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.loose-brick:hover,
.loose-brick:focus-visible {
  opacity: .9;
  border-color: rgba(217, 193, 120, .72);
}

.urbex-easter-egg {
  padding: 10px;
  display: grid;
  gap: 3px;
  border: 1px dashed rgba(217, 193, 120, .65);
  border-radius: 6px;
  background: #050505;
  color: #d9c178;
  font-size: 12px;
  line-height: 1.35;
}

.urbex-easter-egg[hidden] {
  display: none;
}

.urbex-easter-egg strong {
  color: #ffffff;
}

@keyframes flashlight-sweep {
  from {
    transform: translateX(-70%);
  }
  to {
    transform: translateX(85%);
  }
}

.message {
  padding: 10px 18px;
  background: var(--surface);
  font-size: 13px;
}

.message.success {
  color: var(--green);
}

.message.error {
  color: var(--red);
}

.public-site {
  min-height: 100vh;
  background: #000000;
  color: #eef2ef;
}

.public-hero {
  position: relative;
  min-height: 195px;
  padding: 28px 24px 24px;
  background: #050505;
  display: flex;
  align-items: end;
}

.public-hero::before {
  content: none;
}

.public-hero-content {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  color: #ffffff;
}

.language-switcher { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.language-switcher a { padding: 5px 8px; border: 1px solid rgba(255,255,255,.22); border-radius: 4px; color: #dfe7e1; font-size: 11px; font-weight: 750; text-decoration: none; }
.language-switcher a[aria-current="page"] { border-color: #d9c178; color: #d9c178; background: rgba(217,193,120,.08); }

.public-kicker {
  margin: 0 0 10px;
  color: #d9c178;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.public-hero h1 {
  max-width: 760px;
  font-size: 36px;
  line-height: 1;
}

.public-lede {
  max-width: 880px;
  margin: 10px 0 0;
  color: #eef2ef;
  font-size: 15px;
  line-height: 1.45;
}

.public-hero-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.public-button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 6px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 750;
}

.public-button.primary {
  border-color: #a43d2f;
  background: #a43d2f;
}

.public-account-note {
  margin: 9px 0 0;
  color: #aeb8b1;
  font-size: 13px;
  line-height: 1.4;
}

.public-account-note a {
  color: #d9c178;
  font-weight: 750;
}

.public-intro,
.public-ethos,
.public-crawler-note {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 780px);
  gap: 32px;
  align-items: start;
  justify-content: center;
}

.public-stats {
  padding: 34px 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: #070a0b;
}

.public-process {
  padding: 34px 24px;
  background: #030303;
}

.public-process-heading,
.public-process ol,
.public-gallery-heading {
  width: min(1160px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.public-process-heading h2,
.public-gallery-heading h2 { margin: 0; font-size: 26px; }
.public-process ol { margin-top: 20px; margin-bottom: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.public-process li { min-width: 0; padding: 16px; display: flex; gap: 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; background: #101719; }
.public-process li > span { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: #d9c178; color: #172026; font-weight: 850; }
.public-process strong { display: block; font-size: 16px; }
.public-process li p { margin: 6px 0 0; color: #b9c2bc; font-size: 13px; line-height: 1.5; }

.public-stats-heading,
.public-country-stats {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.public-stats-heading h2 { margin: 0; font-size: 26px; }
.public-stats-heading > p:last-child { margin: 8px 0 0; color: #b9c2bc; line-height: 1.55; }
.public-country-stats { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.public-country-card { padding: 18px; border: 1px solid rgba(217, 193, 120, .28); border-radius: 8px; background: #142024; }
.public-country-card h3 { margin: 0 0 14px; font-size: 20px; }
.public-country-status { margin-left: 6px; padding: 3px 7px; border-radius: 999px; background: var(--green); color: #fff; font-size: 10px; vertical-align: middle; text-transform: uppercase; }
.public-country-status.planned { background: #45545b; }
.public-country-card dl { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.public-country-card dl div { min-width: 0; padding: 10px; border-radius: 6px; background: rgba(255, 255, 255, .05); }
.public-country-card dt { color: #9eacb2; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.public-country-card dd { margin: 5px 0 0; font-size: clamp(17px, 3vw, 24px); font-weight: 750; overflow-wrap: anywhere; }
.public-country-card small { display: block; margin-top: 3px; color: #829198; font-size: 10px; line-height: 1.25; }

.public-gallery-heading { padding: 38px 24px 4px; }
.public-gallery-heading > p:last-child { max-width: 760px; margin: 8px 0 0; color: #b9c2bc; line-height: 1.55; }

.public-intro h2,
.public-ethos h2,
.public-methods h2,
.public-crawler-note h2 {
  margin: 0;
  color: #ffffff;
  font-size: 26px;
  line-height: 1.15;
}

.public-intro p,
.public-ethos p,
.public-methods p,
.public-crawler-note p {
  margin: 0;
  color: #b9c2bc;
  font-size: 15px;
  line-height: 1.65;
}

.public-story {
  max-width: 780px;
  display: grid;
  gap: 14px;
}

.public-methods {
  padding: 44px 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: #070a0b;
}

.public-section-heading {
  width: min(1160px, 100%);
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 780px);
  gap: 32px;
  align-items: start;
  justify-content: center;
}

.public-story.compact {
  padding-top: 1px;
}

.public-method-grid {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.public-method-card {
  position: relative;
  min-width: 0;
  min-height: 170px;
  border: 1px solid rgba(217, 193, 120, .28);
  border-radius: 8px;
  padding: 18px 16px 16px;
  background: #142024;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
}

.public-method-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: #d9c178;
}

.public-method-card h3 {
  margin: 0 0 9px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.25;
}

.public-method-card p {
  font-size: 14px;
  line-height: 1.55;
}

.public-gallery {
  padding: 10px 24px 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.public-gallery-item {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: #050505;
  overflow: hidden;
}

.public-gallery-item figure {
  margin: 0;
}

.public-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.public-ethos {
  width: 100%;
  max-width: none;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: #030303;
  color: #ffffff;
}

.public-ethos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.public-ethos-grid p {
  min-height: 92px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, .06);
  color: #dfe7e1;
  font-weight: 650;
}

.public-crawler-note {
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: #070a0b;
}

.public-crawler-note a {
  color: #d9c178;
  font-weight: 750;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.metric {
  min-height: 70px;
  padding: 13px 16px;
  background: var(--surface);
}

.metric-label,
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.metric-value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
}

.filter-band {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.filter-form {
  display: grid;
  gap: 8px;
}

.filter-form {
  grid-template-columns: minmax(110px, .75fr) minmax(120px, .8fr) minmax(135px, .9fr) minmax(120px, .8fr) minmax(170px, 1.3fr) auto auto;
}

.workspace {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 12px;
}

.review-pane,
.image-pane,
.list-pane,
.detail-pane {
  min-width: 0;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.match-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.pane-head {
  min-height: 58px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pane-head.stacked {
  align-items: stretch;
  flex-direction: column;
}

.image-stage {
  position: relative;
  min-height: 320px;
  aspect-ratio: 4 / 3;
  background: #101820;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-stage img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  image-rendering: auto;
  object-fit: contain;
}

.empty {
  padding: 18px;
  color: #dbe3e8;
  font-size: 14px;
  text-align: center;
}

.coord-row {
  min-height: 40px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.page-info {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.result-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.result-row {
  display: block;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.result-row:hover,
.result-row.selected {
  background: #18262b;
}

.row-main,
.row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}

.row-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.row-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-reason {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1;
  color: #ffffff;
  background: var(--muted);
}

.badge.found {
  background: var(--teal);
}

.badge.urbex {
  background: var(--rust);
}

.badge.advanced {
  background: #245c8f;
}

.badge.no-urbex {
  background: var(--muted);
}

.badge.error {
  background: var(--red);
}

.badge.queued {
  color: var(--text);
  background: #203039;
  border: 1px solid var(--border);
}

.badge.clear {
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.badge.manual {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4);
}

.empty-list,
.empty-detail {
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
}

.annotation-form {
  padding: 0;
}

.annotation-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.review-controls {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 8px;
}

.review-controls .pagination,
.review-controls .annotation-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-controls .button,
.review-controls button {
  width: 100%;
  min-height: 44px;
}

.decision-head {
  padding: 14px 12px 8px;
}

.decision-head h2 {
  margin-top: 4px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(132px, .62fr) minmax(0, 1.38fr);
  border-bottom: 1px solid var(--border);
}

.field-label,
.field-value {
  min-width: 0;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.35;
}

.field-label {
  color: var(--muted);
  background: var(--surface-2);
  font-weight: 650;
}

.field-value {
  overflow-wrap: anywhere;
}

.raw-json {
  flex: 1;
  min-height: 180px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: #dce6ea;
  background: #101820;
  font-size: 12px;
  line-height: 1.4;
}

.blog-shell {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.blog-list {
  display: grid;
  gap: 14px;
}

.blog-card,
.blog-article,
.blog-empty {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.blog-card h2 {
  margin-top: 5px;
  font-size: 20px;
}

.blog-card-image,
.blog-hero-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
}

.blog-card-image { max-height: 260px; margin-bottom: 16px; }
.blog-hero-image { margin: 4px 0 24px; }

.blog-card h2 a:hover,
.blog-read-more,
.blog-back {
  color: var(--yellow);
}

.blog-card p,
.blog-empty p,
.blog-body {
  color: var(--muted);
  line-height: 1.65;
}

.blog-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.blog-author { margin-top: 5px; color: var(--muted); font-size: 12px; }
.blog-edit-link { margin-left: 14px; }
.blog-editor .visit-form-grid label:nth-last-child(-n+4) { grid-column: auto; }
.blog-editor .visit-form-grid label:nth-child(3),
.blog-editor .visit-form-grid label:nth-child(4) { grid-column: 1 / -1; }

.blog-read-more {
  display: inline-block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 750;
}

.blog-article {
  padding: clamp(20px, 5vw, 42px);
}

.blog-article h1 {
  margin-top: 8px;
  font-size: clamp(28px, 6vw, 42px);
}

.blog-lede {
  margin: 14px 0 24px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.55;
}

.blog-body p:first-child { margin-top: 0; }
.blog-body p:last-child { margin-bottom: 0; }
.blog-body img { max-width: 100%; height: auto; }
.blog-body .richtext-image.left { float: left; margin: 0 18px 12px 0; }
.blog-body .richtext-image.right { float: right; margin: 0 0 12px 18px; }
.blog-body .richtext-image.full-width { width: 100%; }
.blog-body::after { display: block; clear: both; content: ""; }

.visit-shell {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.visit-list { display: grid; gap: 14px; }

.visit-card,
.visit-form {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.visit-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.visit-card h2 { margin-top: 5px; font-size: 20px; }

.visit-facts {
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.visit-facts div {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
}

.visit-facts dt { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.visit-facts dd { margin: 4px 0 0; font-size: 14px; font-weight: 700; }

.visit-note { margin-top: 14px; }
.visit-note strong { font-size: 13px; }
.visit-note p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.visit-note.warning strong { color: var(--yellow); }

.visit-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.visit-form-grid label { display: grid; align-content: start; gap: 6px; font-size: 13px; font-weight: 700; }
.visit-form-grid label:first-child,
.visit-form-grid label:nth-last-child(-n+4) { grid-column: 1 / -1; }
.visit-form-grid input,
.visit-form-grid select,
.visit-form-grid textarea { width: 100%; }
.visit-form-grid small { color: var(--muted); font-weight: 400; }
.visit-form-grid .errorlist,
.visit-form-errors .errorlist { margin: 0; padding: 0; list-style: none; color: var(--red); font-size: 12px; }
.visit-form-actions { margin-top: 18px; display: flex; gap: 8px; }
.visit-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.visit-photo { margin: 0; display: grid; gap: 8px; }
.visit-photo img,
.visit-photo-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.visit-delete-form { margin-top: 12px; }
.danger { border-color: var(--red); color: #fff; background: var(--red); }
.visit-picker { margin-bottom: 14px; }
.visit-picker-controls { grid-template-columns: minmax(0, 360px); }

.map-shell {
  height: calc(100vh - 72px);
  min-height: 560px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.map-toolbar {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(180px, 260px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.map-count {
  color: var(--muted);
  font-size: 13px;
}

.map-stage {
  min-height: 0;
  position: relative;
}

#urbexMap {
  height: 100%;
  min-height: 520px;
}

.urbex-map-marker {
  border: 0;
  background: transparent;
}

.urbex-map-marker span {
  width: 14px;
  height: 14px;
  display: block;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--marker-color, #8b3f1f);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .65);
}

.map-legend {
  position: absolute;
  right: 12px;
  bottom: 18px;
  z-index: 500;
  max-width: min(520px, calc(100% - 24px));
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(15, 22, 25, .96);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--text);
  font-size: 12px;
  box-shadow: var(--shadow);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.help-shell {
  width: min(1100px, calc(100vw - 32px));
  margin: 18px auto 32px;
  display: grid;
  gap: 12px;
}

.help-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.help-section h2 {
  margin-bottom: 12px;
}

.help-list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(180px, .36fr) minmax(0, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.help-list dt,
.help-list dd {
  margin: 0;
  padding: 9px 11px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.35;
}

.help-list dt {
  color: var(--text);
  font-weight: 700;
}

.help-list dd {
  color: var(--muted);
}

.guide-shell {
  gap: 16px;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .34fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, #172026 0%, #233239 58%, #172026 100%);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.guide-hero h2 {
  max-width: 780px;
  margin: 0;
  font-size: 26px;
  line-height: 1.12;
}

.guide-hero p {
  max-width: 820px;
  margin: 12px 0 0;
  color: #dbe3e8;
  font-size: 15px;
  line-height: 1.55;
}

.guide-kicker {
  margin: 0 0 8px;
  color: #8b3f1f;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guide-hero .guide-kicker {
  color: #d9c178;
}

.guide-note {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(217, 193, 120, .45);
  border-radius: 8px;
  background: rgba(0, 0, 0, .22);
}

.guide-note strong {
  color: #ffffff;
  font-size: 14px;
}

.guide-note span {
  color: #dbe3e8;
  font-size: 13px;
  line-height: 1.4;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.guide-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.guide-number {
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #172026;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.guide-card h2,
.guide-section h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.guide-card p,
.guide-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.guide-section {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: grid;
  gap: 2px;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.decision-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.decision-card.positive {
  border-color: rgba(45, 106, 79, .34);
}

.decision-card.negative {
  border-color: rgba(139, 63, 31, .34);
}

.decision-card h3,
.notes-grid h3 {
  margin: 0;
  font-size: 15px;
}

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

.guide-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.48;
}

.guide-list li + li {
  margin-top: 6px;
}

.review-steps {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  counter-reset: review-step;
  list-style: none;
}

.review-steps li {
  position: relative;
  min-width: 0;
  padding: 40px 12px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.review-steps li::before {
  counter-increment: review-step;
  content: counter(review-step);
  position: absolute;
  top: 12px;
  left: 12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.review-steps strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.leaflet-bar a,
.leaflet-bar a:hover {
  background: var(--surface);
  border-bottom-color: var(--border);
  color: var(--text);
}

.leaflet-control-attribution {
  background: rgba(15, 22, 25, .88) !important;
  color: var(--muted);
}

.leaflet-control-attribution a {
  color: var(--yellow);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.leaflet-popup-content a {
  color: var(--yellow);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.notes-grid > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.notes-grid p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.story-shell {
  gap: 16px;
}

.story-hero {
  background: linear-gradient(135deg, #111718 0%, #223235 48%, #111718 100%);
}

.story-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.story-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.story-timeline {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  counter-reset: story-step;
  list-style: none;
}

.story-timeline li {
  position: relative;
  min-width: 0;
  padding: 44px 14px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.story-timeline li::before {
  counter-increment: story-step;
  content: counter(story-step);
  position: absolute;
  top: 14px;
  left: 14px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #172026;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.story-timeline strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.story-timeline span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .public-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-ethos-grid {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }

  .guide-grid,
  .guide-grid.compact,
  .review-steps,
  .story-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    height: auto;
    grid-template-columns: 1fr;
  }

  .map-shell {
    height: auto;
  }

  .image-pane {
    min-height: 460px;
  }

  .list-pane,
  .detail-pane {
    min-height: 520px;
  }
}

@media (max-width: 720px) {
  .public-hero {
    min-height: 245px;
    padding: 28px 16px 24px;
  }

  .public-hero h1 {
    font-size: 32px;
  }

  .public-lede {
    font-size: 15px;
  }

  .public-intro,
  .public-ethos,
  .public-methods,
  .public-crawler-note,
  .public-gallery {
    padding-left: 16px;
    padding-right: 16px;
    grid-template-columns: 1fr;
  }

  .public-stats { padding: 28px 16px; }
  .public-process { padding: 28px 16px; }
  .public-process ol { grid-template-columns: 1fr; }
  .public-country-stats { grid-template-columns: 1fr; }
  .public-country-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-gallery-heading { padding: 30px 16px 4px; }

  .public-section-heading {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .public-intro,
  .public-ethos,
  .public-crawler-note {
    gap: 18px;
  }

  .public-method-grid {
    grid-template-columns: 1fr;
  }

  .public-method-card {
    min-height: 0;
    padding: 14px;
  }

  .public-method-card::before {
    left: 14px;
    right: 14px;
  }

  .public-gallery {
    gap: 12px;
  }

  .topbar {
    min-height: 54px;
    padding: 9px 12px;
  }

  .user-label { display: none; }

  .app-shell { display: block; }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 6px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-brand { display: none; }

  .sidebar-nav {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    padding: 0;
  }

  .sidebar-nav a {
    min-height: 38px;
    justify-content: center;
    padding: 7px;
    font-size: 13px;
  }

  .demo-sidebar { display: flex; align-items: center; gap: 8px; }
  .demo-sidebar .sidebar-nav { flex: 1; }
  .demo-sidebar-foot { margin: 0; padding: 0; border: 0; }
  .demo-sidebar-foot .button { min-height: 38px; }
  .demo-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-page { padding: 8px 0 24px; }
  .demo-map-card,
  .demo-explainer { border-radius: 0; }
  .demo-map-canvas { min-height: 420px; }

  .metrics {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .filter-form,
  .map-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    padding: 8px 0 20px;
  }

  .blog-shell { padding: 8px 0 24px; }
  .blog-card,
  .blog-article,
  .blog-empty { border-radius: 0; }

  .visit-shell { padding: 8px 0 24px; }
  .visit-card,
  .visit-form { border-radius: 0; }
  .visit-form-grid { grid-template-columns: 1fr; }
  .visit-form-grid label { grid-column: 1; }
  .visit-facts { grid-template-columns: 1fr; }

  .review-pane { border-radius: 0; }

  .image-stage {
    min-height: 0;
    aspect-ratio: 1 / 1;
  }

  .review-controls { grid-template-columns: 1fr; }

  .detail-grid { grid-template-columns: minmax(105px, .6fr) minmax(0, 1.4fr); }

  .help-list {
    grid-template-columns: 1fr;
  }

  .guide-hero,
  .decision-grid,
  .notes-grid,
  .story-copy,
  .guide-grid,
  .guide-grid.compact,
  .review-steps,
  .story-timeline {
    grid-template-columns: 1fr;
  }
}
