:root {
  /* Neon night: Sofia after dark, lit by bar signs. */
  --bg: #120A24;
  --surface: #1E1338;
  --surface-2: #2A1C4B;
  --line: #3A2A63;
  --text: #FFF4EC;
  --muted: #B8A9DA;
  --faint: #7A6AA3;
  --accent: #FF3D7F;
  --accent-ink: #FFFFFF;
  --accent-text: #FF6FA0;
  --star: #FFC23D;
  --danger: #FF7A7A;
  --me: #5CC8FF;
  --glass: rgba(30, 19, 56, .94);
  --tabs-bg: rgba(18, 10, 36, .9);
  --map-bg: #170e2c;
  --map-filter: invert(1) hue-rotate(215deg) saturate(.6) brightness(.78) contrast(.95);
  --shadow: 0 18px 40px rgba(5, 0, 20, .55);
  --glow: radial-gradient(900px 520px at 85% -12%, rgba(255, 61, 127, .22), transparent 60%),
          radial-gradient(700px 420px at -10% 8%, rgba(92, 200, 255, .12), transparent 60%);
  --hero: linear-gradient(135deg, #FF3D7F 0%, #FF6A4D 52%, #FFC23D 100%);
  --hero-ink: #1E0A1C;

  --t-cocktail: #2EF2C8;
  --t-wine: #FF4F8B;
  --t-beer: #FFC23D;
  --t-rooftop: #A47BFF;
  --t-speakeasy: #4DA8FF;
  --t-jazz: #4DA8FF;
  --t-cafe-bar: #C6F432;
  --t-other: #FF9A5A;

  --display: "Unbounded", system-ui, sans-serif;
  --body: "Onest", system-ui, sans-serif;

  --tabs-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);

  color-scheme: dark;
}

/* Light: the same neon, by day. Lilac-white paper, inks deepened for contrast. */
:root[data-theme="light"] {
  --bg: #F6F2FF;
  --surface: #FFFFFF;
  --surface-2: #EEE7FC;
  --line: #DDD2F2;
  --text: #1C1033;
  --muted: #5F5280;
  --faint: #9A8FB8;
  --accent: #E8246A;
  --accent-ink: #FFFFFF;
  --accent-text: #D01C5E;
  --star: #F2A500;
  --danger: #C8323A;
  --me: #1F7FD6;
  --glass: rgba(255, 255, 255, .94);
  --tabs-bg: rgba(246, 242, 255, .92);
  --map-bg: #ebe6f5;
  --map-filter: saturate(.6) hue-rotate(-8deg) contrast(.95);
  --shadow: 0 14px 34px rgba(60, 20, 110, .16);
  --glow: radial-gradient(900px 520px at 85% -12%, rgba(255, 61, 127, .14), transparent 60%),
          radial-gradient(700px 420px at -10% 8%, rgba(92, 200, 255, .14), transparent 60%);

  --t-cocktail: #00A88A;
  --t-wine: #E0245E;
  --t-beer: #D08A00;
  --t-rooftop: #7148F0;
  --t-speakeasy: #1F74E0;
  --t-jazz: #1F74E0;
  --t-cafe-bar: #5E9A00;
  --t-other: #E2661E;

  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--glow), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 400 16px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.t-cocktail { --c: var(--t-cocktail); }
.t-wine { --c: var(--t-wine); }
.t-beer { --c: var(--t-beer); }
.t-rooftop { --c: var(--t-rooftop); }
.t-speakeasy { --c: var(--t-speakeasy); }
.t-jazz { --c: var(--t-jazz); }
.t-cafe-bar { --c: var(--t-cafe-bar); }
.t-other { --c: var(--t-other); }

/* ---------- shell ---------- */

.view {
  min-height: 100dvh;
  padding: calc(var(--safe-t) + 20px) 16px calc(var(--tabs-h) + var(--safe-b) + 120px);
  max-width: 560px;
  margin: 0 auto;
}
.view-map { padding: 0; max-width: none; height: 100dvh; position: relative; isolation: isolate; z-index: 0; }

.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabs-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--tabs-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--faint); font-size: 11.5px; font-weight: 600;
  position: relative;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"] svg { color: var(--accent-text); }
.tab .badge {
  position: absolute; top: 9px; left: calc(50% + 8px);
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 16px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  transition: transform .12s var(--ease-out), opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.btn-ghost { color: var(--muted); }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-google { background: #fff; color: #1f1f1f; border: 1.5px solid #dadce0; }
:root[data-theme="dark"] .btn-google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
.link { color: var(--accent-text); font-weight: 600; text-decoration: none; }

/* ---------- onboarding ---------- */

.welcome-top { position: fixed; top: calc(var(--safe-t) + 14px); right: 16px; z-index: 5; }
.welcome {
  min-height: 100dvh; max-width: 440px; margin: 0 auto;
  padding: calc(var(--safe-t) + 32px) 20px calc(var(--safe-b) + 28px);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
}
.welcome-stamp { width: 168px; height: 168px; margin: 0 0 28px; color: var(--accent-text); }
.welcome-stamp svg { width: 100%; height: 100%; display: block; animation: spin-in 1.1s var(--ease-out) both; }
@keyframes spin-in { from { transform: rotate(-90deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.welcome h1 {
  font: 800 40px/1 var(--display); letter-spacing: -.02em; margin: 0 0 14px;
}
.welcome .lede { color: var(--muted); font-size: 17px; margin: 0 0 36px; max-width: 32ch; }
.welcome form { width: 100%; display: grid; gap: 12px; }
.field {
  width: 100%; height: 56px; padding: 0 18px; border-radius: 16px;
  background: var(--surface); border: 1.5px solid var(--line);
  font-size: 18px; font-weight: 500; text-align: center;
}
.field:focus { outline: none; border-color: var(--accent-text); }
.field::placeholder { color: var(--faint); }
.field-code { font-family: var(--display); letter-spacing: .12em; text-transform: uppercase; font-size: 18px; }
.form-error { color: var(--danger); font-size: 14.5px; margin: 0; }
.form-error:empty { display: none; }
.welcome .switch, .keycard .switch { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.welcome .switch .link { white-space: nowrap; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 4px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso-note { display: flex; gap: 10px; align-items: flex-start; text-align: left; margin: 0 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 14.5px; }
.sso-note svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.sso-note b { color: var(--text); overflow-wrap: anywhere; }
.welcome .privacy { margin: 14px auto 0; color: var(--faint); font-size: 12.5px; max-width: 36ch; }

/* ---------- list view ---------- */

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.brand { font: 700 15px/1 var(--display); color: var(--text); }
.topbar .who { font: 600 14px var(--body); color: var(--muted); margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  transition: transform .2s var(--ease-out);
}
.icon-btn:active { transform: scale(.9) rotate(-20deg); }
.topbar .tools { display: flex; gap: 8px; margin-left: auto; }
.topbar .who + .icon-btn { margin-left: 0; }
.icon-btn.spinning svg, #ptr.spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#ptr {
  position: fixed; left: 50%; top: calc(var(--safe-t) - 40px); z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  box-shadow: var(--shadow); transform: translate(-50%, 0); opacity: 0;
}
#ptr svg { width: 22px; height: 22px; }
#ptr.ready { color: var(--accent-text); border-color: var(--accent-text); }
#ptr.spinning { transform: translate(-50%, 70px) !important; opacity: 1 !important; transition: transform .2s; }
.map-tools { margin-left: auto; }
.map-tools .icon-btn { width: 42px; height: 42px; background: var(--glass); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.icon-btn svg { width: 20px; height: 20px; }

.hero {
  margin-bottom: 20px; padding: 20px 20px 18px; border-radius: 28px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)) 0%, var(--surface) 65%);
  border: 1px solid var(--line); color: var(--text);
  text-decoration: none; display: block;
}
.score { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 16px; }
.score .num {
  font: 800 92px/.8 var(--display); letter-spacing: -.04em; padding-bottom: .04em;
  background: var(--hero); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.score .of { font-size: 15px; line-height: 1.25; padding-bottom: 4px; color: var(--muted); }
.score .of b { font-weight: 700; color: var(--text); }

.dots {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(13px, 1fr)); gap: 5px;
  padding: 0; margin: 0; list-style: none;
}
.dots i { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--line); }
.dots i.on { background: var(--accent); border-color: var(--accent); }
.dots i.new { animation: dot-pop .7s var(--ease-out) .3s both; }
@keyframes dot-pop { 0% { transform: scale(0); } 60% { transform: scale(1.6); } 100% { transform: scale(1); } }

.hero .of .link { font-weight: 600; }
.next {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  margin-top: 4px; padding-top: 16px; border-top: 1px dashed var(--line);
}
.next-info { text-align: left; min-width: 0; }
.next-info small { display: block; color: var(--accent-text); font-weight: 700; font-size: 12.5px; }
.next-info strong { display: block; font: 700 19px/1.2 var(--display); margin: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-info > span { display: block; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-info .kind { color: var(--c); font-weight: 600; }
.next .btn { min-height: 46px; padding: 0 16px; border-radius: 14px; font-size: 15px; }
.next-done { margin: 4px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); font-weight: 700; }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.sec-head h2 { margin: 0; font: 700 17px var(--display); }
.sec-head h2 span { color: var(--faint); font-family: var(--body); font-weight: 600; font-size: 14px; }
.sec-head > span { color: var(--faint); font-size: 13px; }
.sec-head .link { font-size: 14px; }

.collections { margin-bottom: 18px; }
.coll-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.coll {
  text-align: left; padding: 10px 11px 11px; border-radius: 16px;
  background: var(--surface); border: 1.5px solid transparent;
  display: grid; gap: 2px; min-width: 0;
  transition: transform .12s var(--ease-out);
}
.coll:active { transform: scale(.96); }
/* An odd tile at the end stretches across the row instead of sitting alone. */
.coll:last-child:nth-child(3n + 1) { grid-column: span 3; }
.coll:last-child:nth-child(3n + 2) { grid-column: span 2; }
.coll[aria-pressed="true"] { border-color: var(--c); }
.coll .cn { font-size: 12.5px; font-weight: 600; color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coll .cc { font-size: 13px; color: var(--faint); }
.coll .cc b { font: 700 19px var(--display); color: var(--text); }
.coll .cbar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-top: 5px; }
.coll .cbar i { display: block; height: 100%; background: var(--c); border-radius: 2px; box-shadow: 0 0 8px var(--c); }
.coll.complete { background: color-mix(in srgb, var(--c) 16%, var(--surface)); }

.badges { margin-bottom: 26px; }
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; }
.badge-tile { display: grid; justify-items: center; text-align: center; gap: 3px; }
.badge-tile strong { font-size: 13px; line-height: 1.2; margin-top: 4px; }
.badge-tile small { font-size: 11.5px; color: var(--faint); line-height: 1.25; }
.medal {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) var(--p, 0%), var(--surface-2) 0);
  position: relative; color: var(--muted);
}
.medal::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--bg); }
.medal > * { position: relative; }
.medal b { font-size: 12px; font-weight: 700; }
.medal svg { width: 26px; height: 26px; }
.badge-tile.done .medal { background: var(--hero); color: var(--hero-ink, #1E0A1C); box-shadow: 0 8px 24px -8px rgba(255, 61, 127, .6); }
.badge-tile.done .medal::before { display: none; }
.badge-tile.done.t-cocktail .medal, .badge-tile.done.t-wine .medal, .badge-tile.done.t-beer .medal, .badge-tile.done.t-rooftop .medal,
.badge-tile.done.t-speakeasy .medal, .badge-tile.done.t-cafe-bar .medal, .badge-tile.done.t-other .medal { background: var(--c); }
.badge-tile:not(.done) strong { color: var(--muted); }

.new-badge {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--surface); border-radius: 18px; padding: 10px 16px 10px 10px; margin: -12px 0 22px;
  animation: rise .5s var(--ease-out) .7s both;
}
.new-badge .medal { width: 46px; height: 46px; background: var(--hero); color: #1E0A1C; flex: none; }
.new-badge.t-cocktail .medal, .new-badge.t-wine .medal, .new-badge.t-beer .medal, .new-badge.t-rooftop .medal,
.new-badge.t-speakeasy .medal, .new-badge.t-cafe-bar .medal, .new-badge.t-other .medal { background: var(--c); }
.new-badge .medal::before { display: none; }
.new-badge small { display: block; color: var(--accent-text); font-weight: 700; font-size: 12px; }
.new-badge strong { font-weight: 700; }
.new-badge span { color: var(--muted); font-size: 14px; }
.new-badge strong { color: var(--text); }

.notice {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: start;
  padding: 16px; border-radius: 18px; background: var(--surface); margin-bottom: 18px;
}
.notice svg { width: 26px; height: 26px; color: var(--accent-text); grid-row: span 3; margin-top: 2px; }
.notice h3 { margin: 0; font-size: 16px; font-weight: 700; }
.notice p { margin: 0; color: var(--muted); font-size: 14.5px; }
.notice .btn { justify-self: start; margin-top: 10px; min-height: 42px; padding: 0 16px; font-size: 15px; border-radius: 12px; }

.controls { padding: 0 0 6px; }
.seg {
  display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; gap: 4px;
  border-radius: 14px; background: var(--surface);
}
.seg button {
  height: 38px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.seg button span { color: var(--faint); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.seg button[aria-pressed="true"] span { color: var(--muted); }
.search { position: relative; display: block; margin-top: 10px; }
.search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--faint); pointer-events: none; }
.search input {
  width: 100%; height: 46px; border-radius: 14px; border: 1.5px solid transparent;
  background: var(--surface); padding: 0 14px 0 44px; font-size: 16px;
}
.search input:focus { outline: none; border-color: var(--line); }
.search input::placeholder { color: var(--faint); }

.types { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  flex: none; height: 30px; padding: 0 11px; border-radius: 999px;
  border: 1.5px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip[aria-pressed="true"] { border-color: var(--c, var(--text)); color: var(--text); background: color-mix(in srgb, var(--c, var(--text)) 14%, transparent); }

.bars { list-style: none; margin: 4px 0 0; padding: 0; }
.bar-row {
  width: 100%; display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 0; text-align: left; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.bars li:last-child .bar-row { border-bottom: 0; }
.mark {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 2px dashed color-mix(in srgb, var(--c) 55%, transparent);
  color: var(--c);
}
.mark svg { width: 22px; height: 22px; }
.mark.on { border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); transform: rotate(-8deg); }
.mark.near { border-style: solid; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent), 0 0 18px color-mix(in srgb, var(--c) 55%, transparent); }
.bar-row .name { display: block; font-weight: 700; font-size: 16.5px; line-height: 1.2; }
.bar-row .meta { display: block; color: var(--muted); font-size: 13.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .meta .kind { color: var(--c); font-weight: 600; }
.bar-row .info { min-width: 0; }
.side { text-align: right; display: grid; gap: 4px; justify-items: end; }
.dist { font-weight: 600; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dist.here { color: var(--accent-text); }
.empty { text-align: center; color: var(--muted); padding: 48px 12px; }
.empty .btn { margin-top: 14px; }

/* ---------- stars ---------- */

.stars { display: inline-flex; align-items: center; gap: 10px; }
.stars-track { position: relative; display: inline-block; line-height: 0; }
.stars-track .row { display: inline-flex; gap: var(--gap, 2px); }
.stars-track svg { width: var(--size, 14px); height: var(--size, 14px); flex: none; }
.stars-track .bg { color: var(--line); }
.stars-track .fg { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--star); white-space: nowrap; }
.stars .val { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }

.rater {
  --size: 40px; --gap: 6px;
  display: flex; align-items: center; gap: 14px;
  touch-action: none; user-select: none; -webkit-user-select: none;
  padding: 6px 0 6px 18px; margin-left: -18px; /* the left padding is the "0" zone */
}
.rater .val { font: 700 22px var(--display); color: var(--text); min-width: 3.2ch; }
.rater .val small { font: 500 13px var(--body); color: var(--muted); display: block; }
.rater:focus-visible { outline-offset: 4px; }

/* ---------- sheet ---------- */

.scrim {
  position: fixed; inset: 0; z-index: 40; background: rgba(8, 5, 12, .6);
  opacity: 0; transition: opacity .25s;
}
.scrim.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(var(--safe-b) + 24px);
  transform: translateY(100%); transition: transform .32s var(--ease-out);
  max-width: 560px; margin: 0 auto;
}
.sheet.open { transform: none; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 18px; }
.sheet h2 { font: 700 28px/1.1 var(--display); letter-spacing: -.01em; margin: 0 0 8px; overflow-wrap: anywhere; }
.sheet .kind { color: var(--c); font-weight: 700; font-size: 15px; }
.sheet .desc { color: var(--text); margin: 14px 0 0; font-size: 15.5px; max-width: 60ch; }
.sheet .addr { color: var(--muted); font-size: 14.5px; margin: 10px 0 0; display: flex; gap: 8px; }
.sheet .addr svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.sheet-actions { display: grid; gap: 10px; margin: 22px 0 6px; }
.sheet-actions .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.status-line { color: var(--muted); font-size: 14.5px; text-align: center; margin: 2px 0 0; }
.status-line b { color: var(--text); }
.pinfix {
  justify-self: center; color: var(--faint); font-size: 13.5px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; padding: 6px 10px; margin-top: 2px;
}
.pinfix.confirm { color: var(--accent-text); text-decoration: none; border: 1.5px solid var(--accent-text); border-radius: 12px; padding: 10px 14px; }
.pinfix:disabled { color: var(--muted); border-color: var(--line); }
.section { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.section h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--muted); }
.section h3 b { color: var(--text); }
.stamp-row { display: flex; align-items: center; gap: 14px; }
.stamp-row .mark { flex: none; }
.stamp-row p { margin: 0; font-weight: 600; }
.stamp-row p span { display: block; color: var(--muted); font-weight: 400; font-size: 14px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.people li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
.people .nick { font-weight: 600; }
.people .nick.me { color: var(--me); }
.people time { grid-column: 1; color: var(--faint); font-size: 13px; }
.people .stars { grid-row: span 2; grid-column: 2; }
.people .unrated { grid-row: span 2; grid-column: 2; color: var(--faint); font-size: 13px; }
.choose { list-style: none; margin: 0; padding: 0; }

/* ---------- dock (you're here) ---------- */

.dock {
  position: fixed; left: 12px; right: 12px; z-index: 31;
  bottom: calc(var(--tabs-h) + var(--safe-b) + 10px);
  max-width: 536px; margin: 0 auto;
  border-radius: 22px; padding: 12px 12px 12px 16px;
  background: var(--surface-2);
  border: 1.5px solid color-mix(in srgb, var(--c, var(--accent)) 70%, transparent);
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  transform: translateY(calc(100% + 100px)); transition: transform .4s var(--ease-out);
}
.dock.show { transform: none; }
.dock .where { min-width: 0; text-align: left; }
.dock .where small { display: block; color: var(--muted); font-size: 13px; font-weight: 500; }
.dock .where strong { display: block; font: 700 18px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .where .more { color: var(--accent-text); font-weight: 600; font-size: 13px; }
.dock .btn { min-height: 48px; padding: 0 18px; border-radius: 14px; }

/* ---------- stamp moment ---------- */

.moment {
  position: fixed; inset: 0; z-index: 60; background: var(--glow), var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: calc(var(--safe-t) + 24px) 24px calc(var(--safe-b) + 24px);
  animation: fade .2s both;
}
@keyframes fade { from { opacity: 0; } }
.big-stamp {
  width: 230px; height: 230px; border-radius: 50%; color: var(--c);
  display: grid; place-items: center; position: relative;
  border: 6px solid currentColor;
  box-shadow: 0 0 34px color-mix(in srgb, var(--c) 55%, transparent), inset 0 0 26px color-mix(in srgb, var(--c) 35%, transparent);
  text-shadow: 0 0 18px color-mix(in srgb, var(--c) 70%, transparent);
  animation: slam .55s cubic-bezier(.3, 1.4, .5, 1) .1s both;
  transform: rotate(-11deg);
}
.big-stamp::before {
  content: ""; position: absolute; inset: 10px; border-radius: 50%;
  border: 2px dashed currentColor; opacity: .8;
}
.big-stamp .inner { display: grid; gap: 6px; padding: 30px; }
.big-stamp .no { font: 800 15px var(--display); opacity: .85; }
.big-stamp .nm { font: 800 24px/1.05 var(--display); overflow-wrap: anywhere; }
.big-stamp .dt { font: 600 13px var(--body); opacity: .85; }
@keyframes slam {
  0% { transform: rotate(-30deg) scale(2.6); opacity: 0; }
  60% { transform: rotate(-9deg) scale(.94); opacity: 1; }
  100% { transform: rotate(-11deg) scale(1); opacity: 1; }
}
.ink {
  position: absolute; width: 230px; height: 230px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 40%, transparent), transparent 70%);
  animation: ink 1s var(--ease-out) .5s both; pointer-events: none;
}
@keyframes ink { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
.moment-stamp { position: relative; display: grid; place-items: center; margin-bottom: 30px; }
.moment h2 { font: 800 30px/1.1 var(--display); margin: 0 0 8px; animation: rise .5s var(--ease-out) .55s both; }
.moment .sub { color: var(--muted); margin: 0 0 30px; animation: rise .5s var(--ease-out) .65s both; }
.moment .ask { width: 100%; max-width: 360px; display: grid; justify-items: center; gap: 16px; animation: rise .5s var(--ease-out) .8s both; }
.moment .ask p { margin: 0; font-weight: 700; font-size: 18px; }
.moment .ask .actions { display: grid; gap: 6px; width: 100%; margin-top: 8px; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- map ---------- */

#map { position: absolute; inset: 0; background: var(--map-bg); }
/* OSM's light tiles, turned into a night map that matches the app. */
#map .leaflet-tile-pane { filter: var(--map-filter); }
.map-top {
  position: absolute; z-index: 500; left: 12px; right: 12px; top: calc(var(--safe-t) + 12px);
  display: flex; gap: 8px; align-items: center; pointer-events: none;
}
.map-top > * { pointer-events: auto; }
.map-pill {
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px;
  height: 42px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.map-pill b { font-family: var(--display); }
.map-pill[aria-pressed="true"] { border-color: var(--accent-text); color: var(--accent-text); }
.map-locate {
  position: absolute; z-index: 500; right: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + 16px);
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--glass); color: var(--text); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: bottom .4s var(--ease-out);
}
.map-locate svg { width: 24px; height: 24px; }
.dock.show ~ .view-map .map-locate, body.docked .map-locate { bottom: calc(var(--tabs-h) + var(--safe-b) + 106px); }
.pin {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 2.5px solid var(--c); color: var(--bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.pin.on { background: var(--c); }
.pin svg { width: 14px; height: 14px; }
.pin-label {
  position: absolute; left: 50%; top: 30px; translate: -50% 0; white-space: nowrap;
  font: 600 11.5px var(--body); color: var(--text);
  text-shadow: 0 0 3px var(--bg), 0 0 3px var(--bg), 0 0 6px var(--bg);
  pointer-events: none;
}
#map.zoomed-out .pin-label { display: none; }
#map.zoomed-out .pin { transform: scale(.62); }
#map.far .pin { transform: scale(.42); border-width: 4px; }
#map.far .pin svg { display: none; }
.me-dot {
  width: 18px; height: 18px; border-radius: 50%; background: var(--me); border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgba(127, 180, 255, .6); animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 16px rgba(127, 180, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 180, 255, 0); } }
.leaflet-control-attribution { background: var(--glass) !important; color: var(--faint) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bottom.leaflet-right { bottom: calc(var(--tabs-h) + var(--safe-b)); }

/* ---------- leaderboard ---------- */

.page-title { font: 800 34px/1.05 var(--display); letter-spacing: -.02em; margin: 8px 0 6px; }
.page-sub { color: var(--muted); margin: 0 0 24px; }
.page-sub .link { white-space: nowrap; }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.board li {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 12px; align-items: center;
  padding: 14px 16px; border-radius: 18px; background: var(--surface);
}
.board li.me { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.board .rank { font: 800 18px var(--display); color: var(--faint); text-align: center; }
.board li:nth-child(1) .rank { color: var(--accent-text); }
.board .nick { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .cnt { font: 700 20px var(--display); font-variant-numeric: tabular-nums; }
.board .cnt small { font: 500 13px var(--body); color: var(--muted); }
.board .meter { grid-column: 2 / 4; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.board .meter i { display: block; height: 100%; background: var(--hero); border-radius: 3px; }

.invite { margin-top: 24px; }

/* ---------- passport ---------- */

.passport { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; margin: 6px 0 8px; }
.slot {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center;
  padding: 8px; position: relative;
}
.slot.empty { border: 1.5px dashed var(--line); color: var(--faint); }
.slot.empty span { font-size: 10.5px; line-height: 1.15; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slot.full { color: var(--c); border: 3px solid currentColor; transform: rotate(var(--r, -6deg)); }
.slot.full::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px dashed currentColor; opacity: .7; }
.slot.full b { font: 700 10.5px/1.1 var(--display); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slot.full small { display: block; font-size: 10px; font-weight: 600; opacity: .85; margin-top: 3px; }
.slot.full .st { position: absolute; bottom: -6px; left: 50%; translate: -50% 0; background: var(--bg); padding: 0 5px; border-radius: 6px; font: 700 11px var(--body); color: var(--star); white-space: nowrap; }

.keycard { background: var(--surface); border-radius: 22px; padding: 20px; margin-top: 28px; scroll-margin-top: 20px; }
.keycard h3 { margin: 0 0 6px; font-size: 17px; }
.keycard p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }
.code {
  font: 700 26px var(--display); letter-spacing: .08em; text-align: center;
  padding: 16px; border-radius: 14px; background: var(--bg); margin-bottom: 14px;
  user-select: all; -webkit-user-select: all;
}
.qr { display: block; width: 200px; height: 200px; margin: 6px auto 14px; border-radius: 14px; background: #fff; padding: 10px; }
.keycard .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.keycard h3 svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.keycard b { color: var(--text); overflow-wrap: anywhere; }
.sso-card.on { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--t-cocktail) 55%, transparent); }
.keycard form { display: grid; gap: 12px; }
.keycard .or { margin: 14px 0; }
.keycard .switch { text-align: center; margin-top: 14px; font-size: 14.5px; }
.page-title:has(.rename) { display: flex; align-items: center; gap: 10px; }
.page-title .rename { flex: none; color: var(--muted); }
.page-title .name { min-width: 0; overflow-wrap: anywhere; }
.page-title .rename svg { width: 18px; height: 18px; }
.rename-form { display: grid; gap: 10px; margin: 8px 0 10px; }
.rename-form .field { text-align: left; font: 700 22px var(--display); }
.rename-form .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.keycard .btn { min-height: 46px; font-size: 15px; padding: 0 12px; }
.settings { margin-top: 28px; }
.settings h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--muted); }
.danger-zone { text-align: center; margin-top: 22px; }

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

#toast {
  position: fixed; left: 50%; z-index: 80; translate: -50% 0;
  bottom: calc(var(--tabs-h) + var(--safe-b) + 18px);
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px;
  padding: 12px 18px; border-radius: 14px; max-width: calc(100% - 32px); width: max-content;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; pointer-events: none;
}
#toast.show { opacity: 1; transform: none; }
#toast.err { background: var(--danger); color: #2a0606; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
