:root {
  --bg: #10131c;
  --page-bg: #090b11;
  --surface: #171b28;
  --surface-strong: #1c2231;
  --surface-soft: #222838;
  --line: #343a4c;
  --text: #f6f8ff;
  --muted: #a0a7b8;
  --faint: #737b8e;
  --brand: #4e7dff;
  --brand-bright: #6aa2ff;
  --brand-dark: #2e55c9;
  --gold: #f4c861;
  --gold-dim: #cda047;
  --danger: #ff5f79;
  --success: #55d6a4;
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --shadow-blue: 0 14px 36px -16px rgba(74, 125, 255, 0.78);
  --nav-height: 84px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: radial-gradient(circle at top, #151b2a 0, var(--page-bg) 54%);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
}

.app-shell {
  width: min(100vw, 430px);
  height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.screen {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px calc(var(--nav-height) + 30px + env(safe-area-inset-bottom));
  scrollbar-width: none;
}

.scroll-area::-webkit-scrollbar {
  display: none;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: max(18px, env(safe-area-inset-top)) 4px 20px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 158, 255, 0.28));
}

.logo {
  margin: 0;
  font-size: 29px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--brand-bright);
}

.tagline {
  margin: 5px 0 0;
  color: var(--muted);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  position: relative;
}

.icon-button svg,
.nav-icon,
.inline-icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.9;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  border: 1.5px solid var(--surface);
  position: absolute;
  right: 8px;
  top: 8px;
}

.avatar {
  background: linear-gradient(145deg, #406bd5, #5a3eb8);
  border-color: rgba(106, 162, 255, 0.6);
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 14px;
}

.emergency-card {
  width: 100%;
  min-height: 106px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand), #6b4dff);
  box-shadow: 0 12px 34px -8px rgba(74, 125, 255, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.emergency-card::after {
  content: "";
  position: absolute;
  inset: -60px -80px auto auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(4px);
}

.emergency-kicker,
.card-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cfe3ff;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  position: relative;
  flex: 0 0 auto;
}

.pulse-dot::before,
.you-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: inherit;
  animation: unp-pulse 1.8s ease-out infinite;
}

.emergency-card h2 {
  margin: 7px 0 2px;
  font-size: 21px;
  line-height: 1.08;
}

.emergency-card p {
  margin: 0;
  color: #d3e3ff;
  font-size: 12.5px;
}

.emergency-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  z-index: 1;
}

.section-row {
  margin: 24px 4px 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.section-action,
.section-meta {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--brand-bright);
  background: none;
  padding: 0;
}

.section-meta {
  color: var(--muted);
}

.page-action-row {
  margin: 12px 0 14px;
}

.register-toilet-button {
  min-height: 42px;
}

.map-card {
  height: 230px;
  border-radius: 22px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 120% at 30% 20%, #263044, #141824 70%);
}

.map-water {
  position: absolute;
  width: 150px;
  height: 96px;
  border-radius: 999px;
  right: -22px;
  top: 36px;
  background: rgba(74, 125, 255, 0.18);
  filter: blur(10px);
}

.road {
  position: absolute;
  height: 7px;
  border-radius: 999px;
  background: rgba(75, 84, 109, 0.5);
  transform-origin: center;
}

.road:nth-of-type(2) { width: 300px; left: -35px; top: 42px; transform: rotate(-22deg); }
.road:nth-of-type(3) { width: 260px; right: -44px; top: 134px; transform: rotate(33deg); }
.road:nth-of-type(4) { width: 210px; left: 70px; top: 182px; transform: rotate(-8deg); }
.road:nth-of-type(5) { width: 170px; left: 100px; top: 92px; transform: rotate(82deg); }
.road:nth-of-type(6) { width: 160px; left: -22px; top: 154px; transform: rotate(50deg); }

.you-dot {
  width: 16px;
  height: 16px;
  position: absolute;
  left: 46%;
  top: 52%;
  border-radius: 50%;
  background: var(--brand-bright);
  border: 2px solid var(--bg);
  box-shadow: 0 0 12px rgba(106, 162, 255, 0.8);
  z-index: 3;
}

.you-dot::before {
  animation-duration: 2.4s;
}

.map-pin {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 12px 20px -10px rgba(0, 0, 0, 0.8);
  transform: translate(-50%, -50%);
  z-index: 4;
}

.map-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 2px;
  height: 10px;
  background: currentColor;
  transform: translateX(-50%);
  opacity: 0.65;
}

.map-pin.is-active {
  background: var(--brand);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.map-pin .star {
  color: var(--gold);
}

.recenter {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(12, 15, 24, 0.7);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--brand-bright);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}

.selected-card {
  margin-top: 16px;
}

.selected-body {
  padding: 18px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bathroom-name {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.rating-line {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12.5px;
}

.rating-number {
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
}

.dot-separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--faint);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 8px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
}

.trending-pill {
  color: var(--brand-bright);
  background: rgba(74, 125, 255, 0.16);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 8px;
  border-radius: 9px;
  align-self: flex-start;
}

.chip-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.breakdown {
  margin-top: 18px;
}

.card-kicker {
  color: var(--faint);
  letter-spacing: 0.14em;
  font-size: 11px;
}

.rating-row {
  display: grid;
  grid-template-columns: 118px 1fr 32px;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.rating-row__label {
  color: var(--muted);
  font-size: 13px;
}

.rating-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.rating-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-bright);
}

.rating-fill.is-gold {
  background: var(--gold);
}

.rating-value {
  text-align: right;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.rating-value.is-gold {
  color: var(--gold);
}

.footnote {
  margin: 13px 0 0;
  color: var(--faint);
  font-family: "Space Mono", monospace;
  font-size: 11px;
}

.card-actions {
  padding: 0 18px 18px;
  display: flex;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 46px;
  border-radius: 15px;
  padding: 0 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-button {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-blue);
}

.secondary-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.ghost-button {
  background: var(--surface-soft);
  color: var(--text);
}

.full-width {
  width: 100%;
}

.flex-1 {
  flex: 1;
}

.activity-card {
  border-radius: 20px;
}

.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.activity-row + .activity-row {
  border-top: 1px solid var(--line);
}

.mini-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(145deg, #d46b6b, #9f4cd5);
}

.mini-avatar.teal { background: linear-gradient(145deg, #41a96e, #2f7caa); }
.mini-avatar.blue { background: var(--surface-soft); color: var(--brand-bright); }
.mini-avatar.gold { background: linear-gradient(145deg, #c89331, #5b3f16); color: #fff4cd; }

.activity-copy {
  flex: 1;
  font-size: 13.5px;
  line-height: 1.35;
}

.activity-time {
  color: var(--faint);
  font-family: "Space Mono", monospace;
  font-size: 10.5px;
}

.gold-text { color: var(--gold); }
.brand-text { color: var(--brand-bright); }
.muted-text { color: var(--muted); }
.faint-text { color: var(--faint); }
.success-text { color: var(--success); }
.danger-text { color: var(--danger); }

.badge-card {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid #6c5224;
  background: linear-gradient(135deg, #312815, var(--surface) 62%);
  display: flex;
  gap: 16px;
  align-items: center;
}

.badge-medallion {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 20%, #ffedb1, #edba45 48%, #956516);
  box-shadow: inset 0 0 0 4px #5d421b, 0 16px 30px -17px #ffd36c;
  color: #302309;
}

.badge-medallion svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge-kicker {
  margin: 0 0 4px;
  color: var(--gold-dim);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.badge-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.badge-quote {
  margin: 4px 0 0;
  color: #f4dca5;
  font-size: 12.5px;
  font-style: italic;
}

.badge-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.bottom-nav {
  height: var(--nav-height);
  padding: 9px 12px max(10px, env(safe-area-inset-bottom));
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  width: min(100vw, 430px);
  transform: translateX(-50%);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
  background: rgba(16, 19, 28, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}

.nav-item {
  min-height: 58px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--muted);
  background: transparent;
  font-family: "Space Mono", monospace;
  font-size: 10px;
}

.nav-item.is-active {
  color: var(--brand-bright);
  font-weight: 700;
}

.nav-item--primary {
  transform: translateY(-6px);
}

.nav-item--primary .nav-main-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-blue);
}

.nav-item--primary span:last-child {
  margin-top: -1px;
}

.content-page {
  padding-top: 4px;
}

.page-title {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

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

.simple-card {
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.simple-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

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

.form-grid {
  display: grid;
  gap: 13px;
}

.form-field > span,
.form-field label,
.toggle-row span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 13px 14px;
  min-height: 46px;
}

.form-field textarea {
  resize: vertical;
  min-height: 92px;
}

.facility-preset-field {
  border: 0;
  padding: 0;
  margin: 0;
}

.facility-preset-field legend {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.facility-chip {
  min-width: 0;
  position: relative;
  display: block;
}

.facility-chip input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.facility-chip span {
  position: relative;
  z-index: 1;
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon note";
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  padding: 7px 10px;
  pointer-events: none;
}

.facility-chip svg {
  grid-area: icon;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--brand-bright);
}

.facility-chip b,
.facility-chip small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facility-chip b {
  grid-area: label;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.05;
}

.facility-chip small {
  grid-area: note;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.05;
}

.facility-chip input:checked + span {
  border-color: rgba(106, 162, 255, 0.66);
  background: rgba(78, 125, 255, 0.22);
  color: #e8efff;
}

.facility-chip input:checked + span small {
  color: #cbd8ff;
}

.facility-chip input:focus-visible + span {
  outline: 2px solid var(--brand-bright);
  outline-offset: 2px;
}

.issue-preset-field legend {
  color: #ffb8c5;
}

.issue-chip span {
  background: rgba(255, 95, 121, 0.08);
  border-color: rgba(255, 95, 121, 0.2);
}

.issue-chip svg {
  color: #ff8ca0;
}

.issue-chip input:checked + span {
  border-color: rgba(255, 95, 121, 0.72);
  background: rgba(255, 95, 121, 0.18);
  color: #ffe8ed;
}

.issue-chip input:checked + span small {
  color: #ffc4ce;
}

.rating-input-row {
  display: grid;
  grid-template-columns: 1fr 122px 28px;
  align-items: center;
  gap: 10px;
}

.rating-input-row label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.rating-input-row input[type="range"] {
  width: 100%;
  accent-color: var(--brand-bright);
}

.rating-input-row output {
  font-family: "Space Mono", monospace;
  color: var(--gold);
  text-align: right;
  font-weight: 700;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
}

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

.switch {
  width: 52px;
  height: 30px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.switch::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s ease, background 0.18s ease;
}

.switch[aria-pressed="true"] {
  background: rgba(74, 125, 255, 0.24);
  border-color: rgba(106, 162, 255, 0.55);
}

.switch[aria-pressed="true"]::before {
  transform: translateX(21px);
  background: var(--brand-bright);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  padding: 16px;
}

.modal {
  width: 100%;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border-radius: 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
}

.modal-header {
  padding: 18px 18px 10px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.modal-title {
  margin: 0;
  font-size: 22px;
}

.modal-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.modal-body {
  padding: 10px 18px 18px;
}

.modal--register {
  overscroll-behavior: contain;
}

.modal--register .modal-body {
  padding-top: 0;
}

.modal--register .add-form {
  display: grid;
  gap: 13px;
}

.auth-form {
  display: grid;
  gap: 13px;
}

.oauth-button {
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #f8fbff;
  color: #141821;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.oauth-button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.oauth-button__mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid rgba(20, 24, 33, 0.12);
  color: #4285f4;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(9, 11, 17, 0.45);
}

.auth-mode-toggle button {
  min-height: 40px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.auth-mode-toggle button.is-active {
  background: var(--surface-soft);
  color: var(--text);
}

.auth-notice,
.auth-error {
  padding: 11px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.35;
}

.auth-notice {
  border: 1px solid rgba(85, 214, 164, 0.4);
  background: rgba(85, 214, 164, 0.12);
  color: #c9ffe8;
}

.auth-error {
  border: 1px solid rgba(255, 95, 121, 0.42);
  background: rgba(255, 95, 121, 0.12);
  color: #ffd2da;
}

.auth-legal {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.auth-legal a {
  color: var(--accent);
  font-weight: 800;
}

.policy-page {
  width: min(860px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
  color: var(--text);
}

.policy-back-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.policy-hero {
  padding: 36px 0 20px;
}

.policy-hero .brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 800;
}

.policy-hero .brand-row img {
  width: 32px;
  height: 32px;
}

.policy-hero h1 {
  margin: 18px 0 8px;
  font-size: 42px;
  line-height: 1.02;
  letter-spacing: 0;
}

.policy-hero p,
.policy-section p,
.policy-section li {
  color: var(--muted);
  line-height: 1.65;
}

.policy-section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.policy-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: 0;
}

.policy-section p {
  margin: 0;
}

.policy-section ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.toast-root {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(390px, calc(100vw - 32px));
  pointer-events: none;
  z-index: 100;
}

.toast {
  pointer-events: auto;
  padding: 14px 15px;
  border-radius: 18px;
  background: rgba(23, 27, 40, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  gap: 12px;
  align-items: center;
  animation: toast-in 0.18s ease-out;
}

.toast + .toast {
  margin-top: 10px;
}

.toast strong {
  display: block;
  margin-bottom: 2px;
}

.toast span {
  color: var(--muted);
  font-size: 12.5px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card {
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.stat-card b {
  display: block;
  font-size: 26px;
}

.stat-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-grid {
  display: grid;
  gap: 12px;
}

.badge-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.badge-list-item.is-locked {
  opacity: 0.5;
}

.badge-list-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: radial-gradient(circle at 30% 20%, #ffedb1, #edba45 48%, #956516);
  color: #302309;
}

.badge-list-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flag-icon {
  width: 25px;
  height: 18px;
  display: inline-block;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34), 0 2px 7px rgba(0, 0, 0, 0.2);
}

.flag-icon--no {
  background:
    linear-gradient(to right, transparent 0 24%, #fff 24% 35%, #00205b 35% 46%, #fff 46% 57%, transparent 57%),
    linear-gradient(to bottom, transparent 0 34%, #fff 34% 43%, #00205b 43% 57%, #fff 57% 66%, transparent 66%),
    #ba0c2f;
}

.flag-icon--dk {
  background:
    linear-gradient(to right, transparent 0 31%, #fff 31% 43%, transparent 43%),
    linear-gradient(to bottom, transparent 0 42%, #fff 42% 58%, transparent 58%),
    #c8102e;
}

.flag-icon--ie {
  background: linear-gradient(to right, #169b62 0 33%, #fff 33% 66%, #ff883e 66% 100%);
}

.flag-icon--se {
  background:
    linear-gradient(to right, transparent 0 31%, #fecc00 31% 43%, transparent 43%),
    linear-gradient(to bottom, transparent 0 42%, #fecc00 42% 58%, transparent 58%),
    #006aa7;
}

.flag-icon--fi {
  background:
    linear-gradient(to right, transparent 0 31%, #002f6c 31% 43%, transparent 43%),
    linear-gradient(to bottom, transparent 0 42%, #002f6c 42% 58%, transparent 58%),
    #fff;
}

.badge-list-copy h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.badge-list-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.empty-state {
  padding: 22px 18px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 22px;
  color: var(--muted);
}

@keyframes unp-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  70% { transform: scale(2.6); opacity: 0; }
  100% { opacity: 0; }
}

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

@media (min-width: 620px) {
  body {
    padding: 40px 24px;
    overflow: auto;
  }

  .app-shell {
    min-height: 0;
    height: min(812px, calc(100dvh - 80px));
    border-radius: 46px;
    box-shadow:
      0 40px 90px -20px rgba(0, 0, 0, 0.7),
      0 0 0 10px #07090f,
      0 0 0 11px #343a4c;
  }

  .screen {
    min-height: 0;
    height: 100%;
  }

  .bottom-nav {
    bottom: calc(100dvh - 40px - min(812px, calc(100dvh - 80px)));
  }

  .modal-backdrop {
    border-radius: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* v0.6.1: fixed bottom navigation, only .scroll-area scrolls. */

/* v0.2 additions */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-label,
.filter-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(23, 27, 40, 0.86);
  color: var(--muted);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
}

.filter-chip.is-active {
  background: rgba(78, 125, 255, 0.22);
  border-color: rgba(106, 162, 255, 0.72);
  color: var(--text);
  box-shadow: 0 10px 20px -14px rgba(106, 162, 255, 0.8);
}

.map-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(250px, calc(100% - 36px));
  transform: translate(-50%, -50%);
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(12, 15, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  backdrop-filter: blur(14px);
  z-index: 5;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0 2px;
}

.photo-tile {
  min-height: 62px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 30% 20%, rgba(106, 162, 255, 0.24), transparent 44%),
    linear-gradient(145deg, rgba(34, 40, 56, 0.95), rgba(17, 21, 32, 0.95));
  display: flex;
  align-items: end;
  justify-content: start;
  padding: 8px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.1;
  overflow: hidden;
  position: relative;
}

.photo-tile--uploaded {
  border-color: rgba(244, 200, 97, 0.55);
  color: var(--text);
}

.photo-tile--uploaded svg {
  position: absolute;
  right: 8px;
  top: 8px;
  color: var(--gold);
}

.chip-row--compact {
  margin-top: 12px;
}

.form-field small {
  color: var(--faint);
  display: block;
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.35;
}

.form-field input[type="file"] {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(9, 11, 17, 0.5);
  border: 1px solid var(--line);
}

.history-list {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.history-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.history-row b {
  color: var(--gold);
  white-space: nowrap;
}

/* v0.3 additions */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.route-banner {
  margin: 0 0 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(106, 162, 255, 0.42);
  border-radius: 17px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  background: rgba(74, 125, 255, 0.14);
  text-align: left;
}

.route-banner > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(106, 162, 255, 0.16);
  color: var(--brand-bright);
}

.route-banner svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-banner b,
.route-banner small {
  display: block;
}

.route-banner small,
.route-banner em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.search-card {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.search-card input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  min-width: 0;
}

.search-submit,
.search-clear {
  min-height: 46px;
  border-radius: 15px;
  padding: 0 12px;
  font-weight: 700;
}

.search-submit {
  background: var(--brand);
  color: #fff;
}

.search-clear {
  background: var(--surface-soft);
  color: var(--muted);
}

.filter-bar {
  margin: 8px 0 2px;
}

.nearby-rail {
  margin: 12px -20px 0;
  padding: 0 20px 2px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nearby-rail::-webkit-scrollbar {
  display: none;
}

.nearby-pill {
  min-width: 154px;
  border-radius: 16px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}

.nearby-pill.is-active {
  border-color: rgba(106, 162, 255, 0.55);
  background: rgba(74, 125, 255, 0.16);
}

.nearby-pill b,
.nearby-pill span {
  display: block;
}

.nearby-pill b {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nearby-pill span {
  margin-top: 4px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 10.5px;
}

.closest-list {
  display: grid;
  gap: 10px;
}

.closest-row {
  min-height: 70px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
}

.closest-row:active {
  transform: translateY(1px);
}

.closest-row.is-active {
  border-color: rgba(106, 162, 255, 0.7);
  background: linear-gradient(135deg, rgba(78, 125, 255, 0.18), rgba(28, 34, 49, 0.95));
}

.closest-row.is-active .closest-rank,
.closest-row.is-active .closest-meta {
  background: rgba(106, 162, 255, 0.24);
  color: #dce8ff;
}

.closest-rank {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(106, 162, 255, 0.14);
  color: var(--brand-bright);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 800;
}

.closest-copy {
  min-width: 0;
}

.closest-copy b,
.closest-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.closest-copy b {
  font-size: 14px;
}

.closest-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 10.5px;
}

.closest-meta {
  max-width: 72px;
  border-radius: 999px;
  padding: 6px 8px;
  background: var(--surface-soft);
  color: var(--faint);
  font-family: "Space Mono", monospace;
  font-size: 9.5px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.crowd-pulse {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(20, 25, 38, 0.82);
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.crowd-pulse b,
.crowd-pulse span {
  display: block;
}

.crowd-pulse b {
  font-size: 12px;
}

.crowd-pulse > div:first-child span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.vibe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vibe-tags span {
  padding: 5px 7px;
  border-radius: 9px;
  background: rgba(106, 162, 255, 0.11);
  color: #cfe3ff;
  font-family: "Space Mono", monospace;
  font-size: 10px;
}

.trust-card {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid rgba(255, 211, 108, 0.28);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(237, 186, 69, 0.12), var(--surface) 58%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.trust-card h3 {
  margin: 5px 0 4px;
  font-size: 16px;
}

.trust-card p:last-child,
.privacy-note {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.quick-verdict {
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 13px;
  background: rgba(85, 214, 164, 0.12);
  color: #baefd9;
  font-size: 12px;
  font-weight: 700;
}

.friend-radar {
  border-color: rgba(106, 162, 255, 0.24);
}

.friend-list,
.review-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.friend-row,
.review-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.friend-row {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.friend-row b,
.friend-row small,
.review-row b,
.review-row small {
  display: block;
}

.friend-row small,
.review-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.friend-row em {
  color: var(--faint);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  font-style: normal;
  text-align: right;
}

.friend-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.friend-row__copy {
  min-width: 0;
}

.friend-row__copy b,
.friend-row__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-view,
.friend-action {
  min-width: 76px;
  min-height: 38px;
  border-radius: 13px;
  padding: 0 12px;
  font-weight: 800;
}

.friend-view {
  min-width: 58px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--line);
}

.friend-action {
  background: var(--brand);
  color: #fff;
}

.friend-action.is-added {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.friend-action.is-friend {
  border-color: rgba(85, 214, 164, 0.34);
  color: #baefd9;
}

.friend-card-actions {
  margin-top: 14px;
}

.friend-request-list {
  display: grid;
  gap: 10px;
}

.friend-request-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(106, 162, 255, 0.34);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(106, 162, 255, 0.16), transparent 42%),
    var(--surface);
}

.challenge-teaser {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background:
    radial-gradient(circle at 100% 0, rgba(244, 200, 97, 0.16), transparent 42%),
    var(--surface);
}

.challenge-teaser__icon,
.challenge-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(244, 200, 97, 0.14);
  color: var(--gold);
}

.challenge-teaser__icon svg,
.challenge-card__icon svg {
  width: 21px;
  height: 21px;
}

.challenge-teaser h3,
.challenge-card h3,
.challenge-active-note h3 {
  margin: 3px 0 3px;
}

.challenge-teaser p,
.challenge-card p,
.challenge-active-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.challenge-mode-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.challenge-mode-button {
  width: 100%;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(106, 162, 255, 0.13), transparent 46%),
    var(--surface);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon copy";
  align-items: center;
  column-gap: 12px;
  row-gap: 3px;
  text-align: left;
}

.challenge-mode-button span {
  grid-area: icon;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(106, 162, 255, 0.14);
  color: var(--brand-bright);
}

.challenge-mode-button b {
  grid-area: title;
  display: block;
}

.challenge-mode-button small {
  grid-area: copy;
  display: block;
  color: var(--muted);
  line-height: 1.3;
}

.challenge-active-note {
  margin-bottom: 14px;
  border-color: rgba(85, 214, 164, 0.34);
  background:
    radial-gradient(circle at 100% 0, rgba(85, 214, 164, 0.16), transparent 42%),
    var(--surface);
}

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

.challenge-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.challenge-card.is-finished {
  opacity: 0.78;
}

.challenge-card__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.challenge-scoreboard {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.challenge-scoreboard div {
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.challenge-scoreboard b,
.challenge-scoreboard span {
  display: block;
}

.challenge-scoreboard b {
  font-size: 18px;
}

.challenge-scoreboard span {
  margin-top: 2px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 9.5px;
  text-transform: uppercase;
}

.challenge-winner {
  margin-top: 12px;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(244, 200, 97, 0.13);
  color: #f6dd9f;
  font-weight: 800;
  font-size: 12.5px;
}

.challenge-participants {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.challenge-participant {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.challenge-participant b,
.challenge-participant small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-participant small {
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 10px;
}

.challenge-participant.is-standing {
  border-color: rgba(85, 214, 164, 0.22);
}

.challenge-participant.is-gone {
  color: var(--faint);
}

.challenge-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.challenge-actions:empty {
  display: none;
}

.section-row--tight {
  margin-top: 8px;
}

.public-profile-card {
  margin-bottom: 14px;
}

.public-profile-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.public-profile-hero h3,
.public-profile-hero p {
  margin: 0;
}

.public-profile-hero p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

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

.public-profile-actions {
  margin-top: 12px;
}

.public-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.profile-badge-pill svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

.profile-badge-pill b {
  font-size: 12px;
}

.public-history-list {
  margin-top: 0;
}

.review-row {
  grid-template-columns: 1fr auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.review-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.review-row span {
  color: var(--gold);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.badge-progress {
  margin-top: 9px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-soft);
}

.badge-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

.badge-list-copy small {
  margin-top: 6px;
  display: block;
  color: var(--faint);
  font-family: "Space Mono", monospace;
  font-size: 10.5px;
}

.city-card {
  background: radial-gradient(circle at 100% 0, rgba(74, 125, 255, 0.18), var(--surface) 48%);
}

@media (max-width: 370px) {
  .search-card {
    grid-template-columns: 1fr auto;
  }

  .search-clear {
    display: none;
  }

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

  .friend-row,
  .friend-request-row,
  .challenge-teaser {
    grid-template-columns: auto 1fr;
  }

  .friend-view,
  .friend-action {
    min-width: 0;
  }

  .friend-view {
    grid-column: 1 / 2;
  }

  .friend-action {
    grid-column: 2 / 3;
  }

  .challenge-teaser .secondary-button {
    grid-column: 1 / -1;
  }

  .challenge-actions {
    grid-template-columns: 1fr;
  }
}

/* Profile status */
.profile-status-stack {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.profile-status-stack .backend-strip,
.profile-status-stack .location-strip {
  margin: 0;
}

.install-card {
  margin: 0 0 12px;
  background:
    radial-gradient(circle at 92% 8%, rgba(106, 162, 255, 0.2), transparent 36%),
    var(--surface);
}

.install-card h3 {
  margin-top: 5px;
}

.install-card .primary-button svg,
.install-card .secondary-button svg {
  width: 18px;
  height: 18px;
}

.install-card--installed {
  border-color: rgba(85, 214, 164, 0.34);
  background:
    radial-gradient(circle at 92% 8%, rgba(85, 214, 164, 0.18), transparent 36%),
    var(--surface);
}

.install-steps {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.install-steps span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.install-steps b {
  color: var(--text);
}

.backend-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(28, 34, 49, 0.82);
}

.backend-strip b,
.backend-strip span {
  display: block;
}

.backend-strip b {
  font-size: 13px;
}

.backend-strip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.25;
}

.backend-strip--live {
  border-color: rgba(85, 214, 164, 0.42);
  background: linear-gradient(135deg, rgba(85, 214, 164, 0.12), rgba(28, 34, 49, 0.92));
}

.backend-strip--ready {
  border-color: rgba(106, 162, 255, 0.42);
  background: linear-gradient(135deg, rgba(78, 125, 255, 0.14), rgba(28, 34, 49, 0.92));
}

.backend-strip--missing {
  border-color: rgba(255, 95, 121, 0.42);
  background: linear-gradient(135deg, rgba(255, 95, 121, 0.12), rgba(28, 34, 49, 0.92));
}

.backend-strip__button {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 12px;
  padding: 0 12px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}

.two-button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.avatar {
  color: var(--text);
}

.photo-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-tile img + span {
  position: relative;
  z-index: 1;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(9, 11, 17, 0.72);
}

/* v0.6 real map + geolocation */
.location-strip {
  margin: 14px 0 4px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(28, 34, 49, 0.78);
}

.location-strip > span {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(78, 125, 255, 0.16);
  color: var(--brand-bright);
}

.location-strip b,
.location-capture b {
  display: block;
  font-size: 13px;
}

.location-strip small,
.location-capture small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.25;
  margin-top: 2px;
}

.location-strip button {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(106, 162, 255, 0.14);
  border: 1px solid rgba(106, 162, 255, 0.28);
  color: var(--brand-bright);
  font-size: 12px;
  font-weight: 700;
}

.location-strip--ready {
  border-color: rgba(85, 214, 164, 0.26);
}

.location-strip--ready > span {
  background: rgba(85, 214, 164, 0.14);
  color: var(--success);
}

.location-strip--error {
  border-color: rgba(255, 95, 121, 0.28);
}

.location-strip--error > span {
  background: rgba(255, 95, 121, 0.14);
  color: var(--danger);
}

.map-card--leaflet {
  background: #111725;
}

.leaflet-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #111725;
}

.map-card--leaflet .recenter {
  z-index: 500;
}

.lite-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #111725;
  z-index: 1;
}

.lite-map__tile {
  position: absolute;
  width: 256px;
  height: 256px;
  user-select: none;
  -webkit-user-drag: none;
}

.lite-map-pin {
  position: absolute;
  min-width: 54px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  transform: translate(-50%, -100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 12px 20px -10px rgba(0, 0, 0, 0.85);
  z-index: 8;
}

.lite-map-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 2px;
  height: 10px;
  background: currentColor;
  transform: translateX(-50%);
  opacity: 0.65;
}

.lite-map-pin span {
  color: var(--gold);
}

.lite-map-pin.is-active {
  background: var(--brand);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.lite-user-marker {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(106, 162, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 8px rgba(106, 162, 255, 0.14), 0 0 22px rgba(106, 162, 255, 0.85);
  z-index: 9;
}

.lite-user-marker span {
  display: block;
  width: 12px;
  height: 12px;
  margin: 4px;
  border-radius: 50%;
  background: var(--brand-bright);
  border: 2px solid #fff;
}

.lite-map-route {
  position: absolute;
  height: 4px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(106, 162, 255, 0.92) 0 8px, transparent 8px 15px);
  transform-origin: 0 50%;
  z-index: 6;
}

.lite-registration-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9;
}

.lite-map__notice,
.lite-map__attribution {
  position: absolute;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 11, 17, 0.74);
  color: rgba(246, 248, 255, 0.78);
  backdrop-filter: blur(10px);
  font-family: "Space Mono", ui-monospace, monospace;
}

.lite-map__notice {
  left: 10px;
  top: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
}

.lite-map__attribution {
  right: 0;
  bottom: 0;
  max-width: calc(100% - 20px);
  padding: 3px 6px;
  border-right: 0;
  border-bottom: 0;
  border-radius: 10px 0 0 0;
  font-size: 10px;
}

.lite-map__attribution a {
  color: var(--brand-bright);
}

.registration-location-panel {
  position: sticky;
  top: 0;
  z-index: 25;
  display: grid;
  gap: 10px;
  padding: 10px 0 12px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) calc(100% - 14px), rgba(15, 18, 28, 0));
}

.registration-map-card {
  position: relative;
  height: clamp(155px, 28dvh, 230px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111725;
}

.registration-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #111725;
}

.registration-map__hint {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 500;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(9, 11, 17, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 11px;
  font-family: "Space Mono", ui-monospace, monospace;
}

.map-card--leaflet .leaflet-control-attribution {
  background: rgba(9, 11, 17, 0.72);
  color: rgba(246, 248, 255, 0.75);
  border-radius: 10px 0 0 0;
  font-size: 10px;
}

.map-card--leaflet .leaflet-control-attribution a {
  color: var(--brand-bright);
}

.registration-map-card .leaflet-control-attribution {
  background: rgba(9, 11, 17, 0.72);
  color: rgba(246, 248, 255, 0.75);
  border-radius: 10px 0 0 0;
  font-size: 10px;
}

.registration-map-card .leaflet-control-attribution a {
  color: var(--brand-bright);
}

.unpissed-leaflet-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 52px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 12px 20px -10px rgba(0, 0, 0, 0.85);
}

.unpissed-leaflet-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 2px;
  height: 10px;
  background: currentColor;
  transform: translateX(-50%);
  opacity: 0.7;
}

.unpissed-leaflet-pin span {
  color: var(--gold);
}

.unpissed-leaflet-pin.is-active {
  background: var(--brand);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.unpissed-user-marker {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(106, 162, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 8px rgba(106, 162, 255, 0.14), 0 0 22px rgba(106, 162, 255, 0.85);
}

.unpissed-user-marker span {
  display: block;
  width: 12px;
  height: 12px;
  margin: 4px;
  border-radius: 50%;
  background: var(--brand-bright);
  border: 2px solid #fff;
}

.registration-location-pin {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 14px 24px -12px rgba(78, 125, 255, 0.8);
}

.registration-location-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 2px;
  height: 10px;
  background: currentColor;
  transform: translateX(-50%);
  opacity: 0.72;
}

.location-capture {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(78, 125, 255, 0.1);
  border: 1px solid rgba(106, 162, 255, 0.22);
}

.location-capture .secondary-button {
  width: auto;
  white-space: nowrap;
  padding: 9px 11px;
}

.simple-card--compact {
  padding: 14px;
  margin-bottom: 12px;
}

@media (max-width: 370px) {
  .location-strip,
  .location-capture {
    grid-template-columns: 1fr;
  }

  .location-strip > span {
    display: none;
  }
}
