/* A:R Aether Realm — site styles, service site (air.cbt):
   dark header bar with the orange "game start" block, dark key-visual band per page,
   white content with light-grey boxes, orange (#e4761c) accents, dark footer.
   No framework, no external fonts. */
:root {
  --bg: #ffffff;
  --bg2: #f7f7f7;          /* boxes, bands */
  --bg3: #ededed;          /* inputs, hover */
  --line: #e1e1e1;
  --line2: #cfcfcf;
  --fg: #2b2b2b;
  --fg2: #4d4c4c;
  --muted: #7d7d7d;
  --accent: #e4761c;
  --accent-hi: #e46417;
  --accent-soft: #fdeede;
  --petrol: #14647e;
  --dark: #272727;         /* header, footer */
  --dark2: #1a1a1a;
  --dark-line: #3a3a3a;
  --ok: #2e9e4f;
  --err: #d23b4e;
  --warn: #b8860b;
  --vulpin: #2f6fb8;
  --ontari: #c43b3b;
  --radius: 6px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .08);
  --font: "Noto Sans", "Segoe UI", Inter, Roboto, system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --header-h: 85px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px;
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;   /* short pages: footer at the bottom edge */
}
body > main { flex: 1 0 auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mt { margin-top: 2.5rem; }
.inline { display: inline; }
.container { width: min(1200px, 100% - 32px); margin: 0 auto; }
.narrow { max-width: 560px; }
.section { padding: 48px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px;
  padding-bottom: 10px; border-bottom: 2px solid var(--fg); }
.section-head h1, .section-head h2 { margin: 0; }
.section-head.light { border-bottom-color: rgba(255,255,255,.35); color: #fff; }
.section-head .more { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.section-head .more:hover { color: var(--accent); }
.kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; font-weight: 700; margin-bottom: .6em; }
.lead { font-size: 1.08rem; color: var(--fg2); max-width: 62ch; }
.hero .lead, .cta-band .lead { color: #dfe3e8; }

/* ---- buttons, tags, pills ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 22px; border-radius: 4px;
  border: 1px solid transparent; font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap;
  font-family: inherit; line-height: 1.2; text-decoration: none; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hi); color: #fff; }
.btn-ghost { background: #fff; color: var(--fg); border-color: var(--line2); }
.btn-ghost:hover { border-color: var(--fg); color: var(--fg); }
.hero .btn-ghost, .cta-band .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-ghost:hover, .cta-band .btn-ghost:hover { background: rgba(255,255,255,.22); color: #fff; }
.btn-danger { background: #fff; color: var(--err); border-color: rgba(210,59,78,.5); }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn.disabled { opacity: .6; cursor: default; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
button.link:hover { color: var(--accent); text-decoration: underline; }
button.link.danger { color: var(--err); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 3px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; background: var(--bg3); color: var(--fg2); }
.tag-announcement { background: #e1f0f5; color: var(--petrol); }
.tag-event { background: var(--accent-soft); color: var(--accent-hi); }
.tag-patch_notes { background: #e4f3e8; color: var(--ok); }
.tag-dev_blog { background: #f8efd5; color: var(--warn); }
.tag-pin { background: var(--fg); color: #fff; }
.tag-ok { background: #e4f3e8; color: var(--ok); }
.pill { padding: 4px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
/* header server plaque: the start block's language in dark — gear plate, lamp, serif state line */
.srv { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 12px; border-radius: 3px; white-space: nowrap;
  background: url(/static/img/gear-pattern.svg) -6px -10px / 150px 75px repeat, linear-gradient(135deg, #353535 0%, #262626 55%, #1d1d1d 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 -22px 28px -20px rgba(0,0,0,.6); color: #ddd; }
.srv-lamp { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #6a6a6a; box-shadow: 0 0 0 3px rgba(255,255,255,.07); transition: background .3s, box-shadow .3s; }
.srv-text { display: flex; flex-direction: column; line-height: 1; }
.srv strong { font-family: Georgia, "Noto Serif", "Times New Roman", serif; font-weight: 400; font-size: .92rem; letter-spacing: .12em; text-transform: uppercase; color: #f1f1f1; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.srv small { font-size: .66rem; letter-spacing: .04em; color: #a3a3a3; margin-top: 4px; }
.srv-on .srv-lamp { background: #5fe28c; box-shadow: 0 0 0 3px rgba(95,226,140,.18), 0 0 12px rgba(95,226,140,.9); animation: srvPulse 2.4s ease-in-out infinite; }
.srv-on strong { color: #9cf0b5; }
.srv-off .srv-lamp { background: #e4556a; box-shadow: 0 0 0 3px rgba(228,85,106,.18), 0 0 10px rgba(228,85,106,.7); }
.srv-off strong { color: #ffb3bd; }
.srv-maint .srv-lamp { background: #f0b84a; box-shadow: 0 0 0 3px rgba(240,184,74,.18), 0 0 10px rgba(240,184,74,.8); }
.srv-maint strong { color: #ffd97a; }
@keyframes srvPulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(95,226,140,.18), 0 0 12px rgba(95,226,140,.9); } 50% { box-shadow: 0 0 0 5px rgba(95,226,140,.08), 0 0 4px rgba(95,226,140,.5); } }
@media (prefers-reduced-motion: reduce) { .srv-on .srv-lamp { animation: none; } }
.pill-on { background: rgba(46,158,79,.22); color: #8be0a1; }
.pill-off { background: rgba(210,59,78,.22); color: #ff9aa8; }
.pill-unknown { background: rgba(255,255,255,.1); color: #bbb; }
.pill-maint { background: rgba(201,150,28,.25); color: #ffd97a; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line2); color: var(--fg2); font-size: .9rem; background: #fff; }
.chip:hover { border-color: var(--fg); color: var(--fg); text-decoration: none; }
.chip.active { background: var(--fg); border-color: var(--fg); color: #fff; }
.class-pill { padding: 2px 9px; border-radius: 3px; font-size: .8rem; font-weight: 600; background: var(--bg3); color: var(--fg2); }
.class-warlord { color: #9a5a12; } .class-elementalist { color: #2d5fb3; } .class-mystic { color: #2a7f3e; }
.class-assassin { color: #6f3fa8; } .class-gunner { color: #8a6a07; } .class-slayer { color: #b03030; }

/* ---- header: dark bar, mega menu that unfolds on hover (gold line + turning gear under the
   hovered item, sub links in columns below), orange start block at the right — after the
   2019 service site's GNB ------------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--dark); color: #f4f3f3; }
.header-inner { position: relative; height: var(--header-h); display: flex; align-items: stretch; width: 100%; margin: 0; }
.brand { flex: none; display: flex; align-items: center; gap: 12px; padding: 0 28px 0 28px; color: #fff; font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.brand:hover { color: #fff; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gnb { flex: 1; display: flex; align-items: stretch; min-width: 0; }
.gnb-list { display: flex; margin: 0 auto; padding: 0; list-style: none; }
.gnb-item { position: relative; display: flex; justify-content: center; min-width: 150px; }
.gnb-link { position: relative; display: block; overflow: hidden; height: var(--header-h); margin: 0; padding: 0 10px; width: max-content; color: #f4f3f3; text-align: center; text-decoration: none; }
.gnb-link > span { display: block; padding-top: 29px; font-size: 17px; line-height: 24px; letter-spacing: -.02em; white-space: nowrap; }
.gnb-link::after { content: ""; display: block; width: 50%; height: 1px; margin: 3px auto 0; background: #e4c48d; opacity: 0; transition: width .5s, opacity .5s; }
.gnb-link:hover { color: #fff; text-decoration: none; }
.gnb-gear { position: absolute; left: 50%; bottom: -37px; width: 32px; height: 32px; margin-left: -16px; background: url(/static/img/gnb-gear.png) no-repeat; transition: bottom .5s; animation: gnbGear 1.5s linear infinite; }
.gnb-item:hover .gnb-link::after, .gnb-item.active .gnb-link::after { width: 100%; opacity: 1; }
.gnb-item:hover .gnb-gear, .gnb-item.active .gnb-gear { bottom: -16px; }
@keyframes gnbGear { from { transform: rotate(0); } to { transform: rotate(180deg); } }
.mega-panel { position: absolute; left: 50%; width: 100vw; transform: translateX(-50%); top: 100%; height: 0; overflow: hidden; background: var(--dark); box-shadow: 0 14px 30px rgba(0,0,0,.35); transition: height .5s; }
.gnb:hover .mega-panel, .site-header.mega-open .mega-panel { height: 290px; }
.snb { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: max-content; min-width: 100%; z-index: 2; margin: 0; padding: 18px 0 0; list-style: none; opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .35s; }
.gnb:hover .snb, .site-header.mega-open .snb { opacity: 1; visibility: visible; transition: opacity .3s .15s, visibility 0s; }
.snb a { display: block; font-size: 15px; line-height: 36px; padding: 0 8px; color: #bebebe; text-align: center; white-space: nowrap; text-decoration: none; transition: color .2s; }
.snb a:hover, .snb a.active { color: #f0f0f0; text-decoration: none; }
.header-account { flex: none; display: flex; align-items: center; gap: 10px; margin-left: 0; padding: 0 14px; white-space: nowrap; }
.header-account a { color: #f4f3f3; text-decoration: none; font-weight: 500; }
.header-account a:hover { color: #fff; }
.header-account .user-link { font-weight: 700; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.header-account .btn-ghost { background: transparent; color: #f4f3f3; border-color: rgba(255,255,255,.35); }
.header-account .btn-ghost:hover { border-color: #fff; color: #fff; }
.header-account button.link { color: #bdbdbd; }
.header-account button.link:hover { color: #fff; }
.header-cta {
  flex: none; display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 230px; padding: 0 30px;
  color: #fff; text-decoration: none; text-align: center; line-height: 1.1;
  background: url(/static/img/gear-pattern.svg) 8px -6px / 240px 120px repeat,
              linear-gradient(135deg, #f0962f 0%, #e4761c 48%, #c75d0e 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 -40px 50px -30px rgba(120,45,0,.45);
  transition: filter .2s;
}
.header-cta:hover { color: #fff; text-decoration: none; filter: brightness(1.1) saturate(1.05); }
/* the original's other states: teal "pre-download" row and the dark "test ended" block (not a link) */
.header-cta--teal { background: url(/static/img/gear-pattern.svg) 8px -6px / 240px 120px repeat,
  linear-gradient(135deg, #2a9ab8 0%, #14647e 50%, #0e4e63 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 -40px 50px -30px rgba(0,40,55,.45); }
.header-cta--closed { background: url(/static/img/gear-pattern.svg) 8px -6px / 240px 120px repeat,
  linear-gradient(135deg, #4a4a4a 0%, #343434 50%, #262626 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); cursor: default; }
.header-cta--closed strong { color: #d6d6d6; }
.header-cta--closed span { color: #9a9a9a; }
.header-cta strong { font-family: Georgia, "Noto Serif", "Times New Roman", serif; font-size: 1.55rem; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; text-shadow: 0 1px 3px rgba(90,35,0,.5); }
.header-cta span { font-size: .72rem; opacity: .92; margin-top: 4px; letter-spacing: .04em; }
.nav-toggle { display: none; margin-left: auto; align-self: center; background: none; border: 1px solid var(--dark-line); color: #fff; border-radius: 4px; padding: 6px 10px; font-size: 1.1rem; cursor: pointer; }

/* ---- flash / alerts ------------------------------------------------------------- */
.flash { padding: 12px 24px; text-align: center; font-weight: 600; border-bottom: 1px solid var(--line); }
.flash-ok { background: #e4f3e8; color: #1f6f36; }
.flash-info { background: #e1f0f5; color: var(--petrol); }
.flash-error { background: #fbe3e7; color: #a3263a; }
.alert { padding: 12px 14px; border-radius: 4px; margin-bottom: 16px; border: 1px solid; }
.alert-error { background: #fbe3e7; color: #a3263a; border-color: #f0b8c1; }
.alert-info { background: #e1f0f5; color: var(--petrol); border-color: #b9dbe7; }

/* ---- hero bands ------------------------------------------------------------------ */
.hero { position: relative; display: flex; align-items: flex-end; overflow: hidden; background: var(--dark) center/cover no-repeat; color: #fff; }
.hero-home { min-height: min(78vh, 720px); }
.hero-page { min-height: 300px; }
.hero-small { min-height: 220px; }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-overlay { position: absolute; inset: 0; background:
  linear-gradient(to top, rgba(20,20,20,.92) 0%, rgba(20,20,20,.45) 40%, rgba(20,20,20,.1) 75%, rgba(20,20,20,.35) 100%); }
.hero-page .hero-overlay, .hero-small .hero-overlay { background: linear-gradient(to right, rgba(20,20,20,.85) 0%, rgba(20,20,20,.35) 60%, rgba(20,20,20,.55) 100%); }
.hero-content { position: relative; width: min(1200px, 100% - 32px); margin: 0 auto; padding: 44px 0 48px; }
.hero-content h1 { text-shadow: 0 2px 18px rgba(0,0,0,.6); max-width: 16ch; font-weight: 700; }
.hero-small .hero-content { padding: 28px 0; }
.hero-small h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---- status strip --------------------------------------------------------------- */
.status-strip { background: var(--bg2); border-bottom: 1px solid var(--line); padding: 18px 0; }
.status-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-k { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.stat-v { font-size: 1.35rem; font-weight: 700; }
.stat-v.small { font-size: 1rem; }
.stat-v.ok { color: var(--ok); } .stat-v.err { color: var(--err); } .stat-v.warn { color: var(--warn); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h3 { margin-bottom: .4em; }
.card.stat { padding: 14px 16px; background: var(--bg2); }

/* ---- news ------------------------------------------------------------------------ */
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.news-grid.compact { grid-template-columns: repeat(3, 1fr); }
.news-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--fg); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--fg); text-decoration: none; }
.news-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.news-card.featured { grid-column: span 2; grid-row: span 2; }
.news-card.featured img { aspect-ratio: 16/10; flex: 1; }
.news-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.news-card-body h3 { margin: 0; }
.news-card-body p { margin: 0; color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card time { color: var(--muted); font-size: .8rem; margin-top: auto; }
.news-list { display: flex; flex-direction: column; gap: 0; border-top: 2px solid var(--fg); }
.news-row { display: grid; grid-template-columns: 240px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.news-row:hover { color: var(--fg); text-decoration: none; }
.news-row:hover h3 { color: var(--accent); }
.news-row-img { background: var(--bg2); min-height: 135px; border-radius: 4px; overflow: hidden; }
.news-row-img img { width: 100%; height: 100%; object-fit: cover; }
.news-row-meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .82rem; margin-bottom: 6px; }
.news-row-body p { color: var(--muted); margin: 0; }
.pagination { display: flex; justify-content: center; gap: 24px; margin-top: 28px; color: var(--muted); }
.article { max-width: 820px; padding: 40px 0; }
.article h1 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
.article-meta { color: var(--muted); margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.article-cover { border-radius: var(--radius); margin-bottom: 28px; }
.breadcrumb { color: var(--muted); font-size: .9rem; }

/* ---- prose (rendered markdown) -------------------------------------------------- */
.prose { font-size: 1rem; max-width: 76ch; }
.prose h2 { margin-top: 1.8em; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.prose h3 { margin-top: 1.4em; }
.prose img { border-radius: 4px; margin: 1em 0; }
.prose blockquote { margin: 1.2em 0; padding: 10px 20px; border-left: 3px solid var(--accent); background: var(--bg2); color: var(--fg2); font-style: italic; }
.prose blockquote p { margin: .4em 0; }
.prose pre { background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; padding: 14px; overflow-x: auto; font-family: var(--mono); font-size: .88rem; }
.prose code { font-family: var(--mono); font-size: .92em; background: var(--bg3); padding: 1px 5px; border-radius: 3px; }
.prose pre code { background: none; padding: 0; }
.prose table, .table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .92rem; border-top: 2px solid var(--fg); }
.prose th, .prose td, .table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th, .table th { background: var(--bg2); color: var(--fg2); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.top td { background: var(--accent-soft); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .25em 0; }
.prose.legal { font-size: .95rem; }
.prose.legal h2 { scroll-margin-top: calc(var(--header-h) + 16px); }
.prose.legal table { font-size: .85rem; }

/* ---- features / classes / factions / cta --------------------------------------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature { position: relative; min-height: 230px; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; color: #fff; background: var(--dark) center/cover no-repeat; text-decoration: none; transition: transform .15s; }
.feature::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.05) 60%); }
.feature:hover { transform: translateY(-3px); color: #fff; text-decoration: none; }
.feature > * { position: relative; }
.feature-k { color: #f5b26b; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; }
.feature strong { font-size: 1.02rem; }
.classes-strip { position: relative; padding: 52px 0; background: var(--dark) center/cover no-repeat; color: #fff; }
.classes-strip::before { content: ""; position: absolute; inset: 0; background: rgba(20,20,20,.78); }
.classes-strip > .container { position: relative; }
.class-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.class-chip { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 8px 16px; border-radius: var(--radius); background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.12); color: #fff; text-decoration: none; transition: transform .15s, border-color .15s; }
.class-chip:hover { transform: translateY(-4px); border-color: var(--accent); color: #fff; text-decoration: none; }
.class-chip img { height: 190px; width: auto; object-fit: contain; }
.class-chip-name { font-weight: 700; margin-top: 6px; }
.class-chip-role { color: #bdbdbd; font-size: .8rem; }
.class-cards { display: flex; flex-direction: column; gap: 24px; margin-top: 28px; }
.class-card { display: grid; grid-template-columns: 280px 1fr; gap: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; scroll-margin-top: calc(var(--header-h) + 16px); }
.class-card-art { background: radial-gradient(ellipse at 50% 75%, rgba(228,118,28,.22), transparent 65%), var(--bg2); display: flex; align-items: flex-end; justify-content: center; }
.class-card-art img { max-height: 360px; width: auto; }
.class-card-body { padding: 22px 24px 22px 0; }
.class-card-body h3 { display: flex; align-items: baseline; gap: 12px; font-size: 1.45rem; }
.class-card-body h3 small { color: var(--muted); font-size: .85rem; font-weight: 600; }
.class-tagline { color: var(--accent-hi); font-style: italic; }
.stat-bars { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; margin: 14px 0 0; align-items: center; max-width: 440px; }
.stat-bars dt { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.stat-bars dd { margin: 0; display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--petrol), var(--accent)); }
.bar-v { color: var(--muted); font-size: .78rem; width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.faction-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.faction { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 20px; border-radius: var(--radius); color: #fff; text-decoration: none; background: var(--dark); transition: transform .15s; }
.faction:hover { transform: translateY(-3px); color: #fff; text-decoration: none; }
.faction img { height: 70px; width: auto; }
.faction strong { font-size: 1.35rem; letter-spacing: .08em; text-transform: uppercase; }
.faction span { color: #c9c9c9; font-size: .9rem; }
.faction em { color: #e6e6e6; }
.faction-vulpin { background: linear-gradient(160deg, #1f3f66, var(--dark) 75%); }
.faction-ontari { background: linear-gradient(160deg, #6b2222, var(--dark) 75%); }
.faction-pair-large { margin-top: 28px; }
.cta-band { position: relative; padding: 76px 0; background: var(--dark) center/cover no-repeat; text-align: center; color: #fff; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: rgba(20,20,20,.7); }
.cta-inner { position: relative; }
.cta-inner .hero-actions { justify-content: center; }

/* ---- page layout with sidebar --------------------------------------------------- */
.page-body { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.page-body.side-right { grid-template-columns: minmax(0, 1fr) 300px; }   /* main first, cards on the right */
.page-side { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 14px; }
.page-main { min-width: 0; }
.subnav { display: flex; flex-direction: column; border-top: 2px solid var(--fg); }
.subnav a { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--fg2); font-weight: 500; text-decoration: none; }
.subnav a:hover { color: var(--accent); text-decoration: none; }
.subnav a.active { color: var(--accent); font-weight: 700; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.toc { border-top: 2px solid var(--fg); font-size: .9rem; }
.toc a { display: block; padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--fg2); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.legal-meta { color: var(--muted); font-size: .88rem; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

/* ---- characters ------------------------------------------------------------------- */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.char-card { display: grid; grid-template-columns: 120px 1fr; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.char-art { height: 100%; width: 100%; object-fit: cover; object-position: top; background: var(--bg2); }
.char-body { padding: 14px 16px; }
.char-body h3 { margin-bottom: 4px; }
.char-body p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---- forms -------------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.form label .muted { font-weight: 400; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=url], .form input[type=number], .form select, .form textarea {
  width: 100%; padding: 10px 12px; border-radius: 4px; border: 1px solid var(--line2); background: #fff; color: var(--fg); font: inherit;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid rgba(228,118,28,.35); border-color: var(--accent); }
.form textarea { resize: vertical; min-height: 60px; line-height: 1.5; }
.form #md-editor { font-family: var(--mono); font-size: .88rem; }
.form .check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; line-height: 1.45; }
.form .check input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.form-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.form-row .grow { flex: 1; min-width: 200px; }
.form-card { max-width: 560px; margin-bottom: 20px; }
.form-card h1 { font-size: 1.7rem; }
.form-inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.form h2 { margin-top: 1em; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.danger-zone { margin-top: 32px; padding-top: 16px; border-top: 1px dashed var(--line2); }
.preview { margin-top: 24px; padding: 20px 24px; background: var(--bg2); border: 1px dashed var(--line2); border-radius: var(--radius); }
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 20px; }
.upload { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.upload img { aspect-ratio: 4/3; object-fit: cover; border-radius: 3px; width: 100%; background: var(--bg2); }
.copy-field { width: 100%; font-family: var(--mono); font-size: .78rem; background: var(--bg2); border: 1px solid var(--line); color: var(--fg); padding: 5px 7px; border-radius: 3px; cursor: copy; }
.upload-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
code { font-family: var(--mono); background: var(--bg3); padding: 1px 5px; border-radius: 3px; font-size: .9em; }

/* ---- footer (dark) ------------------------------------------------------------------- */
.site-footer { margin-top: 40px; padding: 34px 0; background: var(--dark); color: #bdbdbd; font-size: .86rem; }
.footer-inner { width: min(1200px, 100% - 32px); margin: 0 auto; display: flex; justify-content: space-between; gap: 32px; }
.footer-left strong { color: #fff; }
.footer-left p { margin-top: 8px; max-width: 64ch; color: #9a9a9a; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: flex-start; }
.footer-links a { color: #e6e6e6; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* ---- codex (game database) ------------------------------------------------------------ */
/* ---- codex dark theme: the page follows the header / footer bars ------------------------ */
.page-codex {
  --bg: #222326; --bg2: #2b2c30; --bg3: #35363b; --line: #3a3b40; --line2: #4a4b51;
  --fg: #e8e8e8; --fg2: #cfcfcf; --muted: #9b9b9b; --accent-soft: rgba(228,118,28,.18);
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  background: var(--bg); color: var(--fg);
}
.page-codex .site-footer { border-top: 1px solid var(--dark-line); }
.page-codex .cx-body { padding-top: 28px; }
.page-codex .chip { background: var(--bg2); }
.page-codex .chip:hover { border-color: var(--fg2); color: var(--fg); }
.page-codex .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-codex .btn-ghost { background: transparent; color: var(--fg); border-color: var(--line2); }
.page-codex .btn-ghost:hover { border-color: var(--fg); }
.page-codex .cx-filters input, .page-codex .cx-filters select { background: #1a1b1e; color: var(--fg); border-color: var(--line2); }
.page-codex .cx-filters input::placeholder { color: #777; }
.page-codex .cx-filters input:focus, .page-codex .cx-filters select:focus { outline: 2px solid rgba(228,118,28,.45); border-color: var(--accent); }
.page-codex .table { border-top-color: var(--line2); }
.page-codex .table th { background: var(--bg2); color: var(--fg2); }
.page-codex .table tr:hover td { background: rgba(255,255,255,.025); }
.page-codex .cx-card, .page-codex .cx-skill, .page-codex .cx-zone, .page-codex .cx-kv div { background: var(--bg2); border-color: var(--line); }
.page-codex .cx-card:hover, .page-codex .cx-skill:hover, .page-codex .cx-zone:hover { border-color: var(--accent); background: #303136; }
.page-codex .cx-icon-empty { background-color: #35363b; border-color: #46474d; opacity: .7; }
.page-codex .cx-icon { background: #121316; border-color: #3f4046; }
.page-codex .cx-steps li::before { background: var(--accent); }
.page-codex .cx-kind { background: var(--bg3); color: var(--fg2); }
.page-codex .cx-rank-1 { background: rgba(61,220,132,.16); color: #8fe6ae; }
.page-codex .cx-rank-2 { background: rgba(57,183,232,.16); color: #8fd6f2; }
.page-codex .cx-rank-3 { background: rgba(255,61,90,.18); color: #ff9aa8; }
/* on the dark page the ranks wear their in-game colours */
.page-codex .rk-Legend { color: #ff5fae; } .page-codex .rk-SSS { color: #f5864f; } .page-codex .rk-SS { color: #efbf4b; } .page-codex .rk-S { color: #a98bf0; }
.page-codex .rk-A { color: #79b8dc; } .page-codex .rk-B { color: #95d681; } .page-codex .rk-C { color: #e8e3df; } .page-codex .rk-D { color: #b4b4b4; }
.page-codex .class-pill { background: var(--bg3); }
.page-codex .class-warlord { color: #e0a060; } .page-codex .class-elementalist { color: #7fb0ff; } .page-codex .class-mystic { color: #7fd79a; }
.page-codex .class-assassin { color: #c5a3ff; } .page-codex .class-gunner { color: #e8cf6a; } .page-codex .class-slayer { color: #ff8a8a; }
.page-codex .cx-tip { background: #141519; border-color: #3b3f46; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.page-codex .cx-main h2 { border-bottom-color: var(--line); }
.page-codex .cx-map { border-color: #3a3b40; }
.page-codex blockquote { border-left: 3px solid var(--line2); margin: 1em 0; padding: 6px 16px; }
.page-codex ::selection { background: rgba(228,118,28,.45); }
/* monster stat bars: each bar is the share of the strongest monster of the same level */
.cx-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 24px; margin: 4px 0 10px; padding: 0; list-style: none; }
.cx-bars li { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 10px; font-size: .9rem; }
.cx-bars .k { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.cx-bars .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.cx-bars .bar { height: 10px; border-radius: 5px; background: rgba(127,127,127,.22); overflow: hidden; }
.cx-bars .bar i { display: block; height: 100%; border-radius: 5px; background: var(--c, var(--accent)); min-width: 3px; box-shadow: inset 0 -3px 4px rgba(0,0,0,.25); }
.cx-bars .hp { --c: #e2473f; } .cx-bars .mp { --c: #3f8fe2; } .cx-bars .attack { --c: #f08a24; } .cx-bars .defense { --c: #4cb963; }
.cx-bars .magic_attack { --c: #b069f5; } .cx-bars .magic_defense { --c: #2fbfb3; }
.cx-bars-note { color: var(--muted); font-size: .8rem; margin: 0 0 6px; }
.cx-tip .stat.stat-bar { display: grid; grid-template-columns: minmax(0, 1fr) 84px 64px; align-items: center; gap: 10px; }
.cx-tip .stat.stat-bar .bar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.cx-tip .stat.stat-bar .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #6fcf7a, #a7f59a); min-width: 3px; }
.cx-tip .stat.stat-bar b { text-align: right; font-variant-numeric: tabular-nums; }
/* bars grow and numbers count up once the page is in (site.js); reduced motion keeps the final state */
.cx-anim .bar i { transition: width .9s cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: reduce) { .cx-anim .bar i { transition: none; } }

.cx-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cx-hero h1 { margin: 0; }
.cx-search { display: flex; gap: 8px; min-width: min(460px, 100%); }
.cx-search input { flex: 1; padding: 10px 14px; border-radius: 4px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.45); color: #fff; font: inherit; }
.cx-search input::placeholder { color: #b5b5b5; }
.cx-search input:focus { outline: 2px solid rgba(228,118,28,.6); border-color: var(--accent); }
.cx-nav { background: var(--dark2); border-bottom: 1px solid var(--dark-line); }
.cx-nav .container { display: flex; flex-wrap: wrap; gap: 0 4px; }
.cx-nav a { padding: 11px 12px; color: #c9c9c9; font-size: .9rem; font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; }
.cx-nav a small { color: #7f7f7f; font-size: .76rem; margin-left: 3px; }
.cx-nav a:hover { color: #fff; }
.cx-nav a.active { color: #fff; border-bottom-color: var(--accent); }
.cx-body { padding-top: 32px; }
.cx-intro { max-width: 70ch; color: var(--fg2); }
.cx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 20px 0 32px; }
.cx-card { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg); text-decoration: none; }
.cx-card:hover { border-color: var(--accent); color: var(--fg); text-decoration: none; }
.cx-card strong { font-size: 1.05rem; }
.cx-card span { color: var(--muted); font-size: .85rem; }
.cx-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 14px 16px; margin-bottom: 18px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); }
.cx-filters label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cx-filters input, .cx-filters select { padding: 7px 9px; border-radius: 4px; border: 1px solid var(--line2); background: #fff; color: var(--fg); font: inherit; font-size: .92rem; min-width: 110px; }
.cx-filters input[type=number] { width: 84px; min-width: 0; }
.cx-filters .grow input { min-width: 220px; }
.cx-filters .btn { align-self: flex-end; }
.cx-filters .reset { align-self: flex-end; padding: 7px 4px; font-size: .88rem; }
.cx-count { color: var(--muted); font-size: .88rem; margin: 0 0 10px; }
.cx-icon { display: inline-block; width: 40px; height: 40px; border-radius: 4px; background: #1d1d1d; border: 1px solid #3a3a3a; vertical-align: middle; object-fit: contain; flex: none; }
.cx-icon.sm { width: 28px; height: 28px; }
.cx-icon.lg { width: 64px; height: 64px; }
.cx-icon.xl { width: 96px; height: 96px; border-radius: 6px; }
.cx-icon-empty { background: #e9e9e9 url(/static/img/gear-pattern.svg) center / 60% no-repeat; border-color: var(--line); opacity: .6; }
.cx-icon.fb { object-fit: contain; padding: 3px; opacity: .9; image-rendering: auto; }
.cx-portrait.fb { object-fit: contain; padding: 14px; background: #1d1d1d; }
.cx-cat { width: 32px; height: 32px; object-fit: contain; image-rendering: auto; flex: none; }
.cx-card .cx-cat { margin-bottom: 6px; }
.cx-cat.nav { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; opacity: .85; }
.cx-cat.head { width: 40px; height: 40px; vertical-align: -6px; margin-right: 12px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.cx-zone.has-thumb { min-height: 136px; display: flex; flex-direction: column; justify-content: flex-end; background-size: cover; background-position: center; color: #fff; border-color: #3a3b40; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.cx-zone.has-thumb span { color: #d8d8d8; }
.cx-zone.has-thumb:hover { color: #fff; border-color: var(--accent); filter: brightness(1.12); }
.cx-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--fg); }
.cx-link:hover { text-decoration: none; }
.cx-link:hover span { text-decoration: underline; }
.rk-Legend { color: #c2107a; } .rk-SSS { color: #c95a12; } .rk-SS { color: #a67b0e; } .rk-S { color: #6f47c0; }
.rk-A { color: #2b78ad; } .rk-B { color: #3a8a2c; } .rk-C { color: #3d3d3d; } .rk-D { color: #777; }
.cx-tip .rk-Legend { color: #ff148b; } .cx-tip .rk-SSS { color: #f5864f; } .cx-tip .rk-SS { color: #efbf4b; } .cx-tip .rk-S { color: #8f66da; }
.cx-tip .rk-A { color: #79b8dc; } .cx-tip .rk-B { color: #95d681; } .cx-tip .rk-C { color: #e8e3df; } .cx-tip .rk-D { color: #b4b4b4; }
.cx-rank { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; vertical-align: middle; }
.cx-rank-1 { background: #e4f3e8; color: #1f6f36; } .cx-rank-2 { background: #e1f0f5; color: var(--petrol); } .cx-rank-3 { background: #fbe3e7; color: #a3263a; }
.cx-kind { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: .74rem; background: var(--bg3); color: var(--fg2); vertical-align: middle; }
.cx-detail { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 32px; align-items: start; }
.cx-detail.wide { grid-template-columns: 1fr; }
.cx-tip { position: sticky; top: calc(var(--header-h) + 20px); background: #171a1f; color: #d6d6d6; border: 1px solid #3b3f46; border-radius: 6px; padding: 18px 20px; font-size: .9rem; line-height: 1.5; box-shadow: var(--shadow); }
.cx-tip-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.cx-tip-head h2 { margin: 0; font-size: 1.15rem; line-height: 1.25; }
.cx-tip-head .cx-icon { background: #0e0f12; border-color: #4a4f57; }
.cx-tip .sub { color: #9aa0a8; font-size: .82rem; margin: 2px 0 0; }
.cx-tip hr { border: 0; border-top: 1px solid #343941; margin: 10px 0; }
.cx-tip .stat { display: flex; justify-content: space-between; gap: 12px; }
.cx-tip .stat b { color: #a7f59a; font-weight: 600; }
.cx-tip .set { color: #a7f59a; }
.cx-tip .set .off { color: #7d8289; }
.cx-tip .desc { color: #c8c8c8; }
.cx-tip .desc span { white-space: pre-line; }
.cx-tip .price { color: #9aa0a8; font-size: .84rem; display: flex; justify-content: space-between; gap: 12px; }
.cx-tip .warn { color: #f7905d; }
.cx-right { display: block; text-align: right; }
.cx-tipwrap { position: fixed; z-index: 120; width: 340px; max-width: calc(100vw - 16px); pointer-events: none; display: none; }
.cx-tipwrap .cx-tip { position: static; box-shadow: 0 14px 40px rgba(0,0,0,.6); }
.cx-tipwrap .cx-tip .desc { max-height: 220px; overflow: hidden; }
.cx-main h2 { margin-top: 1.6em; font-size: 1.15rem; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.cx-main h2:first-child { margin-top: 0; }
.cx-main h2 small { color: var(--muted); font-weight: 400; font-size: .85rem; margin-left: 6px; }
.cx-main .table { margin-top: .4em; }
.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 8px 16px; margin: .4em 0 0; padding: 0; list-style: none; }
.cx-grid li { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: .92rem; }
.cx-grid .muted { margin-left: auto; white-space: nowrap; }
.cx-portrait { width: 120px; height: 120px; border-radius: 8px; background: #1d1d1d; border: 1px solid #3a3a3a; object-fit: cover; flex: none; }
.cx-portrait.empty { background: var(--bg3) url(/static/img/gear-pattern.svg) center / 50% no-repeat; border-color: var(--line); }
.cx-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 18px; }
.cx-head h1 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: .2em; }
.cx-head .meta { color: var(--muted); font-size: .92rem; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cx-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 8px; padding: 0; }
.cx-kv div { background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; }
.cx-kv dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.cx-kv dd { margin: 0; font-weight: 600; }
.cx-steps { counter-reset: step; list-style: none; padding: 0; margin: .4em 0 0; }
.cx-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cx-steps li::before { counter-increment: step; content: counter(step); width: 28px; height: 28px; border-radius: 50%; background: var(--fg); color: #fff; font-weight: 700; font-size: .82rem; display: flex; align-items: center; justify-content: center; }
.cx-steps .type { color: var(--accent); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.cx-steps .targets { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .9rem; }
.cx-text { max-width: 76ch; white-space: pre-line; }
.cx-skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: .4em 0 1.6em; padding: 0; list-style: none; }
.cx-skill { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg); text-decoration: none; }
.cx-skill:hover { border-color: var(--accent); text-decoration: none; color: var(--fg); }
.cx-skill .cx-icon { width: 48px; height: 48px; }
.cx-skill strong { display: block; }
.cx-skill span { color: var(--muted); font-size: .82rem; }
.cx-zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: .4em 0 1.6em; padding: 0; list-style: none; }
.cx-zone { display: block; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg); text-decoration: none; }
.cx-zone:hover { border-color: var(--accent); color: var(--fg); text-decoration: none; }
.cx-zone strong { display: block; font-size: 1.02rem; }
.cx-zone span { color: var(--muted); font-size: .84rem; }
.cx-results h2 { margin-top: 1.4em; font-size: 1.05rem; color: var(--fg2); }
.cx-results ul { list-style: none; padding: 0; margin: 0; }
.cx-results li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: baseline; }
.cx-results li .muted { font-size: .84rem; }
.cx-pages { margin-top: 24px; }
.cx-empty { padding: 30px 0; color: var(--muted); }
.cx-maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: .4em 0 1em; }
.cx-maps.single { grid-template-columns: minmax(0, 720px); }
.cx-map { margin: 0; background: #0b0d14; border: 1px solid #2b2f38; border-radius: var(--radius); overflow: hidden; }
.cx-map svg { display: block; width: 100%; height: auto; }
.cx-map .pt { fill: #ff8c1a; fill-opacity: .85; stroke: #fff; stroke-width: 2; }
.cx-map .pt-2 { fill: #39b7e8; } .cx-map .pt-3 { fill: #ff3d5a; }
.cx-map a:hover .pt { fill: #fff; stroke: #ff8c1a; }
.cx-map .tgt { fill: #ff8c1a; fill-opacity: .65; }
.cx-map .area { fill: rgba(255, 140, 26, .16); stroke: #ffb067; stroke-width: 3; }
.cx-map .area-n { fill: #fff; font-weight: 700; font-family: var(--font); text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.75); stroke-width: 6px; pointer-events: none; }
.cx-map .npc { fill: #3ddc84; stroke: #fff; stroke-width: 2; }
.cx-map .npc-turnin { fill: #39b7e8; }
.cx-map a:hover .npc { fill: #fff; }
.cx-map figcaption { padding: 7px 10px; font-size: .82rem; color: #bdbdbd; background: #171a1f; }
.cx-map figcaption a { color: #fff; }
.cx-log { background: var(--dark2); color: #d6d6d6; font-family: var(--mono); font-size: .8rem; padding: 12px 14px; border-radius: 4px; white-space: pre-wrap; max-height: 260px; overflow: auto; }
.table .cx-link .cx-icon { margin: -6px 0; }
@media (max-width: 1000px) {
  .cx-detail { grid-template-columns: 1fr; }
  .cx-tip { position: static; }
}

/* ---- responsive -------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-card.featured { grid-column: span 2; grid-row: auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .class-row { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .class-chip img { height: 130px; }
  .status-grid { grid-template-columns: repeat(3, 1fr); }
  .page-body, .page-body.side-right { grid-template-columns: 1fr; gap: 20px; }
  .page-side { position: static; }
  .subnav, .toc { flex-direction: row; flex-wrap: wrap; display: flex; }
  .subnav a, .toc a { border-bottom: 0; }
  .class-card { grid-template-columns: 1fr; }
  .class-card-body { padding: 0 20px 20px; }
  .class-card-art img { max-height: 260px; }
  .header-cta { min-width: 170px; padding: 0 16px; }
  .header-cta strong { font-size: 1.25rem; }
}
@media (max-width: 760px) {
  .header-inner { gap: 12px; width: 100%; padding: 0 12px; }
  .brand-name { display: none; }
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 16px; background: var(--dark2); border-bottom: 1px solid var(--dark-line); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
  .main-nav.open { display: flex; }
  .main-nav > a::after, .dropdown-toggle::after { display: none; }
  .dropdown-menu { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 16px; background: none; }
  .nav-spacer { display: none; }
  .header-cta { min-width: 0; padding: 0 14px; }
  .header-cta span { display: none; }
  .news-grid, .news-grid.compact, .feature-grid, .faction-pair { grid-template-columns: 1fr; }
  .class-row { grid-template-columns: repeat(2, 1fr); }
  .news-row { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-home { min-height: 66vh; }
  .footer-inner { flex-direction: column; }
  .char-grid { grid-template-columns: 1fr; }
}

/* ---- account stage: the CBT application panel (sky, drifting clouds, grey box, gear steps) --- */
.reg-stage { position: relative; overflow: hidden; padding: 56px 0 64px; background: #fff url(/static/img/reg/bg-sky.jpg) center top / cover no-repeat; }
.reg-clouds { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; background: url(/static/img/reg/bg-clouds.png) 0 100% repeat-x; background-size: 50% auto; animation: regClouds 140s linear infinite; pointer-events: none; }
@keyframes regClouds { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.reg-wrap { position: relative; width: min(966px, 100% - 32px); margin: 0 auto; }
.reg-heading { text-align: center; margin-bottom: 28px; }
.reg-heading .reg-sub { display: inline-block; position: relative; padding: 0 70px 11px; font-family: Georgia, "Noto Serif", "Times New Roman", serif; color: #2f5f78; font-size: 1.25rem; letter-spacing: .01em; }
.reg-heading .reg-sub::after { content: ""; position: absolute; left: -40px; right: -40px; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, #7fa6b8 18%, #2f5f78 50%, #7fa6b8 82%, transparent); }
.reg-heading h1 { margin: 12px 0 10px; font-family: Georgia, "Noto Serif", "Times New Roman", serif; font-weight: 400; font-size: clamp(2.2rem, 5.6vw, 3.9rem); letter-spacing: .02em; color: #1e1e1e; }
.reg-heading .reg-meta { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; color: #2b2b2b; font-size: 1.02rem; }
.reg-heading .reg-meta span { padding: 0 18px; border-left: 1px solid #c9c9c9; }
.reg-heading .reg-meta span:first-child { border-left: 0; }
.reg-heading .reg-meta b { font-weight: 400; color: #7d7d7d; margin-right: 8px; }
.reg-title img { display: block; width: min(794px, 100%); height: auto; margin: 0 auto; }
.reg-box { position: relative; width: min(790px, 100%); margin: 0 auto; padding: 30px 75px 36px; border: 1px solid #d0d0d0; background: linear-gradient(#f1f1f1, #e2e2e2); box-shadow: 0 12px 34px rgba(0,0,0,.10); }
.reg-steps { position: relative; display: flex; align-items: flex-start; margin: 0 0 28px; padding: 0; list-style: none; }
.reg-steps::before { content: ""; position: absolute; left: 118px; right: 0; top: 23px; height: 1px; background: #a5a5a5; }
.reg-steps-label { flex: none; width: 118px; height: 46px; display: flex; align-items: center; justify-content: center; border: 1px solid #8a8a8a; border-radius: 23px; background: #ededed; color: #4d4c4c; font-size: 14px; z-index: 1; }
.reg-step { position: relative; flex: 1; padding-top: 50px; text-align: center; color: #5f5f5f; font-size: 13px; line-height: 1.3; }
.reg-step::before { content: ""; position: absolute; left: 50%; top: 4px; width: 38px; height: 38px; margin-left: -19px; background: #e9e9e9 url(/static/img/reg/step-gear.svg) center / 38px 38px no-repeat; border-radius: 50%; }
.reg-field { display: flex; margin-bottom: 8px; }
.reg-field + .reg-field { margin-top: 8px; }
.reg-input { flex: 1; min-width: 0; height: 60px; padding: 0 20px; font: inherit; font-size: 16px; color: var(--petrol); border: 1px solid var(--petrol); background: #fcfcfc; outline: none; }
.reg-input::placeholder { color: var(--petrol); opacity: .75; }
.reg-input:focus { background: #fff; box-shadow: inset 0 0 0 1px var(--petrol); }
.reg-input.is-plain { border-color: #c7c7c7; color: #4d4c4c; }
.reg-input.is-plain::placeholder { color: #8a8a8a; }
.reg-btn { flex: none; height: 60px; min-width: 195px; padding: 0 26px; border: 0; color: #fff; font: inherit; font-size: 17px; letter-spacing: -.01em; cursor: pointer;
  background: linear-gradient(135deg, #1e8aa6, #14647e 60%, #0f5468); transition: background .2s; }
.reg-btn:hover { background: linear-gradient(135deg, #f09a3a, var(--accent) 60%, #c95a0c); }
.reg-btn[disabled] { cursor: default; background: linear-gradient(#c9c9c9, #b5b5b5); }
.reg-agree { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; color: #5f5f5f; font-size: 14px; line-height: 1.5; }
.reg-agree a { color: var(--petrol); text-decoration: underline; }
.reg-check { position: relative; flex: none; display: inline-block; width: 20px; height: 20px; margin-top: 1px; background: url(/static/img/reg/checkbox.png) 0 0 no-repeat; }
.reg-check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: .01; cursor: pointer; }
.reg-check.on, .reg-check:has(input:checked) { background-position: 0 -20px; }
.reg-policy { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.reg-policy a { display: inline-block; padding: 10px 16px; border: 1px solid #8a8a8a; background: #fff; color: #4d4c4c; font-size: 13px; text-decoration: none; transition: background .2s, color .2s; }
.reg-policy a:hover { background: #4d4c4c; color: #fff; }
.reg-info { display: grid; grid-template-columns: repeat(3, 1fr); width: min(790px, 100%); margin: 33px auto 0; border: 1px solid #0f5468; background: #14647e; }
.reg-info > div { padding: 22px 18px; color: #fff; text-align: center; }
.reg-info > div + div { border-left: 1px solid rgba(255,255,255,.18); }
.reg-info strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.reg-info span { font-size: .85rem; color: #cfe6ee; }
.reg-caution { width: min(790px, 100%); margin: 12px auto 0; color: #7d7d7d; font-size: 13px; }
.reg-caution a { color: #7d7d7d; text-decoration: underline; }
.reg-box .alert { margin-bottom: 18px; }
.reg-box .form-links { margin: 18px 0 0; text-align: center; color: #6b6b6b; font-size: .9rem; }

@media (max-width: 1400px) {
  .gnb-item { min-width: 112px; }
  .gnb-link > span { font-size: 16px; }
  .brand { padding: 0 18px; }
  #status-pill { display: none; }
  .header-cta { min-width: 200px; padding: 0 22px; }
}
@media (max-width: 1100px) {
  /* narrow desktops: the bar keeps logo, the items, account links and the start block */
  .gnb-item { min-width: 0; }
  .gnb-link { padding: 0 7px; }
  .gnb-link > span { font-size: 15px; }
  .brand { padding: 0 14px; }
  #status-pill { display: none; }
  .header-account { padding: 0 10px; gap: 8px; }
  .header-account button.link { white-space: nowrap; }
  .header-cta { min-width: 170px; padding: 0 16px; }
  .header-cta strong { font-size: 1.25rem; }
  .reg-box { padding: 24px 28px 30px; }
  .reg-steps-label { width: 96px; }
  .reg-steps::before { left: 96px; }
}
@media (max-width: 1000px) {
  /* hamburger bar: six items, account links and the start block no longer share one row */
  .header-inner { height: var(--header-h); padding: 0 12px; }
  .nav-toggle { display: block; margin-left: auto; margin-right: 10px; }
  .gnb { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--dark2); border-bottom: 1px solid var(--dark-line); box-shadow: 0 10px 30px rgba(0,0,0,.4); padding: 8px 0 12px; }
  .gnb.open { display: flex; }
  .gnb-list { flex-direction: column; margin: 0; }
  .gnb-item { display: block; min-width: 0; }
  .gnb-link { height: auto; margin: 0; padding: 10px 20px; width: auto; text-align: left; overflow: visible; }
  .gnb-link > span { padding: 0; }
  .gnb-link::after, .gnb-gear, .mega-panel { display: none; }
  .snb { position: static; transform: none; width: auto; min-width: 0; opacity: 1; visibility: visible; padding: 0 0 6px 36px; transition: none; }
  .snb a { text-align: left; line-height: 30px; }
  .header-account { margin: 6px 0 0; padding: 8px 20px 0; border-top: 1px solid var(--dark-line); flex-wrap: wrap; }
  .header-cta { min-width: 0; padding: 0 14px; }
  .header-cta span { display: none; }
}
@media (max-width: 760px) {
  .reg-stage { padding: 32px 0 40px; }
  .reg-box { padding: 20px 16px 24px; }
  .reg-steps { flex-wrap: wrap; gap: 8px; }
  .reg-steps::before { display: none; }
  .reg-steps-label { width: 100%; height: 40px; }
  .reg-step { flex: 1 1 40%; }
  .reg-field { flex-direction: column; }
  .reg-btn { min-width: 0; width: 100%; }
  .reg-info { grid-template-columns: 1fr; }
  .reg-info > div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,.18); }
}

/* ---- modal (the 2019 page's policy windows: dark overlay, white box, dark head) ---------- */
.modal { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,.7); }
.modal[hidden] { display: none; }
.modal-box { display: flex; flex-direction: column; width: min(820px, 100%); max-height: min(86vh, 900px); background: #fff; border-radius: 4px; box-shadow: 0 30px 80px rgba(0,0,0,.5); overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; background: var(--dark); color: #fff; }
.modal-head h2 { margin: 0; font-size: 1.15rem; font-weight: 600; letter-spacing: .02em; }
.modal-close { background: none; border: 0; color: #cfcfcf; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal-head .modal-close:hover { color: #fff; }
.modal-body { overflow: auto; padding: 18px 24px; }
.modal-body.prose { max-width: none; font-size: .93rem; }
.modal-body.prose h2:first-child { margin-top: 0; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--bg2); }
.modal-foot .small { margin-right: auto; }
.modal-foot .modal-close { color: var(--fg); font-size: .95rem; }
body.modal-open { overflow: hidden; }
.modal-box--small { width: min(560px, 100%); }
.modal-head--danger { background: #8f2432; }
.modal-box--small .modal-body p:last-child { margin-bottom: 0; }
.modal-foot .btn-danger { background: var(--err); color: #fff; border-color: var(--err); }
.modal-foot .btn-danger:hover { background: #b8303f; border-color: #b8303f; }

/* ---- account deletion (after the original's "withdraw application" page) ------------------ */
.reg-box--danger { border-color: #e2b4ba; background: linear-gradient(#f7f0f0, #ede2e2); }
.reg-btn--danger { background: linear-gradient(135deg, #d9566a, #b8303f 60%, #8f2432); }
.reg-btn--danger:hover { background: linear-gradient(135deg, #e86b7d, #c7394a 60%, #9c2838); }
.delete-list { margin: 0 0 18px; color: #4d4c4c; font-size: .95rem; }
.delete-list ul { margin: 6px 0 10px; padding-left: 1.3em; }
.delete-list li { margin: .25em 0; }
.danger-card { border-color: #e2b4ba; }

/* ---- community boards ------------------------------------------------------------------- */
.breadcrumb.light { color: #cfcfcf; }
.breadcrumb.light a { color: #e6e6e6; }
.board-list .board-title, .thread-list .thread-title { font-weight: 600; color: var(--fg); }
.board-list .board-title:hover, .thread-list .thread-title:hover { color: var(--accent); }
.board-list td, .thread-list td { vertical-align: middle; }
.last-post a { color: var(--fg); }
.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.thread-list tr.pinned td { background: #fdf6ec; }
.thread-list tr.removed td, .table tr.removed td { opacity: .55; }
.tag-removed { background: #fbe3e7; color: #a3263a; }
.tag-gm { background: var(--accent); color: #fff; }
.recent-threads { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.recent-threads li { padding: 10px 4px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.recent-threads li > a { font-weight: 600; color: var(--fg); }
.recent-threads li > a:hover { color: var(--accent); }
.thread-page { max-width: 1000px; }
.thread-head h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.thread-head .tag { vertical-align: middle; }
.mod-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 18px; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; }
.mod-select { padding: 5px 8px; border: 1px solid var(--line2); border-radius: 4px; font: inherit; font-size: .85rem; }
.posts { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.post { display: grid; grid-template-columns: 150px 1fr; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; scroll-margin-top: calc(var(--header-h) + 12px); }
.post-opening { border-color: #cfd8e3; }
.post-gm .post-author { background: #fdf2e6; }
.post-removed { border-style: dashed; }
.post-author { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px; background: var(--bg2); border-right: 1px solid var(--line); text-align: center; word-break: break-word; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--petrol); color: #fff; font-weight: 700; font-size: 1.2rem; }
.post-gm .avatar { background: var(--accent); }
.post-main { padding: 12px 18px 14px; min-width: 0; }
.post-meta { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.post-body { max-width: none; font-size: .98rem; }
.post-body img { max-height: 520px; width: auto; }
.post-removed-note { color: var(--muted); font-style: italic; margin: 0; }
.post-actions { display: flex; gap: 14px; margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: .85rem; }
.post-actions a, .post-actions button.link { color: var(--muted); }
.post-actions a:hover, .post-actions button.link:hover { color: var(--accent); }
.reply-box { margin-top: 28px; padding: 18px 20px 20px; background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; }
.reply-box h2 { font-size: 1.15rem; }
.reply-note { margin-top: 20px; }
.narrow-wide { max-width: 860px; }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--err); color: #fff; font-size: .72rem; font-weight: 700; text-align: center; line-height: 18px; }
.board-form { padding: 12px 14px; margin-bottom: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; }
.form-inline-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.reports .teaser { max-width: 46ch; }
@media (max-width: 760px) {
  .post { grid-template-columns: 1fr; }
  .post-author { flex-direction: row; justify-content: flex-start; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .avatar { width: 32px; height: 32px; font-size: 1rem; }
  .board-toolbar { flex-direction: column; align-items: flex-start; }
  .thread-list th:nth-child(4), .thread-list td:nth-child(4), .board-list th:nth-child(3), .board-list td:nth-child(3) { display: none; }
}

/* ---- home stages: the 2019 teaser's one-page scroller (full-height stations, key art in layers
   that slides in when a station enters, parallax on the way through, scroll cue under the hero,
   side dots). Native scrolling, one page per step: the hero, each station and the rest of the page
   are mandatory snap points (the rest is taller than the viewport, so it scrolls freely inside) —
   no wheel hijack. `--p` is set by site.js: -1 = station entering from below, 0 = centred,
   1 = leaving at the top. ----------------------------------------------------------------------- */
html { scroll-snap-type: y mandatory; scroll-padding-top: var(--header-h); }
.home-stages .hero-home { min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); scroll-snap-align: start; }
.home-stages .after-stages { scroll-snap-align: start; }
.maintenance-note { display: inline-block; margin: 0 0 6px; padding: 4px 10px; border-radius: 4px; background: rgba(228,118,28,.25); border: 1px solid rgba(245,178,107,.6); color: #ffd7b0; font-size: .9rem; }
.scroll-cue { position: absolute; left: 50%; bottom: 20px; z-index: 3; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; opacity: .85; text-decoration: none; }
.scroll-cue:hover { opacity: 1; color: #fff; text-decoration: none; }
.scroll-cue-mouse { display: block; position: relative; width: 22px; height: 34px; border: 2px solid rgba(255,255,255,.85); border-radius: 12px; }
.scroll-cue-mouse i { position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: cueWheel 1.6s ease-in-out infinite; }
.scroll-cue-arrows b { display: block; width: 10px; height: 10px; margin: -5px auto 0; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); opacity: 0; animation: cueArrow 1.6s ease-in-out infinite; }
.scroll-cue-arrows b + b { animation-delay: .25s; }
@keyframes cueWheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
@keyframes cueArrow { 0% { opacity: 0; transform: rotate(45deg) translate(-4px, -4px); } 50% { opacity: 1; } 100% { opacity: 0; transform: rotate(45deg) translate(4px, 4px); } }

.stages { position: relative; background: var(--dark); color: #fff; }
.stage { --p: 0; position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); scroll-snap-align: start; }
.stage-bg { position: absolute; inset: -8% 0; z-index: 0; background: var(--dark) center / cover no-repeat;
  transform: translate3d(0, calc(var(--p) * 40px), 0) scale(1.08); will-change: transform; }
.stage-layer { position: absolute; z-index: 2; pointer-events: none; will-change: transform;
  transform: translate3d(calc(var(--p) * var(--dx, 0) * 1px), calc(var(--p) * var(--dy, 0) * 1px), 0); }
.stage-layer img { max-width: none; transition: opacity .9s ease, transform 1.2s cubic-bezier(.19, 1, .22, 1); }
.stage-inner { position: relative; z-index: 4; width: min(1200px, 100% - 32px); margin: 0 auto; padding: 48px 0; }
.stage-head { text-align: center; margin-bottom: 24px; }
.stage-rule { display: block; position: relative; width: 220px; height: 30px; margin: 0 auto; overflow: hidden; }
.stage-rule::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: currentColor; transition: width .9s ease .1s; }
.stage-gear { position: absolute; left: 50%; bottom: 0; width: 59px; height: 29px; margin-left: -29.5px; background: url(../img/stage-gear.png) no-repeat;
  transform: translateY(120%); transition: transform .8s cubic-bezier(.19, 1, .22, 1) .5s; }
.stage-head-dark .stage-gear { filter: invert(1) brightness(.25); }
.stage-head h2 { margin: 14px 0 4px; font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: 0; transform: translateY(-16px); transition: opacity .7s .55s, transform .7s .55s; }
.stage-kicker { margin: 0; color: #f5b26b; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: 0; transition: opacity .7s .8s; }
.stage-head-dark .stage-kicker { color: var(--accent); }
.stage-more { display: inline-block; margin-top: 10px; color: inherit; font-size: .88rem; opacity: 0; transition: opacity .7s 1s; }
.stage-more:hover { color: #fff; }
.stage-text { max-width: 560px; margin: 0 auto; font-size: 1.02rem; line-height: 1.65; color: #ececec; text-align: center; text-shadow: 0 1px 14px rgba(0,0,0,.7);
  opacity: 0; transform: translateY(26px); transition: opacity .8s .9s, transform .8s .9s; }
.stage-text .hero-actions { justify-content: center; margin-top: 18px; }
.stage.is-in .stage-rule::after { width: 100%; }
.stage.is-in .stage-gear { transform: translateY(0); }
.stage.is-in .stage-head h2, .stage.is-in .stage-kicker, .stage.is-in .stage-more, .stage.is-in .stage-text { opacity: 1; transform: none; }

/* world: airship drifting at the top right, the hooded explorer at the left, grass across the foot */
.layer-ship { top: 7%; right: 9%; width: min(325px, 24vw); }
.layer-ship img { width: 100%; opacity: 0; transform: translate(160px, -70px) rotate(5deg); }
.layer-char { left: 5%; bottom: -2%; height: min(758px, 76vh); }
.layer-char img { height: 100%; opacity: 0; transform: translateY(90px); }
.layer-grass { left: -40px; bottom: -8px; z-index: 3; width: min(1043px, 82vw); }
.layer-grass img { width: 100%; opacity: 0; transform: translateY(140px); }
.stage.is-in .stage-layer img { opacity: 1; transform: none; }
.stage-world .stage-text { margin: 0 6% 0 auto; text-align: left; }
.stage-world .stage-text .hero-actions { justify-content: flex-start; }

/* classes: fog tile drifting behind the five figures, dust in the air, fog bank in front of their feet */
.stage-fog { position: absolute; left: 0; bottom: 0; z-index: 1; pointer-events: none; }
.stage-fog-back { top: 0; width: 200%; opacity: .8; background: url(../img/stage-fog-tile.png) repeat-x 0 100% / 50% 100%; animation: fogDrift 90s linear infinite; }
.stage-fog-front { right: 0; z-index: 4; height: 46%; background: url(../img/stage-fog-front.png) repeat-x 0 100% / 100% auto; }
.stage-dust { position: absolute; inset: 0 -100px; z-index: 2; pointer-events: none; background: no-repeat 0 100% / auto 100%; }
.stage-dust-1 { background-image: url(../img/dust-1.png); animation: bgDust 4s ease-in-out infinite alternate-reverse; }
.stage-dust-2 { background-image: url(../img/dust-2.png); animation: bgDust 8s ease-in-out infinite alternate; }
@keyframes fogDrift { to { transform: translateX(-50%); } }
@keyframes bgDust { 0% { opacity: 1; transform: translateX(100px); } 50% { opacity: .5; } 100% { opacity: 1; transform: translateX(-100px); } }
.stage-classes { justify-content: flex-start; }
.stage-classes .stage-inner { padding-bottom: 0; }
.stage-cast { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 56%; margin: 0; padding: 0; list-style: none; display: flex; justify-content: center; align-items: flex-end; }
.stage-cast li { position: relative; flex: 0 0 17%; height: 100%; display: flex; justify-content: center; align-items: flex-end; opacity: 0; transform: translateY(100px);
  transition: opacity .9s, transform 1.1s cubic-bezier(.19, 1, .22, 1); transition-delay: calc(.35s + var(--i) * .13s); }
.stage-cast li:nth-child(1), .stage-cast li:nth-child(5) { z-index: 1; }
.stage-cast li:nth-child(2), .stage-cast li:nth-child(4) { z-index: 2; }
.stage-cast li:nth-child(3) { z-index: 3; }
.stage-cast li:hover { z-index: 5; }
.stage.is-in .stage-cast li { opacity: 1; transform: none; }
.stage-cast a { display: flex; justify-content: center; align-items: flex-end; position: relative; width: 100%; height: 100%; color: #fff; text-decoration: none; }   /* the figure is wider than its slot: centre it, let it overlap */
.stage-cast img { height: min(100%, 27vw); width: auto; max-width: none; filter: drop-shadow(0 24px 30px rgba(0,0,0,.65)); transition: transform .4s; }   /* five figures ≈ the viewport width */
.stage-cast a:hover img { transform: translateY(-12px) scale(1.03); }
.cast-name { position: absolute; left: 50%; bottom: 54%; z-index: 5; transform: translateX(-50%); white-space: nowrap; text-align: center; font-size: .9rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-shadow: 0 2px 12px rgba(0,0,0,.9); opacity: 0; transition: opacity .25s; }
.cast-name small { display: block; color: #f5b26b; font-size: .68rem; letter-spacing: .06em; text-transform: none; }
.stage-cast a:hover .cast-name, .stage-cast li.active .cast-name { opacity: 1; }
.stage-cast li.active img { transform: translateY(-12px) scale(1.03); }
/* the class panel (after the 2019 class page): a dark card beside the clicked figure, a notch pointing at it */
.cast-info { position: absolute; z-index: 6; width: 340px; padding: 18px 20px 20px; border-radius: var(--radius); background: rgba(18,18,22,.9); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 20px 50px rgba(0,0,0,.6); backdrop-filter: blur(6px); color: #ececec; animation: castIn .25s ease-out; }
.cast-info::before { content: ""; position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: inherit; border: inherit; border-width: 1px 0 0 1px; transform: rotate(-45deg); }
.cast-info--right::before { left: -7px; }
.cast-info--left::before { right: -7px; transform: rotate(135deg); }
.cast-info h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; padding-right: 26px; font-size: 1.3rem; letter-spacing: .08em; text-transform: uppercase; }
.cast-info h3 small { color: #f5b26b; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: none; }
.cast-info .cast-tagline { margin: 0 0 8px; color: #f5b26b; font-style: italic; font-size: .92rem; }
.cast-info p { margin: 0 0 10px; font-size: .9rem; line-height: 1.55; color: #d9d9d9; }
.cast-info .stat-bars { margin: 6px 0 14px; max-width: none; }
.cast-info .stat-bars dt { color: #bdbdbd; }
.cast-info .bar { background: rgba(255,255,255,.14); }
.cast-info .bar-v { color: #bdbdbd; }
.cast-close { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: #bdbdbd; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.cast-close:hover { background: rgba(255,255,255,.12); color: #fff; }
@keyframes castIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* factions: the two camps slide in from their side (the service site's worldEnterVulpin / Ontari) */
.stage-camps { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; max-width: 1080px; margin: 0 auto; }
.camp { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 28px 26px; border-radius: var(--radius); text-align: center; color: #fff; text-decoration: none;
  background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(4px); opacity: 0;
  transition: opacity .9s .45s, transform 1.1s cubic-bezier(.19, 1, .22, 1) .45s, border-color .2s; }
.camp-vulpin { transform: translateX(-360px); }
.camp-ontari { transform: translateX(360px); }
.stage.is-in .camp { opacity: 1; transform: none; }
.camp:hover { border-color: var(--accent); color: #fff; text-decoration: none; }
.camp img { height: 84px; width: auto; }
.camp strong { font-size: 1.6rem; letter-spacing: .16em; text-transform: uppercase; }
.camp em { font-style: normal; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #9fc3ff; }
.camp-ontari em { color: #ff9c9c; }
.camp p { margin: 8px 0 0; color: #dcdcdc; font-size: .95rem; line-height: 1.55; }

/* media: a grid of scenes on the bright, wintry key art (the first six gallery items); every tile
   opens the lightbox. The same grid serves /gallery. */
.stage-media { color: #1f1f28; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stage-media .media-grid { position: relative; z-index: 3; width: min(1100px, 100% - 32px); margin: 0 auto 40px; }
.media-tile { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #222; box-shadow: 0 14px 34px rgba(20,30,50,.25); color: #fff; text-decoration: none; }
.media-tile:hover { color: #fff; text-decoration: none; }
.media-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.media-tile:hover img { transform: scale(1.05); }
.media-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-weight: 600; font-size: .92rem; }
.media-play { position: absolute; top: 50%; left: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; padding-left: 4px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: transform .3s, background .3s; }
.media-tile:hover .media-play { transform: scale(1.1); background: var(--accent); }
.stage .media-tile { opacity: 0; transform: scale(.8); transition: opacity .7s, transform .9s cubic-bezier(.19, 1, .22, 1); transition-delay: calc(.25s + var(--i) * .1s); }
.stage.is-in .media-tile { opacity: 1; transform: none; }
.media-thumb { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; background: #222; }
.media-item .form-inline-actions { margin-top: -4px; }

/* lightbox: dark overlay, the picture or the video, caption, arrows */
.lightbox { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px 76px; background: rgba(8,8,10,.93); color: #fff; animation: castIn .2s ease-out; }
.lightbox-figure { margin: 0; max-width: min(1280px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox-stage { display: flex; align-items: center; justify-content: center; max-width: 100%; }
.lightbox-stage img, .lightbox-stage video { display: block; max-width: 100%; max-height: calc(100vh - 150px); width: auto; height: auto; border-radius: 4px; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.8); }
.lightbox-stage video { width: min(1280px, 100%); aspect-ratio: 16 / 9; }
.lightbox figcaption { text-align: center; max-width: 72ch; }
.lightbox-title { display: block; font-size: 1.05rem; }
.lightbox-caption { display: block; color: #bdbdbd; font-size: .92rem; }
.lightbox-link { display: inline-block; margin-top: 6px; color: #f5b26b; font-size: .9rem; }
.lightbox-link:hover { color: #fff; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; z-index: 1; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; transition: background .2s; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--accent); }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev { left: 14px; top: 50%; margin-top: -24px; }
.lightbox-next { right: 14px; top: 50%; margin-top: -24px; }
.lightbox[hidden], .lightbox-link[hidden] { display: none; }   /* display:flex / inline-block would beat the attribute */
body.lightbox-open { overflow: hidden; }

/* side dots (the teaser's lnb): shown while a station is on screen, dark on the bright station */
.stage-nav { position: fixed; right: 26px; top: 50%; z-index: 40; transform: translateY(-50%); display: flex; flex-direction: column; gap: 16px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.stage-nav.on { opacity: 1; pointer-events: auto; }
.stage-nav a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: rgba(255,255,255,.6); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.stage-nav a::after { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); transition: background .2s, transform .2s; }
.stage-nav a span { padding: 2px 9px; border-radius: 999px; background: rgba(0,0,0,.4); opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; }
.stage-nav.dark a span { background: rgba(255,255,255,.7); }
.stage-nav a:hover, .stage-nav a.on { color: #fff; text-decoration: none; }
.stage-nav a:hover span, .stage-nav a.on span { opacity: 1; transform: none; }
.stage-nav a.on::after { background: #fff; transform: scale(1.25); }
.stage-nav.dark a { color: rgba(31,31,40,.6); }
.stage-nav.dark a::after { border-color: rgba(31,31,40,.7); }
.stage-nav.dark a:hover, .stage-nav.dark a.on { color: #1f1f28; }
.stage-nav.dark a.on::after { background: #1f1f28; }

@media (max-width: 1000px) {
  .layer-char { height: min(520px, 60vh); left: 2%; }
  .layer-ship { width: 200px; right: 4%; }
  .stage-world .stage-text { margin: 0 4% 0 34%; }
  .stage-cast li { flex-basis: 19%; }
  .stage-nav { right: 12px; }
  .media-grid { gap: 12px; }
}
@media (max-width: 760px) {
  html { scroll-snap-type: none; }
  .stage { min-height: 0; padding: 0; }
  .stage-bg { transform: none; }
  .stage-layer, .stage-nav, .scroll-cue, .stage-dust { display: none; }
  .stage-inner { padding: 40px 0 28px; }
  .stage-world .stage-text { margin: 0; text-align: center; }
  .stage-world .stage-text .hero-actions { justify-content: center; }
  .stage-cast { position: static; height: auto; flex-wrap: wrap; gap: 6px; padding: 0 8px 20px; }
  .stage-cast li { flex: 0 0 30%; height: 200px; }
  .stage-cast img { height: 100%; }
  .cast-info { position: fixed; left: 12px !important; right: 12px; top: auto !important; bottom: 12px; width: auto; max-height: 70vh; overflow: auto; z-index: 60; }
  .cast-info::before { display: none; }
  .stage-fog-front { display: none; }
  .stage-camps { grid-template-columns: 1fr; gap: 14px; }
  .camp-vulpin, .camp-ontari { transform: translateY(30px); }
  .media-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stage-media .media-grid { margin-bottom: 24px; }
  .media-cap { padding: 18px 8px 6px; font-size: .8rem; }
  .media-play { width: 40px; height: 40px; margin: -20px 0 0 -20px; font-size: .9rem; }
  .lightbox { padding: 64px 6px 12px; }
  .lightbox-prev { left: 2px; } .lightbox-next { right: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; }
  .stage *, .scroll-cue * { animation: none !important; transition: none !important; }
  .stage-bg, .stage-layer { transform: none !important; }
  .stage-layer img, .stage-cast li, .camp, .media-tile, .stage-text, .stage-head h2, .stage-kicker, .stage-more { opacity: 1 !important; transform: none !important; }
  .stage-rule::after { width: 100%; }
  .stage-gear { transform: none; }
}
