/* Kingora website: one stylesheet, no build step.
   A warm medieval storybook: parchment pages, dark wood frames, royal blue banners and gold trim.
   Light and dark follow the device setting. The CSP allows no inline styles and no data: URLs,
   so every decoration here is made with gradients, borders and pseudo elements. */

/* ---------- Fonts (self-hosted, SIL Open Font License: see /fonts/*-OFL.txt) ---------- */

@font-face {
  font-family: "Alegreya";
  src: url("/fonts/Alegreya-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rubik";
  src: url("/fonts/Rubik-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */

:root {
  color-scheme: light dark;

  /* Fixed colors (same in light and dark) */
  --blue: #2A4D9B;
  --blue-deep: #1D3770;
  --gold: #C9A13B;
  --gold-light: #E8C766;
  --gold-dark: #8A6A1C;
  --wood-1: #3B2716;
  --wood-2: #24170D;
  --wood-3: #170E07;
  --parchment: #F6EEDC;
  --parchment-dim: #D9C9A8;

  /* Page colors (light) */
  --ink: #2B1E12;
  --muted: #5A4632;
  --bg: #F6EEDC;
  --surface: #FFFAF0;
  --surface-alt: #EFE2C6;
  --line: #DCC7A0;
  --link: #2A4D9B;
  --focus: #2A4D9B;
  --eyebrow-bg: rgba(42, 77, 155, 0.1);
  --eyebrow-ink: #2A4D9B;
  --marker: #2A4D9B;
  --note-bg: #F2E6CB;

  --shadow: 0 1px 2px rgba(59, 39, 22, 0.1), 0 14px 32px -20px rgba(59, 39, 22, 0.55);
  --shadow-lift: 0 2px 4px rgba(59, 39, 22, 0.14), 0 24px 46px -24px rgba(36, 23, 13, 0.7);

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1120px;
  --gutter: 16px;
  --header-h: 64px;

  --font-head: "Alegreya", Georgia, "Times New Roman", serif;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F3E9D6;
    --muted: #CDBB9E;
    --bg: #17100A;
    --surface: #261B12;
    --surface-alt: #1F160E;
    --line: #463423;
    --link: #A9C0F5;
    --focus: #E8C766;
    --eyebrow-bg: rgba(232, 199, 102, 0.13);
    --eyebrow-ink: #E8C766;
    --marker: #E8C766;
    --note-bg: #2E2216;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 34px -22px rgba(0, 0, 0, 0.95);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.45), 0 26px 48px -24px rgba(0, 0, 0, 1);
  }
}

@media (min-width: 600px) {
  :root { --gutter: 24px; }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  font-variant-numeric: lining-nums;
  line-height: 1.1;
  margin: 0 0 0.5em;
}

h1, h2, h3, .hero-pitch { text-wrap: balance; }

h2 { font-size: clamp(1.9rem, 1.4rem + 2.1vw, 2.75rem); }
h3 { font-size: 1.4rem; font-weight: 700; }

p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

ul, ol { padding-left: 1.25em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* site.js marks images that failed to load, so the colored placeholder behind them shows. */
img.is-broken { visibility: hidden; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--gold-light);
  color: var(--wood-2);
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Parchment-colored text on dark wood (header, hero, banners, footer). */
.on-wood {
  color: var(--parchment);
  --focus: #E8C766;
  --link: #F6EEDC;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.6em 1.4em;
  border: 0;
  border-radius: 12px;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-gold {
  background: linear-gradient(180deg, #F0D27A 0%, #D9B24A 100%);
  color: #2B1E12;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 4px 0 var(--gold-dark);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 5px 0 var(--gold-dark); }
.btn-gold:active { transform: translateY(3px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 1px 0 var(--gold-dark); }

.btn-blue {
  background: var(--blue);
  color: #FFFFFF;
  box-shadow: 0 4px 0 var(--blue-deep);
}
.btn-blue:hover { background: #3459AA; transform: translateY(-1px); }
.btn-blue:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--blue-deep); }

.btn-ghost {
  background: rgba(246, 238, 220, 0.08);
  color: var(--parchment);
  box-shadow: inset 0 0 0 2px rgba(232, 199, 102, 0.85);
}
.btn-ghost:hover { background: rgba(246, 238, 220, 0.16); }

.btn-small { min-height: 40px; padding: 0.45em 1.05em; font-size: 1.05rem; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 18px;
}

/* "Coming soon to Google Play": a store-style badge that is not a link (no listing yet). */
.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  margin: 0;
  padding: 8px 22px 8px 16px;
  background: #000000;
  color: #FFFFFF;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px #A6A6A6, 0 10px 24px -14px rgba(0, 0, 0, 0.7);
}
.badge-soon svg { flex: none; width: 28px; height: 28px; }
.badge-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.badge-small { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; }
.badge-big { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em; }

/* ---------- Decorations ---------- */

/* Battlements: merlons in the page color rising into a dark band above. */
.crenels {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 3;
  height: 18px;
  background: linear-gradient(90deg, var(--bg) 0 58%, rgba(0, 0, 0, 0) 58% 100%) 0 0 / 46px 100%;
}
.crenels::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--bg);
}
@media (min-width: 860px) {
  .crenels { height: 22px; background-size: 56px 100%; }
}

/* Gold rule with a dot in the middle, under section titles. */
.flourish {
  display: block;
  width: 140px;
  height: 12px;
  margin: 14px auto 0;
  background:
    radial-gradient(circle, var(--gold) 0 4px, rgba(0, 0, 0, 0) 4.5px) center / 12px 12px no-repeat,
    linear-gradient(var(--gold), var(--gold)) left center / 56px 2px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right center / 56px 2px no-repeat;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(59, 39, 22, 0.97) 0%, rgba(36, 23, 13, 0.97) 100%);
  color: var(--parchment);
  --focus: #E8C766;
  border-bottom: 2px solid var(--gold);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--parchment);
  text-decoration: none;
}
.brand img { width: 40px; height: 40px; }
.brand-name {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gold-light);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: rgba(246, 238, 220, 0.1);
  box-shadow: inset 0 0 0 1px rgba(232, 199, 102, 0.5);
  color: var(--parchment);
  font: 500 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(246, 238, 220, 0.18); }

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.site-header.is-open .nav-toggle-bars { background: transparent; }
.site-header.is-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.site-header.is-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a:not(.btn) {
  color: var(--parchment);
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"]:not(.btn) { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

/* Phones: the nav folds under the Menu button (without JavaScript, Menu jumps to the footer links). */
@media (max-width: 899.98px) {
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--wood-2);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.7);
  }
  .site-header.is-open .site-nav { display: block; }
  .site-nav ul {
    display: grid;
    gap: 4px;
    padding: 10px var(--gutter) 18px;
  }
  .site-nav a:not(.btn) {
    display: block;
    padding: 12px 6px;
    font-size: 1.1rem;
  }
  .site-nav .btn { margin-top: 8px; width: 100%; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav ul {
    display: flex;
    align-items: center;
    gap: 26px;
  }
}

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 40px 0 72px;
  background:
    radial-gradient(ellipse 60% 55% at 78% 45%, rgba(42, 77, 155, 0.5), rgba(42, 77, 155, 0) 70%),
    linear-gradient(180deg, rgba(23, 14, 7, 0.86) 0%, rgba(23, 14, 7, 0.93) 100%),
    url("/img/village-life.jpg") center / cover no-repeat,
    var(--wood-2);
}

.hero-inner {
  display: grid;
  gap: 36px;
  align-items: center;
  text-align: center;
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 14px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(232, 199, 102, 0.7);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 8px;
  font-size: clamp(3.3rem, 2rem + 6vw, 5.6rem);
  font-weight: 900;
  line-height: 1;
  color: var(--gold-light);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.55), 0 10px 28px rgba(0, 0, 0, 0.45);
}

.hero-pitch {
  margin: 0 auto 16px;
  font-family: var(--font-head);
  font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.hero-text {
  max-width: 34em;
  margin: 0 auto 26px;
  font-size: 1.125rem;
  color: #EADCC0;
}

/* Short facts under the buttons: each starts with a small gold diamond, and they wrap as whole items. */
.hero-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 20px 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #EADCC0;
}
.hero-note span { white-space: nowrap; }
.hero-note span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 9px 0 2px;
  background: var(--gold-light);
  transform: translateY(-2px) rotate(45deg);
}

/* Phone frame around a portrait screenshot. */
.phone { margin: 0 auto; width: min(100%, 300px); }
.phone-body {
  padding: 9px;
  border-radius: 34px;
  background: linear-gradient(160deg, #3B2716 0%, #120B05 100%);
  box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 1px rgba(0, 0, 0, 0.5), 0 34px 60px -28px rgba(0, 0, 0, 0.9);
}
.phone-screen {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(180deg, #4E7A2A 0%, #8DB04A 100%);
}
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  font-size: 0.9rem;
  color: #FFFFFF;
}
.phone figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 0.88rem;
  color: #D9C9A8;
}

@media (min-width: 900px) {
  .hero { padding: 64px 0 96px; }
  .hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 48px;
    text-align: left;
  }
  .hero-pitch,
  .hero-text { margin-inline: 0; }
  .hero-copy .btn-row,
  .hero-note { justify-content: flex-start; }
  .phone { width: min(100%, 340px); }
}

/* ---------- Sections ---------- */

.section { position: relative; padding: 64px 0; }
.section-alt { background: var(--surface-alt); }

@media (min-width: 860px) {
  .section { padding: 88px 0; }
}

.section-head {
  max-width: 44rem;
  margin: 0 auto 40px;
  text-align: center;
}
.section-head h2 { margin-bottom: 0; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 16px 0 0; }

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--eyebrow-bg);
  color: var(--eyebrow-ink);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section-head p.eyebrow { margin: 0 0 12px; color: var(--eyebrow-ink); font-size: 0.82rem; }

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

.grid {
  display: grid;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Six steps: a wax seal with the number sits beside the title. */
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
  align-content: start;
  padding: 24px;
}
.step h3 { margin: 0; }
.step p { grid-column: 1 / -1; margin: 14px 0 0; color: var(--muted); }
.seal {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3E64B8 0%, var(--blue) 55%, var(--blue-deep) 100%);
  color: var(--gold-light);
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 0 0 2px var(--gold), 0 3px 0 var(--blue-deep);
}

/* Showcase rows: framed art beside text, alternating sides on wide screens. */
.showcase {
  display: grid;
  gap: 28px;
  align-items: center;
}
.showcase + .showcase { margin-top: 56px; }
.showcase-text h3 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); }
.showcase-text p { color: var(--muted); }
.showcase-text p:last-child { margin-bottom: 0; }

.frame {
  margin: 0;
  justify-self: center;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 6px solid var(--wood-2);
  box-shadow: 0 0 0 2px var(--gold), var(--shadow-lift);
  background: #4E7A2A;
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--tall { max-width: 380px; aspect-ratio: 2 / 3; }
.frame--wide { aspect-ratio: 3 / 2; }

@media (min-width: 860px) {
  .showcase { grid-template-columns: 1fr 1fr; gap: 56px; }
  .showcase--flip .frame { order: 2; }
  .showcase + .showcase { margin-top: 80px; }
}

.art-note {
  margin: 40px 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Keep tiers: five castles in a row, from timber hall to royal castle. */
.keeps-title {
  margin: 64px 0 22px;
  text-align: center;
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem);
}
@media (min-width: 860px) {
  .keeps-title { margin-top: 88px; }
}
.keeps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.keeps li {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 8px;
  padding: 16px 10px 14px;
  text-align: center;
}
.keeps li:last-child { grid-column: 1 / -1; }
.keeps img { width: min(100%, 150px); }
.keeps span {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}
@media (min-width: 700px) {
  .keeps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .keeps li:last-child { grid-column: auto; }
}

/* Heroes */
.heroes { gap: 20px; }
.hero-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero-card-art,
.class-card-art {
  display: grid;
  place-items: end center;
  height: 260px;
  padding-top: 16px;
  border-bottom: 3px solid var(--gold);
  background: radial-gradient(circle at 50% 65%, #9DB2DD 0%, #5B79BD 50%, #2A4D9B 100%);
}
.hero-card-art img {
  width: auto;
  height: 244px;
  max-width: 100%;
  object-fit: contain;
  object-position: 50% 100%;
}
.hero-card--vanguard .hero-card-art,
.class-card--vanguard .class-card-art { background: radial-gradient(circle at 50% 65%, #E1A08C 0%, #B4513E 50%, #7A2420 100%); }
.hero-card--ranger .hero-card-art,
.class-card--ranger .class-card-art { background: radial-gradient(circle at 50% 65%, #B9D59A 0%, #5E9150 50%, #2F5A2F 100%); }
.hero-card--lorekeeper .hero-card-art,
.class-card--lorekeeper .class-card-art { background: radial-gradient(circle at 50% 65%, #FBE7A6 0%, #D9B24A 50%, #9A7322 100%); }
.hero-card-body { padding: 18px 22px 24px; }
.hero-card-body h3 { margin: 0 0 8px; font-size: 1.6rem; }
.hero-card-body p { margin: 12px 0 0; color: var(--muted); }
.role {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--blue);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.role--vanguard { background: #8E2B24; }
.role--ranger { background: #2F6338; }
.role--lorekeeper { background: #7A5A12; }

/* Features */
.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
  align-content: start;
  padding: 24px;
}
.feature h3 { margin: 0; }
.feature p { grid-column: 1 / -1; margin: 14px 0 0; color: var(--muted); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(160deg, #3A62B6 0%, var(--blue) 100%);
  color: var(--gold-light);
  box-shadow: inset 0 0 0 2px var(--gold), 0 4px 0 var(--blue-deep);
}
.feature-icon svg { width: 26px; height: 26px; }

/* FAQ */
.faq,
.faq-col {
  display: grid;
  gap: 12px;
  align-content: start;
}
.faq { max-width: 50rem; margin: 0 auto; }
/* Two columns on wide screens; each column grows on its own when a question opens. */
@media (min-width: 900px) {
  .faq { grid-template-columns: 1fr 1fr; gap: 16px; max-width: none; align-items: start; }
  .faq-col { gap: 16px; }
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.faq summary {
  position: relative;
  padding: 18px 60px 18px 22px;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  list-style: none;
  cursor: pointer;
  border-radius: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  border-radius: 50%;
  background: var(--eyebrow-bg);
  color: var(--eyebrow-ink);
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 22px 20px; color: var(--muted); }
.faq-answer p { margin: 0; }

/* Final call to action: a dark wood banner. */
.section.section-cta { padding-top: 8px; }
.cta {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  padding: 44px 22px 48px;
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(42, 77, 155, 0.55), rgba(42, 77, 155, 0) 70%),
    linear-gradient(180deg, var(--wood-1) 0%, var(--wood-2) 100%);
  box-shadow: inset 0 0 0 2px var(--gold), var(--shadow-lift);
}
.cta img { width: 150px; margin: 0 auto 10px; }
.cta h2 { color: var(--gold-light); text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5); }
.cta > p { max-width: 32rem; margin: 0 auto 24px; font-size: 1.1rem; color: #EADCC0; }
.cta .btn-row { margin-top: 4px; }

/* ---------- Inner pages ---------- */

.page-hero {
  position: relative;
  padding: 44px 0 86px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(42, 77, 155, 0.5), rgba(42, 77, 155, 0) 70%),
    linear-gradient(180deg, var(--wood-1) 0%, var(--wood-2) 100%);
  overflow: hidden;
}
.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem);
  color: var(--gold-light);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
}
.page-hero p { max-width: 38rem; margin: 0 auto; font-size: 1.1rem; color: #EADCC0; }

.page-body { position: relative; z-index: 4; margin-top: -34px; padding: 0 0 72px; }

.paper {
  max-width: 50rem;
  margin: 0 auto;
  padding: 28px 20px;
}
@media (min-width: 600px) {
  .paper { padding: 44px 48px; }
}

.prose h2 {
  margin: 1.8em 0 0.5em;
  font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.4em 0 0.4em; font-size: 1.25rem; }
.prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--marker); }
.prose address { font-style: normal; margin-bottom: 1em; }
.prose strong { font-weight: 600; }
.prose a { overflow-wrap: anywhere; }

.meta-line {
  display: inline-block;
  margin: 0 0 1.6em;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--eyebrow-bg);
  color: var(--eyebrow-ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 0 0 1.5em;
  padding: 18px 20px;
  list-style: none;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.prose .summary-list { padding: 18px 20px; }
.summary-list li {
  position: relative;
  margin: 0;
  padding-left: 30px;
}
.summary-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 12px;
  height: 7px;
  border-left: 3px solid var(--marker);
  border-bottom: 3px solid var(--marker);
  transform: rotate(-45deg);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 2em;
  padding: 0;
  list-style: none;
}
.prose .toc { padding: 0; }
.prose .toc li { margin: 0; }
.toc a {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--eyebrow-bg);
  color: var(--eyebrow-ink);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.toc a:hover { text-decoration: underline; }

.callout {
  margin: 0 0 1.5em;
  padding: 16px 20px;
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--note-bg);
}
.callout p:last-child { margin-bottom: 0; }

/* Numbered "how to" steps on the account deletion page. */
.way {
  margin: 0 0 1.5em;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}
.way h3 { margin-top: 0; }
.way ol { margin-bottom: 0; }
.way p:last-child { margin-bottom: 0; }

.data-table {
  width: 100%;
  margin: 0 0 1.5em;
  border-collapse: collapse;
  font-size: 1rem;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.data-table th { font-weight: 600; background: var(--surface-alt); }
@media (max-width: 559.98px) {
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .data-table th,
  .data-table td { display: block; padding: 2px 0; border: 0; background: none; }
  .data-table td:first-child { font-weight: 600; }
  .data-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}

.contact-box {
  margin-top: 2em;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface-alt);
  border: 1px solid var(--line);
}
.contact-box h2 { margin-top: 0; }
.contact-box .btn { margin-top: 6px; }

/* ---------- How to play ---------- */

/* Contents: a card above the guide on phones and tablets, a sticky list beside it on wide screens. */
.guide-layout { display: grid; gap: 18px; }
.guide-toc {
  width: 100%;
  max-width: 50rem;
  margin: 0 auto;
  padding: 18px 20px 12px;
}
.guide-toc-title { margin: 0 0 6px; font-size: 1.3rem; }
.guide-toc ol {
  display: grid;
  gap: 0 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}
.guide-toc li { counter-increment: toc; }
.guide-toc a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}
.guide-toc a::before {
  content: counter(toc);
  flex: none;
  min-width: 1.5em;
  color: var(--eyebrow-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.guide-toc a:hover { color: var(--link); text-decoration: underline; }
@media (min-width: 360px) {
  .guide-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599.98px) {
  .guide-toc a { gap: 6px; font-size: 0.95rem; }
  .guide-toc a::before { min-width: 1.3em; }
}
@media (min-width: 1100px) {
  .guide-layout {
    grid-template-columns: 16.5rem minmax(0, 50rem);
    justify-content: center;
    align-items: start;
    gap: 28px;
  }
  .guide-toc {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    max-height: calc(100vh - var(--header-h) - 40px);
    overflow-y: auto;
    padding: 22px 20px 14px;
  }
  .guide-toc ol { grid-template-columns: 1fr; }
  .guide-layout .paper { margin: 0; }
}

.prose .guide-intro-title { margin-top: 0; font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.6rem); }

/* One section per topic, each with the game's own picture in a gold ring. */
.guide-topic { margin-top: 2.2em; padding-top: 2.2em; border-top: 1px solid var(--line); }
.topic-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 0.9em;
}
.prose .topic-head h2 { margin: 0; }
.topic-art {
  flex: none;
  display: block;
  width: 68px;
  height: 68px;
  padding: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--surface) 0%, var(--surface-alt) 100%);
  box-shadow: inset 0 0 0 2px var(--gold), var(--shadow);
}
.topic-art img { width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 600px) {
  .topic-art { width: 84px; height: 84px; padding: 11px; }
}
.topic-lead { font-size: 1.12rem; }
@media (min-width: 560px) {
  .guide .data-table td:first-child { font-weight: 500; white-space: nowrap; }
}

/* First-session steps: a numbered seal beside each one. */
.guide-steps {
  display: grid;
  gap: 10px;
  list-style: none;
  counter-reset: step;
}
.prose .guide-steps { margin: 0 0 1.2em; padding: 0; }
.prose .guide-steps li {
  counter-increment: step;
  position: relative;
  min-height: 62px;
  margin: 0;
  padding: 12px 16px 12px 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.guide-steps li::before {
  content: counter(step);
  position: absolute;
  left: 13px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3E64B8 0%, var(--blue) 55%, var(--blue-deep) 100%);
  color: var(--gold-light);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 0 0 2px var(--gold), 0 2px 0 var(--blue-deep);
}
.guide-steps strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
}

/* The four hero classes, small. */
.class-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}
.prose .class-grid { margin: 0 0 1.4em; padding: 0; }
.prose .class-grid li { margin: 0; }
@media (min-width: 760px) {
  .class-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.class-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.class-card-art { height: 132px; padding-top: 10px; }
.class-card-art img {
  width: auto;
  height: 122px;
  max-width: 100%;
  object-fit: contain;
  object-position: 50% 100%;
}
.class-card-body { padding: 10px 10px 14px; }
.prose .class-card h3 { margin: 0 0 6px; font-size: 1.3rem; }
.class-card .role { padding: 3px 8px; border-radius: 10px; font-size: 0.76rem; line-height: 1.3; letter-spacing: 0; }
@media (max-width: 479.98px) {
  .class-card .role { font-size: 0.72rem; }
}
.class-card p { margin: 8px 0 0; font-size: 0.95rem; line-height: 1.45; color: var(--muted); }

/* A bordered button for parchment backgrounds. */
.btn-outline {
  background: transparent;
  color: var(--link);
  box-shadow: inset 0 0 0 2px var(--link);
}
.btn-outline:hover { background: var(--eyebrow-bg); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: 6px; }
.contact-box .contact-actions .btn { margin-top: 0; }

/* "Read the guide" under a home page section. */
.section-more { margin: 32px 0 0; text-align: center; }
.section-more .btn { margin: 0; }

/* ---------- 404 ---------- */

.lost {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 56px 0 96px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(42, 77, 155, 0.5), rgba(42, 77, 155, 0) 70%),
    linear-gradient(180deg, var(--wood-1) 0%, var(--wood-3) 100%);
  overflow: hidden;
}
.lost img { width: 170px; margin: 0 auto 14px; opacity: 0.92; }
.lost h1 {
  font-size: clamp(2.4rem, 1.6rem + 4vw, 4rem);
  color: var(--gold-light);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
}
.lost .container > p { max-width: 30rem; margin: 0 auto 26px; font-size: 1.15rem; color: #EADCC0; }

/* ---------- Footer ---------- */

.site-footer {
  background: linear-gradient(180deg, var(--wood-2) 0%, var(--wood-3) 100%);
  border-top: 2px solid var(--gold);
  color: #E3D4B6;
  --link: #FFFFFF;
  --focus: #E8C766;
  padding: 56px 0 28px;
  font-size: 0.98rem;
}
.footer-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 2fr 1.2fr; }
}
.footer-brand p { margin: 12px 0 0; max-width: 18rem; }
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.footer-title {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-light);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer a { color: #FFFFFF; text-decoration: none; }
/* Tall enough to tap with a finger. */
.site-footer li a { display: inline-block; padding: 6px 0; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.site-footer a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(232, 199, 102, 0.25);
  font-size: 0.9rem;
  color: #CDBB9E;
}
.footer-legal p { margin: 0; }

/* ---------- Motion off ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
