:root {
  --ink: #1c2430;
  --muted: #5c6b7a;
  --line: #e4ddd2;
  --paper: #f6f3ee;
  --card: #fffdf9;
  --teal: #0e6b63;
  --teal-dark: #0a524c;
  --danger: #9d2c2c;
  --blue: #1a73e8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
}

button, input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 10px;
  background: var(--teal);
  color: white;
  font-weight: 650;
  padding: 10px 14px;
  cursor: pointer;
}

button:hover { background: var(--teal-dark); }

.ghost {
  background: transparent;
  color: var(--teal-dark);
  border: 1px solid var(--line);
}

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 10% -10%, #efe4cf 0%, transparent 60%),
    var(--paper);
}

.auth-card {
  width: min(460px, calc(100% - 32px));
  margin: 48px auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(28, 36, 48, 0.06);
}

.auth-card h1 { margin: 0 0 8px; letter-spacing: -0.03em; }
.auth-card h2 { margin: 28px 0 12px; font-size: 18px; }
.lede, .banner { color: var(--muted); line-height: 1.5; }
.banner { color: var(--danger); }

.stack { display: grid; gap: 12px; }
.stack label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.stack input, .share-row input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
}

#map { position: fixed; inset: 0; background: #e7eef2; }

.blue-dot {
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  background: var(--blue);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(28, 36, 48, 0.35);
}

.heading-arrow {
  width: 0;
  height: 0;
  margin-left: -6px;
  margin-top: -22px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 14px solid var(--blue);
  transform-origin: 6px 22px;
}

.topbar, .panel {
  position: fixed;
  z-index: 2;
  background: rgba(255, 253, 249, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(28, 36, 48, 0.08);
}

.topbar {
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
}

#status {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: 14px;
}

.text-link { color: var(--teal-dark); font-weight: 650; text-decoration: none; }

.panel {
  top: 76px;
  left: 12px;
  width: min(320px, calc(100% - 24px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 14px;
  border-radius: 14px;
}

.panel h2 { margin: 16px 0 8px; font-size: 15px; }
.panel .stack { margin-bottom: 14px; }
#precise-location { width: 100%; margin: 0 0 8px; }
.hint { margin: 0; min-height: 1.2em; color: var(--teal-dark); font-size: 13px; }

.readings {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 6px 10px;
  margin: 0;
}

.readings dt { color: var(--muted); }
.readings dd { margin: 0; font-weight: 650; }

.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; }

.people { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.people li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.people button { padding: 6px 10px; }

.directory-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 10% -10%, #efe4cf 0%, transparent 60%),
    radial-gradient(700px 380px at 110% 0%, #d7ebe7 0%, transparent 55%),
    var(--paper);
}

.directory {
  width: min(760px, calc(100% - 32px));
  margin: 40px auto 64px;
}

.directory-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.directory h1 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.directory .lede { margin: 0; max-width: 46ch; }

.directory-actions { display: flex; gap: 14px; align-items: center; }

.ghost-link {
  color: var(--teal-dark);
  font-weight: 650;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 8px 12px;
}

.directory-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(28, 36, 48, 0.06);
  overflow: hidden;
}

.empty-card { padding: 22px; }
.empty-card h2 { margin: 0 0 8px; font-size: 18px; }
.empty-card p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }

.count {
  margin: 0;
  padding: 14px 18px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.device-list { list-style: none; margin: 0; padding: 8px; display: grid; gap: 8px; }

.device-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 12px;
}

.device-row:hover { background: #f7f3ec; }

.device-ip {
  margin: 0 0 4px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.device-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.device-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c8bfb2;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--teal);
  color: white;
  font-weight: 650;
  text-decoration: none;
  padding: 10px 14px;
}

.view-btn:hover { background: var(--teal-dark); }

.view-btn.is-disabled {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; }
  #status { flex-basis: 100%; }
  .panel {
    top: auto;
    bottom: 12px;
    max-height: 42vh;
  }

  .directory-head, .device-row { flex-direction: column; align-items: stretch; }
  .view-btn { width: auto; }
  .page-head { flex-direction: column; align-items: stretch; }
  .stats { grid-template-columns: 1fr; }
}

.app-body { background: var(--paper); min-height: 100vh; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 18px 14px;
  background: #102421;
  color: #f4f7f6;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  padding: 4px 6px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--teal);
  font-size: 13px;
  font-weight: 750;
}

.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 15px; }
.brand-copy small { color: #b7cdc8; font-size: 12px; }

.side-nav { display: grid; gap: 4px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #d7e7e4;
  text-decoration: none;
  font-weight: 650;
}

.nav-link svg { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; }
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: white; }
.nav-link.is-active { background: var(--teal); color: white; }

.shell-main { margin-left: 240px; min-height: 100vh; }

.page { padding: 28px 28px 48px; }

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.page .lede { margin: 0; max-width: 52ch; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 10px 30px rgba(28, 36, 48, 0.04);
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.stat time { font-size: 18px; letter-spacing: 0; }

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px 0;
}

.card-head h2 { margin: 0; font-size: 16px; }

.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody tr:hover { background: #fbf8f3; }
.data-table .mono { font-family: Consolas, "Courier New", monospace; font-weight: 700; }
.coord-note { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.table-action { text-align: right; white-space: nowrap; width: 1%; }
.table-action .view-btn { padding: 8px 12px; }

body.shell-map #map {
  top: 0;
  right: 0;
  bottom: 0;
  left: 240px;
}

body.shell-map .topbar { left: 252px; }
body.shell-map .panel { left: 252px; }

@media (max-width: 860px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px;
    overflow: hidden;
  }

  .brand-copy { display: none; }
  .side-nav {
    display: flex;
    flex: 1;
    min-width: 0;
    gap: 4px;
    overflow-x: auto;
  }
  .nav-link { padding: 8px; white-space: nowrap; flex: 0 0 auto; font-size: 14px; gap: 6px; }
  .shell-main { margin-left: 0; }
  .page { padding: 18px 14px 32px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .stats { grid-template-columns: 1fr; }

  .prize-layout { grid-template-columns: 1fr; }
  .prize-stage { min-height: 360px; }

  body.shell-map #map { left: 0; top: 58px; }
  body.shell-map .topbar { left: 12px; top: 70px; right: 12px; }
  body.shell-map .panel { left: 12px; }
}

@media (max-width: 640px) {
  .data-table thead { display: none; }
  .data-table tr { display: block; padding: 8px 0; }
  .data-table td {
    display: block;
    border: 0;
    padding: 4px 14px;
  }
  .data-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .table-action { width: auto; text-align: left; padding-top: 8px; }
}

.prize-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: stretch;
}

.prize-copy, .prize-stage {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(28, 36, 48, 0.06);
}

.prize-copy { padding: 28px 28px 22px; }

.prize-kicker {
  margin: 0 0 10px;
  color: #8a6840;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prize-copy h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.prize-note, .prize-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.prize-proceed { min-width: 160px; }

.prize-panel {
  margin: 8px 0 18px;
  padding: 16px;
  border-radius: 14px;
  background: #f8f4ec;
  border: 1px solid #eadfcd;
}

.prize-panel h3 { margin: 0 0 8px; font-size: 18px; }

.prize-status {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
}

.prize-retry { display: inline-block; margin-top: 12px; }

.prize-fix, .prize-audit {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.prize-fix { margin-bottom: 4px; }
.prize-audit {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.prize-fix dt, .prize-audit dt { color: var(--muted); }
.prize-fix dd, .prize-audit dd { margin: 0; font-weight: 700; }

.prize-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 520px;
  padding: 24px 16px 18px;
  background:
    radial-gradient(420px 280px at 50% 28%, rgba(231, 211, 161, 0.45), transparent 70%),
    linear-gradient(180deg, #f7f1e6 0%, #fffdf9 55%);
}

.statue { width: min(280px, 100%); height: auto; }
.prize-stage figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .prize-layout { grid-template-columns: 1fr; }
  .prize-copy h2 { font-size: 26px; }
  .prize-stage { min-height: 380px; }
  .prize-fix, .prize-audit { grid-template-columns: 1fr; }
}

body.solo .shell-main { margin-left: 0; }

body.solo .page.upage {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 32px 24px 56px;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
  padding-bottom: max(56px, env(safe-area-inset-bottom));
}

body.solo .prize-copy,
body.solo .prize-stage,
body.solo .statue { max-width: 100%; }

body.solo .prize-fix dd,
body.solo .prize-audit dd,
body.solo .prize-status,
body.solo .prize-note,
body.solo .prize-panel p {
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  body.solo .page.upage { padding: 16px 14px 36px; }
  body.solo .page-head { margin-bottom: 14px; }
  body.solo .page-head h1 { font-size: 28px; }
  body.solo .prize-layout { grid-template-columns: 1fr; gap: 14px; }
  body.solo .prize-stage { order: -1; min-height: 0; padding: 12px 12px 14px; }
  body.solo .statue { width: min(220px, 70%); }
  body.solo .prize-copy { padding: 18px 16px 16px; }
  body.solo .prize-copy h2 { font-size: 24px; }
  body.solo .prize-proceed,
  body.solo .prize-retry { width: 100%; }
  body.solo .prize-fix,
  body.solo .prize-audit { grid-template-columns: minmax(108px, 38%) minmax(0, 1fr); }
}

@media (max-width: 420px) {
  body.solo .page.upage { padding: 12px 12px 28px; }
  body.solo .page-head h1 { font-size: 24px; }
  body.solo .lede { font-size: 15px; }
  body.solo .prize-copy h2 { font-size: 22px; }
  body.solo .prize-note, body.solo .prize-panel p { font-size: 15px; }
  body.solo .statue { width: min(180px, 64%); }
  body.solo .prize-fix,
  body.solo .prize-audit { grid-template-columns: 1fr; gap: 2px 0; }
  body.solo .prize-fix dd,
  body.solo .prize-audit dd { margin-bottom: 10px; }
}

@media (max-width: 860px) {
  .page {
    padding: 16px 12px 28px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .page-head h1 { font-size: 26px; }
  .page .lede { font-size: 15px; }
  .page-head .ghost-link { align-self: flex-start; }

  .directory-card { overflow: hidden; }
  .data-table { min-width: 0; }
  .data-table thead { display: none; }
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td { display: block; width: auto; }
  .data-table tr {
    margin: 0 10px 10px;
    padding: 10px 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .data-table td {
    border: 0;
    padding: 6px 12px;
    overflow-wrap: anywhere;
  }
  .data-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .table-action { width: auto; text-align: left; padding-top: 8px; }
  .table-action .view-btn,
  .table-action .view-btn.is-disabled { display: flex; width: 100%; }

  body.shell-map { overflow: hidden; }
  body.shell-map .app-shell {
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body.shell-map .sidebar {
    position: relative;
    top: auto;
    flex: 0 0 auto;
    z-index: 40;
  }
  body.shell-map .shell-main {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    margin-left: 0;
  }
  body.shell-map #map {
    position: absolute;
    inset: 0;
  }
  body.shell-map .topbar,
  body.shell-map .panel { position: absolute; }
  body.shell-map .topbar {
    top: 8px;
    left: 8px;
    right: 8px;
    align-items: flex-start;
    gap: 6px;
  }
  body.shell-map .topbar strong { overflow-wrap: anywhere; }
  body.shell-map #status { font-size: 13px; }
  body.shell-map .panel {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(40vh, 260px);
  }
  body.shell-map .readings {
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
  }
  body.shell-map .readings dd { overflow-wrap: anywhere; }
  body.shell-map .leaflet-top { top: 112px; }
  body.shell-map .leaflet-left { left: 0; }
  body.shell-map .stack input,
  body.shell-map .stack button,
  body.shell-map #precise-location { width: 100%; }
}

body.solo {
  background:
    radial-gradient(900px 420px at 0% -10%, #efe2cf 0%, transparent 55%),
    #f3eee6;
  color: #241c16;
  font-family: Outfit, "Segoe UI", sans-serif;
}

body.solo .rent-brand strong,
body.solo .rent-copy h1,
body.solo .rent-points h2,
body.solo .rent-results h2,
body.solo .room-card h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
}

body.solo .page.rent {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 28px 24px 64px;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

.rent-header {
  position: sticky;
  top: 0;
  z-index: 20;
  color: #f6f1ea;
  background:
    linear-gradient(180deg, rgba(196, 165, 116, 0.55), rgba(196, 165, 116, 0) 1px),
    #161210;
  box-shadow: 0 10px 30px rgba(22, 18, 16, 0.18);
}

.rent-header-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  min-height: 76px;
  padding: 12px 24px;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.rent-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f6f1ea;
  text-decoration: none;
}

.rent-brand-copy { display: grid; line-height: 1; }
.rent-brand-copy strong { font-size: 30px; letter-spacing: 0.01em; }
.rent-brand-copy small {
  margin-top: 4px;
  color: #c4a574;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rent-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(160deg, #e6d3ae, #b08958);
  color: #1c1612;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.rent-nav { display: flex; justify-content: center; gap: 8px; }
.rent-nav a {
  color: #f3eadf;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 8px 14px;
  border-radius: 999px;
}
.rent-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.rent-header-note {
  margin: 0;
  color: #f6f1ea;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  line-height: 1.35;
}
.rent-header-note span {
  display: block;
  color: #c4a574;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rent-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 22px;
  align-items: stretch;
}

.rent-copy, .rent-points, .rent-results {
  background: #fffdf9;
  border: 1px solid #e6dccf;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(36, 28, 22, 0.06);
}

.rent-copy { padding: 36px 36px 30px; }
.rent-copy .eyebrow { color: #8d6a3d; }
.rent-copy h1 {
  margin: 0 0 12px;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.045em;
  color: #1c1612;
}
.rent-copy .lede { max-width: 58ch; }

.filter-bar-wrap {
  margin: 0 0 18px;
  padding: 12px 14px;
  background: #fffdf9;
  border: 1px solid #e6dccf;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(36, 28, 22, 0.06);
  min-width: 0;
  max-width: 100%;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-pill, .filter-choice, .filter-clear, .filter-menu button {
  background: #fff;
  color: #1c1612;
  border: 1px solid #d9cbb8;
  font-weight: 550;
}
.filter-pill:hover, .filter-choice:hover, .filter-clear:hover, .filter-menu button:hover {
  background: #f6f1ea;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  white-space: nowrap;
}
.filter-pill.is-filters { color: #8d6a3d; border-color: #c4a574; font-weight: 650; }
.filter-pill.is-on, .filter-choice.is-on {
  background: #1c1612;
  color: #f6f1ea;
  border-color: #1c1612;
}
.filter-pill.is-on:hover, .filter-choice.is-on:hover { background: #3a2e24; }
.filter-chevron { flex: 0 0 auto; }
.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #c4a574;
  color: #1c1612;
  font-size: 11px;
  font-weight: 700;
}
.filter-count[hidden] { display: none; }
.filter-menu {
  position: fixed;
  z-index: 30;
  min-width: 200px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fffdf9;
  border: 1px solid #e6dccf;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(28, 22, 18, 0.14);
}
.filter-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
}
.filter-menu button[aria-selected="true"] { background: #1c1612; color: #f6f1ea; }
.filter-menu ul { margin: 0; padding: 0; list-style: none; }
#menu-budget { min-width: 260px; }
.budget-custom { margin: 6px 0 0; padding: 10px 8px 4px; border-top: 1px solid #efe6da; }
.filter-sheet .budget-custom { margin-top: 10px; padding: 12px 0 0; }
.budget-custom p {
  margin: 0 0 8px;
  color: #8d6a3d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.budget-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.budget-fields label { display: grid; gap: 4px; color: #5c6b7a; font-size: 12px; font-weight: 650; }
.budget-fields input {
  width: 100%;
  border: 1px solid #d9cbb8;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: #1c1612;
}
.budget-apply {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: #1c1612;
  color: #f6f1ea;
  text-align: center;
}
.budget-apply:hover, .filter-menu .budget-apply:hover { background: #3a2e24; color: #f6f1ea; }
.budget-note {
  margin: 8px 0 0;
  color: #9d2c2c;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}
.budget-note[hidden] { display: none; }
.filter-sheet {
  margin-top: 10px;
  padding: 14px 14px 12px;
  border: 1px solid #e6dccf;
  border-radius: 16px;
  background: #fbf7f1;
}
.filter-sheet[hidden] { display: none; }
.filter-group { margin-bottom: 12px; }
.filter-group p {
  margin: 0 0 8px;
  color: #8d6a3d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.filter-group .budget-note {
  color: #9d2c2c;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}
.filter-options { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-choice {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}
.filter-clear {
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
}
.rent-find {
  min-width: 220px;
  background: #1c1612;
  border-radius: 12px;
  padding: 12px 18px;
}
.rent-find:hover { background: #3a2e24; }
.rent-retry { color: #1c1612; border-color: #e0d3c2; background: #fffdf9; }
.rent-status { margin: 14px 0 0; color: var(--ink); font-weight: 650; line-height: 1.5; }
.rent-retry:not([hidden]) { display: inline-block; margin-top: 12px; }

.rent-points { display: grid; gap: 0; padding: 8px; }
.rent-points article { padding: 18px 16px; }
.rent-points article + article { border-top: 1px solid #efe6da; }
.rent-points span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: #f3e6d2;
  color: #8d6a3d;
  font-size: 13px;
  font-weight: 750;
}
.rent-points h2 { margin: 0 0 6px; font-size: 16px; }
.rent-points p { margin: 0; color: var(--muted); line-height: 1.5; }

.rent-results { margin-top: 22px; padding: 22px; }
.rent-results-head { margin-bottom: 14px; }
.rent-results h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -0.03em; }
.rent-results-head p { margin: 0; color: var(--muted); }

.room-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.room-card {
  padding: 0 0 16px;
  border: 1px solid #eadfce;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(36, 28, 22, 0.04);
}
.room-photo {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
  background: #efeae2;
}
.room-tag, .room-card h3, .room-area, .room-meta, .room-rent, .room-distance { padding-left: 16px; padding-right: 16px; }
.room-tag {
  margin: 12px 0 8px;
  color: #8a6840;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.room-card h3 { margin: 0 0 4px; font-size: 18px; }
.room-area, .room-meta { margin: 0 0 4px; color: var(--muted); }
.room-rent { margin: 10px 0 2px; font-weight: 750; }
.room-distance { margin: 0; color: #8d6a3d; font-weight: 650; }
.osm-credit { margin: 12px 0 0; color: var(--muted); font-size: 12px; }

@media (max-width: 860px) {
  body.solo .page.rent { padding: 16px 14px 36px; }
  .filter-bar-wrap { padding: 10px; }
  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .rent-header-inner {
    min-height: 0;
    grid-template-columns: 1fr auto;
    gap: 10px 12px;
    padding: 12px 14px 12px;
  }
  .rent-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .rent-nav a {
    text-align: center;
    padding: 8px 4px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.06);
  }
  .rent-brand-copy strong { font-size: 26px; }
  .rent-header-note { font-size: 12px; }
  .rent-hero, .room-list { grid-template-columns: 1fr; }
  .rent-copy { padding: 22px 16px 18px; }
  .rent-copy h1 { font-size: 34px; }
  .rent-find, .rent-retry:not([hidden]) { width: 100%; }
  .rent-results { padding: 16px; }
}

@media (max-width: 380px) {
  .rent-brand-copy small { display: none; }
  .rent-mark { width: 36px; height: 36px; font-size: 18px; }
  .rent-nav a { font-size: 12px; padding: 8px 2px; }
}
