/* ===== Season palettes (the whole page re-themes when a tab is tapped) ===== */
:root {
  --bg: #efecf5; --surface: #ffffff; --text: #1f1a2e; --muted: #625b78;
  --line: rgba(31,26,46,.12); --accent: #2f2a45; --accent-ink: #ffffff;
  --badge: #5b4fa0; --ph-a: #e3dff0; --ph-b: #d4cee6;
  --radius-lg: 22px; --radius-sm: 10px;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body[data-season="halloween"] {
  --bg: #1d1430; --surface: #281d42; --text: #f4eeff; --muted: #b8acd6;
  --line: rgba(244,238,255,.14); --accent: #ff8a1f; --accent-ink: #1d1430;
  --badge: #ffb36b; --ph-a: #3a2a5e; --ph-b: #2b1f48;
}
body[data-season="thanksgiving"] {
  --bg: #e8d6b8; --surface: #fbf3e4; --text: #3a2414; --muted: #775a42;
  --line: rgba(58,36,20,.15); --accent: #8f1d3a; --accent-ink: #fff7ef;
  --badge: #8f1d3a; --ph-a: #f0c98a; --ph-b: #e3a964;
}
body[data-season="christmas"] {
  --bg: #0e3a2c; --surface: #144937; --text: #f2fbf6; --muted: #a8cbbd;
  --line: rgba(242,251,246,.14); --accent: #e8344a; --accent-ink: #ffffff;
  --badge: #e7c26a; --ph-a: #1d5e47; --ph-b: #154c3a;
}

*, *::before, *::after { box-sizing: inherit; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5;
  background: var(--bg); color: var(--text);
  transition: background-color .45s ease, color .45s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ===== Notices ===== */
.warn { background: #b00020; color: #fff; padding: 10px 18px; font-size: 14px; text-align: center; }
.warn code { background: rgba(255,255,255,.18); padding: 1px 6px; border-radius: 4px; }
.inapp { display: flex; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--accent); color: var(--accent-ink); padding: 10px 18px; font-size: 14px; }
.inapp p { margin: 0; }
.inapp button { background: none; border: 0; color: inherit; font-size: 18px; min-width: 44px; min-height: 44px; cursor: pointer; }

/* ===== Hero ===== */
.hero { padding: 28px 0 18px; }
@media (min-width: 720px) { .hero { padding: 48px 0 28px; } }
.handle { margin: 0 0 6px; color: var(--muted); font-weight: 600; }
.hero h1 {
  margin: 0; font-weight: 800; letter-spacing: -0.035em; line-height: .92;
  font-size: clamp(2.5rem, 11vw, 6.5rem); font-variation-settings: "opsz" 96;
}
.tagline { margin: 14px 0 0; max-width: 36ch; font-size: 1.08rem; color: var(--muted); }
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.social:empty { display: none; }
.social a { text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; }

/* ===== Sticky season tabs ===== */
.bar { position: sticky; top: 0; z-index: 20; background: var(--bg);
  padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid var(--line);
  transition: background-color .45s ease; }
.bar-inner { padding-top: 10px; padding-bottom: 10px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: transparent; color: var(--text); border: 1.5px solid var(--line);
}
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ===== Season header ===== */
.season-head { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: end; justify-content: space-between; padding: 26px 0 8px; }
.countdown { display: inline-block; margin: 0 0 8px; font-weight: 600; font-size: 14px;
  padding: 4px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.season-head h2 { margin: 0; font-size: clamp(1.6rem, 6vw, 2.4rem); letter-spacing: -0.02em; line-height: 1.1; }
.sub { margin: 4px 0 0; color: var(--muted); }
.search input {
  font: inherit; font-size: 16px; /* 16px stops iOS zoom-on-focus */
  width: min(320px, 100%); min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
}
.search { flex: 1 1 240px; display: flex; justify-content: flex-end; }
@media (max-width: 560px) { .search input { width: 100%; } .season-head { padding-top: 18px; } }
.disclosure-inline { font-size: 13px; color: var(--muted); margin: 6px 0 16px; }
.disclosure-inline #count { float: right; }

/* ===== Product grid ===== */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 40px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 359px) { .grid { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; scroll-margin-top: 90px;
  transition: background-color .45s ease, border-color .45s ease; }
.card.spotlight { outline: 3px solid var(--accent); outline-offset: 2px; }

.media { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; text-decoration: none;
  background: radial-gradient(circle at 30% 25%, var(--ph-a), var(--ph-b)); }
.media img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.ph-emoji { font-size: clamp(3rem, 14vw, 4.6rem); line-height: 1; filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); }
.code { position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 800; padding: 3px 9px;
  border-radius: 999px; background: var(--surface); color: var(--text); }

.body { display: flex; flex-direction: column; flex: 1; padding: 12px 14px 14px; }
.badge { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; color: var(--badge); }
.card h3 { margin: 0 0 6px; font-size: 1.02rem; line-height: 1.25; letter-spacing: -0.01em; }
.desc { margin: 0; font-size: 14px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.expanded .desc { -webkit-line-clamp: unset; display: block; }
.more { align-self: flex-start; background: none; border: 0; padding: 6px 0; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.meta { margin: 8px 0 10px; font-size: 13.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.meta-muted { color: var(--muted); }
.price { font-weight: 800; }
.buy {
  margin-top: auto; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 0 12px; border-radius: 14px; text-decoration: none;
  font-weight: 800; font-size: 15px; background: var(--accent); color: var(--accent-ink);
  transition: transform .12s ease, filter .12s ease;
}
.buy:hover { filter: brightness(1.08); }
.buy:active { transform: scale(.97); }

@media (max-width: 480px) {
  .body { padding: 10px 11px 12px; }
  .card h3 { font-size: .95rem; }
  .desc { font-size: 13px; }
  .buy { font-size: 14px; border-radius: 12px; }
}

.empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: var(--muted); }
.link-btn { font: inherit; font-weight: 600; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; color: var(--muted); }
.footer p { max-width: 75ch; }
.fine { margin: 4px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
