/* Warm, self-hosted type — no third-party request, so the no-cookie-banner rule holds (§12.4).
   Fraunces: a soft, characterful serif for the voice. Nunito Sans: a friendly humanist sans. */
@font-face { font-family: "Fraunces"; src: url("/static/fonts/fraunces.woff2") format("woff2"); font-weight: 300 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/static/fonts/fraunces-italic.woff2") format("woff2"); font-weight: 300 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/static/fonts/nunito.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }

/* VinoCappuccino — espresso dark, cherry and butter.
   One motif everywhere: the coaster. The number from the deck sits in a round, amber-rimmed
   badge — on every card, in the leaderboard, on the map, in the camera. Designed once. */

:root {
  --ground: #1c1411;
  --deep: #120c0a;
  --surface: #2a1f1a;
  --surface-2: #382a23;
  --line: #4d3a30;
  --cream: #f7efe2;
  --cream-dim: #d6c7b3;
  --cream-faint: #a6947e;
  --wine: #c8243c;
  --wine-bright: #ef5068;
  --amber: #f3c86a;
  --amber-glow: rgba(236, 160, 84, .30);
  --amber-faint: rgba(236, 160, 84, .10);
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --radius: 10px;
  --gutter: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);   /* the status bar, when the site runs from the home screen */
}

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--ground); color: var(--cream);
  font: 16.5px/1.6 var(--sans); -webkit-font-smoothing: antialiased; font-optical-sizing: auto;
  letter-spacing: .002em;
}
/* the wines & coffees wallpaper — self-hosted, barely there, fixed behind all content; a fine film grain on top */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-color: var(--ground);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(rgba(28,20,17,.95), rgba(28,20,17,.95)), url("/static/bg.svg");
  background-size: 160px, auto, 340px; background-repeat: repeat, repeat, repeat; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
main { flex: 1; width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--wine); color: var(--cream); }

/* ── the coaster ─────────────────────────────────────────────────────────── */
.coaster {
  display: inline-grid; place-items: center; flex: none;
  width: 54px; height: 54px; border-radius: 50%;
  border: 1.5px solid var(--amber); background: var(--deep); color: var(--amber);
  font: 400 24px/1 var(--serif); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 4px rgba(14, 10, 9, .6), 0 0 26px var(--amber-glow);
}
.coaster.sm { width: 40px; height: 40px; font-size: 17px; box-shadow: 0 0 0 3px rgba(14, 10, 9, .6), 0 0 16px var(--amber-glow); }
.coaster.lg { width: 76px; height: 76px; font-size: 34px; }
.coaster.icon svg { width: 46%; height: 46%; }

/* ── header / footer ─────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: calc(12px + var(--safe-t)) var(--gutter) 12px; background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--wine-bright), var(--amber) 45%, var(--line) 80%) 1;
}
.brand, .stage-brand { display: inline-flex; align-items: center; gap: 10px; font: 500 19px/1 var(--serif); letter-spacing: .01em; color: var(--cream); }
.wordmark-sm span, .wordmark span { color: var(--amber); }   /* the word stays one flex item; only its second half is amber */
.glyph { width: 44px; height: 24px; color: var(--amber); flex: none; }
.brand-insta { font: 500 12.5px/1 var(--sans); letter-spacing: .02em; color: var(--amber); opacity: .8; white-space: nowrap; }
.brand-insta:hover { opacity: 1; }
.brand .glyph { opacity: .95; }
.top nav { display: flex; gap: 18px; margin-left: auto; }
.top nav a {
  font: 500 11.5px/1 var(--sans); letter-spacing: .15em; text-transform: uppercase;
  color: var(--cream-dim); padding: 6px 0; border-bottom: 1px solid transparent; white-space: nowrap;
}
.top nav a:hover { color: var(--cream); }
.top nav a[aria-current] { color: var(--cream); border-bottom-color: var(--amber); }
.top nav a.nav-me { color: var(--amber); border: 1px solid rgba(233, 185, 90, .45); border-radius: 999px; padding: 6px 12px; margin: -1px 0; }
.top nav a.nav-me:hover, .top nav a.nav-me[aria-current] { color: var(--cream); border-color: var(--amber); }
.foot {
  padding: 32px var(--gutter) calc(32px + var(--safe-b)); text-align: center;
  font-size: 12px; color: var(--cream-faint); display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  border-top: 1px solid var(--line); text-transform: lowercase; letter-spacing: .04em;
}
.foot a:hover { color: var(--cream-dim); }
.foot .foot-line { flex-basis: 100%; }
body.full main { display: flex; }
body.full .foot { display: none; }
.page-title { font: 400 30px/1.15 var(--serif); margin: 0 0 18px; }
.page-title small { display: block; font: italic 400 15px/1.4 var(--serif); color: var(--cream-dim); margin-top: 4px; }

/* ── the card ─────────────────────────────────────────────────────────────── */
.feed { max-width: 480px; margin: 0 auto; padding: 32px var(--gutter) 48px; display: flex; flex-direction: column; gap: 36px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: visible; box-shadow: 0 1px 0 var(--line), 0 20px 50px -30px rgba(0, 0, 0, .8); border: 1px solid var(--line); }
.card-photo { position: relative; display: block; border-radius: var(--radius) var(--radius) 0 0; overflow: visible; }
.card-photo img { display: block; width: 100%; height: auto; background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.card-photo .coaster { position: absolute; left: 16px; bottom: -30px; width: 66px; height: 66px; font-size: 30px; }
.card-meta { display: flex; align-items: center; gap: 14px; padding: 18px 16px 18px 98px; min-height: 84px; }
.card-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.place { font: 500 18px/1.25 var(--serif); color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { font-size: 13px; color: var(--cream-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-links { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; }
.handle { color: var(--wine-bright); }
.handle:hover { color: var(--cream); }
.pin { color: var(--cream-dim); font-size: 15px; }
.pin:hover { color: var(--amber); }
.num { color: var(--cream-faint); font-variant-numeric: tabular-nums; }
.card.is-live { animation: arrive 1.2s ease-out; }
@keyframes arrive { 0% { opacity: 0; transform: translateY(-10px); } 30% { box-shadow: 0 0 0 2px var(--amber), 0 0 40px var(--amber-glow); } 100% { opacity: 1; transform: none; } }
.more, .post, .btn {
  display: inline-block; padding: 13px 22px; border: 0; border-radius: 999px; text-align: center;
  background: var(--wine); color: var(--cream); font-weight: 500; letter-spacing: .02em; transition: .15s;
}
.more, .post { width: 100%; border-radius: var(--radius); }
.more { background: var(--surface-2); color: var(--cream-dim); }
.more:hover, .post:hover, .btn:hover { filter: brightness(1.14); }
.post.sending { background: linear-gradient(90deg, var(--wine) var(--p, 0%), var(--surface-2) var(--p, 0%)); filter: none; }
.post.kept { background: var(--wine); animation: kept .45s ease-out; }
@keyframes kept { 40% { transform: scale(1.03); box-shadow: 0 0 0 2px var(--amber), 0 0 30px var(--amber-glow); } }
#preview.kept { animation: kept .45s ease-out; }
.btn.ghost { background: transparent; border: 1px solid var(--cream-dim); color: var(--cream); }
.btn.ghost:hover { border-color: var(--amber); color: var(--amber); filter: none; }
.keep-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.keep-btn svg { width: 1.25em; height: 1.25em; flex: none; }
.empty { color: var(--cream-dim); text-align: center; padding: 40px 0; }
.empty a { color: var(--amber); }

/* single moment */
.moment { max-width: 640px; margin: 0 auto; padding: 32px var(--gutter) 48px; }
/* the permalink shows the photo whole, as it was taken — no crop, no cap; the feed's cards keep theirs */
.card.is-single .card-photo img { background: var(--deep); }
.card.is-single .card-photo .coaster { left: 18px; bottom: -34px; }
.card.is-single .card-meta { padding-left: 112px; min-height: 84px; }
.card.is-single .place { white-space: normal; font-size: 19px; }
.card.is-single .card-links { font-size: 13px; }
.counter { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 4px 8px; color: var(--cream-faint); font-variant-numeric: tabular-nums; }
.counter strong { font: 400 22px/1 var(--serif); color: var(--cream); }
.counter a:hover { color: var(--amber); }
.moment-actions { text-align: center; font-size: 13px; color: var(--cream-faint); display: flex; gap: 10px; justify-content: center; align-items: center; margin: 22px 0 0; }
.sub-actions { margin-top: 12px; }
.maps-btn { display: inline-flex; align-items: center; gap: 9px; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--amber); background: var(--amber-faint); color: var(--amber); font-size: 14px; font-weight: 500; transition: .18s; }
.maps-btn svg { width: 18px; height: 18px; }
.maps-btn:hover { background: var(--amber); color: var(--ground); box-shadow: 0 0 26px var(--amber-glow); }
.link { background: none; border: 0; padding: 0; color: var(--cream-dim); }
.link:hover { color: var(--amber); }
.link.danger:hover { color: var(--wine-bright); }

/* ── landing ──────────────────────────────────────────────────────────────── */
body.landing .top { position: absolute; left: 0; right: 0; background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.landing .top .top-fade { }

/* ── hero: the invitation, then the world as a lit disc, then the count ──────── */
.hero { position: relative; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 104px var(--gutter) 64px; gap: 2px;
  background: radial-gradient(ellipse at 50% 42%, rgba(200, 36, 60, .16), transparent 58%); }
.hero-copy { max-width: 640px; margin: 0 auto; }
.wordmark { font: 400 clamp(46px, 9vw, 88px)/1 var(--serif); letter-spacing: -.01em; margin: 0 0 18px; color: var(--cream); }
.wordmark span { color: var(--amber); }
.thesis { font: italic 400 clamp(21px, 3.4vw, 30px)/1.32 var(--serif); color: var(--cream); margin: 0 auto 14px; max-width: 26ch; }
.hero .lead { color: var(--cream-dim); font-size: 16.5px; margin: 0 auto 26px; max-width: 44ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 0; }
/* the button under the globe sits midway between the rim's credit line (~28px below the disc) and the next section's mark */
.globe-cta { margin-top: 70px; }
.hero:has(.globe-cta) { padding-bottom: 0; }
.hero:has(.globe-cta) + section { padding-top: 64px; }
/* the first thing the page shows is real moments: a row of photos that scrolls sideways */
.strip { display: flex; gap: 10px; align-self: stretch; margin: 6px calc(-1 * var(--gutter)) 22px; padding: 4px var(--gutter) 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent); }
.strip::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .strip { justify-content: center; } }
.strip-card { position: relative; flex: none; width: 128px; height: 168px; border-radius: 14px; overflow: hidden; scroll-snap-align: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 14px 30px -18px rgba(0,0,0,.8); transition: transform .2s; }
.strip-card:nth-child(odd) { transform: rotate(-1.2deg); }
.strip-card:nth-child(even) { transform: rotate(1deg) translateY(4px); }
.strip-card:hover { transform: translateY(-3px) rotate(0); }
.strip-card img { width: 100%; height: 100%; object-fit: cover; }
.strip-card .coaster.sm { position: absolute; left: 8px; bottom: 8px; width: 32px; height: 32px; font-size: 14px; }
.strip-place { position: absolute; right: 8px; bottom: 10px; left: 46px; font: 600 11px/1.2 var(--sans); color: #fff; text-align: right;
  text-shadow: 0 1px 6px rgba(0,0,0,.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* who leads: the race, one line under the buttons */
.race { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px 14px; margin: 20px auto 0; font-size: 14px; color: var(--cream-dim); }
.race > span { font: 500 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cream-faint); width: 100%; }
.race a b { color: var(--amber); font-weight: 600; margin-right: 3px; }
.race a:hover { color: var(--cream); }
.race .race-more { color: var(--amber); }
.btn { font-size: 15.5px; padding: 14px 26px; }

/* the world, held like a coaster: a lit disc you can step into */
.hero-globe { --disc: min(58vmin, 460px); position: relative; width: var(--disc); height: var(--disc); margin: 44px auto 18px; }
.hero-world { display: block; position: relative; width: 100%; height: 100%; border-radius: 50%; }
.disc-ring { position: absolute; inset: -10px; border-radius: 50%; border: 1px solid var(--amber); opacity: .28;
  box-shadow: inset 0 0 40px rgba(236,160,84,.16), 0 0 70px var(--amber-glow); transition: opacity .3s, transform .3s; }
#map.globe-disc { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; border-radius: 50%; overflow: hidden;
  box-shadow: inset 0 0 60px rgba(0,0,0,.5); background: radial-gradient(circle at 42% 40%, #2a1f1a90, #120c0a 76%); }
.globe-disc .maplibregl-canvas { outline: none; }
/* a clear, always-visible link sitting in the middle of the turning globe */
.world-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  background: color-mix(in srgb, var(--deep) 70%, transparent); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  border: 1px solid var(--amber); color: var(--cream); font: 500 13.5px/1 var(--sans); letter-spacing: .04em;
  box-shadow: 0 0 34px var(--amber-glow); transition: .2s; white-space: nowrap; }
.world-center b { font-weight: 600; color: var(--amber); }
.world-center i { font-style: normal; color: var(--amber); font-size: 1.1em; }
.hero-world:hover .disc-ring { opacity: .55; transform: scale(1.015); }
.hero-world:hover .world-center { background: var(--amber); color: var(--deep); box-shadow: 0 0 46px var(--amber-glow); }
.hero-world:hover .world-center b, .hero-world:hover .world-center i { color: var(--deep); }
.tally { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 0 30px; }
.tally b { font: 400 clamp(48px, 8vw, 84px)/.9 var(--serif); color: var(--amber); font-variant-numeric: tabular-nums; letter-spacing: -.01em; text-shadow: 0 0 30px var(--amber-glow); }
.tally b.tick { animation: tick .6s ease-out; }
@keyframes tick { 0% { transform: translateY(-6px) scale(1.04); text-shadow: 0 0 48px var(--amber); } 100% { transform: none; } }
.tally-label { font: 500 11.5px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--cream-dim); }
.tally-next { font: 500 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-faint); font-variant-numeric: tabular-nums; }
.tally-next i { font-style: normal; color: var(--amber); }
.tally-next small { font-size: .68em; margin-left: 1px; }

/* ── the memorial story: a voice, centred, warm ── */
.story { max-width: 620px; margin: 0 auto; padding: 92px var(--gutter) 40px; text-align: center; }
.story-mark { width: 96px; margin: 0 auto 26px; color: var(--amber); opacity: .85; }
.story-mark .glyph { width: 100%; height: auto; }
.story-mark .wine, .story-mark .foam { fill: currentColor; stroke: none; opacity: .9; }
.story .prose { line-height: 1.7; }
.mid-cta { justify-content: center; margin: 28px 0; }
.story .prose p { color: var(--cream-dim); font-size: 17px; margin: 0 0 18px; }
.story-sign p { color: var(--cream); font-style: italic; font-family: var(--serif); font-size: 18px; margin: 8px 0 0; }
.story .prose strong { color: var(--cream); font-weight: 500; }
.story-more summary { display: inline-block; cursor: pointer; list-style: none; color: var(--amber); font-size: 15px; margin: 0 0 18px; }
.story-more summary::-webkit-details-marker { display: none; }
.story-more[open] summary { display: none; }

/* Instagram — the human behind it ── */
.insta-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--cream); font-size: 14px; transition: .18s; }
.insta-btn svg { width: 20px; height: 20px; color: var(--amber); }
.insta-btn:hover { border-color: var(--amber); color: var(--amber); box-shadow: 0 0 24px var(--amber-glow); }
.insta-btn:hover svg { color: var(--amber); }

/* ── the moment, told: one flowing column, an amber thread poured down ── */
.ritual { max-width: 600px; margin: 0 auto; padding: 76px var(--gutter) 44px; text-align: center; }
.beats { list-style: none; margin: 0; padding: 0; position: relative; }
.beat { list-style: none; }
.beat::marker { content: none; }
.beat { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0 0 40px; }
.beat-art { position: relative; display: grid; place-items: center; }
.beat-text { margin: 0; }
.beat-text b { display: block; font: 500 clamp(27px, 4.6vw, 35px)/1 var(--serif); color: var(--cream); }
.beat-text > span { display: block; font: italic 400 clamp(15px, 2.2vw, 17.5px)/1.5 var(--serif); color: var(--cream-dim); margin-top: 7px; }
.beat-text > span.mood { color: var(--cream-dim); transition: color .2s; }
.beat-text > span.mood.lit { color: var(--amber); }
.radius-ring { position: absolute; width: 76px; height: 76px; border-radius: 50%; border: 1px solid var(--amber); opacity: .35; animation: radiuspulse 3s ease-out infinite; }
@keyframes radiuspulse { 0% { transform: scale(.55); opacity: .6; } 100% { transform: scale(1.15); opacity: 0; } }
.ritual-cta { text-align: center; margin: 8px 0 0; }
.deck-fan { position: relative; width: 76px; height: 76px; }
.fan-card { position: absolute; left: 50%; top: 50%; width: 44px; height: 60px; margin: -30px 0 0 -22px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--deep); color: var(--cream-dim);
  font: 400 20px/1 var(--serif); display: grid; place-items: center; cursor: pointer;
  transform-origin: 50% 130%; transform: rotate(calc((var(--i) - (var(--n) - 1) / 2) * 15deg)); transition: transform .2s, color .2s, border-color .2s, box-shadow .2s; }
.fan-card:hover, .fan-card.on { color: var(--amber); border-color: var(--amber); box-shadow: 0 0 22px var(--amber-glow);
  transform: rotate(calc((var(--i) - (var(--n) - 1) / 2) * 15deg)) translateY(-14px); z-index: 3; }


/* ── kicker ── */
.kicker { text-align: center; padding: 64px var(--gutter) 76px; }
.kicker-mark { width: 120px; margin: 0 auto 20px; color: var(--amber); opacity: .85; }
.kicker-mark .glyph { width: 100%; height: auto; }
.kicker-mark .wine, .kicker-mark .foam { fill: currentColor; stroke: none; opacity: .9; }
.kicker .thesis { max-width: none; margin: 0 auto 26px; }
.kicker .cta { justify-content: center; }

/* ── leaderboard ──────────────────────────────────────────────────────────── */
.board { max-width: 640px; margin: 0 auto; padding: 32px var(--gutter) 48px; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 14px; }
.total { font: 400 22px/1 var(--serif); }
.countdown { position: relative; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--cream-faint); padding-bottom: 6px; min-width: 96px; text-align: right; }
.countdown i { position: absolute; left: 0; bottom: 0; height: 1px; background: var(--amber); width: 0; transition: width .25s linear; }
.sorts { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; font-size: 12px; color: var(--cream-faint); flex-wrap: wrap; }
.pill { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--cream-dim); font-size: 12.5px; background: var(--surface); }
.pill:hover { color: var(--cream); }
.pill.on { border-color: var(--amber); color: var(--amber); }
.board-level h2 { font: 400 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cream-faint); margin: 0; }
.level-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 10px; flex-wrap: wrap; }
.counts { display: flex; gap: 6px; }
.pill.sm { padding: 5px 11px; font-size: 11.5px; }
.ranks { list-style: none; margin: 0; padding: 0; }
.ranks li { display: grid; grid-template-columns: 28px 1fr auto; grid-template-areas: "rank name metric"; align-items: center; column-gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.metric { grid-area: metric; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 64px; }
.metric b { font: 400 26px/1 var(--serif); color: var(--amber); font-variant-numeric: tabular-nums; }
.metric small { font: 500 9.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-faint); }
.rank { grid-area: rank; color: var(--cream-faint); font-variant-numeric: tabular-nums; font-size: 13px; }
.name { grid-area: name; font: 500 16.5px/1.2 var(--serif); }
.name em { font: 400 11px var(--sans); color: var(--cream-faint); letter-spacing: .08em; margin-left: 4px; }
.stats { grid-area: stats; font-size: 12px; color: var(--cream-faint); }

/* ── world map ────────────────────────────────────────────────────────────── */
#map { flex: 1; width: 100%; min-height: calc(100dvh - 55px - var(--safe-t));
  background-color: var(--ground);
  background-image: linear-gradient(rgba(28,20,17,.95), rgba(28,20,17,.95)), url("/static/bg.svg");
  background-size: auto, 340px; background-repeat: repeat, repeat; }
/* the data credit on the full map: small, in the site's colours */
.maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib.maplibregl-compact { background: color-mix(in srgb, var(--deep) 85%, transparent) !important; color: #fff !important; font-size: 11px; }
.maplibregl-ctrl-attrib a, .maplibregl-ctrl-attrib-inner a { color: #fff !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }
#map.globe-disc .maplibregl-ctrl-attrib { display: none; }
.maplibregl-ctrl-group { background: var(--surface) !important; box-shadow: 0 0 0 1px var(--line) !important; }
.maplibregl-ctrl button span { filter: invert(.85) sepia(.3); }
.maplibregl-popup-content { background: var(--surface); color: var(--cream); padding: 6px; border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,.5); }
.maplibregl-popup-tip { border-top-color: var(--surface) !important; }
.maplibregl-popup-close-button { display: none; }
.pop { display: flex; gap: 10px; align-items: center; padding-right: 6px; }
.pop img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.tip { position: fixed; pointer-events: none; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; font-size: 12px; color: var(--cream-dim); }
.tip b { font: 500 14px var(--serif); color: var(--cream); display: block; }

.tip .avg { font: 400 16px var(--serif); color: var(--amber); }
.tip .approx { display: block; margin-top: 3px; font: italic 400 11.5px var(--serif); color: var(--cream-faint); }
.pop-marker { width: 30px; height: 30px; animation: pop-in .5s cubic-bezier(.2,1.3,.4,1) both, pop-out .8s ease-in 5.7s forwards;
  filter: drop-shadow(0 0 8px rgba(14,10,9,.7)); pointer-events: none; }
.pop-marker svg { width: 100%; height: 100%; display: block; }
@keyframes pop-in { 0% { transform: translateY(6px) scale(.2); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes pop-out { to { transform: translateY(-8px) scale(.6); opacity: 0; } }


/* ── capture ──────────────────────────────────────────────────────────────── */
body.capture .top, body.capture .foot { display: none; }
body.capture main { position: relative; min-height: 100dvh; }
/* the imprint under the button: its own line, well apart, with a thumb-sized target */
.imprint-link { margin: 22px 0 4px; text-align: center; font-size: 13px; }
.imprint-link a { display: inline-block; padding: 12px 20px; color: var(--cream-faint); text-decoration: underline; text-underline-offset: 3px; }
.stage { position: fixed; inset: 0; background: #000; overflow: hidden; }
/* what you see is what gets published: the whole frame, never a screen-filling crop */
#cam, #preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
/* once captured, the photo sits above the question sheet, whole — nothing of it hides behind the form */
/* (a replaced element ignores an inset box with auto size, so the size is set outright) */
body.captured #preview { top: calc(8px + var(--safe-t)); left: 8px; width: calc(100% - 16px); height: calc(48dvh - 16px - var(--safe-t)); transition: height .3s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 560px) { body.captured #preview { height: calc(52dvh - 16px); } }
#cam { display: none; }
body.has-cam #cam { display: block; }
body.captured #cam { display: none; }
body.captured #preview { display: block !important; }
.stage-brand { position: absolute; top: calc(16px + var(--safe-t)); left: 16px; z-index: 2; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.controls { position: absolute; left: 0; right: 0; bottom: calc(28px + var(--safe-b)); z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 28px; }
body.captured .controls, body.captured .no-cam-hint { display: none; }
.shutter { width: 78px; height: 78px; border-radius: 50%; border: 4px solid var(--cream); background: var(--wine-bright); box-shadow: 0 0 0 6px rgba(0,0,0,.35), 0 0 34px var(--amber-glow); justify-self: center; transition: transform .1s; }
.shutter:active { transform: scale(.94); }
body.no-cam .shutter { opacity: .25; pointer-events: none; }
.gallery { justify-self: start; }
.gallery input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.gallery span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cream-dim); padding: 10px 0; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.no-cam-hint { display: none; position: absolute; left: 0; right: 0; bottom: calc(120px + var(--safe-b)); z-index: 2; text-align: center; color: var(--cream-dim); font-size: 13px; }
body.no-cam .no-cam-hint { display: block; }
body.no-cam .gallery span { color: var(--amber); }
/* the location permission, asked on the camera screen where it makes sense — one pill, three states */
.locask { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(128px + var(--safe-b)); z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(243,233,216,.25); background: rgba(0,0,0,.45); color: var(--cream); font-size: 12px; letter-spacing: .06em; white-space: nowrap; backdrop-filter: blur(6px); }
.locask .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cream-faint); }
.locask.is-locating .dot { background: var(--amber); animation: blink 1s infinite; }
.locask.is-ok .dot { background: #7fb069; }
.locask.is-bad .dot { background: var(--wine-bright); }
.lochelp { position: absolute; left: 16px; right: 16px; bottom: calc(176px + var(--safe-b)); z-index: 2; margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,.6); color: var(--cream-dim); font-size: 12.5px; line-height: 1.4; text-align: center; }
body.no-cam .locask { bottom: calc(160px + var(--safe-b)); }
body.no-cam .lochelp { bottom: calc(208px + var(--safe-b)); }
body.captured .locask, body.captured .lochelp { display: none; }


/* ── the journey: one question at a time, big taps, ~30 seconds ───────────── */
.journey {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; max-height: 52dvh; overflow-y: auto;   /* the photo keeps the top 48dvh, whole */
  background: color-mix(in srgb, var(--ground) 94%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-radius: 22px 22px 0 0; padding: 12px var(--gutter) calc(24px + var(--safe-b));
  box-shadow: 0 -10px 44px rgba(0,0,0,.55); animation: rise .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.journey-top { display: flex; align-items: center; gap: 14px; margin: 0 0 10px; }
.retake { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--cream-dim); font-size: 15px; line-height: 1; }
.retake:hover { color: var(--amber); border-color: var(--amber); }
.dots { list-style: none; display: flex; gap: 7px; margin: 0; padding: 0; }
.dots li { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: .2s; }
.dots li.on { background: var(--amber); transform: scale(1.25); }
.dots li.done { background: var(--cream-faint); }
.jstep { animation: stepin .28s ease-out; }
@keyframes stepin { from { opacity: 0; transform: translateY(8px); } }
.ask { font: 400 clamp(22px, 4vw, 27px)/1.2 var(--serif); color: var(--cream); margin: 6px 0 2px; text-align: center; }
.ask-sub { font-size: 13px; color: var(--cream-dim); text-align: center; margin: 0 0 18px; }
.choices { display: grid; gap: 12px; margin: 16px 0 6px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choices.three { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
.choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 22px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--cream);
  transition: .16s; min-height: 96px; }
.choices.three .choice { flex-direction: row; gap: 12px; min-height: 66px; justify-content: flex-start; padding: 16px 22px; }
.choice svg { width: 46px; height: 46px; color: var(--amber); }
.choice span { font: 400 18px/1 var(--serif); }
.choice .big { font-size: 21px; }
.choice small { color: var(--cream-faint); font-size: 12.5px; margin-left: auto; }
.choice:hover, .choice.on { border-color: var(--amber); background: var(--surface-2); box-shadow: 0 0 26px var(--amber-glow); }
.deck-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 12px 0 6px; }
.deck-pick { width: 52px; height: 52px; font-size: 22px; cursor: pointer; border-color: var(--line); background: var(--deep); transition: .14s; }
.deck-pick:hover, .deck-pick.on { border-color: var(--amber); color: var(--amber); box-shadow: 0 0 0 4px rgba(14,10,9,.6), 0 0 26px var(--amber-glow); transform: translateY(-4px); }
.word-input, .journey .email, .journey .handle { width: 100%; padding: 13px 15px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--cream); font: inherit; margin-bottom: 10px; }
.word-input { font-size: 18px; text-align: center; }
.journey input::placeholder { color: var(--cream-faint); }
.journey input:focus { outline: 0; border-color: var(--amber); }
.word-count { text-align: center; font-size: 12px; color: var(--cream-faint); margin: 0 0 14px; }
.jnav { display: flex; gap: 12px; align-items: center; }
.jnav .post { flex: 1; }
.ghost-link { background: none; border: 0; color: var(--cream-dim); font-size: 14px; padding: 12px 8px; }
.ghost-link:hover { color: var(--amber); }
.loc { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; font-size: 12.5px; color: var(--cream-dim); }
.loc .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--cream-faint); margin-top: 5px; }
.loc.is-locating .dot { background: var(--amber); animation: blink 1s infinite; }
.loc.is-ok .dot { background: #7fb069; }
.loc.is-bad .dot { background: var(--wine-bright); }
.loc-help { margin: -6px 0 12px 19px; font-size: 12px; line-height: 1.4; color: var(--cream-dim); }
.kept { margin: 0 0 14px; font-size: 13px; color: var(--cream-dim); }
/* right after posting: how it went — first moment, the streak, the place's standing */
.cheers { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; animation: arrive .6s ease-out; }
.cheer { margin: 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--amber); background: var(--amber-faint);
  font: 500 15px/1.35 var(--sans); color: var(--cream); }
.story-btn { width: 100%; max-width: 320px; }
.kept b { color: var(--amber); font-weight: 600; }
.kept a { text-decoration: underline; }
@keyframes blink { 50% { opacity: .3; } }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--cream-dim); line-height: 1.4; margin-bottom: 14px; }
.consent input { margin-top: 3px; accent-color: var(--amber); width: 16px; height: 16px; flex: none; }
.err { margin: 0 0 10px; color: var(--wine-bright); font-size: 13px; text-align: center; }
.hint { font-size: 12px; color: var(--cream-faint); margin: -2px 0 12px; }
.sep { display: inline-block; vertical-align: -0.16em; margin: 0 0.3em; }
.sep svg { width: 0.98em; height: 0.98em; color: var(--amber); }
.ic { display: inline-block; vertical-align: -0.15em; margin: 0 0.24em; }
.ic svg { width: 0.92em; height: 0.92em; color: var(--amber); }
.ic.arrow { margin: 0 0.34em; }
.ic.arrow svg { width: 1.2em; height: 1.2em; }
.hint a { color: var(--amber); }
.handle-row .toggle { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--cream-dim); }
.handle-row .toggle input { width: 16px; height: 16px; accent-color: var(--amber); }
.journey .post:disabled { opacity: .5; }
@media (min-width: 560px) { .journey { max-width: 520px; margin: 0 auto; border-radius: 22px; bottom: 2dvh; max-height: 46dvh; } }

/* ── me / forms / prose ───────────────────────────────────────────────────── */
.me, .prose { max-width: 560px; margin: 0 auto; padding: 32px var(--gutter) 48px; }
h1 { font: 400 30px/1.15 var(--serif); margin: 0 0 8px; }
.lead { color: var(--cream-dim); margin: 0 0 22px; }
.dim { color: var(--cream-faint); }
.small { font-size: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack input, .stack textarea { width: 100%; padding: 13px 15px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); color: var(--cream); font: inherit; }
.stack input::placeholder, .stack textarea::placeholder { color: var(--cream-faint); }
.stack input:focus, .stack textarea:focus { outline: 0; border-color: var(--amber); }
.stack input[inputmode=numeric] { font: 400 24px/1 var(--serif); letter-spacing: .3em; text-align: center; }
.stack textarea { resize: vertical; min-height: 120px; }
.stack .consent { margin: 2px 0 0; }
.stack .consent input { width: 16px; padding: 0; }  /* the tick, not a full-width field */
.inline { display: inline; }
.lead.dim { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin: 22px 0; }
.row label { grid-column: 1 / -1; font-size: 13px; }
.row label small { display: block; color: var(--cream-faint); }
.row button { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.mine { list-style: none; margin: 0; padding: 0; }
.mine li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.mine img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; }
.mine time { color: var(--cream-faint); }
.mine em { color: var(--wine-bright); font-style: normal; }
.mine form { margin-left: auto; }
.mine form.del { display: flex; gap: 12px; align-items: center; }
.mine form.del label, .danger-zone label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.mine form.del input, .danger-zone label input { accent-color: var(--amber); width: 14px; height: 14px; margin: 0; flex: none; }
.actions { margin: 20px 0; }
.actions a { color: var(--amber); }
.danger-zone { margin-top: 36px; color: var(--cream-faint); }
/* deleted moments in /me: folded away, one tap opens them */
.deleted-list { margin-top: 18px; }
.deleted-list summary { display: inline-block; cursor: pointer; padding: 10px 0; color: var(--cream-dim); font-size: 14px; }
.deleted-list .hint { margin: 4px 0 10px; }
.deleted-list .mine img { opacity: .55; }
.danger-zone summary { cursor: pointer; }
.danger-zone .stack { margin-top: 12px; }
.post.danger { background: var(--wine-bright); }
code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; color: var(--amber); }
.prose { line-height: 1.65; }
.prose h2 { font: 400 22px/1.2 var(--serif); margin: 28px 0 8px; }
.prose p, .prose li { color: var(--cream-dim); }
.prose a { color: var(--amber); }

/* ── admin ────────────────────────────────────────────────────────────────── */
.admin { max-width: 960px; margin: 0 auto; padding: 24px var(--gutter) 40px; }
.admin h2 { font: 400 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cream-faint); margin: 30px 0 12px; }
.adminnav { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.adminnav a { color: var(--cream-dim); padding: 4px 0; border-bottom: 1px solid transparent; }
.adminnav a[aria-current] { color: var(--cream); border-bottom-color: var(--amber); }
.adminnav form { margin-left: auto; }
.narrow { max-width: 360px; }
.qr { display: inline-block; padding: 12px; border-radius: 12px; background: #f7efe2; margin: 6px 0 14px; line-height: 0; }   /* a light card: a scanner needs dark on light */
.qr svg { display: block; width: min(260px, 70vw); height: auto; }
.qr svg { width: 100%; height: auto; display: block; }
/* the panel's Development charts: one line per number, one value a day */
.growth-range { display: flex; gap: 6px; margin: 0 0 12px; }
.growth-range button { background: var(--surface); color: var(--cream-dim); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.growth-range button[aria-pressed="true"] { color: var(--ground); background: var(--amber); border-color: var(--amber); }
.growth-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 8px; }
.growth-chart { margin: 0; background: var(--surface); border-radius: var(--radius); padding: 14px 16px; position: relative; }
.growth-chart figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.growth-chart figcaption b { color: var(--cream); font-weight: 500; }
.growth-total { color: var(--cream-dim); font-size: 13px; }
.growth-chart figcaption small { flex-basis: 100%; color: var(--cream-dim); opacity: .75; font-size: 12px; }
.growth-plot { position: relative; margin-top: 8px; }
.growth-plot svg { display: block; width: 100%; height: 160px; overflow: visible; }
.growth-plot .grid { stroke: var(--line); stroke-width: 1; }
.growth-plot .axis { fill: var(--cream-dim); font-size: 11px; }
.growth-plot .line { fill: none; stroke: var(--amber); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.growth-plot .area { fill: var(--amber-faint); stroke: none; }
.growth-plot .end { fill: var(--amber); stroke: var(--surface); stroke-width: 2; }
.growth-plot .end-label { fill: var(--cream); font-size: 12px; }
.growth-plot .cross { stroke: var(--cream-dim); stroke-width: 1; stroke-dasharray: 3 3; }
.growth-plot .dot { fill: var(--amber); stroke: var(--surface); stroke-width: 2; }
.growth-tip { position: absolute; top: 0; pointer-events: none; background: var(--surface-2); color: var(--cream); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; white-space: nowrap; transform: translateX(-50%); }
.growth-tip b { font-weight: 600; }
.growth-chart details { margin-top: 6px; font-size: 12px; color: var(--cream-dim); }
.growth-table { border-collapse: collapse; margin-top: 4px; }
.growth-table td { padding: 1px 12px 1px 0; font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi b { font: 400 28px/1 var(--serif); color: var(--amber); }
.kpi span { font-size: 12px; color: var(--cream-dim); }
.kpi.warn b { color: var(--wine-bright); }
/* a thin bar under a percentage, with a tick at the red line */
.meter { position: relative; height: 6px; border-radius: 3px; background: var(--deep); margin: 8px 0 0; overflow: visible; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; max-width: 100%; background: var(--amber); border-radius: 3px; }
.meter.warn i { background: var(--wine-bright); }
.meter s { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--cream-faint); text-decoration: none; }
.kpi .rows { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.kpi .rows div { display: grid; grid-template-columns: 44px 1fr 40px; gap: 8px; align-items: center; }
.kpi .rows span { font-size: 11.5px; color: var(--cream-dim); }
.kpi .rows span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.kpi .rows .meter { margin: 0; }
.explain { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--cream-dim); }
.explain dt { color: var(--cream); font-weight: 600; margin-top: 10px; }
.explain dd { margin: 2px 0 0; }
.explain code { font-size: 11.5px; color: var(--amber); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table img { border-radius: 6px; object-fit: cover; }
.table .score { font: 400 24px/1 var(--serif); color: var(--amber); min-width: 32px; display: inline-block; text-align: center; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline-block; margin-left: 10px; }
.table .reason { max-width: 420px; white-space: pre-wrap; }
.table a { color: var(--cream); }
.table a:hover { color: var(--amber); }
.warn { color: var(--wine-bright); }
.filter { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; font-size: 13px; }
.filter input[name=q] { flex: 1; padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--cream); }
.filter button, .row-form button { padding: 9px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.filter a[aria-current] { color: var(--amber); }
.filter select, .takedown select { padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--cream); font: inherit; font-size: 13px; max-width: 100%; }

/* the moments page: one row per moment — the photo, what it is, who posted it, what is on it; the two ways out at the right */
.mrows { list-style: none; margin: 0; padding: 0; }
.mrow { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.mrow p { margin: 0; }
.mrow-thumb img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; display: block; background: var(--surface-2); }
.mrow.is-deleted .mrow-thumb img { opacity: .45; }
.mrow-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mrow-head { display: flex; align-items: center; gap: 10px; }
.mrow-head a { color: var(--cream); font-weight: 600; }
.coaster.xs { width: 26px; height: 26px; font-size: 13px; box-shadow: 0 0 0 2px rgba(14, 10, 9, .6); }
.mrow-place { color: var(--cream); }
.mrow-who a { color: var(--cream-dim); }
.mrow-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--cream-dim); font-size: 11.5px; line-height: 1.4; }
.tag.warn { background: rgba(239, 80, 104, .18); color: #e08a99; }
.mrow-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; font-size: 12.5px; }
.mrow-actions .link { font-size: 12.5px; }
.takedown summary { cursor: pointer; color: var(--cream-dim); list-style: none; }
.takedown summary::-webkit-details-marker { display: none; }
.takedown[open] summary { color: var(--amber); }
.takedown form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; width: min(380px, 78vw); text-align: left; }
.takedown .post { padding: 11px 16px; font-size: 13px; }
.mrow-empty { padding: 16px 0; }

/* the accounts page: one row per account — who they are, what they switched on, the ways in at the right;
   an action that does not apply is there but grey, so the row always reads the same */
.arows { list-style: none; margin: 0; padding: 0; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 28px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.arow p { margin: 0; }
.arow-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.arow-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.arow-who { color: var(--cream-dim); }
.arow-switches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.tag.on { color: var(--cream); }
.tag.off { color: var(--cream-faint); }
a.tag.on:hover { color: var(--amber); }
.arow-actions { display: grid; grid-template-columns: repeat(2, max-content); gap: 9px 24px; justify-content: end; align-content: start; text-align: right; font-size: 12.5px; }
.arow-actions form { display: contents; }
.arow-actions .link, .arow-actions .na { font-size: 12.5px; white-space: nowrap; }
.arow-actions .na { color: var(--cream-faint); opacity: .55; cursor: default; }
.arow.managed { grid-template-columns: 1fr; gap: 10px; }
.arow.managed .arow-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: flex-start; text-align: left; }
.manage { flex-basis: 100%; text-align: left; }
.manage summary { cursor: pointer; color: var(--amber); list-style: none; }
.manage[open] summary { margin-bottom: 4px; }
.manage summary::-webkit-details-marker { display: none; }
.manage-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; max-width: 560px; }
.manage-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.manage-form legend { padding: 0 6px; color: var(--cream-dim); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.manage-opt { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; }
.manage-opt input { margin-top: 3px; }
.manage-opt small { display: block; color: var(--cream-dim); line-height: 1.45; white-space: normal; }
.manage-form select, .manage-form textarea { padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--cream); font: inherit; font-size: 13px; width: 100%; box-sizing: border-box; }
.manage-form [hidden] { display: none; }
@media (max-width: 640px) {
  .arow { grid-template-columns: 1fr; gap: 10px; }
  .arow-actions { grid-template-columns: repeat(3, max-content); justify-content: start; text-align: left; }
}
@media (max-width: 640px) {
  .filter { flex-wrap: wrap; }
  .filter input[name=q] { flex-basis: 100%; }
  .mrow { grid-template-columns: 56px minmax(0, 1fr); }
  .mrow-thumb img { width: 56px; height: 56px; }
  .mrow-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; align-items: center; gap: 18px; text-align: left; }
}
.knob { display: grid; gap: 6px; font-size: 13px; }
.knob input { padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--cream); }
.row-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-form input[type=email] { padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--cream); min-width: 260px; }
.job { font-size: 13px; color: var(--cream-dim); }
.job.is-running b { color: var(--amber); }
button:disabled { opacity: .5; cursor: default; }

@media (min-width: 720px) {
  .top { padding: calc(14px + var(--safe-t)) 28px 14px; }
  .top nav { gap: 26px; }
}
@media (max-width: 560px) {
  /* brand and shutter on the first row, the three pages on a second — nothing gets cut off */
  .top { flex-wrap: wrap; gap: 0 12px; padding-bottom: 8px; }
  .top nav { order: 3; width: 100%; justify-content: center; align-items: center; gap: 16px; margin-top: 8px; }
  .top nav a.nav-me { padding: 5px 10px; }
  .top nav a { font-size: 10.5px; letter-spacing: .12em; }
  body.landing .top { background: linear-gradient(to bottom, rgba(14,10,9,.75), transparent); }
  .strip { grid-auto-columns: 82vw; }
  #map { min-height: calc(100dvh - 92px - var(--safe-t)); }
}
@media (prefers-reduced-motion: reduce) {
  .card.is-live { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── hearts ──────────────────────────────────────────────────────────────── */
.heart { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--cream-dim); font-size: 12.5px; line-height: 1;
  cursor: pointer; transition: .16s; font-variant-numeric: tabular-nums; }
.heart svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; transition: .16s; }
.heart b { font-weight: 600; }
.heart:hover { border-color: var(--wine-bright); color: var(--cream); }
.heart.on { border-color: var(--wine-bright); color: var(--cream); background: color-mix(in srgb, var(--wine) 55%, var(--surface-2)); }
.heart.on svg { fill: var(--wine-bright); stroke: var(--wine-bright); }
.heart.static { cursor: default; }
.heart.static:hover { border-color: var(--line); color: var(--cream-dim); }
.heart.htmx-request { opacity: .6; }

/* the byline on a card: a name (linked when findable), a handle */
.by { display: flex; gap: 10px; font-size: 12.5px; margin-top: 2px; overflow: hidden; white-space: nowrap; }
.who { color: var(--amber); font-weight: 600; }
a.who:hover { text-decoration: underline; text-underline-offset: 3px; }
span.who { color: var(--cream-dim); }
.card-links .tail { display: flex; gap: 10px; align-items: baseline; }

/* ── feed filters, place header ──────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: -8px 0 -10px; }
.fgroup { display: flex; gap: 6px; flex-wrap: wrap; }
.place-head { margin: 0 0 -12px; }
.place-head .back { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cream-faint); }
.place-head .back:hover { color: var(--amber); }
.place-head h1 { font: 400 30px/1.1 var(--serif); margin: 8px 0 4px; }
.place-head h1 small { font: italic 400 16px var(--serif); color: var(--cream-dim); margin-left: 6px; }
.place-head .sub { white-space: normal; font-size: 13.5px; }
.place-head .sub b { color: var(--amber); font: 400 16px var(--serif); }

/* ── a person: name, score, heart ────────────────────────────────────────── */
.persona { text-align: center; padding: 8px 0 4px; }
.persona-name { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.persona-name h1 { font: 400 34px/1.1 var(--serif); margin: 0; }
.persona-name .handle { font-size: 13px; }
.persona-name .edit { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--cream-faint); }
.persona-name .edit:hover { color: var(--amber); }
.persona-actions { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 14px 0 0; font-size: 13px; color: var(--cream-faint); }
.persona-actions .link { font-size: 13px; }

/* the scorecard: three factors, a hairline, the Score — and an ⓘ that explains on hover */
.scorecard { display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 22px auto 0; }
.sc-factors { display: flex; align-items: center; justify-content: center; gap: 18px; }
.sc-part { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 56px; }
.sc-part b { font: 400 34px/1 var(--serif); color: var(--cream); font-variant-numeric: tabular-nums; }
.sc-part small { font: 500 9.5px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cream-faint); }
.sc-op { font: 300 20px/1 var(--serif); color: var(--cream-faint); margin-top: -16px; }
.sc-boosted b { color: var(--amber); }
.sc-result { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 16px 36px 0; border-top: 1px solid var(--line); }
.sc-result > b { font: 400 52px/1 var(--serif); color: var(--amber); font-variant-numeric: tabular-nums; letter-spacing: -.01em; text-shadow: 0 0 28px var(--amber-glow); }
.sc-result small { display: inline-flex; align-items: center; gap: 6px; font: 500 9.5px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
/* the little i: hover or focus it and three short lines say what the numbers are */
.info { position: relative; display: inline-grid; place-items: center; width: 13px; height: 13px; border-radius: 50%;
  border: 1px solid var(--cream-faint); color: var(--cream-faint); font: italic 500 9px/1 var(--serif); cursor: help; outline: 0; text-transform: none; letter-spacing: 0; opacity: .8; }
.info:hover, .info:focus { border-color: var(--amber); color: var(--amber); opacity: 1; }
.info-bubble { display: none; position: absolute; top: calc(100% + 7px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 230px; padding: 7px 10px; z-index: 6;
  background: var(--deep); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.4);
  font: 400 11px/1.45 var(--sans); letter-spacing: 0; text-transform: none; color: var(--cream-dim); text-align: left; white-space: nowrap; }
.info-bubble b { font: inherit; font-weight: 600; color: var(--cream); text-shadow: none; letter-spacing: 0; }
.info-bubble p { margin: 0; }
.info:hover .info-bubble, .info:focus .info-bubble, .info:focus-within .info-bubble { display: block; }
.sc-note { text-align: center; font-size: 13px; color: var(--cream-dim); margin: 10px 0 12px; }

/* ── leaderboard: tabs, people rows ──────────────────────────────────────── */
.tabs { display: flex; gap: 24px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.tab { padding: 8px 2px 10px; font: 500 13px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cream-dim); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--cream); }
.tab.on { color: var(--amber); border-bottom-color: var(--amber); }
.total small { font: italic 400 13px var(--serif); color: var(--cream-faint); margin-left: 6px; }
.board-level h2 small { font: italic 400 12px var(--serif); letter-spacing: 0; text-transform: none; color: var(--cream-faint); margin-left: 6px; }
.ranks a.name:hover { color: var(--amber); }
.ranks.people li { grid-template-columns: 28px 1fr auto auto; grid-template-areas: "rank name metric heart"; }
.ranks.people .heart { grid-area: heart; }
.ranks.people .name em { display: inline-block; }
.board-note { margin: 14px 0 0; }
.show-more { margin: 12px 0 0; text-align: center; }
.show-more .more-link { color: var(--amber); font-size: 13.5px; }
.show-more .more-link:hover { color: var(--cream); }
.level-note { margin: -4px 0 8px; font-style: italic; font-family: var(--serif); }

/* ── /me ─────────────────────────────────────────────────────────────────── */
.me-block { margin: 26px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
.me-h { font: 400 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cream-faint); margin: 0 0 14px; }
.me-h small { font: italic 400 12px var(--serif); letter-spacing: 0; text-transform: none; margin-left: 8px; }
.me .scorecard { margin-top: 4px; }
.me .sorts { justify-content: flex-start; margin: 0 0 8px; }
.me .actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; font-size: 13.5px; }
.me .actions .link { color: var(--amber); font-size: 13.5px; }
.profile { display: flex; flex-direction: column; gap: 14px; }
.profile > label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.profile > label small { color: var(--cream-faint); }
.profile input[type=text], .profile input:not([type]) { padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--cream); font: inherit; }
.profile input:focus { outline: 0; border-color: var(--amber); }
.profile .toggle { flex-direction: row; align-items: flex-start; gap: 10px; color: var(--cream-dim); line-height: 1.45; }
.profile .toggle input { width: 16px; height: 16px; accent-color: var(--amber); margin-top: 3px; flex: none; }
.profile .toggle b { color: var(--cream); font-weight: 600; }
.profile .post { margin-top: 4px; }
.map-note { position: fixed; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); z-index: 5; margin: 0;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--amber); background: color-mix(in srgb, var(--deep) 80%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 12.5px; color: var(--cream-dim); white-space: nowrap; }
.map-note b { color: var(--amber); font-weight: 600; }
.map-note a { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }

/* ── the two handles, each with its mark ─────────────────────────────────── */
.handle { display: inline-flex; align-items: center; gap: 4px; }
.handle svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.by .handle + .handle { margin-left: 2px; }
.persona-name .by { justify-content: center; font-size: 13px; }
.ranks.people .name .by { display: inline-flex; margin-left: 6px; font-size: 11.5px; vertical-align: baseline; }

/* ── the score, explained on the People board ────────────────────────────── */
.score-explain { margin: 4px 0 22px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.score-explain .formula { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 10px; margin: 0 0 12px; font: 400 22px/1.2 var(--serif); color: var(--cream); }
.score-explain .formula i { font-style: normal; color: var(--cream-faint); }
.score-explain .formula .vc { color: var(--amber); }
.score-explain dl { display: grid; gap: 8px; margin: 0; }
.score-explain dl div { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: baseline; }
.score-explain dt { font: 500 10.5px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.score-explain dd { margin: 0; font-size: 13.5px; color: var(--cream-dim); line-height: 1.5; }
.score-explain dd b { color: var(--cream); font-weight: 600; }
.metric .boost { font-style: normal; color: var(--amber); font-weight: 600; }
@media (max-width: 480px) { .score-explain dl div { grid-template-columns: 1fr; gap: 2px; } }
.hearts-total { display: block; margin-top: 4px; }
.hearts-label { font: 500 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-faint); margin: 0 4px 0 -4px; }

/* the address of your page: the whole thing, selectable, one click to copy */
.share-url { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin: -4px 0 4px 26px; }
.share-url input { min-width: 0; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--deep); color: var(--amber);
  font: 500 13px/1.3 ui-monospace, Menlo, monospace; letter-spacing: .01em; }
.share-url input:focus { outline: 0; border-color: var(--amber); }
.share-url .copy { padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); color: var(--cream-dim); font-size: 13px; }
.share-url .copy:hover { border-color: var(--amber); color: var(--amber); }
.share-url .copy.done { border-color: var(--amber); color: var(--amber); }
.share-url small { grid-column: 1 / -1; font-size: 12px; color: var(--cream-faint); }
.share-url small b { color: var(--cream); font-weight: 600; }

/* the two countdowns under the score */
.sc-timers { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 12px 0 0; font-size: 12px; color: var(--cream-faint); }
.sc-timers b { color: var(--cream); font-weight: 600; font-variant-numeric: tabular-nums; }


.form-err { margin: -4px 0 14px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--wine-bright); background: color-mix(in srgb, var(--wine) 30%, transparent); color: var(--cream); font-size: 13.5px; }
.profile .toggle input:disabled { opacity: .45; cursor: not-allowed; }
.profile .toggle input:disabled + span { color: var(--cream-faint); }
.me .filters { margin: 0 0 14px; }

.consent.optional { color: var(--cream-faint); }
.consent.optional small { color: var(--amber); margin-left: 4px; }
.profile .given { font-style: normal; color: var(--amber); font-size: 12px; margin-left: 6px; }

/* The panel's legal pages: what this release ships, when it differs from what is stored. */
.drift { border: 1px solid var(--amber); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 18px; }
.drift summary { cursor: pointer; color: var(--amber); }
.drift .link { margin-top: 8px; }
.drift-tag { color: var(--amber); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.diff { max-height: 320px; overflow: auto; margin: 10px 0 0; padding: 10px 12px; border-radius: 8px;
        background: rgba(0, 0, 0, .18); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.hist-title { margin: 22px 0 10px; font-size: 15px; font-weight: 500; color: var(--cream); } .hist-title small { font-weight: 400; margin-left: 6px; }

/* TechSpecs: the question a number answers, small above it */
.kpi-q { color: var(--cream-dim); font-size: 12px; opacity: .8; }
.explain-more { margin-top: 24px; }
.explain-more summary { cursor: pointer; color: var(--cream-dim); }
.table.config th { text-align: left; padding-top: 14px; color: var(--cream); font-weight: 500; }
.table.config td { vertical-align: top; }
.ts-status { margin: 4px 0 18px; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border-left: 3px solid var(--amber); display: flex; flex-direction: column; gap: 4px; }
.ts-status b { color: var(--cream); font-weight: 500; }
.ts-status.warn { border-left-color: var(--wine-bright); }
.ts-status.warn b { color: var(--wine-bright); }

/* ── how it works ─────────────────────────────────────────────────────────── */
.ritual-more { text-align: center; margin: 8px 0 0; }
.ritual-more a { color: var(--amber); text-decoration: none; font-weight: 600; }

/* a card like the one tucked to a bottle you bring friends: centred, in the story's serif, short lines */
.how { max-width: 560px; margin: 0 auto; padding: 48px var(--gutter) 88px; }
.how-card { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 40px 26px 34px; box-shadow: 0 24px 60px -34px rgba(0, 0, 0, .9);
  outline: 1px dashed color-mix(in srgb, var(--amber) 35%, transparent); outline-offset: -10px; }
.how-mark { width: 54px; margin: 0 auto 12px; color: var(--amber); opacity: .85; }
.how-mark .glyph { width: 100%; height: auto; }
.how-mark .wine, .how-mark .foam { fill: currentColor; stroke: none; opacity: .9; }
.how-title { font: italic 400 30px/1.2 var(--serif); margin: 0 0 6px; color: var(--cream); }
.how .prose { font: 400 17.5px/1.75 var(--serif); }
.how .prose p { color: var(--cream-dim); margin: 0 0 14px; }
.how .prose p:first-child { font-style: italic; color: var(--cream-faint); }
.how .prose h2 { font: 600 12.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--amber);
  margin: 34px 0 12px; }
.how .prose h2::before { content: "·  "; color: var(--line); }
.how .prose h2::after { content: "  ·"; color: var(--line); }
.how .prose strong { color: var(--cream); font-weight: 500; }
.how .prose a { color: var(--amber); }
.how .prose .how-sign { font-style: italic; color: var(--cream); margin: 30px 0 0; }
.how .cta { margin-top: 36px; }

/* the hero globe's map credit (ODbL: the notice goes where the map is shown) — small, along the rim below */
.globe-credit { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); overflow: visible; pointer-events: none; }
.globe-credit text { fill: var(--cream-faint, #a6947e); opacity: .55; letter-spacing: .06em; }
.globe-credit a { pointer-events: auto; }
.globe-credit a:hover text { opacity: 1; }

/* the camera screen's location pill wraps on a narrow phone instead of running off both edges */
.locask { max-width: calc(100% - 32px); white-space: normal; text-align: center; }
/* the post button stays bright while it uploads and when it says "kept" (it is disabled then, not unavailable) */
.journey .post.sending, .journey .post.kept { opacity: 1; }
.loc { cursor: pointer; }

/* the confirm page shows what the click would put online */
.confirm-peek { margin: 0 0 18px; }
.confirm-peek img { display: block; max-width: 100%; max-height: 50vh; border-radius: var(--radius); }
.confirm-peek figcaption { margin-top: 8px; font-size: 13px; color: var(--cream-dim); }

/* a terms clause opened by a link (/terms#clause-8): clear of the sticky header, and lit for a moment */
li[id^="clause-"] { scroll-margin-top: 84px; }
li[id^="clause-"]:target { animation: clause-lit 2.4s ease-out; border-radius: 6px; }
@keyframes clause-lit { 0%, 40% { background: rgba(236, 160, 84, .14); } 100% { background: transparent; } }
