/* Site pages: landing, how to play, character profile */
body.site { background: radial-gradient(120% 90% at 50% -10%, #16301f 0%, var(--bg) 55%); min-height: 100vh; }

.nav {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: rgba(8, 17, 12, 0.75); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav__brand { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.3em; color: #fff; text-decoration: none; font-size: 1.15rem; }
.nav__links { display: flex; gap: 22px; align-items: center; }
.nav__links a { color: #d9e3da; text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav__links a:hover, .nav__links a.is-active { color: var(--accent-2); }
.nav__gear { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; cursor: pointer; font-size: 1rem; color: #fff; }
.nav__gear:hover { border-color: var(--accent); }

main { max-width: 1120px; margin: 0 auto; padding: 0 24px 60px; }

/* Hero */
.hero { position: relative; min-height: 78vh; display: flex; align-items: center; border-radius: 0 0 32px 32px; overflow: hidden; margin: 0 -24px; padding: 60px 24px; }
.hero__bg { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, #16301f 0%, #0c1d12 60%, #07130b 100%); }
.hero__bg::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 70% 20%, rgba(255, 200, 120, 0.35), transparent 60%), radial-gradient(40% 40% at 20% 30%, rgba(120, 220, 160, 0.12), transparent 60%);
}
#fireflies { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__layer { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 55%; }
.hero__layer--far { opacity: 0.9; }
.hero__layer--mid { height: 48%; }
.hero__layer--near { height: 36%; }
.hero__content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; text-align: center; }
.hero__eyebrow { font-size: 0.78rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent-2); }
.hero__title { font-family: var(--font-display); font-weight: 900; font-size: clamp(4rem, 12vw, 8.5rem); letter-spacing: 0.18em; margin: 8px 0 0; line-height: 1; text-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); }
.hero__tag { font-family: var(--font-display); color: #ffe6c0; font-size: 1.15rem; margin: 6px 0 18px; opacity: 0.95; }
.hero__lead { font-size: 1.12rem; line-height: 1.6; color: #dbe6dc; margin: 0 auto 26px; max-width: 640px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero__note { color: var(--muted); font-size: 0.85rem; margin-top: 20px; }

/* Feature cards */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 40px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px; }
.card__icon { font-size: 1.7rem; margin-bottom: 8px; }
.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { margin: 0; color: #c3cfc5; line-height: 1.55; font-size: 0.93rem; }

.strip { background: linear-gradient(135deg, rgba(255, 138, 61, 0.14), rgba(79, 154, 92, 0.12)); border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px; margin: 28px 0; }
.strip__inner { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.strip h2 { margin: 0 0 8px; font-size: 1.35rem; }
.strip p { margin: 0; color: #d6dfd7; line-height: 1.55; max-width: 640px; }

.howto h2 { font-size: 1.5rem; margin: 30px 0 14px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 18px 58px; position: relative; line-height: 1.5; color: #d6dfd7; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #1a0c04; font-weight: 800; display: flex; align-items: center; justify-content: center; }

.footer { border-top: 1px solid var(--line); padding: 24px; text-align: center; color: var(--muted); font-size: 0.85rem; display: flex; flex-direction: column; gap: 6px; }

/* Docs pages */
.doc { max-width: 880px; margin: 0 auto; padding-top: 36px; }
.doc h1 { font-family: var(--font-display); font-size: 2.6rem; letter-spacing: 0.05em; margin: 0 0 6px; }
.doc .lead { color: #cbd8cd; font-size: 1.1rem; line-height: 1.6; margin: 0 0 28px; }
.doc h2 { font-size: 1.45rem; margin: 40px 0 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 1.05rem; margin: 22px 0 8px; color: var(--accent-2); }
.doc p, .doc li { line-height: 1.6; color: #d6dfd7; }
.doc ul, .doc ol { padding-left: 22px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.doc td:first-child { white-space: nowrap; }
.doc .say { color: #ffe6c0; font-style: italic; }
.callout { background: rgba(255, 138, 61, 0.1); border: 1px solid rgba(255, 138, 61, 0.35); border-radius: 14px; padding: 14px 18px; margin: 16px 0; }
.callout--green { background: rgba(79, 154, 92, 0.12); border-color: rgba(79, 154, 92, 0.4); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.toc a { font-size: 0.85rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: #d9e3da; }
.toc a:hover { border-color: var(--accent); color: var(--accent-2); }
code { background: rgba(255, 255, 255, 0.08); padding: 2px 6px; border-radius: 6px; font-size: 0.9em; }
pre { background: #0a1710; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow: auto; }
pre code { background: none; padding: 0; }

/* Profile */
.profile__head { display: grid; grid-template-columns: 320px 1fr; gap: 30px; align-items: center; padding-top: 30px; }
.portrait { position: relative; width: 320px; height: 420px; border-radius: 24px; overflow: hidden; background: radial-gradient(100% 80% at 50% 20%, #24462f, #0a1610); border: 1px solid var(--line); box-shadow: var(--shadow); }
.portrait canvas { width: 100%; height: 100%; display: block; }
.portrait__hint { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 0.72rem; color: var(--muted); }
.profile__name { font-family: var(--font-display); font-size: 2.8rem; margin: 0; line-height: 1.05; }
.profile__sub { color: var(--accent-2); font-family: var(--font-display); margin: 6px 0 14px; font-size: 1.1rem; }
.profile__summary { color: #d6dfd7; line-height: 1.6; font-size: 1.05rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 26px 0; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.fact span { display: block; font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.fact b { font-weight: 600; font-size: 0.95rem; line-height: 1.4; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid rgba(255, 138, 61, 0.4); }
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline .when { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent-2); }
.timeline h3 { margin: 2px 0 6px; color: #fff; }
.timeline p { margin: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.cols h3 { margin-top: 10px; }
.quotes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.quote { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; font-family: var(--font-display); color: #ffe6c0; font-size: 1.05rem; line-height: 1.4; }
.gear { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.gear div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.gear b { display: block; color: var(--accent-2); margin-bottom: 4px; }
.people { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.people div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.people b { display: block; }
.people span { color: var(--muted); font-size: 0.82rem; display: block; margin-bottom: 4px; }

@media (max-width: 760px) {
  .nav { padding: 12px 16px; }
  .nav__links { gap: 12px; font-size: 0.9rem; }
  .profile__head { grid-template-columns: 1fr; }
  .portrait { width: 100%; max-width: 320px; margin: 0 auto; }
  .hero { min-height: 70vh; }
}

/* Pricing page */
.pricing { max-width: 1120px; margin: 0 auto; padding: 36px 24px 60px; }
.pricing__hero { text-align: center; max-width: 760px; margin: 0 auto 30px; }
.pricing__hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); margin: 6px 0 12px; letter-spacing: 0.03em; }
.pricing__hero .lead { color: #cbd8cd; font-size: 1.08rem; line-height: 1.6; margin: 0 0 22px; }
.billing-toggle { display: inline-flex; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.billing-toggle__btn { border: none; background: transparent; color: #cbd8cd; font: 600 0.9rem var(--font-body); padding: 8px 16px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.billing-toggle__btn.is-active { background: var(--accent); color: #1a0c04; }
.billing-toggle__save { font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; background: rgba(61, 220, 132, 0.2); color: #8ff0b5; }
.billing-toggle__btn.is-active .billing-toggle__save { background: rgba(0, 0, 0, 0.2); color: #1a0c04; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 26px 24px 20px; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.plan--featured { border-color: rgba(255, 138, 61, 0.6); box-shadow: 0 18px 50px rgba(255, 122, 40, 0.15); background: linear-gradient(180deg, rgba(255, 138, 61, 0.1), var(--panel) 40%); }
.plan--dark { background: linear-gradient(180deg, rgba(79, 154, 92, 0.16), var(--panel) 45%); }
.plan.is-suggested { transform: translateY(-4px); border-color: rgba(143, 240, 181, 0.7); box-shadow: 0 18px 50px rgba(61, 220, 132, 0.15); }
.plan__badge { position: absolute; top: -12px; left: 24px; background: var(--accent); color: #1a0c04; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.plan__name { font-family: var(--font-display); font-size: 1.5rem; margin: 0; letter-spacing: 0.04em; }
.plan__tag { color: var(--muted); margin: 6px 0 0; font-size: 0.92rem; line-height: 1.45; min-height: 2.6em; }
.plan__price { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 16px; flex-wrap: wrap; }
.plan__amount { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; }
.plan__period { color: var(--muted); font-size: 0.88rem; }
.plan__cta { justify-content: center; width: 100%; }
.plan__features { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.93rem; line-height: 1.45; color: #dbe6dc; flex: 1; }
.plan__features li { padding-left: 26px; position: relative; }
.plan__features li::before { content: '✓'; position: absolute; left: 0; top: 0; color: #8ff0b5; font-weight: 800; }
.plan__foot { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.pricing__note { color: var(--muted); font-size: 0.82rem; text-align: center; margin: 16px 0 0; }

.estimator { margin: 50px auto 0; max-width: 760px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px 26px; }
.estimator h2 { margin: 0 0 6px; font-size: 1.35rem; }
.estimator .lead { margin: 0 0 14px; color: #cbd8cd; }
.estimator__row { display: flex; align-items: center; gap: 16px; }
.estimator__row input { flex: 1; accent-color: var(--accent); }
.estimator__value { min-width: 90px; text-align: right; font-weight: 700; }
.estimator__result { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); line-height: 1.5; font-size: 0.95rem; }
.estimator__byok { margin-top: 8px; color: var(--muted); font-size: 0.83rem; }

.compare { margin-top: 50px; }
.compare h2, .faq h2 { font-size: 1.5rem; margin: 0 0 14px; }
.compare__wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.compare__table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 560px; }
.compare__table th, .compare__table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.compare__table th:first-child, .compare__table td:first-child { text-align: left; color: #dbe6dc; }
.compare__table th { background: rgba(255, 255, 255, 0.05); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.compare__table tr:last-child td { border-bottom: none; }

.faq { margin-top: 50px; max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: '–'; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 0 0 16px; color: #cbd8cd; line-height: 1.55; }

/* ---- Generated artwork (assets/images) ---- */
.hero__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 19, 11, 0.18) 0%, rgba(7, 19, 11, 0.5) 50%, rgba(7, 19, 11, 0.9) 100%); }
.hero__bg::before { opacity: 0.6; }
.hero__cara { display: none; }
@media (min-width: 1100px) {
  .hero { min-height: 82vh; }
  .hero__content { margin: 0 0 0 max(24px, calc(50% - 580px)); text-align: left; max-width: 620px; }
  .hero__lead { margin-left: 0; }
  .hero__actions { justify-content: flex-start; }
  .hero__cara { display: block; position: absolute; right: max(2%, calc(50% - 640px)); bottom: 0; height: min(94%, 780px); width: auto; z-index: 1; pointer-events: none; filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.65)); }
}
.card { padding: 0; overflow: hidden; }
.card__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; border-bottom: 1px solid var(--line); }
.card h3 { margin: 16px 20px 8px; }
.card p { margin: 0 20px 22px; }

/* Character page: portrait / turntable toggle and the gallery */
.portrait__photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }
.portrait[data-view="model"] .portrait__photo, .portrait[data-view="photo"] canvas, .portrait[data-view="photo"] .portrait__hint { display: none; }
.portrait__tabs { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 2; }
.portrait__tabs button { font: inherit; font-size: 0.72rem; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(10, 22, 16, 0.72); color: #e6efe7; cursor: pointer; }
.portrait__tabs button.is-active { background: #ff8a3d; color: #1a0d05; border-color: transparent; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 18px 0 30px; }
.gallery figure { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 20%; display: block; transition: transform 0.3s; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { padding: 8px 12px 10px; font-size: 0.82rem; color: #c3cfc5; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1400px); max-height: 96vh; }
.lightbox::backdrop { background: rgba(3, 8, 5, 0.88); }
.lightbox figure { margin: 0; }
.lightbox img { display: block; max-width: min(96vw, 1400px); max-height: 88vh; width: auto; height: auto; margin: 0 auto; border-radius: 12px; }
.lightbox figcaption { color: #dbe6dc; text-align: center; padding: 10px; font-size: 0.9rem; }

/* How-to-play figures */
.figure { margin: 18px 0 26px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.figure img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.figure figcaption { padding: 10px 14px; font-size: 0.85rem; color: #c3cfc5; }

/* Pricing banner and plan icons */
.pricing__hero { position: relative; max-width: none; margin: 0 -24px 30px; padding: 70px 24px 56px; border-radius: 0 0 28px 28px; overflow: hidden; }
.pricing__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; z-index: 0; }
.pricing__shade { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(7, 19, 11, 0.3), rgba(7, 19, 11, 0.78) 65%, rgba(7, 19, 11, 0.96)); }
.pricing__hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.plan__icon { width: 64px; height: 64px; display: block; margin-bottom: 10px; }
