/* ============================================================
   FAMILY HUB — shared styles + themes
   A theme = a body class that sets CSS variables + a hero pattern.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,800&family=Inter:wght@400;500;600;700&family=Bebas+Neue&family=Barlow:wght@400;600;700&family=Baloo+2:wght@500;700;800&family=Playfair+Display:wght@600;800&family=Archivo+Black&family=Archivo:wght@400;600&display=swap');

:root {
  --bg: #f7f3ea; --surface: #fffdf8; --ink: #1d2733; --muted: #6b7380; --line: #e6dfd0;
  --brand: #1f3a5f; --accent: #e8664a; --accent-ink: #fff; --good: #2f9e6f; --warn: #d99a1e;
  --display: 'Fraunces', Georgia, serif; --body: 'Inter', system-ui, sans-serif;
  --radius: 18px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(20,30,50,.08);
  --hero-bg: linear-gradient(135deg, #1f3a5f, #2c5a8a);
  --hero-ink: #fff;
  --pattern: none;
}

/* ---------- THEMES ---------- */
.theme-wanderlust {
  --bg:#f7f3ea; --surface:#fffdf8; --ink:#1d2733; --line:#e8e0cf;
  --brand:#1f3a5f; --accent:#e8664a;
  --display:'Fraunces', Georgia, serif; --body:'Inter', system-ui, sans-serif;
  --hero-bg: radial-gradient(circle at 85% 15%, rgba(232,102,74,.55), transparent 45%), linear-gradient(135deg,#16304f,#2b5a88);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='white' stroke-opacity='.10' stroke-width='1.5'%3E%3Ccircle cx='60' cy='60' r='34'/%3E%3Ccircle cx='60' cy='60' r='26' stroke-dasharray='3 4'/%3E%3Cpath d='M0 60h120M60 0v120'/%3E%3C/g%3E%3C/svg%3E");
}
.theme-gameday {
  --bg:#eef1ee; --surface:#ffffff; --ink:#111816; --line:#d7ded9;
  --brand:#0f5132; --accent:#f2b705; --accent-ink:#111;
  --display:'Bebas Neue', Impact, sans-serif; --body:'Barlow', system-ui, sans-serif;
  --hero-bg: linear-gradient(160deg,#0b3d26 0%,#126b42 60%,#0b3d26 100%);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M0 40h80M40 0v80' stroke='white' stroke-opacity='.08' stroke-width='2'/%3E%3Ccircle cx='40' cy='40' r='14' fill='none' stroke='white' stroke-opacity='.08' stroke-width='2'/%3E%3C/svg%3E");
}
.theme-celebration {
  --bg:#fff6fb; --surface:#ffffff; --ink:#2a1838; --line:#f1dcea;
  --brand:#7b2cbf; --accent:#ff4d8d;
  --display:'Baloo 2', system-ui, sans-serif; --body:'Inter', system-ui, sans-serif;
  --radius: 24px;
  --hero-bg: linear-gradient(135deg,#7b2cbf,#ff4d8d 70%,#ffb84d);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cg fill='white' fill-opacity='.22'%3E%3Ccircle cx='12' cy='18' r='3'/%3E%3Crect x='55' y='10' width='6' height='12' rx='2' transform='rotate(30 58 16)'/%3E%3Ccircle cx='70' cy='62' r='4'/%3E%3Crect x='20' y='60' width='5' height='11' rx='2' transform='rotate(-25 22 65)'/%3E%3Ccircle cx='42' cy='40' r='2'/%3E%3C/g%3E%3C/svg%3E");
}
.theme-cozy {
  --bg:#f6efe6; --surface:#fffaf3; --ink:#2b1d16; --line:#e8d9c6;
  --brand:#7a1f1f; --accent:#2f6b4f;
  --display:'Playfair Display', Georgia, serif; --body:'Inter', system-ui, sans-serif;
  --hero-bg: radial-gradient(circle at 20% 20%, rgba(255,210,140,.35), transparent 40%), linear-gradient(135deg,#5a1414,#8a2a1f);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70'%3E%3Cpath d='M35 15l3 9h9l-7 6 3 9-8-6-8 6 3-9-7-6h9z' fill='white' fill-opacity='.10'/%3E%3C/svg%3E");
}
.theme-adventure {
  --bg:#f2efe6; --surface:#fffdf7; --ink:#1e2a22; --line:#ddd7c6;
  --brand:#2d4a35; --accent:#e07a1f;
  --display:'Archivo Black', Impact, sans-serif; --body:'Archivo', system-ui, sans-serif;
  --radius: 12px;
  --hero-bg: linear-gradient(170deg,#24402e,#3d6b4b 55%,#7a8f5a);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cg fill='none' stroke='white' stroke-opacity='.09' stroke-width='1.4'%3E%3Cpath d='M-10 150c40-30 80 10 120-20s70-40 100-10'/%3E%3Cpath d='M-10 120c40-30 80 10 120-20s70-40 100-10'/%3E%3Cpath d='M-10 90c40-30 80 10 120-20s70-40 100-10'/%3E%3Cpath d='M-10 60c40-30 80 10 120-20s70-40 100-10'/%3E%3Cpath d='M-10 180c40-30 80 10 120-20s70-40 100-10'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- BASE ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: var(--brand); }
h1,h2,h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: .2px; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

.btn { appearance: none; border: 0; border-radius: 999px; padding: 10px 16px; font: 600 15px var(--body);
  background: var(--brand); color: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
input, textarea, select { font: 15px var(--body); color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 10px 12px; width: 100%; }
textarea { min-height: 80px; resize: vertical; }
label { font-size: 13px; font-weight: 600; color: var(--muted); display: block; margin: 10px 0 4px; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.section { margin: 22px 0; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 26px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; font-weight: 500; }
.chip.yes { box-shadow: inset 0 0 0 2px var(--good); }
.chip.maybe { box-shadow: inset 0 0 0 2px var(--warn); }
.chip.no { opacity: .55; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- HERO ---------- */
.hero { background: var(--pattern), var(--hero-bg); color: var(--hero-ink); padding: 44px 0 64px; position: relative; overflow: hidden; }
.hero .emoji { font-size: 46px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.hero h1 { font-size: clamp(38px, 9vw, 68px); margin: 10px 0 6px; }
.hero .sub { opacity: .9; font-size: 17px; }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 12px; font-weight: 700; opacity: .85; }
.countdown { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.countdown .unit { background: rgba(255,255,255,.14); backdrop-filter: blur(6px); border-radius: 14px; padding: 10px 14px; min-width: 70px; text-align: center; }
.countdown .num { font: 800 30px var(--display); display: block; }
.countdown .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; opacity: .85; }
.overlap { margin-top: -36px; position: relative; }

/* ---------- ITINERARY ---------- */
.day { margin-bottom: 12px; overflow: hidden; padding: 0; }
.day > summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.day > summary::-webkit-details-marker { display: none; }
.day .daynum { width: 52px; height: 52px; flex: none; border-radius: 14px; background: var(--brand); color: #fff;
  display: grid; place-items: center; text-align: center; line-height: 1; font-family: var(--display); }
.day .daynum b { font-size: 22px; display: block; }
.day .daynum span { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; opacity: .85; }
.day h3 { font-size: 20px; }
.day[open] > summary { border-bottom: 1.5px dashed var(--line); }
.stops { list-style: none; margin: 0; padding: 6px 18px 14px; }
.stop { display: grid; grid-template-columns: 86px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stop:last-child { border-bottom: 0; }
.stop .time { font-weight: 700; color: var(--accent); font-size: 14px; padding-top: 2px; }
.stop .title { font-weight: 700; }
.stop .cat { font-size: 15px; margin-right: 4px; }
.stop .notes { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.stop .private { margin-top: 6px; font-size: 13px; background: #fff4d6; color: #6b4e00; padding: 6px 10px; border-radius: 8px; }

/* ---------- CHECKLIST / CHAT / PHOTOS ---------- */
.check { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--good); flex: none; }
.check.done .t { text-decoration: line-through; color: var(--muted); }
.check .who { margin-left: auto; font-size: 12px; color: var(--muted); }
.msg { padding: 10px 0; border-bottom: 1px solid var(--line); }
.msg .a { font-weight: 700; } .msg .d { color: var(--muted); font-size: 12px; margin-left: 6px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photos figure { margin: 0; position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--line); cursor: zoom-in; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 12px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: grid; place-items: center; z-index: 50; }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 8px; }

/* ---------- NAV / MODAL / TOAST ---------- */
.tabs { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.tabs .wrap { display: flex; gap: 4px; overflow-x: auto; padding: 8px 16px; scrollbar-width: none; }
.tabs a { white-space: nowrap; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 999px; }
.tabs a:hover { background: var(--surface); }
.modal { position: fixed; inset: 0; background: rgba(10,15,25,.55); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal .card { width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; }
.modal.wide .card { max-width: 820px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px;
  border-radius: 999px; font-weight: 600; z-index: 60; box-shadow: var(--shadow); }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 0 50px; }
.stamp { display: inline-block; border: 2.5px solid var(--accent); color: var(--accent); border-radius: 10px; padding: 4px 10px;
  font: 800 12px var(--body); letter-spacing: 2px; text-transform: uppercase; transform: rotate(-4deg); }
.confetti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 70; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }
