:root {
  --hero-bg: #0e0a1f;
  --hero-bg-2: #1c123c;
  --hero-card: rgba(24, 17, 52, 0.88);
  --hero-border: rgba(245, 196, 81, 0.28);
  --gold: #f5c451;
  --gold-bright: #fde68a;
  --gold-deep: #b9750e;
  --violet: #8b5cf6;
  --violet-soft: #c4b5fd;
  --cream: #faf5eb;
  --cream-2: #f2e9d8;
  --ink: #241933;
  --ink-muted: #5b4d6e;
  --white: #ffffff;
  --danger: #e11d48;
  --emerald: #10b981;
  --radius: 18px;
  --serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header & Navigation */
.site-header {
  background: var(--hero-bg);
  color: #f8f3e8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.08rem;
  color: #fff9ec;
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.92rem;
}

.header-nav a {
  text-decoration: none;
  color: rgba(255, 249, 236, 0.86);
  font-weight: 500;
}

.header-nav a:hover {
  color: var(--gold-bright);
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(245, 196, 81, 0.14);
  color: #fde68a;
  border: 1px solid rgba(245, 196, 81, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.mobile-lang-pill {
  display: none;
}

.mobile-help-pill {
  display: none;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff9ec;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .header-nav {
    display: none;
  }
  .brand-link {
    font-size: 0.96rem;
    white-space: nowrap;
  }
  .mobile-lang-pill,
  .mobile-help-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
  }
  .header-inner {
    padding: 9px 12px;
  }
}

/* Hero Stage */
.hero-stage {
  background: radial-gradient(circle at 20% 10%, #2f1b69 0%, var(--hero-bg-2) 45%, var(--hero-bg) 100%);
  color: #fff9ec;
  padding: 18px 16px 28px;
  position: relative;
  overflow: hidden;
}

.hero-stage[data-theme='champagne-rose'] {
  background: radial-gradient(circle at 20% 10%, #5b1846 0%, #2b0f2a 48%, #16081a 100%);
}

.hero-stage[data-theme='emerald-vine'] {
  background: radial-gradient(circle at 20% 10%, #134e3a 0%, #0b2b23 48%, #061813 100%);
}

.hero-stage.is-golden-vine {
  background: radial-gradient(circle at 25% 15%, #5c3d0a 0%, #2b1d07 52%, #140d04 100%);
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.hero-title-row {
  text-align: center;
  margin-bottom: 12px;
}

.hero-title-row h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  line-height: 1.12;
  margin: 0 0 6px;
  color: #fff9ec;
}

.hero-subtitle {
  margin: 0;
  font-size: 0.96rem;
  color: rgba(255, 248, 232, 0.84);
}

.light-string {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px auto 12px;
}

.light-bulb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  transition: transform 0.25s ease, background 0.25s ease;
}

.light-bulb.is-lit {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(245, 196, 81, 0.9);
  border-color: #fff6cf;
}

.light-bulb.is-today {
  background: #f43f5e;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.9);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hero-stage {
    padding: 10px 12px 22px;
  }
  .hero-title-row {
    margin-bottom: 8px;
  }
  .hero-title-row h1 {
    font-size: 1.55rem;
    margin-bottom: 2px;
  }
  .hero-subtitle {
    font-size: 0.86rem;
  }
}

/* Grape Cluster Board */
.cluster-panel {
  background: rgba(12, 8, 28, 0.56);
  border: 1px solid var(--hero-border);
  border-radius: var(--radius);
  padding: 12px;
  backdrop-filter: blur(8px);
}

.cluster-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.84rem;
  color: rgba(255, 249, 236, 0.9);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.sparkle-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 196, 81, 0.16);
  border: 1px solid rgba(245, 196, 81, 0.45);
  color: var(--gold-bright);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
}

.cluster-svg-wrap {
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
}

.cluster-svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.grape-node {
  cursor: pointer;
  transition: transform 0.18s ease;
}

.grape-node:hover {
  filter: brightness(1.1);
}

.grape-node.is-selected circle.grape-body {
  stroke: #ffffff;
  stroke-width: 3.5;
}

@media (max-width: 720px) {
  .cluster-panel {
    padding: 8px 10px;
  }
  .cluster-svg-wrap {
    max-width: 265px;
  }
  .cluster-meta-bar {
    font-size: 0.78rem;
    margin-bottom: 4px;
  }
}

/* Action Panel */
.action-card {
  background: var(--hero-card);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 18px;
  color: #fff9ec;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

@media (max-width: 720px) {
  .action-card {
    padding: 13px;
  }
}

.action-card h2 {
  font-family: var(--serif);
  font-size: 1.32rem;
  margin: 0 0 6px;
}

.action-card p.muted {
  color: rgba(255, 248, 232, 0.8);
  font-size: 0.9rem;
  margin: 0 0 12px;
}

.field-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: #fde68a;
  margin-bottom: 5px;
}

.text-input,
.text-area {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(9, 6, 22, 0.72);
  color: #ffffff;
  font-size: 0.98rem;
  outline: none;
}

.text-input:focus,
.text-area:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 196, 81, 0.2);
}

.theme-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 12px;
}

.theme-chip {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff9ec;
  border-radius: 10px;
  padding: 8px 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.theme-chip.is-active {
  border-color: var(--gold);
  background: rgba(245, 196, 81, 0.2);
  color: var(--gold-bright);
}

/* Buttons & Golden 3-Tier Share Panel */
.btn-hero {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: #1c1204;
  background: linear-gradient(180deg, #fde68a 0%, #f5c451 55%, #d99b1e 100%);
  box-shadow: 0 6px 20px rgba(245, 196, 81, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-hero:hover {
  filter: brightness(1.05);
}

.btn-hero:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-crimson {
  background: linear-gradient(180deg, #fb7185 0%, #e11d48 65%, #be123c 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.4);
}

.share-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.share-tile {
  border: 1px solid rgba(255, 248, 232, 0.22);
  background: #fbf3e4;
  color: #241933;
  border-radius: 12px;
  padding: 9px 4px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
}

.share-tile:hover {
  background: #ffffff;
}

.share-inline-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  font-size: 0.82rem;
  color: rgba(255, 248, 232, 0.8);
  flex-wrap: wrap;
}

.share-inline-links a {
  color: #fde68a;
  text-underline-offset: 3px;
}

.authenticity-line {
  margin-top: 10px;
  font-size: 0.77rem;
  color: rgba(255, 248, 232, 0.72);
  text-align: center;
}

.status-banner {
  background: rgba(245, 196, 81, 0.14);
  border: 1px solid rgba(245, 196, 81, 0.35);
  color: #fff6d6;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 0.86rem;
  margin-bottom: 10px;
}

.sub-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 13px;
  margin-top: 12px;
}

.sub-card.purple-block {
  background: rgba(109, 61, 245, 0.18);
  border-color: rgba(167, 139, 250, 0.42);
}

.sub-card.gold-upsell {
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.18), rgba(139, 92, 246, 0.14));
  border-color: rgba(245, 196, 81, 0.48);
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(8, 5, 20, 0.75);
  border: 1px dashed rgba(253, 230, 138, 0.45);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 8px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: #fde68a;
}

.btn-sm {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #fff9ec;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-sm:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-sm.is-gold {
  background: var(--gold);
  color: #1f1402;
  border-color: var(--gold-bright);
}

/* Friend Composer */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.pill-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: #fff9ec;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: left;
}

.pill-btn.is-active {
  border-color: var(--gold);
  background: rgba(245, 196, 81, 0.22);
  color: var(--gold-bright);
}

.wrap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0 10px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.84rem;
  margin: 9px 0;
  cursor: pointer;
}

.checkbox-row input {
  margin-top: 3px;
  accent-color: var(--gold);
}

/* Mobile Sticky Bottom Bar */
.mobile-sticky-bar {
  display: none;
}

@media (max-width: 720px) {
  .mobile-sticky-bar.is-visible {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(14, 10, 31, 0.94);
    border-top: 1px solid rgba(245, 196, 81, 0.35);
    backdrop-filter: blur(8px);
    gap: 8px;
  }
}

/* Editorial Content Sections */
.content-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 36px 16px 56px;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.76rem;
  font-weight: 700;
  color: #6d3df5;
  margin-bottom: 6px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  margin: 0 0 14px;
  color: var(--ink);
}

.steps-grid,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 18px 0 34px;
}

.cream-card {
  background: #ffffff;
  border: 1px solid #e6dcc8;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(36, 25, 51, 0.04);
}

.cream-card h3 {
  font-family: var(--serif);
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.cream-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.93rem;
}

.prose-block {
  background: #ffffff;
  border: 1px solid #e6dcc8;
  border-radius: 18px;
  padding: 26px;
  margin: 26px 0;
}

.prose-block h2 {
  font-family: var(--serif);
  font-size: 1.42rem;
  margin: 22px 0 8px;
}

.prose-block h2:first-child {
  margin-top: 0;
}

.prose-block p {
  color: #3f3352;
  margin: 0 0 12px;
}

.faq-list details {
  background: #ffffff;
  border: 1px solid #e6dcc8;
  border-radius: 12px;
  padding: 13px 16px;
  margin-bottom: 10px;
}

.faq-list summary {
  font-weight: 700;
  cursor: pointer;
}

.faq-list p {
  margin: 8px 0 0;
  color: var(--ink-muted);
  font-size: 0.94rem;
}

/* Modal & Squeeze-to-Pop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(9, 6, 22, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: #fffaf0;
  color: var(--ink);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
}

.note-stationery {
  background: #ffffff;
  border: 2px solid #e7d9b8;
  border-radius: 14px;
  padding: 16px;
  margin: 12px 0;
}

.note-stationery.wrap-gold {
  border-color: #eab308;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.note-stationery.wrap-crystal {
  border-color: #818cf8;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
}

.note-stationery.wrap-velvet {
  border-color: #7c3aed;
  background: #1b1136;
  color: #fff9ec;
}

/* Mini-Game Canvas & Floating Sparkle */
.minigame-stage {
  position: relative;
  height: 170px;
  border-radius: 14px;
  background: radial-gradient(circle at top, #271856, #0d081d);
  border: 1px solid rgba(245, 196, 81, 0.35);
  overflow: hidden;
  margin-top: 8px;
  user-select: none;
}

.falling-grape {
  position: absolute;
  font-size: 1.55rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.floating-sparkle {
  position: fixed;
  right: 16px;
  bottom: 78px;
  z-index: 35;
  border: 1px solid rgba(253, 230, 138, 0.7);
  background: rgba(24, 17, 52, 0.92);
  color: #fde68a;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.toast-msg {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: #1b1136;
  color: #fde68a;
  border: 1px solid rgba(245, 196, 81, 0.5);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.site-footer {
  background: var(--hero-bg);
  color: rgba(255, 249, 236, 0.78);
  padding: 36px 16px 56px;
  font-size: 0.88rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}

.footer-grid h4 {
  color: #fde68a;
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 6px;
}

.footer-grid a {
  color: rgba(255, 249, 236, 0.78);
  text-decoration: none;
}

.footer-grid a:hover {
  color: #fde68a;
  text-decoration: underline;
}

.ad-slot {
  margin: 18px auto;
  max-width: 728px;
  text-align: center;
}

.ad-slot[data-active='false'] {
  display: none;
}

/* v2.0 Viral Vibes, Secret Clues, Song Cards, Affiliate & Matrix */
.vibe-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 10px;
}

.vibe-tab {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff9ec;
  border-radius: 10px;
  padding: 7px 4px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.vibe-tab.is-active {
  border-color: var(--gold);
  background: rgba(245, 196, 81, 0.22);
  color: var(--gold-bright);
}

.step-indicator {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fde68a;
  background: rgba(245, 196, 81, 0.14);
  border: 1px solid rgba(245, 196, 81, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
}

.teaser-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.teaser-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #f3ead7;
  color: #241933;
  border: 1px solid #dcc9a2;
  border-radius: 999px;
  padding: 4px 10px;
}

.clue-box {
  background: linear-gradient(135deg, #271554, #140b2d);
  color: #fff9ec;
  border: 1px solid rgba(245, 196, 81, 0.55);
  border-radius: 10px;
  padding: 9px 12px;
  margin: 8px 0;
  font-size: 0.82rem;
}

.song-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(109, 61, 245, 0.12);
  border: 1px solid rgba(109, 61, 245, 0.32);
  border-radius: 10px;
  padding: 7px 10px;
  margin: 8px 0;
  font-size: 0.82rem;
}

.affiliate-card {
  background: rgba(255, 250, 240, 0.08);
  border: 1px solid rgba(245, 196, 81, 0.38);
  border-radius: 14px;
  padding: 13px;
  margin-top: 12px;
}

.matrix-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 13px;
  margin-top: 12px;
}
