/* ================================================================
   EMPIRE RP — design system v2 "SEMPER IMPERIUM"
   Cinematic, ultra-modern, spaceforce.com-inspired.
   Self-hosted variable fonts, zero external dependencies.
   ================================================================ */

@font-face {
  font-family: 'Oswald';
  src: url('/assets/fonts/oswald-var.woff2') format('woff2');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #04050a;
  --bg-2: #070910;
  --panel: rgba(255, 255, 255, 0.025);
  --panel-2: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);
  --text: #f2f4f8;
  --muted: #97a2b8;
  --faint: #5d6780;
  --gold: #e8b64c;
  --gold-hot: #ffd87a;
  --gold-dim: rgba(232, 182, 76, 0.12);
  --gold-line: rgba(232, 182, 76, 0.38);
  --red: #ff5a5f;
  --green: #3dd68c;
  --display: 'Oswald', 'Bahnschrift', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Inter', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  --cut: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------------------------------------------------------- base */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint vertical grid + noise atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 110px 110px;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.028;
  pointer-events: none;
  z-index: 90;
  animation: grain 1.4s infinite step-end;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  14% { transform: translate(-2.2%, 1.4%); }
  28% { transform: translate(1.6%, -2.0%); }
  42% { transform: translate(-1.2%, 2.4%); }
  56% { transform: translate(2.4%, 0.8%); }
  70% { transform: translate(-2.0%, -1.6%); }
  84% { transform: translate(1.0%, 2.0%); }
  100% { transform: translate(0, 0); }
}

/* lens vignette (injected by main.js on public pages) */
.cine-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 88;
  background: radial-gradient(120% 92% at 50% 44%, transparent 58%, rgba(2, 3, 6, 0.48) 100%);
}

/* cinematic shutter — page transitions */
.cine-veil { position: fixed; inset: 0; z-index: 210; pointer-events: none; }
.cine-veil i {
  position: absolute;
  left: 0;
  right: 0;
  height: 50.5%;
  background: #020308;
  animation: veil-open 0.8s var(--ease) 0.05s both;
}
.cine-veil i::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.55; }
.cine-veil i:first-child { top: 0; transform-origin: top; }
.cine-veil i:first-child::after { bottom: 0; }
.cine-veil i:last-child { bottom: 0; transform-origin: bottom; }
.cine-veil i:last-child::after { top: 0; }
@keyframes veil-open { from { transform: scaleY(1); } to { transform: scaleY(0); } }
body.leaving .cine-veil i { animation: veil-close 0.3s ease-in both; }
@keyframes veil-close { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* trailer-style tracking-in on headline reveals */
h1[data-reveal], .sec-head[data-reveal] h2 { letter-spacing: 0.14em; transition-property: opacity, transform, letter-spacing; }
.sec-head[data-reveal] h2 { transition: letter-spacing 1.3s var(--ease); }
h1[data-reveal].in { letter-spacing: 0.01em; }
.sec-head[data-reveal].in h2 { letter-spacing: 0.01em; }

/* ghost words drift at depth (main.js parallax drives --gpy) */
.ghost { transform: translateY(var(--gpy, 0px)); will-change: transform; }

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

main, .site-header, .site-footer, .staff-side, .staff-main, .login-wrap, .err-wrap { position: relative; z-index: 1; }

::selection { background: var(--gold); color: #0a0802; }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c2233; border: 3px solid var(--bg); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

img, svg { vertical-align: middle; }
a { color: var(--gold-hot); text-decoration: none; }
a:hover { text-decoration: none; }
p { margin: 0 0 1em; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.04;
  margin: 0 0 0.45em;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); letter-spacing: 0.04em; }

kbd {
  font-family: var(--mono);
  font-size: 0.8em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.12em 0.5em;
  color: var(--gold-hot);
  white-space: nowrap;
}
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 0.08em 0.42em;
  color: #cdd6e6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.gold { color: var(--gold-hot); }

/* ------------------------------------------------------ utilities */

.kicker {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--gold); flex-shrink: 0; }

.sec-num {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: var(--faint);
}

/* scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }

/* scroll progress hairline */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-hot));
  z-index: 200;
  box-shadow: 0 0 12px rgba(232, 182, 76, 0.7);
}

/* ------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 15px 32px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.25s;
  position: relative;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-hot), var(--gold));
  color: #140e02;
  box-shadow: 0 0 0 rgba(232, 182, 76, 0);
}
.btn-gold:hover { box-shadow: 0 8px 34px rgba(232, 182, 76, 0.35); }

.btn-line {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}
.btn-line:hover { box-shadow: inset 0 0 0 1px var(--gold), 0 8px 30px rgba(232, 182, 76, 0.14); color: var(--gold-hot); }

/* legacy aliases (staff panel uses these) */
.btn-outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.btn-outline:hover { box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-hot); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 9px 18px; font-size: 0.72rem; --cut: 9px; }
.btn[disabled] { opacity: 0.5; cursor: wait; }

/* --------------------------------------------------------- header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(4, 5, 10, 0.82);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line-soft);
}

.nav { display: flex; align-items: center; height: 76px; gap: 30px; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}
.nav-brand img { width: 30px; height: 30px; filter: drop-shadow(0 0 10px rgba(232, 182, 76, 0.45)); }
.nav-brand .tag {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--gold);
  border: 1px solid var(--gold-line);
  padding: 3px 9px 2px;
}

.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-links > a {
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 16px;
  position: relative;
  transition: color 0.25s;
}
.nav-links > a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links > a:hover, .nav-links > a.active { color: var(--text); }
.nav-links > a:hover::after, .nav-links > a.active::after { transform: scaleX(1); }
.nav-cta { margin-left: 14px; }

.nav-burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  padding: 9px 13px;
  cursor: pointer;
  z-index: 130;
}

/* fullscreen mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 8, 0.97);
  backdrop-filter: blur(20px);
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 36px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--display);
  font-size: clamp(2rem, 9vw, 3.2rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: baseline;
  gap: 18px;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), color 0.25s;
}
.mobile-menu.open a { transform: none; opacity: 1; }
.mobile-menu a:hover { color: var(--gold-hot); }
.mobile-menu a .mi { font-size: 0.75rem; font-weight: 300; letter-spacing: 0.3em; color: var(--faint); }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
}

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

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 130px 0 90px;
  overflow: clip;
}
.hero::before {
  /* golden city-glow horizon */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -42%;
  width: 160%;
  height: 80%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 100%, rgba(232, 182, 76, 0.20) 0%, rgba(232, 182, 76, 0.06) 38%, transparent 68%);
  pointer-events: none;
}
.hero::after {
  /* perspective grid floor */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 200%;
  height: 42%;
  transform: translateX(-50%) perspective(420px) rotateX(62deg);
  transform-origin: bottom;
  background-image: linear-gradient(rgba(232, 182, 76, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 182, 76, 0.13) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(transparent, #000 78%);
  mask-image: linear-gradient(transparent, #000 78%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 2; }

/* WebGL terrain canvas (injected by hero-gl.js on the homepage) */
#hero-gl {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero.gl-on::after { opacity: 0.25; } /* CSS grid floor steps back when the 3D terrain is live */

/* hero title depth rig: follows the pointer a few degrees (JS sets --hx/--hy) */
.hero-rig {
  transform: perspective(1100px)
    rotateY(calc(var(--hx, 0) * 4deg))
    rotateX(calc(var(--hy, 0) * -3deg));
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.15s linear;
}
.hero-rig .hero-title { transform: translateZ(46px); }
.hero-rig .hero-sub { transform: translateZ(26px); }
.hero-rig .hero-actions { transform: translateZ(34px); }
.hero-rig .kicker { transform: translateZ(14px); }

/* slow specular sheen breathing across the gold title */
.hero-title .accent {
  background-size: 220% 220%;
  animation: gold-sheen 7s ease-in-out infinite;
}
@keyframes gold-sheen {
  0%, 100% { background-position: 0% 30%; }
  50% { background-position: 90% 70%; }
}

.hero-title {
  font-size: clamp(4.2rem, 14.5vw, 12.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0.005em;
  margin: 0 0 26px;
}
.hero-title .row { display: block; overflow: hidden; }
.hero-title .row span { display: inline-block; transform: translateY(110%); animation: rise 1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { transform: none; } }

.hero-title .accent {
  color: transparent;
  background: linear-gradient(160deg, var(--gold-hot) 20%, var(--gold) 55%, #8a6420 95%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-title .outline {
  color: transparent;
  -webkit-text-stroke: 2px rgba(242, 244, 248, 0.85);
}

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 40px;
  font-weight: 400;
}
.hero-sub b { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* HUD status readout */
.hud {
  position: absolute;
  right: 28px;
  bottom: 34px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(4, 5, 10, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  padding: 14px 18px;
  min-width: 240px;
}
.hud::before, .hud::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--gold);
}
.hud::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.hud::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.hud-row { display: flex; justify-content: space-between; gap: 24px; padding: 2px 0; }
.hud-row .v { color: var(--text); }
.hud-row .v.ok { color: var(--green); }
.hud-row .v.bad { color: var(--red); }
.hud-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 7px;
  animation: pulse 1.6s ease infinite;
}
.hud-dot.bad { background: var(--red); animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(61, 214, 140, 0.5); } 50% { opacity: 0.55; box-shadow: 0 0 0 6px rgba(61, 214, 140, 0); } }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--display);
  font-size: 0.66rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--gold), transparent);
  animation: drip 2s ease infinite;
}
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: top; } 56% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

@media (max-width: 760px) {
  .hud { position: static; margin-top: 44px; display: inline-block; }
  .scroll-cue { display: none; }
}

/* -------------------------------------------------------- marquee */

.marquee {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.014);
  overflow: hidden;
  padding: 18px 0;
  position: relative;
}
.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 34px;
  white-space: nowrap;
}
.marquee-track span::after { content: "◆"; color: var(--gold); font-size: 0.6rem; margin-left: 64px; vertical-align: 2px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------- sections */

.section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }

.sec-head { max-width: 780px; margin-bottom: clamp(40px, 6vw, 70px); }
.sec-head h2 .thin { font-weight: 300; color: var(--muted); }
.sec-head p { color: var(--muted); font-size: 1.04rem; max-width: 620px; }

/* ghost word behind a section */
.ghost-wrap { position: relative; }
.ghost {
  position: absolute;
  top: -0.28em;
  right: -0.04em;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(6rem, 19vw, 17rem);
  line-height: 1;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.055);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}

/* stacked declaration (WE ARE ...) */
.declare {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 6.4rem);
  line-height: 1.02;
  text-transform: uppercase;
  margin: 0;
}
.declare .dim { color: transparent; -webkit-text-stroke: 1.5px rgba(242, 244, 248, 0.32); }
.declare .lit { color: var(--gold-hot); }

/* chapter rows (numbered features) */
.chapter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 90px);
  align-items: center;
  padding: clamp(50px, 7vw, 90px) 0;
  border-top: 1px solid var(--line-soft);
  position: relative;
}
.chapter:last-of-type { border-bottom: 1px solid var(--line-soft); }
.chapter:nth-child(even) .chapter-media { order: -1; }
@media (max-width: 880px) {
  .chapter { grid-template-columns: 1fr; }
  .chapter:nth-child(even) .chapter-media { order: 0; }
}

.chapter-num {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(3.4rem, 6vw, 5.4rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold-line);
  margin-bottom: 14px;
}
.chapter h3 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); margin-bottom: 16px; }
.chapter p { color: var(--muted); }

.chapter-media {
  position: relative;
  min-height: 300px;
  border: 1px solid var(--line);
  background:
    radial-gradient(420px 260px at 30% 20%, rgba(232, 182, 76, 0.14), transparent 60%),
    radial-gradient(380px 300px at 80% 90%, rgba(90, 130, 220, 0.10), transparent 65%),
    var(--bg-2);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.chapter-media .glyph { font-size: clamp(4rem, 8vw, 7rem); filter: drop-shadow(0 0 30px rgba(232, 182, 76, 0.35)); }
.chapter-media .scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(transparent 0 3px, rgba(255, 255, 255, 0.015) 3px 4px);
  pointer-events: none;
}
.chapter-media .coords {
  position: absolute;
  bottom: 12px;
  left: 16px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c9d2e2;
  border: 1px solid var(--line);
  padding: 7px 14px 6px;
  white-space: nowrap;
  transition: border-color 0.25s, color 0.25s;
}
.chip:hover { border-color: var(--gold-line); color: var(--gold-hot); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-hot);
}
.link-more::after { content: "→"; transition: transform 0.3s var(--ease); }
.link-more:hover::after { transform: translateX(8px); }

/* ---------------------------------------------------------- cards */

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  padding: 30px 28px;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid transparent;
  transition: border-color 0.3s;
}
.card::before { top: -1px; left: -1px; border-right: none !important; border-bottom: none !important; }
.card::after { bottom: -1px; right: -1px; border-left: none !important; border-top: none !important; }
.card:hover { border-color: var(--line); background: var(--panel-2); transform: translateY(-4px); }
.card:hover::before, .card:hover::after { border-color: var(--gold); }

a.card { color: var(--text); display: block; }
.card .icon { font-size: 1.7rem; margin-bottom: 14px; display: block; filter: grayscale(0.15); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 0.93rem; }
.card-arrow {
  color: var(--gold-hot);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin-top: 18px;
  display: inline-block;
}

/* ---------------------------------------------------------- stats */

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-soft); }
@media (max-width: 880px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
.metric {
  padding: clamp(28px, 4vw, 48px) 20px;
  text-align: center;
  border-right: 1px solid var(--line-soft);
  position: relative;
}
.metric:last-child { border-right: none; }
@media (max-width: 880px) { .metric:nth-child(2) { border-right: none; } .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); } }
.metric .num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1;
  color: var(--gold-hot);
}
.metric .num .suffix { font-size: 0.5em; font-weight: 500; color: var(--gold); }
.metric .lbl {
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

/* --------------------------------------------------- mission steps */

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative;
  border: 1px solid var(--line-soft);
  background: var(--panel);
  padding: 34px 28px 30px;
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  font-family: var(--display);
  font-weight: 200;
  font-size: 3rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold-line);
  display: block;
  margin-bottom: 18px;
}
.step h3 { font-size: 1.2rem; }
.step p { color: var(--muted); font-size: 0.93rem; margin: 0 0 18px; }

/* ---------------------------------------------------------- quote */

.pull-quote {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.pull-quote blockquote {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 0 0 26px;
}
.pull-quote blockquote .lit { color: var(--gold-hot); }
.pull-quote cite {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--faint);
}

/* ------------------------------------------------------ CTA finale */

.finale {
  text-align: center;
  padding: clamp(90px, 13vw, 170px) 0;
  position: relative;
  overflow: clip;
}
.finale::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(232, 182, 76, 0.12) 0%, transparent 60%);
  pointer-events: none;
}
.finale h2 { font-size: clamp(2.6rem, 7vw, 5.6rem); font-weight: 700; }
.finale-logo {
  width: min(250px, 55vw);
  height: auto;
  margin-bottom: 34px;
  filter: drop-shadow(0 0 44px rgba(232, 182, 76, 0.4));
}
.finale p { color: var(--muted); max-width: 540px; margin: 0 auto 40px; }
.finale .hero-actions { justify-content: center; }

/* --------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.012); padding: 70px 0 34px; margin-top: 40px; }
.footer-word {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 9rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.10);
  margin-bottom: 50px;
  user-select: none;
}
.footer-word .crown { -webkit-text-stroke: 0; color: var(--gold); font-size: 0.5em; vertical-align: 0.5em; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer p { color: var(--faint); font-size: 0.87rem; max-width: 380px; }
.site-footer h4 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: var(--muted);
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer li a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.site-footer li a:hover { color: var(--gold-hot); }
.footer-bottom {
  border-top: 1px solid var(--line-soft);
  margin-top: 50px;
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  color: var(--faint);
  font-size: 0.76rem;
  font-family: var(--mono);
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------ page hero */

.page-hero {
  padding: 190px 0 70px;
  position: relative;
  overflow: clip;
  border-bottom: 1px solid var(--line-soft);
}
.page-hero .ghost { top: 0.1em; }
.page-hero h1 { font-size: clamp(3rem, 9vw, 7rem); font-weight: 700; position: relative; z-index: 1; }
.page-hero .hero-sub { margin-bottom: 0; position: relative; z-index: 1; }

/* status pill (subpages / generic) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 10px 18px;
}
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status-pill.online { color: var(--green); border-color: rgba(61, 214, 140, 0.4); }
.status-pill.online::before { background: var(--green); box-shadow: 0 0 10px rgba(61, 214, 140, 0.9); animation: pulse 1.6s ease infinite; }
.status-pill.offline { color: var(--red); }
.status-pill.offline::before { background: var(--red); }

/* ---------------------------------------------------------- rules */

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px; }
.toc a {
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 8px 15px 7px;
  transition: color 0.2s, border-color 0.2s;
}
.toc a:hover { color: var(--gold-hot); border-color: var(--gold-line); }

.rule {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--gold);
  padding: 26px 30px;
  margin-bottom: 16px;
  scroll-margin-top: 110px;
}
.rule h3 { display: flex; align-items: baseline; gap: 14px; }
.rule h3 .num { color: var(--gold); font-family: var(--mono); font-size: 0.85rem; -webkit-text-stroke: 0; }
.rule p { color: var(--muted); margin-bottom: 8px; }
.rule ul { color: var(--muted); margin: 8px 0 4px; padding-left: 22px; }
.rule li { margin-bottom: 5px; }

.callout {
  display: flex;
  gap: 12px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-line);
  padding: 16px 20px;
  color: #ead9ac;
  font-size: 0.94rem;
  margin: 18px 0;
}
.callout.red { background: rgba(255, 90, 95, 0.08); border-color: rgba(255, 90, 95, 0.35); color: #f3b8ba; }
.callout.blue { background: rgba(108, 169, 224, 0.08); border-color: rgba(108, 169, 224, 0.3); color: #bdd7ef; }

/* --------------------------------------------------------- guides */

.guides-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 30px; }

.search-input {
  flex: 1 1 280px;
  max-width: 440px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--body);
  font-size: 0.94rem;
  padding: 13px 18px;
}
.search-input:focus { outline: none; border-color: var(--gold-line); }
.search-input::placeholder { color: var(--faint); }

.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 9px 16px 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-chip:hover { color: var(--text); border-color: var(--line); }
.filter-chip.active { color: #140e02; background: var(--gold); border-color: var(--gold); }

.guide-card { cursor: pointer; }
.guide-card .gc-cat {
  font-family: var(--display);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.guide-card .gc-min { color: var(--faint); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; margin-top: 16px; }

.empty-note { color: var(--faint); padding: 40px 0; text-align: center; font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.08em; }

dialog.guide-modal {
  background: #0a0c14;
  color: var(--text);
  border: 1px solid var(--line);
  width: min(780px, calc(100vw - 32px));
  max-height: min(84vh, 920px);
  padding: 0;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
}
dialog.guide-modal::backdrop { background: rgba(2, 3, 6, 0.82); backdrop-filter: blur(4px); }
dialog.guide-modal[open] { animation: modal-in 0.45s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: scale(0.96) translateY(16px); filter: blur(7px); } }

.gm-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #0a0c14;
  border-bottom: 1px solid var(--line-soft);
  padding: 26px 30px 18px;
  z-index: 2;
}
.gm-head h3 { font-size: 1.5rem; margin: 4px 0 2px; }
.gm-head .gc-cat { font-family: var(--display); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.gm-close {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.gm-close:hover { color: var(--text); border-color: var(--gold-line); }

.gm-body { padding: 12px 30px 34px; overflow-y: auto; }
.gm-body h4 {
  font-family: var(--display);
  color: var(--gold-hot);
  margin: 26px 0 10px;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.gm-body p { color: #c4cbdb; font-size: 0.96rem; }
.gm-body ol, .gm-body ul { color: #c4cbdb; font-size: 0.96rem; padding-left: 24px; margin: 8px 0 14px; }
.gm-body li { margin-bottom: 8px; }
.gm-tip {
  background: var(--gold-dim);
  border: 1px solid var(--gold-line);
  color: #ead9ac;
  font-size: 0.9rem;
  padding: 13px 17px;
  margin: 14px 0;
}
.gm-tip::before { content: "TIP // "; font-family: var(--display); font-weight: 600; letter-spacing: 0.14em; color: var(--gold-hot); }

/* -------------------------------------------------------- support */

.support-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 30px; align-items: start; }
@media (max-width: 920px) { .support-grid { grid-template-columns: 1fr; } }

.form-card { background: var(--panel); border: 1px solid var(--line-soft); padding: 34px 32px; position: relative; }
.form-card::before { content: ""; position: absolute; top: -1px; left: -1px; width: 16px; height: 16px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.form-card::after { content: ""; position: absolute; bottom: -1px; right: -1px; width: 16px; height: 16px; border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold); }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.field .req { color: var(--gold); }
.field input, .field select, .field textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--body);
  font-size: 0.95rem;
  padding: 13px 16px;
  transition: border-color 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold-line); }
.field .hint { color: var(--faint); font-size: 0.78rem; margin-top: 6px; }
.field select option { background: #0a0c14; }

.form-msg { padding: 14px 18px; font-size: 0.92rem; margin-bottom: 18px; display: none; border: 1px solid; }
.form-msg.show { display: block; }
.form-msg.ok { background: rgba(61, 214, 140, 0.08); border-color: rgba(61, 214, 140, 0.4); color: #9ae6c1; }
.form-msg.err { background: rgba(255, 90, 95, 0.08); border-color: rgba(255, 90, 95, 0.45); color: #f3b8ba; }

.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }

details.faq { background: var(--panel); border: 1px solid var(--line-soft); padding: 0 22px; margin-bottom: 10px; transition: border-color 0.2s; }
details.faq[open] { border-color: var(--line); }
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 17px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before { content: "+"; color: var(--gold); font-family: var(--display); font-weight: 600; width: 16px; flex-shrink: 0; }
details.faq[open] summary::before { content: "–"; }
details.faq .faq-body { color: var(--muted); font-size: 0.93rem; padding: 0 0 18px 28px; }

/* ---------------------------------------------------------- toast */

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0d0f18;
  border: 1px solid var(--gold-line);
  color: var(--text);
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 13px 26px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
  z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   STAFF PORTAL
   ============================================================ */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
  background: rgba(10, 12, 20, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  padding: 44px 40px;
  text-align: center;
  position: relative;
}
.login-card::before { content: ""; position: absolute; top: -1px; left: -1px; width: 18px; height: 18px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.login-card::after { content: ""; position: absolute; bottom: -1px; right: -1px; width: 18px; height: 18px; border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold); }
.login-card img { width: 52px; height: 52px; margin-bottom: 16px; filter: drop-shadow(0 0 16px rgba(232, 182, 76, 0.5)); }
.login-card h1 { font-size: 1.7rem; margin-bottom: 4px; }
.login-card .sub {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 30px;
}
.login-card .field { text-align: left; }
.login-err { color: var(--red); font-size: 0.85rem; min-height: 1.4em; margin: 4px 0 12px; }
.login-back { margin-top: 22px; font-size: 0.82rem; }
.login-back a { color: var(--muted); }
.login-back a:hover { color: var(--gold-hot); }

.staff-body { display: flex; min-height: 100vh; background: var(--bg); }

.staff-side {
  width: 256px;
  flex-shrink: 0;
  background: rgba(7, 9, 16, 0.92);
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.staff-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 24px 20px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.staff-brand img { width: 26px; height: 26px; }
.staff-brand .tag { color: var(--gold); font-size: 0.58rem; letter-spacing: 0.26em; border: 1px solid var(--gold-line); padding: 2px 7px 1px; }

.staff-nav { display: flex; flex-direction: column; padding: 16px 12px; gap: 3px; flex: 1; overflow-y: auto; }
.staff-nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  padding: 13px 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.staff-nav button:hover { color: var(--text); background: var(--panel); }
.staff-nav button.active { color: var(--gold-hot); background: var(--gold-dim); border-left-color: var(--gold); }
.staff-nav .badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 8px;
  min-width: 20px;
  text-align: center;
}
.staff-nav .badge:empty { display: none; }

.staff-me { border-top: 1px solid var(--line-soft); padding: 16px 20px; display: flex; align-items: center; gap: 10px; font-size: 0.86rem; }
.staff-me .who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-me button {
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 11px;
  cursor: pointer;
}
.staff-me button:hover { color: var(--red); border-color: var(--red); }

.staff-main { flex: 1; padding: 40px 44px 70px; min-width: 0; }
.staff-main > section { display: none; }
.staff-main > section.active { display: block; }

/* ------------------------------------------- dashboard cinematics
   The "boot" class is added by staff.js each time a tab is entered,
   then removed — so entrances are choreographed but live data
   refreshes don't replay the sequence. */

.staff-main > section.boot h2 { animation: dash-row 0.55s var(--ease) both; }
.staff-main > section.boot .section-sub { animation: dash-row 0.55s var(--ease) 0.08s both; }

.staff-main > section.boot .stat-card {
  animation: dash-in 0.75s var(--ease) both;
}
.staff-main > section.boot .stat-card:nth-child(1) { animation-delay: 0.12s; }
.staff-main > section.boot .stat-card:nth-child(2) { animation-delay: 0.24s; }
.staff-main > section.boot .stat-card:nth-child(3) { animation-delay: 0.36s; }
.staff-main > section.boot .stat-card:nth-child(4) { animation-delay: 0.48s; }
@keyframes dash-in {
  0% { opacity: 0; transform: perspective(900px) rotateX(9deg) translateY(30px) scale(0.965); filter: blur(7px); }
  55% { filter: blur(0); }
  100% { opacity: 1; transform: perspective(900px) rotateX(0deg) translateY(0) scale(1); filter: blur(0); }
}

/* gold HUD scan sweeping across the stat band once per boot */
.staff-main > section.boot .stat-cards { position: relative; overflow: hidden; }
.staff-main > section.boot .stat-cards::after {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  width: 110px;
  left: -150px;
  background: linear-gradient(100deg, transparent, rgba(232, 182, 76, 0.13) 42%, rgba(255, 216, 122, 0.30) 50%, rgba(232, 182, 76, 0.13) 58%, transparent);
  transform: skewX(-14deg);
  animation: dash-scan 1.15s ease 0.4s 1 both;
  pointer-events: none;
}
@keyframes dash-scan { to { left: calc(100% + 70px); } }

/* the whole dashboard settles out of 3D like a camera move */
.staff-main > section.boot .dash-plane {
  animation: plane-settle 1.15s var(--ease) both;
  transform-origin: 50% 18%;
}
@keyframes plane-settle {
  0% { opacity: 0; transform: perspective(1300px) rotateX(11deg) rotateY(-6deg) scale(0.96) translateY(38px); filter: blur(9px); }
  55% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: perspective(1300px) rotateX(0deg) rotateY(0deg) scale(1) translateY(0); filter: blur(0); }
}

/* dashboard visual panels (activity chart + leaderboard) */
.dash-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; margin-bottom: 32px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-panel { position: relative; background: var(--panel); border: 1px solid var(--line-soft); padding: 20px 22px 16px; }
.dash-panel::before { content: ""; position: absolute; top: -1px; left: -1px; width: 13px; height: 13px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.dash-panel::after { content: ""; position: absolute; bottom: -1px; right: -1px; width: 13px; height: 13px; border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold); }
.dp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.dp-title { font-family: var(--display); font-weight: 600; font-size: 0.92rem; letter-spacing: 0.12em; text-transform: uppercase; }
.dp-sub { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.14em; color: var(--faint); }

/* animated activity bars */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bars .bar {
  flex: 1;
  position: relative;
  background: linear-gradient(180deg, var(--gold-hot), rgba(232, 182, 76, 0.22));
  min-height: 3px;
  transform-origin: bottom;
  box-shadow: 0 0 14px rgba(232, 182, 76, 0.18);
}
.bars .bar.zero { background: var(--line-soft); box-shadow: none; }
.bars .bar .bv {
  position: absolute;
  top: -19px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--gold-hot);
  opacity: 0;
  transition: opacity 0.15s;
}
.bars .bar:hover .bv { opacity: 1; }
.staff-main > section.boot .bars .bar {
  animation: bar-rise 0.7s var(--ease) both;
  animation-delay: calc(0.75s + var(--bi, 0) * 0.05s);
}
@keyframes bar-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bars-axis { display: flex; gap: 6px; margin-top: 7px; }
.bars-axis span { flex: 1; text-align: center; font-family: var(--mono); font-size: 0.52rem; color: var(--faint); }

/* handling leaderboard (green score chips, reference-style) */
.leaderboard { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--line-soft);
}
.lb-rank { font-family: var(--mono); font-size: 0.6rem; color: var(--faint); }
.lb-ava {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--gold-dim);
  border: 1px solid var(--gold-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--gold-hot);
}
.lb-name { font-weight: 600; font-size: 0.9rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(61, 214, 140, 0.09);
  border: 1px solid rgba(61, 214, 140, 0.35);
  padding: 3px 11px;
  border-radius: 4px;
  text-shadow: 0 0 12px rgba(61, 214, 140, 0.55);
}
.staff-main > section.boot .lb-row { animation: dash-row 0.5s var(--ease) both; animation-delay: calc(0.85s + var(--bi, 0) * 0.07s); }
.lb-empty { color: var(--faint); font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; padding: 22px 0; text-align: center; }

/* week-over-week delta chips (the reference's green "+4.5%" moment) */
.stat-card .delta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 3px;
  opacity: 0;
}
.stat-card .delta.show { opacity: 1; transition: opacity 0.4s ease 1s; }
.stat-card .delta.up { color: var(--green); background: rgba(61, 214, 140, 0.08); border-color: rgba(61, 214, 140, 0.3); text-shadow: 0 0 10px rgba(61, 214, 140, 0.5); }
.stat-card .delta.flat { color: var(--faint); background: rgba(255, 255, 255, 0.02); border-color: var(--line-soft); }

/* stat values flip into place (JS adds .flip when a value lands) */
.stat-card .val.flip { animation: val-flip 0.55s var(--ease) both; }
@keyframes val-flip {
  0% { opacity: 0; transform: translateY(10px) scale(0.92); filter: blur(5px); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
.stat-card .val.ok.flip { text-shadow: 0 0 24px rgba(61, 214, 140, 0.55); }
.stat-card .val.bad.flip { text-shadow: 0 0 24px rgba(255, 90, 95, 0.5); }
.stat-card .val.gold.flip { text-shadow: 0 0 24px rgba(232, 182, 76, 0.5); }

/* rows cascade in on every tab entrance */
.staff-main > section.boot :is(.checklist li, .ticket, details.bank-item, .canned, .quick-link, .matrix-wrap, .ticket-toolbar, .bank-toolbar) {
  animation: dash-row 0.5s var(--ease) 0.9s both;
}
.staff-main > section.boot :is(.checklist li, .ticket, details.bank-item, .canned, .quick-link, .matrix-wrap, .ticket-toolbar, .bank-toolbar):nth-child(1) { animation-delay: 0.30s; }
.staff-main > section.boot :is(.checklist li, .ticket, details.bank-item, .canned, .quick-link):nth-child(2) { animation-delay: 0.38s; }
.staff-main > section.boot :is(.checklist li, .ticket, details.bank-item, .canned, .quick-link):nth-child(3) { animation-delay: 0.46s; }
.staff-main > section.boot :is(.checklist li, .ticket, details.bank-item, .canned, .quick-link):nth-child(4) { animation-delay: 0.54s; }
.staff-main > section.boot :is(.checklist li, .ticket, details.bank-item, .canned, .quick-link):nth-child(5) { animation-delay: 0.62s; }
.staff-main > section.boot :is(.checklist li, .ticket, details.bank-item, .canned, .quick-link):nth-child(6) { animation-delay: 0.70s; }
.staff-main > section.boot :is(.checklist li, .ticket, details.bank-item, .canned, .quick-link):nth-child(7) { animation-delay: 0.78s; }
.staff-main > section.boot :is(.checklist li, .ticket, details.bank-item, .canned, .quick-link):nth-child(8) { animation-delay: 0.86s; }
@keyframes dash-row {
  0% { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
.staff-main h2 { margin-bottom: 6px; }
.staff-main .section-sub { color: var(--muted); margin-bottom: 30px; font-size: 0.94rem; max-width: 720px; }

@media (max-width: 880px) {
  .staff-body { flex-direction: column; }
  .staff-side { width: 100%; height: auto; position: static; }
  .staff-nav { flex-direction: row; flex-wrap: wrap; }
  .staff-nav button { border-left: none; border-bottom: 2px solid transparent; }
  .staff-nav button.active { border-bottom-color: var(--gold); }
  .staff-main { padding: 26px 20px 60px; }
}

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 32px; }
@media (max-width: 1100px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--panel); border: 1px solid var(--line-soft); padding: 20px 22px; }
.stat-card .lbl { color: var(--faint); font-family: var(--display); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; }
.stat-card .val { font-family: var(--display); font-size: 1.9rem; font-weight: 700; margin-top: 6px; }
.stat-card .val.ok { color: var(--green); }
.stat-card .val.bad { color: var(--red); }
.stat-card .val.gold { color: var(--gold-hot); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  padding: 14px 17px;
  margin-bottom: 8px;
  cursor: pointer;
  color: #c4cbdb;
  font-size: 0.93rem;
  transition: border-color 0.2s;
}
.checklist li:hover { border-color: var(--line); }
.checklist li input { margin-top: 4px; accent-color: var(--gold); }
.checklist li.done { opacity: 0.45; text-decoration: line-through; }

.ticket-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; align-items: center; }
.ticket { background: var(--panel); border: 1px solid var(--line-soft); padding: 20px 24px; margin-bottom: 12px; transition: border-color 0.2s; }
.ticket:hover { border-color: var(--line); }
.ticket.handled { opacity: 0.55; }
.ticket-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.ticket-cat {
  font-family: var(--display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-hot);
  background: var(--gold-dim);
  border: 1px solid var(--gold-line);
  padding: 4px 10px 3px;
}
.ticket-id { font-family: var(--mono); color: var(--faint); font-size: 0.76rem; }
.ticket-when { color: var(--faint); font-family: var(--mono); font-size: 0.74rem; margin-left: auto; }
.ticket-who { font-size: 0.9rem; color: var(--muted); margin-bottom: 10px; }
.ticket-who b { color: var(--text); }
.ticket-msg { color: #c4cbdb; font-size: 0.94rem; white-space: pre-wrap; margin-bottom: 14px; }
.ticket-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ticket-handled-by { color: var(--green); font-family: var(--mono); font-size: 0.76rem; }

.bank-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
details.bank-item { background: var(--panel); border: 1px solid var(--line-soft); margin-bottom: 10px; padding: 0 24px; transition: border-color 0.2s; }
details.bank-item[open] { border-color: var(--line); }
details.bank-item summary { cursor: pointer; padding: 17px 0; list-style: none; display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: 0.97rem; }
details.bank-item summary::-webkit-details-marker { display: none; }
details.bank-item summary .bi-cat {
  font-family: var(--display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-hot);
  background: var(--gold-dim);
  border: 1px solid var(--gold-line);
  padding: 4px 9px 3px;
  white-space: nowrap;
}
details.bank-item summary::after { content: "+"; margin-left: auto; color: var(--gold); font-family: var(--display); font-weight: 600; }
details.bank-item[open] summary::after { content: "–"; }
.bank-body { padding: 2px 0 22px; }
.bank-body h4 { font-family: var(--display); color: var(--gold-hot); margin: 18px 0 7px; font-size: 0.92rem; letter-spacing: 0.14em; text-transform: uppercase; }
.bank-body p { color: #c4cbdb; font-size: 0.93rem; margin-bottom: 8px; }
.bank-body ol, .bank-body ul { color: #c4cbdb; font-size: 0.93rem; padding-left: 22px; margin: 6px 0 12px; }
.bank-body li { margin-bottom: 6px; }

.matrix-wrap { overflow-x: auto; border: 1px solid var(--line-soft); }
table.matrix { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 660px; }
table.matrix th, table.matrix td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); }
table.matrix th {
  background: var(--panel-2);
  color: var(--gold);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
table.matrix tr:last-child td { border-bottom: none; }
table.matrix tr:hover td { background: rgba(255, 255, 255, 0.015); }
table.matrix td:first-child { font-weight: 600; color: var(--text); }
table.matrix td { color: var(--muted); }
table.matrix .sev-perm { color: var(--red); font-weight: 700; }

.canned { background: var(--panel); border: 1px solid var(--line-soft); padding: 20px 24px; margin-bottom: 12px; }
.canned-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.canned-head h3 { margin: 0; font-size: 0.95rem; letter-spacing: 0.1em; }
.canned pre {
  white-space: pre-wrap;
  font-family: var(--body);
  color: var(--muted);
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line-soft);
  padding: 14px 17px;
  margin: 0;
}

.quick-link { display: flex; align-items: center; gap: 16px; }
.quick-link .ql-ico { font-size: 1.5rem; }
.quick-link .ql-note { color: var(--faint); font-size: 0.8rem; }

/* ------------------------------------------------ 3D tilt & creed */

/* pointer-tracked tilt with glare (main.js drives --tRX/--tRY/--gx/--gy) */
.tilt3d {
  transform: perspective(950px) rotateX(var(--tRX, 0deg)) rotateY(var(--tRY, 0deg)) translateY(var(--lift, 0px));
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease);
  will-change: transform;
}
.tilt3d.tilting { transition: transform 0.06s linear; }
.tilt3d:hover { --lift: -4px; }
.tilt3d .tilt-glare {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(380px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 226, 158, 0.10), transparent 55%);
  transition: opacity 0.35s ease;
  z-index: 2;
}
.tilt3d.tilting .tilt-glare { opacity: 1; }
/* beats the legacy .card:hover / .tier:hover translateY rules */
.tilt3d.tilt3d:hover { transform: perspective(950px) rotateX(var(--tRX, 0deg)) rotateY(var(--tRY, 0deg)) translateY(var(--lift, 0px)); }
.chapter-media.tilt3d .glyph { transform: translateZ(42px); }
.chapter-media.tilt3d .coords { transform: translateZ(22px); }
.tier.tilt3d h3, .tier.tilt3d .price { transform: translateZ(24px); }

/* the Empire creed — motto lines rising like trailer titles */
.creed {
  text-align: center;
  padding: clamp(90px, 13vw, 160px) 0;
  position: relative;
  overflow: clip;
}
.creed::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(232, 182, 76, 0.10) 0%, transparent 62%);
  pointer-events: none;
}
.creed-line {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 7.5vw, 6.2rem);
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.creed-line.dim { color: transparent; -webkit-text-stroke: 1.5px rgba(242, 244, 248, 0.4); }
.creed-line.lit {
  color: transparent;
  background: linear-gradient(160deg, var(--gold-hot) 20%, var(--gold) 60%, #8a6420 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 34px rgba(232, 182, 76, 0.35));
}
[data-reveal].creed-line {
  transform: perspective(800px) rotateX(38deg) translateY(70px);
  transform-origin: 50% 100%;
}
[data-reveal].creed-line.in { transform: perspective(800px) rotateX(0deg) translateY(0); }

.footer-motto {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold) !important;
  margin-bottom: 14px;
}

/* ------------------------------------------------ founder letter */

.letter { max-width: 780px; }
.letter p { color: #c6cddd; font-size: 1.04rem; line-height: 1.9; margin-bottom: 1.5em; }
.letter .letter-open {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 1.2em;
}
.letter h3 { margin: 2.2em 0 0.4em; }
.letter ul.promises { list-style: none; padding: 0; margin: 22px 0 34px; }
.letter ul.promises li {
  position: relative;
  padding: 15px 0 15px 32px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}
.letter ul.promises li:last-child { border-bottom: none; }
.letter ul.promises li::before { content: "◆"; position: absolute; left: 2px; top: 20px; color: var(--gold); font-size: 0.6rem; }
.letter ul.promises li b { color: var(--text); }

.letter-sig {
  margin-top: 46px;
  border: 1px solid var(--line);
  padding: 28px 32px;
  max-width: 440px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
}
.letter-sig::before { content: ""; position: absolute; top: -1px; left: -1px; width: 16px; height: 16px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.letter-sig::after { content: ""; position: absolute; bottom: -1px; right: -1px; width: 16px; height: 16px; border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold); }
.letter-sig img { width: 62px; height: 62px; flex-shrink: 0; filter: drop-shadow(0 0 14px rgba(232, 182, 76, 0.35)); }
.letter-sig .sig-pre { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 8px; }
.letter-sig .sig-name { font-family: var(--display); font-size: 1.55rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-hot); line-height: 1; }
.letter-sig .sig-role { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--muted); margin-top: 7px; }

/* ------------------------------------------------------ VIP store */

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; } }

.tier {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  padding: 34px 30px 30px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s var(--ease), background 0.3s;
}
.tier:hover { border-color: var(--line); transform: translateY(-4px); }
.tier.popular { border-color: var(--gold-line); background: linear-gradient(180deg, rgba(232, 182, 76, 0.07), var(--panel) 60%); }
.tier-badge {
  position: absolute;
  top: -1px;
  right: 22px;
  background: linear-gradient(135deg, var(--gold-hot), var(--gold));
  color: #140e02;
  font-family: var(--display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 6px 13px 5px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 6px), 0 100%);
}
.tier h3 { font-size: 1.5rem; margin-bottom: 2px; }
.tier .tier-priority { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 20px; }
.tier .price { font-family: var(--display); font-weight: 700; font-size: 2.9rem; line-height: 1; color: var(--text); }
.tier .price .cur { font-size: 0.5em; vertical-align: 0.7em; color: var(--gold); }
.tier .price .per { font-family: var(--body); font-size: 0.85rem; font-weight: 400; color: var(--faint); letter-spacing: 0; }
.tier ul { list-style: none; margin: 22px 0 26px; padding: 0; flex: 1; }
.tier li { color: var(--muted); font-size: 0.92rem; padding: 8px 0 8px 26px; position: relative; border-bottom: 1px solid var(--line-soft); }
.tier li:last-child { border-bottom: none; }
.tier li::before { content: "◆"; position: absolute; left: 2px; top: 12px; color: var(--gold); font-size: 0.55rem; }

.coin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px) { .coin-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .coin-grid { grid-template-columns: 1fr; } }

.coin-pack {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  padding: 32px 24px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.coin-pack:hover { border-color: var(--gold-line); transform: translateY(-4px); }
.coin-pack .cp-ico { font-size: 2rem; margin-bottom: 12px; filter: drop-shadow(0 0 16px rgba(232, 182, 76, 0.45)); }
.coin-pack .cp-amount { font-family: var(--display); font-weight: 700; font-size: 2.1rem; line-height: 1; color: var(--gold-hot); }
.coin-pack .cp-label { font-family: var(--display); font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); margin: 7px 0 4px; }
.coin-pack .cp-bonus { color: var(--green); font-size: 0.8rem; font-weight: 600; min-height: 1.3em; margin-bottom: 14px; }
.coin-pack .cp-price { font-family: var(--display); font-weight: 600; font-size: 1.35rem; margin-bottom: 20px; }
.coin-pack .btn { width: 100%; margin-top: auto; }
.cp-tag {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #140e02;
  font-family: var(--display);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 4px 12px 3px;
  white-space: nowrap;
}

.btn-soon { background: var(--panel-2); color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); cursor: not-allowed; }
.btn-soon:hover { transform: none; box-shadow: inset 0 0 0 1px var(--line); }

.vip-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px 32px;
  border: 1px solid var(--gold-line);
  background: linear-gradient(90deg, rgba(232, 182, 76, 0.09), rgba(232, 182, 76, 0.02));
  color: var(--text);
  transition: box-shadow 0.3s, transform 0.3s var(--ease);
}
.vip-band:hover { transform: translateY(-2px); box-shadow: 0 12px 44px rgba(232, 182, 76, 0.16); text-decoration: none; }
.vip-band h3 { margin: 0; }

/* --------------------------------------------------- sound toggle */

.sound-control {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(4, 5, 10, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.sound-control:hover { border-color: var(--gold-line); color: var(--text); }
.sound-control .bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.sound-control .bars i { width: 2px; height: 4px; background: var(--faint); transition: background 0.25s; }
.sound-control.on { color: var(--gold-hot); border-color: var(--gold-line); }
.sound-control.on .bars i { background: var(--gold); animation: eq 1s ease-in-out infinite; }
.sound-control.on .bars i:nth-child(1) { animation-delay: 0s; }
.sound-control.on .bars i:nth-child(2) { animation-delay: 0.25s; }
.sound-control.on .bars i:nth-child(3) { animation-delay: 0.5s; }
.sound-control.on .bars i:nth-child(4) { animation-delay: 0.12s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 12px; } }
.sound-control.armed .bars i { background: var(--gold); }
.sound-control.hint::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid var(--gold);
  animation: hintpulse 2s ease-out infinite;
  pointer-events: none;
}
@keyframes hintpulse { 0% { opacity: 0.8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.22); } }
@media (max-width: 760px) { .sound-control { left: 14px; bottom: 14px; } }
/* staff panel: keep the toggle clear of the sidebar footer */
.staff-body .sound-control { left: auto; right: 22px; }

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

.err-wrap { min-height: 82vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.err-wrap .code {
  font-family: var(--display);
  font-size: clamp(7rem, 24vw, 16rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--gold-line);
}
.err-wrap h2 { margin-top: 10px; }

/* ------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-title .row span { transform: none; animation: none; }
  .marquee-track { animation: none; }
  .scroll-cue::after, .hud-dot, .status-pill.online::before { animation: none; }
  .sound-control.on .bars i, .sound-control.hint::after { animation: none; }
  .hero-title .accent { animation: none; }
  body::after { animation: none; }
  .cine-veil { display: none; }
  .ghost { transform: none; }
  h1[data-reveal], .sec-head[data-reveal] h2, h1[data-reveal].in, .sec-head[data-reveal].in h2 { letter-spacing: 0.01em; }
  dialog.guide-modal[open] { animation: none; }
  .hero-rig, .tilt3d { transform: none !important; transition: none !important; }
  .tilt3d .tilt-glare { display: none; }
  [data-reveal].creed-line, [data-reveal].creed-line.in { transform: none; }
  .staff-main > section.boot h2,
  .staff-main > section.boot .section-sub,
  .staff-main > section.boot .stat-card,
  .staff-main > section.boot .stat-cards::after,
  .stat-card .val.flip,
  .staff-main > section.boot :is(.checklist li, .ticket, details.bank-item, .canned, .quick-link, .matrix-wrap, .ticket-toolbar, .bank-toolbar) { animation: none !important; filter: none !important; }
  .staff-main > section.boot .dash-plane,
  .staff-main > section.boot .bars .bar,
  .staff-main > section.boot .lb-row { animation: none !important; filter: none !important; }
  .stat-card .delta { opacity: 1; transition: none; }
  .sound-control.on .bars i { height: 10px; }
  #starfield { display: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ================================================================
   STORE — checkout modal, order status page, staff order queue
   ================================================================ */

.mono { font-family: var(--mono); letter-spacing: 0.04em; }
.grid-1 { grid-template-columns: 1fr; }

.donate-card { text-align: left; }
.donate-card .icon { font-size: 1.6rem; }

/* ---- checkout modal ---- */

dialog.checkout-modal { max-width: 560px; width: calc(100vw - 32px); }
.checkout-modal .co-price {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-hot);
  margin-top: 4px;
}
.co-code-row { display: flex; gap: 10px; align-items: stretch; }
.co-code-row input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 1.05rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}
.co-code-row .btn { flex: none; }

.co-player {
  margin: -6px 0 18px;
  padding: 10px 14px;
  font-size: 0.88rem;
  border: 1px solid;
}
.co-player.ok { background: rgba(61, 214, 140, 0.08); border-color: rgba(61, 214, 140, 0.4); color: #9ae6c1; }
.co-player.bad { background: rgba(255, 90, 95, 0.08); border-color: rgba(255, 90, 95, 0.45); color: #f3b8ba; }

.co-pay-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.co-pay-buttons .btn { flex: 1; min-width: 200px; }

.co-due-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0; }
.co-due {
  flex: 1;
  min-width: 180px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  padding: 12px 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.co-due .lbl {
  font-family: var(--display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
  width: 100%;
}
.co-due .val { font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--gold-hot); }

.co-methods { display: flex; flex-direction: column; gap: 10px; }
.co-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s;
}
.co-method:hover { border-color: var(--gold-line); text-decoration: none; }
.co-method-label { font-family: var(--display); font-weight: 700; letter-spacing: 0.06em; }
.co-method-handle { color: var(--muted); font-size: 0.85rem; }
.co-method-go { margin-left: auto; color: var(--gold); font-size: 0.8rem; white-space: nowrap; }

/* ---- order status page ---- */

.ord-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.ord-pkg { font-family: var(--display); font-size: 1.35rem; font-weight: 700; }
.ord-meta { color: var(--muted); font-size: 0.86rem; margin-top: 5px; }
.ord-status {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.ord-status.ok { color: var(--green); border-color: rgba(61, 214, 140, 0.45); background: rgba(61, 214, 140, 0.07); }
.ord-status.bad { color: var(--red); border-color: rgba(255, 90, 95, 0.45); background: rgba(255, 90, 95, 0.07); }
.ord-status.warn { color: var(--gold-hot); border-color: var(--gold-line); background: rgba(232, 182, 76, 0.07); }

.ord-steps { display: flex; flex-direction: column; margin-bottom: 22px; }
.ord-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0 12px 22px;
  border-left: 1px solid var(--line-soft);
  margin-left: 10px;
  position: relative;
}
.ord-step .os-mark {
  position: absolute;
  left: -11px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--faint);
}
.ord-step.done .os-mark { background: rgba(61, 214, 140, 0.15); border-color: rgba(61, 214, 140, 0.5); color: var(--green); }
.ord-step.now .os-mark { border-color: var(--gold); color: var(--gold-hot); animation: ord-pulse 1.6s ease-in-out infinite; }
.ord-step.bad .os-mark { background: rgba(255, 90, 95, 0.12); border-color: rgba(255, 90, 95, 0.5); color: var(--red); }
@keyframes ord-pulse { 50% { box-shadow: 0 0 0 5px rgba(232, 182, 76, 0.12); } }
.ord-step .os-label { font-size: 0.95rem; }
.ord-step.todo .os-label { color: var(--faint); }
.ord-step .os-sub { display: block; color: var(--faint); font-size: 0.78rem; font-family: var(--mono); margin-top: 3px; }

.ord-grant-list { list-style: none; padding: 0; margin: 10px 0 6px; }
.ord-grant-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 0.92rem;
  flex-wrap: wrap;
}
.ord-grant-list li:last-child { border-bottom: 0; }
.ord-grant-list .og-mark { flex: none; }
.ord-grant-list li.done .og-mark { color: var(--green); }
.ord-grant-list li.bad .og-mark { color: var(--gold-hot); }
.ord-grant-list li.skip { color: var(--faint); }
.ord-grant-list .og-detail { color: var(--faint); font-size: 0.78rem; font-family: var(--mono); }

/* ---- staff: store orders tab ---- */

.ord-chip {
  font-family: var(--display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.ord-chip.ok { color: var(--green); border-color: rgba(61, 214, 140, 0.45); }
.ord-chip.warn { color: var(--gold-hot); border-color: var(--gold-line); }
.ord-chip.bad { color: var(--red); border-color: rgba(255, 90, 95, 0.45); }
.store-grants { margin: 8px 0 12px; padding: 0; list-style: none; }
.store-grants li { font-size: 0.84rem; color: var(--muted); padding: 3px 0; display: flex; gap: 9px; flex-wrap: wrap; align-items: baseline; }
.store-grants .og-detail { color: var(--faint); font-family: var(--mono); font-size: 0.74rem; }
.store-notes { margin-top: 10px; border-top: 1px dashed var(--line-soft); padding-top: 8px; }
.store-notes div { color: var(--faint); font-size: 0.76rem; font-family: var(--mono); padding: 2px 0; }
