/* ============================================================================
   CookieCodeJar — Design System
   A membership vault for Episode Interactive authors.

   Aesthetic: "Morning Bakery" — a warm LIGHT mode.
   Soft-cream page, white cards resting on it with soft diffuse shadows,
   deep-espresso text, rich-honey primary actions, and a muted glaze-blue
   accent. Doughy 24px corners. Inviting, readable, boutique-bakery premium.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. Tokens
---------------------------------------------------------------------------- */
:root {
  /* Canvas & surfaces */
  --cream: #fdfbf7;         /* main page background */
  --cream-2: #f6f1e8;       /* recessed fills (inputs, chips, tabs) */
  --surface: #ffffff;       /* cards */
  --surface-hi: #ffffff;
  --surface-glass: #ffffff; /* kept as a name for compatibility; solid now */
  --border: rgba(74, 64, 58, 0.1);       /* light grey/brown hairline */
  --border-hi: rgba(74, 64, 58, 0.18);

  /* Honey — primary actions, credits, "the sweet stuff" */
  --honey: #d4a017;
  --honey-deep: #a9780a;
  --on-honey: #fdfbf7;      /* cream text on honey */
  --grad-honey: linear-gradient(135deg, #dcab21 0%, #c39012 100%);
  --grad-honey-soft: linear-gradient(135deg, rgba(212, 160, 23, 0.16), rgba(169, 120, 10, 0.08));

  /* Glaze — muted dusty blue accent (deepened so it reads on white) */
  --glaze: #5e93ab;
  --glaze-deep: #467688;
  --grad-glaze-soft: linear-gradient(135deg, rgba(94, 147, 171, 0.16), rgba(70, 118, 136, 0.08));

  /* Feedback */
  --good: #4e9e6e;
  --bad: #c7644e;

  /* Text — deep espresso + warm greys */
  --text: #4a403a;
  --text-muted: #877a6f;
  --text-faint: #b2a89d;

  /* Type */
  --font-display: "Outfit", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Radius — doughy */
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Elevation — soft, diffuse (resting on the page, no glow) */
  --shadow-soft: 0 1px 2px rgba(74, 64, 58, 0.04), 0 10px 26px -14px rgba(74, 64, 58, 0.18);
  --shadow-raised: 0 4px 10px rgba(74, 64, 58, 0.06), 0 22px 48px -22px rgba(74, 64, 58, 0.26);
  --shadow-honey: 0 10px 24px -10px rgba(212, 160, 23, 0.45);

  /* Ambient page tint (overridden per theme) */
  --ambient-1: rgba(212, 160, 23, 0.07);
  --ambient-2: rgba(94, 147, 171, 0.05);
  --crumb-dot: rgba(212, 160, 23, 0.04);

  /* Cookie illustrations (rain, jar meter, icons) */
  --cookie-body: #d98a2b;
  --cookie-chip: #7a4c17;
  --jar-ring: rgba(212, 160, 23, 0.35);

  /* Layout */
  --sidebar-w: 248px;
  --topbar-h: 76px;
  --landing-nav-h: 64px;
  --rain-clip-top: 0px;
  --content-max: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grain-tint: color-mix(in srgb, var(--text) 5.5%, transparent);
  --grain-tint-surface: color-mix(in srgb, var(--text) 4.5%, transparent);
  --grain-texture:
    radial-gradient(circle at 50% 50%, var(--grain-tint) 0.55px, transparent 0.65px);
}

/* ----------------------------------------------------------------------------
   1b. Accent palettes — set on <html data-theme="…">
---------------------------------------------------------------------------- */
html[data-theme="pink"] {
  --cream: #fdf8fb;
  --cream-2: #f9eef4;
  --honey: #e8669f;
  --honey-deep: #c24478;
  --on-honey: #fff8fb;
  --grad-honey: linear-gradient(135deg, #f078ae 0%, #d24d86 100%);
  --grad-honey-soft: linear-gradient(135deg, rgba(232, 102, 159, 0.16), rgba(194, 68, 120, 0.08));
  --glaze: #b87aa8;
  --glaze-deep: #9a5f8c;
  --grad-glaze-soft: linear-gradient(135deg, rgba(184, 122, 168, 0.16), rgba(154, 95, 140, 0.08));
  --shadow-honey: 0 10px 24px -10px rgba(232, 102, 159, 0.42);
  --ambient-1: rgba(232, 102, 159, 0.09);
  --ambient-2: rgba(184, 122, 168, 0.06);
  --crumb-dot: rgba(232, 102, 159, 0.05);
  --cookie-body: #f08ab8;
  --cookie-chip: #b83d72;
  --jar-ring: rgba(232, 102, 159, 0.35);
}

html[data-theme="blue"] {
  --cream: #f7fafd;
  --cream-2: #edf3f9;
  --honey: #4a8fd4;
  --honey-deep: #2f6fad;
  --on-honey: #f7fafd;
  --grad-honey: linear-gradient(135deg, #5c9de0 0%, #3a7fbf 100%);
  --grad-honey-soft: linear-gradient(135deg, rgba(74, 143, 212, 0.16), rgba(47, 111, 173, 0.08));
  --glaze: #5e93ab;
  --glaze-deep: #467688;
  --grad-glaze-soft: linear-gradient(135deg, rgba(94, 147, 171, 0.16), rgba(70, 118, 136, 0.08));
  --shadow-honey: 0 10px 24px -10px rgba(74, 143, 212, 0.42);
  --ambient-1: rgba(74, 143, 212, 0.09);
  --ambient-2: rgba(94, 147, 171, 0.06);
  --crumb-dot: rgba(74, 143, 212, 0.05);
  --cookie-body: #6aa8e8;
  --cookie-chip: #2f6fad;
  --jar-ring: rgba(74, 143, 212, 0.35);
}

html[data-theme="purple"] {
  --cream: #faf8fd;
  --cream-2: #f1edf8;
  --honey: #8b5fd4;
  --honey-deep: #6d45ad;
  --on-honey: #faf8fd;
  --grad-honey: linear-gradient(135deg, #9b72de 0%, #7a52c0 100%);
  --grad-honey-soft: linear-gradient(135deg, rgba(139, 95, 212, 0.16), rgba(109, 69, 173, 0.08));
  --glaze: #7a6bb8;
  --glaze-deep: #5f5399;
  --grad-glaze-soft: linear-gradient(135deg, rgba(122, 107, 184, 0.16), rgba(95, 83, 153, 0.08));
  --shadow-honey: 0 10px 24px -10px rgba(139, 95, 212, 0.42);
  --ambient-1: rgba(139, 95, 212, 0.09);
  --ambient-2: rgba(122, 107, 184, 0.06);
  --crumb-dot: rgba(139, 95, 212, 0.05);
  --cookie-body: #a882e8;
  --cookie-chip: #6d45ad;
  --jar-ring: rgba(139, 95, 212, 0.35);
}

html[data-theme="orange"] {
  --cream: #fdf9f5;
  --cream-2: #f8efe6;
  --honey: #e88a2e;
  --honey-deep: #c56a12;
  --on-honey: #fdf9f5;
  --grad-honey: linear-gradient(135deg, #f09840 0%, #d6741a 100%);
  --grad-honey-soft: linear-gradient(135deg, rgba(232, 138, 46, 0.16), rgba(197, 106, 18, 0.08));
  --glaze: #c9875a;
  --glaze-deep: #a86d42;
  --grad-glaze-soft: linear-gradient(135deg, rgba(201, 135, 90, 0.16), rgba(168, 109, 66, 0.08));
  --shadow-honey: 0 10px 24px -10px rgba(232, 138, 46, 0.42);
  --ambient-1: rgba(232, 138, 46, 0.09);
  --ambient-2: rgba(201, 135, 90, 0.06);
  --crumb-dot: rgba(232, 138, 46, 0.05);
  --cookie-body: #f0a04a;
  --cookie-chip: #b85a14;
  --jar-ring: rgba(232, 138, 46, 0.35);
}

/* ----------------------------------------------------------------------------
   2. Reset & base
---------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Faint warm light — barely-there, just to keep the cream from feeling flat */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(720px 460px at 10% -8%, var(--ambient-1), transparent 62%),
    radial-gradient(680px 460px at 94% 2%, var(--ambient-2), transparent 64%);
  pointer-events: none;
}

/* Scattered "crumb" specks + paper grain lives in .site-grain (injected by ui.js) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 50% 50%, var(--grain-tint) 0.55px, transparent 0.65px),
    radial-gradient(circle at 50% 50%, var(--crumb-dot) 1.5px, transparent 2px);
  background-size: 4px 4px, 118px 118px;
  background-position: 0 0, 24px 60px;
  pointer-events: none;
}

/* Boutique stationery grain — faint paper tooth over the cream */
.site-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  background-image: var(--grain-texture);
  background-size: 4px 4px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; color: var(--text); }

::selection { background: rgba(212, 160, 23, 0.28); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--glaze);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Utility label — uppercase, tracked */
.eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.muted { color: var(--text-muted); }

/* ----------------------------------------------------------------------------
   2b. Falling cookies — depth layers inside the jar + scroll parallax
---------------------------------------------------------------------------- */
.cookie-rain {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  clip-path: inset(var(--rain-clip-top, 0px) 0 0 0);
  -webkit-clip-path: inset(var(--rain-clip-top, 0px) 0 0 0);
  -webkit-mask-image: radial-gradient(ellipse 96% 94% at 50% 36%, #000 32%, rgba(0, 0, 0, 0.55) 68%, transparent 100%);
  mask-image: radial-gradient(ellipse 96% 94% at 50% 36%, #000 32%, rgba(0, 0, 0, 0.55) 68%, transparent 100%);
}
.cookie-rain::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 38% at 18% 8%, rgba(255, 255, 255, 0.22), transparent 58%),
    radial-gradient(ellipse 80% 70% at 50% 105%, rgba(74, 64, 58, 0.07), transparent 55%);
}
.cookie-rain__layer {
  position: absolute;
  inset: 0;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  will-change: transform;
}
.cookie-rain__layer--far { z-index: 0; }
.cookie-rain__layer--mid { z-index: 1; }
.cookie-rain__layer--near { z-index: 2; }
.cookie-rain__item {
  position: absolute;
  top: 0;
  display: block;
  animation-name: cookie-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  will-change: transform;
}
.cookie-rain__item svg {
  display: block;
  width: 100%;
  height: 100%;
}
.cookie-rain__item svg path { fill: var(--cookie-body); }
.cookie-rain__item svg circle { fill: var(--cookie-chip); }
.vault-jar__cookie svg path { fill: var(--cookie-body); }
.vault-jar__cookie svg circle { fill: var(--cookie-chip); }
@keyframes cookie-fall {
  0% {
    transform: translate3d(0, calc(-72% - 2vh), 0) rotate(var(--start-rot, 0deg));
  }
  100% {
    transform: translate3d(var(--drift, 0px), calc(100vh + 40%), 0)
      rotate(var(--end-rot, 360deg));
  }
}

/* Crumb sprinkle on button hover */
.crumb-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--honey-deep);
  pointer-events: none;
  z-index: 4;
  animation: crumb-sprinkle 0.62s var(--ease) forwards;
}
@keyframes crumb-sprinkle {
  0% {
    opacity: 0.9;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 0px), var(--dy, 14px)) rotate(var(--rot, 90deg)) scale(0.4);
  }
}
.crumb-particle--logo {
  width: 3px;
  height: 3px;
  animation-duration: 0.55s;
}

/* ----------------------------------------------------------------------------
   3. App shell (dashboard / my-assets / roadmap)
---------------------------------------------------------------------------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* --- Sidebar --- solid white chrome framing the cream canvas */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background-color: var(--surface);
  background-image: radial-gradient(circle at 50% 50%, var(--grain-tint-surface) 0.55px, transparent 0.65px);
  background-size: 4px 4px;
  border-right: 1px solid var(--border);
  z-index: 40;
  overflow: hidden;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  margin-right: -4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav::-webkit-scrollbar {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
}
.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.14rem;
  letter-spacing: -0.01em;
}
.brand__name span { color: var(--honey-deep); }

.nav__group { margin-top: 14px; padding: 0 8px 6px; }

.nav__item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 15px;
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
  border: 1px solid transparent;
}
.nav__item svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav__item:hover { color: var(--text); background: var(--cream-2); }
.nav__item.is-active {
  color: var(--honey-deep);
  background: var(--grad-honey-soft);
  border-color: rgba(212, 160, 23, 0.3);
}
.nav__item.is-active svg { color: var(--honey-deep); }
.nav__item--external [data-icon="discord"] svg {
  color: #5865f2;
}
.nav__item--external [data-icon="episode"] svg {
  color: #ff3d7f;
}
.nav__item--external [data-icon="instagram"] svg {
  color: #e1306c;
}

.sidebar__footer { margin-top: auto; }

/* --- Main column --- */
.main {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* --- Top bar --- solid white, subtle bottom hairline */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(18px, 3vw, 40px);
  background-color: var(--surface);
  background-image: radial-gradient(circle at 50% 50%, var(--grain-tint-surface) 0.55px, transparent 0.65px);
  background-size: 4px 4px;
  border-bottom: 1px solid var(--border);
}

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--cream-2);
  border: 1px solid var(--border);
  color: var(--text);
  place-items: center;
}
.menu-toggle svg { width: 20px; height: 20px; }

.topbar__spacer { flex: 1; }

/* Search field */
.search {
  position: relative;
  flex: 1;
  max-width: 460px;
}
.search svg {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-faint);
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: 12px 16px 12px 46px;
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus {
  background: var(--surface);
  border-color: rgba(94, 147, 171, 0.55);
  box-shadow: 0 0 0 4px rgba(94, 147, 171, 0.14);
  outline: none;
}

/* Credit jar chip — honey cookies, espresso label */
.jar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  border-radius: var(--r-pill);
  background: var(--cream-2);
  border: 1px solid var(--jar-ring);
}
.jar__icon {
  width: 32px; height: 32px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--grad-honey);
  color: var(--on-honey);
}
.jar__icon svg { width: 18px; height: 18px; }
.jar__amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--honey-deep);
  line-height: 1;
}
.jar__label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad-honey);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--on-honey);
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}
.avatar:not(.avatar-ready):not(.has-photo) {
  color: transparent;
}

/* --- Content area --- */
.content {
  padding: clamp(20px, 3vw, 38px) clamp(18px, 3vw, 40px) 60px;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.page-head h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.page-head p { color: var(--text-muted); margin-top: 6px; max-width: 52ch; }

/* Theme picker — dashboard */
.theme-picker {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.theme-picker--profile {
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.theme-picker__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.theme-picker__swatches {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-soft);
}
.theme-picker__swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: var(--swatch);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.theme-picker__swatch:hover { transform: scale(1.08); }
.theme-picker__swatch.is-active {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--honey-deep);
  transform: scale(1.05);
}

/* ----------------------------------------------------------------------------
   4. Buttons & controls
---------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  position: relative;
  overflow: visible;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary {
  background: var(--grad-honey);
  color: var(--on-honey);
  box-shadow: var(--shadow-honey);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(212, 160, 23, 0.55); }

.btn--cookie {
  background: var(--grad-honey);
  color: var(--on-honey);
  box-shadow: var(--shadow-honey);
}
.btn--cookie:hover { transform: translateY(-2px); }

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-hi);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}
.btn--ghost:hover { background: var(--cream-2); }

/* owned / download — glaze-blue tint */
.btn--owned {
  background: rgba(94, 147, 171, 0.12);
  border-color: rgba(94, 147, 171, 0.4);
  color: var(--glaze-deep);
}
.btn--owned:hover { background: rgba(94, 147, 171, 0.2); }

.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Filter chips */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.chip {
  padding: 9px 18px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-hi); }
.chip.is-active {
  background: var(--grad-honey-soft);
  border-color: rgba(212, 160, 23, 0.45);
  color: var(--honey-deep);
}
.filter-bar__spacer { flex: 1; }

.select {
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text);
  font-size: 0.86rem;
}

/* ----------------------------------------------------------------------------
   5. Cards
---------------------------------------------------------------------------- */
.card {
  position: relative;
  background-color: var(--surface);
  background-image: radial-gradient(circle at 50% 50%, var(--grain-tint-surface) 0.55px, transparent 0.65px);
  background-size: 4px 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
}

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.product:hover { transform: translateY(-5px); border-color: var(--border-hi); box-shadow: var(--shadow-raised); }

.product__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    var(--grad-honey-soft),
    linear-gradient(160deg, #fbf3e2, #ffffff);
  overflow: hidden;
}
.product__media img { width: 100%; height: 100%; object-fit: cover; }
.product__badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.product__badge--exclusive {
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.92), rgba(169, 120, 10, 0.88));
  border-color: rgba(169, 120, 10, 0.35);
  color: var(--on-honey);
}
.product.is-master-exclusive .product__media {
  background:
    linear-gradient(160deg, rgba(212, 160, 23, 0.12), rgba(74, 64, 58, 0.04)),
    linear-gradient(160deg, #fbf3e2, #ffffff);
}
.product.is-master-exclusive:not(.is-owned) {
  border-color: rgba(212, 160, 23, 0.28);
}
.product__owned-tag {
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: none;
  place-items: center;
  background: var(--glaze);
  color: #fff;
}
.product__owned-tag svg { width: 16px; height: 16px; }
.product.is-owned .product__owned-tag { display: grid; }

.product__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product__title { font-size: 1.1rem; font-weight: 600; }
.product__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product__foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.price {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--honey-deep);
}
.price svg { width: 18px; height: 18px; }
.price small {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.price--exclusive {
  font-size: 0.95rem;
  color: var(--honey-deep);
  gap: 6px;
}
.price--exclusive span {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.price--exclusive svg { width: 16px; height: 16px; }

/* ----------------------------------------------------------------------------
   6. Vault balance banner (dashboard hero) — the jar, enlarged
---------------------------------------------------------------------------- */
.vault {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 30px 34px;
  margin-bottom: 30px;
  background:
    radial-gradient(500px 300px at 88% 50%, rgba(212, 160, 23, 0.1), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-raised);
}
.vault__eyebrow { color: var(--honey-deep); }
.vault h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 6px 0 4px;
}
.vault h2 b { color: var(--honey-deep); }
.vault p { color: var(--text-muted); max-width: 46ch; }
.vault__actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

/* Vault jar meter — cookie jar with stacked cookies + overflow */
.vault-jar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.vault-jar__scene {
  position: relative;
  width: 148px;
  height: 156px;
}
.vault-jar__jar {
  position: relative;
  width: 100%;
  height: 100%;
}
.vault-jar__lid {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 11px;
  margin: 0 auto -3px;
  border-radius: 4px;
  background: var(--text);
}
.vault-jar__shine {
  position: absolute;
  z-index: 4;
  top: 18px;
  left: 14px;
  width: 18px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent);
  pointer-events: none;
}
.vault-jar__inner {
  position: relative;
  height: 132px;
  margin: 0 auto;
  width: 108px;
  border: 3px solid var(--text);
  border-radius: 10px 10px 28px 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(253, 251, 247, 0.85));
  overflow: hidden;
  box-shadow: inset 0 -10px 18px rgba(58, 36, 5, 0.06);
}
.vault-jar__inner::before,
.vault-jar__inner::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 10px;
  width: 14px;
  border: 3px solid var(--text);
  border-top: none;
  border-bottom: none;
  opacity: 0.85;
  pointer-events: none;
}
.vault-jar__inner::before {
  left: -8px;
  border-radius: 0 0 0 16px;
  border-right: none;
}
.vault-jar__inner::after {
  right: -8px;
  border-radius: 0 0 16px 0;
  border-left: none;
}
.vault-jar__cookies,
.vault-jar__crumbs,
.vault-jar__overflow {
  position: absolute;
  inset: 0;
}
.vault-jar__overflow {
  z-index: 3;
  pointer-events: none;
}
.vault-jar__cookie {
  position: absolute;
  width: 30px;
  height: 30px;
  transform: translate(-50%, 0) rotate(var(--rot, 0deg));
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.vault-jar__cookie svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 2px rgba(58, 36, 5, 0.12));
}
.vault-jar__cookie--overflow {
  width: 34px;
  height: 34px;
}
.vault-jar__crumb {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--honey-deep);
  transform: translate(-50%, 0);
  opacity: 0.75;
}
.vault-jar.is-empty .vault-jar__inner {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(253, 251, 247, 0.75));
}
.vault-jar__amount,
.vault-jar__credits {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--honey-deep);
  font-size: 1.05rem;
  text-align: center;
  margin: 0;
}
.vault-jar__fraction {
  font-variant-numeric: tabular-nums;
}

/* Avatar wrap — crown badge + custom photo */
.avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.avatar.has-photo,
.profile-summary__avatar.has-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}
.avatar-crown {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: var(--grad-honey);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(58, 36, 5, 0.18);
  z-index: 2;
  pointer-events: none;
  color: var(--honey-deep);
}
.avatar-crown[hidden] {
  display: none !important;
}
.avatar-crown svg,
.avatar-crown img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  display: block;
}
.profile-summary__avatar-wrap .avatar-crown {
  width: 26px;
  height: 26px;
  top: -6px;
  left: -6px;
}
.profile-summary__avatar-wrap .avatar-crown svg,
.profile-summary__avatar-wrap .avatar-crown img {
  width: 86%;
  height: 86%;
}

/* ----------------------------------------------------------------------------
   7. Landing page (index.html)
---------------------------------------------------------------------------- */
.landing { min-height: 100vh; position: relative; }

.landing-nav,
.hero,
.showcase,
.landing-how,
.landing-tiers {
  position: relative;
  z-index: 2;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--landing-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  background: rgba(253, 251, 247, 0.78);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border-bottom: 1px solid rgba(74, 64, 58, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}
.landing-nav__links { display: flex; align-items: center; gap: 10px; }
.landing-nav__links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  transition: color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.landing-nav__links a:hover:not(.is-active) {
  color: var(--text);
  background: var(--cream-2);
}
.landing-nav__links a.is-active {
  color: var(--on-honey);
  font-weight: 600;
  background: var(--grad-honey);
  box-shadow: var(--shadow-honey);
}

.landing-logo {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 4px clamp(20px, 5vw, 64px) 0;
}
.landing-logo__sprinkle {
  position: relative;
  display: inline-block;
  line-height: 0;
  overflow: hidden;
  border-radius: 12px;
}
.landing-logo__img {
  width: min(378px, 85.5vw);
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(10px, 2vw, 20px) clamp(20px, 5vw, 64px) clamp(40px, 8vw, 90px);
  scroll-margin-top: calc(var(--landing-nav-h, 64px) + 16px);
}
.hero__aside {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.hero__aside .auth-card { width: 100%; }
.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  background: var(--grad-honey-soft);
  border: 1px solid rgba(212, 160, 23, 0.35);
  color: var(--honey-deep);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 22px;
}
.hero__tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--honey); }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.03;
  font-weight: 700;
}
.hero h1 .grad {
  background: linear-gradient(118deg, var(--honey-deep) 0%, var(--honey) 42%, #c9920f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.08rem;
  margin: 22px 0 32px;
  max-width: 48ch;
}
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 46px;
}
.hero__stat {
  flex: 1 1 120px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.hero__stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-raised);
}
.hero__stat b {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  display: block;
  color: var(--honey-deep);
  line-height: 1.1;
}
.hero__stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

/* Auth card — the cookie jar: a clean white jar resting on the cream */
.auth-card {
  position: relative;
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-raised);
}
/* the "lid" — a faint honey highlight arcing across the top of the jar */
.auth-card::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 46%;
  border-radius: var(--r-xl) var(--r-xl) 40% 40% / var(--r-xl) var(--r-xl) 100% 100%;
  background: linear-gradient(180deg, rgba(212, 160, 23, 0.07), transparent);
  pointer-events: none;
}
.auth-card > * { position: relative; }

.auth-card__tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  margin-bottom: 26px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--r-pill);
  transition: all 0.2s var(--ease);
}
.auth-tab.is-active { background: var(--grad-honey); color: var(--on-honey); box-shadow: var(--shadow-honey); }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  padding: 13px 16px;
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input::placeholder { color: var(--text-faint); }
.field input:focus {
  background: var(--surface);
  border-color: rgba(94, 147, 171, 0.55);
  box-shadow: 0 0 0 4px rgba(94, 147, 171, 0.13);
  outline: none;
}
.field textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
  resize: vertical;
  min-height: 160px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field textarea::placeholder { color: var(--text-faint); }
.field textarea:focus {
  background: var(--surface);
  border-color: rgba(94, 147, 171, 0.55);
  box-shadow: 0 0 0 4px rgba(94, 147, 171, 0.13);
  outline: none;
}
.field__hint {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 7px;
}
.field--checkbox { margin-bottom: 12px; }
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}
.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--honey-deep);
}
.select--block { width: 100%; border-radius: var(--r-md); padding: 12px 16px; }
.auth-card .hint { font-size: 0.82rem; color: var(--text-faint); text-align: center; margin-top: 16px; }
.auth-msg {
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  margin-bottom: 16px;
  display: none;
}
.auth-msg.is-error { display: block; background: rgba(199, 100, 78, 0.1); color: var(--bad); border: 1px solid rgba(199, 100, 78, 0.28); }
.auth-msg.is-ok { display: block; background: rgba(78, 158, 110, 0.1); color: var(--good); border: 1px solid rgba(78, 158, 110, 0.28); }

.auth-verify {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-verify[hidden],
#auth-panel[hidden],
.auth-card__tabs[hidden] { display: none !important; }
.auth-verify__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 4px;
  border-radius: 50%;
  background: var(--grad-glaze-soft);
  border: 1px solid rgba(94, 147, 171, 0.35);
  color: var(--glaze-deep);
}
.auth-verify__icon svg { width: 26px; height: 26px; }
.auth-verify h3 {
  font-size: 1.2rem;
  margin-bottom: 2px;
}
.auth-verify__lead {
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 30ch;
  margin: 0 auto;
}
.auth-verify__lead strong {
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
}
.auth-verify__back {
  margin-top: 4px;
  font-size: 0.85rem;
}

/* ----------------------------------------------------------------------------
   7a2. Email verification landing (verify-email.html)
---------------------------------------------------------------------------- */
.verify-page {
  min-height: calc(100vh - var(--landing-nav-h));
  display: grid;
  place-items: center;
  padding: 40px 20px 80px;
  position: relative;
  z-index: 2;
}
.verify-card {
  width: min(480px, 100%);
  padding: 0 32px 36px;
  text-align: center;
  overflow: hidden;
}
.verify-card--branded {
  padding-top: 0;
  border-radius: 24px;
  box-shadow: var(--shadow-soft), 0 10px 26px -14px rgba(74, 64, 58, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.verify-card__bar {
  height: 6px;
  align-self: stretch;
  margin: 0 -32px 24px;
  background: var(--grad-honey);
}
.verify-card__logo-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 8px;
}
.verify-card__logo {
  display: block;
  width: min(220px, 78%);
  height: auto;
  margin: 0 0 8px;
}
.verify-card__eyebrow {
  margin-bottom: 14px;
}
.verify-card__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--grad-honey-soft);
  border: 1px solid rgba(212, 160, 23, 0.35);
  color: var(--honey-deep);
  transition: transform 0.35s ease, background 0.35s ease;
}
.verify-card--success .verify-card__icon {
  background: rgba(92, 140, 88, 0.12);
  border-color: rgba(92, 140, 88, 0.35);
  color: var(--good);
  transform: scale(1.04);
}
.verify-card--error .verify-card__icon {
  background: rgba(199, 100, 78, 0.1);
  border-color: rgba(199, 100, 78, 0.28);
  color: var(--bad);
}
.verify-card__icon svg { width: 28px; height: 28px; }
.verify-card h1 {
  font-size: 1.65rem;
  margin-bottom: 10px;
  font-family: var(--font-display);
}
.verify-card .muted {
  max-width: 36ch;
  margin: 0 auto 16px;
  line-height: 1.6;
}
.verify-card .auth-msg {
  text-align: center;
  margin: 0 auto 8px;
  max-width: 36ch;
}
.verify-card .btn {
  margin-top: 12px;
  min-width: 200px;
}
.copy-verify-fallback {
  width: 100%;
  margin-top: 12px;
  text-align: left;
}
.copy-verify-fallback .field { margin-bottom: 12px; }
.copy-verify-fallback input[readonly] {
  font-size: 0.82rem;
  word-break: break-all;
}

/* ----------------------------------------------------------------------------
   7a3. Coming soon (public index during preview)
---------------------------------------------------------------------------- */
.coming-soon {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  position: relative;
  z-index: 2;
}
.coming-soon__card {
  width: min(480px, 100%);
  padding: 40px 32px;
  text-align: center;
}
.coming-soon__logo {
  width: min(240px, 80vw);
  height: auto;
  margin: 0 auto 20px;
}
.coming-soon h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 8px 0 14px;
}
.coming-soon__note {
  margin-top: 18px;
  font-size: 0.88rem;
}

/* ----------------------------------------------------------------------------
   7b. Showcase marquee (landing)
---------------------------------------------------------------------------- */
.showcase {
  padding: 10px 0 56px;
  overflow: hidden;
  scroll-margin-top: calc(var(--landing-nav-h, 64px) + 16px);
}
.showcase__intro {
  max-width: 1240px;
  margin: 0 auto 28px;
  padding: 0 clamp(20px, 5vw, 64px);
  text-align: center;
}
.showcase__intro h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 6px 0 8px;
}
.showcase__intro .muted { max-width: 48ch; margin: 0 auto; }

/* Jar glass — one pane over the whole carousel, not per image */
.showcase__jar {
  position: relative;
}
.showcase__viewport {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 18px 0;
}
.showcase__glass {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    168deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.03) 38%,
    transparent 72%
  );
  transition: opacity 0.5s var(--ease);
}
.showcase__jar:hover .showcase__glass {
  opacity: 0;
}
.showcase__track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  animation: showcase-scroll 52s linear infinite;
  will-change: transform;
}
.showcase__frame {
  flex-shrink: 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.showcase__frame img {
  display: block;
  height: 200px;
  width: auto;
  max-width: none;
  object-fit: cover;
  border-radius: 6px;
}
@keyframes showcase-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ----------------------------------------------------------------------------
   7c. How it works (landing)
---------------------------------------------------------------------------- */
.landing-how {
  padding: clamp(56px, 8vw, 80px) clamp(20px, 5vw, 64px) 80px;
  scroll-margin-top: calc(var(--landing-nav-h, 64px) + 16px);
  background:
    linear-gradient(180deg, transparent 0%, rgba(246, 241, 232, 0.55) 12%, rgba(246, 241, 232, 0.55) 88%, transparent 100%);
  border-top: 1px solid rgba(74, 64, 58, 0.06);
  border-bottom: 1px solid rgba(74, 64, 58, 0.06);
}
.landing-how__inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.landing-how__inner h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 6px 0 32px;
}
.landing-how__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  text-align: left;
}
.landing-how__card {
  padding: 24px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.landing-how__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-raised);
}
.landing-how__card b {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--honey-deep);
  display: block;
  margin-bottom: 10px;
}
.landing-how__card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.landing-how__card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ----------------------------------------------------------------------------
   7c2. Subscriptions (landing, pre-login)
---------------------------------------------------------------------------- */
.landing-tiers {
  padding: 0 clamp(20px, 5vw, 64px) 88px;
  scroll-margin-top: calc(var(--landing-nav-h, 64px) + 16px);
}
.landing-tiers__inner {
  max-width: 1240px;
  margin: 0 auto;
  text-align: center;
}
.landing-tiers__inner h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 6px 0 10px;
}
.landing-tiers__lead {
  max-width: 52ch;
  margin: 0 auto 28px;
}
.landing-tiers .tier-grid {
  grid-template-columns: repeat(3, minmax(220px, 280px));
  justify-content: center;
}
.landing-tiers__note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 62ch;
  margin: 22px auto 0;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: rgba(212, 160, 23, 0.08);
  border: 1px solid rgba(212, 160, 23, 0.22);
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: left;
}
.landing-tiers__note svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--glaze-deep); margin-top: 2px; }
.landing-tiers__note a { color: var(--honey-deep); font-weight: 600; text-decoration: underline; }

/* ----------------------------------------------------------------------------
   7d. Profile & subscription tiers
---------------------------------------------------------------------------- */
a.avatar { text-decoration: none; }

.profile-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px 28px;
  padding: 28px 30px;
  margin-bottom: 36px;
}
.profile-summary.is-loading #profile-credits {
  visibility: hidden;
}
.profile-summary__theme {
  align-self: center;
  justify-self: end;
}
.profile-summary__avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.profile-summary__avatar-wrap {
  width: 72px;
  height: 72px;
}
.profile-summary__upload {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--honey-deep);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}
.profile-summary__upload:hover { color: var(--text); }
.profile-summary__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--grad-honey);
  color: var(--on-honey);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-soft);
}
.profile-summary h2 { font-size: 1.45rem; margin-bottom: 4px; }
.profile-summary__credits {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-weight: 600;
  color: var(--honey-deep);
}
.profile-summary__credits svg { width: 18px; height: 18px; }

.profile-subscription {
  text-align: center;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
.profile-subscription__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  flex-direction: column;
}
.profile-subscription .tier-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}
.profile-subscription .tier-card {
  flex: 1 1 250px;
  max-width: 300px;
}
.profile-subscription__note {
  text-align: center;
  justify-content: center;
}
.profile-subscription__head h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  margin: 4px 0 6px;
}
.profile-subscription__charge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--cream-2);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text);
}
.profile-subscription__charge svg { width: 18px; height: 18px; color: var(--honey-deep); flex-shrink: 0; }

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}
.tier-card {
  position: relative;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tier-card.is-current {
  border-color: rgba(212, 160, 23, 0.55);
  box-shadow: var(--shadow-raised), inset 0 0 0 1px rgba(212, 160, 23, 0.12);
}
.tier-card.is-featured:not(.is-current) {
  border-color: rgba(212, 160, 23, 0.42);
  background: linear-gradient(180deg, rgba(212, 160, 23, 0.07), var(--surface));
  box-shadow: var(--shadow-raised), 0 0 0 1px rgba(212, 160, 23, 0.14);
  transform: translateY(-4px);
}
.tier-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--grad-honey-soft);
  border: 1px solid rgba(212, 160, 23, 0.35);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--honey-deep);
  margin-bottom: 4px;
}
.tier-card__badge svg { width: 14px; height: 14px; }
.tier-card__badge--featured {
  background: rgba(94, 147, 171, 0.14);
  color: var(--glaze-deep);
}
.tier-card h3 { font-size: 1.15rem; }
.tier-card__price {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--honey-deep);
}
.tier-card__credits { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.tier-card__billing { font-size: 0.82rem; }
.tier-card__perks {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  flex: 1;
  align-self: stretch;
  width: 100%;
  text-align: left;
}
.landing-tiers .tier-card h3,
.landing-tiers .tier-card__price,
.landing-tiers .tier-card__billing {
  align-self: stretch;
  text-align: center;
}
.tier-card__perks li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.tier-card__perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--honey);
}
.tier-card__link { margin-top: 14px; }
.tier-card__link svg { width: 16px; height: 16px; }
.tier-card__manage {
  margin-top: 14px;
  font-size: 0.82rem;
  font-style: italic;
}

.profile-subscription .profile-subscription__note {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.profile-danger {
  max-width: 960px;
  margin: 36px auto 0;
  padding: 24px 28px;
  border-color: rgba(199, 100, 78, 0.22);
}
.profile-danger h2 {
  font-size: 1.2rem;
  margin: 4px 0 8px;
}
.profile-danger__text {
  max-width: 52ch;
  margin-bottom: 16px;
}
.btn--danger {
  color: var(--bad);
  border: 1px solid rgba(199, 100, 78, 0.35);
  background: rgba(199, 100, 78, 0.08);
}
.btn--danger:hover {
  background: rgba(199, 100, 78, 0.14);
  color: var(--bad);
}
.profile-delete-modal .request-modal__actions {
  justify-content: flex-end;
}

.profile-subscription__note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--cream-2);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.profile-subscription__note svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--glaze-deep); margin-top: 2px; }
.profile-subscription__note a { color: var(--honey-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------------------------------------
   8. My assets (history list)
---------------------------------------------------------------------------- */
.asset-row {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.asset-row__thumb {
  width: 64px; height: 64px;
  border-radius: var(--r-md);
  object-fit: cover;
  background: var(--grad-honey-soft), var(--cream-2);
}
.asset-row__meta h3 { font-size: 1rem; font-weight: 600; }
.asset-row__meta p { font-size: 0.84rem; color: var(--text-muted); }
.asset-row__date { font-size: 0.84rem; color: var(--text-faint); }

/* ----------------------------------------------------------------------------
   8b. My suggestions
---------------------------------------------------------------------------- */
.suggestion-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 18px;
  padding: 18px 20px;
  margin-bottom: 12px;
}
.suggestion-row__meta h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.suggestion-row__meta p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.suggestion-row__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.suggestion-row__date {
  font-size: 0.84rem;
  color: var(--text-faint);
  white-space: nowrap;
}

/* ----------------------------------------------------------------------------
   8c. Cookie's Story Shelf
---------------------------------------------------------------------------- */
.story-shelf__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.story-shelf__card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.story-shelf__cover {
  display: block;
  width: 100%;
  height: auto;
}
.story-shelf__body {
  padding: 18px 20px 22px;
}
.story-shelf__body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.story-shelf__traits {
  list-style: none;
  margin: 0;
  padding: 0;
}
.story-shelf__traits li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.story-shelf__traits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--honey);
}
.story-shelf__author {
  margin: 14px 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.story-shelf__author span {
  font-weight: 600;
  color: var(--text-faint);
  margin-right: 6px;
}

/* ----------------------------------------------------------------------------
   8d. Featured Outfits
---------------------------------------------------------------------------- */
.outfit-filters {
  margin-bottom: 22px;
}
.outfit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.outfit-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.outfit-card[hidden] {
  display: none;
}
.outfit-card__media {
  position: relative;
}
.outfit-card__view {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  position: relative;
  line-height: 0;
}
.outfit-card__view:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 2px;
}
.outfit-card__cover {
  display: block;
  width: 100%;
  height: auto;
}
.outfit-card__expand {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(74, 64, 58, 0.12);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  pointer-events: none;
}
.outfit-card__expand svg {
  width: 18px;
  height: 18px;
}
.outfit-card__gender {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  color: #fff;
  pointer-events: none;
  line-height: 0;
}
.outfit-card__gender svg {
  display: block;
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}
.outfit-card__gender--female {
  background: #ff1493;
}
.outfit-card__gender--male {
  background: #007bff;
}
.outfit-card__meta {
  display: none;
}

.outfit-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  padding: clamp(16px, 4vw, 40px);
  background: rgba(26, 20, 16, 0.82);
  cursor: zoom-out;
}
.outfit-lightbox.is-open {
  display: grid;
}
.outfit-lightbox[hidden] {
  display: none !important;
}
.outfit-lightbox__panel {
  position: relative;
  width: min(96vw, 980px);
  max-height: calc(100dvh - clamp(32px, 6vw, 80px));
  overflow: hidden;
  padding: clamp(18px, 2.5vw, 28px);
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-raised);
  cursor: default;
  display: flex;
  flex-direction: column;
}
.outfit-lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--cream-2);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.outfit-lightbox__close:hover {
  background: var(--cream);
  transform: scale(1.04);
}
.outfit-lightbox__close svg {
  width: 18px;
  height: 18px;
}
.outfit-lightbox__title {
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 40px 16px;
  line-height: 1.25;
}
.outfit-lightbox__layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  overflow: hidden;
}
.outfit-lightbox__media {
  min-height: 0;
  max-height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  overflow: hidden;
}
.outfit-lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(68dvh, 100%);
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
}
.outfit-lightbox__details {
  min-height: 0;
  overflow: hidden;
  text-align: left;
  align-self: start;
  padding-top: 1.5em;
}
.outfit-lightbox__label {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #3a322c;
  margin: 0 0 12px;
}
.outfit-lightbox__items {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}
.outfit-lightbox__items li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 10px;
  font-size: 0.94rem;
  color: #1f1a17;
  line-height: 1.5;
}
.outfit-lightbox__items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--honey);
}
body.outfit-lightbox-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .outfit-lightbox__layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .outfit-lightbox__media {
    justify-content: center;
  }
  .outfit-lightbox__details {
    padding-top: 0;
  }
  .outfit-lightbox__title {
    margin-bottom: 12px;
  }
  .outfit-lightbox__img {
    max-height: min(42dvh, 100%);
  }
}

/* ----------------------------------------------------------------------------
   9. Roadmap (voting)
---------------------------------------------------------------------------- */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.request {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px;
}
.request__body { flex: 1; min-width: 0; width: 100%; }
.request__author {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 4px 0 8px;
}
.request__author strong {
  color: var(--text);
  font-weight: 600;
}
.request__footer {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  width: 100%;
}
.request__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border: none;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.request__action svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.request__action:hover {
  color: var(--honey-deep);
  background: rgba(212, 160, 23, 0.08);
}
.request__action.is-liked {
  color: var(--honey-deep);
}
.request__action.is-liked svg {
  fill: var(--honey-deep);
  stroke: var(--honey-deep);
}
.request__action b {
  font-family: var(--font-display);
  font-weight: 700;
}
.vote {
  /* legacy — likes now use .request__action */
  display: none;
}
.request__action--like svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.request__action--like.is-liked svg {
  fill: currentColor;
}

.request__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.request__head h3 { flex: 1 1 auto; margin-bottom: 0; }
.request__vault-link {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background: rgba(78, 158, 110, 0.14);
  color: var(--good);
  border: 1px solid rgba(78, 158, 110, 0.28);
  flex-shrink: 0;
}
.request__vault-link svg { width: 18px; height: 18px; }

.request__body { flex: 1; min-width: 0; }
.request__body h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.request__body > p { font-size: 0.88rem; color: var(--text-muted); }
.request__tags { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--cream-2);
  color: var(--text-muted);
}
.tag--suggestion { background: rgba(74, 64, 58, 0.08); color: var(--text-muted); }
.tag--planned { background: rgba(94, 147, 171, 0.16); color: var(--glaze-deep); }
.tag--progress { background: rgba(212, 160, 23, 0.18); color: var(--honey-deep); }
.tag--done { background: rgba(78, 158, 110, 0.16); color: var(--good); }

.request__admin {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.request__status-select,
.request__vault-input {
  font: inherit;
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.request__vault-input { flex: 1 1 160px; min-width: 140px; }

.request__comments { margin-top: 14px; width: 100%; }
.request__comments-toggle {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--honey-deep);
  padding: 0;
}
.request__comments-toggle:hover { text-decoration: underline; }
.request__comments-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.request__comments-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.request__comments-list li {
  font-size: 0.84rem;
  line-height: 1.45;
}
.request__comments-list li p { margin: 4px 0 0; color: var(--text); }
.request__comments-list li strong { font-weight: 600; }
.request__comments-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.request__comments-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  font: inherit;
  font-size: 0.86rem;
}

.btn--sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

/* ----------------------------------------------------------------------------
   9c. Suggestion lightbox (roadmap comments)
---------------------------------------------------------------------------- */
.suggestion-lightbox {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: none;
  place-items: center;
  padding: clamp(16px, 4vw, 40px);
  background: rgba(26, 20, 16, 0.82);
  cursor: zoom-out;
}
.suggestion-lightbox.is-open {
  display: grid;
}
.suggestion-lightbox[hidden] {
  display: none !important;
}
.suggestion-lightbox__panel {
  position: relative;
  width: min(96vw, 980px);
  max-height: calc(100dvh - clamp(32px, 6vw, 80px));
  overflow: hidden;
  padding: clamp(18px, 2.5vw, 28px);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-raised);
  cursor: default;
  display: flex;
  flex-direction: column;
}
.suggestion-lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--cream-2);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.suggestion-lightbox__close svg { width: 18px; height: 18px; }
.suggestion-lightbox__layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(16px, 2.5vw, 28px);
  overflow: hidden;
}
.suggestion-lightbox__post {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.suggestion-lightbox__post h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  margin: 0 40px 10px 0;
  line-height: 1.25;
}
.suggestion-lightbox__post .request__author {
  margin-top: 0;
}
.suggestion-lightbox__post > p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.suggestion-lightbox__post .request__tags {
  margin-top: 14px;
}
.suggestion-lightbox__post .request__footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.suggestion-lightbox__comments {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  padding-left: clamp(14px, 2vw, 22px);
}
.suggestion-lightbox__comments-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.suggestion-lightbox__comments-head svg {
  width: 18px;
  height: 18px;
  color: var(--honey-deep);
}
.suggestion-lightbox__comments-head h3 {
  font-size: 1rem;
  margin: 0;
}
.suggestion-lightbox__list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.suggestion-lightbox__comment {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--cream-2);
  border: 1px solid var(--border);
}
.suggestion-lightbox__comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.suggestion-lightbox__comment-head strong {
  font-size: 0.86rem;
}
.suggestion-lightbox__comment p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}
.suggestion-lightbox__comment-like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border: none;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.suggestion-lightbox__comment-like svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.suggestion-lightbox__comment-like.is-liked {
  color: var(--honey-deep);
}
.suggestion-lightbox__comment-like.is-liked svg {
  fill: currentColor;
  stroke: currentColor;
}
.suggestion-lightbox__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  flex-shrink: 0;
}
.suggestion-lightbox__form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  resize: vertical;
  min-height: 72px;
  background: var(--cream-2);
}
body.suggestion-lightbox-open {
  overflow: hidden;
}
@media (max-width: 820px) {
  .suggestion-lightbox__layout {
    grid-template-columns: 1fr;
    overflow: auto;
  }
  .suggestion-lightbox__comments {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 16px;
  }
}

/* ----------------------------------------------------------------------------
   9b. Request modal (roadmap)
---------------------------------------------------------------------------- */
.request-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-hi);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  color: var(--text);
}
.request-modal::backdrop {
  background: rgba(74, 64, 58, 0.45);
}
.request-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 0;
}
.request-modal__head h2 {
  font-size: 1.45rem;
  margin: 4px 0 6px;
}
.request-modal__head .muted { font-size: 0.9rem; max-width: 40ch; }
.request-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--cream-2);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.request-modal__close:hover { background: var(--cream); color: var(--text); }
.request-modal__close svg { width: 18px; height: 18px; }
.request-modal form { padding: 20px 28px 28px; }
.request-modal .auth-msg { margin: 0 28px; }
.request-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------------------------
   10. Empty / loading / toast
---------------------------------------------------------------------------- */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty svg { width: 54px; height: 54px; color: var(--text-faint); margin-bottom: 14px; }
.empty h3 { font-size: 1.2rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }

.skeleton {
  background: linear-gradient(100deg, var(--cream-2) 30%, #ffffff 50%, var(--cream-2) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
  border-radius: var(--r-lg);
  min-height: 300px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.toast-wrap {
  position: fixed;
  bottom: 26px; right: 26px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  min-width: 260px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border-hi);
  box-shadow: var(--shadow-raised);
  color: var(--text);
}
.toast svg { width: 20px; height: 20px; flex-shrink: 0; }
.toast--ok svg { color: var(--good); }
.toast--bad svg { color: var(--bad); }
.toast--info svg { color: var(--glaze-deep); }
.toast { animation: toast-in 0.35s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------------------
   11. Responsive
---------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero__stats { justify-content: flex-start; }
  .vault { grid-template-columns: 1fr; }
  .vault__jar { justify-self: start; }
  .landing-tiers .tier-grid {
    grid-template-columns: minmax(220px, 340px);
    justify-content: center;
  }
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
    box-shadow: var(--shadow-raised);
  }
  .app.nav-open .sidebar { transform: translateX(0); }
  .menu-toggle { display: grid; }
  .scrim {
    position: fixed;
    inset: 0;
    background: rgba(74, 64, 58, 0.4);
    z-index: 35;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .app.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .jar__label { display: none; }
  .landing-nav__links { display: none; }
}

@media (max-width: 560px) {
  .jar__amount { font-size: 0.95rem; }
  .search { max-width: none; }
  .theme-picker { align-items: flex-start; width: 100%; }
  .profile-summary {
    grid-template-columns: auto 1fr;
  }
  .profile-summary__theme {
    grid-column: 1 / -1;
    justify-self: start;
    border-left: none;
    padding-left: 0;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  .asset-row { grid-template-columns: 52px 1fr; row-gap: 10px; }
  .asset-row__date { grid-column: 2; }
  .toast-wrap { left: 16px; right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .showcase__track { animation: none; }
  .cookie-rain { display: none; }
  .site-grain { display: none; }
  .crumb-particle { display: none; }
}
