/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Typography */
  --font-sans: "Outfit", sans-serif;
  --font-mono: "DM Mono", monospace;

  /* Brand accent — emerald green */
  --color-accent: #34d399;
  --color-accent-bright: #86efac;
  --color-accent-dim: #34d3992e;

  /* Text hierarchy */
  --color-text: #fff;
  --color-text-2: #ffffffbf;
  --color-text-3: #ffffff73;

  /* Glass / surface */
  --color-glass: #ffffff12;
  --color-glass-hi: #ffffff1f;
  --color-glass-hv: #ffffff1c;

  /* Borders */
  --color-edge: #ffffff24;
  --color-edge-in: #ffffff38;
  --color-divider: #ffffff17;

  /* Semantic */
  --green: #86efac;
  --green-bg: #86efac33;
  --green-border: #86efac40;
  --red: #fca5a5;
  --red-bg: #ef444426;
  --red-border: #ef444440;

  --radius: 14px;
  --radius-sm: 10px;
}

html {
  scroll-behavior: smooth;
}

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

/* ===== Scene + Noise Overlay ===== */
.scene {
  background: #050510;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.scene::before {
  content: "";
  pointer-events: none;
  z-index: 1;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E") 0 0 / 128px;
  position: fixed;
  inset: 0;
}

/* ===== Background Orbs (emerald palette) ===== */
.orb {
  will-change: transform;
  pointer-events: none;
  border-radius: 50%;
  position: absolute;
}

.orb-1 {
  opacity: .65;
  filter: blur(100px);
  background: radial-gradient(circle, #10b981, #047857 60%, transparent);
  width: 1000px;
  height: 880px;
  top: -320px;
  left: -280px;
}

.orb-2 {
  opacity: .50;
  filter: blur(110px);
  background: radial-gradient(circle, #34d399, #065f46 70%, transparent);
  width: 700px;
  height: 650px;
  top: -80px;
  right: -180px;
}

.orb-3 {
  opacity: .35;
  filter: blur(130px);
  background: radial-gradient(circle, #10b981, #064e3b 65%, transparent);
  width: 900px;
  height: 700px;
  bottom: -200px;
  left: 30%;
}

.orb-4 {
  opacity: .40;
  filter: blur(100px);
  background: radial-gradient(circle, #059669, #064e3b 70%, transparent);
  width: 500px;
  height: 500px;
  top: 40%;
  right: 10%;
}

.orb-5 {
  opacity: .25;
  filter: blur(120px);
  background: radial-gradient(circle, #34d399, #022c22 65%, transparent);
  width: 600px;
  height: 500px;
  top: 60%;
  left: -100px;
}

/* ===== Layout ===== */
.app-content {
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}

a {
  color: var(--color-accent-bright);
  text-decoration: none;
}
a:hover {
  color: #a7f3d0;
  text-decoration: underline;
}

/* ===== Core Glass Style ===== */
.glass {
  background: var(--color-glass);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--color-edge);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 var(--color-edge-in);
  border-radius: var(--radius);
}

/* ===== Hero Section ===== */
#hero {
  padding: 100px 0 60px;
  text-align: center;
}

h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--color-accent-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--color-text-2);
  max-width: 600px;
  margin: 0 auto 44px;
  line-height: 1.7;
}

/* Input row */
.input-row {
  display: flex;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}

.input-row input {
  flex: 1;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background: var(--color-glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-edge);
  border-radius: 100px;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.input-row input:focus {
  border-color: var(--color-edge-in);
  background: var(--color-glass-hi);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.15);
}
.input-row input::placeholder {
  color: var(--color-text-3);
}

.input-row button {
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-sans);
  background: var(--color-accent);
  color: #0f0a2e;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(52, 211, 153, 0.4);
}
.input-row button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.5);
}
.input-row button:active {
  transform: scale(0.97);
}
.input-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.hint {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--color-text-3);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* Error */
.error {
  margin-top: 20px;
  padding: 14px 20px;
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.9rem;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(15, 10, 46, 0.3);
  border-top-color: #0f0a2e;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  0%   { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes cardIn {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== Loading Section ===== */
#loading {
  padding: 80px 0;
}

.loading-container {
  text-align: center;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-edge);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 24px;
}

#loading-text {
  font-size: 1.05rem;
  color: var(--color-text-2);
  margin-bottom: 32px;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.loading-steps .step {
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: var(--color-text-3);
  opacity: 0.4;
  transition: opacity 0.4s, color 0.4s;
}
.loading-steps .step.active {
  opacity: 1;
  color: var(--color-accent-bright);
}
.loading-steps .step.done {
  opacity: 0.7;
  color: var(--green);
}

/* ===== Results ===== */
#results {
  padding: 40px 0 80px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--color-text);
}

/* User game card */
.user-game-card {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 24px;
  margin-bottom: 24px;
  animation: cardIn 0.4s ease-out both;
}

.user-game-card img {
  width: 200px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.user-game-info h2 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.user-game-info .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* Tags / chips */
.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border-radius: 100px;
  line-height: 1.5;
  background: var(--color-accent-dim);
  color: var(--color-accent-bright);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.tag.shared {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}

/* Insights banner */
.insights-banner {
  padding: 28px;
  margin-bottom: 32px;
  animation: cardIn 0.4s ease-out 0.1s both;
}

.insights-banner h3 {
  font-size: 1.15rem;
  margin-bottom: 18px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.insight-item {
  text-align: center;
}

.insight-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-accent-bright);
  font-family: var(--font-mono);
}

.insight-label {
  font-size: 0.78rem;
  color: var(--color-text-3);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  font-weight: 500;
}

/* Competitor grid */
.competitor-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.competitor-card {
  background: var(--color-glass);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--color-edge);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 var(--color-edge-in);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  animation: cardIn 0.35s ease-out both;
}
.competitor-card:hover {
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(52, 211, 153, 0.1),
    inset 0 1px 0 var(--color-edge-in);
}

/* Card header */
.card-header {
  display: flex;
  gap: 20px;
  padding: 24px;
  align-items: flex-start;
}

.card-header img {
  width: 280px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.card-info {
  flex: 1;
}

.card-info h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  font-weight: 700;
}

.card-info h3 a {
  color: var(--color-text);
  transition: color 0.2s;
}
.card-info h3 a:hover {
  color: var(--color-accent-bright);
  text-decoration: none;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 10px 0;
  font-size: 0.82rem;
  color: var(--color-text-2);
  font-family: var(--font-mono);
}

.card-meta .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: var(--color-glass);
  border: 1px solid var(--color-edge);
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 600;
}

.tagline {
  font-size: 0.9rem;
  color: var(--color-text-2);
  line-height: 1.6;
  margin-top: 10px;
  font-style: italic;
  opacity: 0.85;
}

/* Section labels in cards */
.screenshots-section h4,
.trailers-section h4 {
  font-size: 9.5px;
  color: var(--color-text-3);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-family: var(--font-mono);
  font-weight: 500;
}

/* Screenshots */
.screenshots-section {
  padding: 0 24px 20px;
}

.screenshot-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #ffffff1f transparent;
}

.screenshot-strip img {
  height: 130px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--color-edge);
}
.screenshot-strip img:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Trailers */
.trailers-section {
  padding: 0 24px 20px;
}

.trailer-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.trailer-item {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-edge);
  transition: border-color 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.trailer-item:hover {
  border-color: var(--color-accent);
}

.trailer-item img {
  height: 110px;
  display: block;
}

.trailer-item .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-edge);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s;
}
.trailer-item:hover .play-icon {
  background: rgba(52, 211, 153, 0.3);
}

/* Social & Links */
.links-section {
  padding: 0 24px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--color-accent-dim);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent-bright);
  transition: background 0.2s, border-color 0.2s;
}
.link-pill:hover {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.5);
  text-decoration: none;
}

/* Tags row in card */
.card-tags {
  padding: 0 24px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ===== Content Discovery Section ===== */
.content-discovery {
  padding: 0 24px 24px;
  border-top: 1px solid var(--color-divider);
  margin-top: 4px;
  padding-top: 20px;
}

.discovery-title {
  font-size: 11px;
  color: var(--color-text-2);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 4px;
}

.discovery-subtitle {
  font-size: 12px;
  color: var(--color-text-3);
  margin-bottom: 16px;
}

.discovery-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.discovery-section-header {
  margin-bottom: 8px;
}

.discovery-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-2);
  display: block;
  margin-bottom: 2px;
}

.discovery-section-desc {
  font-size: 10.5px;
  color: var(--color-text-3);
  font-family: var(--font-mono);
}

.discovery-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.discovery-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--link-bg);
  border: 1px solid var(--link-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  min-width: 130px;
}
.discovery-link:hover {
  background: var(--link-border);
  border-color: var(--link-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.discovery-icon {
  font-size: 14px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--link-border);
  border-radius: 6px;
  flex-shrink: 0;
  color: var(--link-color);
}

.discovery-link-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.discovery-link-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text);
}

.discovery-link-sublabel {
  font-size: 9.5px;
  color: var(--link-color);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .discovery-links {
    flex-direction: column;
  }
  .discovery-link {
    min-width: unset;
  }
}

/* Back button */
.back-row {
  text-align: center;
  margin-top: 48px;
}

.btn-secondary {
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  background: var(--color-glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: var(--color-accent-bright);
  border: 1px solid var(--color-edge);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: var(--color-glass-hi);
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.12);
}

/* ===== Footer ===== */
footer {
  padding: 32px 0;
  text-align: center;
  color: var(--color-text-3);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  border-top: 1px solid var(--color-divider);
  letter-spacing: 0.02em;
}

/* ===== Video / Image Modal ===== */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
}

.video-modal video,
.video-modal img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius);
  border: 1px solid var(--color-edge);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.6);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ffffff1f; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #ffffff38; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .app-content {
    padding: 0 14px;
  }

  h1 { font-size: 1.9rem; }
  .subtitle { font-size: 0.95rem; }

  .input-row {
    flex-direction: column;
  }

  .user-game-card {
    flex-direction: column;
    text-align: center;
  }
  .user-game-card img {
    width: 100%;
    max-width: 320px;
  }

  .card-header {
    flex-direction: column;
  }
  .card-header img {
    width: 100%;
  }

  .card-meta {
    justify-content: flex-start;
  }

  .screenshot-strip img {
    height: 90px;
  }

  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Growth Audit Popup ===== */
.audit-popup {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 320px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(52, 211, 153, 0.18) 100%);
  border: 1px solid rgba(134, 239, 172, 0.28);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  box-shadow:
    0 8px 32px rgba(16, 185, 129, 0.22),
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 22px 20px 20px;

  /* Slide-in animation */
  animation: popup-slide-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform-origin: bottom right;
}

.audit-popup.hiding {
  animation: popup-slide-out 0.3s ease-in forwards;
}

@keyframes popup-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes popup-slide-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
}

.audit-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--color-text-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.audit-popup-close:hover {
  color: var(--color-text);
  background: var(--color-glass-hi);
}

.audit-popup-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-popup-headline {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
}

.audit-popup-headline strong {
  color: var(--color-accent-bright);
  font-weight: 700;
}

.audit-popup-sub {
  font-size: 12.5px;
  color: var(--color-text-2);
  line-height: 1.5;
}

.audit-popup-btn {
  display: inline-block;
  margin-top: 4px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
}

.audit-popup-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.55);
}

.audit-popup-btn:active {
  transform: translateY(0);
}

/* ── Community Pulse (Reddit threads) ── */
#community-section {
  margin-top: 64px;
}

.community-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.community-meta-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a4b1ff;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.community-threads {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.thread-row {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(20, 24, 56, 0.5);
  border: 1px solid rgba(139, 148, 194, 0.18);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.thread-row:hover {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(20, 24, 56, 0.7);
}

.thread-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.thread-body {
  flex: 1;
  min-width: 0;
}

.thread-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
  color: #fff;
}

.thread-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #b3b9d8;
  font-family: var(--font-mono, ui-monospace, monospace);
}

.thread-sub {
  color: #a4b1ff;
  font-weight: 500;
}

.thread-stat {
  color: #b3b9d8;
}

.thread-flair {
  background: rgba(16, 185, 129, 0.15);
  color: #a4b1ff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.thread-date {
  margin-left: auto;
  color: #6a7099;
}

@media (max-width: 600px) {
  .thread-thumb { width: 56px; height: 56px; }
  .thread-meta { font-size: 11px; gap: 8px; }
  .thread-date { margin-left: 0; width: 100%; }
}

/* ── Community Pulse v2 layout ── */
#community-section {
  margin-top: 32px;
  margin-bottom: 56px;
}

.community-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.subsection-title {
  font-size: 14px;
  font-weight: 600;
  color: #b3b9d8;
  margin: 24px 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono, ui-monospace, monospace);
}

.subsection-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #6a7099;
  font-size: 12px;
  margin-left: 8px;
}

/* Filter chips */
.community-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.filter-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(20, 24, 56, 0.5);
  border: 1px solid rgba(139, 148, 194, 0.25);
  color: #b3b9d8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.filter-chip:hover {
  border-color: rgba(16, 185, 129, 0.5);
  color: #fff;
}

.filter-chip.is-active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.6);
  color: #fff;
}

.chip-emoji { font-size: 14px; }

.chip-count {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  color: #86efac;
  background: rgba(139, 148, 194, 0.15);
  padding: 2px 6px;
  border-radius: 999px;
}

/* Growing-games grid */
.growing-games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.growing-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(35, 32, 70, 0.55), rgba(20, 24, 56, 0.55));
  border: 1px solid rgba(139, 148, 194, 0.2);
  text-decoration: none;
  color: inherit;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}

.growing-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.18s;
}

.growing-card:hover { border-color: rgba(16, 185, 129, 0.55); transform: translateY(-1px); }
.growing-card:hover::before { opacity: 1; }

.growing-thumb {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(15, 18, 38, 0.7);
}

.growing-thumb-empty {
  display: grid;
  place-items: center;
  font-size: 32px;
  border: 1px solid rgba(139, 148, 194, 0.18);
}

.growing-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.growing-tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.growing-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--tag-color, #10b981) 18%, transparent);
  border: 1px solid color-mix(in oklab, var(--tag-color, #10b981) 50%, transparent);
  color: var(--tag-color, #fff);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono, ui-monospace, monospace);
}

.growing-tag-emoji { font-size: 12px; }

.growing-momentum {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  color: #ffd166;
  font-weight: 600;
}

.growing-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.growing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11.5px;
  color: #b3b9d8;
  font-family: var(--font-mono, ui-monospace, monospace);
  margin-top: auto;
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: #86efac;
  background: rgba(20, 24, 56, 0.3);
  border-radius: 12px;
  border: 1px dashed rgba(139, 148, 194, 0.2);
  font-size: 13px;
}

@media (max-width: 720px) {
  .growing-games { grid-template-columns: 1fr; }
  .growing-thumb { width: 88px; height: 88px; }
}

/* ── Community Pulse v3: thumbnails + heat ── */
.growing-thumb-wrap {
  width: 130px;
  height: 130px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(15, 18, 38, 0.7);
  position: relative;
}

/* Image sits ON TOP of the fallback. If onerror fires, this.remove() drops
   the img from the DOM and the fallback shines through cleanly. */
.growing-thumb-wrap .growing-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.growing-thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in oklab, var(--tag-color, #10b981) 35%, transparent), transparent 70%),
    linear-gradient(135deg, rgba(35, 32, 70, 0.9), rgba(15, 18, 38, 0.95));
  border: 1px solid color-mix(in oklab, var(--tag-color, #10b981) 30%, rgba(139, 148, 194, 0.2));
  border-radius: 10px;
  z-index: 0;
}

.growing-thumb-emoji { font-size: 36px; line-height: 1; }
.growing-thumb-label {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tag-color, #b3b9d8);
  font-weight: 600;
}

/* Heat states for the momentum chip */
.growing-momentum {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

.growing-momentum[data-heat="viral"] {
  color: #ff8b5e;
  background: rgba(255, 139, 94, 0.15);
  border: 1px solid rgba(255, 139, 94, 0.4);
  animation: pulse-viral 2.4s ease-in-out infinite;
}

.growing-momentum[data-heat="rising"] {
  color: #ffd166;
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.35);
}

.growing-momentum[data-heat="steady"] {
  color: #86efac;
  background: rgba(139, 148, 194, 0.1);
  border: 1px solid rgba(139, 148, 194, 0.2);
}

@keyframes pulse-viral {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 139, 94, 0.0); }
  50%      { box-shadow: 0 0 0 6px rgba(255, 139, 94, 0.12); }
}

@media (max-width: 720px) {
  .growing-thumb-wrap { width: 96px; height: 96px; }
  .growing-thumb-emoji { font-size: 28px; }
}

/* ── Tab switcher (Competitors vs Reddit) ── */
.tabs-bar {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 28px 0 24px;
  background: rgba(15, 18, 38, 0.55);
  border: 1px solid rgba(139, 148, 194, 0.15);
  border-radius: 14px;
  width: fit-content;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  background: transparent;
  color: #b3b9d8;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border-radius: 10px;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}

.tab-btn:hover { color: #fff; }

.tab-btn.is-active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(52, 211, 153, 0.18));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.4);
}

.tab-emoji { font-size: 16px; }

.tab-count {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(139, 148, 194, 0.18);
  color: #86efac;
}

.tab-btn.is-active .tab-count {
  background: rgba(16, 185, 129, 0.3);
  color: #fff;
}

.tab-pane { display: none; }
.tab-pane.is-active { display: block; }

@media (max-width: 600px) {
  .tabs-bar { width: 100%; }
  .tab-btn { flex: 1; justify-content: center; padding: 10px 12px; font-size: 13px; }
}

/* ── Pattern Spotlight (Viral Moments tab) ── */
.pattern-spotlight {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 28px;
}

.spotlight-eyebrow {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffd166;
  margin-bottom: 4px;
  font-weight: 600;
}

.spotlight-card {
  padding: 18px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.10), rgba(255, 139, 94, 0.06));
  border: 1px solid rgba(255, 209, 102, 0.35);
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 0% 0%, rgba(255, 139, 94, 0.18), transparent 50%);
}

.spotlight-card.spotlight-high {
  border-color: rgba(255, 139, 94, 0.55);
  background: linear-gradient(135deg, rgba(255, 139, 94, 0.16), rgba(255, 209, 102, 0.08));
}

.spotlight-headline {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 6px;
  position: relative;
}

.spotlight-evidence {
  font-size: 13.5px;
  color: #d6d8e8;
  line-height: 1.5;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════════════
   STORY MODE — Spotify-Wrapped-style scroll-snap experience
   Each section is fullscreen. Big numbers. Per-section accent colors.
   ═══════════════════════════════════════════════════════════════════════ */

#story-mode {
  scroll-snap-type: y mandatory;
  /* Fullscreen scroll within the page; outer page scroll is suppressed
     while in story mode so each tap → snap moves one section */
}

.story-card {
  min-height: 100vh;
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  background: var(--section-bg, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.story-card::before {
  /* Subtle grain on every section for texture */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E") 0 0 / 200px;
  mix-blend-mode: overlay;
}

.story-inner {
  position: relative;
  max-width: 980px;
  width: 100%;
  text-align: center;
  z-index: 2;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s,
              transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s;
}

.story-card.is-visible .story-inner {
  opacity: 1;
  transform: translateY(0);
}

/* Progress indicator (top right) */
.story-progress {
  position: absolute;
  top: 28px;
  right: 32px;
  z-index: 3;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: 0.12em;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.story-progress-num {
  color: var(--section-color, #fff);
  font-weight: 600;
  font-size: 14px;
}
.story-progress-total {
  color: rgba(255, 255, 255, 0.4);
}

/* Scroll hint (bottom center) */
.story-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  animation: story-bounce 2s ease-in-out infinite;
}
@keyframes story-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50%      { transform: translateX(-50%) translateY(4px); opacity: 0.85; }
}

/* Eyebrow above each section */
.story-eyebrow {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--section-color, #86efac);
  margin-bottom: 28px;
  font-weight: 600;
}

/* Big number — the screenshot anchor */
.story-bignum {
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-weight: 800;
  font-size: clamp(120px, 18vw, 220px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--section-color, #fff);
  text-shadow: 0 0 80px color-mix(in oklab, var(--section-color, #fff) 35%, transparent);
  margin-bottom: 14px;
}

.story-bigheadline {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 18px;
}
.story-bigheadline em {
  color: var(--section-color, #fff);
  font-style: normal;
}

.story-supporting {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  max-width: 620px;
  margin: 0 auto;
}

/* Section headlines (when no big number) */
.story-headline {
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 24px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.story-body {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 18px;
}
.story-confidence {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--section-color, #fff) 15%, transparent);
  border: 1px solid color-mix(in oklab, var(--section-color, #fff) 35%, transparent);
  color: var(--section-color, #fff);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* HERO — game capsule + title */
.story-hero-capsule {
  margin: 0 auto 24px;
  max-width: 460px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7),
              0 0 80px -10px color-mix(in oklab, var(--section-color, #10b981) 40%, transparent);
}
.story-hero-capsule img {
  display: block;
  width: 100%;
  height: auto;
}
.story-hero-title {
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
  margin-bottom: 18px;
}
.story-hero-meta {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  margin-bottom: 22px;
}
.story-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.story-tag {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-mono, ui-monospace, monospace);
}

/* TOP 3 — three competitor cards in a row */
.story-top3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}
.story-top3-card {
  background: rgba(15, 18, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: border-color 0.18s, transform 0.18s;
  text-align: left;
}
.story-top3-card:hover {
  border-color: var(--section-color, #fff);
  transform: translateY(-2px);
}
.story-top3-rank {
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 13px;
  font-weight: 700;
  color: var(--section-color, #fff);
  letter-spacing: 0.1em;
}
.story-top3-rank::before { content: '#'; opacity: 0.6; }
.story-top3-capsule {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 14px;
  display: block;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  background: rgba(0,0,0,0.4);
}
.story-top3-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-top3-meta {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* VIRAL — single hero card */
.story-viral-card {
  display: flex;
  gap: 18px;
  background: rgba(15, 18, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px;
  margin-top: 28px;
  text-decoration: none;
  color: inherit;
  text-align: left;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  transition: border-color 0.18s;
}
.story-viral-card:hover { border-color: var(--section-color, #fff); }
.story-viral-thumb {
  width: 200px;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.story-viral-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}
.story-viral-platform {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--section-color, #fff);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.story-viral-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

/* REDDIT — single thread card */
.story-reddit-card {
  display: block;
  background: rgba(15, 18, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 22px;
  margin-top: 28px;
  text-decoration: none;
  color: inherit;
  text-align: left;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  transition: border-color 0.18s;
}
.story-reddit-card:hover { border-color: var(--section-color, #fff); }
.story-reddit-sub {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--section-color, #fff);
  margin-bottom: 8px;
}
.story-reddit-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 8px;
}
.story-reddit-meta {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* EDGE CARD — the screenshot artifact */
.story-edge-card {
  background: linear-gradient(135deg, rgba(35, 32, 70, 0.95), rgba(15, 18, 38, 0.95));
  border: 1px solid color-mix(in oklab, var(--section-color, #fff) 35%, rgba(255, 255, 255, 0.1));
  border-radius: 24px;
  padding: 32px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6),
              0 0 100px -20px color-mix(in oklab, var(--section-color, #fff) 30%, transparent);
  text-align: left;
}
.story-edge-header { text-align: center; margin-bottom: 24px; }
.story-edge-eyebrow {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--section-color, #fff);
  margin-bottom: 8px;
}
.story-edge-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}
.story-edge-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
}
.story-edge-row {
  display: grid;
  grid-template-columns: 30px 100px 1fr;
  gap: 12px;
  align-items: start;
}
.story-edge-marker {
  font-size: 18px;
  color: var(--section-color, #fff);
  font-weight: 700;
}
.story-edge-label {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  padding-top: 4px;
}
.story-edge-text {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}
.story-edge-footer {
  margin-top: 16px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}
.story-share-hint {
  margin-top: 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.story-share-hint:hover {
  border-color: var(--section-color, #fff);
  color: var(--section-color, #fff);
}

/* CTA card */
.story-cta-headline {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 22px;
}
.story-cta-body {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto 32px;
}
.story-cta-btn {
  display: inline-block;
  padding: 18px 40px;
  border-radius: 999px;
  background: var(--section-color, #fff);
  color: #0b0e22;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 40px -10px color-mix(in oklab, var(--section-color, #fff) 60%, transparent);
  transition: transform 0.18s, box-shadow 0.18s;
}
.story-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 50px -10px color-mix(in oklab, var(--section-color, #fff) 70%, transparent);
}
.story-cta-secondary {
  margin-top: 32px;
  display: flex;
  gap: 24px;
  justify-content: center;
}
.story-link {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.story-link:hover { color: var(--section-color, #fff); }

/* View mode bar — always visible at the bottom of the story */
.view-mode-bar {
  position: sticky;
  bottom: 24px;
  z-index: 30;
  display: flex;
  justify-content: center;
  pointer-events: none;
  margin-top: -60px;
  padding-bottom: 24px;
}
.toggle-view-btn {
  pointer-events: auto;
  background: rgba(15, 18, 38, 0.85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.toggle-view-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(15, 18, 38, 0.95);
}

/* Mobile */
@media (max-width: 720px) {
  .story-card { padding: 60px 20px; }
  .story-progress { top: 18px; right: 20px; }
  .story-bignum { font-size: clamp(80px, 22vw, 130px); }
  .story-hero-title { font-size: clamp(36px, 10vw, 60px); }
  .story-headline { font-size: clamp(28px, 7vw, 44px); }
  .story-cta-headline { font-size: clamp(32px, 8vw, 52px); }
  .story-top3-grid { grid-template-columns: 1fr; gap: 12px; }
  .story-viral-card { flex-direction: column; }
  .story-viral-thumb { width: 100%; height: auto; aspect-ratio: 16/9; }
  .story-edge-card { padding: 24px; }
  .story-edge-row { grid-template-columns: 24px 1fr; }
  .story-edge-label { grid-column: 2; padding-top: 0; }
  .story-edge-text { grid-column: 2; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .story-inner { transition: none; opacity: 1; transform: none; }
  .story-scroll-hint { animation: none; }
}

/* ─── Content-rich Story Mode v2 ─── */

/* Allow content-rich sections to be taller than viewport — scroll-snap still
   works because we use min-height:100vh and snap-align:start */
.story-card-field, .story-card-pattern, .story-card-viral,
.story-card-redditgrid, .story-card-top3 {
  height: auto;
  min-height: 100vh;
  align-items: flex-start;
  padding-top: 90px;
  padding-bottom: 90px;
}

.story-card-field .story-inner,
.story-card-pattern .story-inner,
.story-card-viral .story-inner,
.story-card-redditgrid .story-inner,
.story-card-top3 .story-inner {
  max-width: 1200px;
}

.story-section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 36px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

/* THE FIELD — 3x3 competitor capsule grid */
.story-field-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.story-field-card {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: rgba(15, 18, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  aspect-ratio: 460 / 215;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.story-field-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.story-field-card:hover {
  border-color: var(--section-color, #fff);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px color-mix(in oklab, var(--section-color, #fff) 40%, transparent);
}
.story-field-card:hover img { transform: scale(1.04); }

.story-field-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}
.story-field-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-field-meta {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}

.story-field-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.story-pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.75);
}
.story-pill-accent {
  background: color-mix(in oklab, var(--section-color, #fff) 14%, transparent);
  border-color: color-mix(in oklab, var(--section-color, #fff) 40%, transparent);
  color: var(--section-color, #fff);
}

/* PATTERN — headline + 3 evidence cards */
.story-pattern-headline {
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 18px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.story-pattern-evidence {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  max-width: 720px;
  margin: 0 auto 36px;
}
.story-evidence-label {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.story-evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
}
.story-evidence-card {
  display: block;
  background: rgba(15, 18, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  text-align: left;
  transition: border-color 0.18s, transform 0.18s;
}
.story-evidence-card:hover {
  border-color: var(--section-color, #fff);
  transform: translateY(-2px);
}
.story-evidence-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.story-evidence-noimg {
  width: 100%;
  height: 130px;
  background: linear-gradient(135deg, rgba(16, 185, 129,0.2), rgba(15,18,38,0.6));
  display: grid;
  place-items: center;
  font-size: 36px;
  color: rgba(255, 255, 255, 0.4);
}
.story-evidence-body { padding: 12px; }
.story-evidence-platform {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--section-color, #fff);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.story-evidence-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.story-evidence-stat {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

/* VIRAL — 3-column grid of viral content tiles */
.story-viral-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}
.story-viral-tile {
  position: relative;
  aspect-ratio: 16 / 11;
  background: rgba(15, 18, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.story-viral-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.story-viral-noimg {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, color-mix(in oklab, var(--platform-color, #fff) 30%, transparent), rgba(15,18,38,0.6));
  display: grid;
  place-items: center;
  font-size: 56px;
  color: rgba(255, 255, 255, 0.4);
}
.story-viral-tile:hover {
  border-color: var(--platform-color, var(--section-color, #fff));
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px color-mix(in oklab, var(--platform-color, var(--section-color, #fff)) 50%, transparent);
}
.story-viral-tile:hover img { transform: scale(1.03); }
.story-viral-tile-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 14px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55) 50%, transparent);
}
.story-viral-tile-platform {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: color-mix(in oklab, var(--platform-color, #fff) 22%, transparent);
  border: 1px solid color-mix(in oklab, var(--platform-color, #fff) 50%, transparent);
  color: var(--platform-color, #fff);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.story-viral-tile-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.story-viral-tile-stat {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

/* REDDIT — 3x2 grid of thread tiles */
.story-reddit-sources {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 24px;
}
.story-reddit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}
.story-reddit-tile {
  display: flex;
  gap: 12px;
  background: rgba(15, 18, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  text-align: left;
  transition: border-color 0.18s, transform 0.18s;
}
.story-reddit-tile:hover {
  border-color: var(--section-color, #fff);
  transform: translateY(-2px);
}
.story-reddit-tile-thumb {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 8px;
}
.story-reddit-tile-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.story-reddit-tile-sub {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  color: var(--section-color, #fff);
  margin-bottom: 4px;
}
.story-reddit-tile-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.story-reddit-tile-meta {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: auto;
}

/* TOP 3 — enrich with screenshot row */
.story-top3-screens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 12px;
}
.story-top3-screens img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: rgba(0,0,0,0.4);
}

/* Mobile — stack everything */
@media (max-width: 720px) {
  .story-field-grid,
  .story-evidence-grid,
  .story-viral-grid,
  .story-reddit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .story-section-title { font-size: clamp(22px, 6vw, 32px); margin-bottom: 22px; }
  .story-pattern-headline { font-size: clamp(26px, 7vw, 38px); }
  .story-card-field, .story-card-pattern, .story-card-viral,
  .story-card-redditgrid, .story-card-top3 {
    padding: 70px 16px;
  }
  .story-reddit-tile-thumb { width: 56px; height: 56px; }
}
@media (max-width: 480px) {
  .story-field-grid,
  .story-evidence-grid,
  .story-viral-grid,
  .story-reddit-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Onboarding flow (no Steam page yet) ─── */

.hero-or {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px auto 14px;
  max-width: 320px;
  position: relative;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero-or::before,
.hero-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.hero-or span {
  padding: 0 14px;
}

.quickstart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: 999px;
  color: #a7f3d0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  margin: 0 auto;
}
.quickstart-toggle:hover {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.5);
  color: #fff;
}
.quickstart-toggle.is-open {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.6);
  color: #fff;
}
.quickstart-toggle.is-open .qs-text::after {
  content: ' ↓';
}
.quickstart-toggle strong {
  color: #fff;
  font-weight: 700;
}
.qs-emoji { font-size: 16px; }

/* The form itself */
.onboarding-form {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 32px;
  background: rgba(15, 18, 38, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  text-align: left;
  animation: onboarding-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes onboarding-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.onboarding-step {
  margin-bottom: 24px;
}
.onboarding-step:last-of-type {
  margin-bottom: 0;
}

.onboarding-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.onboarding-step-num {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(134, 239, 172, 0.85);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.onboarding-hint {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.04em;
}

.onboarding-form input[type="text"] {
  width: 100%;
  padding: 14px 18px;
  background: rgba(15, 18, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.onboarding-form input[type="text"]:focus {
  border-color: rgba(134, 239, 172, 0.6);
  background: rgba(15, 18, 38, 0.85);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.onboarding-form input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* Tag chip picker */
.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.tag-picker::-webkit-scrollbar { width: 6px; }
.tag-picker::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }

.tag-chip {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.75);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
}
.tag-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.tag-chip.is-selected {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(134, 239, 172, 0.65);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(134, 239, 172, 0.4) inset;
}
.tag-chip.is-selected::before {
  content: '✓ ';
  color: #86efac;
}

/* Submit button */
.onboarding-submit {
  width: 100%;
  margin-top: 8px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #10b981, #34d399);
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 8px 24px -8px rgba(16, 185, 129, 0.5);
}
.onboarding-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px rgba(16, 185, 129, 0.7);
}
.onboarding-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 600px) {
  .onboarding-form { padding: 22px; }
  .tag-picker { max-height: 220px; }
}

/* ──────────────────────────────────────────────────────────────────────
   Onboarding wizard — 3-step flow with big genre tiles (matches the
   reference screenshot: numbered step header, huge headline, tile grid).
   ─────────────────────────────────────────────────────────────────── */

.onboarding-wizard {
  max-width: 1180px;
  margin: 36px auto 0;
  text-align: left;
  position: relative;
  z-index: 5;
}

.wizard-step {
  display: none;
  animation: wizard-step-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.wizard-step.is-active { display: block; }

@keyframes wizard-step-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wizard-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.wizard-step-num {
  color: #f6c560;
  font-weight: 700;
}
.wizard-step-label {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
}

.wizard-question {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: #fff;
  margin-bottom: 8px;
}

.wizard-sublabel {
  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
  margin-bottom: 28px;
}
.wizard-sublabel #genre-counter {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #a7f3d0;
  margin-left: 6px;
}

/* Step 1 — Name input */
.wizard-text-input {
  width: 100%;
  padding: 22px 26px;
  background: rgba(15, 18, 38, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: #fff;
  font-family: inherit;
  font-size: 22px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}
.wizard-text-input:focus {
  border-color: rgba(134, 239, 172, 0.6);
  background: rgba(15, 18, 38, 0.7);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}
.wizard-text-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

/* Step 2 — Genre tiles (5 × 3 grid, matches reference screenshot) */
.genre-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.genre-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 24px 22px;
  min-height: 200px;
  background: rgba(20, 22, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.genre-tile:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(25, 28, 44, 0.92);
  transform: translateY(-2px);
}

.genre-tile.is-selected {
  border-color: rgba(134, 239, 172, 0.7);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(52, 211, 153, 0.10));
  box-shadow:
    0 0 0 1px rgba(134, 239, 172, 0.35) inset,
    0 12px 32px -10px rgba(16, 185, 129, 0.4);
}

.genre-tile.is-selected::after {
  content: '✓';
  position: absolute;
  top: 14px;
  right: 16px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(134, 239, 172, 0.95);
  color: #0f0a2e;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.genre-tile-emoji {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 6px;
}

.genre-tile-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.genre-tile-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.45;
  margin-top: auto;
}

/* Step 3 — Pitch */
.wizard-textarea {
  width: 100%;
  padding: 18px 22px;
  background: rgba(15, 18, 38, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  outline: none;
  resize: vertical;
  min-height: 88px;
  transition: border-color 0.18s, background 0.18s;
}
.wizard-textarea:focus {
  border-color: rgba(134, 239, 172, 0.6);
  background: rgba(15, 18, 38, 0.7);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}
.wizard-textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.wizard-summary {
  margin-top: 22px;
  padding: 18px 20px;
  background: rgba(15, 18, 38, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.wizard-summary-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  padding: 6px 0;
  font-size: 13px;
}
.wizard-summary-label {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.5);
  align-self: center;
}
.wizard-summary-value {
  color: #fff;
  font-weight: 500;
}

/* Wizard navigation */
.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 32px;
}

.wizard-back {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  padding: 12px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.wizard-back:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.wizard-next, .wizard-submit {
  padding: 14px 30px;
  background: linear-gradient(135deg, #10b981, #34d399);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 8px 24px -8px rgba(16, 185, 129, 0.5);
}
.wizard-next:hover, .wizard-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px rgba(16, 185, 129, 0.7);
}
.wizard-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Mobile — collapse tile grid */
@media (max-width: 1100px) {
  .genre-tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .genre-tiles { grid-template-columns: repeat(2, 1fr); }
  .genre-tile { min-height: 170px; padding: 20px 18px; }
  .wizard-question { font-size: clamp(28px, 7vw, 42px); }
  .wizard-text-input { font-size: 18px; padding: 18px 22px; }
}
@media (max-width: 480px) {
  .genre-tiles { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────────────────────────────────────
   Retro Grid background (magicui port) — perspective-rotated grid that
   scrolls toward the camera with a fade at the top. Replaces the orbs
   as the dominant background motif.
   ─────────────────────────────────────────────────────────────────── */

.retro-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  perspective: 200px;
  opacity: 0.42;
  z-index: 0;
}

.retro-grid-rotator {
  position: absolute;
  inset: 0;
  transform: rotateX(65deg);
}

.retro-grid-lines {
  position: absolute;
  inset: 0;
  width: 600vw;
  height: 300vh;
  margin-left: -50%;
  transform-origin: 100% 0 0;
  background-image:
    linear-gradient(to right, rgba(134, 239, 172, 0.6) 1px, transparent 0),
    linear-gradient(to bottom, rgba(134, 239, 172, 0.6) 1px, transparent 0);
  background-size: 60px 60px;
  background-repeat: repeat;
  animation: retro-grid-scroll 14s linear infinite;
}

@keyframes retro-grid-scroll {
  0%   { transform: translateY(-50%); }
  100% { transform: translateY(0); }
}

/* Top fade so the grid disappears at the horizon (the perspective trick) */
.retro-grid-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(5, 5, 16, 0) 0%, rgba(5, 5, 16, 0.7) 60%, #050510 100%),
    radial-gradient(ellipse at 50% 100%, transparent 0%, rgba(5, 5, 16, 0.4) 75%);
}

@media (prefers-reduced-motion: reduce) {
  .retro-grid-lines { animation: none; }
}

/* Dim the orbs now that retro grid is the dominant background motif */
.orb-1, .orb-2, .orb-3 { opacity: 0.25; }

/* ─── View-All CTAs at the bottom of each Story Mode section ─── */
.story-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 36px auto 0;
  padding: 14px 26px;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 999px;
  color: #a7f3d0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.01em;
}
.story-view-all:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.7);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -10px rgba(16, 185, 129, 0.4);
}

/* The CTA centers itself inside section's flex/grid parents */
.story-card .story-inner > .story-view-all {
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Refresh orb colors to emerald palette (was indigo/violet) ─── */
.orb-1 {
  background: radial-gradient(circle, #10b981, #047857 60%, transparent);
}
.orb-2 {
  background: radial-gradient(circle, #34d399, #065f46 70%, transparent);
}
.orb-3 {
  background: radial-gradient(circle, #059669, #064e3b 65%, transparent);
}

/* ─── Back to Wrapped — prominent header button in the detailed view ─── */
.back-to-wrapped {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  margin-bottom: 28px;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 999px;
  color: #a7f3d0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.01em;
  position: sticky;
  top: 16px;
  z-index: 40;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.back-to-wrapped:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(52, 211, 153, 0.75);
  color: #fff;
  transform: translateX(-2px);
  box-shadow: 0 12px 32px -10px rgba(16, 185, 129, 0.45);
}
.back-to-wrapped .back-arrow {
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.18s;
}
.back-to-wrapped:hover .back-arrow {
  transform: translateX(-3px);
}
