/* House Hunter theme: blush (light) and plum night (dark).
   Shared by the app (/) and the Captures pages so they always match. */
/* ---------- Theme tokens: blush (light) and plum night (dark) ---------- */
:root, [data-theme="light"] {
  --bg: #f8e8ee; --surface: #ffffff; --surface2: #fbeef3; --line: #e2b6c7;
  --text: #3a2433; --muted: #74546a;
  --rose: #e2557f; --rose-ink: #ffffff; --rose-soft: #ffe0ea;
  --lav: #8f6fe0; --lav-soft: #eee7ff;
  --mint: #23885f; --mint-soft: #dcf5ea;
  --butter: #b07a12; --butter-soft: #fff1cf;
  --berry: #c0365d; --berry-soft: #ffe1e8;
  --shadow: 0 10px 30px rgba(226, 85, 127, .14);
  --card-shadow: 0 1px 2px rgba(110, 40, 70, .07), 0 6px 18px rgba(226, 85, 127, .10);
  --glow1: rgba(255, 182, 205, .35); --glow2: rgba(200, 182, 255, .30);
}
[data-theme="dark"] {
  --bg: #1c1420; --surface: #271c2d; --surface2: #33253a; --line: #47354f;
  --text: #f6e9f0; --muted: #c2a9b9;
  --rose: #ff7aa2; --rose-ink: #2a1520; --rose-soft: #4a2636;
  --lav: #bba5ff; --lav-soft: #362c55;
  --mint: #74d9ab; --mint-soft: #1f3a30;
  --butter: #ffd27a; --butter-soft: #3d3220;
  --berry: #ff7a96; --berry-soft: #4a2230;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --card-shadow: none;
  --glow1: rgba(255, 122, 162, .16); --glow2: rgba(187, 165, 255, .14);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Nunito', sans-serif; font-weight: 400; font-size: 16px; line-height: 1.45;
  background-image: radial-gradient(circle at 8% 0%, var(--glow1), transparent 38%), radial-gradient(circle at 95% 10%, var(--glow2), transparent 34%);
  background-attachment: fixed; transition: background-color .3s, color .3s; }
h1, h2, h3, .display { font-family: 'Fredoka', sans-serif; font-weight: 600; letter-spacing: 0; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--rose); }
:focus-visible { outline: 3px solid var(--lav); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 18px; padding: 10px 22px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1.5px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-family: 'Fredoka', sans-serif; font-weight: 500; font-size: 21px; }
.brand .logo { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--rose-soft); font-size: 19px; }
.brand .spark { color: var(--rose); font-size: 14px; transform: translateY(-8px); }
nav.main { display: flex; gap: 4px; }
nav.main a { text-decoration: none; color: var(--muted); font-weight: 700; padding: 8px 14px; border-radius: 999px; }
nav.main a:hover { background: var(--surface2); color: var(--text); }
nav.main a[aria-current="page"] { background: var(--rose-soft); color: var(--rose); }
.topbar .spacer { flex: 1; }
.theme-toggle { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.theme-toggle:hover { border-color: var(--rose); }

/* ---------- Shared bits ---------- */
.btn { border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700; background: var(--surface2); color: var(--text); transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; box-shadow: none; }
.btn.primary { background: var(--rose); color: var(--rose-ink); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface2); color: var(--muted); white-space: nowrap; }
.badge.new { background: var(--rose-soft); color: var(--rose); }
.badge.good { background: var(--mint-soft); color: var(--mint); }
.badge.bad { background: var(--berry-soft); color: var(--berry); }
.badge.check { background: var(--butter-soft); color: var(--butter); }
.badge.lav { background: var(--lav-soft); color: var(--lav); }
.reveal { opacity: 0; animation: pop .55s cubic-bezier(.16, 1, .3, 1) forwards; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; } * { transition: none !important; } }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 3000; max-width: min(640px, 92vw);
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 16px; font-weight: 700; opacity: 0; pointer-events: none; transition: all .25s; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.error { background: var(--berry); color: #fff; }

/* Cards: in light mode a soft shadow lifts white cards off the blush page (dark mode doesn't need it). */
.home-card, .mini-card, .fact, .desc, .run, .cap, .shot { box-shadow: var(--card-shadow); }

