:root {
  --navy: #0b1630; --navy2: #13244a; --navy3: #1c3466; --line: rgba(233, 185, 73, .28);
  --gold: #e9b949; --gold-lit: #ffd978; --parch: #f4e7c8; --ink: #1a1206; --dim: #a9b4cf;
  --crimson: #c0382c; --crimson-lit: #ff7b6b; --green: #4fae6b; --bar: 60px;
  --display: 'Cinzel', Georgia, serif; --body: 'Manrope', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--navy); color: #e8ecf7; font: 500 16px/1.55 var(--body); overflow-x: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: .01em; }
.kick { display: block; font: 800 12px/1.2 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.dim { color: var(--dim); font-size: 14px; }

/* ---------- top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--bar); z-index: 60; display: flex; align-items: center; gap: 18px; padding: 0 18px;
  background: linear-gradient(#0b1630f2, #0b1630cc); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand b { font: 800 16px/1 var(--display); color: var(--gold-lit); display: block; }
.brand small { font-size: 11px; color: var(--dim); }
.nav { display: flex; gap: 4px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button { padding: 8px 13px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; color: var(--dim); transition: .2s; }
.nav button:hover { color: #fff; background: #ffffff12; }
.nav button.on { color: var(--ink); background: linear-gradient(var(--gold-lit), var(--gold)); }

/* ---------- buttons ---------- */
.door { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 10px; font: 800 14px/1 var(--body); letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: linear-gradient(#ffe394, #e0a93a); box-shadow: 0 3px 0 #9a6d16, 0 10px 22px #0006; transition: transform .15s, filter .15s; }
.door:hover { transform: translateY(-2px); filter: brightness(1.08); }
.door.red { color: #fff; background: linear-gradient(#d9503f, #a52a20); box-shadow: 0 3px 0 #6b1711, 0 10px 22px #0006; }
.door.ghost { color: var(--gold-lit); background: #ffffff10; box-shadow: inset 0 0 0 1.5px var(--line); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- pages + curtain ---------- */
.page { display: none; padding-top: var(--bar); }
.page.on { display: block; }
#about { padding-top: 0; }
#wipe { position: fixed; inset: 0; z-index: 80; visibility: hidden; pointer-events: none; overflow: hidden; }
.wipe-panel { position: absolute; inset: 0 -14vw; display: flex; align-items: center; justify-content: center; gap: 3vw;
  background: radial-gradient(120% 90% at 50% 100%, #5a2a14, #26120a 60%, #120805); clip-path: polygon(7% 0, 100% 0, 93% 100%, 0 100%); }
.wipe-host { height: 62vh; width: auto; filter: drop-shadow(0 16px 20px #000a); }
.wipe-txt small { display: block; font: 800 13px var(--body); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.wipe-txt b { font: 900 clamp(40px, 8vw, 110px)/1 var(--display); color: var(--parch); text-shadow: 0 5px 0 #000a; }
.wipe-run { position: absolute; left: 0; bottom: -2vh; display: flex; align-items: flex-end; gap: 1vw; }
.wipe-run img, .horde .run img { width: auto; max-width: none; filter: drop-shadow(0 10px 8px #0009); animation: run .34s infinite alternate ease-in-out; transform-origin: 50% 100%; }
@keyframes run { from { transform: translateY(0) rotate(-5deg); } to { transform: translateY(-3.2vh) rotate(6deg); } }

/* ================= STORY STAGE ================= */
.stage { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; background: #070d1e; --mx: 0; --my: 0; }
#embers { position: absolute; inset: 0; z-index: 25; pointer-events: none; mix-blend-mode: screen; }
#flash { position: absolute; inset: 0; z-index: 40; background: #fff7dc; opacity: 0; visibility: hidden; pointer-events: none; }
.scene { position: absolute; inset: 0; overflow: hidden; }
.scene .bg { position: absolute; inset: -4%; translate: calc(var(--mx) * 16px) calc(var(--my) * 10px); }
.scene .bg::before { content: ''; position: absolute; inset: 0; background: var(--sky); }
.scene .bg::after { content: ''; position: absolute; left: -10%; right: -10%; bottom: 0; height: 30%; border-radius: 50% 50% 0 0 / 34% 34% 0 0; background: var(--ground); box-shadow: 0 -30px 80px var(--haze, #0000); }
.art { position: absolute; right: 0; bottom: 0; width: 64vw; height: calc(100% - var(--bar) - 4vh - 84px); translate: calc(var(--mx) * -22px) calc(var(--my) * -10px); }
.art.wide { left: 0; width: 100%; }
.ch { position: absolute; width: auto; max-width: none; filter: drop-shadow(0 14px 10px #0008); user-select: none; -webkit-user-drag: none; }
.ch.foe { filter: brightness(.6) saturate(.6) sepia(.3) hue-rotate(-25deg) drop-shadow(0 14px 10px #000a) drop-shadow(0 0 14px #c0382c88); }
.ch.bld { filter: drop-shadow(0 10px 8px #0007); }

/* scene skies */
.s-hero { --sky: radial-gradient(90% 70% at 50% 34%, #2b4a8f 0, #14254d 45%, #070d1e 100%); --ground: linear-gradient(#152a55, #0a1430); }
.s-k1 { --sky: linear-gradient(#1c2350 0, #4a3a78 46%, #d0744a 82%, #f1b45c 100%); --ground: linear-gradient(#3b2a3f, #1b1426); --haze: #f1b45c55; }
.s-k2 { --sky: linear-gradient(#150a12 0, #4a1418 50%, #a8321f 88%, #e06a2c 100%); --ground: linear-gradient(#34100f, #150607); --haze: #e06a2c66; }
.s-k3 { --sky: linear-gradient(#1f4f6e 0, #5aa0a8 50%, #f3d98c 100%); --ground: linear-gradient(#3f7a45, #1d4428); --haze: #f3d98c55; }
.s-k4 { --sky: linear-gradient(#060b1c 0, #14285c 50%, #7a3a2c 92%, #d06a2a 100%); --ground: linear-gradient(#1c2238, #0a0d1a); --haze: #d06a2a66; }
.s-hist { --sky: linear-gradient(#0d1a3a, #1e3a70 60%, #3d5f9a); --ground: linear-gradient(#22386a, #0e1a38); }
.s-baul { --sky: linear-gradient(#0b1a14 0, #1d3d2c 50%, #5b6a2c 100%); --ground: linear-gradient(#2a3d1e, #111c0e); --haze: #9ab04a33; }
.s-awake { --sky: linear-gradient(#5db4e8 0, #a8dcf2 60%, #f6e7b0 100%); --ground: linear-gradient(#69a84f, #2f6a35); }
.s-ark { --sky: linear-gradient(#2a3f7a 0, #c9865a 62%, #f6cf7a 100%); --ground: linear-gradient(#d9a95a, #8a5e2c); --haze: #f6cf7a66; }
.s-who { --sky: linear-gradient(#17306a, #3f6fb5 60%, #9cc7e8); --ground: linear-gradient(#2f6a4a, #153a2a); }
.s-fin { --sky: radial-gradient(90% 70% at 50% 30%, #6b4a1c 0, #2a1c10 50%, #0c0806 100%); --ground: linear-gradient(#2a1c10, #0c0806); --haze: #e9b94944; }

/* scene title */
.ttl { position: absolute; left: 5vw; top: calc(var(--bar) + 4vh + 56px); width: min(34vw, 470px); z-index: 5; }
.ttl h2 { font-size: clamp(34px, 5.2vw, 78px); font-weight: 900; color: var(--parch); text-shadow: 0 4px 0 #0009, 0 0 40px #0008; margin: 8px 0 10px; }
.ttl p { font: 700 clamp(15px, 1.5vw, 20px)/1.35 var(--body); color: #fff; text-shadow: 0 2px 10px #000c; }
.s-hist .ttl h2, .s-baul .ttl h2, .s-awake .ttl h2 { font-size: clamp(28px, 3.5vw, 52px); }
.s-fin .ttl { left: 50%; top: calc(var(--bar) + 8vh); width: min(92vw, 900px); transform: translateX(-50%); text-align: center; }
.s-fin .ttl h2 { font-size: clamp(28px, min(5vw, 7.5vh), 68px); color: var(--gold-lit); } .s-fin .art { height: 50%; }
.s-fin .ttl p { font-weight: 500; max-width: 60ch; margin: auto; }
.fin-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 2.4vh; }

/* chat: the speaker stands waist-up beside a bold speech bubble */
.chat { position: absolute; left: 3vw; bottom: calc(4vh + 12px); width: min(520px, 94vw); z-index: 20; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.msg { display: flex; align-items: flex-end; max-width: 100%; filter: drop-shadow(0 10px 18px #000a); }
.msg.r { flex-direction: row-reverse; align-self: flex-end; }
.msg p { position: relative; background: linear-gradient(#fffdf4, #f6e6bd); color: #23180a; font: 600 16px/1.42 var(--body); padding: 12px 18px 13px 22px; margin: 0 0 10px -10px; border-radius: 18px; border: 2.5px solid var(--gold); box-shadow: inset 0 -3px 0 #e3c779; }
.msg.r p { padding: 12px 22px 13px 18px; margin: 0 -10px 10px 0; }
.msg p::before { content: ''; position: absolute; left: -11px; bottom: 16px; width: 18px; height: 18px; background: #f9ecc9; border-left: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold); transform: rotate(45deg); border-radius: 0 0 0 4px; }
.msg.r p::before { left: auto; right: -11px; transform: rotate(-135deg); }
.msg p > b { display: table; font: 900 12px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: linear-gradient(#c0382c, #8a1f17); padding: 5px 10px; border-radius: 6px; margin: -24px 0 7px -4px; box-shadow: 0 3px 0 #5a120d; }
.msg p em { font-style: normal; font-weight: 800; color: #b3350f; }
.av { flex: none; position: relative; z-index: 1; width: 104px; height: 118px; overflow: hidden; -webkit-mask: linear-gradient(#000 82%, transparent); mask: linear-gradient(#000 82%, transparent); }
.av img { position: absolute; left: 50%; top: 2%; height: 215%; width: auto; max-width: none; transform: translateX(-50%); animation: breathe 3.2s ease-in-out infinite; transform-origin: 50% 60%; }
.msg.r .av img { animation-delay: -1.4s; }
@keyframes breathe { 50% { transform: translateX(-50%) translateY(-3px) scale(1.025); } }

/* HUD */
.hud { position: absolute; top: calc(var(--bar) + 4vh + 8px); left: 0; right: 0; margin: 0 auto; width: fit-content; z-index: 28; display: flex; gap: 8px; }
.rec { min-width: 92px; padding: 6px 10px 7px; border-radius: 10px; background: #0b1630cc; border: 1px solid var(--line); text-align: center; backdrop-filter: blur(4px); }
.rec small { display: block; font: 800 10px var(--body); letter-spacing: .14em; color: var(--dim); }
.rec b { display: block; font: 800 13px/1.2 var(--body); min-height: 16px; }
.win { color: var(--gold-lit); } .lose { color: var(--crimson-lit); } .live { color: #7be39a; }
.chapters { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); z-index: 28; display: flex; flex-direction: column; gap: 9px; align-items: flex-end; }
.chapters button { display: flex; align-items: center; gap: 8px; }
.chapters button::after { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff9; transition: .2s; }
.chapters span { font: 700 11px var(--body); background: #0b1630e6; padding: 3px 8px; border-radius: 6px; opacity: 0; transition: .2s; }
.chapters button:hover span { opacity: 1; }
.chapters button.on::after { background: var(--gold-lit); border-color: var(--gold-lit); transform: scale(1.35); }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 30; background: #0006; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-lit)); transform: scaleX(0); transform-origin: 0 50%; }

/* hero */
.hero-mid { position: absolute; left: 50%; top: calc(var(--bar) + 3vh); width: min(92vw, 620px); transform: translateX(-50%); text-align: center; z-index: 6; }
.hero-logo { width: min(74vw, 46vh, 460px); margin: 0 auto .5vh; }
.hero-mid h1 { font-size: clamp(42px, 8.4vw, 104px); font-weight: 900; color: var(--parch); text-shadow: 0 5px 0 #000a; margin: 6px 0 12px; }
.hero-mid h1 em { font-style: normal; color: var(--gold-lit); }
.hero-mid p { color: #d5dcf0; max-width: 54ch; margin: 0 auto 18px; }
.hero-mid .hero-cta { justify-content: center; }
.hero-stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 3vh; }
.hero-stats li { background: #0b163099; border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; }
.hero-stats b { display: block; font: 900 clamp(20px, 2.6vw, 30px)/1.1 var(--display); color: var(--gold-lit); }
.hero-stats span { font-size: 12px; line-height: 1.3; color: var(--dim); display: block; }
.scroll-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font: 800 11px var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); z-index: 6; text-align: center; }
.scroll-hint i { display: block; width: 2px; height: 26px; margin: 6px auto 0; background: var(--gold); animation: hint 1.4s infinite; transform-origin: 50% 0; }
@keyframes hint { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* barbarian horde wipe between seasons */
.horde { position: absolute; top: 0; left: 0; width: 160vw; height: 100%; z-index: 35; pointer-events: none; overflow: hidden; }
.horde .dust { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0, #1c0f08 10%, #3a1d0e 50%, #1c0f08 90%, transparent 100%); }
.horde-lbl { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); text-align: center; white-space: nowrap; }
.horde-lbl small { display: block; font: 800 13px var(--body); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.horde-lbl b { font: 900 clamp(46px, 9vw, 130px)/1 var(--display); color: var(--parch); text-shadow: 0 6px 0 #000a; }
.horde .run { position: absolute; bottom: -2vh; height: 60vh; width: 40vw; }
.horde .run.front { left: 2vw; } .horde .run.tail { right: 0; }
.horde .run img { position: absolute; bottom: 0; }

/* props */
.stamp { position: absolute; left: 50%; top: 20%; z-index: 8; padding: 10px 26px 12px; border: 6px double currentColor; border-radius: 12px; text-align: center; background: #0b1630b8; backdrop-filter: blur(2px); box-shadow: 0 12px 40px #000a; }
.stamp b { display: block; font: 900 clamp(34px, 5vw, 72px)/1 var(--display); text-transform: uppercase; }
.stamp small { font: 800 clamp(11px, 1.1vw, 15px) var(--body); letter-spacing: .2em; text-transform: uppercase; }
.stamp.small { top: 46%; left: 62%; } .stamp.small b { font-size: clamp(26px, 3.4vw, 48px); }
.stamp.live b::before { content: ''; display: inline-block; width: .32em; height: .32em; border-radius: 50%; background: currentColor; margin-right: .25em; vertical-align: .18em; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .2; transform: scale(.7); } }
.flag { position: absolute; transform: translateX(-50%); padding: 7px 14px 16px; font: 900 clamp(15px, 1.7vw, 24px)/1 var(--display); color: #fff; background: linear-gradient(#b3261e, #6b1711); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); z-index: 4; }
.tally { position: absolute; left: 30%; top: 0; width: 44%; display: grid; gap: 8px; z-index: 6; }
.vs { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: #0b1630cc; border: 1px solid var(--line); border-radius: 12px; padding: 8px 16px; text-align: center; }
.vs b { font: 900 clamp(24px, 3vw, 44px)/1 var(--display); color: var(--gold-lit); }
.vs b.them { color: var(--crimson-lit); }
.vs span { font-size: clamp(11px, 1vw, 13px); line-height: 1.3; color: #d5dcf0; }
.burst { position: absolute; width: 22vh; height: 22vh; margin: 0 0 -11vh 0; z-index: 7; pointer-events: none;
  background: radial-gradient(circle, #fff 0 18%, #ffd978 19% 34%, #ff7b2c 35% 52%, transparent 54%);
  clip-path: polygon(50% 0, 60% 30%, 90% 12%, 72% 42%, 100% 50%, 72% 60%, 88% 90%, 58% 72%, 50% 100%, 40% 72%, 10% 90%, 28% 58%, 0 50%, 28% 40%, 12% 10%, 40% 30%); }
.pod { position: absolute; bottom: 6%; background: linear-gradient(#f1d27a, #b98524); border-radius: 8px 8px 0 0; box-shadow: inset 0 6px 0 #ffe9a8, 0 10px 20px #0006; display: flex; align-items: flex-end; justify-content: center; }
.pod b { font: 900 clamp(22px, 3vw, 44px) var(--display); color: #5a3a08; padding-bottom: 4px; }
.tag { position: absolute; z-index: 9; background: var(--gold-lit); color: var(--ink); font: 800 clamp(11px, 1.05vw, 14px)/1.25 var(--body); padding: 7px 12px; border-radius: 10px; text-align: center; white-space: nowrap; box-shadow: 0 6px 16px #0007; }
.seedline { position: absolute; left: 4%; top: 2%; display: flex; align-items: center; gap: 10px; z-index: 6; }
.seedline span, .ladder span { background: #0b1630cc; border: 1px solid var(--line); border-radius: 10px; padding: 7px 14px; font: 700 13px var(--body); }
.seedline b { font: 900 22px var(--display); color: var(--gold-lit); margin-left: 6px; }
.seedline i, .ladder i { font-style: normal; color: var(--gold-lit); font-size: 20px; }
.seedline i { transform: rotate(90deg); }
.hot { border-color: var(--crimson-lit) !important; color: #ffd2cb; }
.ladder { position: absolute; left: 39%; top: 0; display: grid; gap: 6px; width: 132px; text-align: center; z-index: 6; }
.ladder i { position: absolute; right: -26px; bottom: 4px; }
.bars { position: absolute; right: 9%; top: 0; width: 34%; display: grid; gap: 14px; z-index: 6; }
.bgrp { background: #0b1630cc; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 14px; }
.bgrp small { font: 800 11px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.bar { position: relative; height: 34px; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; }
.bar i { position: absolute; inset: 0; border-radius: 6px; }
.bar.us i { background: linear-gradient(90deg, #b98524, #ffd978); } .bar.them i { background: linear-gradient(90deg, #6b1711, #d9503f); }
.bar b, .bar em { position: relative; font: 800 15px var(--body); font-style: normal; color: #fff; text-shadow: 0 1px 3px #000a; }
.bar.us b, .bar.us em { color: var(--ink); text-shadow: none; } .bar em { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.shot { display: block; position: relative; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); background: #000; transition: transform .2s; }
.shot:hover { transform: scale(1.03); }
.shot span { position: absolute; left: 6px; bottom: 6px; background: #0b1630e6; font: 800 10px var(--body); letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; }
#k4shot { width: 62%; }
/* history */
.roster { position: absolute; left: 44%; right: 8%; top: 0; display: flex; flex-direction: column; gap: 12px; z-index: 6; } .roster > * { flex: none; }
.seeds { width: 100%; border-collapse: collapse; background: #0b1630cc; border-radius: 12px; overflow: hidden; font-size: clamp(11px, 1.05vw, 14px); }
.seeds th { font: 800 10px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); text-align: left; padding: 7px 10px; }
.seeds td { padding: min(5px, .5vh) 10px; border-top: 1px solid #ffffff14; font-weight: 600; }
.count { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.count b { font: 900 clamp(36px, min(5.4vw, 8vh), 80px)/1 var(--display); color: var(--gold-lit); text-shadow: 0 4px 0 #0008; }
.count span { font-weight: 700; color: #d5dcf0; } .count em { font-style: normal; font-weight: 800; color: var(--ink); background: var(--gold-lit); padding: 4px 10px; border-radius: 8px; font-size: 13px; }
.dots { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; align-content: start; width: min(100%, 44vh); }
.dots i { aspect-ratio: 1; border-radius: 50%; background: #c9d4ee; border: 1.5px solid transparent; max-width: 16px; width: 100%; }
.dots .keep { background: var(--gold); }
/* baulur */
.keepcard { position: absolute; left: 62%; width: 36%; bottom: 20%; border-radius: 16px; overflow: hidden; border: 4px solid #6b4a1c; box-shadow: 0 16px 40px #000a; z-index: 2; }
.keepcard img { width: 100%; }
.plate { position: absolute; z-index: 9; background: #0b1630e0; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; text-align: center; white-space: nowrap; }
.plate > b { display: block; font: 900 clamp(14px, 1.5vw, 20px) var(--display); color: var(--parch); }
.plate > small { color: var(--dim); font-size: 12px; }
.plate > div { display: flex; gap: 6px; margin-top: 7px; justify-content: center; }
.utc { background: #ffffff14; border-radius: 8px; padding: 5px 9px; font-size: 12px; font-weight: 700; }
.utc b { font-size: 15px; } .utc small { display: block; font-size: 10px; opacity: .75; font-weight: 600; }
.dial { position: absolute; left: 47%; top: 4%; width: min(22vh, 15vw); transform: translateX(-50%); z-index: 6; overflow: visible; }
.dial .face { fill: #0b1630e0; stroke: var(--gold); stroke-width: 3; } .dial .tick { stroke: #fff8; stroke-width: 2; }
.dial .mk.b { fill: var(--crimson-lit); } .dial .mk.k { fill: var(--gold-lit); }
#dialHand { stroke: var(--gold-lit); stroke-width: 5; stroke-linecap: round; } .dial .hub { fill: #13244a; stroke: var(--gold); stroke-width: 2; }
.dial text { fill: #fff; font: 800 17px var(--body); text-anchor: middle; } .dial text.u { font-size: 9px; fill: var(--dim); letter-spacing: .2em; }
/* awake */
.night { position: absolute; inset: -30% -60% -10% -60%; background: linear-gradient(#050a1c, #0d1a44); pointer-events: none; z-index: 3; }
.sun { position: absolute; width: 9vh; height: 9vh; border-radius: 50%; background: radial-gradient(#fffbe0, #ffd35a); box-shadow: 0 0 60px 20px #ffd35a88; transform: translate(-50%, 50%); z-index: 1; }
.s-awake .bld { z-index: 2; } .s-awake .aTroop { z-index: 4; }
.clock { position: absolute; left: 8%; right: 8%; top: 0; z-index: 6; background: #0b1630d9; border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; }
.clock > b { font: 900 clamp(18px, 2vw, 28px) var(--display); color: var(--gold-lit); }
.clock-bar { position: relative; height: 22px; border-radius: 11px; background: #ffffff1c; margin: 8px 0 4px; }
.clock-win { position: absolute; left: 54.17%; width: 20.83%; top: 0; bottom: 0; border-radius: 11px; background: linear-gradient(90deg, var(--gold), var(--gold-lit)); }
.clock-peak { position: absolute; left: 62.5%; top: -4px; bottom: -4px; width: 3px; background: var(--crimson); }
.clock-peak span { position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 800 11px var(--body); background: var(--crimson); padding: 2px 7px; border-radius: 5px; }
#aCur { position: absolute; top: -6px; bottom: -6px; width: 4px; margin-left: -2px; border-radius: 2px; background: #fff; box-shadow: 0 0 10px #fff; }
.clock-ticks { display: flex; justify-content: space-between; font: 700 11px var(--body); color: var(--dim); }
/* ark */
.pyr { position: absolute; bottom: 14%; width: 34%; aspect-ratio: 1.5; background: linear-gradient(100deg, #e9c27a 50%, #b98a48 50%); clip-path: polygon(50% 0, 100% 100%, 0 100%); opacity: .8; }
.pyr.b { width: 24%; bottom: 16%; opacity: .6; }
.matches { position: absolute; left: 50%; right: 7%; top: 0; display: grid; gap: 9px; z-index: 6; }
.match { display: grid; grid-template-columns: 62px 1fr auto; gap: 10px; align-items: center; background: #0b1630d9; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.match small { font: 800 11px var(--body); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.mbar { display: flex; height: 28px; border-radius: 6px; overflow: hidden; font: 800 13px/28px var(--body); }
.mbar i { font-style: normal; padding: 0 8px; white-space: nowrap; } .mbar .us { background: linear-gradient(90deg, #2d6fd0, #6fb0ff); } .mbar .them { background: linear-gradient(90deg, #a52a20, #d9503f); text-align: right; }
.match em { font: 900 12px var(--body); font-style: normal; color: var(--ink); background: var(--gold-lit); padding: 4px 9px; border-radius: 6px; text-transform: uppercase; }
.match-foot { display: flex; gap: 12px; align-items: center; margin-top: 4px; } #arkShot { width: 46%; }
/* who */
.langs { position: absolute; left: 34%; right: 6%; top: 2%; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; z-index: 6; }
.langs span { background: #fff; color: #2a2114; font: 800 clamp(13px, 1.4vw, 19px) var(--body); padding: 9px 18px; border-radius: 999px; box-shadow: 0 6px 16px #0007; }
.langs span:nth-child(odd) { background: var(--gold-lit); }

/* ================= CONTENT PAGES ================= */
.wrap { max-width: 1120px; margin: 0 auto; padding: 56px 18px 80px; }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.sec-head { margin: 56px 0 22px; max-width: 70ch; }
.sec-head:first-child { margin-top: 0; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 42px); color: var(--parch); margin: 6px 0 8px; }
.sec-head p, .book header p { color: var(--dim); }
.page-head { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: end; gap: 3vw; padding: 5vh 6vw 0; min-height: 52vh;
  background: radial-gradient(80% 90% at 30% 100%, #2b4a8f, #13244a 55%, #0b1630); border-bottom: 3px solid var(--gold); }
#penalties .page-head { background: radial-gradient(80% 90% at 30% 100%, #7a2418, #3a120c 55%, #150806); border-color: var(--crimson); }
.ph-art { position: relative; height: 46vh; display: flex; justify-content: center; align-items: flex-end; }
.ph-art img { height: 100%; width: auto; max-width: none; filter: drop-shadow(0 14px 12px #000a); animation: stepin .8s .75s both cubic-bezier(.2, 1.3, .4, 1); }
.ph-art .prop { position: absolute; right: 2%; bottom: 0; height: 48%; animation-delay: .95s; }
@keyframes stepin { from { transform: translateY(60%); opacity: 0; } }
.ph-txt { padding-bottom: 6vh; animation: stepin .7s .85s both; }
.ph-txt h1 { font-size: clamp(40px, 6.4vw, 92px); font-weight: 900; color: var(--parch); text-shadow: 0 5px 0 #0009; margin: 8px 0 14px; }
.ph-txt p { color: #d5dcf0; max-width: 56ch; font-size: 17px; }
.subnav { position: sticky; top: var(--bar); z-index: 20; display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; margin-bottom: 26px; background: linear-gradient(var(--navy) 80%, transparent); scrollbar-width: none; }
.subnav a { flex: none; padding: 7px 13px; border-radius: 999px; font: 700 13px var(--body); color: var(--dim); text-decoration: none; border: 1px solid #ffffff1f; }
.subnav a:hover { color: var(--ink); background: var(--gold-lit); }
.book { background: linear-gradient(#16284f, #101d3c); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-bottom: 22px; scroll-margin-top: 130px; }
.book > header { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.book > header img { width: 84px; height: 84px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 6px #0008); }
.book h2 { font-size: clamp(22px, 2.6vw, 32px); color: var(--parch); margin-bottom: 4px; }
.note { background: #e9b9491c; border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; padding: 10px 14px; margin: 0 0 14px; font-size: 15px; }
.note.red { background: #c0382c26; border-color: var(--crimson); }
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.tbl th { font: 800 11px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); text-align: left; padding: 8px 10px; white-space: nowrap; }
.tbl th img { display: inline-block; width: 26px; vertical-align: middle; margin-right: 5px; }
.tbl td { padding: 10px; border-top: 1px solid #ffffff14; white-space: nowrap; }
.tbl tr.top1 td { background: #e9b94914; }
.rank { font: 800 16px var(--display); color: var(--parch); }
.num { font-weight: 800; font-variant-numeric: tabular-nums; }
.award { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.award img { width: 40px; height: 30px; object-fit: contain; }
.a-legendary { color: var(--gold-lit); } .a-epic { color: #d4a5ff; } .a-elite { color: #8fc0ff; } .a-advanced { color: #9fe0a8; }
.extra { margin-left: 8px; font: 800 11px var(--body); background: var(--gold-lit); color: var(--ink); padding: 3px 8px; border-radius: 6px; }
.book.reveal tbody tr { opacity: 0; transform: translateX(-24px); transition: .5s; }
.book.reveal.in tbody tr { opacity: 1; transform: none; }
.book.in tbody tr:nth-child(2) { transition-delay: .08s; } .book.in tbody tr:nth-child(3) { transition-delay: .16s; } .book.in tbody tr:nth-child(4) { transition-delay: .24s; }
.book.in tbody tr:nth-child(5) { transition-delay: .32s; } .book.in tbody tr:nth-child(6) { transition-delay: .4s; } .book.in tbody tr:nth-child(7) { transition-delay: .48s; }
/* penalty ladders */
.pen { background: linear-gradient(#2a1614, #170c0c); border-color: #c0382c55; }
.ladder-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.step { position: relative; background: #ffffff0d; border: 1px solid #ffffff1f; border-top: 4px solid var(--gold); border-radius: 12px; padding: 14px; opacity: 0; transform: translateY(26px) scale(.96); transition: .5s calc(var(--i) * .14s + .15s); }
.pen.in .step { opacity: 1; transform: none; }
.step:nth-child(2) { border-top-color: #f08a3c; } .step:nth-child(3) { border-top-color: #e2603a; }
.step.final { border-color: var(--crimson); border-top-color: var(--crimson); background: linear-gradient(#c0382c40, #c0382c14); }
.when { font: 800 11px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.step.final .when { color: var(--crimson-lit); }
.step h3 { font-size: 19px; color: var(--parch); margin: 6px 0 10px; }
.step p { font-size: 14px; color: #d9cfcb; }
.fine { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.fine span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); }
.fine img { width: 24px; } .fine b { color: #fff; font-size: 15px; }
/* closers */
.closer { display: flex; align-items: center; gap: 26px; margin-top: 56px; padding: 26px; border-radius: 18px; background: linear-gradient(100deg, #1c3466, #13244a); border: 1px solid var(--line); }
.closer > img { height: 190px; width: auto; flex: none; filter: drop-shadow(0 10px 10px #0008); }
.closer h3 { font-size: clamp(22px, 2.8vw, 34px); color: var(--gold-lit); margin-bottom: 8px; }
.closer p { color: #d5dcf0; margin-bottom: 14px; max-width: 62ch; }
/* leadership */
.tagbtn { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 6px 12px; border-radius: 8px; background: #ffffff12; border: 1px dashed #ffffff40; font: 800 15px var(--body); font-variant-numeric: tabular-nums; }
.tagbtn small { font: 700 10px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.tagbtn:hover, .tagbtn.done { background: var(--gold-lit); color: var(--ink); } .tagbtn:hover small, .tagbtn.done small { color: #5a3a08; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tags li { font: 700 12px var(--body); padding: 4px 10px; border-radius: 999px; background: #e9b94922; color: var(--gold-lit); border: 1px solid var(--line); }
.king { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 24px; align-items: center; padding: 24px; border-radius: 18px; background: linear-gradient(100deg, #4a3410, #1c2a52 60%); border: 2px solid var(--gold); margin-bottom: 22px; }
.king h2 { font-size: clamp(34px, 5vw, 60px); color: var(--gold-lit); margin: 4px 0 10px; }
.king-art { position: absolute; right: 2%; bottom: -8%; height: 118%; width: auto; max-width: none; opacity: .9; filter: drop-shadow(0 10px 10px #0008); }
.king > div { position: relative; z-index: 1; max-width: 60%; }
.lead-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.lead { position: relative; overflow: hidden; background: linear-gradient(#16284f, #101d3c); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.lead .shot { margin-bottom: 12px; } .lead h3 { font: 800 19px var(--body); margin: 2px 0 8px; }
.lead-art { position: absolute; right: -14px; bottom: -10px; height: 130px; width: auto; max-width: none; opacity: .5; pointer-events: none; transition: .3s; }
.lead:hover .lead-art { opacity: 1; transform: scale(1.1); }
.lead .tags, .lead .dim { position: relative; max-width: 78%; }
.track { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.track article { background: #16284f; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.track header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; } .track header small { color: var(--gold); font-weight: 800; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.track button { display: block; width: 100%; text-align: left; padding: 10px; border-radius: 10px; background: #ffffff0d; margin-top: 6px; transition: .2s; }
.track button:hover { background: #ffffff1f; } .track button span { display: block; font-size: 13px; color: var(--dim); } .track button em { font: 800 11px var(--body); font-style: normal; color: var(--gold-lit); text-transform: uppercase; letter-spacing: .08em; }
/* migrations / farms / sellers */
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card, .req, .seller { background: linear-gradient(#16284f, #101d3c); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card h3, .req h3, .seller h3, .farm h3 { font-size: 22px; color: var(--parch); margin-bottom: 8px; }
.card p { color: var(--dim); margin-bottom: 12px; } .card .door { margin-top: 10px; } .card .tagbtn { margin-right: 10px; }
.reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.req { position: relative; overflow: hidden; padding-right: 110px; min-height: 150px; }
.req > img { position: absolute; right: -8px; bottom: -8px; width: 120px; height: 120px; object-fit: contain; filter: drop-shadow(0 6px 8px #0008); transition: .3s; }
.req:hover > img { transform: scale(1.12) rotate(-4deg); }
.req p { color: #d5dcf0; font-size: 15px; } .req p b { color: var(--gold-lit); font-size: 1.15em; } .req .door { margin-top: 14px; }
.farm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.farm { display: grid; grid-template-columns: 110px 1fr; gap: 14px; background: linear-gradient(#16284f, #101d3c); border: 1px solid var(--line); border-left: 5px solid var(--dim); border-radius: 14px; padding: 14px; }
.farm.top { border-left-color: var(--gold-lit); } .farm.mid { border-left-color: #8fc0ff; }
.farm h3 { font-size: 19px; margin: 2px 0; } .tech { font-size: 13px; font-weight: 700; color: var(--gold-lit); margin-bottom: 8px; } .farm.low .tech { color: var(--dim); }
.farm dl { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 13px; } .farm dt { color: var(--dim); font-size: 11px; } .farm dd { margin: 0; font-weight: 800; }
.sellers { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.ids { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } .shots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; align-items: start; }
.foot { text-align: center; padding: 30px 18px 40px; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; display: grid; gap: 4px; }
.foot b { color: var(--parch); font-family: var(--display); } .foot small { opacity: .7; }
#lightbox { position: fixed; inset: 0; z-index: 100; background: #000d; display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
#lightbox[hidden] { display: none; } #lightbox img { max-height: 92vh; border-radius: 12px; }

/* ================= SMALL SCREENS ================= */
@media (max-width: 860px) {
  :root { --bar: 96px; }
  .topbar { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 8px 10px 6px; height: var(--bar); } .topbar .nav { grid-column: 1 / -1; grid-row: 2; }
  .brand img { width: 32px; height: 32px; } .nav { margin-left: 0; } .nav button { padding: 7px 11px; font-size: 13px; }
  .art { left: 0; width: 100%; height: 50%; bottom: 13%; }
  .art.wide { height: 46%; bottom: 0; } .s-who .art, .s-fin .art { bottom: 10%; }
  .ttl { left: 16px; right: 16px; width: auto; top: calc(var(--bar) + 4vh + 62px); }
  .ttl h2 { font-size: clamp(30px, 9vw, 44px); margin: 4px 0 4px; } .ttl p { font-size: 14px; }
  .s-hist .ttl h2, .s-baul .ttl h2, .s-awake .ttl h2 { font-size: 26px; }
  .chat { left: 4px; bottom: calc(4vh + 4px); width: calc(100% - 8px); gap: 2px; }
  .msg p { font-size: 13px; padding: 9px 12px 9px 16px; margin: 0 0 8px -8px; border-width: 2px; } .msg.r p { padding: 9px 16px 9px 12px; margin: 0 -8px 8px 0; }
  .msg p > b { font-size: 10px; margin-top: -19px; padding: 4px 8px; } .av { width: 66px; height: 78px; }
  .hud { gap: 4px; top: calc(var(--bar) + 4vh + 4px); width: calc(100% - 12px); } .rec small { font-size: 9px; } .rec b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rec { min-width: 0; flex: 1; padding: 4px; } .rec b { font-size: 11px; }
  .chapters { display: none; }
  .hero-mid { top: calc(var(--bar) + 1vh); } .hero-logo { width: min(70vw, 30vh); } .hero-mid p { font-size: 14px; margin-bottom: 12px; }
  .hero-stats { margin-top: 2vh; gap: 6px; } .hero-stats span { font-size: 10.5px; }
  .s-hero .art { height: 34%; bottom: 0; } #h2, #h4 { display: none; } .hero-chat { display: none; }
  .door { padding: 11px 16px; font-size: 13px; }
  .stamp { top: 6%; padding: 6px 16px 8px; } .stamp.small { top: 34%; }
  .tally { left: 4%; width: 92%; top: -8%; grid-template-columns: 1fr 1fr; } .vs { padding: 6px 8px; gap: 6px; } .vs span { font-size: 10px; } .vs span br { display: none; }
  .bars { right: 3%; width: 54%; top: -6%; gap: 6px; } .bgrp { padding: 6px 8px 8px; } .bar { height: 24px; margin-top: 5px; } .bar b { font-size: 12px; } .bar em { font-size: 9px; } #k4shot { display: none; }
  .ladder { left: 3%; top: -4%; width: 96px; } .ladder span { padding: 4px 6px; font-size: 11px; } .ladder i { right: -18px; }
  .seedline { top: -8%; } .seedline span { padding: 5px 8px; font-size: 11px; } .seedline b { font-size: 16px; }
  .roster { left: 40%; right: 3%; top: -4%; gap: 6px; } .seeds th { padding: 4px 5px; font-size: 8px; } .seeds td { padding: 3px 5px; font-size: 10.5px; } .dots { gap: 2px; } .count { gap: 6px; } .count span { font-size: 11px; }
  .keepcard { left: 56%; width: 42%; bottom: 24%; } .plate { padding: 6px 8px; } .plate > div { flex-direction: column; gap: 4px; } .utc { padding: 3px 6px; font-size: 10px; } .utc b { font-size: 12px; }
  #plB { left: 23% !important; bottom: 68% !important; } #plK { left: 77% !important; bottom: 68% !important; } .dial { width: 12vh; left: 50%; top: 36%; }
  .clock { left: 3%; right: 3%; top: -12%; padding: 8px 12px; }
  .matches { left: 40%; right: 3%; top: -10%; gap: 5px; } .match { grid-template-columns: 1fr auto; padding: 5px 8px; gap: 5px; } .match small { display: none; } .mbar { height: 22px; font-size: 11px; line-height: 22px; } .match em { font-size: 9px; padding: 3px 5px; }
  .match-foot { flex-direction: column; align-items: stretch; gap: 6px; } #arkShot { display: none; }
  .langs { left: 3%; right: 3%; top: -30%; gap: 6px; } .langs span { padding: 6px 12px; font-size: 12px; }
  .s-fin .ttl p { font-size: 13px; } .fin-cta { gap: 6px; } .fin-cta .door { padding: 9px 12px; font-size: 11px; } #k4stamp { left: 70%; top: 50%; }
  .page-head { grid-template-columns: 1fr; padding: 3vh 18px 0; min-height: 0; } .ph-art { height: 30vh; order: 2; } .ph-txt { padding-bottom: 1vh; }
  .closer { flex-direction: column; text-align: center; } .closer > img { height: 150px; } .closer .hero-cta { justify-content: center; }
  .king { grid-template-columns: 1fr; } .king > div { max-width: 100%; } .king-art { opacity: .25; }
  .book { padding: 16px 14px; } .book > header img { width: 60px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) { .wipe-run img, .horde .run img, .scroll-hint i { animation: none; } }
@media (min-width: 861px) { #k3stamp { left: 30%; top: 24%; } #k4stamp { left: 43%; top: 36%; } }

/* ================= GATE + LOGO ================= */
.logo { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 14px 22px #000a); }
body.gated { overflow: hidden; }
#gate { position: fixed; inset: 0; z-index: 90; overflow: hidden; text-align: center; background: linear-gradient(#050b1c 0, #0e2350 55%, #173a78 100%); cursor: pointer; }
#forest { position: absolute; inset: 0; }
.moon { position: absolute; left: 50%; top: 30%; width: 90vmin; height: 90vmin; margin: -45vmin 0 0 -45vmin; border-radius: 50%; background: radial-gradient(circle, #9fd0ff66 0, #4f8fe033 30%, transparent 65%); }
.fl { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; transform-origin: 50% 72%; }
.f1 { height: 62%; opacity: .85; } .f2 { height: 82%; }
.fog { position: absolute; left: -30%; right: -30%; bottom: 0; height: 46%; background: radial-gradient(60% 100% at 30% 100%, #bfe0ff40, transparent 70%), radial-gradient(50% 90% at 75% 100%, #bfe0ff33, transparent 70%); filter: blur(12px); animation: drift 14s ease-in-out infinite alternate; }
.fog.b { height: 30%; animation-duration: 9s; animation-direction: alternate-reverse; }
@keyframes drift { to { transform: translateX(8%); } }
.eyes { position: absolute; left: 50%; top: 56%; width: 46px; margin-left: -23px; display: flex; justify-content: space-between; }
.eyes i { width: 13px; height: 8px; border-radius: 60% 60% 50% 50%; background: #bfe6ff; box-shadow: 0 0 14px 5px #4fb0ff, 0 0 40px 12px #2f7fe0; }
.wolf { position: absolute; left: 50%; top: 50%; width: 46vmin; height: 46vmin; margin: -23vmin 0 0 -23vmin; border-radius: 50%; overflow: hidden; -webkit-mask: radial-gradient(circle, #000 50%, transparent 70%); mask: radial-gradient(circle, #000 50%, transparent 70%); }
.wolf img { position: absolute; width: 184%; max-width: none; left: -42%; top: -28%; }
#ice { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
#gateFlash { position: absolute; inset: 0; background: radial-gradient(circle, #fff 0, #bfe6ff 40%, #6fb8ff 100%); pointer-events: none; z-index: 5; }
.lockup { position: absolute; left: 0; right: 0; top: 50%; display: grid; justify-items: center; gap: 1.2vmin; z-index: 3; pointer-events: none; }
.crest-wrap { position: relative; width: min(46vmin, 320px); aspect-ratio: 1; filter: drop-shadow(0 0 40px #4f9fffaa); }
.crest-wrap img { position: absolute; inset: 0; width: 100%; }
.crest-a { clip-path: polygon(0 0, 35% 0, 35% 20.5%, 65% 20.5%, 65% 0, 100% 0, 100% 100%, 0 100%); }
.crest-b { clip-path: inset(0 35% 79.5% 35%); filter: drop-shadow(0 0 14px #ffd978); }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 5px solid #cfeaff; box-shadow: 0 0 40px 10px #6fb8ffaa, inset 0 0 30px #6fb8ffaa; }
.kd { font: 800 clamp(13px, 2.6vmin, 24px) 'Cinzel', serif; color: #cfe6ff; text-shadow: 0 0 18px #4f9fff; padding-left: .5em; }
.digits { display: flex; gap: .06em; font: 900 clamp(64px, 17vmin, 190px)/.95 'Cinzel', serif; direction: ltr; }
.digits b { display: block; background: linear-gradient(#ffffff 8%, #cfe6ff 38%, #6ea4e6 62%, #dff0ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 5px 0 #0a1a3c) drop-shadow(0 0 22px #4f9fff); }
.gate-in { position: absolute; left: 0; right: 0; margin: 0 auto; bottom: 9vh; width: min(94vw, 720px); display: grid; gap: 14px; justify-items: center; z-index: 6; cursor: default; }
.gate-sub { font: 800 13px var(--body); letter-spacing: .08em; color: #cfe6ff; }
.gate-langs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.gate-langs button { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 14px; font: 800 17px 'Manrope', 'Cairo', sans-serif; color: #fff; background: #0b1630cc; border: 2px solid #6fb8ff88; backdrop-filter: blur(6px); transition: .15s; box-shadow: 0 8px 24px #0008; }
.gate-langs button:hover { background: #1c3466; border-color: var(--gold-lit); transform: translateY(-3px); }
.gate-langs .flag-ic { width: 36px; height: 24px; }
.lang-menu button { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; font: 700 14px var(--body); background: #ffffff12; border: 1.5px solid #ffffff26; transition: .15s; }
.lang-menu button:hover { background: #ffffff26; }
.gate-langs button.on, .lang-menu button.on { border-color: var(--gold-lit); color: var(--gold-lit); }
.cine-rays, .rays { position: absolute; left: 50%; top: 42%; width: 240vmax; height: 240vmax; margin: -120vmax 0 0 -120vmax; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, #ffe9a800 0 7deg, #ffe9a822 9deg 12deg, #ffe9a800 14deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 0, transparent 46%); mask: radial-gradient(circle, #000 0, transparent 46%); animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.flag-ic { width: 27px; height: 18px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px #0006; }
.credit { font: 700 12px var(--body); letter-spacing: .12em; color: var(--gold); opacity: .85; }
#gate .credit { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 6; }
/* top-bar tools */
.tools { display: flex; align-items: center; gap: 6px; flex: none; }
.lang { position: relative; }
.lang-btn, .snd { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px; border-radius: 10px; background: #ffffff12; border: 1px solid var(--line); font: 800 12px var(--body); }
.lang-btn:hover, .snd:hover { background: #ffffff26; }
.lang-menu { position: absolute; right: 0; top: 44px; display: none; gap: 6px; padding: 8px; border-radius: 12px; background: #0b1630f5; border: 1px solid var(--line); box-shadow: 0 16px 40px #000a; min-width: 170px; }
.lang.open .lang-menu { display: grid; }
.snd svg { width: 20px; height: 20px; } .snd { color: var(--dim); } .snd[aria-pressed="true"] { color: var(--gold-lit); border-color: var(--gold-lit); }
.snd[aria-pressed="true"] .x, .snd[aria-pressed="false"] .w { display: none; }

/* ================= CINEMA ================= */
.lb { position: absolute; left: 0; right: 0; height: 4vh; background: #000; z-index: 38; pointer-events: none; }
.lb.top { top: var(--bar); transform-origin: 50% 0; } .lb.bot { bottom: 0; transform-origin: 50% 100%; }
.fx-vig { position: absolute; inset: 0; z-index: 24; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 52%, #000b 100%); }
.fx-grain { position: absolute; inset: -50%; z-index: 26; pointer-events: none; opacity: .09; mix-blend-mode: overlay; animation: grain .6s steps(4) infinite;
  background: 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='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-4%, 3%); } 50% { transform: translate(3%, -5%); } 75% { transform: translate(-2%, -3%); } }
.scene .rays { left: 78%; top: 30%; opacity: .55; mix-blend-mode: screen; animation-duration: 140s; z-index: 1; }
.s-hist .rays, .s-baul .rays, .s-who .rays { opacity: .25; }
.army { position: absolute; inset: 0; z-index: 2; }
.army img { position: absolute; width: auto; max-width: none; filter: brightness(.12) saturate(.4) blur(.6px); opacity: .8; }
.s-k1 .army, .s-k4 .army { -webkit-mask: linear-gradient(90deg, transparent 30%, #000 60%); mask: linear-gradient(90deg, transparent 30%, #000 60%); }
.scene .bg::after { z-index: 3; }
.cine { position: absolute; inset: 0; z-index: 36; overflow: hidden; pointer-events: none;
  background: radial-gradient(60% 80% at 68% 46%, #f0b45a 0, #a8571f 28%, #3a1a0c 60%, #0b0605 100%); }
.cine-rays { left: 68%; top: 40%; mix-blend-mode: screen; opacity: .9; animation: none; }
.cine-hero { position: absolute; right: 4vw; top: 7vh; height: 150vh; width: auto; max-width: none; transform-origin: 50% 30%;
  filter: drop-shadow(-30px 0 50px #000c) drop-shadow(0 0 26px #ffd97855) contrast(1.08) saturate(1.1); }
.cine::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #0b0605f0 0, #0b060580 34%, transparent 62%), linear-gradient(0deg, #0b0605 0, transparent 30%); }
.cine-txt { position: absolute; left: 7vw; top: 50%; transform: translateY(-50%); z-index: 2; }
.cine-txt small { display: block; font: 800 clamp(11px, 1.2vw, 16px) var(--body); letter-spacing: .34em; text-transform: uppercase; color: var(--gold); }
.cine-txt b { display: block; font: 900 clamp(54px, 11vw, 170px)/.95 var(--display); color: var(--parch); text-shadow: 0 8px 0 #000a, 0 0 60px #f0b45a66; margin: 10px 0; }
.cine-txt em { display: inline-block; font: 800 clamp(16px, 2vw, 28px) var(--display); font-style: normal; color: var(--ink); background: linear-gradient(#ffe394, #e0a93a); padding: 6px 18px; border-radius: 6px; }
.cine-slash { position: absolute; left: -10%; top: 46%; width: 120%; height: 10px; z-index: 3; transform: rotate(-14deg); background: linear-gradient(90deg, transparent, #fff 40%, #ffe9a8 60%, transparent); box-shadow: 0 0 40px 12px #ffe9a8aa; }

/* ================= LANGUAGES ================= */
html[lang="ar"] { --display: 'Cairo', sans-serif; --body: 'Cairo', sans-serif; }
html[lang="vi"] { --display: 'Playfair Display', Georgia, serif; }
.rtl .wrap, .rtl .page-head, .rtl .ttl, .rtl .msg p, .rtl .hero-fade, .rtl .closer, .rtl .foot, .rtl .gate-in, .rtl .cine-txt, .rtl .plate, .rtl .stamp, .rtl .tally, .rtl .bgrp, .rtl .clock, .rtl .tag, .rtl .wipe-txt { direction: rtl; }
.rtl .kick, .rtl .gate-sub, .rtl .cine-txt small, .rtl .stamp small, .rtl .when, .rtl .tbl th { letter-spacing: 0; }
.rtl .tbl th, .rtl .seeds th { text-align: right; } .rtl .note { border-left: 0; border-right: 4px solid var(--gold); border-radius: 10px 0 0 10px; } .rtl .note.red { border-right-color: var(--crimson); }
.rtl .tagbtn { direction: ltr; } .rtl .ttl { text-align: right; }
@media (max-width: 860px) {
  .lang-btn, .snd { height: 32px; padding: 0 8px; } .cine-hero { right: -34vw; height: 110vh; top: 26vh; } .cine-txt { left: 5vw; top: 34%; }
  .gate-langs button { padding: 11px 14px; font-size: 15px; } .gate-langs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } .gate-sub { font-size: 11px; }
}
@media (max-width: 860px) { .s-fin .ttl { top: calc(var(--bar) + 4vh + 62px); } }

/* intro: patrol in the mist, title cards, letterbox */
#gate { background: linear-gradient(#03070f 0, #08152f 50%, #10294f 100%); }
.walkers { position: absolute; inset: 0; transform-origin: 50% 80%; }
.wk { position: absolute; transform: translateX(-50%); animation: wkstep 1.1s ease-in-out infinite alternate; }
.wk img { height: 100%; width: auto; max-width: none; filter: brightness(.16) saturate(.4) sepia(1) hue-rotate(180deg) drop-shadow(0 0 10px #0a1730); }
@keyframes wkstep { to { transform: translateX(-50%) translateY(-1.1vh) rotate(1.2deg); } }
.torch { position: absolute; left: 82%; top: 4%; width: 1.3vh; height: 1.3vh; border-radius: 50%; background: #ffe9a8; box-shadow: 0 0 2.4vh 1.2vh #ff9a3c, 0 0 9vh 4vh #ff7a1a66; animation: flick .19s infinite alternate; }
@keyframes flick { to { opacity: .72; transform: scale(.82) translateY(-2px); } }
.redmist { position: absolute; left: -20%; right: -20%; bottom: 0; height: 40%; filter: blur(16px); animation: drift 11s ease-in-out infinite alternate;
  background: radial-gradient(55% 100% at 35% 100%, #a8243a99, transparent 70%), radial-gradient(50% 90% at 72% 100%, #8a1c3088, transparent 70%); }
.credits { position: absolute; left: 0; right: 0; top: 44%; z-index: 4; pointer-events: none; }
.credits span { position: absolute; left: 0; right: 0; font: 600 clamp(13px, 2.3vw, 30px) 'Cinzel', serif; letter-spacing: .62em; padding-left: .62em; color: #dfe9f7; text-shadow: 0 0 22px #000, 0 2px 8px #000; }
.glb { position: absolute; left: 0; right: 0; height: 10vh; background: #000; z-index: 5; pointer-events: none; }
.glb.top { top: 0; transform-origin: 50% 0; } .glb.bot { bottom: 0; transform-origin: 50% 100%; }
#gate .credit { z-index: 7; }

.yt-music { justify-self: center; margin: 10px 0 4px; border-radius: 8px; overflow: hidden; opacity: .8; line-height: 0; }
/* short landscape windows: everything a size smaller so nothing stacks */
@media (max-height: 640px) and (min-width: 861px) {
  .ttl { top: calc(var(--bar) + 4vh + 48px); } .ttl h2 { font-size: clamp(26px, 7vh, 44px); margin: 2px 0 4px; } .ttl p { font-size: 14px; }
  .s-hist .ttl h2, .s-baul .ttl h2, .s-awake .ttl h2 { font-size: clamp(20px, 5vh, 30px); }
  .chat { width: min(400px, 44vw); gap: 0; bottom: calc(4vh + 4px); }
  .msg p { font-size: 12.5px; line-height: 1.3; padding: 8px 12px 8px 16px; margin-bottom: 6px; } .msg.r p { padding: 8px 16px 8px 12px; margin-bottom: 6px; }
  .msg p > b { font-size: 9.5px; padding: 3px 7px; margin: -17px 0 4px -2px; } .av { width: 62px; height: 70px; }
  .rec { padding: 3px 8px 4px; min-width: 78px; } .rec b { font-size: 11px; }
  .vs { padding: 4px 12px; } .vs b { font-size: 24px; } .tally { gap: 4px; }
  .bgrp { padding: 6px 10px 8px; } .bar { height: 24px; margin-top: 5px; } .bars { gap: 6px; } #k4shot { display: none; }
  .seeds th { padding: 4px 8px; } .roster { gap: 6px; } .dots { width: min(100%, 36vh); gap: 3px; }
  .plate { padding: 5px 8px; } .utc small { display: none; } .dial { width: 18vh; }
  .match { padding: 4px 10px; } .matches { gap: 4px; } .mbar { height: 22px; line-height: 22px; font-size: 12px; } #arkShot { display: none; }
  .hero-logo { width: min(40vw, 30vh); } .hero-mid p { font-size: 13px; margin-bottom: 8px; } .hero-stats { margin-top: 1vh; } .hero-stats li { padding: 5px; } .hero-stats span { display: none; }
  .hero-chat, .scroll-hint { display: none; }
}

/* phones: drop the heavy layers (rotating light, grain, blurred armies, per-figure shadows) that exhaust mobile browser memory */
@media (max-width: 860px), (pointer: coarse) {
  .rays, .cine-rays, .fx-grain, .army { display: none !important; }
  .ch, .wk img, .cine-hero, .wipe-host, .wipe-run img, .horde .run img, .ph-art img, .closer > img { filter: none !important; }
  .ch.foe { filter: brightness(.55) saturate(.6) !important; }
  .wk img { filter: brightness(.16) !important; }
  .msg { filter: none; } .msg p { box-shadow: 0 6px 14px #0008, inset 0 -3px 0 #e3c779; }
  .fog, .redmist { filter: blur(8px); animation: none; }
  .av img { animation: none; }
  .scene .bg { translate: none; } .art { translate: none; }
}

/* ===== phones: three fixed bands — title, picture, one speech bubble — so nothing can overlap ===== */
@media (max-width: 860px) {
  .hud { top: calc(var(--bar) + 4vh + 4px); } .rec { padding: 3px 4px; } .rec small { font-size: 8.5px; } .rec b { font-size: 10.5px; }
  .ttl { top: calc(var(--bar) + 4vh + 46px); left: 12px; right: 12px; }
  .ttl .kick { font-size: 10px; letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ttl h2 { font-size: 26px !important; margin: 2px 0 2px; line-height: 1.05; }
  .ttl p { font-size: 12.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .s-hist .ttl h2, .s-baul .ttl h2, .s-awake .ttl h2 { font-size: 19px !important; } .s-hist .ttl p, .s-baul .ttl p, .s-awake .ttl p { display: none; }
  .scene:not(.s-hero):not(.s-fin) .art, .scene:not(.s-hero):not(.s-fin) .art.wide { left: 0; width: 100%; top: calc(var(--bar) + 4vh + 132px); bottom: calc(4vh + 112px); height: auto; }
  .chat { display: grid; left: 4px; width: calc(100% - 8px); bottom: calc(4vh + 4px); }
  .chat .msg { grid-area: 1 / 1; align-self: end; } .chat .msg.r { justify-self: end; }
  .msg p { font-size: 12.5px; line-height: 1.3; padding: 8px 11px 8px 14px; margin: 0 0 6px -6px; max-height: 92px; overflow: hidden; } .msg.r p { padding: 8px 14px 8px 11px; margin: 0 -6px 6px 0; }
  .msg p > b { font-size: 9.5px; margin: -17px 0 4px -2px; padding: 3px 7px; } .av { width: 58px; height: 68px; }
  /* widgets sit at the top of the picture band */
  .tally { left: 2%; width: 96%; top: 0; gap: 4px; } .vs { padding: 4px 6px; gap: 4px; } .vs b { font-size: 20px; } .vs span { font-size: 9.5px; line-height: 1.15; }
  .flag { font-size: 13px; padding: 4px 9px 11px; }
  .seedline { top: 0; left: 2%; } .tag { font-size: 10px; padding: 4px 7px; }
  .ladder { left: 2%; top: 0; width: 88px; gap: 3px; } .bars { right: 2%; width: 58%; top: 0; gap: 4px; } .bgrp { padding: 4px 7px 6px; } .bgrp small { font-size: 9px; } .bar { height: 20px; margin-top: 4px; } .bar b { font-size: 11px; }
  .stamp { top: 34%; padding: 4px 12px 6px; border-width: 4px; } .stamp b { font-size: 26px; } .stamp small { font-size: 9px; letter-spacing: .1em; } .stamp.small { top: 52%; left: 60%; } .stamp.small b { font-size: 20px; }
  #k4stamp { left: 72%; top: 62%; }
  .roster { left: 38%; right: 2%; top: 0; gap: 4px; } .seeds th { font-size: 7.5px; padding: 3px 4px; } .seeds td { font-size: 10px; padding: 2px 4px; }
  .count b { font-size: 26px; } .count span { font-size: 10px; } .count em { font-size: 10px; padding: 2px 6px; } .dots { width: min(100%, 26vh); gap: 2px; }
  #plB { left: 24% !important; top: 0; bottom: auto !important; } #plK { left: 76% !important; top: 0; bottom: auto !important; }
  .plate { padding: 4px 6px; } .plate > b { font-size: 12px; } .plate > small { font-size: 10px; } .plate > div { flex-direction: row; gap: 4px; margin-top: 4px; } .utc { padding: 2px 5px; font-size: 9px; } .utc b { font-size: 11px; } .utc small { display: none; }
  .dial { width: 10vh; left: 50%; top: 30%; } .keepcard { left: 58%; width: 40%; bottom: 14%; border-width: 2px; }
  .clock { left: 2%; right: 2%; top: 0; padding: 6px 10px; } .clock > b { font-size: 15px; } .clock-bar { height: 14px; margin: 14px 0 3px; } .clock-ticks { font-size: 9px; }
  .matches { left: 34%; right: 2%; top: 0; gap: 3px; } .match { padding: 3px 6px; } .mbar { height: 18px; line-height: 18px; font-size: 10.5px; } .match-foot .door { padding: 7px 8px; font-size: 10px; }
  .langs { left: 2%; right: 2%; top: 0; gap: 5px; } .langs span { padding: 5px 10px; font-size: 11.5px; }
  .pod b { font-size: 16px; }
  .s-fin .ttl { top: calc(var(--bar) + 4vh + 46px); width: calc(100% - 24px); } .s-fin .ttl p { -webkit-line-clamp: 4; }
  .s-fin .art { top: auto; height: 32%; bottom: 5%; }
}
@media (max-width: 860px) {
  .msg p { max-height: none; overflow: visible; }
  .chat { bottom: 66px; }   /* clears the host's badge in the corner */
  .scene:not(.s-hero):not(.s-fin) .art, .scene:not(.s-hero):not(.s-fin) .art.wide { bottom: 176px; }
}
.scene .bg { isolation: isolate; }   /* the ground must never stack above the figures */
@media (max-width: 860px) { .hero-chat { display: none !important; } }
.yt-music { position: absolute; left: -9999px; width: 200px; height: 113px; opacity: 0; pointer-events: none; margin: 0; }   /* music player kept off-screen */
/* KVK 3: the result stamp sits in the empty left half, clear of the podium labels */
@media (min-width: 861px) { #k3stamp { left: 20%; top: 44%; } #k3stamp b { font-size: clamp(30px, 4vw, 58px); } }
@media (max-width: 860px) { #k3stamp { left: 27%; top: 58%; } }
#k4stamp small { display: block; max-width: 20ch; margin: 2px auto 0; letter-spacing: .08em; line-height: 1.25; }
@media (min-width: 861px) { #k4stamp { left: 40%; top: 40%; } #k4stamp b { font-size: clamp(30px, 4vw, 58px); } }

/* live DKP table */
.dkp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.dkp-stats div { background: linear-gradient(#16284f, #101d3c); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.dkp-stats span { display: block; font: 800 11px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); } .dkp-stats b { font: 900 24px var(--display); color: var(--gold-lit); }
.dkp-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.dkp-tools input { flex: 1 1 220px; padding: 11px 14px; border-radius: 10px; border: 1.5px solid #ffffff30; background: #0b1630; color: #fff; font: inherit; }
.dkp-chips { display: flex; gap: 6px; flex-wrap: wrap; } .dkp-chips button { padding: 8px 13px; border-radius: 999px; font: 700 13px var(--body); color: var(--dim); border: 1px solid #ffffff26; }
.dkp-chips button.on { color: var(--ink); background: var(--gold-lit); border-color: var(--gold-lit); }
.dkp-wrap { max-height: 72vh; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #101d3c; margin-bottom: 40px; }
.dkp-table th { position: sticky; top: 0; background: #0b1630; z-index: 1; } .dkp-table th.s { cursor: pointer; } .dkp-table th.s.on { color: #fff; } .dkp-table th.s.on::after { content: ' ↕'; }
.dkp-table td { padding: 8px 10px; } .dkp-table .gov b { display: block; font-weight: 800; } .dkp-table .gov small { color: var(--dim); font-size: 11px; }
.dkp-table td.dkp { color: var(--gold-lit); } .dkp-table tr.top td { background: #e9b94914; }
.meter { position: relative; width: 110px; height: 20px; border-radius: 6px; background: #ffffff1a; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #a52a20, #d9503f); } tr.ok .meter i { background: linear-gradient(90deg, #2f8f55, #7be39a); }
.meter span { position: relative; display: block; text-align: center; font: 800 12px/20px var(--body); text-shadow: 0 1px 2px #000; }
.admin-link { font: 700 12px var(--body); color: var(--dim); text-decoration: none; opacity: .7; } .admin-link:hover { color: var(--gold-lit); opacity: 1; }
.rtl .dkp-table th { text-align: right; }

/* ================= HOME ================= */
.home-hero { position: relative; overflow: hidden; display: grid; place-items: center; text-align: center; min-height: 46vh; padding: 3vh 16px 2vh; background: radial-gradient(80% 90% at 50% 100%, #2b4a8f, #13244a 55%, #0b1630); border-bottom: 3px solid var(--gold); }
.home-logo { width: min(78vw, 40vh, 420px); margin: 0 auto 6px; }
.home-hero > img { position: absolute; bottom: -4%; height: 92%; width: auto; max-width: none; filter: drop-shadow(0 14px 12px #000a); }
.hh-l { left: max(2vw, calc(50% - 560px)); } .hh-r { right: max(2vw, calc(50% - 560px)); }
.home-wrap { display: grid; gap: 20px; padding-top: 32px; }
.hcard { position: relative; background: linear-gradient(#16284f, #101d3c); border: 1px solid var(--line); border-radius: 20px; padding: 24px; overflow: hidden; }
.hcard > header { margin-bottom: 16px; max-width: 70ch; } .hcard h2 { font-size: clamp(24px, 3.2vw, 38px); color: var(--parch); margin: 4px 0 8px; } .hcard header p { color: #d5dcf0; }
.hcard .hero-stats { margin: 0 0 18px; } .hcard .dim { margin-top: 14px; }
.hcard.baulur { background: linear-gradient(120deg, #2a3d1e, #13241a 60%); border: 2px solid var(--gold); }
.next { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; padding: 14px 18px; border-radius: 14px; background: #0b1630cc; border: 1px solid var(--line); margin-bottom: 16px; }
.next span { font: 800 12px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); } .next b { font: 900 clamp(18px, 2.4vw, 28px) var(--display); color: var(--parch); } .next em { font: 800 clamp(20px, 2.8vw, 32px) var(--body); font-style: normal; color: var(--gold-lit); font-variant-numeric: tabular-nums; margin-left: auto; direction: ltr; }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; margin-bottom: 16px; }
.bk { display: flex; gap: 14px; align-items: center; background: #ffffff0d; border: 1px solid #ffffff22; border-radius: 16px; padding: 14px; }
.bk > img { height: 120px; width: auto; flex: none; filter: drop-shadow(0 8px 8px #0008); } .bk > img.sq { height: 96px; border-radius: 12px; border: 2px solid #6b4a1c; }
.bk h3 { font-size: 22px; color: var(--parch); } .bk small { color: var(--dim); }
.slots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.slot { padding: 8px 12px; border-radius: 10px; background: #ffffff14; border: 1.5px solid transparent; } .slot b { display: block; font: 900 20px var(--body); } .slot small { color: var(--dim); font-size: 12px; }
.slot.on { background: var(--gold-lit); color: var(--ink); border-color: #fff; box-shadow: 0 0 22px #ffd97888; } .slot.on small { color: #5a3a08; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; } .chips span { background: #0b1630cc; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; text-align: center; } .chips small { display: block; font: 800 10px var(--body); letter-spacing: .14em; color: var(--dim); } .chips b { font: 800 14px var(--body); }
.hcard.royal { background: linear-gradient(120deg, #4a3410, #1c2a52 60%); border: 2px solid var(--gold); }
.king-seal { position: absolute; right: -40px; top: -40px; width: 240px; opacity: .16; pointer-events: none; }
#kingForm { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; } #kingForm .wide { grid-column: 1 / -1; }
#kingForm label span { display: block; font: 800 12px var(--body); letter-spacing: .06em; color: var(--gold-lit); margin-bottom: 5px; }
#kingForm input, #kingForm textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid #ffffff30; background: #0b1630; color: #fff; font: inherit; resize: vertical; }
#kingForm input:focus, #kingForm textarea:focus { outline: none; border-color: var(--gold-lit); }
.hp { position: absolute !important; left: -9999px; width: 1px !important; height: 1px; opacity: 0; }
.form-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .form-msg { font-weight: 700; } .form-msg.ok { color: #7be39a; } .form-msg.err { color: var(--crimson-lit); }
.rtl .hcard, .rtl .home-hero { direction: rtl; }
@media (max-width: 860px) { .home-hero { min-height: 34vh; padding-top: calc(var(--bar) + 2vh); } .home-hero > img { height: 60%; opacity: .5; } .hh-l { left: -8vw; } .hh-r { right: -8vw; } .hcard { padding: 18px 14px; } #kingForm { grid-template-columns: 1fr; } .bk > img { height: 92px; } .next em { margin-left: 0; } }

/* ================= R4 cards: an element for each council member ================= */
@property --fxa { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes fxspin { to { --fxa: 360deg; } }
.lead[class*="fx-"] { --c1: #e9b949; --c2: #ffd978; border-color: transparent; }
.lead[class*="fx-"]::before { content: ''; position: absolute; inset: 0; border-radius: 16px; padding: 2px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--fxa), transparent 0 50%, var(--c1) 68%, var(--c2) 78%, transparent 92%), linear-gradient(#ffffff22, #ffffff22);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: fxspin 4.5s linear infinite; }
.lead[class*="fx-"]:hover { box-shadow: 0 0 34px -6px var(--c1); }
.fx-name { position: relative; isolation: isolate; overflow: hidden; margin: 2px -14px 12px; padding: 12px 14px 13px; }
.fx-name .kick { position: relative; z-index: 1; color: #fff; opacity: .85; text-shadow: 0 1px 4px #000; }
.fx-name h3 { position: relative; z-index: 1; margin: 2px 0 0; font: 900 21px/1.2 var(--body); color: #fff; text-shadow: 0 2px 5px #000d, 0 0 16px var(--c1), 0 0 30px var(--c1); }
.fx, .fx::before, .fx::after { content: ''; position: absolute; inset: 0; z-index: 0; }
/* fire */
.fx-fire { --c1: #ff7b2c; --c2: #ffd35a; } .fx-fire .fx { background: linear-gradient(0deg, #8a1f08, #2a0c06 80%); }
.fx-fire .fx::before { inset: 20% -10% -60%; filter: blur(7px); transform-origin: 50% 100%; animation: flame 1.1s ease-in-out infinite alternate;
  background: radial-gradient(30% 70% at 18% 100%, #ffd35a 0, #ff7b2c 40%, transparent 72%), radial-gradient(34% 90% at 46% 100%, #fff1a8 0, #ff9a3c 38%, transparent 72%), radial-gradient(30% 75% at 76% 100%, #ffd35a 0, #ff5a1c 42%, transparent 72%), radial-gradient(24% 60% at 96% 100%, #ffb347 0, #c0382c 45%, transparent 72%); }
.fx-fire .fx::after { background-image: radial-gradient(#ffe9a8 1.2px, transparent 2px), radial-gradient(#ff9a3c 1px, transparent 2px); background-size: 46px 60px, 70px 90px; background-position: 0 0, 20px 30px; animation: sparks 2.4s linear infinite; opacity: .9; }
@keyframes flame { 0% { transform: scaleY(.86) skewX(-5deg); } 50% { transform: scaleY(1.12) skewX(4deg); } 100% { transform: scaleY(.95) skewX(-2deg) scaleX(1.05); } }
@keyframes sparks { to { background-position: 14px -120px, 6px -150px; } }
/* water */
.fx-water { --c1: #3fa9f5; --c2: #9fe6ff; } .fx-water .fx { background: linear-gradient(#0b3a6b, #062247); }
.fx-water .fx::before { top: 34%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 Q25 8 50 30 T100 30 T150 30 T200 30 V60 H0Z' fill='%233fa9f5aa'/%3E%3C/svg%3E") repeat-x 0 0 / 200px 100%; animation: tide 5s linear infinite; }
.fx-water .fx::after { top: 52%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 Q25 8 50 30 T100 30 T150 30 T200 30 V60 H0Z' fill='%239fe6ff88'/%3E%3C/svg%3E") repeat-x 0 0 / 150px 100%; animation: tide 3.2s linear infinite reverse; }
@keyframes tide { to { background-position-x: 200px; } }
/* lightning */
.fx-lightning { --c1: #7fc4ff; --c2: #eaf6ff; } .fx-lightning .fx { background: radial-gradient(120% 140% at 50% 0, #1c3a7a, #070d22 70%); }
.fx-lightning .fx::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 70'%3E%3Cpath d='M70 0 L48 30 L64 32 L40 70 L58 38 L44 36 Z' fill='%23eaf6ff'/%3E%3Cpath d='M18 4 L8 26 L16 27 L4 52' fill='none' stroke='%239fd0ff' stroke-width='2'/%3E%3Cpath d='M108 10 L98 30 L106 32 L94 60' fill='none' stroke='%239fd0ff' stroke-width='2'/%3E%3C/svg%3E") repeat-x 10px 0 / 150px 100%; animation: strike 3.4s steps(1) infinite; opacity: 0; }
.fx-lightning .fx::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 70'%3E%3Cpath d='M70 0 L48 30 L64 32 L40 70 L58 38 L44 36 Z' fill='%23eaf6ff'/%3E%3Cpath d='M18 4 L8 26 L16 27 L4 52' fill='none' stroke='%239fd0ff' stroke-width='2'/%3E%3Cpath d='M108 10 L98 30 L106 32 L94 60' fill='none' stroke='%239fd0ff' stroke-width='2'/%3E%3C/svg%3E") repeat-x 90px 0 / 190px 100%; animation: strike 4.7s steps(1) -1.6s infinite; opacity: 0; transform: scaleX(-1); }
.fx-lightning .fx-name h3 { animation: surge 3.4s steps(1) infinite; }
@keyframes strike { 0% { opacity: 0; } 86% { opacity: 1; } 88% { opacity: .15; } 90% { opacity: 1; } 93% { opacity: .4; } 96% { opacity: 0; } }
@keyframes surge { 0% { text-shadow: 0 2px 5px #000d, 0 0 16px #7fc4ff; } 86% { text-shadow: 0 0 6px #fff, 0 0 26px #eaf6ff, 0 0 60px #7fc4ff; } 96% { text-shadow: 0 2px 5px #000d, 0 0 16px #7fc4ff; } }
/* lava */
.fx-lava { --c1: #ff5a1c; --c2: #ffc23a; } .fx-lava .fx { background: #1c0a06; }
.fx-lava .fx::before { background: linear-gradient(100deg, #ff7b2c, #ffd35a 20%, #c0382c 40%, #ff5a1c 60%, #ffc23a 80%, #ff7b2c) 0 0 / 300% 100%; animation: flow 6s linear infinite; }
.fx-lava .fx::after { background: repeating-linear-gradient(118deg, #1c0a06 0 16px, transparent 16px 19px), repeating-linear-gradient(28deg, #1c0a06 0 22px, transparent 22px 24px); opacity: .88; }
@keyframes flow { to { background-position-x: -300%; } }
/* poison */
.fx-poison { --c1: #7be33a; --c2: #d6ff8a; } .fx-poison .fx { background: linear-gradient(0deg, #2f6a12, #0c1f0a 85%); }
.fx-poison .fx::before { background-image: radial-gradient(circle, transparent 3px, #b6ff5a 3.5px 5px, transparent 5.5px), radial-gradient(circle, transparent 5px, #7be33a 5.5px 7px, transparent 7.5px), radial-gradient(circle, #d6ff8a 1.5px, transparent 2.5px); background-size: 64px 80px, 96px 110px, 40px 50px; animation: bubbles 4s linear infinite; }
.fx-poison .fx::after { background: radial-gradient(80% 90% at 50% 120%, #7be33a88, transparent 70%); animation: glow 2.2s ease-in-out infinite alternate; }
@keyframes bubbles { to { background-position: 10px -160px, -14px -220px, 6px -100px; } } @keyframes glow { to { opacity: .35; } }
/* ice */
.fx-ice { --c1: #9fe6ff; --c2: #ffffff; } .fx-ice .fx { background: linear-gradient(135deg, #1f5d8f, #0b2748 60%, #17406e); }
.fx-ice .fx::before { background: repeating-conic-gradient(from 20deg at 30% 120%, #ffffff14 0 9deg, transparent 9deg 18deg), repeating-conic-gradient(from 0deg at 85% -20%, #9fe6ff1f 0 7deg, transparent 7deg 16deg); }
.fx-ice .fx::after { inset: 0 -60%; background: linear-gradient(110deg, transparent 40%, #ffffffb0 50%, transparent 60%); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0% { transform: translateX(-60%); } 60%, 100% { transform: translateX(60%); } }
/* arcane */
.fx-arcane { --c1: #b57bff; --c2: #ffb3f5; } .fx-arcane .fx { background: #14072e; }
.fx-arcane .fx::before { inset: -120% -30%; background: conic-gradient(#7a3cff, #ff7bd5, #3ad6ff, #b57bff, #7a3cff); filter: blur(18px); opacity: .75; animation: whirl 7s linear infinite; }
.fx-arcane .fx::after { background-image: radial-gradient(#fff 1px, transparent 1.6px); background-size: 34px 34px; animation: twinkle 1.8s ease-in-out infinite alternate; }
@keyframes whirl { to { transform: rotate(360deg); } } @keyframes twinkle { to { opacity: .2; background-position: 6px 4px; } }
/* shadow */
.fx-shadow { --c1: #9a7bff; --c2: #d9d0ff; } .fx-shadow .fx { background: #07050f; }
.fx-shadow .fx::before { inset: -40% -20%; filter: blur(14px); background: radial-gradient(30% 50% at 25% 55%, #5a3ca8cc, transparent 70%), radial-gradient(34% 55% at 70% 45%, #2a1c5ecc, transparent 70%), radial-gradient(22% 40% at 50% 70%, #8a6be0aa, transparent 70%); animation: smoke 6s ease-in-out infinite alternate; }
.fx-shadow .fx::after { background: linear-gradient(90deg, #07050f 0, transparent 30% 70%, #07050f 100%); }
@keyframes smoke { 0% { transform: translate(-8%, 4%) scale(1); } 100% { transform: translate(8%, -6%) scale(1.25); } }
/* the King: a slow golden sweep */
.king::before { content: ''; position: absolute; inset: 0; border-radius: 18px; padding: 3px; pointer-events: none; background: conic-gradient(from var(--fxa), #e9b949, #fff6c8, #e9b949, #8a5a1c, #e9b949);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: fxspin 7s linear infinite; }
.king h2 { background: linear-gradient(100deg, #e9b949 20%, #fff8cf 40%, #e9b949 60%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: flow 5s linear infinite; }
@media (prefers-reduced-motion: reduce) { .fx, .fx::before, .fx::after, .lead[class*="fx-"]::before, .king::before, .king h2, .fx-name h3 { animation: none !important; } }
/* reward tables: icons must count toward column width (otherwise names run under the numbers); the rank column stays as narrow as its content */
.tbl img { max-width: none; }
.tbl th:first-child, .tbl td.rank { width: 1%; padding-right: 18px; }
.tbl td:nth-child(2), .tbl th:nth-child(2) { padding-right: 22px; }
@media (max-width: 860px) {
  .tbl th { font-size: 10px; letter-spacing: .04em; padding: 6px 6px; } .tbl th img { width: 20px; margin-right: 3px; }
  .tbl td { padding: 8px 6px; font-size: 14px; } .tbl th:first-child, .tbl td.rank { padding-right: 10px; white-space: normal; min-width: 44px; }
  .rank { font-size: 14px; } .award { gap: 5px; } .award img { width: 30px; height: 24px; } .extra { margin-left: 4px; padding: 2px 5px; font-size: 10px; }
}
/* canvas nameplates */
.fxc { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.fx-name { padding: 20px 14px 18px; min-height: 86px; display: flex; flex-direction: column; justify-content: flex-end; background: #0a0f22; }
.fx-name::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(90deg, #000a 0, #0005 45%, transparent 80%), linear-gradient(0deg, #0008, transparent 60%); box-shadow: inset 0 1px 0 #ffffff2e, inset 0 -1px 0 #0009; }
.fx-name h3 { font: 900 23px/1.15 var(--body); letter-spacing: .01em; -webkit-text-stroke: .6px #000a; text-shadow: 0 2px 3px #000, 0 0 12px var(--c1), 0 0 28px var(--c1); }
.fx-name .kick { font-size: 11px; letter-spacing: .2em; }

/* speech-bubble busts: framed on the head that clean.js located in each render */
.av img { left: calc(50% + var(--fx, 0%)); top: var(--fy, 2%); }
/* the King's own hall */
.king { grid-template-columns: minmax(0, 320px) 1fr; padding: 34px 26px 26px; background: radial-gradient(90% 120% at 20% 0, #6b4a10, #2a1c0c 45%, #14203f 100%); box-shadow: 0 0 60px -10px #e9b94966, inset 0 0 0 1px #ffe39433; }
.throne { position: relative; padding-top: 74px; }
.crown { position: absolute; left: 50%; top: -18px; width: 150px; transform: translateX(-50%) rotate(-4deg); filter: drop-shadow(0 8px 10px #000a) drop-shadow(0 0 18px #ffd97866); animation: crownbob 3.4s ease-in-out infinite; z-index: 2; }
@keyframes crownbob { 50% { transform: translateX(-50%) rotate(-2deg) translateY(-5px); } }
.crown .glint { transform-origin: 120px 46px; animation: glint 2.6s ease-in-out infinite; } @keyframes glint { 0%, 60%, 100% { opacity: 0; transform: scale(.3); } 75% { opacity: 1; transform: scale(1.5) rotate(40deg); } }
.king h2 { font-size: clamp(40px, 6vw, 76px); }
@media (max-width: 860px) { .king { grid-template-columns: 1fr; } .crown { width: 120px; } .throne { padding-top: 60px; } }

.av img { height: 185%; }

/* a council member's own banner art sits on top of the card, edge to edge */
.lead .shot.banner { margin: -14px -14px 12px; border: 0; border-radius: 14px 14px 0 0; border-bottom: 2px solid var(--c1, var(--gold)); }
.lead .shot.banner img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 30%; }
.lead.has-banner .tags, .lead.has-banner .dim { max-width: 100%; }
