/* =========================================================
   Mountaintop Yarn — Interactive Playground
   Shared stylesheet
   ========================================================= */

:root {
  /* ---- Mountaintop palette ----
     Pine forest greens, slate stone, sage lichen, cedar bark,
     alpenglow sunset, and larch-needle gold.
     Variable names kept for backward compat; values reflect
     the new alpine theme. */
  --emerald:       #234a3c;   /* pine — primary forest */
  --emerald-deep:  #0e2820;   /* deepest pine (near-black) */
  --emerald-soft:  #7a9385;   /* sage / lichen */
  --cream:         #f1f4ef;   /* mist / cool fog */
  --cream-warm:    #e6ebe2;   /* slightly warmer mist with cedar undertone */
  --peach:         #d68257;   /* alpenglow — sunset on peaks */
  --peach-deep:    #b25a3a;   /* ember sunset */
  --walnut:        #3a2818;   /* deep cedar bark */
  --walnut-soft:   #7a5c42;   /* cedar wood */
  --mountain:      #4f6b78;   /* slate — cool stone */
  --gold:          #b8964e;   /* larch — autumn needles */
  --gold-bright:   #d6b06a;   /* larch highlight */
  --ink:           #1a2420;   /* deep forest shadow (body text) */

  /* Optional aliases that read more naturally for new code */
  --pine:          var(--emerald);
  --pine-deep:     var(--emerald-deep);
  --sage:          var(--emerald-soft);
  --slate:         var(--mountain);
  --granite:       #8a96a0;
  --shale:         #2a3640;
  --snow:          #fbfcfa;
  --mist:          var(--cream);
  --cedar:         var(--walnut);
  --bark:          #1e1208;
  --alpenglow:     var(--peach);
  --ember:         var(--peach-deep);
  --larch:         var(--gold);

  --shadow-sm: 0 2px 8px rgba(14, 40, 32, 0.10);
  --shadow-md: 0 6px 22px rgba(14, 40, 32, 0.16);
  --shadow-lg: 0 18px 48px rgba(14, 40, 32, 0.26);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 26px;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --display: "Playfair Display", Georgia, serif;
  --hand: "Caveat", "Bradley Hand", cursive;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--cream);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 85% 0%, rgba(214, 130, 87, 0.16), transparent 55%),     /* alpenglow upper right */
    radial-gradient(ellipse at 0% 100%, rgba(79, 107, 120, 0.14), transparent 60%),    /* slate haze lower left */
    radial-gradient(ellipse at 50% 50%, rgba(35, 74, 60, 0.06), transparent 70%),      /* pine vignette */
    var(--cream);
  overflow-x: hidden;
}

a { color: var(--emerald); text-decoration: none; }
a:hover { color: var(--peach-deep); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; color: var(--emerald-deep); margin: 0 0 0.4em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }

.script {
  font-family: var(--hand);
  font-weight: 600;
  color: var(--peach-deep);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   ANNOUNCEMENT STRIP
   ========================================================= */
.announcement {
  background: var(--emerald-deep);
  color: var(--cream);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-align: center;
  padding: 8px 16px;
  position: relative;
  overflow: hidden;
}
.announcement-track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: ticker 35s linear infinite;
  padding-left: 60px;
}
.announcement-track span::before {
  content: "🧶";
  margin-right: 8px;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(241, 244, 239, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(35, 74, 60, 0.18);
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--emerald-deep);
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, var(--gold-bright), var(--peach) 55%, var(--peach-deep) 100%);
  position: relative;
  box-shadow: var(--shadow-sm), inset -6px -6px 14px rgba(0, 0, 0, 0.18);
}
.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.45);
}
.brand-mark::after {
  inset: 14px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.3);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-text .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}
.brand-text .tag {
  font-family: var(--hand);
  font-size: 1.1rem;
  color: var(--peach-deep);
  margin-top: 2px;
}

nav.primary {
  flex: 1;
}
nav.primary > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}
nav.primary > ul > li {
  position: relative;
}
nav.primary a.nav-link {
  display: inline-block;
  padding: 10px 14px;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--emerald-deep);
  border-radius: 10px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
nav.primary a.nav-link:hover,
nav.primary li:hover > a.nav-link,
nav.primary a.nav-link.active {
  background: var(--emerald);
  color: var(--cream);
  transform: translateY(-1px);
}
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 8px);
  background: var(--cream);
  border: 1px solid rgba(35, 74, 60, 0.15);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 14px;
  min-width: 240px;
  list-style: none;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
}
nav.primary li:hover > .dropdown,
nav.primary li:focus-within > .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.dropdown a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 500;
}
.dropdown a:hover {
  background: var(--cream-warm);
  color: var(--emerald-deep);
}
.dropdown .heading {
  font-family: var(--hand);
  color: var(--peach-deep);
  font-size: 1.1rem;
  padding: 4px 12px 6px;
}
.dropdown .sub {
  list-style: none;
  margin: 0 0 6px;
  padding: 0 0 6px 8px;
  border-left: 2px dashed rgba(35, 74, 60, 0.25);
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.icon-btn {
  border: 1px solid rgba(35, 74, 60, 0.25);
  background: transparent;
  color: var(--emerald-deep);
  padding: 8px 12px;
  border-radius: 999px;
  font-family: var(--serif);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.icon-btn:hover {
  background: var(--emerald);
  color: var(--cream);
  transform: translateY(-1px);
}
.cart-pill .count {
  display: inline-block;
  margin-left: 6px;
  background: var(--peach);
  color: var(--ink);
  border-radius: 999px;
  padding: 1px 8px;
  font-weight: 700;
  font-size: 0.8rem;
}

.menu-toggle {
  display: none;
  background: var(--emerald);
  color: var(--cream);
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

@media (max-width: 920px) {
  nav.primary {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--cream);
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.3s;
    overflow-y: auto;
    z-index: 90;
  }
  nav.primary.open { transform: translateX(0); }
  nav.primary > ul { flex-direction: column; align-items: stretch; gap: 6px; }
  .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 4px 8px 12px;
  }
  .menu-toggle { display: inline-block; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
}
/* Far range — soft slate haze */
.hero::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 220px;
  background: var(--slate);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 220' preserveAspectRatio='none'><polygon points='0,220 90,170 200,195 320,140 440,180 560,120 680,165 800,110 920,160 1040,130 1140,170 1200,150 1200,220'/></svg>") no-repeat bottom / 100% 100%;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 220' preserveAspectRatio='none'><polygon points='0,220 90,170 200,195 320,140 440,180 560,120 680,165 800,110 920,160 1040,130 1140,170 1200,150 1200,220'/></svg>") no-repeat bottom / 100% 100%;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
/* Near range — pine ridge */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 160px;
  background: var(--pine);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 160' preserveAspectRatio='none'><polygon points='0,160 80,110 170,135 260,75 360,125 460,55 560,115 660,80 760,40 860,105 960,75 1060,120 1160,65 1200,105 1200,160'/></svg>") no-repeat bottom / 100% 100%;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 160' preserveAspectRatio='none'><polygon points='0,160 80,110 170,135 260,75 360,125 460,55 560,115 660,80 760,40 860,105 960,75 1060,120 1160,65 1200,105 1200,160'/></svg>") no-repeat bottom / 100% 100%;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--hand);
  color: var(--peach-deep);
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.hero h1 .accent {
  color: var(--peach-deep);
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.05em;
}
.hero p.lede {
  font-size: 1.15rem;
  color: var(--walnut);
  max-width: 50ch;
  line-height: 1.6;
}
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.yarn-blob {
  width: 90%;
  max-width: 460px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, var(--gold-bright), var(--peach) 35%, var(--emerald-soft) 70%, var(--emerald) 100%);
  box-shadow:
    inset -20px -20px 40px rgba(0, 0, 0, 0.35),
    inset 20px 20px 40px rgba(255, 255, 255, 0.18),
    0 30px 60px rgba(35, 74, 60, 0.35);
  position: relative;
  animation: yarn-bob 6s ease-in-out infinite;
}
@keyframes yarn-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}
.yarn-blob::before, .yarn-blob::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.yarn-blob::before {
  background: repeating-conic-gradient(from 12deg at 60% 40%, transparent 0deg 18deg, rgba(0, 0, 0, 0.18) 18deg 22deg);
  mix-blend-mode: multiply;
  opacity: 0.55;
}
.yarn-blob::after {
  background: repeating-conic-gradient(from 65deg at 40% 60%, transparent 0deg 22deg, rgba(255, 255, 255, 0.22) 22deg 26deg);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
  background: var(--emerald);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--emerald-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--cream);
}
.btn-ghost {
  background: transparent;
  color: var(--emerald-deep);
  border: 2px solid var(--emerald-deep);
}
.btn-ghost:hover {
  background: var(--emerald-deep);
  color: var(--cream);
}
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* =========================================================
   SECTION SCAFFOLD
   ========================================================= */
section.block {
  padding: 70px 0;
}
section.block.alt {
  background: var(--cream-warm);
}
.section-head {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 40px;
}
.section-head .eyebrow {
  font-family: var(--hand);
  color: var(--peach-deep);
  font-size: 1.4rem;
  margin-bottom: 4px;
}
.section-head p {
  color: var(--walnut);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* =========================================================
   PRODUCT/CARD GRID
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.card {
  background: var(--cream);
  border: 1px solid rgba(35, 74, 60, 0.12);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow-sm);
}
.card:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow: var(--shadow-md);
}
.card .swatch {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.card .swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 40%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 6px);
  pointer-events: none;
}
.card .label {
  padding: 14px 16px 18px;
}
.card .label h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
  color: var(--emerald-deep);
}
.card .label .price {
  font-family: var(--hand);
  font-size: 1.3rem;
  color: var(--peach-deep);
}

/* yarn-ball ‘swatch’ background helper — set var(--c1) and --c2 inline */
.yarn-swatch {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 35%),
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.25), transparent 50%),
    linear-gradient(135deg, var(--c1, var(--peach)) 0%, var(--c2, var(--emerald)) 100%);
}

/* =========================================================
   PILL TAGS
   ========================================================= */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.pills li a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid rgba(35, 74, 60, 0.2);
  color: var(--emerald-deep);
  font-weight: 600;
}
.pills li a:hover {
  background: var(--emerald);
  color: var(--cream);
}

/* =========================================================
   TESTIMONIALS / NEWSLETTER
   ========================================================= */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.testimonial {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(35, 74, 60, 0.1);
  transform: rotate(-0.5deg);
  transition: transform 0.2s;
}
.testimonial:nth-child(even) { transform: rotate(0.7deg); }
.testimonial:hover { transform: rotate(0) translateY(-2px); }
.testimonial p {
  font-family: var(--hand);
  font-size: 1.3rem;
  color: var(--walnut);
  margin: 0 0 10px;
}
.testimonial .who {
  font-weight: 700;
  color: var(--emerald-deep);
}

.newsletter {
  background: var(--emerald);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: 50px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter h2 { color: var(--cream); }
.newsletter p { color: rgba(241, 244, 239, 0.85); max-width: 50ch; margin: 0 auto 22px; line-height: 1.6; }
.newsletter form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 14px 18px;
  border-radius: 999px;
  border: none;
  font-family: var(--serif);
  font-size: 1rem;
}
.newsletter .btn-primary { background: var(--peach); color: var(--ink); }
.newsletter .btn-primary:hover { background: var(--gold-bright); }

/* =========================================================
   FOOTER
   ========================================================= */
footer.site-footer {
  background: var(--emerald-deep);
  color: var(--cream);
  padding: 60px 0 30px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 30px;
}
.footer-grid h4 {
  color: var(--gold-bright);
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid ul li { margin-bottom: 6px; }
.footer-grid a { color: rgba(241, 244, 239, 0.8); }
.footer-grid a:hover { color: var(--peach); }

.socials {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(241, 244, 239, 0.1);
  font-size: 1rem;
}
.socials a:hover { background: var(--peach); color: var(--ink); }

.legal {
  border-top: 1px solid rgba(241, 244, 239, 0.15);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: rgba(241, 244, 239, 0.6);
}

/* =========================================================
   YARN-PULL INTERACTIVE
   ========================================================= */
.yarn-pull-zone {
  position: relative;
  background: linear-gradient(135deg, var(--cream-warm), var(--cream));
  border: 2px dashed var(--emerald-soft);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  margin-top: 24px;
  overflow: hidden;
  text-align: center;
  min-height: 360px;
}
.yarn-pull-zone .instruction {
  font-family: var(--hand);
  color: var(--walnut);
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.yarn-stage {
  position: relative;
  height: 260px;
  user-select: none;
  -webkit-user-select: none;
}
.yarn-ball-pull {
  position: absolute;
  top: 30px;
  left: 50%;
  width: 140px;
  height: 140px;
  margin-left: -70px;
  border-radius: 50%;
  cursor: grab;
  background:
    radial-gradient(circle at 30% 30%, var(--gold-bright), var(--peach) 40%, var(--emerald-soft) 75%, var(--emerald) 100%);
  box-shadow:
    inset -16px -16px 30px rgba(0, 0, 0, 0.35),
    inset 14px 14px 24px rgba(255, 255, 255, 0.18),
    0 14px 30px rgba(35, 74, 60, 0.3);
  transition: transform 0.1s;
  touch-action: none;
}
.yarn-ball-pull.dragging { cursor: grabbing; }
.yarn-ball-pull::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 30deg, transparent 0 18deg, rgba(0, 0, 0, 0.2) 18deg 22deg);
  mix-blend-mode: multiply;
}
.yarn-string {
  position: absolute;
  top: 90px;
  left: 50%;
  width: 4px;
  height: 0;
  background: var(--peach-deep);
  border-radius: 4px;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 6px rgba(178, 90, 58, 0.5);
}
.yarn-string-end {
  position: absolute;
  top: 90px;
  left: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--peach-deep);
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), inset -3px -3px 6px rgba(0, 0, 0, 0.2);
  cursor: grab;
  touch-action: none;
}
.yarn-stage[data-active="1"] .yarn-string-end { cursor: grabbing; }
.yarn-result {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.5s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.yarn-result.visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.yarn-result-card {
  background: var(--cream);
  padding: 22px 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: center;
  border: 2px solid var(--peach);
}
.yarn-result-card .name {
  font-family: var(--display);
  font-size: 1.8rem;
  color: var(--emerald-deep);
  margin: 4px 0;
}
.yarn-result-card .desc {
  color: var(--walnut);
  font-size: 0.95rem;
  margin: 0 0 12px;
  max-width: 32ch;
}
.yarn-pull-counter {
  font-family: var(--hand);
  font-size: 1.2rem;
  color: var(--emerald-deep);
  margin-top: 8px;
}

/* =========================================================
   SECRET CODE — placed letters on each page
   ========================================================= */
.code-tag {
  position: fixed;
  z-index: 70;
  width: 78px;
  min-height: 92px;
  padding: 10px 8px 14px;
  background: var(--cream);
  border: 2px solid var(--emerald);
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transform: rotate(var(--rot, -4deg));
  transition: transform 0.25s, box-shadow 0.25s;
  animation: tag-bob 4s ease-in-out infinite;
}
.code-tag::before {
  content: "";
  position: absolute;
  top: -22px;
  left: 50%;
  width: 2px;
  height: 22px;
  background: var(--peach-deep);
  transform: translateX(-50%);
}
.code-tag::after {
  content: "";
  position: absolute;
  top: -28px;
  left: 50%;
  width: 14px;
  height: 14px;
  background: var(--peach-deep);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.code-tag:hover {
  transform: rotate(0deg) scale(1.08);
  box-shadow: var(--shadow-lg);
}
.code-tag.found {
  opacity: 0.5;
  border-color: var(--emerald-soft);
  background: var(--cream-warm);
}
.code-tag.found::after { background: var(--emerald-soft); }
.code-tag .pos {
  display: block;
  font-family: var(--hand);
  font-size: 0.95rem;
  color: var(--peach-deep);
  margin-bottom: 2px;
}
.code-tag .ch {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--emerald-deep);
  line-height: 1;
}
@keyframes tag-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

/* Decoder pouch — floating widget */
.decoder {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 280px;
  background: var(--cream);
  border: 2px solid var(--emerald-deep);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  z-index: 80;
  font-size: 0.9rem;
  transition: transform 0.3s, opacity 0.3s;
}
.decoder.collapsed {
  transform: translateY(calc(100% - 44px));
}
.decoder header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  color: var(--emerald-deep);
}
.decoder header .toggle {
  background: var(--emerald);
  color: var(--cream);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
}
.decoder .progress {
  font-family: var(--hand);
  color: var(--walnut);
  font-size: 1.1rem;
  margin: 6px 0 8px;
}
.decoder .slots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.decoder .slot {
  width: 28px;
  height: 36px;
  border: 1.5px dashed var(--emerald-soft);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: var(--emerald-deep);
  background: var(--cream-warm);
}
.decoder .slot.filled {
  border-style: solid;
  border-color: var(--emerald);
  background: var(--cream);
}
.decoder .reset {
  margin-top: 8px;
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid var(--walnut-soft);
  color: var(--walnut);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}
.decoder.complete {
  border-color: var(--gold);
  box-shadow: 0 0 0 6px rgba(184, 150, 78, 0.25), var(--shadow-lg);
}
.decoder.complete header { color: var(--gold); }

/* =========================================================
   ADMIN PAGE
   ========================================================= */
.admin {
  max-width: 720px;
  margin: 60px auto;
  background: var(--cream);
  border: 1px solid rgba(35, 74, 60, 0.15);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}
.admin h1 .accent { color: var(--peach-deep); font-family: var(--hand); }
.admin label {
  display: block;
  font-weight: 600;
  margin-top: 14px;
  margin-bottom: 6px;
  color: var(--emerald-deep);
}
.admin input[type="text"], .admin textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(35, 74, 60, 0.3);
  border-radius: 10px;
  font-family: var(--serif);
  font-size: 1rem;
  background: var(--cream-warm);
}
.admin input[type="text"]:focus, .admin textarea:focus {
  outline: none;
  border-color: var(--emerald);
  background: var(--cream);
}
.admin .helper {
  color: var(--walnut-soft);
  font-size: 0.9rem;
  margin: 6px 0 0;
}
.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.admin .preview {
  margin-top: 26px;
  padding: 18px;
  background: var(--cream-warm);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--gold);
}
.admin .preview h3 {
  margin-top: 0;
  color: var(--emerald-deep);
}
.admin .placement {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.admin .placement .item {
  background: var(--cream);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(35, 74, 60, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin .placement .item .b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--peach-deep);
  background: var(--cream-warm);
  border-radius: 6px;
  width: 34px;
  height: 36px;
  display: grid;
  place-items: center;
}
.admin .placement .item .pg {
  flex: 1;
  font-size: 0.92rem;
}
.admin .placement .item .num {
  font-family: var(--hand);
  color: var(--walnut);
}

/* =========================================================
   SPARKLES / CONFETTI / CURSOR FOLLOWER
   ========================================================= */
.click-spark {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 18px;
  animation: spark 0.8s ease-out forwards;
}
@keyframes spark {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; }
}

.yarn-trail {
  position: fixed;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.55;
  mix-blend-mode: multiply;
}

/* =========================================================
   FLOATING CONFETTI ON PAGE LOAD
   ========================================================= */
.bg-yarn {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-yarn span {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  opacity: 0.18;
  animation: float-yarn 18s linear infinite;
}
@keyframes float-yarn {
  from { transform: translateY(110vh) rotate(0); }
  to   { transform: translateY(-20vh) rotate(360deg); }
}

/* utility */
.center { text-align: center; }
.mt-2 { margin-top: 1rem; } .mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 2rem; }
.muted { color: var(--walnut-soft); }
.note {
  background: var(--cream-warm);
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  border-radius: 8px;
  font-style: italic;
  color: var(--walnut);
}

/* generic content prose */
.prose { max-width: 720px; margin: 0 auto; line-height: 1.7; color: var(--ink); }
.prose p { margin-bottom: 1em; }
.prose ul, .prose ol { line-height: 1.7; }

/* =========================================================
   COZY CAMPFIRE HOMEPAGE SCENE
   ========================================================= */
.campfire {
  position: relative;
  background: linear-gradient(180deg, #0e1c2a 0%, #16263a 60%, #1f3344 100%);
  color: var(--cream);
  padding: 0;
  overflow: hidden;
  border-radius: 0;
}
.campfire-inner {
  position: relative;
  min-height: 420px;
  padding: 60px 0 40px;
  display: grid;
  place-items: center;
  text-align: center;
}
.campfire-text { position: relative; z-index: 5; max-width: 720px; padding: 0 24px; }
.campfire-text h2 { color: var(--cream); font-size: clamp(2rem, 4vw, 3rem); }
.campfire-text p { color: rgba(241, 244, 239, 0.85); font-size: 1.05rem; }
.campfire-text .accent { color: var(--gold-bright); font-family: var(--hand); }
.campfire-controls { position: absolute; top: 16px; right: 16px; z-index: 6; display: flex; gap: 8px; }
.campfire-controls button {
  background: rgba(0, 0, 0, 0.35);
  color: var(--cream);
  border: 1px solid rgba(241, 244, 239, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--serif);
}
.campfire-controls button:hover { background: rgba(241, 244, 239, 0.18); }
.cabin {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 180px;
  z-index: 2;
}
.cabin .body {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 110px;
  background: linear-gradient(180deg, #5a3825, #3a2415);
  border-radius: 4px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}
.cabin .roof {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 130px solid transparent;
  border-right: 130px solid transparent;
  border-bottom: 70px solid #2a1810;
}
.cabin .window {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  background: radial-gradient(circle at 50% 50%, #ffd07a, #c97e1c 70%);
  bottom: 50px;
  box-shadow: 0 0 22px rgba(255, 200, 100, 0.85), 0 0 60px rgba(255, 200, 100, 0.4);
  animation: window-flicker 4s ease-in-out infinite;
}
.cabin .window.left { left: 56px; }
.cabin .window.right { right: 56px; animation-delay: 1.3s; }
.cabin .door {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 64px;
  background: linear-gradient(180deg, #2a1810, #1a0e08);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 0 22px rgba(255, 200, 100, 0.45);
}
.cabin .smoke {
  position: absolute;
  bottom: 170px;
  left: 50%;
  margin-left: -8px;
  width: 16px;
  height: 16px;
  background: rgba(180, 180, 200, 0.4);
  border-radius: 50%;
  filter: blur(8px);
  animation: smoke-rise 6s linear infinite;
}
.cabin .smoke.b2 { animation-delay: 2s; left: calc(50% + 4px); }
.cabin .smoke.b3 { animation-delay: 4s; left: calc(50% - 4px); }
@keyframes window-flicker { 0%, 100% { opacity: 1; } 45% { opacity: 0.92; } 55% { opacity: 1; } 70% { opacity: 0.85; } 80% { opacity: 1; } }
@keyframes smoke-rise { 0% { transform: translateY(0) scale(0.6); opacity: 0.5; } 100% { transform: translateY(-110px) scale(2); opacity: 0; } }
.fire {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 60px;
  z-index: 3;
}
.fire .flame {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 24px;
  height: 40px;
  margin-left: -12px;
  background: radial-gradient(circle at 50% 80%, #ffd070, #ff8a3a 50%, #d04020 90%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  filter: drop-shadow(0 0 18px rgba(255, 140, 60, 0.7));
  animation: flame 0.8s ease-in-out infinite alternate;
}
.fire .flame.b { width: 14px; height: 28px; margin-left: 4px; animation-delay: 0.2s; }
.fire .flame.c { width: 16px; height: 26px; margin-left: -22px; animation-delay: 0.4s; }
.fire .logs {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 12px;
  background: linear-gradient(180deg, #5a3825, #2a1810);
  border-radius: 3px;
}
@keyframes flame {
  from { transform: scaleY(1)   skewX(-2deg); }
  to   { transform: scaleY(1.1) skewX(2deg); }
}
.snow, .snow span {
  position: absolute;
  pointer-events: none;
  z-index: 4;
}
.snow { inset: 0; overflow: hidden; }
.snow span {
  top: -10px;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  animation: snow-fall linear infinite;
}
@keyframes snow-fall {
  to { transform: translate(var(--dx, 30px), 110vh); }
}
.yarn-basket {
  position: absolute;
  bottom: 10px;
  width: 70px;
  height: 56px;
  cursor: pointer;
  z-index: 4;
  transition: transform 0.2s;
}
.yarn-basket:hover { transform: translateY(-4px) rotate(-3deg); }
.yarn-basket.left  { left: 8%; }
.yarn-basket.right { right: 8%; }
.yarn-basket .basket {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: repeating-linear-gradient(45deg, #6b4a26, #6b4a26 4px, #4a3018 4px, #4a3018 8px);
  border-radius: 0 0 35px 35px / 0 0 24px 24px;
  border-top: 4px solid #2a1810;
}
.yarn-basket .ball-a, .yarn-basket .ball-b {
  position: absolute;
  bottom: 22px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), var(--c, #c97e75) 70%);
  box-shadow: inset -4px -4px 8px rgba(0,0,0,0.3);
}
.yarn-basket .ball-a { left: 6px; --c: #c97e75; }
.yarn-basket .ball-b { right: 6px; --c: #2c5d4a; bottom: 30px; width: 24px; height: 24px; }
.basket-tooltip {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--cream);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: var(--shadow-md);
}
.yarn-basket:hover .basket-tooltip { opacity: 1; transform: translateX(-50%) scale(1); }

/* =========================================================
   CARDS — see-it-worked-up + waitlist + finish-time
   ========================================================= */
.card { display: flex; flex-direction: column; }
.card .swatch {
  position: relative;
}
.swatch.has-toggle::after { display: none; }
.swatch .knit-overlay,
.swatch .crochet-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.swatch[data-view="knit"] .knit-overlay,
.swatch[data-view="crochet"] .crochet-overlay { opacity: 1; }
.swatch[data-view="knit"]    .ball-overlay { opacity: 0; }
.swatch[data-view="crochet"] .ball-overlay { opacity: 0; }
.swatch .ball-overlay {
  position: absolute;
  inset: 0;
  opacity: 1;
  transition: opacity 0.4s;
}
/* knit pattern: vertical V's (stockinette) */
.knit-overlay {
  background:
    linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  -webkit-mask:
    radial-gradient(circle at 50% 0%, transparent 6px, black 7px) 0 0/14px 18px,
    radial-gradient(circle at 50% 100%, transparent 6px, black 7px) 0 0/14px 18px;
          mask:
    radial-gradient(circle at 50% 0%, transparent 6px, black 7px) 0 0/14px 18px,
    radial-gradient(circle at 50% 100%, transparent 6px, black 7px) 0 0/14px 18px;
}
/* crochet pattern: granny-square style diagonal weave */
.crochet-overlay {
  background:
    linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  -webkit-mask:
    repeating-linear-gradient(45deg, black 0 4px, transparent 4px 8px),
    repeating-linear-gradient(-45deg, black 0 4px, transparent 4px 8px);
  -webkit-mask-composite: source-over;
          mask:
    repeating-linear-gradient(45deg, black 0 4px, transparent 4px 8px),
    repeating-linear-gradient(-45deg, black 0 4px, transparent 4px 8px);
}
.swatch-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  background: rgba(241, 244, 239, 0.9);
  border-radius: 999px;
  padding: 2px;
  z-index: 4;
  box-shadow: var(--shadow-sm);
  font-size: 0.75rem;
  font-family: var(--serif);
  font-weight: 600;
}
.swatch-toggle button {
  border: none;
  background: transparent;
  color: var(--walnut);
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
}
.swatch-toggle button.active {
  background: var(--emerald);
  color: var(--cream);
}

.stock-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.stock-pill.in    { background: rgba(35, 74, 60, 0.12); color: var(--emerald-deep); }
.stock-pill.low   { background: rgba(214, 130, 87, 0.35); color: var(--peach-deep); }
.stock-pill.out   { background: rgba(26, 36, 32, 0.85); color: var(--cream); }
.waitlist {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--walnut);
}
.waitlist strong { color: var(--peach-deep); }
.waitlist button {
  display: block;
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--peach-deep);
  color: var(--cream);
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}
.waitlist button:hover { background: var(--emerald-deep); }
.waitlist .joined { color: var(--emerald-deep); font-weight: 600; margin-top: 6px; display: block; }

.finish-time {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--walnut);
}
.finish-time .lvl {
  background: var(--cream-warm);
  border: 1px solid rgba(35, 74, 60, 0.15);
  border-radius: 6px;
  padding: 2px 6px;
}

.add-to-cart {
  margin-top: 10px;
  background: var(--emerald);
  color: var(--cream);
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.2s, transform 0.2s;
}
.add-to-cart:hover { background: var(--emerald-deep); transform: translateY(-1px); }
.add-to-cart.added { background: var(--gold); color: var(--ink); }

/* =========================================================
   PALETTE BUILDER
   ========================================================= */
.palette-page { display: grid; grid-template-columns: 320px 1fr; gap: 30px; align-items: flex-start; }
@media (max-width: 900px) { .palette-page { grid-template-columns: 1fr; } }
.palette-board {
  background: var(--cream);
  border: 2px dashed var(--emerald-soft);
  border-radius: var(--radius-md);
  padding: 22px;
  min-height: 280px;
  position: relative;
}
.palette-board.dragover { background: var(--cream-warm); border-color: var(--emerald); }
.palette-slots {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  min-height: 110px;
}
.palette-slot {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 35%),
              radial-gradient(circle at 70% 70%, rgba(0,0,0,0.25), transparent 50%),
              linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: var(--shadow-sm), inset -6px -6px 14px rgba(0,0,0,0.25);
  cursor: grab;
  transition: transform 0.2s;
}
.palette-slot:hover { transform: rotate(-3deg) scale(1.05); }
.palette-slot .name {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--hand);
  font-size: 1.05rem;
  color: var(--walnut);
  white-space: nowrap;
}
.palette-slot .x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--peach-deep);
  color: var(--cream);
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity 0.2s;
}
.palette-slot:hover .x { opacity: 1; }
.palette-empty {
  font-family: var(--hand);
  font-size: 1.4rem;
  color: var(--walnut-soft);
}
.palette-actions { margin-top: 30px; display: flex; gap: 10px; flex-wrap: wrap; }
.preset-list { display: grid; gap: 10px; }
.preset {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  border: 1px solid rgba(35, 74, 60, 0.15);
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  text-align: left;
  font-family: var(--serif);
  transition: transform 0.2s, box-shadow 0.2s;
}
.preset:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.preset .swatches { display: flex; gap: 4px; }
.preset .sw {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: inset -2px -2px 4px rgba(0,0,0,0.25);
}
.preset .name { font-weight: 600; color: var(--emerald-deep); }
.yarn-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.pick {
  cursor: grab;
  text-align: center;
  user-select: none;
}
.pick .ball {
  width: 70px; height: 70px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 35%),
              radial-gradient(circle at 70% 70%, rgba(0,0,0,0.25), transparent 50%),
              linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: var(--shadow-sm), inset -4px -4px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.pick:hover .ball { transform: scale(1.1) rotate(-3deg); }
.pick .label { font-size: 0.78rem; color: var(--walnut); margin-top: 4px; }
.pick.dragging .ball { opacity: 0.5; }

.palette-mockups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.mockup {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
  border: 1px solid rgba(35, 74, 60, 0.15);
}
.mockup .stage {
  height: 100px;
  border-radius: 8px;
  margin-bottom: 6px;
  overflow: hidden;
  position: relative;
}
.mockup .stripe {
  position: absolute;
  left: 0; right: 0;
  height: 25px;
}

/* =========================================================
   QUIZ
   ========================================================= */
.quiz-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(35, 74, 60, 0.12);
}
.quiz-card .step { color: var(--peach-deep); font-family: var(--hand); font-size: 1.2rem; }
.quiz-card h2 { margin-top: 4px; }
.quiz-options { display: grid; gap: 10px; margin-top: 18px; }
.quiz-options button {
  display: block;
  text-align: left;
  padding: 14px 18px;
  border: 1.5px solid rgba(35, 74, 60, 0.18);
  background: var(--cream-warm);
  border-radius: 12px;
  font-family: var(--serif);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.quiz-options button:hover { border-color: var(--emerald); transform: translateX(4px); background: var(--cream); }
.quiz-progress { display: flex; gap: 4px; margin-top: 18px; }
.quiz-progress .dot { flex: 1; height: 6px; background: var(--cream-warm); border-radius: 4px; }
.quiz-progress .dot.done { background: var(--emerald); }
.quiz-result {
  text-align: center;
}
.quiz-result .badge { font-size: 4rem; }
.quiz-result h2 { margin: 6px 0; }
.quiz-result .blurb { color: var(--walnut); max-width: 50ch; margin: 0 auto 18px; line-height: 1.6; }
.quiz-result .grid { margin-top: 18px; }

/* =========================================================
   COMMUNITY WALL
   ========================================================= */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 22px;
}
.filters select, .filters input {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(35, 74, 60, 0.2);
  background: var(--cream);
  font-family: var(--serif);
  font-size: 0.9rem;
}
.community-card { position: relative; }
.community-card .like {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(241, 244, 239, 0.9);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--peach-deep);
  cursor: pointer;
  border: none;
  transition: transform 0.2s;
  z-index: 4;
}
.community-card .like:hover { transform: scale(1.1); }
.community-card .like.liked { background: var(--peach-deep); color: var(--cream); }
.community-card .meta { font-size: 0.85rem; color: var(--walnut); }
.community-card .level {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--cream-warm);
  font-size: 0.75rem;
  font-weight: 600;
}

/* =========================================================
   MOOD BOARD
   ========================================================= */
.mood-stage {
  position: relative;
  width: 100%;
  height: 540px;
  background: var(--cream-warm);
  border: 2px dashed var(--emerald-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: crosshair;
}
.mood-item {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 12px;
  cursor: grab;
  box-shadow: var(--shadow-md);
  user-select: none;
  background-size: cover;
  background-position: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.mood-item:hover { box-shadow: var(--shadow-lg); }
.mood-item.dragging { cursor: grabbing; transform: scale(1.05) rotate(-1deg); }
.mood-item .rm {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--peach-deep);
  color: var(--cream);
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.mood-item:hover .rm { opacity: 1; }
.mood-yarn {
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 35%),
              radial-gradient(circle at 70% 70%, rgba(0,0,0,0.25), transparent 50%),
              linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
}
.mood-pattern {
  background: var(--cream);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: var(--emerald-deep);
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
}
.mood-vibe {
  background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  display: grid;
  place-items: center;
  color: var(--cream);
  font-family: var(--hand);
  font-size: 1.4rem;
}
.mood-side {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid rgba(35, 74, 60, 0.15);
}
.mood-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.mood-tabs button {
  flex: 1;
  padding: 8px;
  border: none;
  background: var(--cream-warm);
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 600;
  border-radius: 8px;
  font-size: 0.85rem;
}
.mood-tabs button.active { background: var(--emerald); color: var(--cream); }
.mood-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}
.mood-list .item {
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  background: var(--cream-warm);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--emerald-deep);
}
.mood-list .item.yarn-item {
  height: 60px;
  background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  color: var(--cream);
  display: grid;
  place-items: end center;
  padding-bottom: 4px;
  font-size: 0.7rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* =========================================================
   TEMPERATURE BLANKET
   ========================================================= */
.temp-month {
  margin-bottom: 22px;
}
.temp-month h3 {
  font-family: var(--display);
  margin: 0 0 10px;
  color: var(--emerald-deep);
}
.temp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.temp-day {
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  position: relative;
  background: var(--cream-warm);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: rgba(0,0,0,0.4);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s;
}
.temp-day:hover { transform: scale(1.15); z-index: 2; }
.temp-day.has-temp { color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.temp-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
}
.temp-key .item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--walnut);
}
.temp-key .sw {
  width: 18px; height: 18px; border-radius: 4px;
}

/* =========================================================
   ADVENTURE RANKS
   ========================================================= */
.ranks-rail {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  padding: 30px 12px 50px;
}
.rank-step {
  flex: 1;
  text-align: center;
  position: relative;
}
.rank-step + .rank-step::before {
  content: "";
  position: absolute;
  left: -50%;
  top: 30px;
  width: 100%;
  height: 4px;
  background: var(--cream-warm);
  z-index: 0;
}
.rank-step.unlocked + .rank-step::before { background: var(--emerald); }
.rank-step .icon {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--cream-warm);
  display: grid;
  place-items: center;
  font-size: 2rem;
  z-index: 1;
}
.rank-step.unlocked .icon {
  border-color: var(--emerald);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  box-shadow: 0 0 0 6px rgba(184, 150, 78, 0.25);
}
.rank-step .label {
  font-family: var(--display);
  font-weight: 700;
  color: var(--emerald-deep);
  margin-top: 8px;
}
.rank-step .pts {
  font-family: var(--hand);
  font-size: 0.95rem;
  color: var(--walnut);
}
.rank-current {
  background: linear-gradient(135deg, var(--emerald-deep), var(--emerald));
  color: var(--cream);
  padding: 22px 26px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.rank-current .icon { font-size: 2.4rem; }
.rank-current h3 { color: var(--gold-bright); margin: 0; }
.rank-current .progress-bar {
  flex: 1;
  min-width: 180px;
  height: 12px;
  background: rgba(241, 244, 239, 0.2);
  border-radius: 999px;
  overflow: hidden;
}
.rank-current .progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-bright), var(--peach));
  transition: width 0.5s;
}
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.badge-card {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  border: 1px solid rgba(35, 74, 60, 0.15);
}
.badge-card .b-icon { font-size: 2.2rem; }
.badge-card.locked { opacity: 0.4; filter: grayscale(0.6); }

/* =========================================================
   SPIN WHEEL
   ========================================================= */
.wheel-wrap {
  position: relative;
  width: 360px;
  height: 360px;
  margin: 0 auto;
}
.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 8px solid var(--emerald-deep);
  box-shadow: var(--shadow-lg), inset 0 0 0 4px rgba(255, 255, 255, 0.1);
  transition: transform 4s cubic-bezier(0.15, 0.85, 0.2, 1);
  position: relative;
  background: conic-gradient(var(--peach), var(--gold-bright), var(--emerald-soft), var(--peach-deep), var(--mountain), var(--gold), var(--emerald), var(--walnut-soft));
}
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 28px solid var(--peach-deep);
  z-index: 5;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}
.wheel-hub {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  border: 3px solid var(--emerald-deep);
  z-index: 4;
  box-shadow: var(--shadow-md);
}
.wheel-hub:hover { background: linear-gradient(180deg, var(--peach), var(--peach-deep)); color: var(--cream); }
.wheel-label {
  position: absolute;
  top: 50%; left: 50%;
  transform-origin: 0 0;
  width: 50%;
  text-align: right;
  padding-right: 14px;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  pointer-events: none;
  font-size: 0.78rem;
}

/* =========================================================
   MYSTERY CRATE
   ========================================================= */
.crate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.crate {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  cursor: pointer;
  overflow: hidden;
  border: 3px solid transparent;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.08) 0 4px, transparent 4px 8px),
    var(--c, var(--emerald));
}
.crate:hover { transform: translateY(-6px) rotate(-1deg); border-color: var(--gold-bright); box-shadow: var(--shadow-lg); }
.crate-label {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
  color: var(--cream);
  padding: 22px 16px 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
}
.crate .lock {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 1.2rem;
  background: rgba(0,0,0,0.4);
  color: var(--gold-bright);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.crate-result {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-top: 22px;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-md);
}
.crate-result h3 { color: var(--peach-deep); font-family: var(--hand); font-size: 2rem; }

/* =========================================================
   LIVE STREAM
   ========================================================= */
.live-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }
@media (max-width: 900px) { .live-grid { grid-template-columns: 1fr; } }
.live-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, #1f3344, #0e1c2a);
  display: grid;
  place-items: center;
  color: var(--cream);
}
.live-dye-pot {
  position: relative;
  width: 70%;
  aspect-ratio: 1;
  max-width: 320px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, var(--c1, #c97e75), var(--c2, #5a2a6c) 70%, #1a0a1f 100%);
  box-shadow: inset 0 -20px 40px rgba(0,0,0,0.6), 0 0 0 4px var(--walnut), 0 20px 40px rgba(0,0,0,0.5);
  animation: stir 4s ease-in-out infinite;
}
.live-dye-pot::after {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  width: 18px;
  height: 18px;
  background: rgba(180, 200, 210, 0.4);
  border-radius: 50%;
  filter: blur(6px);
  animation: smoke-rise 5s linear infinite;
}
@keyframes stir {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}
.live-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--peach-deep);
  color: var(--cream);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.live-badge::before { content: ""; width: 8px; height: 8px; background: var(--cream); border-radius: 50%; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.live-viewers {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0,0,0,0.5);
  color: var(--cream);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}
.live-chat {
  background: var(--cream);
  border: 1px solid rgba(35, 74, 60, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  height: 540px;
  overflow: hidden;
}
.chat-feed { flex: 1; overflow-y: auto; padding: 14px; }
.chat-msg { font-size: 0.92rem; margin-bottom: 8px; line-height: 1.4; }
.chat-msg .who { font-weight: 700; color: var(--emerald-deep); margin-right: 4px; }
.chat-msg.system { font-style: italic; color: var(--walnut-soft); }
.chat-input {
  display: flex;
  border-top: 1px solid rgba(35, 74, 60, 0.15);
  padding: 8px;
  gap: 6px;
}
.chat-input input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(35, 74, 60, 0.15);
  border-radius: 999px;
  font-family: var(--serif);
}
.chat-input button {
  background: var(--emerald);
  color: var(--cream);
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}
.live-vote {
  background: var(--cream-warm);
  padding: 14px;
  border-radius: var(--radius-md);
  margin-top: 14px;
}
.vote-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.vote-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--cream);
  border: 1.5px solid rgba(35, 74, 60, 0.2);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: var(--serif);
}
.vote-btn .sw {
  width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
}
.vote-btn.voted { background: var(--emerald); color: var(--cream); border-color: var(--emerald); }
.live-claim { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* =========================================================
   PATTERN MATCH
   ========================================================= */
.match-form {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 22px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(35, 74, 60, 0.15);
}
.match-form label { font-weight: 600; color: var(--emerald-deep); }
.match-form input, .match-form select {
  padding: 10px 14px;
  border: 1.5px solid rgba(35, 74, 60, 0.2);
  border-radius: 8px;
  font-family: var(--serif);
  font-size: 1rem;
}
.match-result {
  margin-top: 22px;
}
.match-summary {
  background: var(--cream-warm);
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* =========================================================
   FIBER EDUCATION
   ========================================================= */
.fiber-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.fiber-card {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 22px;
  border: 1px solid rgba(35, 74, 60, 0.15);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.fiber-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.fiber-card .fiber-color {
  width: 50px; height: 50px;
  border-radius: 50%;
  margin-bottom: 12px;
  background: var(--c, var(--emerald));
  box-shadow: inset -4px -4px 8px rgba(0,0,0,0.3);
}
.fiber-card h3 { color: var(--emerald-deep); margin-bottom: 4px; }
.fiber-card .desc { color: var(--walnut); font-size: 0.92rem; line-height: 1.5; margin-bottom: 12px; }
.fiber-stats { display: grid; gap: 6px; margin-bottom: 12px; }
.stat-row {
  display: grid;
  grid-template-columns: 80px 1fr 30px;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--walnut);
}
.stat-bar {
  height: 8px;
  background: var(--cream-warm);
  border-radius: 999px;
  overflow: hidden;
}
.stat-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--peach), var(--emerald));
  border-radius: 999px;
  width: 0;
  transition: width 0.8s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.fiber-card .best { font-weight: 600; color: var(--emerald-deep); font-size: 0.9rem; }

/* =========================================================
   BUILD COLLECTION (RPG party builder)
   ========================================================= */
.build-grid { display: grid; grid-template-columns: 320px 1fr; gap: 22px; }
@media (max-width: 900px) { .build-grid { grid-template-columns: 1fr; } }
.build-controls {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid rgba(35, 74, 60, 0.15);
}
.build-controls .group { margin-bottom: 14px; }
.build-controls label { display: block; font-weight: 600; color: var(--emerald-deep); margin-bottom: 6px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 6px 12px;
  border: 1.5px solid rgba(35, 74, 60, 0.2);
  background: var(--cream-warm);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 0.85rem;
}
.chip.selected { background: var(--emerald); color: var(--cream); border-color: var(--emerald); }
.party {
  background: linear-gradient(180deg, var(--cream-warm), var(--cream));
  border-radius: var(--radius-md);
  padding: 22px;
  border: 1px solid rgba(35, 74, 60, 0.15);
  min-height: 420px;
}
.party-name {
  font-family: var(--hand);
  font-size: 2.2rem;
  color: var(--peach-deep);
  text-align: center;
  margin: 0 0 10px;
}
.party-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
}
.party-member {
  text-align: center;
  background: var(--cream);
  padding: 12px;
  border-radius: var(--radius-md);
  position: relative;
}
.party-member .ball {
  width: 80px; height: 80px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 35%),
              linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: inset -6px -6px 12px rgba(0,0,0,0.3);
  animation: party-bob 3s ease-in-out infinite;
}
.party-member:nth-child(2) .ball { animation-delay: 0.3s; }
.party-member:nth-child(3) .ball { animation-delay: 0.6s; }
.party-member:nth-child(4) .ball { animation-delay: 0.9s; }
.party-member:nth-child(5) .ball { animation-delay: 1.2s; }
@keyframes party-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.party-member .role {
  font-family: var(--hand);
  font-size: 1rem;
  color: var(--peach-deep);
  margin-bottom: 2px;
}
.party-member .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--emerald-deep);
}

/* =========================================================
   PLAY HUB
   ========================================================= */
.play-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.play-tile {
  position: relative;
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  border: 1px solid rgba(35, 74, 60, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.play-tile::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c1, var(--peach)) 0%, var(--c2, var(--emerald)) 100%);
  opacity: 0.5;
  transition: transform 0.3s;
}
.play-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.play-tile:hover::before { transform: scale(1.3); }
.play-tile h3 { position: relative; color: var(--emerald-deep); margin-bottom: 4px; }
.play-tile p { position: relative; color: var(--walnut); font-size: 0.92rem; line-height: 1.4; margin: 0; }
.play-tile .icon { position: relative; font-size: 1.8rem; margin-bottom: 8px; display: block; }

/* completion celebration */
.celebrate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(16, 48, 36, 0.7);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.celebrate.show { opacity: 1; pointer-events: auto; }
.celebrate-card {
  background: var(--cream);
  padding: 36px 44px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 4px solid var(--gold);
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  transform: scale(0.85);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.celebrate.show .celebrate-card { transform: scale(1); }
.celebrate-card h2 { color: var(--peach-deep); font-family: var(--hand); font-size: 3rem; margin: 0; }
.celebrate-card .code-reveal {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 0.2em;
  color: var(--emerald-deep);
  background: var(--cream-warm);
  padding: 12px 18px;
  border-radius: 10px;
  margin: 12px 0;
  user-select: all;
}
.celebrate-msg { margin: 0 0 8px; line-height: 1.5; color: var(--walnut); }

/* ---- Home brand + Google Calendar ---- */
.campfire-brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--snow);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  margin: 0 0 6px;
}
.home-brand-lockup {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  color: var(--emerald-deep);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.calendar-section .section-head { margin-bottom: 28px; }
.calendar-frame-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(35, 74, 60, 0.18);
  box-shadow: var(--shadow-md);
  background: var(--snow);
}
.calendar-frame {
  width: 100%;
  min-height: 560px;
  height: 70vh;
  max-height: 720px;
  border: 0;
  display: block;
}
.calendar-setup {
  background: var(--snow);
  border: 1px dashed rgba(35, 74, 60, 0.25);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  max-width: 720px;
  margin: 0 auto;
}
.calendar-setup-lead { margin: 0 0 16px; line-height: 1.65; color: var(--ink); }
.calendar-setup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.calendar-setup-input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(35, 74, 60, 0.22);
  font-family: var(--serif);
  font-size: 1rem;
}
.calendar-setup-hint { font-size: 0.88rem; margin: 0 0 8px; }
.calendar-setup-fallback { margin: 0; font-size: 0.95rem; }
.calendar-embed-note { text-align: center; margin-top: 12px; font-size: 0.9rem; }
.btn-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--emerald);
  text-decoration: underline;
  cursor: pointer;
}
.btn-link:hover { color: var(--peach-deep); }

/* ---- LYS Stash Bingo ---- */
.stash-bingo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.stash-bingo-status { margin: 0; }
.stash-bingo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
@media (max-width: 900px) {
  .stash-bingo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .stash-bingo-grid { grid-template-columns: repeat(2, 1fr); }
}
.stash-bingo-cell {
  appearance: none;
  border: 2px solid rgba(35, 74, 60, 0.15);
  border-radius: var(--radius-sm);
  background: var(--snow);
  padding: 12px 10px;
  text-align: left;
  cursor: pointer;
  font-family: var(--serif);
  color: var(--ink);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stash-bingo-cell:hover { transform: translateY(-2px); border-color: rgba(214, 130, 87, 0.45); }
.stash-bingo-cell.is-done {
  background: linear-gradient(145deg, rgba(158, 180, 134, 0.35), rgba(214, 176, 106, 0.25));
  border-color: var(--emerald-soft);
}
.stash-bingo-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--mountain);
}
.stash-bingo-label { font-size: 0.82rem; line-height: 1.35; }
.stash-bingo-cell.is-done .stash-bingo-num { color: var(--emerald-deep); }

/* ---- Skein Slots ---- */
.skein-slots-wrap { max-width: 640px; margin: 0 auto; }
.skein-slots-machine {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: linear-gradient(180deg, var(--emerald-deep), #0e2820);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.skein-slot-reel { flex: 1; max-width: 120px; }
.skein-slot-window {
  height: 72px;
  overflow: hidden;
  border-radius: 10px;
  border: 3px solid var(--gold);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.4);
}
.skein-slot-strip { will-change: transform; }
.skein-slot-face {
  height: 72px;
  width: 100%;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}
.skein-slots-spin-btn { min-width: 220px; }
.skein-slots-winner {
  text-align: center;
  padding: 24px;
  background: var(--snow);
  border-radius: var(--radius-md);
  border: 1px solid rgba(35, 74, 60, 0.12);
}
.skein-slots-winner-name { margin: 0 0 8px; color: var(--emerald-deep); }
