/*
 * Ancient Crowns — the website's one stylesheet (public/web/, deployed to /heroes/web/).
 * The tokens are the changelog's (public/milettuj.html, 2026-09-27/28): night-blue page, bronze-edged
 * dark panels, gold serif — the game HUD's look. No external CSS, no web fonts: the serif stack is the
 * game's own --font-hand (src/ui/styles.css).
 */
:root {
  --bg: #0d1622; --bg-deep: #070c14; --panel: #1b1510; --panel-2: #231b13; --edge: #6b5424; --edge-hi: #c9a24a;
  --gold: #e6c979; --gold-deep: #a67c26; --text: #efe4cb; --muted: #b9a784; --ok: #7fbf6a; --work: #e2a54a; --plan: #7fa6d6;
  --valemarch: #d9a441; --tidereach: #4fb6a8; --hollowmere: #9a7fd0;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --radius: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --frame: inset 0 0 0 1px rgba(201, 162, 74, .15), 0 10px 30px rgba(0, 0, 0, .45);
  --wrap: 1180px;
  --gutter: 16px;
  --header-h: 60px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
html, body { margin: 0; }
body {
  background: radial-gradient(ellipse at 50% 0%, #16263a 0%, var(--bg) 55%, var(--bg-deep) 100%) fixed var(--bg);
  color: var(--text); font: 17px/1.6 var(--serif); overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-color: rgba(230, 201, 121, .4); text-underline-offset: 3px; }
a:hover { color: #fff1c6; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
b, strong { color: var(--gold); font-weight: normal; }
h1, h2, h3, h4 { font-weight: normal; color: var(--gold); line-height: 1.2; margin: 0 0 .5em; letter-spacing: .02em; }
h2 { font-size: clamp(26px, 4vw, 36px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 860px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: #1a1206; padding: 6px 12px; border-radius: 4px; }
.skip:focus { left: 8px; }

/* ------------------------------------------------------------------ header / menu */
.site-header {
  position: sticky; top: 0; z-index: 50; min-height: var(--header-h);
  background: linear-gradient(180deg, rgba(35, 27, 19, .97), rgba(22, 17, 12, .97));
  border-bottom: 1px solid var(--edge); box-shadow: 0 1px 0 rgba(201, 162, 74, .25), 0 6px 18px rgba(0, 0, 0, .5);
  backdrop-filter: blur(6px);
}
.site-header .bar { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold); white-space: nowrap; }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .7)); }
.brand span { font-size: 21px; letter-spacing: .08em; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav a {
  display: block; padding: 8px 11px; color: var(--text); text-decoration: none; font-size: 15px; letter-spacing: .06em;
  border-radius: 4px; border: 1px solid transparent;
}
.nav a:hover { color: var(--gold); background: rgba(201, 162, 74, .08); }
.nav a[aria-current="page"] { color: var(--gold); border-color: rgba(201, 162, 74, .45); background: rgba(201, 162, 74, .1); }
.nav .nav-play { display: none; }
.menu-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 4px; cursor: pointer;
  background: rgba(201, 162, 74, .08); border: 1px solid var(--edge); color: var(--gold);
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: transform .2s, background .2s;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; } .menu-toggle span::after { top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
.header-play { margin-left: 8px; }
@media (max-width: 1100px) {
  .site-header .header-play { display: none; }
}
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; margin: 0; display: none;
    background: linear-gradient(180deg, #211a12, #15100b); border-bottom: 1px solid var(--edge); box-shadow: 0 16px 30px rgba(0, 0, 0, .6); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px var(--gutter) 14px; gap: 0; }
  .nav a { padding: 12px 10px; font-size: 18px; border-bottom: 1px solid rgba(201, 162, 74, .12); border-radius: 0; }
  .nav a[aria-current="page"] { border-color: transparent; border-left: 3px solid var(--gold); }
  .nav .nav-play { display: block; margin-top: 10px; text-align: center; }
  .nav .nav-play a { border: 1px solid #f0d890; border-radius: 4px; }
}

/* ------------------------------------------------------------------ buttons, badges */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px;
  color: #1a1206; text-decoration: none; font: 17px/1.2 var(--serif); letter-spacing: .05em; cursor: pointer;
  background: linear-gradient(180deg, #ecd07e, var(--gold-deep)); border: 1px solid #f0d890; border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn:hover { color: #1a1206; filter: brightness(1.08); }
.btn.ghost { color: var(--gold); background: rgba(13, 22, 34, .55); border-color: var(--edge-hi); box-shadow: none; }
.btn.ghost:hover { color: #fff1c6; background: rgba(201, 162, 74, .12); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 15px; }
.btn[aria-disabled="true"] { cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-block; font: 13px/1.5 var(--sans); color: #1a1206; background: var(--gold); padding: 1px 9px; border-radius: 10px; letter-spacing: .02em; }
.badge.outline { color: var(--gold); background: rgba(13, 22, 34, .6); border: 1px solid var(--edge-hi); }
.pill { display: inline-block; font-size: 13px; color: var(--muted); border: 1px solid rgba(201, 162, 74, .3); border-radius: 12px; padding: 0 9px; }

/* ------------------------------------------------------------------ panels */
.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--edge);
  box-shadow: var(--frame); border-radius: var(--radius);
}
.panel.pad { padding: 20px; }
section.block { padding: 56px 0; }
section.block.tight { padding: 36px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); }
.ornament { display: flex; align-items: center; gap: 14px; color: var(--edge-hi); margin: 0 0 8px; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--edge-hi), transparent); }
.kicker { color: var(--edge-hi); font-size: 13px; letter-spacing: .28em; text-transform: uppercase; margin-bottom: 6px; }

/* ------------------------------------------------------------------ page hero (sub-pages) */
.page-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--edge); }
.page-hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 12, 20, .25) 0%, rgba(7, 12, 20, .55) 55%, var(--bg) 100%); }
.page-hero .wrap { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 40px; }
.page-hero h1 { font-size: clamp(34px, 6vw, 58px); margin: 0 0 8px; text-shadow: 0 3px 16px rgba(0, 0, 0, .8); }
.page-hero p.lead { max-width: 720px; font-size: 19px; text-shadow: 0 2px 10px rgba(0, 0, 0, .9); }

/* ------------------------------------------------------------------ home hero */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end; overflow: hidden; border-bottom: 1px solid var(--edge); }
.hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(7, 12, 20, .82) 0%, rgba(7, 12, 20, .35) 55%, rgba(7, 12, 20, .1) 100%),
              linear-gradient(180deg, rgba(7, 12, 20, 0) 45%, var(--bg) 100%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 80px; padding-bottom: 36px; }
.hero .crest { width: 112px; height: 112px; margin-bottom: 4px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .8)); }
.hero h1 { font-size: clamp(44px, 9vw, 92px); letter-spacing: .06em; margin: 0; text-shadow: 0 4px 24px rgba(0, 0, 0, .85);
  background: linear-gradient(180deg, #fff0bf 0%, #e6c979 45%, #a67c26 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .tagline { font-size: clamp(19px, 2.4vw, 25px); color: var(--text); max-width: 680px; margin: 6px 0 12px; text-shadow: 0 2px 12px rgba(0, 0, 0, .9); }
.hero .pitch { max-width: 620px; color: #e4d8bd; text-shadow: 0 2px 10px rgba(0, 0, 0, .95); }
.hero .btn-row { margin: 18px 0 16px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.hero-cast { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.hero-cast figure { margin: 0; text-align: center; width: 84px; }
.hero-cast img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 2px solid var(--edge-hi);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .7), 0 0 0 3px rgba(13, 22, 34, .7); background: #000; }
.hero-cast figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.25; text-shadow: 0 1px 4px #000; }

/* ------------------------------------------------------------------ grids and cards */
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.grid.six { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.card { overflow: hidden; display: flex; flex-direction: column; }
.card > img, .card > a > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--edge); }
.card .body { padding: 16px 18px 18px; flex: 1; }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0 0 .6em; }
.card p:last-child { margin-bottom: 0; }

/* feature tiles (icon + text) */
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.feature img { width: 64px; height: 64px; flex: none; border-radius: 50%; border: 2px solid var(--edge); object-fit: cover; background: #000; }
.feature h3 { font-size: 18px; margin-bottom: 4px; }
.feature p { margin: 0; font-size: 15px; color: #e0d4b8; }

/* news cards (small) */
.news { display: grid; gap: 12px; }
.news-card { display: grid; grid-template-columns: 116px 1fr; gap: 14px; align-items: center; padding: 10px; text-decoration: none; color: var(--text); }
.news-card:hover { border-color: var(--edge-hi); color: var(--text); }
.news-card img { width: 116px; height: 72px; object-fit: cover; border-radius: 4px; border: 1px solid var(--edge); }
.news-card .date { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.news-card h3 { font-size: 17px; margin: 2px 0 2px; }
.news-card p { font-size: 14px; margin: 0; color: #d9ccb0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-more { margin-top: 12px; }

/* horizontal strip */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 30%); gap: 12px; overflow-x: auto; padding-bottom: 10px;
  scroll-snap-type: x mandatory; scrollbar-color: var(--edge) transparent; }
.strip > * { scroll-snap-align: start; }
.strip figure { margin: 0; }
.strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; border: 1px solid var(--edge); box-shadow: var(--shadow); }
.strip figcaption { font-size: 13px; color: var(--muted); margin-top: 5px; }
.strip button { all: unset; cursor: zoom-in; display: block; }
.strip button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 640px) { .strip { grid-auto-columns: 78%; } }

/* character cards */
.chars { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.char { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 14px; align-items: start; }
.char img { width: 96px; height: 96px; border-radius: 6px; object-fit: cover; border: 1px solid var(--edge-hi); background: #000; }
.char h3 { font-size: 18px; margin: 0; }
.char .role { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
.char p { font-size: 15px; margin: 0; font-style: italic; color: #e6dac0; }
.faction-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.faction-tabs button { font: 15px var(--serif); color: var(--text); background: rgba(201, 162, 74, .06); border: 1px solid var(--edge); border-radius: 18px; padding: 6px 14px; cursor: pointer; min-height: 38px; }
.faction-tabs button[aria-pressed="true"] { color: #1a1206; background: var(--gold); border-color: #f0d890; }

/* creatures */
.creatures { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.creature { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 12px; align-items: start; }
.creature img { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--edge); object-fit: cover; background: #000; }
.creature h3 { font-size: 16px; margin: 0 0 3px; }
.creature p { font-size: 14px; margin: 0; color: #d9ccb0; }

/* peoples */
.people { position: relative; overflow: hidden; margin-bottom: 26px; }
.people > .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.people::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(20, 15, 10, .96) 0%, rgba(20, 15, 10, .86) 50%, rgba(20, 15, 10, .45) 100%); }
.people .inner { position: relative; z-index: 2; display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 26px; }
.people .crest { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .8)); }
.people h3 { font-size: clamp(26px, 3.4vw, 34px); margin: 0; }
.people .sub { color: var(--muted); font-size: 17px; margin: 0 0 12px; font-style: italic; }
.people .facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 14px; font-size: 15px; }
.people .facts span b { margin-right: 4px; }
.people.valemarch { border-color: #7a5b22; } .people.valemarch h3 { color: var(--valemarch); }
.people.tidereach h3 { color: var(--tidereach); } .people.hollowmere h3 { color: var(--hollowmere); }
.units { display: flex; flex-wrap: wrap; gap: 14px; }
.unit { width: 104px; text-align: center; margin: 0; }
.unit img { width: 84px; height: 84px; margin: 0 auto 6px; border-radius: 50%; border: 2px solid var(--edge-hi); object-fit: cover; background: #000; box-shadow: 0 4px 14px rgba(0, 0, 0, .6); }
.unit figcaption { font-size: 13px; line-height: 1.3; color: var(--text); }
@media (max-width: 700px) {
  .people .inner { grid-template-columns: 1fr; padding: 20px 16px; gap: 10px; }
  .people .crest { width: 88px; height: 88px; }
  .people::before { background: linear-gradient(180deg, rgba(20, 15, 10, .75), rgba(20, 15, 10, .95)); }
  .unit { width: calc(33.33% - 10px); min-width: 84px; }
  .unit img { width: 72px; height: 72px; }
}

/* campaigns */
.campaign .banner { width: 100%; aspect-ratio: 1600 / 420; object-fit: cover; border-bottom: 1px solid var(--edge); }
.campaign .thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.campaign .thumbs figure { margin: 0; }
.campaign .thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; border: 1px solid var(--edge); }
.campaign .thumbs figcaption { font-size: 12px; color: var(--muted); margin-top: 3px; }
.campaign ol { margin: 8px 0 0; padding-left: 22px; font-size: 14px; color: #d9ccb0; columns: 2; column-gap: 22px; }
@media (max-width: 520px) { .campaign ol { columns: 1; } }

/* did you know */
.facts-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); counter-reset: fact; }
.fact { padding: 16px 16px 16px 58px; position: relative; font-size: 15px; }
.fact::before { counter-increment: fact; content: counter(fact); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px; color: #1a1206; background: radial-gradient(circle at 35% 30%, #fff0bf, var(--gold) 45%, var(--gold-deep)); }
.fact b { display: block; font-size: 17px; margin-bottom: 2px; }

/* call to action */
.cta { position: relative; overflow: hidden; }
.cta .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(20, 15, 10, .95), rgba(20, 15, 10, .6)); }
.cta .inner { position: relative; z-index: 2; padding: 30px 26px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.cta h2 { margin-bottom: 6px; }
.cta p { margin: 0; max-width: 640px; }
@media (max-width: 700px) { .cta .inner { grid-template-columns: 1fr; padding: 22px 16px; } }

/* ------------------------------------------------------------------ changelog (the milettuj.html look) */
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.day { margin-bottom: 28px; overflow: hidden; }
.day .banner { display: block; width: 100%; height: 150px; object-fit: cover; border-bottom: 1px solid var(--edge); }
.day-head { padding: 16px 20px 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.day-head h2 { margin: 0; font-size: 24px; }
.day-head a.anchor { color: var(--muted); text-decoration: none; font-size: 15px; }
.day .body { padding: 6px 20px 20px; }
.day h3 { margin: 18px 0 8px; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; }
.day h3.ok { color: var(--ok); } .day h3.work { color: var(--work); } .day h3.plan { color: var(--plan); }
.day ul { margin: 0; padding: 0; list-style: none; }
.day li { position: relative; padding: 8px 0 8px 22px; border-bottom: 1px solid rgba(201, 162, 74, .12); }
.day li:last-child { border-bottom: 0; }
.day li::before { content: "◆"; position: absolute; left: 0; top: 8px; font-size: 11px; color: var(--edge-hi); }
.day .ok-list li::before { color: var(--ok); } .day .work-list li::before { color: var(--work); } .day .plan-list li::before { color: var(--plan); }
.day .note { color: var(--muted); font-size: 14px; }
.day .icons { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.day .icons img { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--edge); background: #000; object-fit: cover; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px; }
@media (max-width: 520px) { .day .banner { height: 96px; } .day .body, .day-head { padding-left: 14px; padding-right: 14px; } }

/* ------------------------------------------------------------------ gallery + lightbox */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.gallery button { all: unset; cursor: zoom-in; display: block; border-radius: 4px; overflow: hidden; border: 1px solid var(--edge); background: #000; box-shadow: var(--shadow); }
.gallery button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.03); }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.gallery.square img { aspect-ratio: 1; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(4, 7, 12, .96); display: none; align-items: center; justify-content: center; padding: 56px 12px 64px; touch-action: pan-y; }
.lightbox.open { display: flex; }
.lightbox img { user-select: none; -webkit-user-drag: none; max-width: 100%; max-height: 100%; object-fit: contain; border: 1px solid var(--edge); box-shadow: 0 20px 60px rgba(0, 0, 0, .8); }
.lightbox .cap { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: var(--text); font-size: 15px; padding: 0 60px; }
.lightbox button { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--edge-hi); background: rgba(27, 21, 16, .9); color: var(--gold); font-size: 24px; cursor: pointer; line-height: 1; }
.lightbox .close { top: 10px; right: 10px; }
.lightbox .prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 10px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox .prev, .lightbox .next { top: auto; bottom: 8px; transform: none; } }

/* ------------------------------------------------------------------ tables, lists, faq, forms */
.keys { width: 100%; border-collapse: collapse; font-size: 15px; }
.keys th, .keys td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(201, 162, 74, .14); vertical-align: top; }
.keys th { color: var(--muted); font-weight: normal; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
kbd { display: inline-block; min-width: 26px; text-align: center; font: 13px/1.5 var(--sans); color: var(--gold); background: #120d09; border: 1px solid var(--edge); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; margin: 1px 2px 1px 0; white-space: nowrap; }
.list { margin: 0; padding: 0; list-style: none; }
.list li { position: relative; padding: 6px 0 6px 22px; }
.list li::before { content: "◆"; position: absolute; left: 0; top: 7px; font-size: 11px; color: var(--edge-hi); }
.list.no li::before { color: #a66; content: "◇"; }
details.faq { margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 14px 44px 14px 18px; font-size: 19px; color: var(--gold); list-style: none; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 18px; top: 10px; font-size: 26px; color: var(--edge-hi); }
details.faq[open] summary::after { content: "–"; }
details.faq .answer { padding: 0 18px 16px; }
details.faq .answer p:last-child { margin: 0; }
.form { display: grid; gap: 16px; }
.form .row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.field label, .field legend { display: block; color: var(--gold); margin-bottom: 6px; font-size: 16px; padding: 0; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; font: 17px/1.4 var(--serif); color: var(--text); background: #120d09; border: 1px solid var(--edge); border-radius: 4px; padding: 10px 12px; min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 2px rgba(230, 201, 121, .25); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--text); background: rgba(201, 162, 74, .06); border: 1px solid var(--edge); border-radius: 4px; padding: 8px 12px; cursor: pointer; min-height: 44px; font-size: 16px; }
.choices input { accent-color: var(--gold); width: 18px; height: 18px; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 15px; }
.consent input { accent-color: var(--gold); width: 20px; height: 20px; margin-top: 3px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-msg { padding: 12px 16px; border-radius: 4px; border: 1px solid; display: none; }
.form-msg.show { display: block; }
.form-msg.ok { border-color: var(--ok); background: rgba(127, 191, 106, .1); }
.form-msg.err { border-color: #d77; background: rgba(221, 119, 119, .1); }
.privacy { font-size: 14px; color: var(--muted); }
.privacy h3 { font-size: 16px; color: var(--gold); }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: 40px; border-top: 1px solid var(--edge); background: linear-gradient(180deg, #16110c, #0b0806); color: var(--muted); font-size: 15px; }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: 1.4fr 1fr 1fr; padding-top: 36px; padding-bottom: 20px; }
.site-footer h4 { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer .brandline { display: flex; align-items: center; gap: 10px; color: var(--gold); font-size: 20px; margin-bottom: 8px; }
.site-footer .brandline img { width: 40px; height: 40px; }
.site-footer .fine { border-top: 1px solid rgba(201, 162, 74, .15); padding-top: 14px; padding-bottom: 24px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .site-footer .cols > :first-child { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ additions */
/* The crown is the boot screen's art on black: screen-blend it into whatever is behind. */
/* img/crown.webp: the boot-screen crown with its black turned into alpha (tools/web-images.sh). */
.stats { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; text-align: center; }
.stats div { display: flex; flex-direction: column; align-items: center; }
.stats b { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.1; background: linear-gradient(180deg, #fff0bf, #e6c979 50%, #a67c26); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { font-size: 13px; color: var(--muted); line-height: 1.3; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); row-gap: 16px; } }
@media (max-width: 420px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.keyart { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--edge); box-shadow: var(--frame); }
.keyart img.bg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.keyart .over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16px;
  background: radial-gradient(ellipse at 50% 45%, rgba(7, 12, 20, .15), rgba(7, 12, 20, .65)); }
.keyart .over img { width: clamp(90px, 16vw, 170px); height: auto; }
.keyart .over .name { font-size: clamp(30px, 6vw, 66px); letter-spacing: .07em; line-height: 1.05; margin: 0;
  background: linear-gradient(180deg, #fff0bf 0%, #e6c979 45%, #a67c26 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .9)); }
.soon { font-size: clamp(34px, 7vw, 76px); line-height: 1.05; margin: 0 0 12px; text-align: center; letter-spacing: .04em;
  background: linear-gradient(180deg, #fff0bf 0%, #e6c979 45%, #a67c26 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feature-card .body h3 { font-size: 22px; }
.feature-card ul { margin: 8px 0 0; padding-left: 18px; font-size: 15px; color: #e0d4b8; }
.feature-card li { margin: 2px 0; }
code { font: 14px var(--sans); color: var(--gold); background: #120d09; padding: 1px 5px; border-radius: 3px; }
.card .shot { all: unset; display: block; cursor: zoom-in; }
.card .shot:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.card .shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--edge); }

/* =========================================================================================================
   round 47 — PHP pages: stat icons, closing band, 4-column footer, hover motion, reveal, flourishes.
   Motion is transform/opacity only, 150–300 ms ease-out; hover effects only on devices that hover;
   everything stops under prefers-reduced-motion (the global rule near the top also zeroes durations).
   ========================================================================================================= */
:root { --ease: cubic-bezier(.2, .7, .2, 1); --t: 220ms; }

/* ---- small luxuries: selection colour, gold scrollbar ---- */
::selection { background: rgba(230, 201, 121, .85); color: #1a1206; }
html { scrollbar-color: var(--edge-hi) #0b0806; scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #0b0806; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #e6c979, #8a6420); border-radius: 6px; border: 2px solid #0b0806; }

/* ---- number strip with icons ---- */
.stats { grid-template-columns: repeat(8, 1fr); gap: 14px 10px; }
.stats .stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stats .stat img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: #000;
  border: 2px solid var(--edge-hi); box-shadow: 0 0 0 3px #1b1510, 0 0 0 4px rgba(201, 162, 74, .45), 0 6px 14px rgba(0, 0, 0, .6);
  transition: transform var(--t) var(--ease), filter var(--t) var(--ease); margin-bottom: 4px; }
.stats b { transition: filter var(--t) var(--ease); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 420px) { .stats { grid-template-columns: repeat(2, 1fr); } .stats .stat img { width: 56px; height: 56px; } }

/* ---- field errors (server-rendered) ---- */
.field-error { color: #f0a0a0; font-size: 14px; margin: 6px 0 0; }
[aria-invalid="true"] { border-color: #d77 !important; }
.form-msg:focus { outline: none; }

/* ---- rivets on the main panels, ◆ on section titles ---- */
.framed { position: relative; }
.framed::before, .framed::after { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff0bf, #c9a24a 45%, #5b4214 100%); box-shadow: 0 1px 2px rgba(0, 0, 0, .8); top: 7px; left: 7px; }
.framed::after { left: auto; right: 7px; }
.section-head h2::before, .section-head h2::after { content: "◆"; font-size: .45em; color: var(--edge-hi); vertical-align: .35em; margin: 0 .55em; opacity: .85; }
.section-head h2::before { margin-left: 0; }
@media (max-width: 520px) { .section-head h2::after { display: none; } }

/* ---- header tightens after scrolling ---- */
.site-header { transition: background-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.site-header .bar { transition: min-height var(--t) var(--ease); }
.site-header.scrolled { background: rgba(14, 10, 7, .86); box-shadow: 0 1px 0 rgba(201, 162, 74, .3), 0 10px 28px rgba(0, 0, 0, .65); }
.site-header.scrolled .bar { min-height: 50px; }
.brand img { transition: transform var(--t) var(--ease); }
.site-header.scrolled .brand img { transform: scale(.86); }

/* ---- menu: gold underline opening from the middle ---- */
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 3px; height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); transform: scaleX(0); transition: transform var(--t) var(--ease); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (max-width: 960px) { .nav a::after { display: none; } }

/* ---- buttons: lift + a shine that runs across ---- */
.btn { position: relative; overflow: hidden; transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), filter var(--t) var(--ease); }
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(0) skewX(-18deg); opacity: 0; }

/* ---- cards: overflow for the image zoom ---- */
.card, .people, .news-card .thumb, .feature img, .gallery button, .strip button, .campaign .thumbs figure { overflow: hidden; }
.news-card .thumb { display: block; width: 116px; height: 72px; border-radius: 4px; border: 1px solid var(--edge); }
.news-card .thumb img { border: 0; border-radius: 0; width: 100%; height: 100%; }
.card, .panel.feature, .panel.char, .panel.creature, .panel.fact, .news-card, .people {
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease); }
.card img, .news-card img, .people > .bg, .campaign .thumbs img, .char img, .creature img, .feature img, .strip img, .unit img {
  transition: transform 300ms var(--ease); }

/* ---- gallery: zoom + a dark overlay with a magnifier ---- */
.gallery button, .strip button { position: relative; }
.gallery button::after, .strip button::after { content: "⌕"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 34px; color: var(--gold); background: rgba(7, 12, 20, .55); opacity: 0; transition: opacity var(--t) var(--ease); pointer-events: none; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card:hover, .panel.feature:hover, .panel.char:hover, .panel.creature:hover, .panel.fact:hover, .news-card:hover, .people:hover {
    transform: translateY(-4px); border-color: var(--edge-hi);
    box-shadow: inset 0 0 0 1px rgba(230, 201, 121, .35), 0 16px 36px rgba(0, 0, 0, .6), 0 0 22px rgba(201, 162, 74, .12); }
  .people:hover { transform: translateY(-2px); }
  .card:hover img, .news-card:hover img, .people:hover > .bg, .campaign .thumbs figure:hover img, .char:hover img, .creature:hover img, .feature:hover img,
  .strip button:hover img, .unit:hover img { transform: scale(1.05); }
  .gallery button:hover img { transform: scale(1.06); }
  .gallery button:hover::after, .strip button:hover::after { opacity: 1; }
  .stats .stat:hover img { transform: rotate(-8deg) scale(1.06); filter: drop-shadow(0 0 10px rgba(230, 201, 121, .75)); }
  .stats .stat:hover b { filter: brightness(1.35) drop-shadow(0 0 6px rgba(230, 201, 121, .6)); }
  .nav a:hover::after, .site-footer a:not(.btn):hover::after { transform: scaleX(1); }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .5), 0 0 16px rgba(230, 201, 121, .25), inset 0 1px 0 rgba(255, 255, 255, .35); }
  .btn:hover::after { opacity: 1; transform: translateX(380%) skewX(-18deg); transition: transform 600ms var(--ease), opacity 150ms; }
  .closing .army img:hover { transform: translateY(-6px) scale(1.08); z-index: 5; }
  .to-top:hover { transform: translateY(-2px); }
}
.gallery button:focus-visible::after, .strip button:focus-visible::after { opacity: 1; }

/* ---- sections drift in once ---- */
.reveal { transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.pending { opacity: 0; transform: translateY(18px); }

/* ---- embers over the home hero ---- */
.hero canvas.embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero .wrap { z-index: 2; }

/* ---- the crown's secret ---- */
.gold-rain { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.gold-rain i { position: absolute; top: -30px; font-style: normal; color: #ffd76a; text-shadow: 0 0 8px rgba(255, 200, 80, .9); font-size: 16px;
  animation: gold-fall linear forwards; }
@keyframes gold-fall { to { transform: translateY(110vh) rotate(540deg); opacity: .2; } }
.egg-glow { filter: drop-shadow(0 0 18px #ffd76a); }

/* ---- closing band above the footer ---- */
.closing { position: relative; overflow: hidden; margin-top: 30px; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
.closing > .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.closing::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(7, 12, 20, .55) 35%, rgba(7, 12, 20, .72) 70%, #16110c 100%); }
.closing .inner { position: relative; z-index: 2; text-align: center; padding-top: 70px; padding-bottom: 36px; }
.closing h2 { font-size: clamp(30px, 5.5vw, 54px); margin: 0 0 10px; text-shadow: 0 3px 16px rgba(0, 0, 0, .9);
  background: linear-gradient(180deg, #fff0bf 0%, #e6c979 45%, #a67c26 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.closing .lead { max-width: 640px; margin: 0 auto 18px; text-shadow: 0 2px 10px rgba(0, 0, 0, .95); font-size: 18px; }
.closing .btn-row { justify-content: center; }
.closing .army { display: flex; justify-content: center; margin-top: 30px; padding-left: 18px; }
.closing .army img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-left: -18px; position: relative;
  border: 2px solid var(--edge-hi); box-shadow: 0 0 0 3px #16110c, 0 8px 16px rgba(0, 0, 0, .7); background: #000; transition: transform var(--t) var(--ease); }
@media (max-width: 640px) {
  .closing .army img { width: 48px; height: 48px; margin-left: -16px; }
  .closing .army img:nth-child(n+10) { display: none; }
}

/* ---- footer: 4 columns, runes behind, back-to-top ---- */
.site-footer { position: relative; overflow: hidden; margin-top: 0; }
.site-footer .runes { position: absolute; right: -90px; top: -40px; width: 420px; height: 420px; opacity: .07; pointer-events: none; }
.site-footer .cols { position: relative; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }
.site-footer .about p { max-width: 380px; }
.site-footer a:not(.btn) { position: relative; }
.site-footer a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--gold);
  transform: scaleX(0); transition: transform var(--t) var(--ease); }
.site-footer .fine { position: relative; align-items: center; }
.site-footer .fine a { color: var(--text); }
.to-top { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--edge); border-radius: 16px; color: var(--gold) !important;
  text-decoration: none; transition: transform var(--t) var(--ease), border-color var(--t) var(--ease); }
.to-top::after { display: none; }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .site-footer .cols > .about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ---- the privacy page ---- */
.prose h2 { font-size: 24px; margin-top: 22px; }
.prose h2:first-child { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .reveal.pending { opacity: 1; transform: none; }
  .btn::after, .gold-rain, .hero canvas.embers { display: none; }
}
.two-col > *, .form .row > *, .grid > * { min-width: 0; }
.field select, .field input, .field textarea { max-width: 100%; }
aside .keys { table-layout: fixed; }
aside .keys th { width: 42%; }
.keys td { overflow-wrap: anywhere; }

/* ---- language flags (header on desktop, inside the hamburger menu on phones) ---- */
.lang-switch { display: flex; gap: 4px; align-items: center; }
.lang-switch .flag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid transparent; border-radius: 4px;
  color: var(--muted); text-decoration: none; font: 12px/1 var(--sans); letter-spacing: .06em; opacity: .7;
  transition: opacity var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease); }
.lang-switch .flag img { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .6); }
.lang-switch .flag.current { opacity: 1; color: var(--gold); border-color: rgba(201, 162, 74, .45); }
.bar-lang { margin-left: 8px; }
.nav .nav-lang { display: none; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .lang-switch .flag:hover { opacity: 1; transform: translateY(-1px); border-color: var(--edge-hi); } }
@media (max-width: 960px) {
  .bar-lang { display: none; }
  .nav .nav-lang { display: block; padding: 12px 10px 4px; }
  .nav .nav-lang .lang-switch .flag { font-size: 15px; padding: 8px 12px; }
  .nav .nav-lang a::after { display: none; }
}
@media (max-width: 1240px) and (min-width: 961px) { .nav a { padding: 8px 8px; font-size: 14px; } }
.nav a, .header-play, .brand span { white-space: nowrap; }
.site-header .bar { gap: 10px; }
@media (max-width: 1300px) { .site-header .header-play { display: none; } }
/* header fit: nine menu items + flags + play button */
.site-header .bar > * { flex-shrink: 0; }
.nav { flex-shrink: 1; min-width: 0; }
.nav a { padding: 8px 9px; font-size: 15px; letter-spacing: .03em; }
.brand span { font-size: 20px; }
@media (max-width: 1520px) { .site-header .header-play { display: none; } }
@media (max-width: 1200px) and (min-width: 961px) { .brand span { display: none; } .nav a { padding: 8px 7px; font-size: 14px; } }
.site-header .wrap { max-width: 1340px; }
