:root {
  --bg: #0b0f1a;
  --surface: #151b2b;
  --surface-alt: #101524;
  --border: #26314d;
  --text: #e8ecf5;
  --muted: #9aa4b8;
  --primary: #6d4aff;
  --primary-hover: #5b37f0;
  --accent: #22d3ee;
  --amber: #fbbf24;
  --rose: #fb7185;
  --white: #ffffff;
  --radius: 12px;
  --font-head: "Space Grotesk", Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  max-width: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--amber); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--primary); color: var(--white);
  padding: 8px 16px; border-radius: var(--radius); text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 16px; z-index: 50; }

/* Header */
.topbar { background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px;
}
.brand-mark {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-head); font-size: 22px; font-weight: 700;
  color: var(--text); text-decoration: none;
}
.brand-mark:hover { color: var(--white); }
.brand-cube {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--primary); border: 2px solid var(--amber);
  display: inline-block; transform: rotate(-10deg);
}
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  color: var(--muted); text-decoration: none; font-weight: 600;
  font-size: 14px; padding: 8px 12px; border-radius: var(--radius);
}
.main-nav a:hover { color: var(--text); background: var(--surface); }

/* Typography */
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--text); }
h1 { font-size: 48px; margin: 0; }
h2 { font-size: 28px; margin: 48px 0 16px; }
h3 { font-size: 22px; margin: 32px 0 12px; }
.stage-lede { color: var(--muted); font-size: 18px; margin: 8px 0 0; max-width: 70ch; }
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14px; color: var(--muted); margin-bottom: 12px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* Harmonized Golden Ad Slots (Top Banner + Below Hero Game/Tool) — silent when empty */
.gfs-ad-slot:empty, .gfs-ad-slot-wrap:empty, .ad-third-party:empty { display: none; }
.gfs-ad-slot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 16px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}
.gfs-ad-slot-top { padding: 8px 12px; margin-top: 0; margin-bottom: 16px; }

/* Stage & Player */
.section-stage { padding-top: 24px; padding-bottom: 16px; }
.stage-intro { margin-bottom: 16px; }
.player-frame {
  position: relative; width: 100%; min-height: 580px; height: clamp(580px, 76vh, 720px);
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-cover {
  position: absolute; inset: 0; background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.cover-grid {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px;
  align-items: center; max-width: 960px; width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.cover-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--border); }
.cover-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cover-badge {
  margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--amber);
  background: var(--surface-alt); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: var(--radius);
}
.cover-headline { margin: 0; font-family: var(--font-head); font-size: 28px; line-height: 1.2; font-weight: 700; }
.cover-specs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.cover-specs span {
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px 12px;
}
.cover-specs b { color: var(--accent); }
.cover-hint { margin: 0; font-size: 14px; color: var(--muted); }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--radius);
  background: var(--primary); color: var(--white);
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn-primary:hover { background: var(--primary-hover); color: var(--white); }
.cover-play-btn { width: 100%; font-size: 18px; min-height: 52px; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); color: var(--text);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline[aria-pressed="true"], .btn-outline[data-gf-liked] {
  border-color: var(--amber); color: var(--amber);
}

/* Loading Animation */
.player-loading {
  position: absolute; inset: 0; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: var(--surface-alt); color: var(--muted); font-size: 16px;
}
.player-frame[data-gf-state="loading"] .player-loading { display: flex; }
.eq-bars { display: flex; align-items: flex-end; gap: 8px; height: 48px; }
.eq-bars span {
  width: 8px; height: 16px; border-radius: 4px; background: var(--accent);
  animation: eqPulse 0.8s ease-in-out infinite;
}
.eq-bars span:nth-child(2) { animation-delay: 0.12s; background: var(--primary); }
.eq-bars span:nth-child(3) { animation-delay: 0.24s; background: var(--amber); }
.eq-bars span:nth-child(4) { animation-delay: 0.36s; background: var(--primary); }
.eq-bars span:nth-child(5) { animation-delay: 0.48s; background: var(--accent); }
@keyframes eqPulse { 0%, 100% { height: 14px; } 50% { height: 46px; } }

/* Toolbar */
.stage-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px;
}
.toolbar-fs { margin-left: auto; }
.toolbar-num, .toolbar-status { font-size: 14px; color: var(--muted); }
.ios-install-tip { margin: 8px 0 0; font-size: 14px; color: var(--amber); }
.ios-install-tip[hidden] { display: none; }

/* Mode Navigation Cards */
.mode-grid-section { margin-top: 24px; }
.mode-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mode-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--text);
}
.mode-card:hover { border-color: var(--accent); color: var(--text); }
.mode-card img { border-radius: 0; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--border); }
.mode-card-body { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.mode-card-body strong { font-family: var(--font-head); font-size: 18px; color: var(--text); }
.mode-card-body span { font-size: 14px; color: var(--muted); }

/* Prose & Content */
.section-prose { padding-top: 32px; padding-bottom: 64px; }
.page-top { padding-top: 32px; }
.article-head { margin-bottom: 24px; }
.legal-updated { font-size: 14px; color: var(--muted); margin: 8px 0 0; }

.prose { min-width: 0; max-width: 100%; overflow-wrap: break-word; }
.prose p, .prose li { font-size: 16px; color: var(--text); max-width: 70ch; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 24px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose img { margin: 24px 0; border: 1px solid var(--border); max-width: 820px; width: 100%; }
.prose table {
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
  width: 100%; max-width: 100%; border-collapse: collapse; margin: 24px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.prose th, .prose td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px;
}
.prose th { background: var(--surface-alt); font-weight: 600; color: var(--amber); }
.prose code {
  background: var(--surface); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 6px; font-size: 14px;
}

/* Answers Explorer Tool */
.vault-tool {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin: 24px 0 32px;
}
.vault-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.vault-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.vault-date-tag { margin: 0; font-size: 14px; color: var(--muted); }
.vault-lookup {
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 24px;
}
.vault-lookup label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.lookup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lookup-row input {
  flex: 1; min-width: 220px; min-height: 44px; padding: 0 16px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); font: inherit;
}
.lookup-out { margin-top: 8px; font-size: 14px; color: var(--accent); }

.prompt-spoiler-list { display: flex; flex-direction: column; gap: 12px; }
.spoiler-card {
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.spoiler-card summary {
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; list-style: none;
}
.spoiler-card summary::-webkit-details-marker { display: none; }
.sp-num { font-size: 12px; font-weight: 600; color: var(--amber); text-transform: uppercase; }
.sp-cta { font-size: 14px; color: var(--accent); font-weight: 600; }
.spoiler-body { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.tier-group { display: flex; flex-direction: column; gap: 4px; }
.tier-group p { margin: 0; font-size: 14px; color: var(--text); }
.tier-pill {
  display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border);
}
.tp-5 { color: var(--accent); border-color: var(--accent); }
.tp-4 { color: var(--amber); border-color: var(--amber); }
.tp-3 { color: var(--text); }
.tp-2, .tp-1 { color: var(--muted); }

.vault-index-details { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; }
.vault-index-details summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.vault-table-wrap { overflow-x: auto; margin-top: 16px; }
.vault-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vault-table th, .vault-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.vault-table th { color: var(--amber); font-weight: 600; }

/* CTA Strip */
.cta-strip {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin: 48px 0 0; padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.cta-strip p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.cta-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* FAQ */
.faq-block { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.faq-block h2 { margin-top: 0; }
.faq-list { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.faq-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.faq-row dt { font-family: var(--font-head); font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.faq-row dd { margin: 0; font-size: 16px; color: var(--muted); }

/* Comments */
.discuss-block { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.discuss-head h2 { margin-top: 0; margin-bottom: 8px; }
.discuss-sub { margin: 0 0 24px; color: var(--muted); font-size: 16px; }
.comment-form {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
  display: flex; flex-direction: column; gap: 12px; max-width: 720px;
}
.comment-form input, .comment-form textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; font: inherit;
}
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.comment-form:not([data-gf-replying]) [data-gf-reply-cancel],
.comment-form:not([data-gf-replying]) .reply-banner { display: none; }
.reply-banner { font-size: 14px; color: var(--amber); }

.comment-stream { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.comment-stream[data-gf-off] { display: none; }
.comment-empty-note { display: none; color: var(--muted); margin: 0; }
.comment-stream[data-gf-empty] .comment-empty-note { display: block; }
.comment-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.comment-item[data-gf-owner] { border-color: var(--amber); }
.comment-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.comment-meta strong { color: var(--text); }
.owner-pill {
  background: var(--amber); color: var(--bg); font-size: 12px;
  font-weight: 600; padding: 2px 8px; border-radius: 6px;
}
.comment-body { margin: 8px 0; white-space: pre-wrap; }
.reply-btn {
  background: transparent; border: 0; color: var(--accent);
  font: inherit; font-size: 14px; font-weight: 600; padding: 4px 0; cursor: pointer;
}
.comment-replies { margin-top: 12px; padding-left: 16px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 12px; }

/* Footer */
.site-footer {
  background: var(--surface-alt); border-top: 1px solid var(--border);
  padding: 48px 0 32px; margin-top: 48px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.footer-brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-head); font-size: 22px; font-weight: 700; margin: 0 0 12px;
}
.footer-disclaimer { margin: 0; font-size: 14px; color: var(--muted); max-width: 52ch; }
.footer-heading { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--amber); text-transform: uppercase; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--border); font-size: 14px; color: var(--muted);
}

.embed-host { margin: 0; padding: 0; background: var(--bg); }

/* Mobile <= 640px */
@media (max-width: 820px) {
  .cover-grid { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .cover-media img { max-height: 200px; }
  .mode-cards, .faq-list, .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .player-frame { height: 640px; min-height: 600px; }
  .player-cover { padding: 12px; }
  .cover-headline { font-size: 22px; }
  .cta-buttons .btn-primary, .cta-buttons .btn-outline { width: 100%; }
}
