/* ================================================================
   去野地图 · app.css
   A warm little atlas for your pocket.
   ================================================================ */

:root {
  --cream: #fbf7ec;
  --cream-deep: #f4edde;
  --paper: #fffdf7;
  --paper-warm: #fff9ec;
  --ink: #2c3a33;
  --ink-soft: #53655c;
  --muted: #7f8c83;
  --faint: #aeb7ad;
  --line: #e9e1cf;
  --line-strong: #dcd2bd;
  --teal: #4f9689;
  --teal-deep: #2f5650;
  --teal-ink: #24443f;
  --mint: #dff0e8;
  --sea: #d8ede9;
  --sea-deep: #bfe2dd;
  --coral: #ee8d70;
  --coral-deep: #d36d51;
  --sun: #f3bc5c;
  --sun-soft: #f9e2a8;
  --lavender: #b892c6;
  --blue: #6f9fc3;
  --red: #c75d4c;
  --green-ok: #4c8b71;
  --shadow-sm: 0 4px 14px rgba(54, 72, 59, 0.07);
  --shadow-md: 0 14px 38px rgba(54, 72, 59, 0.11);
  --shadow-lg: 0 28px 80px rgba(41, 63, 52, 0.18);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --nav-height: 74px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --font-sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  background: #eae3d2;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(244, 194, 95, 0.22), transparent 24rem),
    radial-gradient(circle at 81% 78%, rgba(115, 183, 163, 0.24), transparent 30rem),
    linear-gradient(135deg, #f0e9da 0%, #e7dfce 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(58, 80, 67, 0.12) 0.7px, transparent 0.7px);
  background-size: 21px 21px;
  opacity: 0.22;
  mask-image: linear-gradient(110deg, #000, transparent 55%, #000);
}

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

button {
  cursor: pointer;
  border: 0;
  background: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
}

svg {
  display: block;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(79, 150, 137, 0.35);
  outline-offset: 2px;
}

::selection {
  color: var(--teal-ink);
  background: #f5d991;
}

.has-modal,
.has-panel,
.has-sheet,
.search-open {
  overscroll-behavior: none;
}

/* ================================================================
   App shell
   ================================================================ */

.desktop-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  color: var(--teal-deep);
}

.desktop-word {
  position: absolute;
  left: max(2.6vw, 26px);
  top: 17vh;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: clamp(58px, 9vw, 150px);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.84;
  color: rgba(55, 94, 84, 0.1);
}

.desktop-note {
  position: absolute;
  left: max(3vw, 33px);
  bottom: 8vh;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(55, 94, 84, 0.42);
  writing-mode: vertical-rl;
}

.desktop-doodle {
  position: absolute;
  color: rgba(55, 94, 84, 0.26);
  font-family: var(--font-serif);
}

.doodle-1 {
  right: 12vw;
  top: 16vh;
  font-size: 35px;
  transform: rotate(17deg);
}

.doodle-2 {
  right: 7vw;
  bottom: 17vh;
  font-size: 84px;
  font-weight: 200;
  transform: rotate(-20deg);
}

.doodle-3 {
  left: 13vw;
  bottom: 25vh;
  font-size: 28px;
}

.app {
  position: relative;
  width: min(100vw, 480px);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
  isolation: isolate;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 30px 90px rgba(62, 71, 53, 0.22);
}

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

@media (min-width: 640px) and (min-height: 680px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .app {
    height: min(910px, calc(100dvh - 38px));
    border-radius: 34px;
    border: 1px solid rgba(255, 253, 247, 0.6);
  }
}

@media (max-width: 639px), (max-height: 679px) {
  .desktop-background {
    display: none;
  }

  .app {
    box-shadow: none;
    border-radius: 0;
  }
}

.tab-panel {
  display: none;
}

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

.scroll-tab {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 10px);
  background: var(--cream);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-tab::-webkit-scrollbar,
.modal-card::-webkit-scrollbar,
.subpage-body::-webkit-scrollbar,
.bottom-sheet::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ================================================================
   Type & small pieces
   ================================================================ */

.eyebrow {
  display: inline-block;
  color: var(--teal);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  line-height: 1.2;
}

.soft-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  padding: 18px 4px;
}

.soft-text {
  color: var(--muted);
  font-size: 12px;
}

.page-scroll {
  min-height: 100%;
  padding: 22px 18px 30px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: max(14px, calc(var(--safe-top) + 8px)) 2px 18px;
}

.page-head h1 {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 34px;
  letter-spacing: -0.04em;
  color: var(--teal-ink);
  line-height: 1.05;
}

.page-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.page-head-stamp {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  color: var(--teal);
  background: var(--mint);
  border: 1px dashed rgba(79, 150, 137, 0.45);
  border-radius: 50%;
  transform: rotate(9deg);
}

.page-quote {
  margin: 26px 4px 4px;
  color: var(--faint);
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

.page-signoff {
  padding: 26px 0 4px;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: center;
}

.content-section {
  margin-top: 25px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-heading h2 {
  margin-top: 3px;
  font-size: 18px;
  letter-spacing: -0.04em;
  color: var(--teal-ink);
}

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

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 0;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.text-btn:active {
  transform: translateY(1px);
}

/* ================================================================
   Buttons
   ================================================================ */

.primary-btn,
.ghost-btn,
.danger-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 15px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.primary-btn {
  color: #fffaf0;
  background: linear-gradient(140deg, #ee9a75 0%, #e77a5c 100%);
  box-shadow: 0 8px 19px rgba(216, 107, 78, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.primary-btn:hover {
  background: linear-gradient(140deg, #f1a47f 0%, #e57b5d 100%);
}

.primary-btn:active,
.ghost-btn:active,
.danger-btn:active {
  transform: translateY(1px) scale(0.995);
}

.ghost-btn {
  color: var(--teal-ink);
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 247, 0.72);
}

.ghost-btn:hover {
  background: var(--paper);
}

.danger-btn {
  color: #fffaf0;
  background: linear-gradient(140deg, #d77b68, #bc5848);
  box-shadow: 0 8px 18px rgba(188, 88, 72, 0.2);
}

.subtle-danger {
  color: var(--red) !important;
  border-color: rgba(199, 93, 76, 0.22) !important;
}

.wide {
  width: 100%;
}

.small {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 11px;
}

.tiny {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 10px;
}

.icon-btn,
.mini-icon-btn {
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--ink-soft);
  border-radius: 50%;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn {
  width: 38px;
  height: 38px;
}

.mini-icon-btn {
  width: 29px;
  height: 29px;
  color: var(--muted);
  background: var(--cream);
}

.icon-btn:hover,
.mini-icon-btn:hover {
  color: var(--teal-ink);
  background: var(--cream-deep);
}

.icon-btn.light {
  color: rgba(255, 253, 247, 0.92);
  background: rgba(255, 253, 247, 0.12);
  border: 1px solid rgba(255, 253, 247, 0.17);
}

.is-pulse {
  animation: softPulse 0.6s ease;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.ghost-btn .btn-spinner {
  border-color: rgba(47, 86, 80, 0.25);
  border-top-color: var(--teal);
}

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

@keyframes softPulse {
  50% { transform: scale(1.03); }
}

/* ================================================================
   Avatars
   ================================================================ */

.avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--avatar-bg, #d9ead9);
  box-shadow: inset 0 -2px 0 rgba(46, 67, 55, 0.08), 0 2px 5px rgba(45, 64, 53, 0.08);
  line-height: 1;
  user-select: none;
}

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

.account-emoji {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: 50%;
  background: var(--avatar-bg);
  font-size: 17px;
}

/* ================================================================
   Forms
   ================================================================ */

.field-label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.field-label input,
.field-label textarea,
.inline-search input,
.route-stop-search input {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 253, 247, 0.82);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: border 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field-label textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.7;
}

.field-label input::placeholder,
.field-label textarea::placeholder,
.inline-search input::placeholder,
.route-stop-search input::placeholder {
  color: var(--faint);
  font-weight: 400;
}

.field-label input:focus,
.field-label textarea:focus,
.inline-search input:focus,
.route-stop-search input:focus {
  border-color: var(--teal);
  background: var(--paper);
  box-shadow: 0 0 0 3px rgba(79, 150, 137, 0.11);
}

.label-optional {
  color: var(--faint);
  font-size: 9px;
  font-weight: 500;
}

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

.form-error {
  margin: 0 0 10px;
  padding: 9px 11px;
  color: #9b4234;
  border-radius: 9px;
  background: #f9e5df;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
}

.privacy-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 13px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.form-two .field-label {
  margin-bottom: 0;
}

/* ================================================================
   Loading
   ================================================================ */

.loading-screen {
  position: absolute;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background:
    radial-gradient(circle at 50% 30%, rgba(248, 218, 144, 0.45), transparent 12rem),
    var(--cream);
  text-align: center;
  transition: opacity 0.42s ease, visibility 0.42s ease;
}

.loading-screen.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-mark {
  position: relative;
  width: 122px;
  height: 122px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}

.loading-pin {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  animation: floaty 2.8s ease-in-out infinite;
}

.loading-pin svg {
  filter: drop-shadow(0 12px 18px rgba(47, 86, 80, 0.22));
}

.loading-orbit {
  position: absolute;
  border: 1px dashed rgba(79, 150, 137, 0.35);
  border-radius: 50%;
}

.orbit-a {
  inset: 0;
  animation: orbit 16s linear infinite;
}

.orbit-b {
  inset: 13px;
  border-color: rgba(238, 141, 112, 0.3);
  animation: orbit 10s linear infinite reverse;
}

.orbit-a::before,
.orbit-b::before {
  content: "✦";
  position: absolute;
  top: -7px;
  left: 50%;
  color: var(--sun);
  font-size: 12px;
}

.orbit-b::before {
  top: auto;
  bottom: -6px;
  color: var(--coral);
  font-size: 9px;
}

.loading-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--teal-ink);
}

.loading-sub {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.loading-sub .boot-retry {
  margin-top: 14px;
}

.loading-dots {
  display: flex;
  gap: 6px;
  margin-top: 20px;
}

.loading-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.3;
  animation: blink 1.2s ease infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.18s; }
.loading-dots span:nth-child(3) { animation-delay: 0.36s; }

.loading-screen.is-error .loading-mark {
  animation: none;
  opacity: 0.65;
}

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

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-7px) rotate(1.5deg); }
}

@keyframes blink {
  0%, 100% { opacity: 0.22; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

/* ================================================================
   Map canvas
   ================================================================ */

.map-tab {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--sea);
}

.map-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background:
    radial-gradient(ellipse at 72% 15%, rgba(244, 205, 127, 0.4), transparent 31%),
    radial-gradient(ellipse at 22% 72%, rgba(153, 208, 192, 0.35), transparent 40%),
    linear-gradient(145deg, #def1ed 0%, #cfebe6 46%, #d8ece5 100%);
}

.map-stage:active {
  cursor: grabbing;
}

.map-stage::before,
.map-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(1px);
}

.map-stage::before {
  width: 240px;
  height: 240px;
  right: -110px;
  top: 12%;
  border: 1px solid rgba(64, 126, 116, 0.1);
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.08), 0 0 0 70px rgba(255, 255, 255, 0.04);
}

.map-stage::after {
  width: 150px;
  height: 150px;
  left: -80px;
  bottom: 18%;
  border: 1px dashed rgba(64, 126, 116, 0.12);
}

.map-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sky-sun {
  position: absolute;
  top: 13%;
  right: 7%;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #f9d883, rgba(248, 219, 148, 0.15) 68%, transparent 70%);
  opacity: 0.8;
}

.sky-cloud {
  position: absolute;
  width: 78px;
  height: 24px;
  border-radius: 60% 40% 50% 50%;
  background: rgba(255, 253, 247, 0.5);
  filter: blur(0.4px);
}

.sky-cloud::before,
.sky-cloud::after {
  content: "";
  position: absolute;
  bottom: 7px;
  border-radius: 50%;
  background: inherit;
}

.sky-cloud::before {
  left: 13px;
  width: 34px;
  height: 34px;
}

.sky-cloud::after {
  right: 11px;
  width: 25px;
  height: 25px;
}

.cloud-one {
  top: 19%;
  left: 8%;
  transform: scale(0.9);
  opacity: 0.58;
}

.cloud-two {
  top: 38%;
  right: 9%;
  transform: scale(0.7);
  opacity: 0.4;
}

.cloud-three {
  bottom: 30%;
  left: 24%;
  transform: scale(1.1);
  opacity: 0.27;
}

.sea-wave {
  position: absolute;
  width: 260px;
  height: 70px;
  border: 1px solid rgba(75, 140, 130, 0.13);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.wave-one { left: -100px; top: 55%; }
.wave-two { right: -170px; bottom: 18%; transform: rotate(14deg) scale(1.3); }

.map-watermark {
  position: absolute;
  left: 9px;
  top: 45%;
  color: rgba(47, 86, 80, 0.14);
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.34em;
  line-height: 1.5;
  writing-mode: vertical-rl;
}

.compass-rose {
  position: absolute;
  right: 14px;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 138px);
  opacity: 0.6;
}

.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sea-dot-fill {
  pointer-events: none;
}

.region-path {
  cursor: pointer;
  fill: #f5efdf;
  stroke: rgba(255, 252, 243, 0.84);
  stroke-width: 0.7;
  transition: fill 0.28s ease, opacity 0.25s ease, filter 0.25s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.region-path:hover {
  fill: #f8e8c8;
}

.region-path.is-visited {
  fill: url(#visitedGrad);
  stroke: #fbefd4;
  stroke-width: 0.9;
}

.region-path.is-visited:hover {
  fill: #f8c985;
}

.region-path.is-selected {
  fill: #f8cc86;
  stroke: #2f5650;
  stroke-width: 2.1;
  filter: drop-shadow(0 2px 3px rgba(47, 86, 80, 0.16));
}

.region-path.is-dimmed {
  fill: #f1ecdf;
  opacity: 0.56;
}

.region-path.is-dimmed.is-visited {
  fill: #f3dfb7;
  opacity: 0.42;
}

/* County level: merged geometry for performance, with small overlays only for
   visited and selected places. */
.region-area {
  fill: #f5efdf;
  stroke: rgba(255, 252, 243, 0.84);
  stroke-width: 0.7;
  pointer-events: none;
}

.region-area.is-dimmed {
  fill: #f1ecdf;
  opacity: 0.56;
}

.region-visited {
  fill: url(#visitedGrad);
  stroke: #fbefd4;
  stroke-width: 0.9;
  pointer-events: none;
}

.region-visited.is-dimmed {
  fill: #f3dfb7;
  opacity: 0.42;
}

.region-selection {
  fill: #f8cc86;
  stroke: #2f5650;
  stroke-width: 2.1;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(47, 86, 80, 0.16));
}

#mapWorld {
  will-change: transform;
}

.map-stage.is-gesturing .region-area,
.map-stage.is-gesturing .region-visited,
.map-stage.is-gesturing .region-path,
.map-stage.is-gesturing .province-path {
  shape-rendering: optimizeSpeed;
}

.map-stage.is-gesturing .region-path {
  transition: none;
}

.province-path {
  stroke: rgba(62, 116, 105, 0.26);
  stroke-width: 1.1;
  pointer-events: none;
}

.route-group {
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.route-line {
  stroke-width: 2.4;
  stroke-dasharray: 2 8;
  opacity: 0.9;
  animation: routeFlow 13s linear infinite;
  filter: drop-shadow(0 1px 2px rgba(75, 70, 45, 0.12));
}

.route-stop-dot {
  opacity: 0.95;
}

.route-group.is-faded {
  opacity: 0.25;
}

.route-group.is-highlighted .route-line {
  stroke-width: 3;
  opacity: 1;
  stroke-dasharray: 2 6;
}

@keyframes routeFlow {
  to { stroke-dashoffset: -180; }
}

.province-label {
  fill: rgba(51, 104, 94, 0.78);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  paint-order: stroke;
  stroke: rgba(223, 242, 237, 0.72);
  stroke-width: 2.4px;
  stroke-linejoin: round;
  transition: opacity 0.2s ease;
}

.region-label {
  fill: #4e655a;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  paint-order: stroke;
  stroke: rgba(255, 251, 241, 0.92);
  stroke-width: 2.7px;
  stroke-linejoin: round;
  transition: opacity 0.2s ease, fill 0.2s ease;
}

.region-label.is-visited {
  fill: #835e2f;
}

.region-label.is-selected {
  fill: #2f5650;
  font-weight: 800;
}

.cat-pin {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.cat-pin.is-filtered-out {
  opacity: 0;
  pointer-events: none;
}

.cat-pin .pin-bg {
  transition: transform 0.16s ease, fill 0.16s ease;
}

.cat-pin:hover .pin-bg {
  transform: scale(1.08);
}

.cat-pin.is-visible .pin-halo {
  animation: pinHalo 3.5s ease-in-out infinite;
}

.cat-pin.is-visited .pin-halo {
  fill: #f8dc9d;
  opacity: 0.9 !important;
}

.cat-pin.is-visited .pin-check,
.cat-pin.is-visited .pin-check-mark {
  opacity: 1;
}

.cat-pin.is-selected {
  filter: drop-shadow(0 4px 7px rgba(47, 86, 80, 0.24));
}

.cat-pin.is-selected .pin-bg {
  stroke-width: 2.2;
  transform: scale(1.1);
}

.cat-pin.is-selected .pin-halo {
  fill: #ffdca0;
  opacity: 1 !important;
}

@keyframes pinHalo {
  0%, 100% { opacity: 0.5; transform: scale(0.93); }
  50% { opacity: 0.9; transform: scale(1.06); }
}

.map-user-marker {
  pointer-events: none;
}

.user-pulse {
  transform-origin: center;
  animation: userPulse 2.4s ease-out infinite;
}

.user-core {
  stroke: #fff;
  stroke-width: 2;
}

@keyframes userPulse {
  0% { transform: scale(0.4); opacity: 0.9; }
  75%, 100% { transform: scale(1.5); opacity: 0; }
}

.map-control {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--teal-ink);
  border: 1px solid rgba(255, 253, 247, 0.78);
  border-radius: 13px;
  background: rgba(255, 253, 247, 0.8);
  box-shadow: 0 5px 15px rgba(58, 86, 73, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.16s ease, background 0.16s ease;
}

.map-control:hover {
  background: #fffdf7;
}

.map-control:active {
  transform: scale(0.93);
}

.map-control.is-locating svg {
  animation: locator 1.3s ease-in-out infinite;
  color: var(--coral);
}

@keyframes locator {
  50% { transform: scale(1.15) rotate(8deg); }
}

/* ================================================================
   Map top chrome
   ================================================================ */

.map-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: calc(11px + var(--safe-top)) 14px 0;
  pointer-events: none;
}

.map-top > * {
  pointer-events: auto;
}

.brand-row {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

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

.brand-mark {
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  filter: drop-shadow(0 5px 9px rgba(47, 86, 80, 0.19));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.brand-copy small {
  color: rgba(63, 91, 79, 0.65);
  font-size: 8px;
  letter-spacing: 0.11em;
}

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

.progress-pill {
  display: flex;
  height: 31px;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 6px;
  color: var(--teal-ink);
  border: 1px solid rgba(255, 253, 247, 0.8);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.69);
  box-shadow: 0 3px 10px rgba(58, 86, 73, 0.06);
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.progress-pie {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: conic-gradient(#efa75b 0deg, rgba(47, 86, 80, 0.12) 0);
  box-shadow: inset 0 0 0 4px rgba(255, 253, 247, 0.93);
}

.account-button {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: var(--teal-ink);
  border: 1px solid rgba(255, 253, 247, 0.8);
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.72);
  box-shadow: 0 3px 10px rgba(58, 86, 73, 0.07);
  backdrop-filter: blur(8px);
}

.account-button.is-logged-in {
  padding: 0;
  border-color: rgba(255, 253, 247, 0.95);
}

.account-button.is-guest {
  display: inline-flex;
  width: auto;
  gap: 3px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--teal-ink);
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
}

.account-button.is-guest .ui-icon {
  color: var(--teal);
}

.search-bar {
  display: flex;
  width: 100%;
  height: 45px;
  align-items: center;
  gap: 9px;
  padding: 0 7px 0 14px;
  color: var(--muted);
  border: 1px solid rgba(255, 253, 247, 0.9);
  border-radius: 15px;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: 0 7px 18px rgba(58, 86, 73, 0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: left;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.search-bar:hover {
  background: #fffdf7;
  box-shadow: 0 8px 22px rgba(58, 86, 73, 0.12);
}

.search-bar-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--teal);
}

.search-placeholder {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
}

.search-shortcut {
  padding: 5px 9px;
  color: var(--teal);
  border-radius: 8px;
  background: var(--mint);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.category-strip-host {
  margin-top: 7px;
}

.level-switch-host {
  position: relative;
  z-index: 2;
  margin-top: 8px;
}

.level-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 253, 247, 0.72);
  border-radius: 11px;
  background: rgba(255, 253, 247, 0.58);
  box-shadow: 0 4px 12px rgba(55, 81, 68, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.level-switch-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.sync-chip {
  display: inline-flex;
  height: 27px;
  max-width: 94px;
  align-items: center;
  gap: 3px;
  padding: 0 7px;
  overflow: hidden;
  color: var(--faint);
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.5);
  font-size: 7.5px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sync-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sync-chip.is-online {
  opacity: 0.66;
}

.sync-chip.is-pending {
  color: #8a642d;
  border-color: rgba(206, 166, 89, 0.25);
  background: rgba(255, 243, 209, 0.86);
}

.sync-chip.is-offline {
  color: var(--muted);
  border-color: rgba(120, 133, 123, 0.16);
  background: rgba(248, 244, 234, 0.86);
}

.sync-chip.is-warn {
  color: #9b4f37;
  border-color: rgba(195, 109, 82, 0.22);
  background: rgba(255, 231, 220, 0.9);
}

.sync-chip.is-syncing {
  color: var(--teal);
  border-color: rgba(79, 150, 137, 0.2);
  background: rgba(223, 240, 232, 0.82);
}

.sync-chip.is-syncing .ui-icon {
  animation: spin 0.9s linear infinite;
}

.level-switch button {
  display: inline-flex;
  height: 27px;
  align-items: baseline;
  gap: 4px;
  padding: 0 9px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.level-switch button small {
  color: var(--faint);
  font-size: 7.5px;
  font-weight: 600;
}

.level-switch button.is-active {
  color: var(--teal-ink);
  background: var(--sun-soft);
  box-shadow: 0 2px 6px rgba(111, 84, 37, 0.1);
}

.level-switch button.is-active small {
  color: #8c692e;
}

.level-switch-host.is-loading .level-switch {
  opacity: 0.6;
  pointer-events: none;
}

.map-level-loading {
  position: absolute;
  top: 46%;
  left: 50%;
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  color: var(--teal-ink);
  border: 1px solid rgba(255, 253, 247, 0.9);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.93);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

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

.map-level-loading.is-visible {
  opacity: 1;
}

.map-level-loading > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.map-level-loading strong {
  font-size: 10.5px;
}

.map-level-loading small {
  color: var(--faint);
  font-size: 8px;
}

.map-level-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid rgba(79, 150, 137, 0.18);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.category-strip {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 2px 18px 4px 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.county-scope-select {
  position: relative;
  display: inline-flex;
  height: 29px;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  padding: 0 7px 0 8px;
  color: var(--teal-ink);
  border: 1px solid rgba(79, 150, 137, 0.28);
  border-radius: 999px;
  background: rgba(226, 242, 232, 0.9);
  box-shadow: 0 2px 8px rgba(55, 81, 68, 0.07);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.county-scope-select span {
  color: var(--teal);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.county-scope-select select {
  max-width: 72px;
  padding: 0 2px;
  color: var(--teal-ink);
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.county-scope-select .ui-icon {
  width: 11px;
  height: 11px;
  pointer-events: none;
}

.county-scope-select select option {
  color: var(--ink);
  background: #fffdf7;
}

.cat-filter {
  display: inline-flex;
  height: 29px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  color: var(--ink-soft);
  border: 1px solid rgba(255, 253, 247, 0.55);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.5);
  backdrop-filter: blur(8px);
  font-size: 9.5px;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, border 0.15s ease;
}

.cat-filter .cat-icon {
  width: 16px;
  height: 16px;
}

.cat-filter:hover {
  background: rgba(255, 253, 247, 0.85);
}

.cat-filter.is-active {
  color: var(--cat-ink, var(--teal-ink));
  border-color: color-mix(in srgb, var(--cat-color, var(--teal)) 42%, transparent);
  background: var(--cat-soft, var(--paper));
  box-shadow: 0 2px 7px rgba(55, 79, 66, 0.08);
}

.cat-filter-all {
  display: grid;
  place-items: center;
  color: var(--teal);
}

.cat-filter.is-active .cat-filter-all {
  color: var(--teal-ink);
}

/* ================================================================
   Map controls & hints
   ================================================================ */

.map-controls {
  position: absolute;
  right: 14px;
  top: 38%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

.map-controls > * {
  pointer-events: auto;
}

.zoom-group {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}

.zoom-group .map-control {
  border-radius: 0;
  box-shadow: none;
}

.zoom-group .map-control:first-child {
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
}

.zoom-group .map-control:last-child {
  border-radius: 0 0 13px 13px;
}

.compress-icon {
  display: none;
}

.map-immersive .expand-icon,
.app:fullscreen .expand-icon {
  display: none;
}

.map-immersive .compress-icon,
.app:fullscreen .compress-icon {
  display: block;
}

.map-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 138px);
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  color: rgba(48, 83, 74, 0.82);
  border: 1px solid rgba(255, 253, 247, 0.65);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.62);
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.map-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.map-hint.is-gone {
  opacity: 0;
  transform: translate(-50%, 6px);
}

.map-hint-spark {
  color: var(--sun);
}

/* ================================================================
   Location banner
   ================================================================ */

.map-location-banner {
  position: absolute;
  left: 14px;
  right: 14px;
  top: calc(var(--safe-top) + 199px);
  z-index: 22;
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 8px;
  padding: 8px 9px 8px 10px;
  border: 1px solid rgba(255, 253, 247, 0.9);
  border-radius: 15px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.map-location-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.location-banner-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  border-radius: 10px;
  background: linear-gradient(145deg, #79b9a9, #4f9689);
}

.location-banner-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.location-banner-copy strong {
  overflow: hidden;
  color: var(--teal-ink);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-banner-copy small {
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.4;
}

.location-arrive-btn {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 10px;
  color: #fff;
  border-radius: 10px;
  background: var(--teal-deep);
  font-size: 9px;
  font-weight: 800;
}

.location-banner-close {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--faint);
}

/* ================================================================
   Map bottom / inspiration
   ================================================================ */

.map-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 9px);
  z-index: 19;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

.map-bottom > * {
  pointer-events: auto;
}

.route-toggle {
  align-self: flex-start;
  display: inline-flex;
  height: 26px;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  color: var(--teal-ink);
  border: 1px solid rgba(255, 253, 247, 0.7);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.72);
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 700;
}

.route-toggle em {
  display: grid;
  min-width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 999px;
  background: var(--cream-deep);
  font-size: 8px;
  font-style: normal;
}

.route-toggle.is-on {
  color: #fff8ea;
  background: var(--teal-deep);
  border-color: transparent;
}

.route-toggle.is-on em {
  color: var(--teal-deep);
  background: var(--sun-soft);
}

.inspiration-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.inspiration-card {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding: 9px 9px 9px 10px;
  text-align: left;
  border: 1px solid rgba(255, 253, 247, 0.9);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 7px 20px rgba(58, 86, 73, 0.1);
  backdrop-filter: blur(14px);
  transition: background 0.16s ease, transform 0.16s ease;
}

.inspiration-card:active {
  transform: scale(0.994);
}

.inspo-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--cat-soft);
}

.inspo-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.inspo-eyebrow {
  color: var(--coral-deep);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.inspo-copy strong {
  overflow: hidden;
  color: var(--teal-ink);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.32;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspo-copy > span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspo-arrow {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--teal);
}

.inspo-shuffle {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--teal-ink);
  border: 1px solid rgba(255, 253, 247, 0.9);
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.8);
  box-shadow: var(--shadow-sm);
}

.inspo-shuffle:active {
  transform: rotate(70deg);
  transition: transform 0.25s ease;
}

/* ================================================================
   Bottom navigation
   ================================================================ */

.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  height: calc(var(--nav-height) + var(--safe-bottom));
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  padding: 8px 16px var(--safe-bottom);
  border-top: 1px solid rgba(228, 219, 201, 0.8);
  background: rgba(255, 252, 244, 0.9);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 -10px 30px rgba(71, 80, 57, 0.06);
}

.nav-item {
  position: relative;
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  color: #97a49b;
  border-radius: 15px;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-icon {
  display: grid;
  width: 31px;
  height: 27px;
  place-items: center;
  border-radius: 10px;
  transition: background 0.18s ease, transform 0.18s ease;
}

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

.nav-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-item.is-active {
  color: var(--teal-ink);
}

.nav-item.is-active .nav-icon {
  color: var(--teal-deep);
  background: var(--mint);
  transform: translateY(-1px);
}

.nav-item.is-active .nav-label {
  font-weight: 800;
}

.nav-badge {
  position: absolute;
  top: 3px;
  left: calc(50% + 8px);
  display: grid;
  min-width: 15px;
  height: 15px;
  place-items: center;
  padding: 0 4px;
  color: #fff;
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: var(--coral);
  font-size: 7.5px;
  font-weight: 800;
}

.nav-badge[hidden] {
  display: none;
}

/* ================================================================
   Search overlay
   ================================================================ */

.search-overlay {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.search-overlay[hidden] {
  display: none;
}

.search-overlay.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.search-overlay-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: calc(12px + var(--safe-top)) 14px 10px;
  border-bottom: 1px solid var(--line);
}

.search-input-wrap {
  display: flex;
  min-width: 0;
  flex: 1;
  height: 43px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--teal);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--paper);
}

.search-input-wrap:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(79, 150, 137, 0.1);
}

.search-input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.search-clear {
  flex: 0 0 auto;
}

.search-overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px calc(var(--nav-height) + var(--safe-bottom) + 20px);
  background:
    radial-gradient(circle at 88% 8%, rgba(248, 216, 143, 0.28), transparent 13rem),
    var(--cream);
}

.search-caption {
  padding: 12px 2px 18px;
}

.search-caption h2 {
  margin-top: 6px;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 28px;
  letter-spacing: -0.04em;
}

.search-caption p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.quick-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quick-search {
  display: inline-flex;
  height: 37px;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  color: var(--teal-ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--cat-soft);
  font-size: 11px;
  font-weight: 700;
}

.quick-search .cat-icon {
  width: 18px;
  height: 18px;
}

.search-divider {
  position: relative;
  margin: 28px 0 17px;
  color: var(--faint);
  font-size: 9px;
  text-align: center;
}

.search-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.search-divider span {
  position: relative;
  padding: 0 11px;
  background: var(--cream);
}

.random-destination {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 13px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.random-dice {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--coral-deep);
  border-radius: 13px;
  background: #fbe8df;
}

.random-destination > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.random-destination strong {
  color: var(--teal-ink);
  font-size: 12px;
}

.random-destination small {
  color: var(--muted);
  font-size: 9.5px;
}

.search-result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 10px;
  color: var(--teal-ink);
  font-size: 11px;
  font-weight: 700;
}

.search-result-meta small {
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 500;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.search-result {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  transition: background 0.15s ease, transform 0.15s ease;
}

.search-result:active {
  transform: scale(0.995);
}

.search-result:hover {
  background: var(--paper-warm);
}

.search-result-icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--cat-soft);
}

.search-result-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.search-result-copy strong {
  overflow: hidden;
  color: var(--teal-ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-result-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.inline-lit {
  display: inline-block;
  margin-left: 3px;
  padding: 1px 5px;
  color: #8b662f;
  border-radius: 999px;
  background: var(--sun-soft);
  font-size: 7px;
  font-style: normal;
  vertical-align: 2px;
}

.search-no-results {
  padding-top: 20px;
}

.search-no-results .empty-state {
  padding: 28px 14px;
}

/* ================================================================
   Overlay structures & common modal
   ================================================================ */

.modal-root,
.sheet-root,
.panel-root,
.toast-root {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.modal-root {
  z-index: 100;
}

.sheet-root {
  z-index: 65;
}

.panel-root {
  z-index: 55;
}

.toast-root {
  z-index: 300;
}

.sheet-root.is-open {
  pointer-events: auto;
}

.panel-root.is-open {
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px calc(20px + var(--safe-bottom));
  pointer-events: auto;
  background: rgba(32, 53, 44, 0.34);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
}

.modal-card {
  position: relative;
  width: min(100%, 410px);
  max-height: min(88dvh, 820px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 25px 21px 21px;
  border: 1px solid rgba(255, 253, 247, 0.85);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(248, 216, 143, 0.28), transparent 13rem),
    var(--paper);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 0.26s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.26s cubic-bezier(0.2, 0.7, 0.2, 1);
  scrollbar-width: none;
}

.modal-backdrop.is-open .modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 31px;
  height: 31px;
  color: var(--muted);
  background: rgba(255, 253, 247, 0.65);
}

.modal-inner {
  min-height: 1px;
}

.modal-card h2 {
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 23px;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.modal-card h3 {
  color: var(--teal-ink);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.confirm-modal {
  max-width: 350px;
}

.confirm-copy {
  padding: 5px 2px 0;
}

.confirm-copy h2 {
  margin-top: 11px;
  font-size: 20px;
}

.confirm-copy p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.confirm-icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  color: var(--teal);
  border-radius: 14px;
  background: var(--mint);
}

.confirm-icon.danger {
  color: var(--red);
  background: #f9e7e1;
}

/* ================================================================
   Auth modal
   ================================================================ */

.auth-modal {
  padding-top: 24px;
}

.auth-modal-content {
  padding-top: 2px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
}

.auth-brand .ui-icon {
  padding: 5px;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--mint);
}

.auth-modal h2 {
  margin-top: 10px;
  font-size: 27px;
}

.auth-sub {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 18px 0 15px;
  padding: 4px;
  border-radius: 12px;
  background: var(--cream);
}

.auth-tabs button {
  height: 34px;
  color: var(--muted);
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 700;
}

.auth-tabs button.is-active {
  color: var(--teal-ink);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.auth-form .primary-btn {
  margin-top: 3px;
}

.auth-divider {
  position: relative;
  margin: 17px 0 13px;
  color: var(--faint);
  font-size: 9px;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.auth-divider span {
  position: relative;
  padding: 0 10px;
  background: var(--paper);
}

.demo-login-btn {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--cream);
}

.demo-avatar {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #f6d78f;
  font-size: 18px;
}

.demo-login-btn > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.demo-login-btn strong {
  color: var(--teal-ink);
  font-size: 10.5px;
}

.demo-login-btn small {
  color: var(--muted);
  font-size: 8.5px;
}

.auth-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 12px;
  color: var(--faint);
  font-size: 8.5px;
  text-align: center;
}

/* ================================================================
   Region sheet
   ================================================================ */

.sheet-root {
  pointer-events: none;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  background: rgba(42, 64, 52, 0.2);
  backdrop-filter: blur(1.5px);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.sheet-root.is-open .sheet-backdrop {
  opacity: 1;
}

.bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 67dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 17px 21px calc(20px + var(--safe-bottom));
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(249, 221, 152, 0.33), transparent 15rem),
    var(--paper);
  box-shadow: 0 -22px 60px rgba(37, 62, 51, 0.2);
  pointer-events: auto;
  transform: translateY(102%);
  transition: transform 0.34s cubic-bezier(0.2, 0.75, 0.2, 1);
  scrollbar-width: none;
}

.sheet-root.is-open .bottom-sheet {
  transform: translateY(0);
}

.sheet-grabber {
  width: 37px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--line-strong);
}

.sheet-close {
  position: absolute;
  top: 13px;
  right: 14px;
  color: var(--muted);
  background: rgba(255, 253, 247, 0.65);
}

.region-sheet-content {
  padding-top: 5px;
}

.region-sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-right: 26px;
}

.region-big-icon {
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 19px;
  background: var(--cat-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.region-title-copy {
  min-width: 0;
}

.region-province {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.region-title-copy h2 {
  margin-top: 2px;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 27px;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.region-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 7px 0 4px;
  color: var(--cat-ink);
  border-radius: 999px;
  background: var(--cat-soft);
  font-size: 8.5px;
  font-weight: 700;
}

.category-pill .cat-icon {
  width: 14px;
  height: 14px;
}

.visited-tag,
.unvisited-tag,
.aggregate-tag,
.level-tag {
  display: inline-flex;
  height: 22px;
  align-items: center;
  gap: 3px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 700;
}

.visited-tag {
  color: #8d622a;
  background: var(--sun-soft);
}

.unvisited-tag {
  color: var(--muted);
  background: var(--cream);
}

.aggregate-tag {
  color: #5a7f71;
  background: var(--mint);
}

.level-tag {
  color: var(--muted);
  background: var(--cream);
}

.level-mini {
  display: inline-block;
  margin-left: 3px;
  padding: 1px 4px;
  color: var(--teal);
  border-radius: 4px;
  background: var(--mint);
  font-size: 6.5px;
  font-style: normal;
  font-weight: 700;
  vertical-align: 1px;
}

.region-virtual-note,
.region-descendants {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: -5px 1px 9px;
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.55;
}

.region-descendants {
  margin-top: 0;
  color: var(--teal);
}

.spot-inherited {
  position: relative;
  z-index: 1;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}

.aggregate-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 11px;
  padding: 9px 10px;
  color: #547a69;
  border: 1px dashed rgba(79, 150, 137, 0.28);
  border-radius: 11px;
  background: rgba(223, 240, 232, 0.52);
}

.aggregate-note p {
  flex: 1;
  font-size: 8.5px;
  line-height: 1.55;
}

.province-subline {
  margin: -5px 0 1px 40px;
  color: var(--faint);
  font-size: 7.5px;
}

.region-members {
  margin-top: 9px;
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.6;
}

.region-vibe {
  margin: 16px 1px 12px;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 13.5px;
  line-height: 1.75;
}

.spot-card {
  position: relative;
  overflow: hidden;
  margin-top: 12px;
  padding: 14px 15px 13px;
  border: 1px solid var(--cat-soft);
  border-radius: 17px;
  background:
    radial-gradient(circle at 100% 110%, var(--cat-soft), transparent 56%),
    var(--paper-warm);
}

.spot-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spot-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--cat-ink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.spot-category {
  color: var(--cat-ink);
  opacity: 0.65;
  font-size: 8px;
  font-weight: 700;
}

.spot-card h3 {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: -0.03em;
}

.spot-also {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  padding-right: 38px;
}

.spot-also span {
  padding: 3px 7px;
  color: var(--ink-soft);
  border: 1px solid rgba(233, 225, 207, 0.8);
  border-radius: 6px;
  background: rgba(255, 253, 247, 0.62);
  font-size: 8.5px;
}

.spot-decoration {
  position: absolute;
  right: 9px;
  bottom: 7px;
  opacity: 0.16;
  transform: rotate(-8deg) scale(1.9);
}

.memory-card {
  margin-top: 12px;
  padding: 12px 13px;
  border: 1px dashed rgba(179, 144, 75, 0.4);
  border-radius: 15px;
  background: rgba(249, 231, 187, 0.36);
}

.memory-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9b7636;
  font-size: 9px;
  font-weight: 700;
}

.memory-top > span:first-child {
  display: flex;
  align-items: center;
  gap: 4px;
}

.memory-star {
  color: var(--sun);
}

.memory-card p {
  margin-top: 6px;
  color: #725c39;
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.7;
}

.memory-card .text-btn {
  margin-top: 5px;
  color: #9b7636;
  font-size: 9px;
}

.region-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 15px;
}

.sheet-guest-hint {
  margin: 0 4px;
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.5;
  text-align: center;
}

.share-memory {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 10px;
  padding: 8px 0;
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
}

.region-more {
  margin-top: 12px;
  border-top: 1px dashed rgba(74, 108, 97, 0.16);
}

.region-more summary {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.region-more summary::-webkit-details-marker {
  display: none;
}

.region-more summary span {
  margin-left: auto;
  color: var(--faint);
  font-size: 7.5px;
  font-weight: 500;
}

.region-more-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 0 4px;
}

.region-more-body p {
  margin-bottom: 2px;
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.65;
}

.region-more-body .ghost-btn {
  font-size: 9.5px;
}

.checkin-context {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 10px 0 14px;
  padding: 8px 10px;
  color: var(--muted);
  border-radius: 9px;
  background: var(--cream);
  font-size: 8.5px;
  line-height: 1.6;
}

.backfill-panel {
  padding-top: 2px;
}

.backfill-intro {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 16px;
}

.backfill-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  color: #8e6732;
  border-radius: 14px;
  background: var(--sun-soft);
}

.backfill-intro h2 {
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 20px;
}

.backfill-intro p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.backfill-search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 12px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.backfill-search input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.backfill-results-host {
  margin-top: 12px;
}

.backfill-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  color: var(--faint);
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.5);
}

.backfill-empty p {
  font-size: 9px;
  line-height: 1.6;
}

.backfill-empty small {
  color: var(--faint);
  font-size: 8px;
}

.backfill-result-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.backfill-result {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

.backfill-result[disabled] {
  cursor: default;
  opacity: 0.56;
}

.backfill-result-icon {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--cat-color);
  border-radius: 10px;
  background: var(--cat-soft);
}

.backfill-result-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.backfill-result-copy strong {
  color: var(--ink);
  font-size: 10.5px;
}

.backfill-result-copy small {
  overflow: hidden;
  color: var(--faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backfill-result-status {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 8.5px;
  font-weight: 700;
}

.backfill-tip {
  margin-top: 14px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.65;
}

.offline-panel {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 46px 22px 30px;
  text-align: center;
}

.offline-panel-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: var(--teal);
  border-radius: 20px;
  background: var(--mint);
}

.offline-panel h2 {
  margin-top: 15px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 21px;
}

.offline-panel p {
  max-width: 270px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.offline-panel .offline-panel-note {
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--cream);
  color: var(--faint);
  font-size: 8.5px;
}

.offline-panel .primary-btn {
  max-width: 270px;
  margin-top: 17px;
  font-size: 10px;
}

/* ================================================================
   Fullscreen / immersive map
   ================================================================ */

.app:fullscreen {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  border-radius: 0;
  border: 0;
}

.app.map-immersive,
.app:fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  z-index: 1000;
  border-radius: 0;
}

.map-immersive-body {
  overflow: hidden;
  background: var(--sea);
}

.app.map-immersive .bottom-nav,
.app:fullscreen .bottom-nav,
.app.map-immersive .brand-row,
.app:fullscreen .brand-row,
.app.map-immersive .category-strip-host,
.app:fullscreen .category-strip-host,
.app.map-immersive .inspiration-wrap,
.app:fullscreen .inspiration-wrap,
.app.map-immersive .map-hint,
.app:fullscreen .map-hint,
.app.map-immersive .map-watermark,
.app:fullscreen .map-watermark {
  display: none;
}

.app.map-immersive .map-top,
.app:fullscreen .map-top {
  padding: calc(12px + var(--safe-top)) 16px 0;
}

.app.map-immersive .search-bar,
.app:fullscreen .search-bar {
  max-width: 360px;
  height: 42px;
}

.app.map-immersive .map-controls,
.app:fullscreen .map-controls {
  top: 50%;
  transform: translateY(-50%);
}

.app.map-immersive .map-location-banner,
.app:fullscreen .map-location-banner {
  top: calc(var(--safe-top) + 100px);
  left: 16px;
  right: 16px;
}

.app.map-immersive .map-bottom,
.app:fullscreen .map-bottom {
  bottom: calc(16px + var(--safe-bottom));
}

.app.map-immersive .map-bottom:empty,
.app:fullscreen .map-bottom:empty {
  display: none;
}

.app.map-immersive .route-toggle,
.app:fullscreen .route-toggle {
  margin-left: 2px;
}

.app.map-immersive .search-overlay,
.app:fullscreen .search-overlay {
  z-index: 35;
}

.app.map-immersive .search-overlay-head,
.app:fullscreen .search-overlay-head {
  padding-top: calc(12px + var(--safe-top));
}

/* ================================================================
   Achievements page
   ================================================================ */

.achievements-page {
  background:
    radial-gradient(circle at 96% 2%, rgba(247, 218, 148, 0.26), transparent 14rem),
    var(--cream);
}

.progress-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 20px 16px 19px;
  color: var(--paper);
  border-radius: 22px;
  background:
    radial-gradient(circle at 84% 12%, rgba(248, 205, 118, 0.22), transparent 9rem),
    linear-gradient(135deg, #315c55 0%, #254840 100%);
  box-shadow: 0 16px 32px rgba(38, 70, 60, 0.18);
}

.progress-hero::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -54px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(255, 249, 236, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(255, 249, 236, 0.04), 0 0 0 55px rgba(255, 249, 236, 0.025);
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
}

.hero-title {
  margin-top: 6px;
  color: #fffaee;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.level-progress-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
}

.level-progress-row {
  display: grid;
  grid-template-columns: 26px 1fr 58px;
  align-items: center;
  gap: 6px;
}

.level-progress-row .level-name {
  color: rgba(255, 249, 238, 0.69);
  font-size: 9px;
  font-weight: 700;
}

.level-progress-bar {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 249, 238, 0.15);
}

.level-progress-bar i {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4cd75, #f3a181);
}

.level-border .level-progress-bar i {
  background: #d7ebd8;
}

.level-progress-row .level-figure {
  color: rgba(255, 249, 238, 0.62);
  font-size: 8px;
  text-align: right;
}

.level-progress-row .level-figure strong {
  color: #fffaee;
  font-family: var(--font-serif);
  font-size: 14px;
}

.level-progress-row .level-figure small {
  font-size: 7px;
}

.hero-level-ring {
  position: relative;
  z-index: 1;
  display: flex;
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  margin-right: -2px;
  border: 1px dashed rgba(248, 214, 140, 0.45);
  border-radius: 50%;
  color: #fffaee;
}

.hero-level-ring strong {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1;
}

.hero-level-ring span {
  color: rgba(255, 249, 238, 0.58);
  font-size: 7px;
}

.hero-level-ring i {
  position: absolute;
  right: -4px;
  bottom: 2px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--teal-deep);
  border-radius: 50%;
  background: var(--sun-soft);
  font-style: normal;
}

.hero-copy p {
  max-width: 255px;
}

.hero-eyebrow {
  color: rgba(255, 247, 231, 0.64);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-number {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 5px;
}

.hero-number strong {
  color: #fffaee;
  font-family: var(--font-serif);
  font-size: 45px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero-number span {
  color: rgba(255, 247, 231, 0.58);
  font-size: 9px;
}

.hero-copy p {
  max-width: 255px;
  margin-top: 8px;
  color: rgba(255, 249, 238, 0.72);
  font-size: 10px;
  line-height: 1.65;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 7px 10px;
  color: var(--teal-deep);
  border-radius: 8px;
  background: var(--sun-soft);
  font-size: 9px;
  font-weight: 800;
}

.hero-ring {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.hero-ring .progress-ring {
  display: block;
  transform: rotate(0deg);
}

.hero-ring-center {
  position: absolute;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2px;
}

.hero-ring-center strong {
  color: #fffaee;
  font-family: var(--font-serif);
  font-size: 21px;
  letter-spacing: -0.04em;
}

.hero-ring-center span {
  color: rgba(255, 249, 238, 0.56);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.hero-star {
  position: absolute;
  color: rgba(250, 219, 148, 0.65);
  font-size: 10px;
}

.star-one { top: 17px; right: 39%; }
.star-two { bottom: 19px; left: 46%; font-size: 6px; }
.star-three { top: 34px; left: 48%; font-size: 18px; opacity: 0.45; }

.badge-scroller {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 1px 2px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.badge-scroller::-webkit-scrollbar {
  display: none;
}

.badge-card {
  position: relative;
  width: 132px;
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 12px 11px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.badge-card.is-locked {
  opacity: 0.62;
  filter: grayscale(0.45);
}

.badge-medal {
  position: relative;
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  margin-bottom: 8px;
  color: var(--badge-color);
  border-radius: 50%;
  background: color-mix(in srgb, var(--badge-color) 14%, var(--paper));
  border: 1px dashed color-mix(in srgb, var(--badge-color) 48%, transparent);
}

.badge-card.is-unlocked .badge-medal {
  color: #fff9ea;
  border-style: solid;
  border-color: var(--badge-color);
  background: var(--badge-color);
  box-shadow: 0 5px 11px color-mix(in srgb, var(--badge-color) 24%, transparent);
}

.badge-spark {
  position: absolute;
  top: -5px;
  right: -3px;
  color: var(--sun);
  font-size: 9px;
}

.badge-card > strong {
  display: block;
  color: var(--teal-ink);
  font-size: 11px;
  line-height: 1.35;
}

.badge-card p {
  min-height: 27px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.badge-progress {
  height: 3px;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 99px;
  background: var(--cream-deep);
}

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

.journal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.journal-card {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.journal-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mood-badge {
  padding: 3px 6px;
  color: #946532;
  border-radius: 5px;
  background: var(--sun-soft);
  font-size: 8px;
  font-weight: 700;
}

.journal-date {
  flex: 1;
  color: var(--faint);
  font-size: 7.5px;
}

.journal-card h3 {
  margin-top: 8px;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.35;
}

.journal-card > p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.journal-empty {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 13px;
  text-align: left;
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
  background: rgba(255, 253, 247, 0.52);
}

.journal-empty-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--teal);
  border-radius: 12px;
  background: var(--mint);
}

.journal-empty > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.journal-empty strong {
  color: var(--teal-ink);
  font-size: 11px;
}

.journal-empty small {
  color: var(--muted);
  font-size: 8.5px;
}

.mood-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.mood-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.mood-row.is-empty {
  opacity: 0.52;
}

.mood-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--cat-soft);
}

.mood-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.mood-copy strong {
  color: var(--teal-ink);
  font-size: 9.5px;
}

.mood-copy span {
  color: var(--muted);
  font-size: 7.5px;
  white-space: nowrap;
}

.mood-bar {
  width: 3px;
  height: 22px;
  order: -1;
  overflow: hidden;
  border-radius: 99px;
  background: var(--cream-deep);
}

.mood-row .mood-bar {
  display: none;
}

.mood-grid .mood-bar {
  display: none;
}

.province-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.province-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.province-name {
  width: 32px;
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
}

.province-bar {
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--cream-deep);
}

.province-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8dc5ac, #4f9689);
}

.province-figure {
  width: 39px;
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 8px;
  text-align: right;
}

.stamp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stamp-card {
  position: relative;
  display: flex;
  min-height: 85px;
  align-items: flex-start;
  gap: 8px;
  overflow: hidden;
  padding: 10px 9px;
  text-align: left;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  background: var(--paper);
  transition: transform 0.15s ease, background 0.15s ease;
}

.stamp-card:hover {
  background: var(--paper-warm);
  transform: translateY(-1px);
}

.stamp-notch {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 11px;
  height: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--cream);
}

.stamp-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--cat-soft);
}

.stamp-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.stamp-copy strong {
  overflow: hidden;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stamp-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 7.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stamp-copy em {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  color: var(--faint);
  font-family: var(--font-serif);
  font-size: 8px;
  font-style: normal;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.stamp-check {
  position: absolute;
  right: 7px;
  bottom: 6px;
  color: var(--sun);
  opacity: 0.8;
}

/* ================================================================
   Profile page
   ================================================================ */

.profile-page {
  padding-top: 0;
  background:
    radial-gradient(circle at 88% 0%, rgba(247, 214, 138, 0.3), transparent 16rem),
    var(--cream);
}

.profile-hero {
  position: relative;
  overflow: hidden;
  margin: 0 -18px 0;
  padding: max(22px, calc(var(--safe-top) + 15px)) 22px 23px;
  color: var(--paper);
  border-radius: 0 0 30px 30px;
  background:
    radial-gradient(circle at 83% 5%, rgba(246, 207, 122, 0.29), transparent 12rem),
    linear-gradient(142deg, #39665d, #284d45);
  box-shadow: 0 14px 26px rgba(38, 70, 60, 0.17);
}

.profile-hero::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -90px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255, 249, 236, 0.11);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 249, 236, 0.035);
}

.profile-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-topline .eyebrow {
  color: rgba(255, 249, 238, 0.5);
}

.profile-doodle {
  position: absolute;
  color: rgba(255, 249, 238, 0.36);
  font-family: var(--font-serif);
}

.doodle-a { top: 58px; right: 72px; font-size: 15px; }
.doodle-b { top: 33px; right: 46px; font-size: 24px; }

.profile-identity {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 14px;
}

.profile-avatar {
  border: 3px solid rgba(255, 249, 238, 0.3);
  box-shadow: 0 6px 17px rgba(15, 39, 32, 0.22);
}

.profile-identity h1 {
  color: #fffaee;
  font-family: var(--font-serif);
  font-size: 27px;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.profile-handle {
  display: block;
  margin-top: 3px;
  color: rgba(255, 249, 238, 0.48);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.profile-bio {
  position: relative;
  z-index: 1;
  max-width: 300px;
  margin-top: 13px;
  color: rgba(255, 249, 238, 0.72);
  font-size: 10.5px;
  line-height: 1.65;
}

.profile-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 11px;
}

.profile-tags > span {
  padding: 3px 7px;
  color: var(--cat-ink);
  border-radius: 5px;
  background: var(--cat-soft);
  font-size: 8px;
  font-weight: 700;
}

.tag-placeholder {
  padding: 4px 8px;
  color: rgba(255, 249, 238, 0.7);
  border: 1px dashed rgba(255, 249, 238, 0.32);
  border-radius: 5px;
  font-size: 8px;
}

.profile-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: -25px 2px 0;
  padding: 13px 5px;
  border: 1px solid rgba(255, 253, 247, 0.8);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.profile-stats > div {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--line);
}

.profile-stats > div:last-child {
  border-right: 0;
}

.profile-stats strong {
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1;
}

.profile-stats span {
  color: var(--faint);
  font-size: 7.5px;
}

.persona-card {
  position: relative;
  margin-top: 20px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--lavender) 22%, var(--line));
  border-radius: 19px;
  background:
    radial-gradient(circle at 102% 0%, rgba(200, 165, 214, 0.27), transparent 11rem),
    linear-gradient(135deg, #fffdf7 0%, #fbf2e5 100%);
  box-shadow: var(--shadow-sm);
}

.persona-card::after {
  content: "PERSONA";
  position: absolute;
  right: -4px;
  bottom: -2px;
  color: rgba(147, 111, 162, 0.1);
  font-family: "Avenir Next", sans-serif;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.persona-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.persona-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
}

.persona-glyph {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: var(--cat-soft);
}

.persona-title h2 {
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: -0.03em;
}

.persona-title > div > span {
  color: var(--muted);
  font-size: 8.5px;
}

.persona-desc {
  position: relative;
  z-index: 1;
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.75;
}

.persona-affinity {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.affinity-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.affinity-row > span {
  display: flex;
  width: 48px;
  align-items: center;
  gap: 2px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 700;
}

.affinity-row > div {
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--cream-deep);
}

.affinity-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cat-color);
}

.persona-empty {
  padding: 11px 2px 2px;
  text-align: center;
}

.persona-mystery {
  display: grid;
  width: 57px;
  height: 57px;
  place-items: center;
  margin: 4px auto 9px;
  color: var(--lavender);
  border: 1px dashed rgba(168, 127, 186, 0.34);
  border-radius: 50%;
  background: rgba(237, 227, 241, 0.5);
}

.persona-empty h2 {
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 17px;
}

.persona-empty p {
  margin: 6px auto 10px;
  max-width: 290px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.friends-preview {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.friend-stack {
  display: flex;
  padding-left: 9px;
}

.stack-avatar {
  margin-left: -9px;
  border: 2px solid var(--paper);
}

.stack-placeholder {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--teal);
  border-radius: 50%;
  background: var(--mint);
}

.friend-preview-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.friend-preview-copy strong {
  color: var(--teal-ink);
  font-size: 10.5px;
}

.friend-preview-copy span {
  color: var(--muted);
  font-size: 8px;
}

.round-arrow {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: var(--teal);
  border-radius: 50%;
  background: var(--cream);
}

.rank-preview {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(105deg, rgba(252, 239, 201, 0.7), transparent 75%),
    var(--paper);
}

.rank-preview-medal {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  color: #956a25;
  border-radius: 50%;
  background: var(--sun-soft);
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 800;
}

.rank-preview > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.rank-preview strong {
  color: var(--teal-ink);
  font-size: 10.5px;
}

.rank-preview small {
  color: var(--muted);
  font-size: 8px;
}

.rank-preview-icon {
  color: var(--sun);
}

.profile-route-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-route {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.profile-route-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.profile-route > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.profile-route strong {
  color: var(--teal-ink);
  font-size: 10.5px;
}

.profile-route small {
  color: var(--faint);
  font-size: 8px;
}

.soft-add {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 7px;
  padding: 12px;
  color: var(--teal);
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  background: rgba(255, 253, 247, 0.55);
  font-size: 10px;
  font-weight: 700;
}

.mini-visit-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-visit {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

.mini-visit-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
}

.mini-visit > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.mini-visit strong {
  color: var(--teal-ink);
  font-size: 10.5px;
}

.mini-visit small {
  color: var(--faint);
  font-size: 8px;
}

.settings-list {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.settings-row {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 600;
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
}

.settings-row > .ui-icon {
  color: var(--faint);
}

.settings-row.danger > span,
.settings-row.danger {
  color: var(--red);
}

/* ================================================================
   Guest pages
   ================================================================ */

.guest-page {
  min-height: 100%;
  padding: 38px 26px 26px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 11%, rgba(247, 219, 146, 0.43), transparent 15rem),
    var(--cream);
}

.guest-visual {
  position: relative;
  width: 190px;
  height: 182px;
  margin: 10px auto 10px;
}

.guest-sun {
  position: absolute;
  top: 10px;
  right: 24px;
  width: 57px;
  height: 57px;
  border-radius: 50%;
  background: var(--sun-soft);
}

.guest-cloud {
  position: absolute;
  top: 23px;
  left: 21px;
  color: rgba(79, 150, 137, 0.31);
  font-size: 31px;
}

.guest-map-card {
  position: absolute;
  left: 50%;
  bottom: 11px;
  display: grid;
  width: 124px;
  height: 119px;
  place-items: center;
  color: rgba(47, 86, 80, 0.28);
  border: 1px solid rgba(255, 253, 247, 0.8);
  border-radius: 25px;
  background: #d8eee8;
  box-shadow: 0 15px 26px rgba(60, 100, 82, 0.13);
  transform: translateX(-50%) rotate(-6deg);
}

.guest-pin {
  position: absolute;
  right: 8px;
  bottom: 13px;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 4px 10px rgba(199, 98, 76, 0.25);
}

.guest-route-line {
  position: absolute;
  left: 32px;
  bottom: 33px;
  width: 55px;
  height: 1px;
  border-top: 2px dashed var(--teal);
  transform: rotate(-25deg);
}

.guest-star {
  position: absolute;
  color: var(--sun);
}

.guest-star.s1 { left: 40px; top: 35px; font-size: 12px; }
.guest-star.s2 { right: 32px; top: 73px; font-size: 8px; }

.guest-page h1 {
  max-width: 310px;
  margin: 9px auto 0;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 25px;
  letter-spacing: -0.04em;
  line-height: 1.3;
}

.guest-page > p {
  max-width: 300px;
  margin: 9px auto 18px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.75;
}

.guest-page > .primary-btn {
  margin-bottom: 8px;
}

.guest-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.guest-features > div {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  color: var(--teal);
}

.guest-features span {
  color: var(--muted);
  font-size: 8px;
}

/* ================================================================
   Journal / preference / profile editor modals
   ================================================================ */

.journal-editor-modal {
  max-width: 430px;
}

.journal-editor h2 {
  margin-top: 8px;
}

.editor-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.journal-editor form {
  margin-top: 16px;
}

.mood-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mood-option {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  font-size: 9px;
  font-weight: 600;
}

.mood-option span {
  font-size: 13px;
}

.mood-option.is-selected {
  color: #8b662d;
  border-color: rgba(224, 183, 94, 0.48);
  background: var(--sun-soft);
}

.journal-editor .modal-actions {
  justify-content: space-between;
}

.journal-delete-btn {
  display: inline-flex;
  height: 42px;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  color: var(--red);
  font-size: 10px;
}

.preferences-modal {
  max-width: 440px;
}

.preference-modal > .eyebrow {
  margin-top: 11px;
}

.preference-modal h2 {
  margin-top: 6px;
}

.preference-modal > p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.modal-hero-icon {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  color: var(--coral);
  border-radius: 14px;
  background: #fbe8df;
}

.preference-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 15px 0;
}

.preference-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  transition: border 0.15s ease, background 0.15s ease;
}

.preference-option.is-selected {
  border-color: var(--cat-color);
  background: var(--cat-soft);
}

.preference-option > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.preference-option strong {
  color: var(--teal-ink);
  font-size: 10.5px;
}

.preference-option small {
  color: var(--muted);
  font-size: 8.5px;
}

.pref-check {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  color: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.preference-option.is-selected .pref-check {
  color: #fff;
  border-color: var(--cat-color);
  background: var(--cat-color);
}

.profile-editor-modal {
  max-width: 410px;
}

.profile-editor > .eyebrow {
  margin-top: 10px;
}

.profile-editor h2 {
  margin-top: 6px;
}

.avatar-preview {
  display: flex;
  justify-content: center;
  margin: 15px 0;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.emoji-choice {
  display: grid;
  height: 37px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--cream);
  font-size: 18px;
}

.emoji-choice.is-selected {
  border-color: var(--teal);
  background: var(--mint);
}

.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-choice {
  width: 27px;
  height: 27px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.color-choice.is-selected {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--teal);
}

/* ================================================================
   Check-in modal
   ================================================================ */

.checkin-modal {
  max-width: 410px;
}

.checkin-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-right: 25px;
}

.checkin-icon {
  display: grid;
  width: 55px;
  height: 55px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  background: var(--cat-soft);
}

.checkin-heading .eyebrow {
  margin-top: 1px;
}

.checkin-heading h2 {
  margin-top: 4px;
  font-size: 22px;
}

.checkin-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.checkin-modal form {
  margin-top: 17px;
}

/* ================================================================
   Achievement card
   ================================================================ */

.achievement-modal-shell {
  max-width: 390px;
  overflow: visible !important;
  padding-top: 18px;
  background:
    radial-gradient(circle at 50% -10%, rgba(248, 215, 140, 0.55), transparent 13rem),
    var(--paper);
}

.achievement-confetti {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

.confetti-piece {
  position: absolute;
  top: -12px;
  left: var(--confetti-left);
  z-index: 0;
  animation: confettiFall var(--confetti-duration) var(--confetti-delay) cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
  pointer-events: none;
}

.confetti-rect {
  width: 6px;
  height: 11px;
  border-radius: 2px;
  background: var(--confetti-color);
  transform: rotate(var(--confetti-rotate));
}

.confetti-circle {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--confetti-color);
}

.confetti-star {
  width: 9px;
  height: 9px;
  background: var(--confetti-color);
  clip-path: polygon(50% 0%, 63% 34%, 100% 38%, 72% 62%, 82% 100%, 50% 78%, 18% 100%, 28% 62%, 0% 38%, 37% 34%);
}

@keyframes confettiFall {
  0% { opacity: 0; transform: translateY(-10px) translateX(0) rotate(0); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translateY(520px) translateX(var(--confetti-drift)) rotate(540deg); }
}

.achievement-card {
  position: relative;
  z-index: 1;
  text-align: center;
}

.achievement-kicker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--coral-deep);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.achievement-seal {
  position: relative;
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  margin: 18px auto 13px;
  color: var(--cat-ink);
  border: 1px dashed var(--cat-color);
  border-radius: 50%;
  background: var(--cat-soft);
}

.seal-ring {
  position: absolute;
  inset: 7px;
  border: 1px solid color-mix(in srgb, var(--cat-color) 40%, transparent);
  border-radius: 50%;
}

.seal-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.7);
}

.seal-spark {
  position: absolute;
  color: var(--coral);
  font-size: 12px;
}

.spark-a { top: -6px; right: 8px; }
.spark-b { bottom: 5px; left: -3px; font-size: 8px; }

.seal-number {
  position: absolute;
  right: -7px;
  bottom: 1px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #fff9eb;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--coral);
  font-family: var(--font-serif);
  font-size: 9px;
  font-weight: 800;
}

.achievement-eyebrow {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.achievement-card h2 {
  margin-top: 5px;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 25px;
  letter-spacing: -0.04em;
}

.achievement-lead {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.7;
}

.achievement-lead strong {
  color: var(--coral-deep);
}

.achievement-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 16px 0 14px;
}

.achievement-stats > div {
  display: flex;
  min-width: 76px;
  align-items: center;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid var(--line);
}

.achievement-stats > div:last-child {
  border-right: 0;
}

.achievement-stats strong {
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.1;
}

.achievement-stats span {
  color: var(--faint);
  font-size: 7.5px;
}

.achievement-card blockquote {
  margin: 0 8px 14px;
  padding: 11px 12px;
  color: #8b6230;
  border-radius: 10px;
  background: rgba(248, 225, 172, 0.38);
  font-family: var(--font-serif);
  font-size: 10.5px;
  line-height: 1.7;
}

.achievement-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.achievement-cheer {
  margin-top: 11px;
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.06em;
}

/* ================================================================
   Route builder & route complete
   ================================================================ */

.route-builder-modal {
  max-width: 460px;
  padding-bottom: 24px;
}

.route-builder-head h2 {
  margin-top: 7px;
}

.route-builder-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.route-builder form {
  margin-top: 16px;
}

.route-builder form > button[type="submit"] {
  position: sticky;
  bottom: -1px;
  z-index: 3;
  margin-top: 6px;
  box-shadow:
    0 -12px 18px 8px var(--paper),
    0 8px 19px rgba(216, 107, 78, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.route-selected-label {
  margin-top: 5px;
}

.selected-stops {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--cream);
}

.selected-empty {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  color: var(--faint);
  font-size: 9px;
}

.selected-stop {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.stop-index {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 800;
}

.selected-stop-name {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  color: var(--teal-ink);
  font-size: 9.5px;
  font-weight: 700;
}

.selected-stop-name small {
  color: var(--faint);
  font-size: 7.5px;
  font-weight: 400;
}

.stop-controls {
  display: flex;
  gap: 2px;
}

.stop-controls button {
  width: 20px;
  height: 20px;
  color: var(--muted);
  border-radius: 5px;
  background: var(--cream);
  font-size: 10px;
}

.stop-controls .stop-remove {
  color: var(--red);
}

.route-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 13px 1px 7px;
  color: var(--muted);
  font-size: 9px;
}

.route-picker-head span:last-child {
  color: var(--teal);
  font-weight: 700;
}

.route-stop-search {
  display: flex;
  height: 36px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: var(--teal);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}

.route-stop-search input {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 10px;
}

.route-available {
  max-height: 175px;
  overflow-y: auto;
  margin: 6px 0 14px;
  padding-right: 2px;
  scrollbar-width: thin;
}

.stop-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.stop-option:last-child {
  border-bottom: 0;
}

.stop-option.is-selected {
  opacity: 0.54;
}

.stop-option-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
}

.stop-option > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.stop-option strong {
  color: var(--teal-ink);
  font-size: 10.5px;
}

.stop-option small {
  color: var(--faint);
  font-size: 8px;
}

.stop-add-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--teal);
  border-radius: 50%;
  background: var(--mint);
}

.route-needs-more {
  padding: 8px 1px 2px;
  text-align: center;
}

.empty-round-icon {
  display: grid;
  width: 63px;
  height: 63px;
  place-items: center;
  margin: 0 auto 13px;
  color: var(--teal);
  border-radius: 50%;
  background: var(--mint);
}

.route-needs-more h2 {
  margin-top: 7px;
}

.route-needs-more p {
  margin: 8px auto 17px;
  max-width: 280px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.route-complete-modal {
  max-width: 390px;
  overflow: visible !important;
  background:
    radial-gradient(circle at 50% -10%, rgba(248, 215, 140, 0.55), transparent 13rem),
    var(--paper);
}

.route-complete-card {
  position: relative;
  z-index: 1;
  text-align: center;
}

.route-complete-kicker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--coral-deep);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.route-complete-seal {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  margin: 16px auto 13px;
  color: var(--teal);
  border: 1px dashed rgba(79, 150, 137, 0.5);
  border-radius: 50%;
  background: var(--mint);
  transform: rotate(-5deg);
}

.route-complete-card h2 {
  margin-top: 5px;
  font-size: 24px;
}

.route-complete-stops {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.6;
}

.route-complete-stops span {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--cream);
}

.route-complete-stops i {
  color: var(--faint);
  font-style: normal;
  font-size: 8px;
}

.route-complete-meta {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 14px 0 12px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
  font-size: 8px;
}

.route-complete-meta strong {
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 13px;
}

.route-complete-card blockquote {
  margin: 0 0 14px;
  color: #8b6230;
  font-family: var(--font-serif);
  font-size: 10px;
  line-height: 1.6;
}

.location-help {
  text-align: center;
}

.location-help-icon {
  display: grid;
  width: 57px;
  height: 57px;
  place-items: center;
  margin: 2px auto 11px;
  color: var(--teal);
  border-radius: 50%;
  background: var(--mint);
}

.location-help h2 {
  margin-top: 7px;
}

.location-help-reason {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.location-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 15px 0;
  text-align: left;
}

.location-steps > div {
  display: flex;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

.location-steps > div > span {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--teal);
  border-radius: 50%;
  background: var(--mint);
  font-size: 8px;
  font-weight: 800;
}

.location-steps p {
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
}

.location-steps small {
  color: var(--faint);
  font-size: 8px;
}

.location-help .modal-actions {
  justify-content: center;
}

/* ================================================================
   Sub pages (panels)
   ================================================================ */

.panel-root {
  background: transparent;
}

.subpage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 1%, rgba(247, 219, 148, 0.2), transparent 16rem),
    var(--cream);
  animation: subpageIn 0.3s cubic-bezier(0.2, 0.75, 0.2, 1);
}

@keyframes subpageIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.subpage-head {
  display: flex;
  min-height: calc(65px + var(--safe-top));
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: calc(10px + var(--safe-top)) 13px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.82);
  backdrop-filter: blur(16px);
}

.subpage-back {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.subpage-title-wrap {
  min-width: 0;
  flex: 1;
}

.subpage-eyebrow {
  display: block;
  color: var(--teal);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.subpage-title-wrap h1 {
  overflow: hidden;
  margin-top: 2px;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subpage-actions {
  flex: 0 0 auto;
}

.subpage-body {
  flex: 1;
  overflow-y: auto;
  padding: 17px 18px calc(26px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}

.panel-content {
  min-height: 1px;
}

.panel-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

.panel-intro h2 {
  margin-top: 5px;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: -0.03em;
}

.panel-intro p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.route-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.route-card {
  position: relative;
  overflow: hidden;
  padding: 13px 13px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.route-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--route-color);
}

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

.route-date {
  color: var(--faint);
  font-size: 7.5px;
  letter-spacing: 0.02em;
}

.route-card h3 {
  margin-top: 3px;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 17px;
}

.route-mini-line {
  display: block;
  width: 100%;
  height: 67px;
  margin: 3px 0 1px;
}

.route-stops {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 5px 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.route-stops span {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--cream);
}

.route-stops i {
  color: var(--faint);
  font-style: normal;
  font-size: 8px;
}

.route-note {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 9.5px;
  line-height: 1.65;
}

.route-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

.route-footer > span {
  color: var(--faint);
  font-size: 8px;
}

/* ================================================================
   Friends
   ================================================================ */

.friend-search-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background:
    radial-gradient(circle at 100% 0%, rgba(247, 218, 147, 0.35), transparent 12rem),
    var(--paper);
  box-shadow: var(--shadow-sm);
}

.friend-search-head h2 {
  margin-top: 5px;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 19px;
}

.friend-search-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.inline-search {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  padding: 0 5px 0 10px;
  color: var(--teal);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--paper);
}

.inline-search input {
  min-height: 0;
  flex: 1;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 10.5px;
}

.inline-search .primary-btn {
  min-height: 29px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 9px;
}

.friend-search-results {
  margin-top: 8px;
}

.friend-search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 0 4px;
  color: var(--muted);
  font-size: 9px;
}

.friend-search-loading .btn-spinner {
  border-color: rgba(79, 150, 137, 0.2);
  border-top-color: var(--teal);
}

.friend-search-empty {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 2px 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.user-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 1px;
  border-top: 1px solid var(--line);
}

.user-result:first-child {
  border-top: 0;
}

.user-result-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.user-result-copy strong {
  color: var(--teal-ink);
  font-size: 10px;
}

.user-result-copy small {
  color: var(--faint);
  font-size: 8px;
}

.relation-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 8px;
}

.relation-label.friend {
  color: var(--green-ok);
}

.relation-label.outgoing,
.relation-label.incoming {
  color: var(--coral-deep);
}

.requests-section,
.outgoing-section {
  margin-top: 22px;
}

.request-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.request-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(238, 141, 112, 0.25);
  border-radius: 13px;
  background: #fdf4ed;
}

.request-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.request-copy strong {
  color: var(--teal-ink);
  font-size: 10px;
}

.request-copy small {
  color: var(--muted);
  font-size: 7.5px;
}

.request-copy p {
  margin-top: 3px;
  color: #98624e;
  font-family: var(--font-serif);
  font-size: 8.5px;
  line-height: 1.55;
}

.request-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 4px;
}

.outgoing-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.5;
}

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

.friend-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.friend-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.15s ease;
}

.friend-card:hover {
  background: var(--paper-warm);
  transform: translateY(-1px);
}

.friend-card-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.friend-card-copy strong {
  overflow: hidden;
  color: var(--teal-ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-card-copy strong small {
  color: var(--faint);
  font-size: 8px;
  font-weight: 400;
}

.friend-card-copy > span {
  color: var(--muted);
  font-size: 8.5px;
}

/* ================================================================
   Leaderboard
   ================================================================ */

.leaderboard-hero {
  position: relative;
  overflow: hidden;
  margin: -2px 0 0;
  padding: 17px 16px 15px;
  color: var(--paper);
  border-radius: 18px;
  background:
    radial-gradient(circle at 86% 8%, rgba(246, 202, 112, 0.3), transparent 11rem),
    linear-gradient(145deg, #315c55, #274a42);
  box-shadow: 0 14px 28px rgba(42, 71, 61, 0.17);
}

.leaderboard-hero .eyebrow {
  color: rgba(255, 249, 236, 0.47);
}

.leaderboard-hero h2 {
  max-width: 280px;
  margin-top: 6px;
  color: #fffaee;
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: -0.03em;
}

.leaderboard-hero p {
  max-width: 300px;
  margin-top: 6px;
  color: rgba(255, 249, 238, 0.64);
  font-size: 8.5px;
  line-height: 1.65;
}

.leaderboard-star {
  position: absolute;
  color: var(--sun);
  opacity: 0.7;
}

.leaderboard-star.star-a { top: 20px; right: 35px; font-size: 14px; }
.leaderboard-star.star-b { bottom: 24px; right: 15px; font-size: 7px; }

.scope-tabs {
  display: flex;
  gap: 4px;
  margin-top: 13px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(255, 249, 236, 0.1);
}

.rank-level-tabs {
  display: flex;
  gap: 4px;
  margin-top: 15px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 249, 236, 0.13);
}

.rank-level-tabs button {
  flex: 1;
  height: 27px;
  color: rgba(255, 249, 238, 0.58);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 700;
}

.rank-level-tabs button.is-active {
  color: var(--teal-ink);
  background: var(--sun-soft);
}

.rank-level-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 0 2px 12px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.5;
}

.rank-level-note span:last-child {
  text-align: right;
}

.scope-tabs button {
  flex: 1;
  height: 27px;
  color: rgba(255, 249, 238, 0.57);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
}

.scope-tabs button.is-active {
  color: var(--teal-ink);
  background: var(--sun-soft);
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 5px;
  margin: 20px 0 8px;
}

.podium-slot {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}

.podium-slot.is-empty {
  min-height: 100px;
}

.podium-slot.place-1 {
  order: 2;
}

.podium-slot.place-2 {
  order: 1;
}

.podium-slot.place-3 {
  order: 3;
}

.podium-avatar {
  border: 2px solid rgba(255, 253, 247, 0.85);
  box-shadow: 0 5px 13px rgba(48, 76, 65, 0.11);
}

.place-1 .podium-avatar {
  border-color: var(--sun);
  box-shadow: 0 0 0 4px var(--sun-soft), 0 8px 15px rgba(72, 91, 57, 0.16);
}

.podium-rank {
  color: #a57b31;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 800;
}

.podium-slot strong {
  overflow: hidden;
  max-width: 100%;
  color: var(--teal-ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-count {
  color: var(--muted);
  font-size: 7.5px;
}

.podium-bar {
  width: 100%;
  margin-top: 6px;
  padding: 5px 2px;
  color: #fffaf0;
  border-radius: 6px 6px 3px 3px;
  background: #c6d8ca;
  font-size: 7.5px;
  font-weight: 700;
}

.place-1 .podium-bar {
  padding: 9px 2px;
  background: linear-gradient(135deg, #e2b453, #d59a3f);
}

.place-2 .podium-bar {
  background: #b5c9c0;
}

.place-3 .podium-bar {
  background: #d6b49a;
}

.my-rank-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 12px;
  padding: 9px 10px;
  color: var(--ink-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  font-size: 9px;
}

.my-rank-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: #9b7130;
  border-radius: 50%;
  background: var(--sun-soft);
}

.my-rank-note strong {
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 13px;
}

.my-rank-note small {
  margin-left: auto;
  color: var(--faint);
  font-size: 7.5px;
  text-align: right;
}

.leader-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.leader-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.leader-row.is-me {
  border: 1px solid rgba(79, 150, 137, 0.26);
  border-radius: 10px;
  background: var(--mint);
}

.leader-rank {
  width: 22px;
  flex: 0 0 auto;
  color: var(--faint);
  font-family: var(--font-serif);
  font-size: 9px;
  text-align: center;
}

.leader-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.leader-copy strong {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--teal-ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-copy small {
  color: var(--faint);
  font-size: 7.5px;
}

.me-tag {
  padding: 1px 4px;
  color: var(--teal-ink);
  border-radius: 4px;
  background: var(--sun-soft);
  font-size: 6.5px;
  font-style: normal;
}

.leader-count {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  flex-direction: column;
  gap: 1px;
}

.leader-count strong {
  color: var(--coral-deep);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1;
}

.leader-count small {
  color: var(--faint);
  font-size: 6.5px;
}

.leaderboard-footnote {
  margin-top: 18px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

/* ================================================================
   Friend detail
   ================================================================ */

.friend-profile-card {
  padding: 20px 16px 15px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 19px;
  background:
    radial-gradient(circle at 50% 0%, rgba(247, 217, 146, 0.42), transparent 13rem),
    var(--paper);
  box-shadow: var(--shadow-sm);
}

.friend-profile-avatar {
  border: 3px solid var(--paper);
  box-shadow: 0 5px 16px rgba(54, 78, 64, 0.14);
}

.friend-profile-card h2 {
  margin-top: 9px;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 23px;
}

.friend-profile-card > p {
  max-width: 300px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.65;
}

.friend-stats {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.friend-stats > div {
  display: flex;
  min-width: 80px;
  align-items: center;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid var(--line);
}

.friend-stats > div:last-child {
  border-right: 0;
}

.friend-stats strong {
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1;
}

.friend-stats span {
  color: var(--faint);
  font-size: 7.5px;
}

.friend-persona {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 13px;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--cream);
  text-align: left;
}

.friend-persona-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
}

.friend-persona > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.friend-persona small {
  color: var(--faint);
  font-size: 7.5px;
}

.friend-persona strong {
  color: var(--teal-ink);
  font-size: 10.5px;
}

.friend-map-section {
  margin-top: 22px;
}

.friend-mini-map {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--sea);
  box-shadow: var(--shadow-sm);
}

.mini-map-svg {
  display: block;
  width: 100%;
  height: auto;
}

.map-caption {
  margin-top: 6px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.5;
  text-align: center;
}

.friend-flavor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.friend-flavor-tags > span {
  padding: 4px 8px;
  color: var(--cat-ink);
  border-radius: 6px;
  background: var(--cat-soft);
  font-size: 8.5px;
  font-weight: 700;
}

.friend-mood-grid {
  grid-template-columns: 1fr;
}

.friend-visit-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.friend-visit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
}

.friend-visit-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
}

.friend-visit-row > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.friend-visit-row strong {
  color: var(--teal-ink);
  font-size: 10px;
}

.friend-visit-row small {
  color: var(--faint);
  font-size: 7.5px;
}

.friend-visit-row time {
  color: var(--faint);
  font-size: 7.5px;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 11px 1px 16px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.5;
}

.friend-detail-panel > .subtle-danger {
  margin-top: 4px;
}

/* ================================================================
   All stamps timeline
   ================================================================ */

.stamp-month {
  margin-bottom: 17px;
}

.stamp-month-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.stamp-month-head span {
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
}

.stamp-month-head i {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.stamp-month-head small {
  color: var(--faint);
  font-size: 7.5px;
}

.stamp-timeline {
  display: flex;
  flex-direction: column;
}

.timeline-stamp {
  position: relative;
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 7px;
  text-align: left;
  border-bottom: 1px dashed var(--line);
}

.timeline-stamp::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 43px;
  bottom: -10px;
  width: 1px;
  background: var(--line);
}

.timeline-stamp:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--cat-soft);
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  padding-top: 1px;
}

.timeline-date {
  color: var(--faint);
  font-size: 7.5px;
}

.timeline-copy strong {
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 13px;
}

.timeline-copy small {
  color: var(--muted);
  font-size: 8px;
}

.timeline-copy em {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-family: var(--font-serif);
  font-size: 8.5px;
  font-style: normal;
  line-height: 1.6;
}

.timeline-stamp > .ui-icon {
  margin-top: 9px;
  color: var(--faint);
}

/* ================================================================
   About
   ================================================================ */

.about-panel {
  padding-top: 10px;
  text-align: center;
}

.about-mark {
  display: grid;
  width: 83px;
  height: 83px;
  place-items: center;
  margin: 0 auto 16px;
  color: var(--teal);
  border: 1px dashed rgba(79, 150, 137, 0.33);
  border-radius: 50%;
  background: var(--mint);
}

.about-panel h2 {
  margin-top: 6px;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 28px;
}

.about-lead {
  margin-top: 5px;
  color: var(--coral-deep);
  font-family: var(--font-serif);
  font-size: 13px;
}

.about-panel > p {
  max-width: 330px;
  margin: 13px auto 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 22px 0;
}

.about-features > div {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 3px;
  padding: 11px 5px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

.about-features strong {
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 22px;
}

.about-features span {
  color: var(--muted);
  font-size: 7.5px;
}

.about-panel .about-note {
  padding: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: var(--cream);
  font-size: 8px;
}

.about-version {
  color: var(--faint) !important;
  font-size: 8px !important;
  letter-spacing: 0.06em;
}

/* ================================================================
   Empty states
   ================================================================ */

.empty-state {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 35px 18px;
  text-align: center;
}

.empty-illustration {
  position: relative;
  display: grid;
  width: 86px;
  height: 74px;
  place-items: center;
  color: var(--teal);
}

.empty-blob {
  position: absolute;
  width: 65px;
  height: 61px;
  border-radius: 46% 54% 60% 40% / 46% 40% 60% 54%;
  background: var(--mint);
  transform: rotate(-7deg);
}

.empty-illustration .ui-icon {
  position: relative;
  z-index: 1;
}

.empty-dot {
  position: absolute;
  border-radius: 50%;
  background: var(--sun);
}

.dot-a { width: 7px; height: 7px; right: 7px; top: 13px; }
.dot-b { width: 4px; height: 4px; left: 9px; bottom: 12px; background: var(--coral); }

.empty-state h3 {
  margin-top: 10px;
  color: var(--teal-ink);
  font-family: var(--font-serif);
  font-size: 16px;
}

.empty-state p {
  max-width: 250px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.65;
}

.empty-state .primary-btn {
  margin-top: 13px;
}

/* ================================================================
   Toasts
   ================================================================ */

.toast-root {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 18px calc(var(--nav-height) + var(--safe-bottom) + 14px);
}

.toast {
  display: flex;
  max-width: 330px;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  color: #fffaf0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  background: rgba(41, 69, 58, 0.94);
  box-shadow: 0 10px 27px rgba(35, 53, 45, 0.22);
  backdrop-filter: blur(12px);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--sun-soft);
  border-radius: 7px;
  background: rgba(255, 250, 238, 0.11);
}

.toast-error {
  background: rgba(139, 65, 51, 0.96);
}

.toast-error .toast-icon {
  color: #ffddc8;
}

.toast-text {
  padding-right: 2px;
}

/* ================================================================
   Misc / accessibility
   ================================================================ */

.noscript {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--teal-ink);
  background: var(--cream);
  font-size: 14px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

button .ui-icon,
button .cat-icon {
  flex: 0 0 auto;
}

@media (max-width: 370px) {
  .page-scroll {
    padding-left: 14px;
    padding-right: 14px;
  }

  .profile-hero {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-ring .progress-ring {
    width: 90px !important;
    height: 90px !important;
  }

  .mood-grid,
  .stamp-grid {
    grid-template-columns: 1fr;
  }

  .stamp-card {
    min-height: 72px;
  }

  .region-big-icon {
    width: 54px;
    height: 54px;
  }

  .region-title-copy h2 {
    font-size: 23px;
  }

  .achievement-stats > div {
    min-width: 65px;
  }

  .brand-copy small {
    display: none;
  }
}

/* ================================================================
   Readability pass
   ================================================================ */

.eyebrow {
  font-size: 9.5px;
}

.brand-copy small {
  font-size: 9px;
}

.progress-pill,
.account-button.is-guest {
  font-size: 10px;
}

.search-placeholder {
  font-size: 12.5px;
}

.cat-filter {
  height: 30px;
  font-size: 10px;
}

.nav-label {
  font-size: 10.5px;
}

.nav-item.is-active .nav-label {
  font-size: 10.5px;
}

.page-head p {
  font-size: 12px;
}

.section-count {
  font-size: 10.5px;
}

.text-btn {
  font-size: 11.5px;
}

.hero-eyebrow {
  font-size: 9.5px;
}

.hero-number span {
  font-size: 10px;
}

.hero-copy p {
  font-size: 10px;
}

.hero-cta {
  font-size: 10px;
}

.hero-ring-center span {
  font-size: 8px;
}

.badge-card > strong {
  font-size: 11.5px;
}

.badge-card p {
  font-size: 9px;
}

.journal-card > p {
  font-size: 10.5px;
}

.journal-date {
  font-size: 8.5px;
}

.mood-copy strong {
  font-size: 10px;
}

.mood-copy span {
  font-size: 8.5px;
}

.province-name {
  font-size: 10px;
}

.province-figure {
  font-size: 9px;
}

.stamp-copy small {
  font-size: 8.5px;
}

.stamp-copy em {
  font-size: 9px;
}

.profile-handle {
  font-size: 10px;
}

.profile-bio {
  font-size: 11px;
}

.profile-tags > span {
  font-size: 9px;
}

.profile-stats span {
  font-size: 8.5px;
}

.persona-title > div > span {
  font-size: 9px;
}

.persona-desc {
  font-size: 10.5px;
}

.affinity-row > span {
  font-size: 9px;
}

.friend-preview-copy strong,
.rank-preview strong {
  font-size: 11px;
}

.friend-preview-copy span,
.rank-preview small {
  font-size: 9px;
}

.profile-route small,
.mini-visit small {
  font-size: 9px;
}

.settings-row {
  font-size: 11px;
}

.map-hint {
  font-size: 10px;
}

.route-toggle {
  height: 28px;
  font-size: 10px;
}

.inspo-eyebrow {
  font-size: 8.5px;
}

.inspo-copy strong {
  font-size: 11.5px;
}

.inspo-copy > span:last-child {
  font-size: 9px;
}

.location-banner-copy strong {
  font-size: 12px;
}

.location-banner-copy small {
  font-size: 9.5px;
}

.location-arrive-btn {
  font-size: 10px;
}

.category-pill,
.visited-tag,
.unvisited-tag {
  font-size: 9.5px;
}

.region-province {
  font-size: 10px;
}

.region-members,
.sheet-guest-hint {
  font-size: 9.5px;
}

.spot-also span {
  font-size: 9.5px;
}

.memory-card .text-btn {
  font-size: 10px;
}

.panel-intro p {
  font-size: 9.5px;
}

.route-date,
.route-footer > span {
  font-size: 8.5px;
}

.route-note {
  font-size: 10px;
}

.friend-search-head p {
  font-size: 9.5px;
}

.request-copy small {
  font-size: 8.5px;
}

.request-copy p {
  font-size: 9px;
}

.friend-card-copy > span {
  font-size: 9.5px;
}

.leader-copy small {
  font-size: 8.5px;
}

.leader-count small,
.leaderboard-footnote {
  font-size: 8px;
}

.map-caption,
.privacy-note {
  font-size: 9px;
}

@media (max-width: 370px) {
  .level-switch button {
    padding: 0 6px;
    font-size: 9px;
  }

  .level-switch button small {
    font-size: 6.5px;
  }

  .mood-grid,
  .stamp-grid {
    grid-template-columns: 1fr;
  }
}

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