:root {
  --navy: #0a1f44;
  --navy-2: #0e2a5c;
  --red: #d7263d;
  --red-2: #c1121f;
  --gold: #ffd23f;
  --cream: #f7f5ef;
  --ink: #10233f;
  --muted: #6b7a90;
  --card: #ffffff;
  --line: #e6e9f0;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabh: calc(58px + var(--safe-b));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 620px at 12% -12%, rgba(210,31,60,.34), transparent 60%),
    radial-gradient(1000px 720px at 112% 118%, rgba(246,196,69,.24), transparent 55%),
    #06122c;
  overflow: hidden;
  overscroll-behavior: none;
}
body::before {                     /* faint fireworks/star field, seen behind the app on desktop */
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.30) 1px, transparent 1.5px);
  background-size: 46px 46px; opacity: .5;
}

/* The app is a phone-width column; on desktop it floats on the night-sky backdrop. */
.app {
  position: fixed; top: 0; bottom: 0; left: 0; right: 0;
  max-width: 500px; margin: 0 auto; overflow: hidden;
  background: var(--cream); z-index: 1;
}
@media (min-width: 560px) {
  .app {
    top: 22px; bottom: 22px; border-radius: 28px;
    box-shadow: 0 30px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06);
  }
}

/* Sponsor billboard in the backdrop (only where there's room beside the column). */
.backdrop-brand { display: none; }
@media (min-width: 900px) {
  .backdrop-brand {
    display: flex; align-items: center; gap: 12px; text-decoration: none;
    position: fixed; z-index: 0; left: 40px; top: 50%; transform: translateY(-50%);
    max-width: min(30vw, 300px);
  }
  .bb-spark { font-size: 40px; }
  .bb-lines { display: flex; flex-direction: column; line-height: 1.2; }
  .bb-lines b { color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
  .bb-lines em { color: var(--gold); font-style: normal; font-weight: 700; font-size: 14px; margin-top: 4px; }
}
button { font-family: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---- Top bar ---- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 56px; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; padding-top: env(safe-area-inset-top, 0px);
  height: calc(56px + env(safe-area-inset-top, 0px));
  background:
    radial-gradient(140px 90px at 90% -30%, rgba(246,196,69,.40), transparent 70%),
    linear-gradient(120deg, #0a1f44, #12336e);
  color: #fff; border-bottom: 2px solid var(--gold); box-shadow: 0 4px 16px rgba(0,0,0,.28);
}
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-mark { font-size: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text strong { font-size: 15px; letter-spacing: .2px; }
.brand-text small { font-size: 11px; opacity: .85; }
.brand-text small.live { color: var(--gold); font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.pill {
  border: 0; background: rgba(255,255,255,.14); color: #fff;
  border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 600;
}
.me-chip {
  display: flex; align-items: center; gap: 5px; border: 0;
  background: rgba(255,255,255,.16); color: #fff; border-radius: 999px;
  padding: 5px 11px 5px 7px; font-weight: 600; max-width: 42vw;
}
.me-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Announcement bar ---- */
.announce {
  position: absolute; left: 0; right: 0; z-index: 39; height: 40px;
  top: calc(56px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: linear-gradient(90deg, var(--red), var(--red-2)); color: #fff;
  font-size: 13px; font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.announce[hidden] { display: none; }
.ann-icon { font-size: 16px; }
.ann-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-x { border: 0; background: rgba(255,255,255,.2); color: #fff; border-radius: 50%; width: 24px; height: 24px; font-size: 12px; flex: 0 0 auto; }
.me-email { font-size: 12px; color: var(--muted); margin: -4px 0 12px; }

/* ---- Views ---- */
#views {
  position: absolute; top: calc(56px + env(safe-area-inset-top, 0px));
  bottom: var(--tabh); left: 0; right: 0;
}
body.has-announce #views { top: calc(96px + env(safe-area-inset-top, 0px)); }
.view { position: absolute; inset: 0; display: none; }
.view.active { display: flex; flex-direction: column; }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.list { padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 15px; }

/* ---- Map ---- */
#map { position: absolute; inset: 0; background: #aadaff; z-index: 1; }
.map-legend {
  position: absolute; top: 8px; left: 8px; z-index: 20;
  background: rgba(255,255,255,.92); border-radius: 8px; padding: 5px 9px;
  font-size: 11px; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.fab {
  position: absolute; z-index: 30; border: 0; border-radius: 999px;
  font-size: 15px; font-weight: 700; padding: 13px 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,.28); display: inline-flex; align-items: center; gap: 6px;
}
.fab-primary { left: 50%; transform: translateX(-50%); bottom: 16px; background: var(--red); color: #fff; }
.fab.loading { opacity: .7; pointer-events: none; }
#photo-fab, #photo-fab input { cursor: pointer; }

/* Leaflet markers */
.pin-wrap, .vibe-wrap { background: none; border: 0; }
.pin {
  position: relative; width: 40px; height: 40px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); background: var(--pin, var(--red));
  border: 2px solid #fff; box-shadow: 0 3px 6px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
}
.pin-emoji { transform: rotate(45deg); font-size: 19px; }
.pin.mine { animation: pinpulse 1.6s ease-in-out infinite; }
.pin.placing { animation: pinpulse 1s ease-in-out infinite; box-shadow: 0 0 0 4px rgba(215,38,61,.3), 0 3px 6px rgba(0,0,0,.4); }
@keyframes pinpulse { 0%,100% { transform: rotate(-45deg) scale(1); } 50% { transform: rotate(-45deg) scale(1.14); } }
.amenity-wrap { background: none; border: 0; }
.amenity { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--navy);
  display: flex; align-items: center; justify-content: center; font-size: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.amenity.aid { border-color: var(--red); }
.vibe-dot {
  width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.95);
  border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center;
  font-size: 16px; box-shadow: 0 2px 5px rgba(0,0,0,.3); animation: vibein .4s ease;
}
@keyframes vibein { from { transform: scale(0); } to { transform: scale(1); } }
.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(26,115,232,.3); }
.acc-circle { fill: #1a73e8; fill-opacity: .12; }
.pop { min-width: 150px; font-size: 13px; }
.pop-head { display: flex; align-items: center; gap: 6px; font-size: 15px; margin-bottom: 4px; }
.pop-line { margin: 2px 0; }
.pop-note { margin-top: 5px; font-style: italic; color: #333; }
.pop-time { margin-top: 5px; color: var(--muted); font-size: 11px; }

/* ---- Cards / feed ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 13px; box-shadow: 0 1px 2px rgba(16,35,63,.04);
}
.msg { display: flex; gap: 10px; }
.avatar {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.msg-body { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.msg-head .dot { color: var(--muted); }
.msg-text { margin-top: 2px; font-size: 15px; word-wrap: break-word; white-space: pre-wrap; }
.loc-tag { font-size: 11px; color: var(--red); font-weight: 600; }

/* ---- Feed extras ---- */
.feed-head { padding: 8px 10px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; gap: 8px; }
.chip-toggle { border: 1px solid var(--line); background: #f4f6fa; color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.chip-toggle.active { background: var(--red); color: #fff; border-color: var(--red); }
.chip-toggle.loading { opacity: .5; }
.msg-quote { font-size: 12px; color: var(--muted); border-left: 3px solid var(--line); padding: 2px 8px; margin: 3px 0; }
.msg-photo { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; margin-top: 6px; display: block; }
.react-bar { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.mreact { border: 1px solid var(--line); background: #f4f6fa; border-radius: 999px; padding: 3px 9px; font-size: 14px; display: inline-flex; gap: 3px; align-items: center; }
.mreact span { font-size: 11px; font-weight: 700; color: var(--muted); }
.mreact.on { background: #fff0f2; border-color: var(--red); }
.msg-reply { border: 0; background: none; color: var(--navy-2); font-size: 12px; font-weight: 700; margin-top: 4px; padding: 2px 0; }
.composer-chips { display: flex; gap: 6px; padding: 6px 10px 0; background: var(--card); }
.composer-chips[hidden] { display: none; }
.composer-chips .chip { background: #eef2fb; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.composer-chips .chip button { border: 0; background: none; color: var(--muted); font-size: 12px; }

/* ---- Composer ---- */
.composer {
  display: flex; gap: 8px; padding: 9px 10px; align-items: center;
  background: var(--card); border-top: 1px solid var(--line);
}
.composer-input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 15px; font-size: 16px; background: #f4f6fa; color: var(--ink);
}
.composer-input:focus { outline: none; border-color: var(--navy-2); background: #fff; }
.composer-loc {
  border: 1px solid var(--line); background: #f4f6fa; border-radius: 50%;
  width: 42px; height: 42px; font-size: 18px; flex: 0 0 42px;
}
.composer-loc.active { background: var(--red); border-color: var(--red); }
.composer-loc.loading { opacity: .5; }
.composer-send {
  border: 0; background: var(--navy); color: #fff; border-radius: 999px;
  padding: 11px 18px; font-size: 15px; font-weight: 700; flex: 0 0 auto;
}

/* ---- Photos ---- */
.photo-grid {
  flex: 1; padding: 8px; display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; align-content: start;
}
.photo { margin: 0; background: var(--card); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.photo img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: #ddd; }
.photo figcaption { padding: 7px 9px; font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
.photo-by { font-weight: 600; }
.photo-cap { color: var(--ink); }
.photo-grid .empty { grid-column: 1 / -1; }

/* ---- Floats ---- */
.floats-head { padding: 10px 10px 0; background: var(--card); border-bottom: 1px solid var(--line); }
.seg { display: flex; gap: 6px; padding: 10px 0; }
.seg-btn {
  flex: 1; border: 1px solid var(--line); background: #f4f6fa; color: var(--muted);
  border-radius: 999px; padding: 8px 4px; font-weight: 700; font-size: 12px; white-space: nowrap;
}
.award-block { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.award-block h4 { margin: 0 0 8px; font-size: 15px; }
.award-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.award-results { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.award-pick { display: flex; align-items: center; gap: 5px; }
.award-pick .grow { font-size: 13px; }
.award-pick button { border: 1px solid var(--line); background: #f4f6fa; border-radius: 8px; width: 34px; height: 32px; font-size: 15px; flex: 0 0 auto; }
.seg-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.float-head { display: flex; flex-direction: column; gap: 3px; }
.float-title { display: flex; align-items: center; gap: 7px; }
.float-title strong { font-size: 16px; }
.entry-no { flex: 0 0 auto; background: var(--navy); color: #fff; font-size: 12px; font-weight: 800;
  border-radius: 7px; padding: 2px 7px; min-width: 30px; text-align: center; }
.entry-no.live { background: var(--red); }
.medal { font-size: 22px; }
.rank-n { font-weight: 900; color: var(--muted); font-size: 14px; min-width: 30px; }
.float-blurb { font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.float-avg { margin: 7px 0 4px; display: flex; align-items: center; gap: 8px; }
.float-avg .avg { font-weight: 800; color: var(--red-2); font-size: 16px; }
.stars { display: flex; gap: 3px; margin: 3px 0 8px; }
.star {
  border: 0; background: none; font-size: 27px; line-height: 1; color: #d3d8e0; padding: 0 2px;
  transition: transform .1s;
}
.star.on { color: var(--gold); text-shadow: 0 1px 1px rgba(0,0,0,.15); }
.star:active { transform: scale(1.25); }
.reacts { display: flex; flex-wrap: wrap; gap: 6px; }
.react {
  border: 1px solid var(--line); background: #f4f6fa; border-radius: 999px;
  padding: 5px 10px; font-size: 15px; display: inline-flex; align-items: center; gap: 4px;
}
.react span { font-size: 12px; font-weight: 700; color: var(--muted); }
.react.on { background: #fff0f2; border-color: var(--red); }
.rank { align-self: center; font-weight: 900; color: var(--gold); font-size: 18px;
  background: var(--navy); border-radius: 8px; padding: 2px 8px; margin: 6px 10px -4px; width: fit-content; }

/* ---- Vibe ---- */
.vibe-meter-wrap { padding: 12px 12px 6px; }
.vibe-meter-title { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.vibe-meter { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.meter-row { display: flex; align-items: center; gap: 8px; }
.meter-emoji { font-size: 18px; width: 24px; text-align: center; }
.meter-bar { flex: 1; height: 12px; background: #e7eaf1; border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); border-radius: 999px; transition: width .4s; }
.meter-label { font-size: 12px; color: var(--muted); flex: 0 0 auto; min-width: 74px; }
.vibe-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; padding: 6px 12px; }
.vibe-btn {
  border: 1px solid var(--line); background: var(--card); border-radius: 14px;
  padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: var(--ink);
}
.vibe-emoji { font-size: 25px; }
.vibe-btn.pulse { animation: vibpulse .4s ease; }
@keyframes vibpulse { 50% { transform: scale(1.15); background: var(--gold); } }
.vibe-hint { text-align: center; color: var(--muted); font-size: 12px; padding: 4px 12px 8px; }
#vibe-ticker { border-top: 1px solid var(--line); }
.tick { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tick-emoji { font-size: 20px; }
.tick-text { flex: 1; min-width: 0; }

/* ---- Play tab ---- */
.play-scroll { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.play-card h3 { margin: 0 0 6px; font-size: 16px; }
.play-head { display: flex; align-items: center; justify-content: space-between; }
.play-head .btn { padding: 5px 10px; }
.wave-stage { position: relative; height: 60px; overflow: hidden; margin: 6px 0 10px; }
.wave-ripple { position: absolute; bottom: 0; font-size: 30px; animation: waveup 1.8s ease-out forwards; }
@keyframes waveup { 0% { transform: translateY(20px) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-60px) scale(1.4); opacity: 0; } }
.score-box { display: flex; align-items: center; gap: 16px; }
.score-xp { font-size: 40px; font-weight: 900; color: var(--red-2); line-height: 1; }
.score-xp span { font-size: 14px; color: var(--muted); margin-left: 4px; }
.score-break { font-size: 14px; color: var(--ink); }
.bingo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 8px; }
.bingo-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 9.5px; font-weight: 600; padding: 3px; border-radius: 7px; background: #f4f6fa; border: 1px solid var(--line); cursor: pointer; line-height: 1.1; }
.bingo-cell.marked { background: var(--red); color: #fff; border-color: var(--red); }
.bingo-cell.free { background: var(--gold); font-weight: 800; }
.trivia-q { font-weight: 700; margin-bottom: 8px; }
.trivia-opts { display: flex; flex-direction: column; gap: 6px; }
.trivia-opt { text-align: left; border: 1px solid var(--line); background: #f7f8fc; color: var(--ink); border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.trivia-opt.right { background: #e6f7ec; border-color: #37b24d; }
.trivia-opt.wrong { background: #fdecec; border-color: var(--red); }
.trivia-done { text-align: center; font-size: 16px; }
.trivia-done .btn { margin-top: 10px; }
.leader-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.leader-rank { width: 26px; text-align: center; font-weight: 800; }

/* ---- Bottom tab bar ---- */
.tabbar {
  position: absolute; bottom: 0; left: 0; right: 0; height: var(--tabh); z-index: 40;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b); box-shadow: 0 -2px 10px rgba(16,35,63,.06);
}
.tab {
  flex: 1; border: 0; background: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; font-weight: 700;
}
.tab span { font-size: 21px; }
.tab.active { color: var(--red); }

/* ---- Sheets / modals ---- */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(6,18,44,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-panel {
  width: 100%; max-width: 500px; background: var(--card); border-radius: 22px 22px 0 0; padding: 8px 16px 20px;
  padding-bottom: calc(20px + var(--safe-b)); max-height: 88vh; overflow-y: auto;
  animation: sheetup .22s ease; box-shadow: 0 -8px 30px rgba(0,0,0,.25);
}
@keyframes sheetup { from { transform: translateY(100%); } }
.sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 12px; }
.sheet-panel h3 { margin: 0 0 4px; font-size: 19px; }
.sheet-sub { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.setup-methods { display: flex; gap: 8px; margin-bottom: 14px; }
.method-btn { flex: 1; border: 1px solid var(--navy); background: #eef2fb; color: var(--navy); border-radius: 12px; padding: 12px 6px; font-weight: 700; font-size: 14px; }
.method-btn:disabled { opacity: .6; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.field input {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 16px;
  background: #f7f8fc; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--navy-2); background: #fff; }
.field-row { display: flex; gap: 10px; }
.field-row .field { margin-bottom: 12px; }
.field-row .field:first-child { flex: 0 0 90px; }
.grow { flex: 1; }
.sheet-actions { display: flex; gap: 8px; margin-top: 4px; }
.btn { border: 0; border-radius: 12px; padding: 13px 16px; font-size: 15px; font-weight: 700; }
.btn.primary { background: var(--red); color: #fff; flex: 1; }
.btn.ghost { background: #eef1f6; color: var(--ink); }
.btn.danger { background: #fff0f2; color: var(--red-2); border: 1px solid var(--red); }
.emoji-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; margin-top: 6px; }
.emoji-opt { border: 1px solid var(--line); background: #f7f8fc; border-radius: 10px; padding: 8px 0; font-size: 22px; }
.emoji-opt.on { background: var(--gold); border-color: var(--gold); }

/* ---- Info panel ---- */
#info-content h3 { margin: 0 0 4px; font-size: 20px; }
.info-tag { margin: 0 0 10px; color: var(--red-2); font-weight: 700; font-size: 14px; }
.info-when { font-size: 16px; font-weight: 800; color: var(--navy); }
.info-stats { color: var(--muted); font-size: 13px; margin: 3px 0 12px; }
.info-block { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-top: 1px solid var(--line); }
.info-block b { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.info-block span { font-size: 14px; line-height: 1.4; }
.info-link { display: inline-block; margin: 12px 0 4px; color: var(--navy); font-weight: 700; text-decoration: none; font-size: 14px; }
.info-credit { margin-top: 16px; padding: 14px; border-radius: 14px; text-align: center;
  background: linear-gradient(120deg, #0a1f44, #12336e); color: #fff; font-size: 13px; font-weight: 600; }
.info-credit a { display: block; color: var(--gold); font-weight: 800; font-size: 19px; text-decoration: none; margin-top: 3px; letter-spacing: -.3px; }
.map-credit {
  position: absolute; left: 8px; top: 44px; z-index: 20;
  background: var(--navy); color: #fff; border-radius: 999px; padding: 7px 13px;
  font-size: 12px; font-weight: 600; text-decoration: none;
  box-shadow: 0 3px 10px rgba(0,0,0,.3); border: 1.5px solid var(--gold);
}
.map-credit b { color: var(--gold); }

@media (prefers-color-scheme: dark) {
  .info-when { color: var(--gold); }
  .info-link { color: var(--gold); }
}

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabh) + 12px); transform: translateX(-50%);
  z-index: 80; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 600; max-width: 88vw; text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.3); animation: toastin .2s ease;
}
.toast[hidden] { display: none; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---- Dark mode ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #0c1526; --ink: #e8edf6; --muted: #90a0b8; --card: #141f36;
    --line: #23324e; --navy: #060f22;
  }
  body { background: var(--cream); }
  .composer-input, .composer-loc, .seg-btn, .field input, .emoji-opt, .react { background: #0f1a30; color: var(--ink); }
  .method-btn { background: #17233d; color: #cdd8ee; }
  .meter-bar { background: #23324e; }
  .tabbar { background: #0d1728; }
  .map-legend { background: rgba(20,31,54,.92); color: var(--ink); }
  .star { color: #3a465e; }
}
