/* ============================================================
   Партизанск — городской квест
   Светлая тема: бумага, терракота, хвоя, мягкие карточки
   ============================================================ */

:root {
  --ui-scale: 1;
  --bg: #f3eee3;
  --bg-2: #ece4d5;
  --surface: #fffdf8;
  --surface-2: #f8f2e6;
  --surface-3: #f1e9da;
  --ink: #1f2b25;
  --ink-2: #44534a;
  --muted: #7b877d;
  --dim: #9aa39b;
  --line: rgba(31, 43, 37, 0.1);
  --line-strong: rgba(31, 43, 37, 0.18);
  --clay: #b8532d;
  --clay-dark: #98401f;
  --clay-soft: #f5dfd3;
  --forest: #24473c;
  --forest-2: #315b4b;
  --sage: #dfe8d8;
  --sage-2: #c9d9c6;
  --amber: #d8a44a;
  --amber-soft: #f8ecd6;
  --rose: #c46f57;
  --danger: #b44733;
  --shadow-sm: 0 6px 18px rgba(74, 60, 43, 0.07);
  --shadow-md: 0 18px 45px rgba(74, 60, 43, 0.12);
  --shadow-lg: 0 30px 70px rgba(50, 43, 32, 0.16);
  --r-xl: 32px;
  --r-lg: 26px;
  --r-md: 20px;
  --r-sm: 14px;
  --font: "Avenir Next", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Avenir Next", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: calc(16px * var(--ui-scale));
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html[data-font="serif"] {
  --font: Georgia, "Times New Roman", "Palatino Linotype", serif;
  --display: Georgia, "Times New Roman", "Palatino Linotype", serif;
}

html[data-font="rounded"] {
  --font: ui-rounded, "SF Pro Rounded", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --display: ui-rounded, "SF Pro Rounded", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

html[data-font="mono"] {
  --font: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --display: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1000px 620px at 92% -12%, rgba(216, 164, 74, 0.22), transparent 62%),
    radial-gradient(900px 700px at -12% 34%, rgba(201, 217, 198, 0.6), transparent 62%),
    linear-gradient(180deg, #f8f3ea 0%, var(--bg) 48%, #efe7d8 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    repeating-linear-gradient(115deg, rgba(31, 43, 37, 0.018) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(25deg, rgba(255, 255, 255, 0.4) 0 1px, transparent 1px 11px);
  mask-image: radial-gradient(90% 80% at 50% 20%, #000 0%, transparent 100%);
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

p {
  margin: 0;
}

a {
  color: var(--clay);
  text-decoration: none;
}

a:hover {
  color: var(--clay-dark);
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--clay-soft);
  color: var(--clay-dark);
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 6px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #d6c9b4;
  border-radius: 99px;
  border: 2px solid var(--bg);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -70px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 0 0 12px 12px;
  background: var(--clay);
  color: #fff;
  font-weight: 700;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

.app-root {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
}

.shell {
  width: min(1240px, 100% - 56px);
  margin-inline: auto;
}

.view {
  animation: rise 0.45s var(--ease) both;
}

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
}

.eyebrow::before,
.kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.65;
}

.kicker.light,
.journey-card .kicker {
  color: #e8d4b2;
}

.kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 4px rgba(184, 83, 45, 0.12);
}

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

.dim {
  color: var(--dim);
}

.small {
  font-size: 0.84rem;
}

.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;
}

/* ---------------------------------------------------------- side rail */

.app-body {
  margin-left: 120px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.shell-page {
  flex: 1;
  padding: 20px 0 46px;
}

.side-rail {
  position: fixed;
  left: 18px;
  top: 18px;
  bottom: 18px;
  z-index: 60;
  width: 88px;
  padding: 14px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px) saturate(1.1);
}

.rail-brand {
  display: grid;
  place-items: center;
  padding: 2px;
  border-radius: 16px;
}

.rail-brand img {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(184, 83, 45, 0.22);
}

.rail-brand-word {
  display: none;
}

.rail-nav {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.rail-link {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 8px 3px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}

.rail-link:hover {
  color: var(--ink);
  background: rgba(31, 43, 37, 0.04);
  transform: translateY(-1px);
}

.rail-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.rail-icon svg {
  width: 20px;
  height: 20px;
}

.rail-link.is-active {
  color: var(--clay);
}

.rail-link.is-active .rail-icon {
  background: var(--clay);
  color: #fff8ef;
  box-shadow: 0 9px 18px rgba(184, 83, 45, 0.28);
}

.rail-bottom {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
}

.rail-coins {
  display: grid;
  justify-items: center;
  gap: 1px;
  width: 100%;
  padding: 7px 4px;
  border: 1px solid rgba(216, 164, 74, 0.3);
  border-radius: 14px;
  background: var(--amber-soft);
  color: #7a5615;
  font-size: 0.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rail-coin-icon svg {
  width: 17px;
  height: 17px;
  color: #a9771f;
}

.rail-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--forest);
  color: #f9f2e4;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rail-avatar:hover {
  color: #fff;
  background: var(--forest-2);
}

/* ----------------------------------------------------------- top bar */

.mobile-topbar {
  display: none;
}

.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid rgba(216, 164, 74, 0.32);
  border-radius: 999px;
  background: var(--amber-soft);
  color: #7a5615;
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.coin-pill svg {
  width: 16px;
  height: 16px;
  color: #a9771f;
}

.avatar-link {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: var(--forest);
  color: #f9f2e4;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
}

.avatar-link:hover {
  color: #fff;
  background: var(--forest-2);
}

/* -------------------------------------------------------- bottom dock */

.bottom-dock {
  display: none;
}

.minor-banner {
  border-bottom: 1px solid rgba(216, 164, 74, 0.2);
  background: rgba(248, 236, 214, 0.7);
  color: #6c4d18;
  font-size: 0.82rem;
}

.minor-inner {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
}

.minor-inner svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: #9a6d21;
}

/* ------------------------------------------------------------- buttons */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.87rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s, border-color 0.18s, box-shadow 0.18s, color 0.18s;
}

.btn:hover {
  transform: translateY(-1px);
  color: var(--btn-fg);
}

.btn:active {
  transform: translateY(0);
}

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

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn-primary {
  --btn-bg: var(--clay);
  --btn-fg: #fff9f1;
  --btn-bd: transparent;
  box-shadow: 0 10px 22px rgba(184, 83, 45, 0.24);
}

.btn-primary:hover {
  --btn-bg: var(--clay-dark);
  box-shadow: 0 14px 28px rgba(184, 83, 45, 0.3);
}

.btn-secondary {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--ink);
  --btn-bd: var(--line);
}

.btn-secondary:hover {
  --btn-bg: var(--surface-3);
  --btn-bd: var(--line-strong);
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--muted);
  --btn-bd: transparent;
}

.btn-ghost:hover {
  --btn-fg: var(--ink);
  --btn-bg: var(--surface-2);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.78rem;
}

.btn-sm svg {
  width: 15px;
  height: 15px;
}

.btn-block {
  width: 100%;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

/* --------------------------------------------------------------- forms */

.field {
  display: grid;
  gap: 6px;
}

.field > span:first-child,
.field-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.input::placeholder {
  color: var(--dim);
}

.input:hover {
  border-color: rgba(31, 43, 37, 0.28);
}

.input:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 4px rgba(184, 83, 45, 0.12);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.hint {
  font-size: 0.78rem;
  color: var(--dim);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-2);
  font-size: 0.84rem;
  line-height: 1.45;
  cursor: pointer;
}

.check input {
  appearance: none;
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 1px;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.check input:checked {
  border-color: var(--clay);
  background: var(--clay);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff9f1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}

.form-error,
.form-note {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.form-error {
  border: 1px solid rgba(180, 71, 51, 0.24);
  background: rgba(196, 111, 87, 0.12);
  color: #8d3a28;
}

.form-note {
  border: 1px solid rgba(216, 164, 74, 0.34);
  background: var(--amber-soft);
  color: #6c4d18;
}

.form-error svg,
.form-note svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.age-warning {
  display: grid;
  gap: 8px;
}

.age-warning[hidden] {
  display: none;
}

/* --------------------------------------------------------------- auth */

.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(410px, 0.86fr);
  gap: 18px;
  padding: 18px;
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  min-height: calc(100dvh - 36px);
  padding: clamp(24px, 3vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(248, 243, 234, 0.99) 0%, rgba(248, 243, 234, 0.96) 40%, rgba(248, 243, 234, 0.78) 56%, rgba(248, 243, 234, 0.24) 74%, rgba(248, 243, 234, 0.05) 100%),
    url("/img/landscape.svg") center bottom / cover no-repeat;
  box-shadow: var(--shadow-lg);
}

.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 80% 90%, rgba(36, 71, 60, 0.16), transparent 70%);
  pointer-events: none;
}

.auth-visual > * {
  position: relative;
  z-index: 1;
}

.auth-visual-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-brand:hover {
  color: var(--ink);
}

.auth-brand img {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(184, 83, 45, 0.24);
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  color: var(--ink-2);
  font-size: 0.68rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.auth-chip svg {
  width: 14px;
  height: 14px;
  color: var(--forest);
}

.auth-copy {
  max-width: 620px;
  margin-top: 4vh;
}

.auth-copy h1 {
  margin: 12px 0 16px;
  font-size: clamp(2.5rem, 4.7vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.auth-copy h1 em {
  font-style: normal;
  color: var(--clay);
}

.auth-copy .lead {
  max-width: 46ch;
  color: var(--ink-2);
  font-size: clamp(0.96rem, 1.1vw, 1.06rem);
  line-height: 1.65;
}

.auth-character {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 7px 12px 7px 7px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.auth-character img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.auth-character b {
  color: var(--ink);
}

.auth-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
}

.auth-stat {
  display: grid;
  gap: 1px;
  min-width: 104px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.8);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.auth-stat b {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--clay);
}

.auth-stat span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-foot {
  max-width: 58ch;
  color: rgba(255, 253, 248, 0.72);
  font-size: 0.7rem;
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(20, 40, 30, 0.4);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 46px);
}

.auth-card {
  display: grid;
  gap: 20px;
  width: min(440px, 100%);
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: rise 0.5s var(--ease) both;
}

.auth-card-head h2 {
  margin: 8px 0 4px;
  font-size: clamp(1.8rem, 2.4vw, 2.2rem);
  letter-spacing: -0.04em;
}

.auth-card-head .sub {
  color: var(--muted);
  font-size: 0.87rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.auth-tab {
  padding: 10px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.auth-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

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

.auth-legal {
  color: var(--dim);
  font-size: 0.72rem;
  line-height: 1.5;
}

.auth-error-slot:empty {
  display: none;
}

/* --------------------------------------------------------------- welcome */

.home-view {
  padding-top: 10px;
}

.welcome {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.welcome-copy h1 {
  margin: 7px 0 5px;
  font-size: clamp(1.85rem, 3vw, 2.8rem);
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.welcome-copy h1 .wave {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: wave 3s ease-in-out infinite;
}

.welcome-copy p {
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 0.94rem;
}

.welcome-side {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  padding-bottom: 4px;
}

.date-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.74rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.date-pill svg {
  width: 15px;
  height: 15px;
  color: var(--clay);
}

.status-pill.is-active {
  border-color: transparent;
  background: var(--sage);
  color: #33503e;
}

/* ------------------------------------------------------------- dashboard */

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(300px, 0.88fr);
  gap: 20px;
  align-items: start;
}

.dash-main,
.dash-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
}

@media (min-width: 1081px) and (min-height: 900px) {
  .dash-side {
    position: sticky;
    top: 20px;
  }
}

/* ticket hero */

.ticket-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  min-width: 0;
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.ticket-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  width: 100%;
  padding: clamp(24px, 3vw, 36px);
}

.ticket-main h2 {
  margin: 13px 0 11px;
  font-size: clamp(1.8rem, 2.8vw, 2.65rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.ticket-main > p {
  max-width: 40ch;
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.55;
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 20px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.7rem;
  font-weight: 700;
}

.tag svg {
  width: 14px;
  height: 14px;
  color: var(--clay);
}

.tag-accent {
  border-color: rgba(216, 164, 74, 0.28);
  background: var(--amber-soft);
  color: #7a5615;
}

.tag-accent svg {
  color: #a9771f;
}

.ticket-stub {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.barcode {
  flex: 1;
  height: 17px;
  opacity: 0.55;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 7px, transparent 7px 11px);
}

.ticket-art {
  position: relative;
  min-width: 0;
  min-height: 300px;
  margin: 12px 12px 12px 0;
  border-radius: calc(var(--r-xl) - 10px);
  background: var(--sage);
}

.ticket-art::before,
.ticket-art::after {
  content: "";
  position: absolute;
  left: -11px;
  z-index: 3;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
}

.ticket-art::before {
  top: -11px;
}

.ticket-art::after {
  bottom: -11px;
}

.ticket-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.ticket-art-badge {
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: 2;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.ticket-art-stamp {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--clay);
  color: #fff8ef;
  font-size: 0.72rem;
  font-weight: 800;
}

.ticket-art-caption {
  position: absolute;
  left: 13px;
  bottom: 13px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(36, 71, 60, 0.66);
  color: #f9f2e4;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  backdrop-filter: blur(8px);
}

/* journey card */

.journey-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--r-xl);
  background: linear-gradient(158deg, #2c5446 0%, #1e3c32 58%, #17312a 100%);
  color: #f5ecdc;
  box-shadow: var(--shadow-md);
}

.journey-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(216, 164, 74, 0.6), transparent 70%),
    repeating-radial-gradient(circle at 90% 0%, transparent 0 16px, rgba(245, 236, 220, 0.35) 17px, transparent 18px 32px);
  mask-image: linear-gradient(180deg, #000, transparent 80%);
}

.journey-card > * {
  position: relative;
  z-index: 1;
}

.journey-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.journey-count {
  padding: 5px 10px;
  border: 1px solid rgba(245, 236, 220, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5ecdc;
  font-size: 0.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.journey-body {
  display: flex;
  align-items: center;
  gap: 17px;
  margin: 17px 0 16px;
}

.journey-ring {
  --p: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 102px;
  height: 102px;
  flex: none;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #24473c 75%, transparent 76% 100%),
    conic-gradient(#e0b268 calc(var(--p) * 1%), rgba(245, 236, 220, 0.14) 0);
  transition: background 0.6s var(--ease);
}

.journey-ring span {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff8ed;
}

.journey-ring small {
  position: absolute;
  bottom: 21px;
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 236, 220, 0.55);
}

.journey-copy h3 {
  color: #fff8ed;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
}

.journey-copy p {
  margin-top: 4px;
  color: rgba(245, 236, 220, 0.66);
  font-size: 0.76rem;
  line-height: 1.45;
}

.journey-scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.journey-mark {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.journey-mark span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(245, 236, 220, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 236, 220, 0.72);
  font-size: 0.64rem;
  font-weight: 800;
}

.journey-mark span svg {
  width: 14px;
  height: 14px;
}

.journey-mark small {
  color: rgba(245, 236, 220, 0.48);
  font-size: 0.56rem;
  font-weight: 700;
}

.journey-mark.is-done span {
  border-color: var(--amber);
  background: var(--amber);
  color: #3b2a11;
}

.journey-mark.is-next span {
  border-color: var(--amber);
  color: var(--amber);
}

.journey-next {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 13px;
  border-top: 1px solid rgba(245, 236, 220, 0.12);
  color: rgba(245, 236, 220, 0.8);
  font-size: 0.73rem;
  font-weight: 600;
}

.journey-next svg {
  width: 16px;
  height: 16px;
  color: var(--amber);
}

/* generic cards */

.card {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.card-head h2,
.card-head h3 {
  margin-top: 5px;
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.card-head h3 {
  font-size: 1.2rem;
}

.card-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.count-pill {
  flex: none;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 800;
}

.ghost-link svg {
  width: 14px;
  height: 14px;
}

/* map */

.map-card {
  padding: 18px 18px 12px;
}

.map-stage {
  position: relative;
  height: 296px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--sage);
}

.map-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  justify-items: center;
  transform: translate(-50%, -100%);
  color: var(--ink);
  transition: transform 0.18s var(--ease);
}

.map-pin::after {
  content: "";
  width: 0;
  height: 0;
  margin-top: -1px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--clay);
}

.map-pin-dot {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 2px solid var(--clay);
  border-radius: 50%;
  background: var(--surface);
  color: var(--clay);
  box-shadow: 0 6px 12px rgba(50, 43, 32, 0.18);
  font-size: 0.58rem;
  font-weight: 800;
}

.map-pin-dot svg {
  width: 14px;
  height: 14px;
}

.map-pin.is-done .map-pin-dot {
  border-color: var(--surface);
  background: var(--clay);
  color: #fff8ef;
}

.map-pin:hover,
.map-pin:focus-visible {
  z-index: 8;
  transform: translate(-50%, -100%) scale(1.1);
  color: var(--ink);
}

.map-pin-name {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 190px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff8ed;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.map-pin:hover .map-pin-name,
.map-pin:focus-visible .map-pin-name {
  opacity: 1;
}

.map-compass {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.82);
  color: var(--forest);
  backdrop-filter: blur(6px);
}

.map-compass svg {
  width: 17px;
  height: 17px;
}

.map-foot {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
}

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

.legend-dot {
  width: 8px;
  height: 8px;
  border: 2px solid var(--clay);
  border-radius: 50%;
  background: var(--surface);
}

.legend-dot.is-done {
  background: var(--clay);
}

.map-note {
  margin-left: auto;
  color: var(--dim);
}

/* next locations */

.next-card {
  padding: 20px;
}

.next-card .card-head {
  margin-bottom: 8px;
}

.exp-list {
  display: grid;
  gap: 2px;
}

.exp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 15px;
  color: var(--ink);
  transition: background 0.18s;
}

.exp-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.exp-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 22%, #fff);
  color: color-mix(in srgb, var(--accent) 92%, #000 14%);
}

.exp-thumb svg {
  width: 20px;
  height: 20px;
}

.exp-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.exp-copy b {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exp-copy small {
  color: var(--muted);
  font-size: 0.65rem;
}

.exp-coin {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  color: #946a20;
  font-size: 0.66rem;
  font-weight: 800;
}

.exp-coin svg {
  width: 13px;
  height: 13px;
}

.card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--clay);
  font-size: 0.71rem;
  font-weight: 800;
}

.card-cta svg {
  width: 14px;
  height: 14px;
}

/* note */

.note-card {
  display: flex;
  gap: 11px;
  padding: 17px;
  border: 1px solid rgba(36, 71, 60, 0.08);
  border-radius: var(--r-lg);
  background: var(--sage);
}

.note-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--forest);
}

.note-icon svg {
  width: 18px;
  height: 18px;
}

.note-card p {
  margin: 5px 0 8px;
  color: #3b5144;
  font-size: 0.75rem;
  line-height: 1.5;
}

.note-card a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--forest);
  font-size: 0.68rem;
  font-weight: 800;
}

.note-card a svg {
  width: 13px;
  height: 13px;
}

/* ------------------------------------------------------------- sections */

.section {
  margin-top: 22px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.section-head h2 {
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.section-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.77rem;
}

.section-head a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 800;
}

.section-head a svg {
  width: 14px;
  height: 14px;
}

.section-head a.btn,
.section-head a.btn:hover {
  color: var(--btn-fg);
  font-size: 0.78rem;
  font-weight: 700;
}

.section-head a.btn svg {
  width: 15px;
  height: 15px;
}

.section-head .badge {
  flex: none;
  white-space: nowrap;
}

.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 3px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff8ed;
}

/* ---------------------------------------------------------- place cards */

.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 13px;
}

.place-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s;
}

.place-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.place-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 102px;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 15% 120%, rgba(255, 255, 255, 0.62), transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 38%, #fff), color-mix(in srgb, var(--accent) 16%, #fff));
}

.place-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.28) 0 1px, transparent 1px 10px);
}

.place-visual-glyph {
  position: relative;
  z-index: 1;
  color: color-mix(in srgb, var(--accent) 92%, #000 14%);
  filter: drop-shadow(0 4px 8px rgba(74, 60, 43, 0.12));
}

.place-visual-glyph svg {
  width: 42px;
  height: 42px;
}

.place-number {
  position: absolute;
  top: 10px;
  left: 12px;
  color: color-mix(in srgb, var(--accent) 62%, #000 22%);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.place-cat {
  position: absolute;
  bottom: 9px;
  left: 11px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--ink-2);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.place-check {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--clay);
  color: #fff8ef;
  box-shadow: 0 5px 12px rgba(184, 83, 45, 0.28);
}

.place-check svg {
  width: 14px;
  height: 14px;
}

.place-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 13px 14px 12px;
}

.place-body h3 {
  margin-bottom: 4px;
  font-size: 0.98rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.place-body .desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.place-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 11px;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 600;
}

.place-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.place-meta svg {
  width: 12px;
  height: 12px;
}

.place-state {
  margin-left: auto;
  color: var(--clay);
  font-weight: 800;
}

.place-card.is-done .place-state {
  color: var(--forest);
}

/* -------------------------------------------------------------- routes */

.route-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 13px;
}

.route-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, #fff), var(--surface) 46%);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s;
}

.route-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.route-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.route-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 20%, #fff);
  color: color-mix(in srgb, var(--accent) 92%, #000 12%);
}

.route-icon svg {
  width: 17px;
  height: 17px;
}

.route-era {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-count {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--clay);
  font-size: 0.63rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.route-card h3 {
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}

.route-card .desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.45;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.route-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.route-tag {
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.58rem;
  font-weight: 600;
}

.route-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.route-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.6s var(--ease);
}

.route-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 600;
}

.route-reward {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #946a20;
  font-weight: 700;
}

.route-reward svg {
  width: 13px;
  height: 13px;
}

.route-open {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--clay);
  font-weight: 800;
}

.route-open svg {
  width: 13px;
  height: 13px;
}

/* ----------------------------------------------------------- page heads */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 22px;
}

.page-head h1 {
  margin: 8px 0 6px;
  font-size: clamp(2rem, 3.6vw, 3.15rem);
  letter-spacing: -0.045em;
}

.page-head p {
  max-width: 66ch;
  color: var(--ink-2);
  font-size: 0.9rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding-top: 8px;
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 600;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--clay);
}

.breadcrumb .sep {
  opacity: 0.5;
}

/* --------------------------------------------------------- detail pages */

.detail-hero {
  position: relative;
  margin-top: 14px;
  padding: clamp(24px, 3.6vw, 42px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--r-xl);
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--accent, var(--clay)) 18%, transparent), transparent 62%),
    linear-gradient(140deg, color-mix(in srgb, var(--accent, var(--clay)) 10%, #fff) 0%, var(--surface) 55%);
  box-shadow: var(--shadow-sm);
}

.detail-watermark {
  position: absolute;
  right: 22px;
  bottom: -28px;
  color: var(--accent, var(--clay));
  opacity: 0.08;
  pointer-events: none;
}

.detail-watermark svg {
  width: 210px;
  height: 210px;
}

.detail-hero .eyebrow {
  color: color-mix(in srgb, var(--accent, var(--clay)) 82%, #000 14%);
}

.detail-hero .eyebrow::before {
  background: currentColor;
}

.detail-hero h1 {
  position: relative;
  max-width: 22ch;
  margin: 10px 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.detail-hero .subtitle {
  position: relative;
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 0.94rem;
}

.detail-chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 17px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--ink-2);
  font-size: 0.7rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.meta-chip svg {
  width: 14px;
  height: 14px;
  color: color-mix(in srgb, var(--accent, var(--clay)) 80%, #000 10%);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.prose {
  display: grid;
  gap: 15px;
  max-width: 68ch;
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.75;
}

.prose p svg,
.callout p svg {
  display: inline-block;
  width: 15px;
  height: 15px;
  vertical-align: -3px;
}

.callout {
  max-width: 68ch;
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(216, 164, 74, 0.26);
  border-radius: 20px;
  background: var(--amber-soft);
}

.callout h3 {
  margin-bottom: 9px;
  color: #8a5f1d;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.callout ul {
  display: grid;
  gap: 6px;
}

.callout li {
  position: relative;
  padding-left: 15px;
  color: #5f4a26;
  font-size: 0.84rem;
  line-height: 1.5;
}

.callout li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}

.sources {
  max-width: 68ch;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.76rem;
}

.sources summary {
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.sources ul {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.sources a {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: rgba(36, 71, 60, 0.28);
  text-underline-offset: 3px;
}

.sources a:hover {
  color: var(--clay);
}

.aside-card {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 13px;
  padding: 21px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.aside-card h3 {
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}

.reward-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

.reward-row b {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.aside-progress {
  display: grid;
  gap: 6px;
}

.aside-progress > span {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 0.68rem;
  font-weight: 700;
}

.bar {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--clay);
  transition: width 0.6s var(--ease);
}

.aside-note {
  color: var(--dim);
  font-size: 0.7rem;
  line-height: 1.5;
}

.detail-actions {
  display: grid;
  gap: 7px;
}

/* route detail */

.route-story {
  display: grid;
  gap: 13px;
  max-width: 72ch;
  margin-top: 22px;
  padding: 21px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.7;
}

.timeline {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 25px;
  bottom: 25px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent, var(--clay)), transparent);
  opacity: 0.28;
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px 13px 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 0.18s, box-shadow 0.18s;
}

.timeline-item:hover {
  transform: translateX(2px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.timeline-item.is-done {
  border-color: color-mix(in srgb, var(--accent, var(--clay)) 24%, #fff);
}

.timeline-num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.timeline-item.is-done .timeline-num {
  border-color: var(--clay);
  background: var(--clay);
  color: #fff8ef;
}

.timeline-num svg {
  width: 18px;
  height: 18px;
}

.timeline-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.timeline-copy h3 {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.timeline-copy p {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.timeline-meta .coin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #946a20;
}

.timeline-meta svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------- quiz */

.quiz-section {
  max-width: none;
  margin-top: 30px;
  scroll-margin-top: 24px;
}

@media (min-width: 900px) {
  .quiz-question {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 26px;
    align-items: start;
  }

  .question-head {
    margin-bottom: 0;
  }

  .quiz-question .options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quiz-question .option:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.quiz-shell {
  display: grid;
  gap: 12px;
}

.guardian-gate {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(216, 164, 74, 0.34);
  border-radius: var(--r-lg);
  background:
    radial-gradient(100% 100% at 0% 0%, rgba(216, 164, 74, 0.2), transparent 65%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.gate-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--amber-soft);
  color: #946a20;
}

.gate-icon svg {
  width: 21px;
  height: 21px;
}

.guardian-gate h3 {
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.guardian-gate p {
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.82rem;
}

.quiz-question {
  margin: 0;
  min-inline-size: 0;
  padding: 19px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.quiz-question + .quiz-question {
  margin-top: 0;
}

.question-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 13px;
}

.question-num {
  flex: none;
  color: var(--clay);
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 800;
}

.question-head h3 {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.question-type {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.options {
  display: grid;
  gap: 7px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.87rem;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}

.option:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
  color: var(--ink);
}

.option input {
  appearance: none;
  width: 19px;
  height: 19px;
  flex: none;
  margin-top: 1px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}

.option.multi input {
  border-radius: 6px;
}

.option input:checked {
  border-color: var(--clay);
  background: var(--clay);
  box-shadow: inset 0 0 0 4px var(--surface);
}

.option.multi input:checked {
  box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff9f1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 13px;
  background-position: center;
  background-repeat: no-repeat;
}

.option:has(input:checked) {
  border-color: rgba(184, 83, 45, 0.45);
  background: var(--clay-soft);
  color: var(--ink);
}

.option.correct {
  border-color: rgba(36, 71, 60, 0.3);
  background: var(--sage);
}

.option.incorrect {
  border-color: rgba(180, 71, 51, 0.34);
  background: rgba(196, 111, 87, 0.12);
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  margin-top: 4px;
}

.quiz-actions .spacer {
  flex: 1;
}

.quiz-actions .progress-text {
  color: var(--dim);
  font-size: 0.74rem;
  font-weight: 600;
}

/* results */

.result {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: var(--r-lg);
  animation: rise 0.4s var(--ease) both;
}

.result.success {
  border: 1px solid rgba(184, 83, 45, 0.24);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(216, 164, 74, 0.16), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.result.failure {
  border: 1px solid rgba(180, 71, 51, 0.24);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(196, 111, 87, 0.12), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.result-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.result-badge {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: 50%;
  background: var(--clay);
  color: #fff8ef;
}

.result.failure .result-badge {
  background: var(--rose);
  color: #fff8ef;
}

.result-badge svg {
  width: 25px;
  height: 25px;
}

.result-head h3 {
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.result-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.reward-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid rgba(216, 164, 74, 0.3);
  border-radius: 999px;
  background: var(--amber-soft);
  color: #7a5615;
  font-size: 0.72rem;
  font-weight: 800;
}

.reward-chip svg {
  width: 14px;
  height: 14px;
}

.rewards-list {
  display: grid;
  gap: 6px;
}

.reward-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.8rem;
}

.reward-line .icon-box {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: var(--amber-soft);
  color: #946a20;
}

.reward-line .icon-box svg {
  width: 15px;
  height: 15px;
}

.reward-line b {
  color: var(--ink);
  font-weight: 700;
}

.reward-line span {
  color: var(--muted);
  font-size: 0.72rem;
}

.reward-line .plus {
  margin-left: auto;
  color: var(--clay);
  font-weight: 800;
}

.check-list {
  display: grid;
  gap: 6px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.check-item svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
}

.check-item.ok svg {
  color: var(--forest-2);
}

.check-item.bad svg {
  color: var(--danger);
}

.check-item b {
  color: var(--ink);
  font-weight: 700;
}

.check-item .explain {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
}

/* ------------------------------------------------------------- profile */

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 14px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--r-xl);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(216, 164, 74, 0.18), transparent 62%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.avatar-big {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(155deg, #c7653a, var(--clay));
  color: #fff8ef;
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 12px 26px rgba(184, 83, 45, 0.24);
}

.profile-id h1 {
  margin: 5px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.66rem;
  font-weight: 700;
}

.badge svg {
  width: 13px;
  height: 13px;
  color: var(--clay);
}

.badge.amber {
  border-color: rgba(216, 164, 74, 0.3);
  background: var(--amber-soft);
  color: #7a5615;
}

.badge.rust {
  border-color: rgba(196, 111, 87, 0.24);
  background: rgba(196, 111, 87, 0.1);
  color: #8d3a28;
}

.profile-coins {
  display: grid;
  justify-items: end;
  gap: 1px;
}

.profile-coins b {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--clay);
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.profile-coins b svg {
  width: 24px;
  height: 24px;
}

.profile-coins span {
  color: var(--dim);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 11px;
  margin-top: 12px;
}

.stat {
  display: grid;
  gap: 2px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat span {
  color: var(--muted);
  font-size: 0.65rem;
}

.stat .bar {
  margin-top: 7px;
  height: 4px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.collection-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 0.18s, box-shadow 0.18s;
}

.collection-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.collection-card .place-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.collection-cat {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--clay-soft);
  color: var(--clay);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.collection-card h3 {
  font-size: 1.02rem;
  letter-spacing: -0.025em;
}

.collection-card .stamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--forest-2);
  font-size: 0.64rem;
  font-weight: 800;
}

.collection-card .stamp svg {
  width: 13px;
  height: 13px;
}

.collection-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.65rem;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.achievement {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.achievement.earned {
  border-color: rgba(216, 164, 74, 0.32);
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(216, 164, 74, 0.16), transparent 70%),
    var(--surface);
}

.achievement.locked {
  opacity: 0.66;
  box-shadow: none;
}

.achievement-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
}

.achievement.earned .achievement-icon {
  border-color: rgba(184, 83, 45, 0.2);
  background: var(--clay-soft);
  color: var(--clay);
}

.achievement-icon svg {
  width: 20px;
  height: 20px;
}

.achievement-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.achievement-copy h3 {
  font-size: 0.86rem;
  letter-spacing: -0.02em;
}

.achievement-copy p {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.achievement-copy .earned-at {
  margin-top: 2px;
  color: var(--clay);
  font-size: 0.64rem;
  font-weight: 700;
}

.milestone-list {
  display: grid;
  gap: 8px;
}

.milestone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.milestone.next {
  border-style: dashed;
  border-color: rgba(184, 83, 45, 0.36);
  background: linear-gradient(135deg, rgba(216, 164, 74, 0.08), var(--surface));
  box-shadow: none;
}

.milestone .num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.milestone.earned .num {
  border-color: var(--clay);
  background: var(--clay-soft);
  color: var(--clay);
}

.milestone.earned .num svg {
  width: 18px;
  height: 18px;
}

.milestone .copy {
  display: grid;
  gap: 1px;
}

.milestone .copy b {
  font-size: 0.82rem;
  font-weight: 700;
}

.milestone .copy span {
  color: var(--muted);
  font-size: 0.69rem;
}

.milestone .tail {
  margin-left: auto;
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 800;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 9px;
}

.inventory-item {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.inventory-item .glyph {
  color: var(--clay);
  font-size: 1.3rem;
  line-height: 1;
}

.inventory-item b {
  font-size: 0.78rem;
  font-weight: 700;
}

.inventory-item span {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.4;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.shop-item {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
}

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

.shop-item .glyph {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--clay);
  font-size: 1rem;
}

.price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #946a20;
  font-size: 0.7rem;
  font-weight: 800;
}

.price svg {
  width: 13px;
  height: 13px;
}

.shop-item h3 {
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}

.shop-item p {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.shop-item .btn {
  justify-self: start;
}

.transactions {
  display: grid;
  gap: 5px;
}

.transaction {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.76rem;
}

.transaction .tx-reason {
  color: var(--ink-2);
}

.transaction .tx-date {
  margin-left: auto;
  color: var(--dim);
  font-size: 0.66rem;
}

.transaction .plus {
  color: var(--clay);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------- tip card */

.tip-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.55);
}

.tip-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 13px;
  background: var(--clay-soft);
  color: var(--clay);
}

.tip-icon svg {
  width: 21px;
  height: 21px;
}

.tip-copy h3 {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.tip-copy p {
  max-width: 88ch;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.tip-card .btn {
  flex: none;
  margin-left: auto;
}

@media (max-width: 760px) {
  .tip-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .tip-card .btn {
    margin-left: 0;
  }
}

/* --------------------------------------------------------- route steps */

.route-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.route-step {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background: var(--clay-soft);
  color: var(--clay);
  font-size: 0.64rem;
  font-weight: 800;
}

.route-step b {
  font-size: 0.82rem;
  font-weight: 700;
}

.route-step p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

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

/* --------------------------------------------------- continue banner */

.continue-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 22px;
  background:
    radial-gradient(90% 130% at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 0.18s, box-shadow 0.18s;
}

.continue-banner:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.continue-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 18%, #fff);
  color: color-mix(in srgb, var(--accent) 90%, #000 12%);
}

.continue-icon svg {
  width: 23px;
  height: 23px;
}

.continue-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.continue-copy .kicker {
  font-size: 0.56rem;
}

.continue-copy b {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.continue-copy small {
  color: var(--muted);
  font-size: 0.7rem;
}

.continue-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--clay);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.continue-go svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 640px) {
  .continue-banner {
    flex-wrap: wrap;
  }

  .continue-go {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }
}

/* ------------------------------------------------------------- empty */

.empty {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 40px 22px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: rgba(255, 253, 248, 0.55);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--clay);
}

.empty-icon svg {
  width: 23px;
  height: 23px;
}

.empty h3 {
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.empty p {
  max-width: 42ch;
  color: var(--muted);
  font-size: 0.8rem;
}

/* -------------------------------------------------------- footer/toast */

.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.68rem;
  line-height: 1.5;
}

.site-foot a {
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  max-width: min(440px, calc(100% - 32px));
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: var(--forest);
  color: #f9f2e4;
  font-size: 0.82rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.24s, transform 0.24s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.good {
  border-color: rgba(216, 164, 74, 0.45);
}

.toast.bad {
  background: #7f3526;
}

.loading {
  display: grid;
  place-items: center;
  min-height: 48vh;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(184, 83, 45, 0.16);
  border-top-color: var(--clay);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

/* ---------------------------------------------------------- animations */

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

@keyframes wave {
  0%, 60%, 100% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(14deg);
  }
  20% {
    transform: rotate(-8deg);
  }
  30% {
    transform: rotate(14deg);
  }
  40% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

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

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

@media (max-width: 1180px) {
  .dashboard {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  }

  .place-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
  }
}

@media (max-width: 1080px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .dash-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
  }

  .dash-side .note-card {
    grid-column: 1 / -1;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .aside-card {
    position: static;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1023px) {
  .side-rail {
    display: none;
  }

  .app-body {
    margin-left: 0;
    padding-bottom: 94px;
  }

  .shell {
    width: calc(100% - 32px);
  }

  .shell-page {
    padding-top: 14px;
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 55;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 62px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(31, 43, 37, 0.06);
    background: rgba(248, 243, 234, 0.86);
    backdrop-filter: blur(16px) saturate(1.08);
  }

  .mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-family: var(--display);
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  .mobile-brand:hover {
    color: var(--ink);
  }

  .mobile-brand img {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .mobile-actions {
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .bottom-dock {
    position: fixed;
    left: 50%;
    bottom: 10px;
    z-index: 80;
    display: grid;
    grid-template-columns: 1fr 1fr 74px 1fr 1fr;
    align-items: center;
    width: min(540px, calc(100% - 12px));
    padding: 9px 8px calc(9px + env(safe-area-inset-bottom));
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 27px;
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 18px 50px rgba(50, 43, 32, 0.22);
    backdrop-filter: blur(18px) saturate(1.1);
    transform: translateX(-50%);
  }

  .dock-link {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 4px 1px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.52rem;
    font-weight: 700;
    line-height: 1.1;
  }

  .dock-link svg {
    width: 21px;
    height: 21px;
  }

  .dock-link.is-active {
    color: var(--clay);
  }

  .dock-link.is-active svg {
    filter: drop-shadow(0 2px 4px rgba(184, 83, 45, 0.25));
  }

  .dock-fab {
    display: grid;
    justify-items: center;
    gap: 1px;
    width: 58px;
    height: 58px;
    margin: -27px auto 0;
    padding: 8px 0 4px;
    border: 5px solid var(--bg);
    border-radius: 50%;
    background: var(--clay);
    color: #fff8ef;
    box-shadow: 0 12px 26px rgba(184, 83, 45, 0.4);
    transition: transform 0.18s var(--ease);
  }

  .dock-fab:hover {
    color: #fff;
    transform: translateY(-2px);
  }

  .dock-fab-icon svg {
    width: 22px;
    height: 22px;
  }

  .dock-fab-label {
    font-size: 0.48rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .toast {
    bottom: 96px;
  }

  .welcome {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .welcome-side {
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .ticket-card {
    min-height: 330px;
  }

  .ticket-art {
    min-height: 280px;
  }

  .map-stage {
    height: 320px;
  }

  .page-head {
    padding-top: 12px;
  }

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

  .profile-coins {
    grid-column: 1 / -1;
    justify-items: start;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .profile-coins b {
    font-size: 1.7rem;
  }

  .profile-coins b svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 900px) {
  .auth {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px;
  }

  .auth-visual {
    min-height: 38vh;
    padding: 22px;
    border-radius: 30px;
    background-position: center 64%;
  }

  .auth-copy .lead {
    display: none;
  }

  .auth-copy {
    margin-top: 3vh;
  }

  .auth-copy h1 {
    font-size: clamp(2.15rem, 8vw, 3.2rem);
  }

  .auth-copy .lead {
    max-width: 52ch;
    font-size: 0.92rem;
  }

  .auth-foot {
    display: none;
  }

  .auth-panel {
    padding: 6px 4px 28px;
  }

  .auth-card {
    width: min(560px, 100%);
  }

  .ticket-card {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .ticket-main {
    padding: 22px 22px 18px;
  }

  .ticket-art {
    min-height: 230px;
    margin: 0 12px 12px;
    border-radius: calc(var(--r-xl) - 12px);
  }

  .ticket-art::before,
  .ticket-art::after {
    display: none;
  }

  .dash-side {
    grid-template-columns: 1fr;
  }

  .dash-side .note-card {
    grid-column: auto;
  }

  .route-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }

  .detail-hero h1 {
    max-width: 26ch;
  }

  .timeline::before {
    left: 21px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 0.9375rem;
  }

  .shell {
    width: calc(100% - 24px);
  }

  .mobile-topbar {
    height: 58px;
    padding: 8px 12px;
  }

  .mobile-brand {
    font-size: 1rem;
  }

  .mobile-brand img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .coin-pill {
    padding: 6px 10px;
    font-size: 0.76rem;
  }

  .avatar-link {
    width: 34px;
    height: 34px;
    font-size: 0.92rem;
  }

  .welcome-copy h1 {
    font-size: clamp(1.9rem, 8.2vw, 2.5rem);
  }

  .welcome-copy p {
    font-size: 0.86rem;
  }

  .date-pill,
  .status-pill {
    padding: 6px 10px;
    font-size: 0.66rem;
  }

  .dashboard {
    gap: 14px;
  }

  .dash-main,
  .dash-side {
    gap: 14px;
  }

  .ticket-main h2 {
    font-size: 1.75rem;
  }

  .ticket-main > p {
    font-size: 0.84rem;
  }

  .ticket-meta {
    margin: 14px 0 16px;
  }

  .tag {
    padding: 5px 8px;
    font-size: 0.64rem;
  }

  .ticket-art {
    min-height: 195px;
  }

  .ticket-art-stamp {
    width: 36px;
    height: 36px;
    font-size: 0.64rem;
  }

  .journey-card {
    padding: 20px;
  }

  .journey-body {
    gap: 13px;
  }

  .journey-ring {
    width: 88px;
    height: 88px;
  }

  .journey-ring span {
    font-size: 1.3rem;
  }

  .journey-ring small {
    bottom: 17px;
  }

  .journey-copy h3 {
    font-size: 1.08rem;
  }

  .map-card {
    padding: 15px 15px 10px;
  }

  .map-stage {
    height: 245px;
  }

  .chips {
    mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
  }

  .map-pin-dot {
    width: 23px;
    height: 23px;
    font-size: 0.48rem;
  }

  .map-pin::after {
    border-left-width: 4px;
    border-right-width: 4px;
    border-top-width: 6px;
  }

  .map-pin-name {
    display: none;
  }

  .map-foot {
    flex-wrap: wrap;
    gap: 9px;
  }

  .map-note {
    width: 100%;
    margin-left: 0;
  }

  .card {
    padding: 16px;
    border-radius: 22px;
  }

  .card-head h2 {
    font-size: 1.35rem;
  }

  .card-head h3 {
    font-size: 1.1rem;
  }

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

  .place-visual {
    height: 96px;
  }

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

  .section {
    margin-top: 18px;
  }

  .section-head h2 {
    font-size: 1.35rem;
  }

  .detail-hero {
    margin-top: 10px;
    padding: 20px;
    border-radius: 24px;
  }

  .detail-hero h1 {
    font-size: clamp(1.7rem, 8vw, 2.3rem);
  }

  .detail-watermark {
    right: -10px;
    bottom: -22px;
  }

  .detail-watermark svg {
    width: 150px;
    height: 150px;
  }

  .prose {
    font-size: 0.94rem;
    line-height: 1.7;
  }

  .quiz-section {
    margin-top: 22px;
  }

  .quiz-question {
    padding: 15px;
    border-radius: 18px;
  }

  .option {
    padding: 10px 11px;
    font-size: 0.83rem;
  }

  .result {
    padding: 17px;
    border-radius: 20px;
  }

  .result-head h3 {
    font-size: 1.25rem;
  }

  .profile-hero {
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
  }

  .avatar-big {
    width: 64px;
    height: 64px;
    font-size: 1.7rem;
  }

  .profile-id h1 {
    font-size: 1.7rem;
  }

  .stat {
    padding: 13px;
  }

  .stat b {
    font-size: 1.25rem;
  }

  .achievement-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    align-items: flex-start;
    padding: 12px;
  }

  .timeline-num {
    width: 36px;
    height: 36px;
  }

  .timeline-meta {
    display: none;
  }

  .timeline-copy p {
    white-space: normal;
  }

  .row-2 {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 42vh;
    padding: 18px;
  }

  .auth-chip {
    display: none;
  }

  .auth-copy h1 {
    font-size: clamp(1.95rem, 8.6vw, 2.7rem);
  }

  .auth-character {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 7px 12px 7px 7px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.auth-character img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.auth-character b {
  color: var(--ink);
}

.auth-stats {
    gap: 6px;
  }

  .auth-stat {
    min-width: 84px;
    padding: 8px 11px;
  }

  .auth-stat b {
    font-size: 1.2rem;
  }

  .auth-stat span {
    font-size: 0.55rem;
  }

  .auth-card {
    padding: 22px;
    border-radius: 24px;
  }

  .site-foot {
    flex-direction: column;
    padding-bottom: 20px;
  }
}

@media (max-width: 420px) {
  .welcome-side .status-pill {
    display: none;
  }

  .ticket-main {
    padding: 18px 18px 14px;
  }

  .ticket-art {
    min-height: 175px;
  }

  .journey-head .kicker {
    font-size: 0.58rem;
  }

  .place-meta {
    gap: 6px;
    font-size: 0.6rem;
  }

  .place-state {
    font-size: 0.6rem;
  }
}

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

/* --------------------------------------------------------- geofencing */

.meta-chip-locked {
  border-color: rgba(184, 83, 45, 0.28);
  background: rgba(184, 83, 45, 0.08);
  color: var(--clay);
}

.geofence-card {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(184, 83, 45, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(216, 164, 74, 0.16), transparent 62%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.geofence-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--clay-soft);
  color: var(--clay);
}

.geofence-icon svg {
  width: 27px;
  height: 27px;
}

.geofence-card h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  letter-spacing: -0.04em;
}

.geofence-card > p {
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.65;
}

.geofence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.geofence-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--amber-soft);
  color: #7a5615;
  font-size: 0.76rem;
  line-height: 1.5;
}

.geofence-note svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}

.geofence-status:empty {
  display: none;
}

.geofence-status {
  width: 100%;
}

.geofence-status.is-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.geofence-status.is-error {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(180, 71, 51, 0.24);
  border-radius: 14px;
  background: rgba(196, 111, 87, 0.1);
  color: #8d3a28;
  font-size: 0.8rem;
  line-height: 1.5;
}

.geofence-status.is-error b {
  display: block;
  color: #7f3526;
}

.geofence-status.is-error span {
  display: block;
}

.geofence-status.is-error small {
  display: block;
  margin-top: 4px;
  color: #9a5b4b;
  font-size: 0.7rem;
}

.status-icon svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
}

.geofence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 2px;
}

.geofence-links a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--clay);
  font-size: 0.73rem;
  font-weight: 800;
}

.geofence-links a svg {
  width: 13px;
  height: 13px;
}

.geofence-privacy {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--dim);
  font-size: 0.69rem;
  line-height: 1.5;
}

.geofence-privacy svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
}

.geofence-confirmed {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--sage);
  color: #33503e;
  font-size: 0.8rem;
  font-weight: 600;
}

.geofence-confirmed svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.demo-banner {
  border-bottom: 1px solid rgba(216, 164, 74, 0.24);
  background: rgba(248, 236, 214, 0.82);
  color: #6c4d18;
  font-size: 0.8rem;
}

.demo-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.demo-inner svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: #9a6d21;
}

@media (max-width: 640px) {
  .geofence-card {
    padding: 20px;
    border-radius: 22px;
  }

  .geofence-card h2 {
    font-size: 1.45rem;
  }

  .geofence-card .btn {
    width: 100%;
  }

  .geofence-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }
}

/* ------------------------------------------------------- real OSM map */

.map-head {
  align-items: flex-start;
}

.map-tabs {
  display: inline-flex;
  flex: none;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.map-tab {
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.map-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.map-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.map-wrap {
  position: relative;
}

.map-stage.real-map,
.map-stage.schematic-map {
  height: 320px;
}

.map-stage[hidden] {
  display: none;
}

.real-map {
  background: #e8eee4;
}

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 450;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: rgba(232, 238, 228, 0.75);
  color: var(--muted);
  font-size: 0.78rem;
  pointer-events: none;
}

.map-locate {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.18s, box-shadow 0.18s;
}

.map-locate:hover {
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.map-locate svg {
  width: 15px;
  height: 15px;
  color: var(--clay);
}

.leaflet-container {
  width: 100%;
  height: 100%;
  font-family: var(--font);
  background: #e8eee4;
}

.leaflet-tile-pane {
  filter: saturate(0.86) sepia(0.06) brightness(1.02) contrast(0.97);
}

.leaflet-bar {
  border: 1px solid var(--line-strong) !important;
  border-radius: 10px !important;
  box-shadow: var(--shadow-sm) !important;
  overflow: hidden;
}

.leaflet-bar a {
  width: 30px !important;
  height: 30px !important;
  line-height: 30px !important;
  border-bottom-color: var(--line) !important;
  background: rgba(255, 253, 248, 0.96) !important;
  color: var(--ink) !important;
  font-size: 18px !important;
}

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

.leaflet-control-attribution {
  padding: 2px 6px !important;
  border-radius: 6px 0 0 0;
  background: rgba(255, 253, 248, 0.82) !important;
  color: var(--muted) !important;
  font-size: 9px !important;
  backdrop-filter: blur(6px);
}

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

.leaflet-popup-content-wrapper {
  border-radius: 16px !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-md) !important;
}

.leaflet-popup-tip {
  background: var(--surface) !important;
}

.leaflet-popup-content {
  margin: 13px 14px !important;
}

.leaflet-container a.leaflet-popup-close-button {
  color: var(--muted) !important;
  top: 5px !important;
  right: 6px !important;
}

.map-popup {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.map-popup-cat {
  color: color-mix(in srgb, var(--accent) 82%, #000 14%);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-popup b {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
}

.map-popup p {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.map-popup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 600;
}

.map-popup-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.map-popup-meta svg {
  width: 12px;
  height: 12px;
}

.map-popup-meta .is-done {
  color: var(--forest-2);
}

.map-popup > a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  color: var(--clay);
  font-size: 0.7rem;
  font-weight: 800;
}

.map-popup > a svg {
  width: 13px;
  height: 13px;
}

.quest-marker {
  background: none;
  border: 0;
}

.quest-pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 3px solid #ffffff;
  border-radius: 50% 50% 50% 4px;
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(40, 45, 40, 0.28);
  transform: rotate(-45deg);
}

.quest-pin > * {
  transform: rotate(45deg);
}

.quest-pin.is-done {
  background: var(--clay);
}

.quest-pin-dot {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: color-mix(in srgb, var(--accent) 82%, #000 14%);
  font-size: 0.48rem;
  font-weight: 800;
  line-height: 1;
}

.quest-pin.is-done .quest-pin-dot {
  color: var(--clay);
}

.quest-pin-dot svg {
  width: 11px;
  height: 11px;
}

@media (max-width: 640px) {
  .map-head {
    flex-direction: column;
    gap: 9px;
  }

  .map-tabs {
    align-self: flex-start;
  }

  .map-stage.real-map,
  .map-stage.schematic-map {
    height: 280px;
  }

  .map-locate {
    left: 10px;
    bottom: 10px;
    padding: 7px 10px;
    font-size: 0.64rem;
  }

  .leaflet-control-attribution {
    font-size: 8px !important;
  }
}

.quest-cluster-wrap {
  background: none;
  border: 0;
}

.quest-cluster {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: var(--forest);
  color: #fff8ed;
  box-shadow: 0 8px 18px rgba(36, 71, 60, 0.35);
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: transform 0.18s var(--ease);
}

.quest-cluster:hover {
  transform: scale(1.06);
  background: var(--forest-2);
}

/* ------------------------------------------------- transient welcome */

.welcome-transient {
  max-height: 340px;
  overflow: hidden;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), max-height 0.6s var(--ease), margin 0.6s var(--ease);
}

.welcome-transient.is-hiding {
  max-height: 0;
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.welcome-close {
  position: absolute;
  top: -2px;
  right: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: color 0.18s, background 0.18s;
}

.welcome-close:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.welcome-close svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 1023px) {
  .welcome-close {
    position: static;
    align-self: flex-end;
    order: -1;
    margin-bottom: -4px;
  }
}

/* -------------------------------------------------------- admin panel */

.rail-admin {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 1px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.rail-admin:hover {
  border-color: rgba(184, 83, 45, 0.32);
  background: var(--clay-soft);
  color: var(--clay);
}

.rail-admin svg {
  width: 18px;
  height: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.admin-card {
  padding: 22px;
}

.admin-field {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.admin-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-field-head label,
.admin-field-head > span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-field-head output {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--clay-soft);
  color: var(--clay);
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.range {
  width: 100%;
  height: 6px;
  accent-color: var(--clay);
  cursor: pointer;
}

.admin-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-preset {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-preset.is-active {
  border-color: var(--clay);
  background: var(--clay-soft);
  color: var(--clay);
}

.admin-field .hint {
  margin: 0;
  color: var(--dim);
  font-size: 0.7rem;
  line-height: 1.5;
}

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

.font-option {
  display: grid;
  gap: 1px;
  justify-items: start;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.font-option:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.font-option.is-active {
  border-color: var(--clay);
  background: var(--clay-soft);
  box-shadow: 0 0 0 3px rgba(184, 83, 45, 0.08);
}

.font-option .font-sample {
  color: var(--clay);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.font-sample.font-serif {
  font-family: Georgia, "Times New Roman", serif;
}

.font-sample.font-rounded {
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", sans-serif;
}

.font-sample.font-mono {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.font-option .font-name {
  font-size: 0.76rem;
  font-weight: 700;
}

.font-option small {
  color: var(--muted);
  font-size: 0.6rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-status {
  min-height: 1.2rem;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.admin-status.is-ok {
  color: var(--forest-2);
}

.admin-status.is-error {
  color: var(--danger);
}

.admin-preview {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 10px;
  padding: 24px;
  border-radius: var(--r-xl);
  background: linear-gradient(158deg, #2c5446 0%, #1e3c32 58%, #17312a 100%);
  color: #f5ecdc;
  box-shadow: var(--shadow-md);
}

.admin-preview .kicker {
  color: #e8d4b2;
}

.admin-preview h2 {
  color: #fff8ed;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  letter-spacing: -0.04em;
}

.admin-preview > p {
  color: rgba(245, 236, 220, 0.7);
  font-size: 0.8rem;
  line-height: 1.6;
}

.preview-ticket {
  display: grid;
  gap: 3px;
  margin: 8px 0;
  padding: 15px;
  border: 1px solid rgba(245, 236, 220, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.preview-ticket > span:first-child {
  color: #e8d4b2;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-ticket b {
  color: #fff8ed;
  font-size: 1.02rem;
}

.preview-ticket small {
  color: rgba(245, 236, 220, 0.6);
  font-size: 0.68rem;
}

.preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
  margin-top: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--clay);
  color: #fff8ef;
  font-size: 0.68rem;
  font-weight: 800;
}

.preview-btn svg {
  width: 13px;
  height: 13px;
}

.preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.preview-badges span {
  padding: 4px 8px;
  border: 1px solid rgba(245, 236, 220, 0.14);
  border-radius: 999px;
  color: rgba(245, 236, 220, 0.72);
  font-size: 0.62rem;
  font-weight: 700;
}

@media (max-width: 1023px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-preview {
    position: static;
  }
}

@media (max-width: 640px) {
  .admin-card {
    padding: 16px;
  }

  .font-grid {
    grid-template-columns: 1fr;
  }

  .admin-actions .btn {
    flex: 1 1 auto;
  }
}

.topbar-admin {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

.topbar-admin:hover {
  color: var(--clay);
  background: var(--clay-soft);
}

.topbar-admin svg {
  width: 17px;
  height: 17px;
}

/* ---------------------------------------------------------- story game */

.story-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.story-intro h2 {
  margin: 2px 0 6px;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  letter-spacing: -0.04em;
}

.story-intro p {
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.story-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(216, 164, 74, 0.3);
  border-radius: 999px;
  background: var(--amber-soft);
  color: #8a6420;
  font-size: 0.66rem;
  font-weight: 800;
}

.story-badge svg {
  width: 14px;
  height: 14px;
}

.story-game {
  position: relative;
  scroll-margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r-xl);
  background:
    radial-gradient(80% 80% at 100% 0%, rgba(216, 164, 74, 0.12), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.story-progress {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.story-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.story-progress-top b {
  color: var(--ink);
}

.story-progress-track {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.story-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--clay));
  transition: width 0.55s var(--ease);
}

.story-leaves {
  display: flex;
  gap: 6px;
}

.story-leaf {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--dim);
  transition: background 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.story-leaf svg {
  width: 13px;
  height: 13px;
}

.story-leaf.is-lit {
  border-color: rgba(36, 71, 60, 0.3);
  background: var(--sage);
  color: var(--forest);
  box-shadow: 0 0 0 4px rgba(36, 71, 60, 0.08);
  transform: translateY(-1px);
}

.story-scene {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 2px 0 16px;
}

.story-mascot {
  position: relative;
  display: grid;
  justify-items: center;
  flex: none;
  width: 106px;
  padding-top: 3px;
}

.story-mascot img {
  position: relative;
  z-index: 1;
  width: 102px;
  height: 102px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(31, 43, 37, 0.18));
  animation: mascot-bob 3.4s ease-in-out infinite;
}

.mascot-glow {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 76px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 164, 74, 0.4), transparent 70%);
  filter: blur(8px);
  transform: translateX(-50%);
}

.story-mascot b {
  position: relative;
  z-index: 1;
  margin-top: -3px;
  color: var(--clay);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 17px 19px;
  border: 1px solid rgba(216, 164, 74, 0.2);
  border-radius: 20px;
  background: linear-gradient(150deg, #fffaf0, var(--surface));
}

.story-bubble::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 33px;
  width: 13px;
  height: 13px;
  border-bottom: 1px solid rgba(216, 164, 74, 0.2);
  border-left: 1px solid rgba(216, 164, 74, 0.2);
  background: #fffaf0;
  transform: rotate(45deg);
}

.story-bubble .kicker {
  color: var(--clay);
}

.story-bubble h2 {
  margin: 2px 0 6px;
  font-size: clamp(1.25rem, 2.1vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.story-bubble p {
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.72;
}

.story-question {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
}

.story-question-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--clay);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.story-question-label svg {
  width: 14px;
  height: 14px;
}

.story-question h3 {
  font-size: 1.02rem;
  line-height: 1.38;
  letter-spacing: -0.02em;
}

.story-question-hint {
  margin-top: -2px;
  color: var(--muted);
  font-size: 0.67rem;
}

.story-options {
  margin-top: 3px;
}

.story-option {
  padding: 12px 14px;
  background: var(--surface);
  font-size: 0.9rem;
}

.story-option.is-correct,
.story-option.is-correct:has(input:checked) {
  border-color: rgba(36, 71, 60, 0.4);
  background: var(--sage);
  color: var(--ink);
}

.story-option.is-correct input:checked {
  border-color: var(--forest);
  background: var(--forest);
}

.story-option.is-wrong {
  border-color: rgba(196, 111, 87, 0.45);
  background: rgba(196, 111, 87, 0.1);
}

.story-question-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.story-question-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--dim);
  font-size: 0.65rem;
}

.story-question-note svg {
  width: 13px;
  height: 13px;
}

.story-question-actions .btn.is-done {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff8ed;
}

.story-feedback {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 15px;
  gap: 10px;
  align-items: flex-start;
}

.story-feedback:not(:empty) {
  display: flex;
}

.story-feedback.is-ok {
  border-color: rgba(36, 71, 60, 0.18);
  background: var(--sage);
}

.story-feedback.is-soft {
  border-color: rgba(216, 164, 74, 0.28);
  background: var(--amber-soft);
}

.feedback-mascot {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--clay);
}

.feedback-mascot svg {
  width: 16px;
  height: 16px;
}

.story-feedback b {
  display: block;
  color: var(--ink);
  font-size: 0.82rem;
}

.story-feedback p {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 0.75rem;
  line-height: 1.55;
}

.story-feedback span {
  color: var(--muted);
  font-size: 0.68rem;
}

.story-fact {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  color: var(--forest) !important;
  font-size: 0.68rem !important;
  font-weight: 700;
}

.story-fact svg {
  width: 13px;
  height: 13px;
}

.story-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
}

.story-hint {
  color: var(--muted);
  font-size: 0.67rem;
}

/* Guest character */

.story-guest {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--guest) 32%, transparent);
  border-radius: 15px;
  background: color-mix(in srgb, var(--guest) 9%, var(--surface));
}

.guest-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--guest) 20%, var(--surface));
  font-size: 1.15rem;
  line-height: 1;
}

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

.guest-label {
  display: block;
  color: color-mix(in srgb, var(--guest) 80%, #000 12%);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guest-copy b {
  display: block;
  color: var(--ink);
  font-size: 0.8rem;
}

.guest-copy p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

/* Finish */

.story-finish {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 4px 4px 0;
  text-align: center;
}

.story-finish-mascot {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 108px;
}

.story-finish-mascot img {
  position: relative;
  z-index: 1;
  width: 108px;
  height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(31, 43, 37, 0.2));
  animation: mascot-bob 3.4s ease-in-out infinite;
}

.finish-glow {
  position: absolute;
  inset: 10px 6px 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 164, 74, 0.45), transparent 68%);
  filter: blur(8px);
}

.finish-spark {
  position: absolute;
  color: var(--amber);
  animation: sparkle 2.4s ease-in-out infinite;
}

.finish-spark svg {
  width: 17px;
  height: 17px;
}

.finish-spark-1 {
  top: 10px;
  left: 4px;
}

.finish-spark-2 {
  top: 2px;
  right: 8px;
  animation-delay: 0.5s;
}

.finish-spark-3 {
  bottom: 24px;
  right: 0;
  animation-delay: 1s;
}

.story-finish .kicker {
  color: var(--clay);
}

.story-finish h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -0.04em;
}

.story-finish > p {
  max-width: 55ch;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.story-finish-leaves {
  display: flex;
  gap: 5px;
  margin: 2px 0 4px;
}

.story-finish-leaves span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--forest);
}

.story-finish-leaves svg {
  width: 14px;
  height: 14px;
}

.story-takeaway {
  width: 100%;
  margin-top: 4px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  text-align: left;
}

.story-takeaway h3 {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.78rem;
}

.story-takeaway h3 svg {
  width: 15px;
  height: 15px;
  color: var(--amber);
}

.story-takeaway ul {
  display: grid;
  gap: 5px;
  list-style: none;
}

.story-takeaway li {
  position: relative;
  padding-left: 13px;
  color: var(--ink-2);
  font-size: 0.76rem;
  line-height: 1.5;
}

.story-takeaway li::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}

.story-rewards {
  width: 100%;
  text-align: left;
}

.story-finish-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
}

/* Full history */

.full-story {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.full-story summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.full-story summary::-webkit-details-marker {
  display: none;
}

.full-story summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.full-story summary svg {
  width: 16px;
  height: 16px;
  color: var(--clay);
}

.full-story summary small {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 500;
}

.full-story-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.full-story-body .prose {
  padding-top: 15px;
}

.sources-list {
  display: grid;
  gap: 6px;
  margin: 15px 0;
  padding: 0;
  list-style: none;
}

.sources-list a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--clay);
  font-size: 0.76rem;
  font-weight: 600;
}

.sources-list a::before {
  content: '↗';
  color: var(--amber);
  font-size: 0.7rem;
}

@keyframes mascot-bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-6px) rotate(1.5deg); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0.4; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.1) rotate(12deg); }
}

@media (max-width: 1023px) {
  .story-game {
    scroll-margin-top: 74px;
  }
}

@media (max-width: 640px) {
  .story-intro {
    flex-direction: column;
    gap: 9px;
  }

  .story-game {
    padding: 14px;
    border-radius: 24px;
  }

  .story-scene {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .story-mascot {
    width: 88px;
  }

  .story-mascot img {
    width: 86px;
    height: 86px;
  }

  .story-bubble {
    width: 100%;
    padding: 15px;
  }

  .story-bubble::before {
    left: 50%;
    top: -7px;
    transform: translateX(-50%) rotate(45deg);
  }

  .story-bubble h2 {
    font-size: 1.22rem;
  }

  .story-bubble p {
    font-size: 0.9rem;
  }

  .story-question {
    padding: 13px;
  }

  .story-question h3 {
    font-size: 0.96rem;
  }

  .story-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .story-actions .btn {
    width: 100%;
  }

  .story-hint {
    text-align: center;
  }

  .story-finish-actions {
    width: 100%;
    flex-direction: column;
  }

  .story-finish-actions .btn {
    width: 100%;
  }

  .full-story summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-mascot img,
  .story-finish-mascot img,
  .finish-spark {
    animation: none;
  }
}

/* ------------------------------------------------------------ nature */

.nature-teaser {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.nature-teaser:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.nature-teaser-art {
  display: block;
  min-height: 132px;
  overflow: hidden;
}

.nature-teaser-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nature-teaser-copy {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 14px;
}

.nature-teaser-copy .kicker {
  color: var(--forest-2);
}

.nature-teaser-copy b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nature-teaser-copy p {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.nature-teaser-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 800;
}

.nature-teaser-link svg {
  width: 13px;
  height: 13px;
}

.nature-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(36, 71, 60, 0.15);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--sage), var(--surface));
}

.nature-note-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--forest);
}

.nature-note-icon svg {
  width: 16px;
  height: 16px;
}

.nature-note .kicker {
  color: var(--forest-2);
  font-size: 0.58rem;
}

.nature-note p {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 0.78rem;
  line-height: 1.55;
}

.nature-view {
  display: grid;
  gap: 24px;
}

.nature-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #fbf1dd 0%, #e9efdf 100%);
  box-shadow: var(--shadow-md);
}

.nature-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  padding: 34px;
}

.nature-hero-copy h1 {
  font-size: clamp(2.15rem, 4.4vw, 3.5rem);
  line-height: 0.99;
  letter-spacing: -0.055em;
}

.nature-hero-copy h1 em {
  color: var(--clay);
  font-style: normal;
}

.nature-hero-copy > p {
  max-width: 50ch;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.nature-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.nature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.nature-chips span {
  padding: 4px 9px;
  border: 1px solid rgba(36, 71, 60, 0.16);
  border-radius: 999px;
  color: var(--forest-2);
  font-size: 0.64rem;
  font-weight: 700;
}

.nature-hero-art {
  position: relative;
  min-height: 320px;
}

.nature-hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nature-hero-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(251, 241, 221, 0.85), transparent 45%);
}

.nature-hero-caption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.8);
  color: var(--forest);
  font-size: 0.62rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.nature-hero-caption svg {
  width: 14px;
  height: 14px;
  color: var(--amber);
}

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

.nature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 210px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s;
}

.nature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(36, 71, 60, 0.18);
  box-shadow: var(--shadow-md);
}

.nature-card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 3px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--forest);
}

.nature-card-icon svg {
  width: 19px;
  height: 19px;
}

.nature-card-label {
  color: var(--clay);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nature-card h3 {
  font-size: 1.12rem;
  letter-spacing: -0.03em;
}

.nature-card p {
  flex: 1;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.nature-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
  color: var(--forest-2);
  font-size: 0.67rem;
  font-weight: 800;
}

.nature-card-cta svg {
  width: 13px;
  height: 13px;
}

.cast-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r-xl);
  background: linear-gradient(145deg, #f9ead6, #e8efdf);
  box-shadow: var(--shadow-sm);
}

.cast-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cast-main img {
  width: 126px;
  height: 126px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(31, 43, 37, 0.16));
}

.cast-main h2 {
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.cast-main p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.cast-guests {
  display: grid;
  align-content: center;
  gap: 6px;
}

.cast-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cast-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid rgba(36, 71, 60, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink-2);
  font-size: 0.62rem;
  font-weight: 700;
}

.cast-chip span {
  font-size: 0.86rem;
  line-height: 1;
}

.cast-note {
  color: var(--muted);
  font-size: 0.66rem;
}

.nature-seasons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.nature-seasons > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.season-dot {
  display: block;
  width: 10px;
  height: 10px;
  margin-bottom: 7px;
  border-radius: 50%;
}

.season-dot.spring { background: #9bbb8a; }
.season-dot.summer { background: #4f7a5b; }
.season-dot.autumn { background: #d8a44a; }
.season-dot.winter { background: #a9c3cf; }

.nature-seasons b {
  font-size: 0.78rem;
}

.nature-seasons p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.nature-final {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-radius: var(--r-xl);
  background: linear-gradient(125deg, var(--forest), #315b4b);
  color: #f8f1e2;
}

.nature-final .kicker {
  color: #e8d4b2;
}

.nature-final h2 {
  color: #fff8ed;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  letter-spacing: -0.04em;
}

.nature-final p {
  max-width: 58ch;
  margin-top: 3px;
  color: rgba(248, 241, 226, 0.72);
  font-size: 0.78rem;
  line-height: 1.55;
}

.nature-final .btn {
  flex: none;
}

@media (max-width: 1023px) {
  .nature-hero {
    grid-template-columns: 1fr;
  }

  .nature-hero-art {
    min-height: 220px;
  }

  .nature-hero-art::after {
    background: linear-gradient(0deg, rgba(251, 241, 221, 0.8), transparent 50%);
  }

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

  .cast-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nature-hero-copy {
    padding: 22px;
  }

  .nature-hero-copy h1 {
    font-size: 2.2rem;
  }

  .nature-hero-art {
    min-height: 170px;
  }

  .nature-grid {
    grid-template-columns: 1fr;
  }

  .nature-card {
    min-height: 0;
  }

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

  .nature-final {
    flex-direction: column;
    align-items: flex-start;
  }

  .nature-final .btn {
    width: 100%;
  }

  .nature-teaser {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .cast-main {
    align-items: flex-start;
  }

  .cast-main img {
    width: 92px;
    height: 92px;
  }

  .cast-main h2 {
    font-size: 1.45rem;
  }
}

/* --------------------------------------------------- cat & dog narrators */

.narrator-images {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.narrator-images img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(31, 43, 37, 0.18));
  animation: mascot-bob 3.4s ease-in-out infinite;
}

.narrator-images img + img {
  animation-delay: 0.7s;
}

.story-mascot.narrator-both {
  width: 158px;
}

.story-mascot.narrator-both .narrator-images img {
  width: 72px;
  height: 72px;
  margin: 0 -4px;
}

.story-mascot.narrator-dog .narrator-images img {
  transform: scaleX(-1);
}

.auth-character-pair {
  display: flex;
  align-items: center;
}

.auth-character-pair img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.auth-character-pair img + img {
  margin-left: -7px;
}

.cast-heroes {
  display: flex;
  align-items: flex-end;
  flex: none;
}

.cast-main .cast-heroes img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(31, 43, 37, 0.16));
}

.cast-heroes img + img {
  margin-left: -5px;
}

.finish-pair {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.story-finish-mascot {
  width: 190px;
}

.story-finish-mascot .finish-pair img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(31, 43, 37, 0.2));
  animation: mascot-bob 3.4s ease-in-out infinite;
}

.finish-pair img + img {
  margin-left: -5px;
  animation-delay: 0.7s;
}

@media (max-width: 640px) {
  .narrator-images img {
    width: 82px;
    height: 82px;
  }

  .story-mascot.narrator-both {
    width: 140px;
  }

  .story-mascot.narrator-both .narrator-images img {
    width: 64px;
    height: 64px;
  }

  .story-finish-mascot {
    width: 160px;
  }

  .story-finish-mascot .finish-pair img {
    width: 76px;
    height: 76px;
  }

  .cast-main .cast-heroes img {
    width: 72px;
    height: 72px;
  }
}

/* ------------------------------------------------------- archive card */

.archive-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(108, 87, 68, 0.2);
  border-radius: var(--r-lg);
  background: #f1e5d2;
  box-shadow: var(--shadow-sm);
}

.archive-art {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background: #d9c5a5;
}

.archive-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.archive-stamp {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border: 1px solid rgba(108, 87, 68, 0.4);
  border-radius: 5px;
  background: rgba(241, 229, 210, 0.82);
  color: #6c5744;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  backdrop-filter: blur(4px);
}

.archive-card figcaption {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
  padding: 18px;
}

.archive-card .kicker {
  color: #8a6b4f;
  font-size: 0.58rem;
}

.archive-card h3 {
  color: #4f3e2f;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.archive-card p {
  color: #7a6857;
  font-size: 0.74rem;
  line-height: 1.5;
}

.archive-note {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  margin-top: 3px;
  color: #8a7a68;
  font-size: 0.62rem;
  line-height: 1.4;
}

.archive-note svg {
  flex: none;
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

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

  .archive-art {
    min-height: 210px;
  }

  .archive-card figcaption {
    padding: 14px;
  }
}

.cast-friends {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
  padding: 4px 8px 4px 5px;
  border: 1px solid rgba(36, 71, 60, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.65);
  color: var(--muted);
  font-size: 0.62rem;
}

.cast-friends img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.cast-friends b {
  margin-left: 2px;
  color: var(--ink);
}

.guide-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--amber-soft), var(--surface));
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.guide-card > img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(31, 43, 37, 0.12));
}

.guide-card .kicker {
  color: var(--clay);
  font-size: 0.54rem;
}

.guide-card b {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.guide-card small {
  display: block;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.guide-arrow {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--clay);
}

.guide-arrow svg {
  width: 12px;
  height: 12px;
}

html.icon-scale-custom svg.icon {
  width: calc(1.15em * var(--icon-scale)) !important;
  height: calc(1.15em * var(--icon-scale)) !important;
  flex: none;
}

.admin-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 14px 0 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.admin-tab svg {
  width: 15px;
  height: 15px;
}

.admin-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

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

.admin-color-field {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
}

.admin-color-field input[type="color"] {
  width: 100%;
  height: 30px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.admin-color-field small {
  color: var(--dim);
  font-size: 0.56rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .admin-color-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------------------------------------------------- admin content */

.admin-loc-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.admin-loc-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), box-shadow 0.18s;
}

.admin-loc-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.admin-loc-card.is-hidden {
  opacity: 0.62;
}

.admin-loc-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--sage);
  color: var(--forest);
}

.admin-loc-icon svg {
  width: 19px;
  height: 19px;
}

.admin-loc-copy {
  min-width: 0;
}

.admin-loc-copy b {
  display: block;
  color: var(--ink);
  font-size: 0.84rem;
}

.admin-loc-copy small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-loc-state {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--forest);
  font-size: 0.58rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-loc-card.is-hidden .admin-loc-state {
  background: var(--surface-3);
  color: var(--muted);
}

.admin-loc-card > svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.admin-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 18px;
  margin-top: 18px;
}

.admin-editor-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.admin-editor-side {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
}

.admin-save-card,
.admin-help {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.admin-save-card > .kicker {
  display: block;
  margin-bottom: 9px;
}

.admin-editor .admin-field {
  padding: 0;
  border-top: 0;
  gap: 4px;
}

.admin-editor .admin-field > span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-editor .input {
  width: 100%;
}

.admin-editor textarea.input {
  height: auto;
  min-height: 62px;
  padding-top: 9px;
  padding-bottom: 9px;
  line-height: 1.5;
  resize: vertical;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.admin-form-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 7px;
}

.admin-items {
  display: grid;
  gap: 10px;
}

.admin-question,
.admin-scene {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  scroll-margin-top: 90px;
}

.admin-question + .admin-question,
.admin-scene + .admin-scene {
  margin-top: 0;
}

.admin-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.admin-item-head b {
  color: var(--ink);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-icon-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.admin-icon-btn:hover {
  border-color: rgba(180, 71, 51, 0.35);
  color: var(--danger);
}

.admin-icon-btn svg {
  width: 13px;
  height: 13px;
}

.admin-save-card .check {
  margin-bottom: 8px;
}

.admin-save-card .admin-actions {
  padding-top: 10px;
  margin-top: 4px;
}

.admin-help h3 {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  font-size: 0.78rem;
}

.admin-help h3 svg {
  width: 15px;
  height: 15px;
  color: var(--clay);
}

.admin-help p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.admin-help code {
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 0.64rem;
}

@media (max-width: 1023px) {
  .admin-editor {
    grid-template-columns: 1fr;
  }

  .admin-editor-side {
    position: static;
  }
}

@media (max-width: 640px) {
  .admin-form-grid,
  .admin-form-3 {
    grid-template-columns: 1fr;
  }

  .admin-loc-card {
    grid-template-columns: 34px minmax(0, 1fr) 16px;
  }

  .admin-loc-card .admin-loc-state {
    display: none;
  }

  .admin-loc-icon {
    width: 32px;
    height: 32px;
  }
}

/* ------------------------------------------------------- обратная связь */

.rail-bell,
.topbar-bell {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.rail-bell {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface-2);
}

.topbar-bell {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.rail-bell:hover,
.topbar-bell:hover {
  color: var(--clay);
  border-color: rgba(184, 83, 45, 0.32);
  background: var(--clay-soft);
}

.rail-bell svg {
  width: 18px;
  height: 18px;
}

.topbar-bell svg {
  width: 17px;
  height: 17px;
}

.rail-bell-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--clay);
  color: #fff8ef;
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
}

body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(28, 36, 31, 0.46);
  backdrop-filter: blur(3px);
  animation: modal-fade 0.16s ease;
}

.modal-overlay.is-closing {
  animation: modal-fade 0.18s ease reverse;
}

.modal {
  width: min(560px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  animation: modal-rise 0.2s var(--ease);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 4px;
}

.modal-head h2 {
  margin: 4px 0;
  font-size: 1.35rem;
}

.modal-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.modal-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--clay);
  background: var(--clay-soft);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-body {
  display: grid;
  gap: 14px;
  padding: 14px 24px 24px;
}

.modal-body .admin-field {
  padding: 0;
  border-top: 0;
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.fb-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.fb-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.fb-note svg {
  flex: none;
  width: 16px;
  height: 16px;
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

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

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.notif-item.is-unread {
  border-color: rgba(184, 83, 45, 0.32);
  background: linear-gradient(180deg, var(--clay-soft), var(--surface) 78%);
}

.notif-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--clay);
}

.notif-icon svg {
  width: 19px;
  height: 19px;
}

.notif-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notif-copy b {
  font-size: 0.9rem;
}

.notif-copy p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.82rem;
}

.notif-copy small {
  color: var(--dim);
  font-size: 0.68rem;
}

.notif-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: auto;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--clay);
}

.feedback-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.feedback-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.feedback-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.feedback-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.feedback-status.st-new { background: #fdece3; color: #a8492a; border-color: rgba(184, 83, 45, 0.25); }
.feedback-status.st-in_progress { background: #e9f0e4; color: #3d6b45; border-color: rgba(61, 107, 69, 0.22); }
.feedback-status.st-waiting { background: #fbf2dc; color: #8a6a1e; border-color: rgba(138, 106, 30, 0.22); }
.feedback-status.st-resolved { background: #e4efe6; color: #2f6440; border-color: rgba(47, 100, 64, 0.22); }
.feedback-status.st-closed { background: #eceae4; color: #6b6b62; }
.feedback-status.st-spam { background: #f6e4e2; color: #8f3a2c; }

.feedback-kind,
.feedback-date {
  color: var(--muted);
  font-size: 0.7rem;
}

.feedback-date {
  margin-left: auto;
}

.feedback-loc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 700;
}

.feedback-loc svg {
  width: 14px;
  height: 14px;
}

.feedback-text {
  margin: 0 0 10px;
  white-space: pre-wrap;
}

.feedback-waiting {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.feedback-replies {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.feedback-reply {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.feedback-reply-author {
  color: var(--forest);
  font-size: 0.68rem;
  font-weight: 800;
}

.feedback-reply p {
  margin: 4px 0;
  font-size: 0.84rem;
  white-space: pre-wrap;
}

.feedback-reply small {
  color: var(--dim);
  font-size: 0.66rem;
}

/* ------------------------------------------------------------ админ-карта */

.admin-map-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.admin-map-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.admin-map-side {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  max-height: 72vh;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.admin-map-list {
  display: grid;
  gap: 4px;
  align-content: start;
  overflow: auto;
}

.admin-map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 2px;
  border-radius: var(--r-sm);
}

.admin-map-row:hover {
  background: var(--surface-2);
}

.admin-map-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-map-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(31, 43, 37, 0.06);
}

.admin-map-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.admin-map-copy b {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-map-copy small {
  color: var(--dim);
  font-size: 0.64rem;
}

.admin-map-flag {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--clay);
  color: #fff8ef;
  font-size: 0.62rem;
  font-weight: 800;
}

.admin-map-hidden {
  color: var(--dim);
  font-size: 0.6rem;
  text-transform: uppercase;
}

.admin-map-edit {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--muted);
}

.admin-map-edit:hover {
  background: var(--clay-soft);
  color: var(--clay);
}

.admin-map-edit svg {
  width: 16px;
  height: 16px;
}

.admin-map-main {
  display: grid;
  grid-template-rows: minmax(420px, 1fr) auto;
  gap: 8px;
  min-height: 540px;
}

.admin-map-stage {
  height: 100%;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.admin-map-note {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.admin-map-note .btn {
  margin-left: auto;
}

.admin-map-pin {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent, #b8532d);
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.34);
}

.admin-map-pin.is-hidden {
  background: #9aa39b;
  opacity: 0.6;
}

.admin-map-pin.is-draft {
  background: var(--clay);
  animation: map-pin-pulse 1.4s ease-in-out infinite;
}

.admin-map-pin i {
  position: absolute;
  top: -10px;
  right: -13px;
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 800;
}

.admin-map-popup {
  display: grid;
  gap: 2px;
}

.admin-map-popup small {
  color: var(--muted);
}

.admin-map-popup a {
  margin-top: 4px;
  color: var(--clay);
  font-weight: 700;
}

@keyframes map-pin-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 83, 45, 0.4); }
  50% { box-shadow: 0 0 0 9px rgba(184, 83, 45, 0); }
}

/* ---------------------------------------------------------- карта-пикер */

.admin-picker {
  margin: 6px 0 14px;
}

.admin-picker-map {
  height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.admin-picker-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.admin-picker-bar .hint {
  margin: 0;
}

.admin-color-input {
  height: 42px;
  padding: 4px;
  cursor: pointer;
}

.check-field {
  align-self: end;
  padding-bottom: 12px;
}

/* --------------------------------------------------------- админ-отзывы */

.admin-fb-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-fb-stat {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.admin-fb-stat b {
  font-size: 1.45rem;
  line-height: 1.1;
}

.admin-fb-stat span {
  color: var(--muted);
  font-size: 0.7rem;
}

.admin-fb-filters {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-fb-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-fb-tools .input {
  max-width: 270px;
}

.admin-fb-list {
  display: grid;
  gap: 8px;
}

.admin-fb-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.admin-fb-row:hover {
  border-color: rgba(184, 83, 45, 0.3);
}

.admin-fb-row > svg {
  width: 16px;
  height: 16px;
  color: var(--dim);
}

.admin-fb-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-fb-copy b {
  font-size: 0.82rem;
}

.admin-fb-copy p {
  margin: 0;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-fb-copy small {
  color: var(--dim);
  font-size: 0.66rem;
}

.admin-fb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.admin-fb-main {
  display: grid;
  gap: 16px;
}

.admin-fb-message {
  margin: 0 0 14px;
  white-space: pre-wrap;
}

.admin-fb-context {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-fb-thread {
  display: grid;
  gap: 10px;
  margin: 6px 0 14px;
}

.admin-fb-reply {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.admin-fb-reply-author {
  color: var(--forest);
  font-size: 0.66rem;
  font-weight: 800;
}

.admin-fb-reply p {
  margin: 3px 0;
  font-size: 0.84rem;
  white-space: pre-wrap;
}

.admin-fb-reply small {
  color: var(--dim);
  font-size: 0.66rem;
}

.admin-fb-reply-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-fb-reply-actions .input {
  max-width: 230px;
}

.admin-fb-side {
  display: grid;
  gap: 14px;
}

@media (max-width: 1023px) {
  .admin-map-layout {
    grid-template-columns: 1fr;
  }

  .admin-map-side {
    max-height: none;
  }

  .admin-map-list {
    max-height: 240px;
  }

  .admin-map-main {
    min-height: 0;
  }

  .admin-map-stage {
    min-height: 360px;
  }

  .admin-fb-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-fb-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-fb-row {
    grid-template-columns: 1fr;
  }

  .admin-fb-row > svg {
    display: none;
  }

  .modal-head,
  .modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .admin-picker-map {
    height: 260px;
  }

  .admin-map-main {
    min-height: 0;
  }

  .admin-map-stage {
    min-height: 300px;
  }

  .notif-item {
    padding: 14px;
  }
}

[hidden] {
  display: none !important;
}

/* ------------------------------------------------------ mobile variant A */

.ma-home {
  display: grid;
  gap: 0;
  padding-bottom: 4px;
}

.ma-greeting { margin-bottom: 12px; }
.ma-greeting h1 {
  margin: 4px 0 5px;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.ma-greeting p {
  margin: 0;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.45;
}

.ma-kicker {
  display: block;
  color: var(--clay);
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ma-continue {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 6.35rem;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(41, 53, 43, 0.1);
}
.ma-continue img {
  width: 5.1rem;
  height: 5.1rem;
  flex: none;
  border-radius: 13px;
  object-fit: cover;
}
.ma-continue-copy { min-width: 0; flex: 1; }
.ma-continue-copy b {
  display: block;
  overflow: hidden;
  margin: 3px 0 3px;
  font-family: var(--display);
  font-size: 1.12rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ma-continue-copy small {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.64rem;
}
.ma-go {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  flex: none;
  border-radius: 50%;
  background: var(--clay-soft);
  color: var(--clay);
}
.ma-go svg { width: 0.9rem; height: 0.9rem; }

.ma-stats {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.ma-stats span {
  flex: 1;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.58);
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 700;
  text-align: center;
}
.ma-stats b { color: var(--ink); font-size: 0.68rem; }

.ma-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
}
.ma-section-head b {
  font-family: var(--display);
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}
.ma-section-head a {
  color: var(--clay);
  font-size: 0.62rem;
  font-weight: 800;
}

.ma-nearby {
  display: flex;
  gap: 7px;
  margin-top: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.ma-nearby::-webkit-scrollbar { display: none; }
.ma-near {
  width: 9.4rem;
  flex: none;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.ma-near img {
  width: 100%;
  height: 3.9rem;
  border-radius: 9px;
  object-fit: cover;
}
.ma-near b {
  display: block;
  overflow: hidden;
  margin: 5px 1px 1px;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ma-near small {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.54rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ma-near small svg { width: 0.6rem; height: 0.6rem; flex: none; }

.ma-routes { display: grid; gap: 5px; margin-top: 6px; }
.ma-route {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 2.55rem;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.64);
}
.ma-route-icon {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  flex: none;
  border-radius: 8px;
  background: var(--sage);
  color: var(--forest);
}
.ma-route-icon svg { width: 0.8rem; height: 0.8rem; }
.ma-route b { flex: 1; font-size: 0.62rem; }
.ma-route small { color: var(--muted); font-size: 0.54rem; }
.ma-route > svg { width: 0.75rem; height: 0.75rem; color: var(--muted); }

.ma-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 4.2rem;
  margin-top: 9px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.ma-feature img {
  width: 4.9rem;
  height: 3.35rem;
  flex: none;
  border-radius: 9px;
  object-fit: cover;
}
.ma-feature-copy { min-width: 0; flex: 1; }
.ma-feature-copy b {
  display: block;
  overflow: hidden;
  margin: 2px 0;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ma-feature-copy small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ma-tip {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  padding: 7px 8px;
  border: 1px solid rgba(36, 71, 60, 0.08);
  border-radius: 12px;
  background: var(--sage);
}
.ma-tip img {
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  border-radius: 50%;
  background: var(--surface);
}
.ma-tip b { display: block; font-size: 0.58rem; }
.ma-tip p { margin: 1px 0 0; color: #4f6153; font-size: 0.55rem; line-height: 1.35; }

.ma-collection {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 253, 248, 0.64);
}
.ma-collection > span:first-child { flex: none; }
.ma-collection span span { display: block; color: var(--muted); font-size: 0.5rem; }
.ma-collection span b { display: block; font-size: 0.6rem; }
.ma-progress {
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(36, 71, 60, 0.12);
}
.ma-progress i { display: block; height: 100%; border-radius: inherit; background: var(--clay); }
.ma-collection > b { color: var(--clay); font-size: 0.56rem; }

.ma-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 2.15rem;
  margin-top: 7px;
  border: 1px dashed #c8b9a6;
  border-radius: 10px;
  background: transparent;
  color: var(--clay);
  font-size: 0.58rem;
  font-weight: 800;
}
.ma-all-btn svg { width: 0.7rem; height: 0.7rem; }
.ma-all {
  display: grid;
  gap: 5px;
  margin-top: 6px;
}
.ma-all[hidden] { display: none; }
.ma-all-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.ma-all-row img {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: 7px;
  object-fit: cover;
}
.ma-all-row span { min-width: 0; flex: 1; }
.ma-all-row b {
  display: block;
  overflow: hidden;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ma-all-row small { display: block; color: var(--muted); font-size: 0.52rem; }
.ma-all-row > svg { width: 0.75rem; height: 0.75rem; flex: none; color: var(--muted); }


.story-scene-photo { display: none; }

@media (max-width: 760px) {
  .story-game {
    padding: 0 0 84px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .story-progress {
    gap: 5px;
    margin-bottom: 10px;
  }

  .story-progress-top { font-size: 0.68rem; }
  .story-progress-track { height: 5px; }
  .story-leaves { display: none; }

  .story-scene {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
  }

  .story-scene-photo {
    position: relative;
    display: block;
    order: 0;
    height: 11.2rem;
    overflow: hidden;
    border-radius: 18px;
    background: var(--forest);
  }

  .story-scene-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .story-scene-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(18, 37, 29, 0.82));
  }

  .story-photo-copy {
    position: absolute;
    z-index: 1;
    right: 13px;
    bottom: 11px;
    left: 13px;
    color: #fffdf8;
  }

  .story-photo-copy span {
    display: block;
    margin-bottom: 3px;
    color: #f0c987;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .story-photo-copy h2 {
    margin: 0;
    color: #fffdf8;
    font-size: 1.3rem;
    line-height: 1.03;
    letter-spacing: -0.04em;
  }

  .story-bubble {
    order: 1;
    width: 100%;
    padding: 2px 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .story-bubble::before { display: none; }
  .story-bubble h2 { display: none; }
  .story-bubble .kicker { display: none; }
  .story-bubble p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .story-mascot {
    order: 2;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    width: auto;
    gap: 5px;
    padding: 2px;
  }

  .story-mascot .mascot-glow { display: none; }
  .story-mascot .narrator-images { display: block; }
  .story-mascot img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--sage);
    animation: none;
  }
  .story-mascot b {
    margin: 0;
    color: var(--muted);
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    text-transform: none;
  }
  .story-mascot b::before { content: "· "; }

  .story-question {
    margin-top: 3px;
    padding: 12px;
    border-radius: 16px;
    background: var(--surface);
  }

  .story-question h3 {
    margin: 1px 0 3px;
    font-size: 1.02rem;
    line-height: 1.22;
  }

  .story-question-hint { font-size: 0.62rem; }
  .story-option { padding: 10px 11px; font-size: 0.82rem; }

  .story-question-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .story-question-actions .btn { width: 100%; }
  .story-question-note { justify-content: center; font-size: 0.58rem; }
  .story-actions { margin-top: 12px; }
}

@media (max-width: 760px) {
  .story-page .bottom-dock { display: none; }
  .story-page .shell-page { padding-bottom: 24px; }
}

@media (max-width: 760px) {
  .story-mascot b::before { content: ""; }
  .story-mascot b::after { content: " · твой проводник"; color: var(--dim); font-weight: 500; }
}

/* ------------------------------------------------------- route maps */

.route-card {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.route-card-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 15px 17px 17px;
}

.route-card-map {
  position: relative;
  height: 148px;
  overflow: hidden;
  background: var(--surface-2);
}

.route-card-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.route-card:hover .route-card-map img { transform: scale(1.035); }

.route-map-credit {
  position: absolute;
  right: 7px;
  bottom: 6px;
  z-index: 2;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.86);
  color: #596257;
  font-size: 0.49rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.route-map-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 320px;
  margin: 18px 0;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--forest);
  box-shadow: var(--shadow-md);
}

.route-map-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.route-map-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 35, 27, 0.92), rgba(17, 35, 27, 0.45) 55%, transparent),
    linear-gradient(0deg, rgba(17, 35, 27, 0.48), transparent 50%);
}

.route-map-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 26px;
  color: #fffdf8;
}

.route-map-hero-copy .eyebrow { color: #f0c987; }
.route-map-hero-copy h2 {
  margin: 5px 0 7px;
  color: #fffdf8;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.route-map-hero-copy p {
  margin: 0 0 15px;
  color: rgba(255, 253, 248, 0.78);
  font-size: 0.84rem;
  line-height: 1.5;
}
.route-map-hero-copy .btn {
  display: inline-flex;
  width: auto;
  background: #fffdf8;
  color: var(--clay);
  box-shadow: none;
}

.route-detail-map {
  position: relative;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

.route-detail-map img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.route-detail-map figcaption {
  padding: 7px 11px;
  color: var(--muted);
  font-size: 0.62rem;
}

@media (max-width: 760px) {
  .route-card-map { height: 132px; }
  .route-card-body { padding: 13px 14px 14px; }
  .route-map-hero {
    min-height: 235px;
    margin: 13px 0;
    border-radius: 23px;
  }
  .route-map-hero-copy { padding: 16px; }
  .route-map-hero-copy h2 { font-size: 1.75rem; }
  .route-map-hero-copy p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.72rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .route-map-hero-copy .btn { min-height: 38px; font-size: 0.7rem; }
  .route-detail-map img { height: 220px; }
}

/* four-tab dock and nearest quest button */
.bottom-dock {
  grid-template-columns: 1fr 74px 1fr 1fr;
}

.dock-fab {
  padding: 8px 0 4px;
  border: 5px solid var(--bg);
  background: var(--clay);
  color: #fff8ef;
  cursor: pointer;
  font: inherit;
}

.dock-fab.is-loading .dock-fab-icon svg { animation: spin 0.9s linear infinite; }

.rail-quest {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin: 12px auto 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--clay);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.rail-quest-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 7px 15px rgba(184, 83, 45, 0.25);
  color: #fffdf8;
}
.rail-quest-icon svg { width: 19px; height: 19px; }
.rail-quest:hover .rail-quest-icon { background: var(--clay-dark); }

@media (max-width: 760px) {
  .bottom-dock { grid-template-columns: 1fr 74px 1fr 1fr; }
}

/* mobile live map at the top of the home screen */
.ma-map-first {
  position: relative;
  height: 300px;
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #e7e2d5;
  box-shadow: var(--shadow-sm);
}
.ma-home-map { position: absolute; inset: 0; }
.ma-map-first .leaflet-control-attribution { display: none; }
.ma-map-top {
  position: absolute;
  z-index: 500;
  top: 9px;
  right: 9px;
  left: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.ma-map-pill,
.ma-locate { pointer-events: auto; }
.ma-map-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 4px 14px rgba(31, 43, 37, 0.14);
  color: var(--ink);
  font-size: 0.58rem;
  font-weight: 800;
}
.ma-map-pill svg { width: 12px; height: 12px; color: var(--clay); }
.ma-locate {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 4px 14px rgba(31, 43, 37, 0.16);
  color: var(--forest);
}
.ma-locate svg { width: 17px; height: 17px; }
.ma-map-credit {
  position: absolute;
  z-index: 500;
  right: 7px;
  bottom: 6px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.86);
  color: #596257;
  font-size: 0.49rem;
  font-weight: 600;
}
.ma-map-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 30px;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}
.ma-leaflet-pin {
  background: transparent;
  border: 0;
}
.ma-leaflet-pin span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 3px solid #fffdf8;
  border-radius: 50% 50% 50% 0;
  background: var(--clay);
  box-shadow: 0 4px 10px rgba(112, 50, 26, 0.3);
  color: #fffdf8;
  font-size: 0.62rem;
  font-weight: 900;
  transform: rotate(-45deg);
}
.ma-leaflet-pin span b { display: grid; place-items: center; width: 100%; height: 100%; transform: rotate(45deg); }
.ma-leaflet-you {
  background: transparent;
  border: 0;
}
.ma-leaflet-you span {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 19px;
  height: 19px;
  border: 3px solid #fffdf8;
  border-radius: 50%;
  background: #256fee;
  box-shadow: 0 0 0 6px rgba(37, 111, 238, 0.18);
}
.ma-leaflet-you b {
  position: absolute;
  top: 28px;
  left: 0;
  padding: 3px 6px;
  border-radius: 5px;
  background: #256fee;
  color: #fff;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ------------------------------------------------------------ tasks page */

.tasks-view { padding-bottom: 4px; }

.tasks-nearest {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 15px 0 16px;
  padding: 11px 12px;
  border: 1px solid rgba(184, 83, 45, 0.22);
  border-radius: 16px;
  background: var(--clay-soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.tasks-nearest-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--clay);
  color: #fffdf8;
}
.tasks-nearest-icon svg { width: 19px; height: 19px; }
.tasks-nearest-copy { flex: 1; min-width: 0; }
.tasks-nearest-copy b { display: block; font-size: 0.9rem; }
.tasks-nearest-copy small { display: block; margin-top: 2px; color: #6f5a4c; font-size: 0.68rem; }
.tasks-nearest-go {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.7);
  color: var(--clay);
}
.tasks-nearest-go svg { width: 13px; height: 13px; }

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

.task-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.task-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--ink); }
.task-card-img {
  width: 118px;
  min-height: 118px;
  flex: none;
  object-fit: cover;
}
.task-card-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  padding: 10px 11px;
}
.task-cat {
  color: var(--clay);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.task-card-copy > b {
  display: block;
  overflow: hidden;
  margin: 3px 0;
  font-size: 0.85rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-card-copy > small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 7px;
  color: var(--muted);
  font-size: 0.56rem;
}
.task-meta span { display: inline-flex; align-items: center; gap: 2px; }
.task-meta svg { width: 9px; height: 9px; }
.task-state { margin-left: auto; color: var(--clay); font-weight: 800; }
.task-card.is-done { border-color: rgba(36, 71, 60, 0.18); }
.task-card.is-done .task-state { color: var(--forest); }

@media (max-width: 760px) {
  .tasks-nearest { margin-top: 10px; }
  .tasks-grid { grid-template-columns: 1fr; gap: 7px; }
  .task-card { border-radius: 13px; }
  .task-card-img { width: 98px; min-height: 98px; }
  .task-card-copy { padding: 8px 9px; }
  .task-card-copy > b { font-size: 0.8rem; }
}

/* active tab indicator */
.bottom-dock {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-left: 8px;
  padding-right: 8px;
}
.dock-link { position: relative; }
.dock-link.is-active::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 3px rgba(184, 83, 45, 0.16);
  transform: translateX(-50%);
}
.dock-link.is-active { color: var(--clay); }
.dock-link.is-active svg { stroke-width: 2.2; }

@media (max-width: 760px) {
  .bottom-dock { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* map-only mobile home */
.ma-map-only { padding-bottom: 4px; }
.ma-nearest {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.ma-nearest-img {
  width: 4.8rem;
  height: 4.8rem;
  flex: none;
  border-radius: 12px;
  object-fit: cover;
}
.ma-nearest-copy { min-width: 0; flex: 1; }
.ma-nearest-copy b {
  display: block;
  overflow: hidden;
  margin: 2px 0 3px;
  font-size: 0.95rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ma-nearest-copy small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ma-nearest-go {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  flex: none;
  border-radius: 50%;
  background: var(--clay-soft);
  color: var(--clay);
}
.ma-nearest-go svg { width: 0.9rem; height: 0.9rem; }
.ma-all-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 2.3rem;
  margin-top: 7px;
  border: 1px dashed #c8b9a6;
  border-radius: 10px;
  color: var(--clay);
  font-size: 0.64rem;
  font-weight: 800;
}
.ma-all-link svg { width: 0.75rem; height: 0.75rem; }

.map-nearest {
  position: absolute;
  right: 12px;
  bottom: 32px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: var(--clay);
  color: #fffdf8;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(112, 50, 26, 0.28);
  cursor: pointer;
}
.map-nearest svg { width: 15px; height: 15px; }

@media (max-width: 760px) {
  .map-nearest { font-size: 0.62rem; padding: 7px 9px; }
}

/* tasks filters and progress */
.tasks-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.tasks-progress > span:first-child { flex: none; color: var(--muted); font-size: 0.63rem; font-weight: 700; }
.tasks-progress-bar {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(36, 71, 60, 0.12);
}
.tasks-progress-bar i { display: block; height: 100%; border-radius: inherit; background: var(--clay); }
.tasks-progress b { flex: none; color: var(--clay); font-size: 0.64rem; }

.tasks-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 12px;
}
.tasks-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.tasks-filter {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  cursor: pointer;
}
.tasks-filter.is-active { border-color: var(--clay); background: var(--clay); color: #fffdf8; }
.tasks-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.tasks-search {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}
.tasks-search svg { width: 13px; height: 13px; flex: none; }
.tasks-search input {
  width: 150px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.64rem;
}
.tasks-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.6rem;
  font-weight: 800;
  cursor: pointer;
}
.tasks-sort svg { width: 12px; height: 12px; color: var(--clay); }
.tasks-sort.is-active { border-color: var(--clay); background: var(--clay-soft); color: var(--clay); }
.tasks-empty { grid-column: 1 / -1; }

@media (max-width: 760px) {
  .tasks-controls { align-items: stretch; flex-direction: column; }
  .tasks-tools { width: 100%; }
  .tasks-search { flex: 1; }
  .tasks-search input { width: 100%; }
  .tasks-filters { width: 100%; }
  .tasks-filter { flex: 1; text-align: center; }
}

/* map without white card frame */
.map-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.map-card .map-head {
  padding: 12px 4px 10px;
}
.map-card .map-wrap {
  overflow: hidden;
  border-radius: 20px;
}
.map-card .map-stage {
  border: 0;
  border-radius: 20px;
}
.map-card .map-foot {
  padding: 8px 4px 0;
}

/* every route in the same dark map style */
.route-map-hero-list {
  display: flex;
  margin: 14px 0;
}
.route-map-hero-list + .route-map-hero-list { margin-top: 12px; }
.route-map-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.route-map-hero-count {
  padding: 4px 8px;
  border: 1px solid rgba(255, 253, 248, 0.26);
  border-radius: 999px;
  background: rgba(15, 32, 24, 0.28);
  color: rgba(255, 253, 248, 0.9);
  font-size: 0.64rem;
  font-weight: 800;
}
.route-map-hero-progress {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 253, 248, 0.18);
}
.route-map-hero-progress i {
  display: block;
  height: 100%;
  background: var(--clay);
}
@media (max-width: 760px) {
  .route-map-hero-list { min-height: 290px; margin: 0 0 10px; }
  .route-map-hero-copy p { -webkit-line-clamp: 2; }
  .route-map-hero-actions { gap: 7px; }
}

.detail-grid.detail-single { grid-template-columns: minmax(0, 1fr); }

/* phone polish */
.eyebrow::before,
.kicker::before { display: none; }

.map-card .map-stage {
  border: 1px solid rgba(184, 83, 45, 0.28);
  box-shadow: 0 0 0 1px rgba(255, 253, 248, 0.35) inset;
}

/* make sources/footnotes quieter */
.sources-list { margin: 10px 0; }
.sources-list a {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 500;
}
.sources-list a::before { color: var(--dim); }
.site-foot {
  color: #aaa295;
  font-size: 0.56rem;
  opacity: 0.72;
}
.archive-note { opacity: 0.58; }
.full-story .small.dim { opacity: 0.58; }

@media (max-width: 760px) {
  .map-card .map-stage.real-map { height: 240px; }
  .map-card .map-head { padding: 8px 4px 8px; }
  .map-card .map-head p { display: none; }
  .dock-link {
    gap: 1px;
    font-size: 0.44rem;
    font-weight: 600;
  }
  .dock-link svg { width: 19px; height: 19px; }
  .route-steps { display: none; }
}

/* hard guard against horizontal page scrolling */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
#app,
.app-body,
.shell,
.shell-page,
.view,
.ma-home,
.map-card,
.map-wrap,
.map-stage {
  max-width: 100%;
  min-width: 0;
}

/* bottom tab labels: 2x */
@media (max-width: 760px) {
  .bottom-dock {
    height: 68px;
    padding-top: 5px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  .dock-link {
    min-width: 0;
    gap: 2px;
    font-size: 0.88rem;
    line-height: 1;
    white-space: nowrap;
  }
  .dock-link svg {
    width: 18px;
    height: 18px;
  }
  .dock-link.is-active::before {
    top: -7px;
  }
}

/* keep the map column from being widened by long nearest titles */
.ma-home {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  width: 100%;
}
.ma-home > * {
  min-width: 0;
  max-width: 100%;
}
.ma-nearest {
  width: 100%;
  min-width: 0;
}
.ma-nearest-copy b {
  white-space: normal;
  overflow-wrap: anywhere;
}
.map-card {
  width: 100%;
  min-width: 0;
}
.map-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.map-stage .leaflet-pane,
.map-stage .leaflet-control {
  z-index: 2;
}

/* fullscreen map + compact point card */
.map-fullscreen {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  font-size: 0.6rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.map-fullscreen svg { width: 13px; height: 13px; color: var(--clay); }

.map-selection[hidden] { display: none; }
.map-selection { margin-top: 9px; }
.map-selection-card {
  display: grid;
  gap: 2px;
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--clay)) 24%, var(--line));
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.map-selection-cat {
  color: var(--accent, var(--clay));
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.map-selection-card > b { font-size: 0.92rem; line-height: 1.15; }
.map-selection-card > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-selection-actions { display: flex; align-items: center; gap: 7px; margin-top: 6px; }
.map-selection-actions .btn { flex: 1; justify-content: center; }
.map-selection-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
}
.map-selection-close svg { width: 13px; height: 13px; }

body.map-fullscreen-open { overflow: hidden; }
.map-card.is-map-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  height: 100dvh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--bg);
}
.map-card.is-map-fullscreen .map-head,
.map-card.is-map-fullscreen .map-foot { display: none; }
.map-card.is-map-fullscreen .map-wrap {
  flex: 1;
  border: 0;
  border-radius: 0;
}
.map-card.is-map-fullscreen .map-stage {
  height: 100% !important;
  border: 0;
  border-radius: 0;
}
.map-card.is-map-fullscreen .map-fullscreen {
  top: 12px;
  left: 12px;
  background: var(--surface);
}
.map-card.is-map-fullscreen .map-selection {
  position: absolute;
  right: 12px;
  bottom: 64px;
  left: 12px;
  z-index: 1200;
  max-height: 40dvh;
  margin: 0;
  overflow: auto;
}

/* fullscreen must escape the animated .view containing block */
body.map-fullscreen-open .view {
  animation: none !important;
  transform: none !important;
}
body.map-fullscreen-open .mobile-topbar,
body.map-fullscreen-open .bottom-dock {
  visibility: hidden;
}
