:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-alt: #F3EDE2;
  --ink: #1C1917;
  --muted: #57534E;
  --border: #E5DDD0;
  --gold: #9A6B2F;
  --gold-bright: #D4AF37;
  --gold-hover: #7C5320;
  --indigo: #1E3A5F;
  --indigo-deep: #142842;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(30, 58, 95, 0.08);
  --font-serif: Georgia, 'Times New Roman', Cambria, serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.is-embed {
  background: #FAF7F2;
  min-height: 100vh;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }

.wrap { max-width: 1020px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--indigo);
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--gold); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--indigo);
  color: var(--gold-bright);
  font-size: 1rem;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.nav-link { font-size: 0.94rem; font-weight: 500; color: var(--muted); }
.nav-link:hover { color: var(--indigo); text-decoration: none; }

/* Hero + Quiz Stage */
.hero-section { padding: 28px 0 20px; }
.hero-head { text-align: center; max-width: 760px; margin: 0 auto 22px; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
h1, h2, h3 { font-family: var(--font-serif); color: var(--indigo); line-height: 1.25; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin: 0 0 10px; }
h2 { font-size: clamp(1.38rem, 2.6vw, 1.85rem); margin: 36px 0 14px; }
h3 { font-size: 1.15rem; margin: 22px 0 8px; }
.hero-sub { font-size: 1.05rem; color: var(--muted); margin: 0; }

.stage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stage {
  position: relative;
  width: 100%;
  min-height: 600px;
  aspect-ratio: 16 / 10;
  background: var(--indigo-deep);
}
.stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  z-index: 3;
  background: var(--bg);
}
.cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  background: radial-gradient(circle at 50% 20%, #264B7A 0%, #142842 100%);
  color: #FAF7F2;
  cursor: pointer;
}
[data-gf-state="loading"] .cover,
[data-gf-state="playing"] .cover {
  display: none !important;
}
.cover-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}
.cover-inner { position: relative; z-index: 2; max-width: 620px; }
.cover-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  background: rgba(20, 40, 66, 0.72);
  color: #F3DF9E;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.cover-title {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 3.2vw, 2.25rem);
  margin: 0 0 12px;
  color: #FFFFFF;
}
.cover-desc {
  color: #E5DDD0;
  font-size: 1rem;
  margin: 0 0 24px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold-bright);
  color: var(--indigo-deep);
  border: 0;
  border-radius: 999px;
  padding: 14px 32px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.35);
}
.btn-primary:hover { background: #E3C254; transform: translateY(-1px); text-decoration: none; color: var(--indigo-deep); }
.cover-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  font-size: 0.86rem;
  color: #CBD5E1;
}

.loader {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--indigo-deep);
  color: #FAF7F2;
  font-weight: 600;
}
[data-gf-state="loading"] .loader { display: flex; }
[data-gf-state="playing"] .loader { display: none; }
.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(212, 175, 55, 0.28);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Action Bar */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}
.action-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--indigo); }
.btn-ghost[data-gf-liked] {
  background: #FEF3C7;
  border-color: var(--gold);
  color: var(--gold-hover);
}
.share-msg { font-size: 0.84rem; color: var(--gold-hover); font-weight: 600; }

/* Content Sections */
.content-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px clamp(20px, 4vw, 44px);
  margin: 26px 0;
  box-shadow: 0 4px 16px rgba(28, 25, 23, 0.04);
}
.content-body p { margin: 0 0 16px; color: #292524; }
.content-body ul, .content-body ol { padding-left: 22px; margin: 0 0 18px; }
.content-body li { margin-bottom: 8px; }

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 24px;
  font-size: 0.94rem;
}
.content-body th, .content-body td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.content-body th {
  background: var(--surface-alt);
  color: var(--indigo);
  font-weight: 700;
}

/* Cross-link Banner */
.companion-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #1E3A5F 0%, #264A76 100%);
  color: #FAF7F2;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 24px 0;
}
.companion-card h2 { color: #FFFFFF; margin: 0 0 6px; font-size: 1.35rem; }
.companion-card p { margin: 0; color: #E5DDD0; max-width: 580px; }

/* FAQ */
.faq-list { display: grid; gap: 12px; margin-top: 14px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  background: var(--bg);
}
.faq-item summary {
  font-weight: 700;
  color: var(--indigo);
  cursor: pointer;
  list-style: none;
}
.faq-item p { margin: 10px 0 0; color: var(--muted); }

/* Comments */
.comments-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px clamp(20px, 4vw, 36px);
  margin: 26px 0 40px;
}
.comments-section h2 { margin-top: 0; }
.comment-form { display: grid; gap: 12px; margin: 16px 0 22px; }
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: var(--bg);
  color: var(--ink);
}
.comment-form textarea { min-height: 92px; resize: vertical; }
.comment-reply-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--indigo);
  background: var(--surface-alt);
  padding: 8px 12px;
  border-radius: 8px;
}
[data-gf-replying] .comment-reply-bar { display: flex; }
.comments-list { display: grid; gap: 14px; }
.comments-list[data-gf-empty]::after {
  content: "Be the first to share your dominant virtue result below.";
  display: block;
  color: var(--muted);
  font-size: 0.94rem;
  padding: 12px 0;
}
.comment-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--bg);
}
.comment-item[data-gf-owner] {
  border-color: var(--gold);
  background: #FFFBF2;
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.comment-name { font-weight: 700; color: var(--indigo); }
.owner-badge {
  display: none;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--gold);
  color: #FFFFFF;
  padding: 2px 7px;
  border-radius: 999px;
}
[data-gf-owner] .owner-badge { display: inline-block; }
.comment-text { margin: 0 0 8px; white-space: pre-wrap; }
.comment-replies { margin-top: 10px; padding-left: 16px; border-left: 2px solid var(--border); display: grid; gap: 10px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 36px 0 44px;
  margin-top: 40px;
}
.footer-inner { display: grid; gap: 18px; }
.footer-tagline { margin: 8px 0 0; color: var(--muted); font-size: 0.93rem; max-width: 520px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.92rem; }
.footer-copy { margin: 0; font-size: 0.84rem; color: var(--muted); }

@media (max-width: 720px) {
  .stage { min-height: 640px; aspect-ratio: auto; }
  .header-inner { flex-direction: column; padding: 12px 0; }
}
