:root {
  --bg: #f7f1e8;
  --card: #fffaf2;
  --text: #2b2118;
  --muted: #6b5b4b;
  --primary: #c2562f;
  --accent: #e0a03a;
  --border: rgba(43, 33, 24, 0.14);
  --surface-tint: rgba(194, 86, 47, 0.08);
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.08);
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body.embed-body {
  background: var(--card);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 16px 0;
}

h1 {
  font-size: 36px;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 22px;
}

p {
  margin: 0 0 16px 0;
  max-width: 70ch;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

a:hover {
  color: #9e4220;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Header & Footer */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
}

.roman-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  background: var(--primary);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.nav-link:hover {
  color: var(--primary);
}


/* Buttons */
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 24px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background: #a34522;
  border-color: #a34522;
  color: #ffffff;
}

.btn-outline {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-primary:focus-visible,
.btn-outline:focus-visible,
.link-btn:focus-visible,
.quiz-opt:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.link-btn {
  background: none;
  border: 0;
  padding: 4px 8px;
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* First-Screen Stage */
.hero-stage-section {
  padding: 24px 0 32px 0;
}

.stage-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.stage-heading h1 {
  margin: 0;
}

.stage-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.stage-shell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.stage-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 520px;
  background: var(--card);
}

.stage-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.stage-cover {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 32px;
  padding: 32px;
  background: var(--card);
}

[data-gf-frame][data-gf-state="loading"] [data-gf-cover],
[data-gf-frame][data-gf-state="playing"] [data-gf-cover] {
  display: none;
}

.seal-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.cover-meta {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.cover-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 12px;
}

.cover-desc {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 24px;
}

.cover-cta-row {
  margin-bottom: 12px;
}

.btn-play {
  padding: 12px 32px;
  font-size: 18px;
}

.cover-hint {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.cover-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-art img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-height: 400px;
  width: auto;
}


/* Loader & Toolbar */
.stage-loader {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: var(--card);
  text-align: center;
}

[data-gf-frame][data-gf-state="loading"] .stage-loader {
  display: flex;
}

@keyframes pulseSeal {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.78; }
}

.loader-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--primary);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  border-radius: var(--radius);
  animation: pulseSeal 1.4s ease-in-out infinite;
}

.loader-heading {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.loader-caption {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.stage-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  padding: 8px 16px;
  font-size: 14px;
}

[data-gf-like][aria-pressed="true"],
[data-gf-like][data-gf-liked] {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.share-status {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

/* Content Sections & Distinct Layouts */
.section {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 32px;
}

.section-sub {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

.split-asymmetric {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: start;
}

.split-reverse {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: start;
}

.figure-card {
  margin: 0;
  padding: 16px;
}

.figure-card img {
  border-radius: var(--radius);
  width: 100%;
}

.figure-caption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.steps-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.step-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
}

.step-body h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.step-body p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.ledger-table-wrap {
  padding: 8px 24px;
}

.ledger-item {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.ledger-item:last-child {
  border-bottom: 0;
}

.roman-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 4px;
}

.ledger-title-col h3 {
  margin-bottom: 4px;
}

.virtue-pair {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.ledger-desc {
  margin: 0;
}


/* FAQ, Comments, Legal & Footer */
.faq-list {
  display: grid;
  gap: 16px;
  max-width: 860px;
}

.faq-item {
  padding: 16px 24px;
}

.faq-q {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: "+";
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
}

.faq-item[open] .faq-q::after {
  content: "−";
}

.faq-a {
  margin: 12px 0 0 0;
  color: var(--muted);
}

.comments-grid {
  display: grid;
  gap: 24px;
  max-width: 860px;
}

.comment-form {
  padding: 24px;
}

.reply-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 16px;
  background: var(--surface-tint);
  border-radius: var(--radius);
  font-size: 14px;
}

[data-gf-comment-form][data-gf-replying] .reply-banner {
  display: flex;
}

.form-row {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.field-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.field-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.comment-feedback {
  font-size: 14px;
  color: var(--primary);
}

.comments-list {
  display: grid;
  gap: 16px;
}

.comments-empty-hint {
  display: none;
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

[data-gf-comments][data-gf-empty] .comments-empty-hint {
  display: block;
}

.comment-card {
  padding: 16px 24px;
}

[data-gf-owner] {
  border-color: var(--primary);
  background: var(--surface-tint);
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.owner-pill {
  padding: 4px 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius);
}

.comment-to,
.comment-date {
  color: var(--muted);
  font-size: 12px;
}

.comment-text {
  margin: 0 0 8px 0;
}

.comment-replies {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
  display: grid;
  gap: 12px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.legal-header {
  margin-bottom: 24px;
}

.legal-meta {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.legal-card {
  padding: 32px;
}

.prose h2 {
  margin-top: 32px;
}

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

.prose ul {
  padding-left: 24px;
  margin: 0 0 16px 0;
  max-width: 70ch;
}

.prose li {
  margin-bottom: 8px;
}

.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.footer-desc {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 48ch;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.footer-nav a {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 24px;
}

.footer-copy {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}


/* Interactive Quiz App (/embed/7-deadly-sins-test) */
.quiz-app {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--card);
}

.quiz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quiz-progress-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-step-label {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
}

.quiz-step-sub {
  font-size: 14px;
  color: var(--muted);
}

.quiz-top-actions {
  display: flex;
  gap: 8px;
}

.quiz-progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  width: 5%;
  background: var(--primary);
  border-radius: var(--radius);
  transition: width 0.25s ease;
}

.compare-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

.quiz-stage-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}

.quiz-prompt {
  font-size: 22px;
  margin: 8px 0 4px 0;
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.quiz-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--text);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.quiz-opt:hover,
.quiz-opt[aria-checked="true"] {
  border-color: var(--primary);
  background: var(--surface-tint);
}

.opt-roman {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.quiz-opt[aria-checked="true"] .opt-roman {
  background: var(--primary);
  color: #ffffff;
}

.opt-copy strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.opt-copy span {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

/* Results View */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.result-verdict-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.result-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.result-title {
  margin: 0;
  font-size: 28px;
}

.result-meta-line {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}

.result-summary {
  font-size: 14px;
  margin-bottom: 12px;
}

.virtue-box {
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.virtue-title {
  margin: 0 0 4px 0;
  font-weight: 600;
  font-size: 14px;
}

.virtue-desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.radar-box svg {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.bars-heading {
  font-size: 18px;
  margin-bottom: 12px;
}

.compare-result-box {
  padding: 12px;
  margin-bottom: 12px;
  background: var(--surface-tint);
  border-radius: var(--radius);
  font-size: 14px;
}

.bars-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.bar-row-top {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.bar-track {
  height: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--muted);
  border-radius: var(--radius);
}

.bar-fill.is-top {
  background: var(--primary);
}

.bar-fill.is-second {
  background: var(--accent);
}

.tally-note {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-feedback {
  margin: 8px 0 0 0;
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  h1 {
    font-size: 28px;
  }
  h2 {
    font-size: 22px;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-nav {
    gap: 16px;
  }
  .stage-frame {
    aspect-ratio: auto;
    min-height: 600px;
  }
  .stage-cover {
    position: relative;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .btn-play,
  .result-actions button {
    width: 100%;
  }
  .split-asymmetric,
  .split-reverse,
  .steps-timeline,
  .ledger-item,
  .result-grid {
    grid-template-columns: 1fr;
  }
  .legal-card,
  .quiz-app {
    padding: 16px;
  }
}
