/* Cocktail bar at night: near-black wine, burgundy, brass gold, cream.
   (Token names kept from v1; "rose-*" are now the burgundy accent scale.) */
:root {
  --wine-900: #120709;
  --wine-800: #1d0b10;
  --wine-700: #2c1118;
  --wine-600: #45182a;
  --rose-500: #8c1d33;   /* primary: burgundy */
  --rose-400: #b8455a;   /* lighter wine for accents/outlines */
  --rose-200: #e9d3a8;   /* champagne: highlights */
  --blush: #f6ecdc;      /* cream cards */
  --gold: #d4a857;
  --ink: #1d0b10;
  --text: #f3e9e0;
  --muted: #bca59c;
  --line: rgba(233, 211, 168, 0.16);
  --radius: 16px;
  --display: 'Playfair Display', Georgia, serif;
  --body: 'DM Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--body);
  color: var(--text);
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(140, 29, 51, 0.35), transparent 60%),
    radial-gradient(90% 50% at 100% 110%, rgba(212, 168, 87, 0.08), transparent 60%),
    linear-gradient(180deg, var(--wine-800), var(--wine-900));
  background-attachment: fixed;
  line-height: 1.45;
}
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.12; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 8vw, 3rem); }
h2 { font-size: clamp(1.6rem, 6.5vw, 2.2rem); }
h3 { font-size: 1.2rem; }
em { color: var(--rose-400); font-style: italic; }
button { font: inherit; }

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

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: .7em 1.3em;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s, background .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.primary {
  background: linear-gradient(135deg, #a3263e, #6a1426);
  border-color: rgba(212, 168, 87, .45);
  color: #fff7ea;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn.danger { background: var(--blush); color: var(--rose-500); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.big { font-size: 1.15rem; padding: .9em 2em; }

/* ------------------------------------------------ guest layout */

.stage { max-width: 560px; margin: 0 auto; padding: 28px 16px 64px; }
.screen { animation: rise .5s ease both; text-align: center; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.kicker {
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 .6em; font-weight: 700;
}
.lede { color: var(--muted); font-size: 1.05rem; margin: 0 auto 1.4em; max-width: 30em; }
.hero { min-height: 80dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.emoji-row { font-size: 2.2rem; letter-spacing: .3em; margin-bottom: .8em; animation: bob 3s ease-in-out infinite; }
.emoji-big { font-size: 4rem; }
@keyframes bob { 50% { transform: translateY(-6px); } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #fff; color: var(--ink); padding: .7em 1.2em; border-radius: 12px;
  font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.4); z-index: 50; max-width: calc(100% - 32px);
}

/* ------------------------------------------------ wheel */

.wheel-wrap { position: relative; width: min(78vw, 320px); aspect-ratio: 1; margin: 8px auto 20px; }
.wheel { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 6px var(--gold), 0 16px 50px rgba(0,0,0,.5); }
.wheel text { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 21px; letter-spacing: .02em; fill: var(--blush); }
.pointer {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent;
  border-top: 28px solid var(--gold); filter: drop-shadow(0 3px 4px rgba(0,0,0,.5));
}
.hub {
  position: absolute; inset: 50% auto auto 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--wine-800); border: 4px solid var(--gold);
  display: grid; place-items: center; font-size: 1.6rem;
}
.result { min-height: 1.6em; font-size: 1.2rem; margin: 0 0 1.2em; }
.result strong { font-family: var(--display); font-size: 1.8rem; color: var(--rose-200); }

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

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 24px; perspective: 900px; }
/* A card is two faces stacked in one grid cell (so it's as tall as its taller face) that flip in 3D. */
.card {
  position: relative; perspective: 900px; border-radius: 14px;
  animation: deal .6s cubic-bezier(.2,.8,.3,1.2) both;
  transition: transform .2s, outline-color .2s;
  outline: 3px solid transparent; outline-offset: 2px;
}
.card-inner { display: grid; height: 100%; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3,.7,.2,1); }
.card.flipped .card-inner { transform: rotateY(180deg); }
.face {
  grid-area: 1 / 1; min-height: 104px; border-radius: 14px; padding: 14px 14px 16px;
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}
.face.front {
  appearance: none; border: 0; font: inherit; cursor: pointer; position: relative;
  background: var(--blush); color: var(--ink); -webkit-tap-highlight-color: transparent;
}
.face.back {
  transform: rotateY(180deg); cursor: pointer;
  background: linear-gradient(160deg, var(--wine-700), var(--wine-800)); color: var(--text);
  border: 1px solid rgba(212, 168, 87, .45); font-size: .82rem; line-height: 1.35;
}
.back-notes { margin: 0; flex: 1; }
.back-hood { margin: 0; color: var(--gold); font-size: .74rem; font-weight: 700; letter-spacing: .04em; }
.back-links { margin: 0; font-size: .76rem; }
.back-links a { color: var(--rose-200); }
.back-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; }
.veto-this {
  appearance: none; font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer;
  background: var(--blush); color: var(--rose-500); border: 0; border-radius: 999px; padding: .35em .8em;
}
.cards.locked .veto-this, .cards.replay .veto-this { visibility: hidden; }
.flip-back, .flip-hint { color: inherit; opacity: .5; font-size: .95rem; line-height: 1; }
.flip-back { appearance: none; background: none; border: 0; cursor: pointer; padding: 4px; margin-left: auto; }
.flip-hint { position: absolute; right: 10px; bottom: 8px; color: var(--rose-500); }
.flip-tip { color: var(--gold); font-size: .85rem; margin: -.2em 0 0; animation: twinkle 2.6s ease-in-out infinite; }
.card-suit { font-size: 1.1rem; }
.card-name { font-family: var(--display); font-weight: 800; font-size: 1.15rem; line-height: 1.15; }
.card-suit { color: var(--rose-500); }
.card-hood { font-size: .8rem; color: #7a5a4a; }
.card.selected { outline-color: var(--rose-400); transform: translateY(-4px) rotate(-1.5deg); }
.card.selected::after {
  content: '✕'; position: absolute; top: 8px; right: 10px; color: var(--rose-500); font-weight: 800; z-index: 1;
}
.card.selected.flipped::after { display: none; }
.card.ejected { animation: eject .55s ease-in forwards; }
.card.replacement { animation: deal .7s cubic-bezier(.2,.8,.3,1.2) both; outline-color: var(--gold); }
@keyframes deal {
  from { opacity: 0; transform: translateY(-40px) rotateY(180deg) scale(.8); }
  60% { opacity: 1; }
}
@keyframes eject { to { opacity: 0; transform: translate(60px, -30px) rotate(25deg) scale(.7); } }

.veto-panel { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
.veto-panel .lede { margin-bottom: 1em; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------------------------ bracket */

.round { margin: 28px 0 0; text-align: left; }
.round h3 { color: var(--rose-200); display: flex; align-items: center; gap: .5em; }
.round h3::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.match {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; margin-bottom: 12px;
}
.opt {
  border-radius: 12px; padding: 12px 10px; background: rgba(255,255,255,.07);
  font-weight: 700; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 58px; transition: background .08s, color .08s, opacity .4s, transform .08s;
}
.opt .tbd { color: var(--muted); font-weight: 500; font-style: italic; }
.opt.lit { background: var(--rose-200); color: var(--ink); transform: scale(1.03); }
.opt.lit .tbd { color: var(--ink); }
.opt.win { background: var(--rose-500); color: #fff7ea; box-shadow: 0 0 0 2px var(--gold), 0 6px 20px rgba(0,0,0,.45); }
.opt.lose { opacity: .28; text-decoration: line-through; }
.vs { align-self: center; font-family: var(--display); font-style: italic; color: var(--gold); }
.match .flip { grid-column: 1 / -1; justify-self: center; margin-top: 4px; }
.match.done .flip { display: none; }

/* ------------------------------------------------ slot machine */

.slot-section { margin-top: 32px; animation: rise .6s ease both; }
.slot {
  margin: 16px auto 14px; max-width: 360px; padding: 14px; border-radius: 22px;
  background: linear-gradient(180deg, var(--gold), #b98a3a);
  box-shadow: 0 16px 40px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.5);
}
.slot-window {
  --slot-h: 72px;
  height: var(--slot-h); overflow: hidden; border-radius: 12px; background: var(--blush);
  box-shadow: inset 0 10px 14px -8px rgba(0,0,0,.45), inset 0 -10px 14px -8px rgba(0,0,0,.45);
}
.reel-item {
  height: var(--slot-h); display: grid; place-items: center; padding: 0 12px;
  font-family: var(--display); font-weight: 800; font-size: 1.35rem; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reel.blur { filter: blur(1.5px); }
.slot.landed { animation: jackpot .9s ease 2; }
@keyframes jackpot { 50% { box-shadow: 0 0 0 6px var(--rose-500), 0 0 60px rgba(212, 168, 87, .7); } }
.finalists { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: .35em .9em; font-size: .9rem; }

/* ------------------------------------------------ winner */

.winner { min-height: 82dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.trophy { font-size: 5.5rem; line-height: 1; }
.winner .rose { font-size: 2.4rem; margin: -.4em 0 .4em; }
.winner.fresh .trophy { animation: pop .8s cubic-bezier(.2,.9,.3,1.4) both; }
.winner.fresh .winner-name { animation: rise .8s .35s ease both; }
@keyframes pop { from { transform: scale(0) rotate(-20deg); } }
.winner-name {
  font-size: clamp(2.4rem, 11vw, 3.6rem);
  background: linear-gradient(135deg, #fff7ea, var(--rose-200) 55%, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hood { color: var(--gold); letter-spacing: .15em; text-transform: uppercase; font-size: .85rem; margin: 0 0 1.2em; }
.when {
  font-family: var(--display); font-style: italic; font-size: 1.25rem; color: var(--blush);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .5em 1.2em; margin: 0 0 1.2em;
}
.date-line { color: var(--gold); font-size: .95rem; margin: -.6em 0 1.4em; }
.petal { position: fixed; top: -40px; pointer-events: none; z-index: 40; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); opacity: .2; } }

.winner-links { margin-bottom: 12px; }
.share-row { margin-bottom: 8px; }
.again { margin: 14px 0 0; }
a.btn { text-decoration: none; display: inline-block; }
.btn.pressed { transform: scale(.94); box-shadow: 0 0 0 3px rgba(212, 168, 87, .5); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------ Night Out KC: sign */

.kc-hero { min-height: 86dvh; justify-content: flex-start; padding-top: 2vh; }
.kc-sign-wrap { width: min(100%, 520px, calc(100vw - 32px)); margin: 0 auto 8px; }
.tagline { font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 7vw, 2.2rem); line-height: 1.1; color: var(--blush); margin: 0 0 .35em; }
.tagline-sub { font-size: .92rem; margin-bottom: 1.1em; max-width: 26em; }

/* Landing: exactly one screen tall (dvh tracks iOS browser chrome), nothing scrolls,
   "Suggest a spot" pinned to the bottom. The sign gives up height first: it's capped
   so the text, button and footer (about 300px) always fit below it. */
body.landing { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.landing .stage { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 0; }
body.landing .screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.landing .kc-hero { flex: 1; min-height: 0; justify-content: center; padding: 0; }
body.landing .kc-sign-wrap { width: min(100%, 520px, calc((100dvh - 300px) * 4 / 3)); margin-bottom: 4px; }
body.landing .site-foot { padding: 6px 16px calc(10px + env(safe-area-inset-bottom)); }
.kc-sign { display: block; width: 100%; height: auto; overflow: visible; }
.kc-bldg-far { fill: #3a1520; }
.kc-bldg { fill: #160609; }
.kc-roof { fill: #0e0407; }
.kc-roof-edge { fill: #2a0f16; }
.kc-roof-box { fill: #1a0a0e; }
.kc-dusk { opacity: .35; animation: dusk 9s ease-in-out infinite alternate; transform-origin: 200px 300px; }
@keyframes dusk { to { opacity: .55; transform: scale(1.08, 1.15); } }
.kc-star { fill: #f6ecdc; opacity: .2; animation: twinkle 4.5s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .85; } }
.kc-win { fill: #e9c87a; opacity: .55; }
.kc-win.tw { animation: window 9s steps(1) infinite; }
@keyframes window { 0% { opacity: .55; } 40% { opacity: .08; } 70% { opacity: .55; } }
.kc-crown { fill: #e9a24a; opacity: .75; animation: crown 6s ease-in-out infinite alternate; }
@keyframes crown { to { fill: #ff6b5a; opacity: .9; } }
.kc-beacon { fill: #ffb36b; opacity: .55; filter: blur(1.5px); animation: twinkle 5s ease-in-out infinite; }
.kc-steel { fill: none; stroke: #5a3a40; stroke-width: 1.6; stroke-linecap: round; }
.kc-panel { fill: #24090f; stroke: var(--gold); stroke-width: 3; }
.kc-inner { fill: none; stroke: rgba(246, 236, 220, .18); stroke-width: 1; }
.kc-track { fill: none; stroke: none; }

.kc-bulb { fill: #5a4430; }
.kc-sign.lit .kc-bulb { animation: bulb-on .2s var(--on) forwards; }
.kc-sign.chase .kc-bulb { animation: chase 1.2s calc(var(--k) * -.4s) infinite; }
@keyframes bulb-on { to { fill: #ffe9b0; } }
@keyframes chase { 0%, 33% { fill: #ffe9b0; } 34%, 100% { fill: #6e5236; } }

.kc-neon { opacity: .12; }
.kc-neon-red { fill: #ffecef; stroke: #ff3550; stroke-width: 1.1; filter: url(#kcGlowRed); }
.kc-neon-gold { fill: #fff3d6; stroke: #ffb547; stroke-width: .8; filter: url(#kcGlowGold); }
.kc-arrow { fill: none; stroke: #ffc766; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: url(#kcGlowGold); }
.kc-sign.lit .kc-neon { animation: neon-on 1.1s var(--neon-on) forwards, buzz 11s calc(var(--neon-on) + 3s) infinite; }
@keyframes neon-on {
  0% { opacity: .12; } 12% { opacity: 1; } 18% { opacity: .2; } 30% { opacity: 1; } 36% { opacity: .35; } 52%, 100% { opacity: 1; }
}
@keyframes buzz { 0%, 93%, 96%, 100% { opacity: 1; } 94% { opacity: .35; } 95% { opacity: .9; } 97% { opacity: .6; } }

/* ------------------------------------------------ Night Out KC: vibe + neighborhood */

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 20px; }
.choice {
  appearance: none; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text);
  border-radius: var(--radius); padding: 18px 12px; min-height: 96px; cursor: pointer; font-weight: 700; font-size: 1.05rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  transition: transform .12s, background .2s, border-color .2s; -webkit-tap-highlight-color: transparent;
}
.choice:last-child:nth-child(odd) { grid-column: 1 / -1; }
.choice-icon { font-size: 1.8rem; line-height: 1; }
.choice small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.choice:active:not(:disabled) { transform: scale(.97); }
.choice.selected { background: var(--rose-500); border-color: var(--gold); color: #fff7ea; }
.choice:disabled { opacity: .4; cursor: default; }
.subs { animation: rise .4s ease both; margin-bottom: 8px; }
.subs h3 { color: var(--rose-200); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 18px; }
.chip-btn {
  appearance: none; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text);
  border-radius: 999px; padding: .55em 1em; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.chip-btn small { color: var(--muted); font-weight: 500; margin-left: .2em; }
.chip-btn.ghost { background: transparent; border-style: dashed; }
.chip-btn.selected, .chip-btn[aria-pressed=true] { background: var(--gold); color: var(--ink); border-color: transparent; }
.chip-btn.selected small, .chip-btn[aria-pressed=true] small { color: var(--wine-700); }
.chip-btn:disabled { opacity: .35; cursor: default; text-decoration: line-through; }
.pool { color: var(--muted); min-height: 1.5em; margin: 0 0 16px; }
.pool strong { color: var(--rose-200); font-family: var(--display); font-size: 1.3rem; }
.pool.short strong { color: #ff8fa8; }

.replay-badge {
  position: fixed; top: 12px; left: 12px; z-index: 30; pointer-events: none;
  background: rgba(18, 7, 9, .82); border: 1px solid rgba(212, 168, 87, .5); color: var(--gold);
  font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  padding: .35em .8em; border-radius: 999px; animation: twinkle 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .kc-sign .kc-bulb { animation: none !important; fill: #ffe9b0; }
  .kc-sign .kc-neon { animation: none !important; opacity: 1; }
}

/* ------------------------------------------------ Night Out KC: sharing, reports, suggestions */

.back-step {
  appearance: none; background: none; border: 0; font: inherit; font-weight: 700; font-size: .9rem; color: var(--muted);
  cursor: pointer; padding: 4px 2px; display: block; margin: 0 0 6px; text-align: left;
}
.back-step:hover { color: var(--rose-200); }
.recap { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 6px; margin: 0 0 12px; }
.recap-dot { color: var(--gold); }
.recap-chip {
  appearance: none; font: inherit; font-size: .88rem; font-weight: 700; color: var(--rose-200);
  background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 999px; padding: .3em .8em; cursor: pointer;
}
.recap-chip:not(:disabled):hover { border-color: var(--gold); }
.recap-chip:disabled { background: none; border-color: transparent; padding-inline: .2em; cursor: default; opacity: 1; color: var(--muted); }
/* Veto mode: taps select, so the cards say so. */
.cards.veto-mode .face.front { box-shadow: 0 0 0 2px rgba(255, 143, 168, .55), 0 8px 20px rgba(0,0,0,.35); }
.cards.veto-mode .flip-hint { visibility: hidden; }
input::placeholder { color: var(--muted); opacity: .55; }
.outing-field { display: block; max-width: 320px; margin: 4px auto 6px; text-align: left; }
.outing-field span { display: block; font-size: .8rem; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.outing-field small { font-weight: 500; opacity: .75; }
.outing { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 1.25rem; color: var(--rose-200); margin: -.2em 0 .5em; }

.card-slot { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-slot > .card { flex: 1; }
.card-slot.ejected { animation: eject .55s ease-in forwards; }
.report {
  appearance: none; background: none; border: 0; padding: 2px 4px; font: inherit; font-size: .72rem;
  color: var(--muted); opacity: .75; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; align-self: center;
}
.report[data-armed] { color: #ff8fa8; opacity: 1; }
.report.done { text-decoration: none; cursor: default; }
.report-row { margin: 10px 0 0; }

.result-page { padding-top: 4vh; }
.result-top { padding-bottom: 8px; }
.result-top .rose { font-size: 3rem; margin: 0 0 .1em; }
.result-top .winner-name { font-size: clamp(2.2rem, 10vw, 3.2rem); }
.result-top .hood { margin-bottom: .6em; }
.result-top .date-line { color: var(--muted); }
.replay-box { margin: 28px 0 0; padding: 18px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.03); scroll-margin-top: 12px; }
.replay-box h2 { font-size: 1.4rem; }
.replay-stage { scroll-margin-top: 12px; }
.replay-stage .screen { animation-duration: .35s; }
.replay-stage .winner { min-height: 0; padding: 20px 0 6px; }
.replay-stage .winner .trophy { font-size: 3.5rem; }
.plan-own { margin: 28px 0 8px; }

.site-foot { text-align: center; padding: 0 16px 28px; }
.linkish { appearance: none; background: none; border: 0; font: inherit; font-size: .85rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--rose-200); }
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(10, 3, 5, .72); display: grid; place-items: end center; padding: 16px; animation: rise .25s ease both; }
.sheet { width: min(100%, 440px); background: var(--wine-800); border: 1px solid var(--line); border-radius: 20px; padding: 20px 18px 16px; text-align: left; box-shadow: 0 20px 60px rgba(0,0,0,.6); margin-bottom: max(0px, env(safe-area-inset-bottom)); }
.sheet h2 { font-size: 1.5rem; }
.sheet .lede { margin: 0 0 1em; font-size: .95rem; }
.sheet .actions { justify-content: flex-end; }
@media (min-width: 600px) { .sheet-backdrop { place-items: center; } }

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

body.admin { background: var(--wine-900); }
.admin-wrap { max-width: 820px; margin: 0 auto; padding: 20px 16px 60px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-top h1 { font-size: 1.6rem; margin: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a {
  color: var(--muted); text-decoration: none; padding: .45em .9em; border-radius: 999px; font-weight: 700; font-size: .92rem;
}
.tabs a.active { background: var(--rose-500); color: #fff; }
.panel { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
input[type=text], input[type=password], input[type=datetime-local] {
  color-scheme: dark;
  width: 100%; font: inherit; color: var(--text); background: rgba(0,0,0,.25);
  border: 1px solid var(--line); border-radius: 10px; padding: .6em .8em;
}
input:focus { outline: 2px solid var(--rose-400); outline-offset: 1px; }
.row-form { display: grid; grid-template-columns: 3.2rem 2fr 1.3fr auto; gap: 8px; }
.list { list-style: none; margin: 0; padding: 0; }
.vrow { display: grid; grid-template-columns: 3.2rem 2fr 1.3fr auto; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); align-items: center; }
input.emoji-in { text-align: center; font-size: 1.35rem; padding: .3em 0; }
input.emoji-in::placeholder { opacity: .35; }
.quick { grid-column: 1 / -1; display: none; gap: 4px; flex-wrap: wrap; }
.row-form .quick, .vrow:focus-within .quick { display: flex; }
.quick button {
  font-size: 1.25rem; line-height: 1; padding: .35em .4em; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
}
.quick button:hover { background: rgba(255,255,255,.12); }
.vrow.inactive input { opacity: .45; text-decoration: line-through; }
.saved { color: var(--gold); font-size: .8rem; }
.pick { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.pick .name { flex: 1; min-width: 0; }
.pick .name small { display: block; color: var(--muted); }
.toggle { padding: .4em .8em; font-size: .85rem; }
.toggle[aria-pressed=true].pin { background: var(--gold); color: var(--ink); border-color: transparent; }
.toggle[aria-pressed=true].ex { background: var(--blush); color: var(--rose-500); border-color: transparent; }
.pick.excluded .name { opacity: .45; text-decoration: line-through; }
.counter { display: flex; gap: 14px; flex-wrap: wrap; font-weight: 700; margin: 4px 0 8px; }
.counter .bad { color: #ff8fa8; }
.counter .good { color: #9fe0b5; }
.linkbox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* The link takes its own line before squeezing; long ones end in an ellipsis instead of wrapping a character per line. */
.linkbox code { flex: 1 1 14rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(0,0,0,.3); padding: .6em .8em; border-radius: 10px; font-size: .95rem; }
.linkbox .link-label { flex: 1 1 8rem; font-weight: 700; }
.srow {
  display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px;
  border-radius: 12px; cursor: pointer; text-decoration: none; color: inherit; border: 1px solid var(--line); margin-bottom: 8px;
}
.srow:hover { background: rgba(255,255,255,.05); }
.srow .meta { font-size: .85rem; color: var(--muted); }
.badge { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: .3em .7em; border-radius: 999px; white-space: nowrap; }
.badge.created { background: rgba(255,255,255,.12); color: var(--muted); }
.badge.opened { background: var(--gold); color: var(--ink); }
.badge.completed { background: var(--rose-500); color: #fff; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.facts div { background: rgba(0,0,0,.2); border-radius: 10px; padding: 8px 10px; }
.facts b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.ev { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 0; }
.ev .icon { font-size: 1.3rem; text-align: center; }
.ev .when { font-size: .8rem; color: var(--muted); }
.ev .what { font-weight: 600; }
.ev .what s { opacity: .6; }
.gap { margin-left: 16px; padding: 4px 0 4px 26px; border-left: 2px dashed var(--line); font-size: .82rem; color: var(--muted); }
.gap.long { color: var(--gold); font-weight: 700; }
.back { color: var(--muted); text-decoration: none; font-weight: 700; display: inline-block; margin-bottom: 10px; }
.err { color: #ff8fa8; font-weight: 700; }
@media (max-width: 520px) {
  .row-form, .vrow { grid-template-columns: 3.2rem 1fr 1fr; }
  .row-form > button, .vrow > .btn { grid-column: 1 / -1; }
}

/* ------------------------------------------------ admin: venue library */

.filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.filters input[type=search] { grid-column: 1 / -1; }
select, input[type=search], input[type=url], input[type=tel], textarea {
  color-scheme: dark;
  width: 100%; font: inherit; color: var(--text); background: rgba(0,0,0,.25);
  border: 1px solid var(--line); border-radius: 10px; padding: .55em .7em;
}
textarea { resize: vertical; }
select:focus, textarea:focus { outline: 2px solid var(--rose-400); outline-offset: 1px; }
.vline { border-top: 1px solid var(--line); }
.vline-main {
  appearance: none; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: left;
  width: 100%; display: grid; grid-template-columns: 2rem 1fr auto; gap: 10px; align-items: center; padding: 10px 4px;
}
.vline-main:hover, .vline-main[aria-expanded=true] { background: rgba(255,255,255,.04); }
.vl-emoji { font-size: 1.3rem; text-align: center; }
.vl-name { font-weight: 700; min-width: 0; }
.vl-name small { display: block; font-weight: 400; color: var(--muted); }
.vline.inactive .vl-name { opacity: .5; text-decoration: line-through; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tag { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .25em .6em; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted); white-space: nowrap; }
.tag.pub { background: rgba(185, 138, 58, .22); color: var(--rose-200); }
.tag.warn { background: rgba(255, 143, 168, .16); color: #ff8fa8; }
.tag.off { background: transparent; border: 1px solid var(--line); }
.veditor { list-style: none; padding: 4px 0 14px; }
.veditor.new { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0 4px; }
.vform { display: grid; gap: 10px; }
.vform .field { margin: 0; }
.vform-row { display: grid; grid-template-columns: 3.2rem 2fr 1.3fr; gap: 8px; }
.vform-row .quick { display: flex; }
.vform-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.with-btn { display: flex !important; gap: 6px; text-transform: none !important; letter-spacing: 0 !important; margin: 0 !important; }
.checks { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; border: 0; padding: 0; margin: 0; }
.checks legend { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 0; margin-bottom: 6px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.checks select { width: auto; }
.checks input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--rose-500); }
.hint { margin: -4px 0 0; }

/* ------------------------------------------------ admin: dashboard */

.segs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg { appearance: none; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: .85rem; padding: .35em .9em; border-radius: 999px; cursor: pointer; }
.seg.on { background: var(--rose-500); color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tile { background: rgba(0,0,0,.22); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.tile-label { font-size: .78rem; color: var(--muted); font-weight: 700; }
.tile-value { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-tile .tile-value { font-size: 3rem; line-height: 1.05; }
.tile-sub { font-size: .8rem; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: .85rem; color: var(--muted); margin: 0 0 6px; }
.legend i, .tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; }
.chart .gridline { stroke: rgba(233, 211, 168, .08); stroke-width: 1; }
.chart .baseline { stroke: rgba(233, 211, 168, .3); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--body); }
.chart .hit { fill: transparent; }
.chart .hit.on { fill: rgba(255,255,255,.05); }
.chart-empty { position: absolute; inset: 40% 0 auto; text-align: center; color: var(--muted); margin: 0; }
.tip {
  position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; z-index: 5;
  background: #fff7ea; color: var(--ink); border-radius: 10px; padding: 6px 10px; font-size: .8rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 2px; white-space: nowrap;
}
.table-view { margin-top: 10px; font-size: .85rem; }
.table-view summary { cursor: pointer; color: var(--muted); font-weight: 700; }
.table-view table { border-collapse: collapse; margin-top: 8px; width: 100%; max-width: 360px; }
.table-view th, .table-view td { text-align: left; padding: 3px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 16px; }
.hbar { display: grid; grid-template-columns: minmax(0, 11rem) 1fr; gap: 10px; align-items: center; padding: 4px 2px; border-radius: 6px; }
.hbar:hover { background: rgba(255,255,255,.04); }
.hb-label { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hb-fill { height: 14px; min-width: 2px; background: #c4475f; border-radius: 0 4px 4px 0; }
.hb-val { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input[type=search] { grid-column: 1 / -1; }
  .vform-row { grid-template-columns: 3.2rem 1fr; }
  .vform-row [name=neighborhood] { grid-column: 1 / -1; }
  .vform-2 { grid-template-columns: 1fr; }
  .vline-main { grid-template-columns: 2rem 1fr; }
  .vline-main .tags { grid-column: 2; justify-content: flex-start; }
}
[hidden] { display: none !important; }

/* admin: review queue */
.tabs .count { display: inline-block; min-width: 1.4em; padding: 0 .4em; margin-left: 4px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: .72rem; text-align: center; }
.qrow { display: grid; grid-template-columns: 2rem 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.qrow .q-emoji { font-size: 1.3rem; text-align: center; }
.qrow .q-main small { display: block; color: var(--muted); }
.qrow .q-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .qrow { grid-template-columns: 2rem 1fr; } .qrow .q-actions { grid-column: 2; justify-content: flex-start; } }
