:root {
  --pink: #ff4f8b;
  --pink-dark: #d93a72;
  --ink: #2b1630;
  --muted: #7a6a7e;
  --bg: #fff7fa;
  --card: #ffffff;
  --line: #f0dbe4;
  --hint: #b9aebd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f7eaf0;
    --muted: #b8a7bd;
    --bg: #1d1220;
    --card: #2a1c2e;
    --line: #3d2a42;
    --hint: #6f6075;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior-y: none;           /* no pull-to-refresh bounce mid-hunt */
  -webkit-tap-highlight-color: transparent;
}

button, a { touch-action: manipulation; } /* no double-tap zoom delay */
button { -webkit-user-select: none; user-select: none; }

/* Room for the notch and home bar, especially when opened from the home screen. */
.screen {
  max-width: 480px;
  margin: 0 auto;
  padding:
    max(24px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    calc(32px + env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

[hidden] { display: none !important; }

a { color: var(--pink-dark); }

h2 { font-size: 1.05rem; margin: 28px 0 10px; }

/* ---------- Landing ---------- */

#landing, #desktop { text-align: center; padding-top: max(18vh, env(safe-area-inset-top)); }

.logo { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.logo span { color: var(--pink); }
.logo-small { font-size: 1.2rem; }

.tagline { font-size: 1.25rem; font-weight: 600; margin: 8px 0 20px; }
.lead { color: var(--muted); margin: 0 auto 20px; max-width: 30ch; }
.teaser { margin: 0 0 28px; }
.small { font-size: 0.8rem; color: var(--muted); max-width: 32ch; margin: 18px auto 0; }

.button-primary {
  display: inline-block;
  width: 100%;
  max-width: 320px;
  padding: 16px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
}
.button-primary:active { background: var(--pink-dark); }

/* ---------- Game ---------- */

.game-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.status { font-size: 0.85rem; color: var(--muted); text-align: right; }

.radar { display: block; width: 100%; max-width: 360px; margin: 16px auto 0; overflow: visible; }
.radar-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-label { fill: var(--muted); font-size: 6px; text-anchor: middle; opacity: 0.7; }
.radar-north { fill: var(--muted); font-size: 9px; font-weight: 700; text-anchor: middle; }
.blip-me { fill: var(--ink); }
.blip-hint { fill: var(--hint); opacity: 0.55; }
.blip-icon { font-size: 8px; text-anchor: middle; dominant-baseline: middle; }
.blip-visible { fill: var(--pink); animation: pulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@keyframes pulse {
  50% { transform: scale(1.35); opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) {
  .blip-visible { animation: none; }
}

.cards, .hints { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.card-icon { font-size: 1.7rem; }
.card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.muted { color: var(--muted); font-size: 0.85rem; }

.hints li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.hint-icon { filter: grayscale(1); opacity: 0.7; }

.button-small {
  flex: none;
  min-height: 44px;                      /* comfortable thumb target */
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button-small:disabled { opacity: 0.45; cursor: not-allowed; }

.empty { color: var(--muted); font-size: 0.9rem; margin: 0; }
