/* KRONHOLD site. One dark world: stone and soot, parchment and ink, gold leaf and dried blood.
   Tokens and components: see DESIGN.md. Painted art goes into /site/assets/art/ under fixed names;
   every placement already carries a painted CSS stand-in under it, so a picture lands without edits. */
:root {
  color-scheme: dark;
  --void: #060507; --soot: #0b090a; --soot-2: #131012; --soot-3: #1b1716; --stone: #24201d; --stone-2: #2f2a25;
  --gold: #c9a35b; --gold-hi: #f2d99b; --gold-lo: #7c5f2e; --gold-deep: #4a3618;
  --crimson: #8c1c1a; --crimson-hi: #c8382b; --crimson-deep: #3e0a0a;
  --ember: #e86d2a; --arcane: #7fa8d8;
  --text: #ebdfc5; --muted: #ab9d83; --faint: #7f735f;
  --blood: #e0604a; --grey-name: #a9a59c; --good: #9cc46a;
  --paper-1: #ead9b3; --paper-2: #cbb487; --ink: #2a1c0f;
  --display: 'Cormorant SC', 'Cormorant Garamond', Georgia, serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --body: 'Alegreya Sans', 'Trebuchet MS', sans-serif;
  --voice: 'Cormorant Garamond', Georgia, serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1240px; --gut: 24px;
  --section: clamp(80px, 11vw, 160px);
  --hair: rgba(201, 163, 91, .28);
  --glow: 0 0 24px rgba(232, 109, 42, .35);
  --shadow: 0 18px 40px rgba(0, 0, 0, .65), 0 2px 4px rgba(0, 0, 0, .5);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  /* a gilt corner flourish; ::before/::after of .frame put four of them on a box */
  --flourish: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fbe7b0'/%3E%3Cstop offset='.45' stop-color='%23c9a35b'/%3E%3Cstop offset='1' stop-color='%235c4520'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='none' stroke='url(%23g)' stroke-linecap='round'%3E%3Cpath d='M3 61V14Q3 3 14 3h47' stroke-width='2.2'/%3E%3Cpath d='M9 61V19q0-10 10-10h42' stroke-width='.9' opacity='.7'/%3E%3Cpath d='M15 30q0-15 15-15M3 34q8 0 10-8M34 3q0 8-8 10' stroke-width='1.3'/%3E%3C/g%3E%3Cpath d='M14 14l6-2-2 6z' fill='url(%23g)'/%3E%3Ccircle cx='14' cy='14' r='2.4' fill='%23c8382b' stroke='%23f2d99b' stroke-width='.8'/%3E%3C/svg%3E");
  --diamond: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cg fill='none' stroke='%23c9a35b'%3E%3Cpath d='M60 2l10 10-10 10-10-10z' stroke-width='1.4'/%3E%3Cpath d='M60 7l5 5-5 5-5-5z' fill='%238c1c1a' stroke-width='1'/%3E%3Cpath d='M2 12h40M78 12h40' stroke-width='1'/%3E%3Cpath d='M40 12q6-6 10 0q-4 6-10 0M80 12q-6-6-10 0q4 6 10 0' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E");
}
@media (max-width: 640px) { :root { --gut: 16px; } }

/* page turns: the old page sinks into the dark, the new one rises (browsers with cross-document view transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .35s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .55s var(--ease) both; }
::view-transition-group(head) { animation: none; }
@keyframes vt-out { to { opacity: 0; filter: brightness(.4) blur(2px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); filter: brightness(.5); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--void); scrollbar-color: var(--gold-lo) #0d0a08; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { overflow-x: clip; }
body { margin: 0; min-height: 100dvh; color: var(--text); font: 400 1.0625rem/1.65 var(--body);
  background: radial-gradient(120% 60% at 50% -10%, rgba(29, 23, 21, .6) 0, transparent 60%), linear-gradient(rgba(9, 7, 8, .82), rgba(9, 7, 8, .82)), url(/site/assets/art/bg_stone.jpg) center top / 768px repeat, var(--soot); }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; background: var(--grain); opacity: .35; mix-blend-mode: overlay; }
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 3; /* the vignette: the screen's edges fall into the dark */
  background: radial-gradient(130% 100% at 50% 40%, transparent 55%, rgba(0, 0, 0, .55) 100%); }
::selection { background: rgba(200, 56, 43, .45); color: #fff3dc; }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color .2s; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: .03em; line-height: 1.08; margin: 0; text-wrap: balance; color: #f5e6c2; }
h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); text-shadow: 0 2px 0 #000, 0 0 40px rgba(232, 109, 42, .18); }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); text-shadow: 0 2px 0 #000; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
.prose { max-width: 66ch; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.voice { font-family: var(--voice); font-style: italic; font-size: 1.18em; }
.gold { color: var(--gold-hi); }
.sr, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 12px 16px; background: var(--gold); color: #1a1206; font-weight: 700; border-radius: 4px; transition: top .2s; }
.skip:focus { top: 12px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0d0a08; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--gold-lo), var(--gold-deep)); border-radius: 5px; border: 2px solid #0d0a08; }
main, .site-head, .site-foot { position: relative; z-index: 4; }

/* ---- the Maw below: a fixed glow + one canvas of ash and sparks (site.js) ---- */
.maw { position: fixed; inset: auto 0 0 0; height: 50vh; pointer-events: none; z-index: 1;
  background: radial-gradient(110% 85% at 50% 125%, rgba(232, 109, 42, .2), rgba(140, 28, 26, .1) 45%, transparent 72%); }
#ash { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

/* ---- ornament: the gilt rule with a blood-red jewel ---- */
.orn { display: block; width: min(260px, 70%); height: 24px; margin: 18px auto; background: var(--diamond) center / contain no-repeat; opacity: .95; }
.orn.l { margin-left: 0; }
.kicker { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 14px; font: 600 .82rem/1 var(--display); letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.kicker::before, .kicker::after { content: ''; width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.kicker::after { transform: scaleX(-1); }
.sec-head { text-align: center; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head p { max-width: 62ch; margin: 0 auto; color: var(--muted); font-size: 1.1rem; }

/* ---- frames: a gilt hairline box with four flourished corners (BG3's illuminated panels) ---- */
.frame { position: relative; border: 1px solid var(--hair); box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .35), inset 0 0 0 5px rgba(201, 163, 91, .12), var(--shadow); }
/* the four corners are spans site.js puts in every .frame (pseudo-elements stay free for the boxes' own use) */
.frame > .fc { position: absolute; width: 46px; height: 46px; pointer-events: none; z-index: 4; background: var(--flourish) center / contain no-repeat; }
.frame > .fc.tl { top: -7px; left: -7px; }
.frame.sm > .fc { width: 30px; height: 30px; }
.frame > .fc.tr { top: -7px; right: -7px; transform: scaleX(-1); }
.frame > .fc.bl { bottom: -7px; left: -7px; transform: scaleY(-1); }
.frame > .fc.br { bottom: -7px; right: -7px; transform: scale(-1); }
/* panels: soot leather under the frame */
.panel { position: relative; border-radius: 3px; color: var(--text); padding: clamp(22px, 3vw, 36px);
  background: var(--grain), radial-gradient(ellipse at 50% 0%, rgba(201, 163, 91, .09), transparent 60%), linear-gradient(180deg, #1c1714, #110e0d); }
.panel.cornered { /* the old name: same frame */ }

/* ---- buttons: the blood seal (primary) and the gilt ghost (secondary) ---- */
.btn { --h: 50px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: var(--h); padding: 0 1.8em;
  border: 0; border-radius: 2px; font: 700 1.02rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; isolation: isolate; overflow: hidden;
  transition: filter .3s var(--ease), box-shadow .3s var(--ease), transform .12s, color .2s; }
.btn:active { transform: translateY(1px); }
.btn::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; /* a sheen passing over the metal on hover */
  background: linear-gradient(105deg, transparent 35%, rgba(255, 240, 200, .28) 50%, transparent 65%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn:hover::after { transform: translateX(120%); }
.btn-blood, .btn-bronze { color: #fff1d6; text-shadow: 0 1px 0 #000;
  background: radial-gradient(120% 120% at 50% 0%, rgba(255, 170, 130, .28), transparent 55%), linear-gradient(180deg, #a3271f, #6e1412 55%, #4a0b0b);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo), 0 0 0 3px #000, inset 0 1px 0 rgba(255, 210, 170, .4), inset 0 -2px 0 rgba(0, 0, 0, .45), 0 8px 22px rgba(0, 0, 0, .6); }
.btn-blood:hover, .btn-bronze:hover { color: #fff; filter: brightness(1.15);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-hi), 0 0 0 3px #000, inset 0 1px 0 rgba(255, 210, 170, .5), 0 0 28px rgba(200, 56, 43, .55), 0 8px 22px rgba(0, 0, 0, .6); }
.btn-gold { color: #241703; text-shadow: 0 1px 0 rgba(255, 240, 200, .5);
  background: linear-gradient(180deg, #f6dd9f, #c9a35b 50%, #8a6a30); box-shadow: 0 0 0 1px #000, inset 0 1px 0 #fff3cf, 0 8px 22px rgba(0, 0, 0, .6); }
.btn-gold:hover { filter: brightness(1.1); box-shadow: 0 0 0 1px #000, inset 0 1px 0 #fff3cf, 0 0 26px rgba(242, 217, 155, .45); }
.btn-ghost, .btn-iron { color: var(--gold-hi); background: linear-gradient(180deg, rgba(36, 30, 26, .85), rgba(14, 11, 10, .9));
  box-shadow: 0 0 0 1px var(--gold-lo), inset 0 0 0 1px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 220, 150, .12), 0 6px 16px rgba(0, 0, 0, .5); }
.btn-ghost:hover, .btn-iron:hover { color: #fff3cc; box-shadow: 0 0 0 1px var(--gold-hi), inset 0 0 0 1px rgba(0, 0, 0, .6), 0 0 22px rgba(201, 163, 91, .3), 0 6px 16px rgba(0, 0, 0, .5); }
.btn-big { --h: 62px; font-size: 1.18rem; padding: 0 2.4em; }
.btn-sm { --h: 38px; font-size: .8rem; padding: 0 1.2em; }
.btn[disabled], .btn[aria-busy="true"] { filter: grayscale(.7) brightness(.7); cursor: wait; }

/* ---- header ---- */
.site-head { position: sticky; top: 0; z-index: 50; view-transition-name: head; transition: background .4s, box-shadow .4s, backdrop-filter .4s; }
.site-head.solid, .site-head:not(.over) { background: linear-gradient(180deg, rgba(8, 6, 7, .96), rgba(10, 8, 8, .88)); backdrop-filter: blur(8px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(201, 163, 91, .25), 0 12px 30px rgba(0, 0, 0, .55); }
.site-head .wrap { display: flex; align-items: center; gap: 26px; height: 72px; }
.brand { position: relative; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gold-hi); flex: none; }
.brand img { width: 128px; height: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .8)); transition: filter .4s; }
.brand:hover img { filter: drop-shadow(0 0 12px rgba(242, 217, 155, .45)) drop-shadow(0 2px 6px rgba(0, 0, 0, .8)); }
.nav { display: flex; gap: 2px; margin-right: auto; }
.nav a { position: relative; padding: 12px 13px; color: #d8c7a2; text-decoration: none; font: 600 1.08rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.nav a::after { content: ''; position: absolute; left: 50%; right: 50%; bottom: 3px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-hi), transparent); transition: left .35s var(--ease), right .35s var(--ease); }
.nav a:hover { color: var(--gold-hi); text-shadow: 0 0 14px rgba(242, 217, 155, .45); }
.nav a:hover::after, .nav a[aria-current="page"]::after { left: 10px; right: 10px; }
.nav a[aria-current="page"] { color: var(--gold-hi); }
.nav a.shop-link { color: #f0b9a0; }
.nav .nav-only-m { display: none; }
.head-acts { display: flex; align-items: center; gap: 14px; }
.purse { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; color: var(--gold-hi); text-decoration: none; font: 600 1rem/1 var(--display); letter-spacing: .06em;
  box-shadow: 0 0 0 1px var(--gold-deep); background: rgba(0, 0, 0, .35); border-radius: 2px; }
.purse:hover { box-shadow: 0 0 0 1px var(--gold); }
.shard { display: inline-block; width: 12px; height: 16px; flex: none; clip-path: polygon(50% 0, 100% 38%, 72% 100%, 28% 100%, 0 38%);
  background: linear-gradient(160deg, #ffe7a8, #d0a14a 45%, #8c1c1a); filter: drop-shadow(0 0 4px rgba(242, 217, 155, .6)); }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 2px; background: rgba(10, 8, 8, .8); box-shadow: 0 0 0 1px var(--gold-lo); }
.menu-btn i, .menu-btn i::before, .menu-btn i::after { display: block; width: 20px; height: 2px; margin: auto; background: var(--gold-hi); position: relative; transition: transform .25s var(--ease); }
.menu-btn i::before, .menu-btn i::after { content: ''; position: absolute; left: 0; }
.menu-btn i::before { top: -6px; } .menu-btn i::after { top: 6px; }
.menu-btn[aria-expanded="true"] i { background: transparent; }
.menu-btn[aria-expanded="true"] i::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 1080px) {
  .site-head .wrap { gap: 12px; height: 62px; }
  .brand img { width: 108px; }
  .menu-btn { display: block; order: 3; }
  .nav { position: fixed; top: 62px; left: 0; right: 0; bottom: 0; flex-direction: column; gap: 0; padding: 12px var(--gut) 32px; overflow-y: auto;
    background: var(--grain), linear-gradient(180deg, rgba(10, 8, 8, .99), rgba(20, 12, 10, .99)); box-shadow: 0 1px 0 rgba(201, 163, 91, .25);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s; }
  .nav.open { visibility: visible; opacity: 1; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
  .nav a { padding: 18px 4px; font-size: 1.3rem; border-bottom: 1px solid rgba(201, 163, 91, .14); }
  .nav a::after { display: none; }
  .nav .nav-only-m { display: block; }
  .head-acts { margin-left: auto; }
  .head-acts .hide-m { display: none; }
}
@media (max-width: 440px) { .head-acts .btn { padding: 0 .9em; letter-spacing: .06em; } .purse { padding: 6px 8px; } }

/* ---- the animated sigil: the logo with a breathing halo and a sheen of gold crossing it ---- */
.sigil { position: relative; display: inline-block; isolation: isolate; }
.sigil img { position: relative; z-index: 1; width: 100%; height: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .8)); }
/* the game's halo picture is a soft white glow of the letters: used as a mask, it glows ember instead of mist */
.sigil .halo { position: absolute; inset: -6% -3%; z-index: 0; background: radial-gradient(closest-side, #ff9a4a, #c8382b 60%, #5a0d0b);
  -webkit-mask: url(/site/assets/brand/logo_halo.png) center / 100% 100% no-repeat; mask: url(/site/assets/brand/logo_halo.png) center / 100% 100% no-repeat;
  mix-blend-mode: screen; opacity: .55; filter: blur(6px); }
.sigil::before { content: ''; position: absolute; inset: -25% -10%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(232, 109, 42, .22), rgba(140, 28, 26, .08) 60%, transparent); }
.sigil .sheen { position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: screen;
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 244, 210, .85) 50%, transparent 60%) -150% 0 / 250% 100% no-repeat; }
@media (prefers-reduced-motion: no-preference) {
  .sigil .halo { animation: breathe 6s ease-in-out infinite; }
  .sigil .sheen { animation: sheen 7s var(--ease) 1.2s infinite; }
  .sigil.enter img { animation: sigil-in 2.2s var(--ease) both; }
}
@keyframes breathe { 50% { opacity: .5; transform: scale(.96); } }
@keyframes sheen { 0% { background-position: 150% 0; } 35%, 100% { background-position: -150% 0; } }
@keyframes sigil-in { from { opacity: 0; transform: scale(1.08); filter: blur(10px) brightness(2); } }

/* ---- footer: the abyss ---- */
.site-foot { margin-top: clamp(40px, 6vw, 90px); padding: clamp(110px, 14vw, 220px) 0 36px; color: var(--muted); font-size: .97rem; isolation: isolate; overflow: hidden;
  background: linear-gradient(180deg, var(--soot) 0%, rgba(11, 9, 10, .55) 35%, rgba(6, 5, 6, .9) 75%, var(--void) 100%),
    url(/site/assets/art/footer.jpg) center top / cover no-repeat,
    radial-gradient(70% 60% at 50% 100%, rgba(232, 109, 42, .25), rgba(140, 28, 26, .12) 50%, transparent 75%), url(/site/assets/wall.webp) center / auto 620px, #120d0b; }
.site-foot p, .site-foot ul, .site-foot h4 { margin: 0; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.foot-brand { display: grid; justify-items: start; gap: 18px; }
.foot-brand .sigil { width: 250px; }
.foot-slogan { font: italic 1.3rem/1.3 var(--voice); color: var(--text); }
.foot-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding-top: 8px; }
.site-foot h4 { font: 700 .9rem/1 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.site-foot ul { list-style: none; padding: 0; display: grid; gap: 11px; }
.site-foot nav a { color: var(--text); text-decoration: none; }
.site-foot nav a:hover { color: var(--gold-hi); }
.foot-online { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.05rem; }
.foot-online b { font: 600 2rem/1 var(--display); color: var(--gold-hi); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #79c35e; flex: none; box-shadow: 0 0 0 0 rgba(121, 195, 94, .6); }
@media (prefers-reduced-motion: no-preference) { .live-dot { animation: ping 2.4s infinite; } }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(121, 195, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(121, 195, 94, 0); } }
.foot-note { margin-top: 8px; color: var(--faint); font-size: .9rem; }
.foot-rule { width: min(360px, 80%); height: 24px; margin: 56px auto 24px; background: var(--diamond) center / contain no-repeat; }
.foot-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 16px 32px; flex-wrap: wrap; font-size: .86rem; color: var(--faint); }
.foot-law { font: italic 1.05rem var(--voice); color: #c2b08b; }
@media (max-width: 960px) { .foot-top { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .foot-nav { grid-template-columns: 1fr 1fr; } .foot-bottom { flex-direction: column; align-items: flex-start; } }

/* ---- page hero band: painted art behind the title, falling into the dark ---- */
.page-hero { position: relative; isolation: isolate; padding: clamp(110px, 15vw, 210px) 0 clamp(40px, 6vw, 80px); overflow: hidden; text-align: center; }
.page-hero .bg { position: absolute; inset: -6% 0 0; z-index: -1; background-size: cover; background-position: center 35%; will-change: transform;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 98%); mask-image: linear-gradient(180deg, #000 45%, transparent 98%); }
.page-hero .bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(45% 40% at 50% 62%, rgba(6, 5, 7, .62), transparent 100%), radial-gradient(80% 90% at 50% 30%, transparent, rgba(6, 5, 7, .75)), linear-gradient(180deg, rgba(6, 5, 7, .5), transparent 40%); }
.page-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); }
.page-hero .lede { margin: 18px auto 0; max-width: 62ch; color: #ead9b4; font: italic 1.35rem/1.45 var(--voice); text-shadow: 0 1px 2px #000, 0 0 18px rgba(0, 0, 0, .9); }
@media (prefers-reduced-motion: no-preference) {
  .page-hero h1 { animation: title-in 1.4s var(--ease) both; }
  .page-hero .lede, .page-hero .orn, .page-hero .kicker { animation: fade-up 1.2s var(--ease) .25s both; }
  .page-hero .bg { animation: kenburns 30s ease-out both; }
}
@keyframes title-in { from { opacity: 0; letter-spacing: .3em; filter: blur(6px); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }
@keyframes kenburns { from { transform: scale(1.12); } }
/* the older band (wiki/rating until rebuilt) */
.page-head { padding: clamp(48px, 8vw, 96px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.page-head .lede { margin-top: 20px; max-width: 60ch; color: #d9c9a4; font-size: 1.15rem; }

/* ---- cards: lift, gilt edge lights up, a glow follows the cursor (--mx/--my set by site.js) ---- */
.card { position: relative; isolation: isolate; border-radius: 3px; overflow: hidden; background: linear-gradient(180deg, #1b1615, #100d0d);
  box-shadow: 0 0 0 1px rgba(201, 163, 91, .22), var(--shadow); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.card::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 217, 155, .14), transparent 45%); }
.card:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px rgba(242, 217, 155, .65), 0 0 40px rgba(201, 163, 91, .18), 0 26px 50px rgba(0, 0, 0, .7); }
.card:hover::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }

/* ---- painted art stand-ins: every art slot draws a scene in gradients under its picture ---- */
.art { background-color: #120e0d; background-size: cover; background-position: center; }
.art-hero { background-image: url(/site/assets/art/hero.jpg), url(/site/assets/hero.webp), radial-gradient(60% 50% at 50% 70%, rgba(232, 109, 42, .4), transparent 70%), linear-gradient(180deg, #1a1420, #0b0909); }
.art-warrior { background-image: url(/site/assets/art/class_warrior.jpg), radial-gradient(70% 50% at 50% 30%, rgba(200, 56, 43, .45), transparent 70%), linear-gradient(180deg, #2a1414, #0d0909); }
.art-archer { background-image: url(/site/assets/art/class_archer.jpg), radial-gradient(70% 50% at 50% 30%, rgba(120, 150, 80, .4), transparent 70%), linear-gradient(180deg, #18200f, #0b0c08); }
.art-mage { background-image: url(/site/assets/art/class_mage.jpg), radial-gradient(70% 50% at 50% 30%, rgba(110, 140, 220, .45), transparent 70%), linear-gradient(180deg, #121828, #08090e); }
.art-miner { background-image: url(/site/assets/art/class_miner.jpg), radial-gradient(70% 50% at 50% 70%, rgba(232, 109, 42, .45), transparent 70%), linear-gradient(180deg, #1e1812, #0b0908); }
.art-crafter { background-image: url(/site/assets/art/class_crafter.jpg), radial-gradient(70% 50% at 50% 60%, rgba(242, 190, 100, .4), transparent 70%), linear-gradient(180deg, #221a10, #0c0907); }
.art-moorgate { background-image: url(/site/assets/art/world_moorgate.jpg), url(/site/assets/scenes/load_moorgate.jpg), linear-gradient(180deg, #2a2018, #0d0a08); }
.art-bali { background-image: url(/site/assets/art/world_bali.jpg), radial-gradient(60% 50% at 70% 30%, rgba(200, 220, 255, .25), transparent 70%), radial-gradient(80% 40% at 50% 100%, rgba(60, 120, 140, .45), transparent 70%), linear-gradient(180deg, #1c2a3a, #0a1418 60%, #07100f); }
.art-depths { background-image: url(/site/assets/art/world_depths.jpg), url(/site/assets/scenes/load_mine.jpg), linear-gradient(180deg, #2a1010, #090606); }
.art-news { background-image: url(/site/assets/art/news_cover_default.jpg), url(/site/assets/scenes/load_orcs.jpg), linear-gradient(180deg, #241a14, #0c0908); }
.art-wiki { background-image: url(/site/assets/art/wiki_banner.jpg), url(/site/assets/scenes/load_forge.jpg), linear-gradient(180deg, #1d1814, #0b0908); }
.art-shop { background-image: url(/site/assets/art/shop_banner.jpg), url(/site/assets/scenes/select_hall.jpg), radial-gradient(50% 70% at 50% 60%, rgba(242, 190, 100, .28), transparent 70%), linear-gradient(180deg, #24180f, #0b0807); }
.art-promo { background-image: url(/site/assets/art/promo_banner.jpg), url(/site/assets/scenes/select_graveyard.jpg), radial-gradient(50% 70% at 30% 60%, rgba(200, 56, 43, .3), transparent 70%), linear-gradient(180deg, #201214, #0b0708); }
.art-fame { background-image: url(/site/assets/scenes/select_hall.jpg), linear-gradient(180deg, #1d1814, #0b0908); }
.art-map { background-image: url(/site/assets/art/map_parchment.jpg), linear-gradient(180deg, #2a2016, #0b0907); }

/* ---- forms ---- */
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font: 700 .9rem/1.2 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.field .hint { font-size: .9rem; color: var(--muted); }
.field .err { font-size: .92rem; color: var(--blood); }
.input, textarea.input, select.input { width: 100%; min-height: 48px; padding: 12px 16px; border: 0; border-radius: 2px; color: var(--text); font: 400 1.05rem/1.4 var(--body);
  background: rgba(5, 4, 4, .75); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .9), 0 0 0 1px rgba(201, 163, 91, .35); caret-color: var(--gold-hi); transition: box-shadow .25s; }
.input::placeholder { color: #85776a; }
.input:focus { outline: none; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .9), 0 0 0 1px var(--gold-hi), 0 0 18px rgba(201, 163, 91, .25); }
.input[aria-invalid="true"] { box-shadow: inset 0 2px 6px rgba(0, 0, 0, .9), 0 0 0 1px var(--blood); }
textarea.input { min-height: 120px; resize: vertical; }
.form-msg { padding: 12px 16px; border-radius: 2px; font-size: .98rem; }
.form-msg.bad { color: #ffd9cf; background: rgba(140, 28, 26, .28); box-shadow: inset 0 0 0 1px rgba(224, 96, 74, .5); }
.form-msg.good { color: #e4f3c8; background: rgba(70, 110, 30, .25); box-shadow: inset 0 0 0 1px rgba(140, 190, 80, .45); }
.form-msg.wait { color: #f4e2b6; background: rgba(150, 110, 30, .2); box-shadow: inset 0 0 0 1px rgba(201, 163, 91, .45); }
.form-msg:empty { display: none; }

/* ---- tabs ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--hair); }
.tabs button { position: relative; border: 0; padding: 14px 20px; color: #bba985; background: none; font: 700 .92rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.tabs button::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: -1px; height: 2px; background: var(--crimson-hi); transform: scaleX(0); transition: transform .35s var(--ease); }
.tabs button:hover { color: var(--gold-hi); }
.tabs button[aria-selected="true"] { color: var(--gold-hi); text-shadow: 0 0 14px rgba(242, 217, 155, .35); }
.tabs button[aria-selected="true"]::after { transform: none; }

/* ---- chips, badges, tags ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 2px; font: 600 .78rem/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold-hi); background: rgba(201, 163, 91, .1); box-shadow: inset 0 0 0 1px rgba(201, 163, 91, .3); }
.chip.red { color: #ffc4b5; background: rgba(140, 28, 26, .3); box-shadow: inset 0 0 0 1px rgba(200, 56, 43, .5); }
.chip.green { color: #d9efbd; background: rgba(80, 120, 40, .25); box-shadow: inset 0 0 0 1px rgba(140, 190, 80, .45); }
.chip.blue { color: #cfe0f6; background: rgba(60, 90, 140, .25); box-shadow: inset 0 0 0 1px rgba(127, 168, 216, .45); }

/* ---- torches (torch.js) ---- */
.torch { --tw: 96px; position: relative; width: var(--tw); height: calc(var(--tw) * 1.767); margin-top: calc(var(--tw) * 1.2); pointer-events: none; }
.torch.b { transform: scaleX(-1); }
.torch .sconce { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .75)) brightness(1.05); }
.torch .fire { position: absolute; left: 81%; bottom: 84%; width: calc(var(--tw) * 1.15); height: calc(var(--tw) * 1.9); margin-left: calc(var(--tw) * -.575);
  mix-blend-mode: screen; filter: drop-shadow(0 0 12px rgba(255, 140, 40, .6)); }
.torch .halo { position: absolute; left: 81%; bottom: 93%; width: 384px; height: 384px; margin: 0 0 -192px -192px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 165, 75, .34), rgba(224, 102, 42, .13) 34%, transparent 66%); mix-blend-mode: screen; will-change: opacity, transform; }

/* ---- wax seal and parchment sheet ---- */
.seal { width: 92px; height: 92px; flex: none; background: url(/site/assets/seal.webp) center / contain no-repeat; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .55)); }
.sheet { position: relative; color: var(--ink); border: 54px solid transparent; border-image: url(/site/assets/parchment.webp) 130 fill / 54px stretch;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .65)) drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.sheet h1, .sheet h2, .sheet h3 { color: #2a1a0a; text-shadow: none; }
.sheet a { color: #7a2a10; }
.sheet .meta { color: #54401f; }

/* ---- reveal: present by default, eased in when JS says so; --d staggers ---- */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s), filter 1.1s var(--ease) var(--d, 0s); filter: blur(3px); }
  .js .rise.in { opacity: 1; transform: none; filter: none; }
  .js .rise-x { opacity: 0; transform: translateX(-30px); transition: opacity 1.1s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s); }
  .js .rise-x.in { opacity: 1; transform: none; }
}

/* ---- tables ---- */
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
.table th { text-align: left; font: 700 .82rem/1.2 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); padding: 12px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid rgba(201, 163, 91, .08); vertical-align: top; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover td { background: rgba(201, 163, 91, .05); }
.table .r { text-align: right; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---- skeletons and empty ---- */
.sk { display: block; border-radius: 2px; background: linear-gradient(90deg, rgba(201, 163, 91, .05), rgba(201, 163, 91, .12), rgba(201, 163, 91, .05)); background-size: 200% 100%; min-height: 1em; }
@media (prefers-reduced-motion: no-preference) { .sk { animation: sk 1.4s linear infinite; } }
@keyframes sk { to { background-position: -200% 0; } }
.empty { padding: 28px 0; color: var(--muted); font: italic 1.2rem var(--voice); }

.name-red { color: var(--blood); }
.name-grey { color: var(--grey-name); }

/* ---- the castle wall band ---- */
.wallband { position: relative; isolation: isolate; padding: clamp(64px, 9vw, 132px) 0; background: url(/site/assets/wall.webp) center bottom / auto 620px repeat, #1a1510; }
.wallband::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, var(--soot) 0%, rgba(11, 9, 10, .62) 16%, rgba(11, 9, 10, .55) 50%, rgba(11, 9, 10, .7) 84%, var(--soot) 100%),
    linear-gradient(90deg, var(--soot) 0%, rgba(11, 9, 10, .25) 14%, transparent 30%, transparent 70%, rgba(11, 9, 10, .25) 86%, var(--soot) 100%); }

/* ---- the toast (purchases, reports) ---- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translate(-50%, 30px); opacity: 0; max-width: min(92vw, 520px); padding: 16px 22px;
  color: var(--text); background: linear-gradient(180deg, #221a16, #120e0d); box-shadow: 0 0 0 1px var(--gold-lo), var(--shadow); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { box-shadow: 0 0 0 1px var(--crimson-hi), var(--shadow); }

/* ---- modal (dialog) ---- */
dialog.modal { width: min(560px, 94vw); padding: 0; border: 0; color: var(--text); background: transparent; overflow: visible; }
dialog.modal::backdrop { background: rgba(4, 3, 3, .78); backdrop-filter: blur(4px); }
dialog.modal .panel { padding: clamp(24px, 4vw, 40px); }
@media (prefers-reduced-motion: no-preference) { dialog.modal[open] .panel { animation: fade-up .5s var(--ease); } }
.modal-x { position: absolute; top: 10px; right: 12px; z-index: 5; width: 40px; height: 40px; border: 0; background: none; color: var(--gold); font-size: 1.6rem; line-height: 1; }
.modal-x:hover { color: var(--gold-hi); }

/* ---- news card (home, news list): cover, date, title, gist ---- */
.ncard { display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.ncard .cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.ncard .cover .art { position: absolute; inset: 0; transition: transform 1.4s var(--ease), filter .6s; filter: saturate(.85); }
.ncard:hover .cover .art { transform: scale(1.07); filter: saturate(1.05); }
.ncard .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #100d0d, transparent 55%); }
.ncard .tag { position: absolute; left: 16px; top: 16px; z-index: 2; }
.ncard .nbody { position: relative; padding: 4px 24px 24px; display: grid; gap: 10px; flex: 1; align-content: start; }
.ncard time { font: 600 .8rem/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.ncard h3 { font-size: 1.55rem; line-height: 1.12; color: #f5e6c2; transition: color .3s; }
.ncard:hover h3 { color: var(--gold-hi); }
.ncard p { margin: 0; color: var(--muted); font-size: .98rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ncard .more { margin-top: auto; padding-top: 8px; font: 700 .8rem/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: #f0b9a0; }
.ncard.lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr; }
.ncard.lead .cover { aspect-ratio: auto; min-height: 360px; }
.ncard.lead .cover::after { background: linear-gradient(90deg, transparent 50%, #100d0d); }
.ncard.lead .nbody { padding: clamp(24px, 4vw, 48px); align-content: center; }
.ncard.lead h3 { font-size: clamp(1.9rem, 3vw, 2.8rem); }
@media (max-width: 860px) { .ncard.lead { grid-template-columns: 1fr; } .ncard.lead .cover { min-height: 0; aspect-ratio: 16 / 9; } .ncard.lead .cover::after { background: linear-gradient(0deg, #100d0d, transparent 55%); } }
