@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(/fonts/cinzel-latin-wght-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
}

/* =====================================================================
   Aurum — "the site is the game UI"
   Every surface is one of five frames: the gold-riveted window frame,
   the blue-black tooltip, the parchment page, the lacquer action button
   and the loading bar. All ornaments are original inline SVG / CSS.
   ===================================================================== */

:root {
  --bg: #07060b;
  /* umber frame fills */
  --umber-900: #0c0906;
  --umber-800: #15110c;
  --umber-700: #1f1811;
  --umber-600: #2b2117;
  /* tooltip */
  --ink: #0b0a14;
  --ink-line: #6d6a8c;
  /* text on dark */
  --text: #ece1c8;
  --muted: #b9a98a;
  --dim: #a4967b;
  /* gold */
  --gold: #e8b84a;
  --gold-hi: #f7dc92;
  --gold-lo: #b4812e;
  --gold-deep: #7a5418;
  --bronze: #8a6a2c;
  /* lacquer (red action button) */
  --lacquer-hi: #a82a1a;
  --lacquer: #6b1309;
  --lacquer-lo: #3f0804;
  /* parchment */
  --parchment: #ead9b2;
  --parchment-lo: #d8c293;
  --ink-text: #2b1d10;
  --ink-text-2: #5a4328;
  /* item quality */
  --q-common: #ece1c8;
  --q-rare: #4fa3ff;
  --q-epic: #b76cff;
  --q-legend: #ff9a2e;
  /* states + chat */
  --ok: #5fd36a;
  --warn: #f2c14e;
  --danger: #ff7a6a;
  --guild: #58d85a;
  --whisper: #ff80ff;
  --arcane: #8b5cf6;
  --arcane-hi: #c4a6ff;
  --line: rgba(232, 184, 74, 0.14);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: 'Cinzel', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --intro: 0.9s;
  /* shadows */
  --shadow-frame: 0 0 0 1px #000, 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  --shadow-rim: 0 0 0 1px #000, 0 0 0 2px var(--bronze), 0 0 0 3px #000;
  --shadow-inset: inset 0 1px 0 rgba(255, 220, 150, 0.18), inset 0 -2px 6px rgba(0, 0, 0, 0.6);
  --glow-gold: 0 0 18px rgba(232, 184, 74, 0.45);
  --glow-text: 0 1px 0 #000, 0 0 12px rgba(0, 0, 0, 0.8);
  /* ornaments (original art, inline) */
  --frame-svg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23f7dc92'/><stop offset='.5' stop-color='%23b4812e'/><stop offset='1' stop-color='%237a5418'/></linearGradient></defs><rect x='1.5' y='1.5' width='57' height='57' fill='none' stroke='%23000'/><rect x='4' y='4' width='52' height='52' fill='none' stroke='url(%23g)' stroke-width='3'/><rect x='4' y='4' width='52' height='52' fill='none' stroke='%23fff3cf' stroke-opacity='.35' stroke-width='.6'/><rect x='6.5' y='6.5' width='47' height='47' fill='none' stroke='%23000' stroke-opacity='.8'/><g fill='url(%23g)' stroke='%23000'><path d='M9 1 17 9 9 17 1 9z'/><path d='M51 1 59 9 51 17 43 9z'/><path d='M9 43 17 51 9 59 1 51z'/><path d='M51 43 59 51 51 59 43 51z'/></g><g fill='%230c0906'><path d='M9 5.5 12.5 9 9 12.5 5.5 9z'/><path d='M51 5.5 54.5 9 51 12.5 47.5 9z'/><path d='M9 47.5 12.5 51 9 54.5 5.5 51z'/><path d='M51 47.5 54.5 51 51 54.5 47.5 51z'/></g><g fill='%23fff3cf' opacity='.9'><circle cx='9' cy='9' r='1.2'/><circle cx='51' cy='9' r='1.2'/><circle cx='9' cy='51' r='1.2'/><circle cx='51' cy='51' r='1.2'/></g></svg>");
  --fibre: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.9 .35' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .36  0 0 0 0 .24  0 0 0 0 .10  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
  --rune-tile: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><g fill='none' stroke='%23e8b84a' stroke-opacity='.55'><circle cx='60' cy='60' r='40'/><circle cx='60' cy='60' r='30' stroke-dasharray='3 6'/><path d='M60 14 106 60 60 106 14 60z'/><path d='M60 36 84 60 60 84 36 60z'/><path d='M60 4v12M60 104v12M4 60h12M104 60h12'/></g><g fill='%23e8b84a' fill-opacity='.6'><circle cx='60' cy='60' r='2'/><circle cx='8' cy='8' r='1.5'/><circle cx='112' cy='8' r='1.5'/><circle cx='8' cy='112' r='1.5'/><circle cx='112' cy='112' r='1.5'/></g></svg>");
  --diamond-svg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'><path d='M11 4.5 17.5 11 11 17.5 4.5 11z' fill='%23f7dc92' stroke='%23000'/><path d='M11 8 14 11 11 14 8 11z' fill='%237a5418'/></svg>");
  /* quest-objective tick (masked, so it takes any colour) */
  --tick-svg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 6.5 5 9.5 10.5 3' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  /* wax seal: 12-bump lacquer disc with a gold rim (the ribbon pin) */
  --seal-svg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-1 -1 26 26'><path d='M21.3 12.0 Q24.1 15.2 20.1 16.6 Q20.9 20.9 16.7 20.1 Q15.2 24.1 12.0 21.3 Q8.8 24.1 7.4 20.1 Q3.1 20.9 3.9 16.6 Q-0.1 15.2 2.7 12.0 Q-0.1 8.8 3.9 7.3 Q3.1 3.1 7.3 3.9 Q8.8 -0.1 12.0 2.7 Q15.2 -0.1 16.7 3.9 Q20.9 3.1 20.1 7.3 Q24.1 8.8 21.3 12.0Z' fill='%236b1309' stroke='%233f0804' stroke-width='.8'/><circle cx='12' cy='12' r='6.5' fill='none' stroke='%23f7dc92' stroke-width='1.2'/><circle cx='9.5' cy='8.5' r='2' fill='%23fff' fill-opacity='.22'/></svg>");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html { background: var(--bg); }
body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: 0.01em; }
p { margin: 0; }
::selection { background: rgba(232, 184, 74, 0.35); color: #fff8e6; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; box-shadow: 0 0 0 5px #000; border-radius: 3px; }
.parchment :focus-visible { outline-color: var(--gold-deep); box-shadow: 0 0 0 5px rgba(255, 246, 222, 0.8); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* film grain over everything, very subtle (non-WebGL fallback only) */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* =====================================================================
   ORNAMENT SYSTEM
   ===================================================================== */

/* 1. gold rivet frame: 9-slice border-image (square by design) */
/* `.panel` (account / order / sign-in windows) and `.guide-article` are frames too */
.frame, .panel, .guide-article, .guide-more, .center-state > div {
  position: relative;
  border: 12px solid transparent;
  border-image: var(--frame-svg) 20 / 12px / 0 stretch;
  border-radius: 0;
  background: rgba(21, 17, 12, 0.94);
  box-shadow: var(--shadow-frame);
}
.frame::before, .panel::before, .guide-article::before, .guide-more::before, .center-state > div::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  box-shadow: inset 0 0 0 1px rgba(247, 220, 146, 0.14), inset 0 0 40px rgba(0, 0, 0, 0.6);
}
.frame > *, .panel > *, .guide-article > *, .guide-more > *, .center-state > div > * { position: relative; }
/* one-shot gold edge sweep when a framed panel reveals */
.js .frame[data-reveal]:not(.reviews):not(.plan).in::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(110deg, transparent 40%, rgba(247, 220, 146, 0.28) 50%, transparent 60%) no-repeat;
  background-size: 300% 100%;
  animation: sweep 1.1s var(--ease) var(--d, 0s) forwards;
}
@keyframes sweep { from { background-position: 100% 0; opacity: 1; } to { background-position: 0 0; opacity: 0; } }

/* 2. tooltip frame: see .feature / .guide-card (the tooltip fill lives on the components that use it) */

/* 3. parchment (the guide body carries the same fill in its own rule) */
.parchment {
  color: var(--ink-text); border-radius: 3px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(255, 246, 222, 0.45), transparent 75%),
    var(--fibre),
    linear-gradient(180deg, var(--parchment), var(--parchment-lo));
  background-size: auto, 220px 220px, auto;
  box-shadow: inset 0 0 0 1px rgba(90, 60, 20, 0.45), inset 0 0 32px rgba(110, 70, 20, 0.35), 0 0 0 1px #000, 0 6px 20px -10px #000;
}
.parchment ::selection { background: rgba(180, 129, 46, 0.35); color: var(--ink-text); }
/* ink-gold links: 7.35:1 on parchment, 5.9:1 on parchment-lo; brighter gold-deep only on hover */
.parchment a { color: #5a3a12; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: currentColor; overflow-wrap: anywhere; }
.parchment a:hover { color: var(--gold-deep); }

/* 4. loading bar: .sub-bar (account) and .curtain::after (intro) carry the trough + gold fill */
/* 5. ability icon frame: .logo-mark, .feature-icon, .plan-icon, .coin-icon, .portrait, .pay-coin, .tg-avatar */
/* 6. quest marker (rotated square): .chapter, .step-num, .faq-icon, .notice, .guide-more a */

/* 7. metal text */
.metal {
  background: linear-gradient(180deg, #fff6dc 0%, #ffe4a8 30%, #f0c26a 52%, #b9822f 80%, #8a5e1c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #3a2605) drop-shadow(0 6px 24px rgba(0, 0, 0, 0.7));
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  --h: 48px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 26px; border-radius: 4px; border: 1px solid #000;
  font: 700 15px/1 var(--display); letter-spacing: 0.06em; cursor: pointer; white-space: nowrap;
  transition: filter 0.32s var(--ease), box-shadow 0.32s var(--ease), background-color 0.32s, color 0.32s, translate 0.18s var(--ease);
  overflow: hidden; isolation: isolate;
}
.btn-sm { --h: 38px; padding: 0 16px; font-size: 13px; }
.btn-lg { --h: 56px; padding: 0 32px; font-size: 17px; }
.btn-block { width: 100%; }
.btn > span { position: relative; display: inline-block; }
.btn:active { translate: 0 1px; }

/* gilded plate — the default primary (hero, header, choose plan) */
.btn-gold {
  color: #231505;
  background: linear-gradient(180deg, #fff3cf 0%, #f7dc92 18%, #e8b84a 50%, #b4812e 88%, #d9ad52 100%);
  box-shadow: 0 0 0 1px var(--gold-deep), 0 0 0 2px #000, inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 0 rgba(80, 50, 10, 0.45), 0 8px 24px -10px rgba(0, 0, 0, 0.9), var(--glow-gold);
  text-shadow: 0 1px 0 rgba(255, 245, 215, 0.5);
}
.btn-gold::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.9s var(--ease);
}
.btn-gold:hover { filter: brightness(1.07); box-shadow: 0 0 0 1px var(--gold-deep), 0 0 0 2px #000, inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(80, 50, 10, 0.45), 0 8px 24px -10px rgba(0, 0, 0, 0.9), 0 0 28px rgba(232, 184, 74, 0.6); }
.btn-gold:hover::after { transform: translateX(120%); }
.btn-gold:active { box-shadow: 0 0 0 1px var(--gold-deep), 0 0 0 2px #000, inset 0 2px 6px rgba(80, 50, 10, 0.5); }

/* red lacquer — the "Accept" button: checkout, sign-in, chat send */
.btn-lacquer, .checkout .btn-gold, .auth-form .btn-gold, .composer .btn-gold {
  color: #ffd54a;
  background: linear-gradient(180deg, var(--lacquer-hi), var(--lacquer) 52%, var(--lacquer-lo));
  box-shadow: 0 0 0 1px var(--bronze), 0 0 0 2px #000, inset 0 1px 0 rgba(255, 220, 150, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.55), 0 8px 24px -10px rgba(0, 0, 0, 0.9);
  text-shadow: 0 1px 0 #000;
}
.btn-lacquer::after, .checkout .btn-gold::after, .auth-form .btn-gold::after, .composer .btn-gold::after { background: linear-gradient(110deg, transparent 30%, rgba(255, 230, 170, 0.35) 50%, transparent 70%); }
.btn-lacquer:hover, .checkout .btn-gold:hover, .auth-form .btn-gold:hover, .composer .btn-gold:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 2px #000, inset 0 1px 0 rgba(255, 220, 150, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.55), var(--glow-gold);
}
.btn-lacquer:active, .checkout .btn-gold:active, .auth-form .btn-gold:active, .composer .btn-gold:active { box-shadow: 0 0 0 1px var(--bronze), 0 0 0 2px #000, inset 0 2px 6px rgba(0, 0, 0, 0.7); }

/* bronze secondary */
.btn-ghost {
  color: var(--text); font-weight: 600; font-size: 14px;
  background: linear-gradient(#2d241a, #17110b);
  box-shadow: var(--shadow-rim), var(--shadow-inset);
}
.btn-ghost:hover { background: linear-gradient(var(--umber-600), #1c150e); color: var(--gold-hi); }
.btn-ghost:active { box-shadow: var(--shadow-rim), inset 0 2px 6px rgba(0, 0, 0, 0.7); }

/* text button */
.btn-link { border-color: transparent; padding: 0 12px; font: 600 13px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); text-shadow: var(--glow-text); }
.btn-link::after {
  content: ''; width: 10px; height: 10px; background: var(--gold); transition: background-color 0.32s, translate 0.32s var(--ease);
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M1 3l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M1 3l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
}
.btn-link:hover { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--gold-lo); }
.btn-link:hover::after { background: var(--gold-hi); translate: 0 2px; }
.btn:disabled, .btn[aria-disabled='true'] { filter: grayscale(0.8) brightness(0.65); cursor: not-allowed; }
.btn:disabled:hover { filter: grayscale(0.8) brightness(0.65); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 12px/1 var(--display); letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold);
}

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 64px; padding: 0 var(--gutter);
  background: linear-gradient(#1c1510, #0e0a07);
  border-bottom: 1px solid #000;
  box-shadow: 0 1px 0 var(--bronze), 0 2px 0 #000, 0 10px 30px -10px #000;
  transition: height 0.4s var(--ease), background-color 0.4s;
}
.site-header::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--gold-lo) 15%, var(--gold-hi) 50%, var(--gold-lo) 85%, transparent);
}
.site-header.scrolled {
  height: 56px; background: linear-gradient(rgba(28, 21, 16, 0.92), rgba(14, 10, 7, 0.92));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.logo { display: inline-flex; align-items: center; gap: 12px; font: 700 17px/1 var(--display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-hi); text-shadow: 0 1px 0 #000; }
.logo-mark {
  flex: none; width: 32px; height: 32px; padding: 5px; border-radius: 6px;
  background: radial-gradient(circle at 35% 30%, #3b2f22, #120d09);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-deep), 0 0 0 3px #000, inset 0 0 0 1px rgba(255, 210, 120, 0.45), inset 0 -6px 8px rgba(0, 0, 0, 0.6);
}
.nav { display: flex; align-self: stretch; }
.nav a {
  position: relative; display: inline-flex; align-items: center; padding: 0 14px;
  font: 600 13px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); transition: color 0.32s;
}
.nav a::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; scale: 0 1; transition: scale 0.32s var(--ease);
  background: linear-gradient(90deg, transparent, var(--gold-lo) 15%, var(--gold-hi) 50%, var(--gold-lo) 85%, transparent);
}
.nav a:hover { color: var(--gold-hi); }
.nav a:hover::after { scale: 1 1; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.link-order { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; white-space: nowrap; font: 600 13px/1 var(--display); letter-spacing: 0.08em; color: var(--gold); transition: color 0.32s; }
.link-order:hover { color: var(--gold-hi); }

/* =====================================================================
   HERO — the zone-name reveal
   ===================================================================== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; padding: 120px var(--gutter) 96px; overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg::after {
  content: ''; position: absolute; inset: auto 0 0; height: 40%;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; will-change: transform; }
.orb-a { width: 52vw; height: 52vw; left: -14vw; top: -18vw; background: radial-gradient(circle, #4a2d6b, transparent 65%); animation: drift-a 22s ease-in-out infinite alternate; }
.orb-b { width: 46vw; height: 46vw; right: -12vw; bottom: -16vw; background: radial-gradient(circle, #8a5a16, transparent 65%); opacity: 0.4; animation: drift-b 26s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(10vw, 8vw) scale(1.1); } }
@keyframes drift-b { to { transform: translate(-8vw, -6vw) scale(1.15); } }
.rune {
  position: absolute; left: 50%; top: 50%; width: min(900px, 130vw); aspect-ratio: 1;
  translate: -50% -50%; color: var(--gold); opacity: 0.55;
}
.rune-spin { transform-origin: 300px 300px; animation: spin 140s linear infinite; }
.rune-spin-rev { transform-origin: 300px 300px; animation: spin 90s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-inner { position: relative; max-width: 980px; text-align: center; display: grid; justify-items: center; gap: 26px; }
.hero-eyebrow { text-shadow: var(--glow-text); }
.dot { width: 10px; height: 10px; rotate: 45deg; background: var(--gold-hi); box-shadow: 0 0 0 1px #000, var(--glow-gold); animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 1px #000, 0 0 0 0 rgba(232, 184, 74, 0.7); } 80%, 100% { box-shadow: 0 0 0 1px #000, 0 0 0 12px rgba(232, 184, 74, 0); } }

.hero-title { font: 700 clamp(44px, 7vw, 96px)/1 var(--display); letter-spacing: 0.01em; text-wrap: balance; }
.hero-title .word {
  display: inline-block; padding: 0.06em 0.02em 0.1em; margin: -0.06em 0 -0.1em; vertical-align: top;
  filter: drop-shadow(0 2px 0 #3a2605) drop-shadow(0 6px 24px rgba(0, 0, 0, 0.7));
}
.hero-title .word > span {
  display: inline-block;
  background: linear-gradient(180deg, #fff6dc 0%, #ffe4a8 30%, #f0c26a 52%, #b9822f 80%, #8a5e1c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-title .word > .accent {
  background:
    linear-gradient(100deg, transparent 38%, rgba(255, 248, 224, 0.95) 50%, transparent 62%),
    linear-gradient(180deg, #fff6dc 0%, #ffe4a8 30%, #f0c26a 52%, #b9822f 80%, #8a5e1c 100%);
  background-size: 250% 100%, 100% 100%; background-position: 100% 0, 0 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0, 0 0; } to { background-position: -150% 0, 0 0; } }
.hero-text { max-width: 560px; font-size: clamp(16px, 1.7vw, 18px); color: var(--text); text-wrap: pretty; text-shadow: var(--glow-text); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; }
.hero-pay { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); letter-spacing: 0.02em; text-shadow: var(--glow-text); }
.hero-pay b { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.hero-pay i { width: 1px; height: 14px; background: var(--bronze); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6); }
.pay-coin {
  width: 28px; height: 28px; padding: 4px; display: grid; place-items: center; border-radius: 5px; color: var(--gold-hi);
  background: radial-gradient(circle at 35% 30%, #3b2f22, #120d09);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-deep), 0 0 0 3px #000, inset 0 0 0 1px rgba(255, 210, 120, 0.4);
}
.pay-coin svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 0 #000); }

.scroll-cue { position: absolute; bottom: 24px; left: 50%; translate: -50% 0; width: 44px; height: 52px; }
.scroll-cue::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; margin-left: -0.5px; background: linear-gradient(var(--gold), transparent); }
.scroll-cue span { position: absolute; left: 50%; top: 2px; width: 7px; height: 7px; margin-left: -3.5px; rotate: 45deg; background: var(--gold-hi); box-shadow: 0 0 0 1px #000, var(--glow-gold); animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; translate: 0 -4px; } 30% { opacity: 1; } 100% { opacity: 0; translate: 0 32px; } }

/* hero intro (only when JS runs): zone text contracts as it fades in */
.js .hero-title .word > span { opacity: 0; translate: 0 0.25em; letter-spacing: 0.12em; filter: blur(8px); }
.js .hero-eyebrow, .js .hero-text, .js .hero-cta, .js .hero-pay { opacity: 0; translate: 0 18px; }
.js .rune { opacity: 0; scale: 0.9; }
.loaded .hero-title .word > span {
  opacity: 1; translate: 0 0; letter-spacing: 0.01em; filter: blur(0);
  transition: opacity 1.2s var(--ease), translate 1.6s var(--ease), letter-spacing 1.6s var(--ease), filter 1.4s var(--ease);
  transition-delay: calc(var(--intro) + var(--i) * 0.1s);
}
.loaded .hero-eyebrow, .loaded .hero-text, .loaded .hero-cta, .loaded .hero-pay { opacity: 1; translate: 0 0; transition: opacity 1.2s var(--ease), translate 1.4s var(--ease); }
.loaded .hero-eyebrow { transition-delay: calc(var(--intro) - 0.2s); }
.loaded .hero-text { transition-delay: calc(var(--intro) + 0.85s); }
.loaded .hero-cta { transition-delay: calc(var(--intro) + 1.05s); }
.loaded .hero-pay { transition-delay: calc(var(--intro) + 1.25s); }
.loaded .rune { opacity: 0.55; scale: 1; transition: opacity 2.4s var(--ease), scale 2.8s var(--ease); }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.section { position: relative; padding: clamp(80px, 11vw, 140px) 0 0; overflow-x: clip; }
.section-head { position: relative; display: grid; gap: 16px; justify-items: center; text-align: center; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head .eyebrow { gap: 14px; }
.section-head .eyebrow::before, .section-head .eyebrow::after { content: ''; width: 80px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-lo) 40%, var(--gold-hi)); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); }
.section-head .eyebrow::after { scale: -1 1; }
.chapter {
  position: relative; display: grid; place-items: center; width: 28px; height: 28px; isolation: isolate;
  font: 700 12px/1 var(--display); letter-spacing: 0; color: var(--gold-hi); text-shadow: 0 1px 0 #000;
}
.chapter::before {
  content: ''; position: absolute; inset: 4px; z-index: -1; rotate: 45deg; background: var(--umber-900);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo), 0 0 0 3px #000;
}
.section-head h2 { font: 600 clamp(30px, 4.4vw, 52px)/1.08 var(--display); letter-spacing: 0.02em; color: var(--gold-hi); text-wrap: balance; text-shadow: var(--glow-text); }
.section-sub { color: var(--muted); font-size: 17px; text-shadow: var(--glow-text); }
/* "zone discovered": the heading contracts into place */
.js .section-head[data-reveal] h2 { opacity: 0; letter-spacing: 0.18em; transition: opacity 1.2s var(--ease), letter-spacing 1.4s var(--ease); }
.js .section-head[data-reveal].in h2 { opacity: 1; letter-spacing: 0.02em; }

/* scroll reveal: frames rise into place (translate only, so inline JS transforms compose) */
.js [data-reveal] { opacity: 0; translate: 0 26px; transition: opacity 0.7s var(--ease), translate 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .plan[data-reveal] { translate: 0 40px; }
.js .step[data-reveal] { translate: -24px 0; }
.js .faq-item[data-reveal] { translate: 0 12px; }
/* :not(#_) lifts specificity above every variant above */
.js [data-reveal].in:not(#_) { opacity: 1; translate: 0 0; }

/* =====================================================================
   FEATURES — item tooltips with ability icons
   ===================================================================== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; perspective: 1200px; }
.feature {
  --mx: 50%; --my: 0%;
  position: relative; display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; align-content: start;
  padding: 18px 18px 22px; border-radius: 4px;
  background:
    linear-gradient(var(--ink-line), var(--ink-line)) 50% calc(100% - 9px) / 60% 1px no-repeat,
    linear-gradient(180deg, rgba(14, 12, 26, 0.95), rgba(6, 5, 14, 0.97));
  border: 1px solid var(--ink-line); box-shadow: 0 0 0 1px #000, 0 20px 40px -24px #000;
  transform-style: preserve-3d; transition: border-color 0.32s;
}
.feature::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(158, 199, 255, 0.1), transparent 45%);
}
.feature::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(183, 108, 255, 0.75), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.feature:hover { border-color: #9a95bd; }
.feature:hover::before, .feature:hover::after { opacity: 1; }
.feature > * { transform: translateZ(30px); }
.feature-icon {
  position: relative; grid-row: 1 / 3; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 7px; color: var(--gold-hi);
  background: radial-gradient(circle at 35% 30%, #3b2f22, #120d09);
  box-shadow: 0 0 0 1px #000, 0 0 0 3px var(--gold-deep), 0 0 0 4px #000, inset 0 0 0 1px rgba(255, 210, 120, 0.45), inset 0 -10px 12px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.32s;
}
.feature-icon::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 55%); }
.feature:hover .feature-icon { box-shadow: 0 0 0 1px #000, 0 0 0 3px var(--gold-lo), 0 0 0 4px #000, inset 0 0 0 1px rgba(255, 210, 120, 0.6), inset 0 -10px 12px rgba(0, 0, 0, 0.6), var(--glow-gold); }
.feature-icon svg { width: 28px; height: 28px; stroke-width: 1.75; filter: drop-shadow(0 1px 0 #000); }
.feature h3 { align-self: start; font: 700 18px/1.15 var(--display); letter-spacing: 0.02em; color: var(--q-epic); text-shadow: 0 1px 0 #000; }
.feature p { grid-column: 2; color: var(--text); font-size: 15px; margin-top: 10px; }

/* =====================================================================
   INSIDE THE APP — the addon window sits in a bigger options-panel plinth
   ===================================================================== */
#app .qp { position: relative; isolation: isolate; }
#app .qp::before {
  content: ''; position: absolute; inset: -18px; z-index: -1; pointer-events: none;
  border: 14px solid transparent; border-image: var(--frame-svg) 20 / 14px / 0 stretch;
  background: rgba(12, 9, 6, 0.9); box-shadow: var(--shadow-frame);
}
.qp-caption { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; font: 600 12px/1.5 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); text-align: center; }
.qp-caption::before, .qp-caption::after { content: ''; flex: 0 1 80px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-lo) 40%, var(--gold-hi)); }
.qp-caption::after { scale: -1 1; }

/* =====================================================================
   HOW IT WORKS — quest objectives
   ===================================================================== */
.steps-wrap { max-width: 820px; margin: 0 auto; padding: 8px 28px; }
.steps-line { position: absolute; left: 49px; top: 52px; width: 2px; height: calc(100% - 104px); overflow: visible; z-index: 1; }
.steps-line line { stroke: var(--gold); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 1000; stroke-dashoffset: calc(1000 - var(--p, 0) * 1000); filter: drop-shadow(0 0 6px rgba(232, 184, 74, 0.8)); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; position: relative; }
.steps::before { content: ''; position: absolute; left: 21px; top: 44px; bottom: 44px; width: 2px; background: rgba(232, 184, 74, 0.16); }
.step { position: relative; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 18px; padding: 22px 0; border-bottom: 1px solid rgba(232, 184, 74, 0.16); text-align: left; }
.step:last-child { border-bottom: 0; }
.step-num {
  --lit: 0;
  grid-row: 1 / 3; position: relative; display: grid; place-items: center; width: 44px; height: 44px; isolation: isolate;
  font: 700 16px/1 var(--display); color: var(--gold); text-shadow: 0 1px 0 #000;
}
.step-num::before {
  content: ''; position: absolute; inset: 6px; z-index: -1; rotate: 45deg; background: var(--umber-900);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo), 0 0 0 3px #000;
}
/* objective complete: a green mark lights up as the progress line passes */
.step-num::after {
  content: ''; position: absolute; right: -1px; top: -1px; width: 12px; height: 12px; rotate: 45deg; background: var(--ok);
  box-shadow: 0 0 0 1px #000, 0 0 8px var(--ok); opacity: var(--lit); transition: opacity 0.4s;
}
.step:nth-child(1) .step-num { --lit: clamp(0, calc((var(--p, 0) - 0.2) * 10), 1); }
.step:nth-child(2) .step-num { --lit: clamp(0, calc((var(--p, 0) - 0.55) * 10), 1); }
.step:nth-child(3) .step-num { --lit: clamp(0, calc((var(--p, 0) - 0.9) * 10), 1); }
@supports (color: color-mix(in srgb, red, blue)) {
  .step-num { color: color-mix(in srgb, var(--ok) calc(var(--lit) * 100%), var(--gold)); }
}
.step h3 { align-self: center; font: 700 19px/1.2 var(--display); letter-spacing: 0.02em; color: var(--gold-hi); }
.step p { grid-column: 2; position: relative; padding-left: 20px; color: var(--muted); font-size: 15px; margin-top: 6px; }
/* objective stud: a dim gold tick that turns --ok once the step is revealed (.in) */
.step p::before {
  content: ''; position: absolute; left: 0; top: 0.45em; width: 12px; height: 12px; background: var(--gold-lo);
  -webkit-mask: var(--tick-svg) center / contain no-repeat; mask: var(--tick-svg) center / contain no-repeat;
  transition: background-color 0.4s;
}
.step.in p::before { background: var(--ok); }
.step.in .step-num::after { opacity: max(var(--lit), 0.35); }

/* =====================================================================
   PRICING — three items on the vendor shelf (rare / epic / legendary)
   ===================================================================== */
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan {
  --q: var(--q-common); --q-glow: rgba(236, 225, 200, 0.2);
  position: relative; display: grid; gap: 20px; align-content: start; padding: 0 22px 24px;
  background: rgba(21, 17, 12, 0.94);
  transition: translate 0.32s var(--ease), box-shadow 0.32s var(--ease);
}
.plan:nth-child(1) { --q: var(--q-rare); --q-glow: rgba(79, 163, 255, 0.32); }
.plan:nth-child(3) { --q: var(--q-legend); --q-glow: rgba(255, 154, 46, 0.32); }
.plan.popular { --q: var(--q-epic); --q-glow: rgba(183, 108, 255, 0.36); }
.plan:hover { translate: 0 -4px; box-shadow: var(--shadow-frame), 0 0 24px var(--q-glow); }
.plan-head {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; margin: 0 -22px; padding: 18px 20px;
  background: linear-gradient(180deg, rgba(11, 10, 20, 0.9), transparent); border-bottom: 1px solid rgba(109, 106, 140, 0.5);
}
.plan-icon {
  position: relative; width: 44px; height: 44px; border-radius: 7px;
  background: radial-gradient(circle at 35% 30%, #3b2f22, #120d09);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-deep), 0 0 0 3px #000, inset 0 0 0 1px rgba(255, 210, 120, 0.45), inset 0 -8px 10px rgba(0, 0, 0, 0.6);
  filter: drop-shadow(0 0 6px var(--q-glow));
}
/* tier glyphs drawn from two triangles, tinted by quality — a different shape per tier, so colour is never the only carrier:
   rare = a single shard, epic = the hourglass, legendary = a diamond */
.plan-icon::before, .plan-icon::after { content: ''; position: absolute; left: 50%; width: 0; height: 0; translate: -50% 0; border-left: 9px solid transparent; border-right: 9px solid transparent; }
.plan-icon::before { top: 10px; border-top: 11px solid var(--q); }
.plan-icon::after { bottom: 10px; border-bottom: 11px solid var(--q); }
.plan:nth-child(1):not(.popular) .plan-icon::before { display: none; }
.plan:nth-child(1):not(.popular) .plan-icon::after { bottom: 15px; border-bottom-width: 14px; }
.plan:nth-child(3):not(.popular) .plan-icon::before { top: 21px; }
.plan:nth-child(3):not(.popular) .plan-icon::after { bottom: 21px; }
.plan h3 { font: 700 20px/1.15 var(--display); letter-spacing: 0.02em; text-transform: none; color: var(--q); text-shadow: 0 1px 0 #000; }
.plan-tier { display: block; margin-top: 4px; font: 600 11px/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); text-shadow: 0 1px 0 #000; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; font: 700 56px/1 var(--display); letter-spacing: -0.01em; color: var(--gold-hi); text-shadow: 0 2px 0 #3a2605; }
.plan-price .cur { font-size: 26px; color: var(--gold); align-self: flex-start; margin-top: 6px; }
.plan-price .per { flex-basis: 100%; display: block; margin-top: 6px; font: 400 13px/1 var(--sans); letter-spacing: 0; color: var(--dim); text-shadow: none; }
.plan ul { list-style: none; margin: 0; padding: 18px 0 4px; display: grid; gap: 12px; border-top: 1px solid rgba(232, 184, 74, 0.16); }
.plan li { position: relative; padding-left: 22px; font-size: 15px; color: var(--text); }
.plan li::before { content: ''; position: absolute; left: 4px; top: 8px; width: 6px; height: 6px; rotate: 45deg; background: var(--gold); box-shadow: 0 0 0 1px #000; }
.plan li.flavour { padding-left: 0; font-style: italic; color: var(--gold); }
.plan li.flavour::before { display: none; }
.plan .btn { width: 100%; }
.plan.popular { padding-bottom: 32px; box-shadow: var(--shadow-frame), 0 0 28px var(--q-glow); }
.plan.popular .plan-head { background: linear-gradient(180deg, rgba(60, 30, 90, 0.45), transparent); }
/* the title sits below the ribbon, never under it */
.plan.popular .plan-head { padding-top: 48px; }
/* the epic item: a slow light travels along the filigree */
.plan.popular::after {
  content: ''; position: absolute; inset: -4px; padding: 2px; pointer-events: none; z-index: 2; border-radius: 2px;
  background: conic-gradient(from var(--angle), transparent 0 40%, var(--gold-hi) 50%, var(--q-epic) 60%, transparent 70% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  filter: drop-shadow(0 0 8px rgba(183, 108, 255, 0.7));
  animation: rotate 6s linear infinite;
}
@keyframes rotate { to { --angle: 360deg; } }
.plan-badge {
  position: absolute; top: -8px; right: 22px; z-index: 3; padding: 22px 12px 14px;
  font: 700 11px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: #231505;
  background: linear-gradient(180deg, #fff3cf, #f7dc92 25%, #e8b84a 60%, #b4812e); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  text-shadow: 0 1px 0 rgba(255, 245, 215, 0.6);
}
/* the ribbon is pinned with a wax seal */
.plan-badge::before { content: ''; position: absolute; left: 50%; top: 2px; width: 18px; height: 18px; translate: -50% 0; background: var(--seal-svg) center / contain no-repeat; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.6)); }

/* =====================================================================
   REVIEWS — the guild chat frame
   ===================================================================== */
.reviews { max-width: 880px; margin: 0 auto; display: grid; gap: 2px; padding: 16px 8px 12px; background: rgba(12, 9, 6, 0.92); }
.reviews::after {
  content: 'Guild'; position: absolute; left: 10px; top: -40px; height: 28px; padding: 0 16px; display: inline-flex; align-items: center;
  font: 600 12px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
  background: linear-gradient(var(--umber-700), var(--umber-800)); border-radius: 3px 3px 0 0;
  box-shadow: 0 0 0 1px #000, inset 0 2px 0 var(--gold-lo);
}
.review {
  margin: 0; display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'cap stars' 'body body'; column-gap: 12px; row-gap: 4px;
  padding: 10px 16px; border-radius: 2px; background: none; border: 0;
}
.review:nth-child(even) { background: rgba(255, 255, 255, 0.025); }
.review figcaption { grid-area: cap; font-size: 15px; color: var(--guild); }
.review figcaption::before { content: '[Guild] ['; }
.review figcaption b { font-weight: 600; color: var(--guild); }
.review figcaption b::after { content: ']:'; }
.review-date { font-size: 12px; color: var(--dim); }
.review blockquote { grid-area: body; margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.stars { grid-area: stars; font-size: 14px; letter-spacing: 2px; color: var(--gold); text-shadow: 0 0 8px rgba(232, 184, 74, 0.45); }
.stars i { font-style: normal; color: rgba(236, 225, 200, 0.4); text-shadow: none; }
#reviews .section-sub { color: var(--warn); font-style: italic; font-size: 14px; }

/* =====================================================================
   FAQ — the quest log
   ===================================================================== */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.faq-head { justify-items: start; text-align: left; position: sticky; top: 120px; }
.faq-head .eyebrow::before { display: none; }
.faq { display: grid; padding: 4px 0; background: rgba(21, 17, 12, 0.94); }
.faq-item { border-bottom: 1px solid rgba(232, 184, 74, 0.16); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; min-height: 44px; transition: background-color 0.32s; }
.faq-item summary:hover { background: rgba(255, 255, 255, 0.025); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h3 { font: 600 16px/1.4 var(--display); letter-spacing: 0.01em; color: var(--gold); transition: color 0.32s; }
.faq-item[open] h3 { color: var(--gold-hi); }
/* quest marker: "!" while closed, filled gold with a tick once opened */
.faq-icon {
  position: relative; flex: none; width: 18px; height: 18px; margin: 0 6px; rotate: 45deg; background: var(--umber-900);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo), 0 0 0 3px #000; transition: rotate 0.5s var(--ease), background 0.4s;
}
.faq-icon::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 2px; height: 11px; margin: -5.5px 0 0 -1px; rotate: -45deg;
  background: linear-gradient(var(--gold) 0 6.5px, transparent 6.5px 8.5px, var(--gold) 8.5px);
}
.faq-icon::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 8px; margin: -5px 0 0 -2px; border: solid #231505; border-width: 0 2px 2px 0; rotate: 0deg; opacity: 0; }
.faq-item[open] .faq-icon { rotate: 225deg; background: linear-gradient(#f7dc92, #b4812e); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold), 0 0 0 3px #000, var(--glow-gold); }
.faq-item[open] .faq-icon::before { opacity: 0; }
.faq-item[open] .faq-icon::after { opacity: 1; rotate: -180deg; }
.faq-body { overflow: hidden; }
.faq-body p { margin: 0 20px 20px; padding: 16px 18px; font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; }

/* =====================================================================
   FOOTER — bottom bar with action-bar slots
   ===================================================================== */
.site-footer {
  position: relative; margin-top: clamp(80px, 11vw, 140px); padding: 36px 0 56px;
  background: linear-gradient(#17120c, #0b0806); border-top: 1px solid #000; box-shadow: 0 -1px 0 var(--bronze), 0 -2px 0 #000;
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer-note { flex: 1 1 360px; font-size: 13px; color: var(--dim); }
/* Privacy / Terms sit beside the disclaimer; the 40px targets keep them tappable */
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; font-size: 13px; }
.footer-legal a {
  display: inline-flex; align-items: center; min-height: 40px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(164, 150, 123, 0.45); transition: color 0.3s, text-decoration-color 0.3s;
}
.footer-legal a:hover { color: var(--gold-hi); text-decoration-color: var(--gold-lo); }
.footer-copy { font-size: 13px; color: var(--dim); }
.footer-guides { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 11px; color: var(--dim); }
.footer-guides b { font: 700 12px/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-right: 8px; }
.footer-guides a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 3px; background: var(--umber-800);
  box-shadow: var(--shadow-rim), var(--shadow-inset); font: 600 11px/1.3 var(--display); letter-spacing: 0.06em; color: var(--muted);
  transition: color 0.32s, box-shadow 0.32s, background-color 0.32s;
}
.footer-guides a:hover { color: var(--gold-hi); background: var(--umber-700); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold), 0 0 0 3px #000, var(--glow-gold); }

/* =====================================================================
   CHECKOUT — the quest reward dialog
   ===================================================================== */
.checkout { padding: 0; border: 0; background: transparent; color: inherit; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: visible; }
.checkout::backdrop { background: rgba(3, 2, 6, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.checkout[open] { animation: pop 0.32s var(--ease); }
.checkout[open]::backdrop { animation: fade 0.4s ease; }
@keyframes pop { from { opacity: 0; scale: 0.96; } }
@keyframes fade { from { opacity: 0; } }
.checkout-panel {
  position: relative; display: grid; gap: 14px; padding: 28px 26px 26px; overflow: auto; max-height: calc(100dvh - 32px);
  background: rgba(21, 17, 12, 0.98); box-shadow: var(--shadow-frame);
}
.checkout-panel .eyebrow { justify-content: center; gap: 14px; }
.checkout-panel .eyebrow::before, .checkout-panel .eyebrow::after { content: ''; width: 60px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-lo) 40%, var(--gold-hi)); }
.checkout-panel .eyebrow::after { scale: -1 1; }
.checkout-panel h2 { font: 700 24px/1.15 var(--display); letter-spacing: 0.02em; color: var(--gold-hi); text-align: center; text-shadow: 0 1px 0 #000; }
.checkout-price { color: var(--gold); }
.checkout-sub { font-size: 14.5px; padding: 12px 14px; text-align: center; }
.checkout-close {
  position: absolute; top: 2px; right: 2px; z-index: 2; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid #000; cursor: pointer;
  display: grid; place-items: center; font: 700 18px/1 var(--display); color: #ffd54a; text-shadow: 0 1px 0 #000;
  background: radial-gradient(circle at 40% 35%, #c43a28, #5a0d06);
  box-shadow: 0 0 0 1px var(--bronze), inset 0 1px 0 rgba(255, 255, 255, 0.25); transition: filter 0.32s, box-shadow 0.32s;
}
.checkout-close:hover { filter: brightness(1.2); box-shadow: 0 0 0 1px var(--gold), inset 0 1px 0 rgba(255, 255, 255, 0.25), var(--glow-gold); }
.coins { display: grid; gap: 10px; }
.coin {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; min-height: 44px; padding: 10px 12px; border-radius: 3px; cursor: pointer;
  border: 0; background: var(--umber-900); box-shadow: var(--shadow-rim); color: var(--text); text-align: left;
  transition: background-color 0.32s, box-shadow 0.32s;
}
.coin:hover { background: var(--umber-700); }
.coin[aria-checked='true'] { background: var(--umber-700); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold), 0 0 0 3px #000, var(--glow-gold); }
.coin-icon {
  width: 44px; height: 44px; padding: 5px; border-radius: 7px;
  background: radial-gradient(circle at 35% 30%, #3b2f22, #120d09);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-deep), 0 0 0 3px #000, inset 0 0 0 1px rgba(255, 210, 120, 0.4);
}
.coin-name { font: 600 15px/1.2 var(--display); letter-spacing: 0.01em; color: var(--text); }
.coin-net { display: block; margin-top: 2px; font: 400 12px/1.3 var(--sans); color: var(--dim); }
.coin-amount { font: 500 13.5px/1.2 var(--mono); color: var(--gold-hi); text-align: right; }
.checkout-note { font-size: 13px; color: var(--dim); }
.checkout-error { color: var(--danger); font-size: 14px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 213, 74, 0.3); border-top-color: #ffd54a; animation: spin 0.8s linear infinite; }

/* =====================================================================
   ORDER / TICKET PAGE (kept rendering; restyled by the second pass)
   ===================================================================== */
.ticket-page { min-height: 100vh; padding: 112px 0 64px; position: relative; isolation: isolate; }
.ticket-page .orb-a { position: fixed; opacity: 0.32; }
.ticket-page .orb-b { position: fixed; opacity: 0.22; }
.ticket-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 20px; align-items: start; }
.panel { padding: 24px; }
/* window title bar: Cinzel caps with a hairline running to the right edge */
.panel-title {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px;
  font: 700 13px/1 var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); text-shadow: 0 1px 0 #000;
}
.panel-title::before { content: ''; flex: none; width: 8px; height: 8px; rotate: 45deg; background: var(--gold-hi); box-shadow: 0 0 0 1px #000, 0 0 8px rgba(247, 220, 146, 0.5); }
.panel-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-lo), transparent); }
.ticket-eyebrow { gap: 14px; margin-bottom: 14px; }
.ticket-eyebrow::after { content: ''; flex: 1; width: 60px; height: 1px; background: linear-gradient(90deg, var(--gold-lo), transparent); }
.ticket-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.ticket-code { font: 500 13px/1 var(--mono); color: var(--dim); letter-spacing: 0.04em; }
.ticket-plan { font: 700 26px/1.15 var(--display); margin-top: 8px; color: var(--gold-hi); text-shadow: 0 1px 0 #000; }
/* status markers: quest-objective style, no pill */
.status { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 3px; font: 600 12.5px/1 var(--sans); letter-spacing: 0.04em; background: var(--umber-900); box-shadow: var(--shadow-rim); }
.status::before { content: ''; width: 8px; height: 8px; rotate: 45deg; background: currentColor; box-shadow: 0 0 0 1px #000, 0 0 8px currentColor; }
.status-awaiting, .status-checking { color: var(--warn); }
.status-awaiting::before, .status-checking::before { animation: ping-c 2s var(--ease) infinite; }
@keyframes ping-c { 0% { box-shadow: 0 0 0 1px #000, 0 0 0 0 currentColor; } 80%, 100% { box-shadow: 0 0 0 1px #000, 0 0 0 7px transparent; } }
.status-paid { color: var(--ok); }
.status-expired, .status-closed { color: var(--muted); }
.status-expired::before, .status-closed::before { box-shadow: 0 0 0 1px #000; }

.label { font: 600 12px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.amount-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px; border-radius: 3px; background: var(--umber-900); box-shadow: var(--shadow-rim); }
.amount { font: 700 clamp(26px, 4.4vw, 40px)/1.05 var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0; word-break: break-all; color: var(--gold-hi); }
.amount small { font-size: 0.5em; color: var(--gold); margin-left: 6px; letter-spacing: 0.04em; }
.amount-usd { margin-top: 10px; font-size: 13.5px; color: var(--dim); }
.copy {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 3px; cursor: pointer;
  border: 1px solid #000; background: linear-gradient(#2d241a, #17110b); box-shadow: var(--shadow-rim), var(--shadow-inset);
  font: 600 13px/1 var(--display); letter-spacing: 0.04em; color: var(--text); transition: background-color 0.32s, color 0.32s, box-shadow 0.32s;
}
.copy:hover { background: linear-gradient(var(--umber-600), #1c150e); color: var(--gold-hi); }
.copy.done { color: var(--ok); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--ok), 0 0 0 3px #000, var(--shadow-inset); }
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; margin-top: 18px; align-items: stretch; }
.address-box { display: grid; gap: 12px; align-content: start; padding: 20px; border-radius: 3px; background: var(--umber-900); box-shadow: var(--shadow-rim); }
.address { font: 500 14.5px/1.5 var(--mono); word-break: break-all; color: var(--text); }
.network { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 5px 10px; border-radius: 3px; font-size: 12px; font-weight: 600; color: var(--arcane-hi); background: rgba(139, 92, 246, 0.14); box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.4); }
.qr { width: 168px; padding: 12px; border-radius: 3px; background: #f4efe4; box-shadow: var(--shadow-rim); }
.qr img { width: 100%; height: auto; aspect-ratio: 1; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.meta { padding: 16px 18px; border-radius: 3px; background: var(--umber-900); box-shadow: var(--shadow-rim); }
.meta .value { font: 600 18px/1.2 var(--display); color: var(--gold-hi); }
.meta .hint { margin-top: 6px; font-size: 12.5px; color: var(--dim); }
.timer { display: flex; align-items: center; gap: 12px; }
.timer svg { width: 34px; height: 34px; flex: none; transform: rotate(-90deg); filter: drop-shadow(0 0 6px rgba(232, 184, 74, 0.6)); }
.timer circle { fill: none; stroke-width: 3; }
.timer .track { stroke: rgba(255, 255, 255, 0.12); }
.timer .bar { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 88; transition: stroke-dashoffset 1s linear; }
.notice { margin-top: 18px; padding: 16px 18px; border-radius: 3px; font-size: 14px; color: var(--text); background: rgba(232, 184, 74, 0.07); box-shadow: 0 0 0 1px rgba(232, 184, 74, 0.25); }
.notice.ok { color: #d6f5db; background: rgba(95, 211, 106, 0.08); box-shadow: 0 0 0 1px rgba(95, 211, 106, 0.3); }
.notice b { color: var(--gold-hi); }
.tx-form { display: flex; gap: 10px; margin-top: 10px; }
.input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 3px; border: 0; color: var(--text);
  background: linear-gradient(#070503, #120d08); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 0 1px #000, 0 0 0 2px var(--bronze);
  font: 500 14px/1 var(--mono); transition: box-shadow 0.3s;
}
.input::placeholder { color: var(--dim); }
.input:hover { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 0 1px #000, 0 0 0 2px var(--gold-lo); }
.input:focus { outline: none; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 0 1px #000, 0 0 0 2px var(--gold), var(--glow-gold); }
.input:user-invalid { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 0 1px #000, 0 0 0 2px var(--danger); }
.input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px #120d08 inset, 0 0 0 1px #000, 0 0 0 2px var(--bronze); -webkit-text-fill-color: var(--text); }
.form-error { margin-top: 8px; font-size: 13.5px; color: var(--danger); }
.section-gap { margin-top: 26px; }
.save-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }

/* support = the whisper tab of the chat frame */
.chat { display: grid; grid-template-rows: auto 1fr auto; height: min(760px, calc(100vh - 140px)); min-height: 520px; padding: 0; overflow: hidden; position: sticky; top: 96px; background: rgba(12, 9, 6, 0.94); }
.chat-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 12px; padding: 14px 16px 0;
  background: linear-gradient(var(--umber-700), var(--umber-800)); border-bottom: 1px solid #000; box-shadow: 0 1px 0 var(--bronze);
}
.chat-head h2 { grid-column: 1; font: 600 18px/1.2 var(--display); color: var(--gold); text-shadow: 0 1px 0 #000; }
.chat-head p { grid-column: 1; margin: 2px 0 12px; font-size: 13px; color: var(--dim); }
.chat-tabs { grid-column: 2; grid-row: 1 / 3; align-self: end; display: flex; gap: 3px; }
.chat-tab {
  display: inline-flex; align-items: center; height: 28px; padding: 0 14px; border-radius: 3px 3px 0 0;
  font: 600 11px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim);
  background: var(--umber-900); box-shadow: 0 0 0 1px #000;
}
.chat-tab.is-on { color: var(--whisper); background: rgba(0, 0, 0, 0.4); box-shadow: 0 0 0 1px #000, inset 0 2px 0 var(--whisper); text-shadow: 0 1px 0 #000; }
.messages { overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; background: rgba(0, 0, 0, 0.4); }
.msg { position: relative; max-width: 100%; padding: 1px 0; border-radius: 0; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; color: var(--text); animation: msg-in 0.5s var(--ease); }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px); } }
.msg::before { font-weight: 600; }
.msg time { display: inline; margin-left: 8px; font-size: 11px; color: var(--dim); opacity: 1; letter-spacing: 0.02em; }
.msg-client { align-self: stretch; }
.msg-client::before { content: 'To [Support]: '; color: var(--whisper); }
.msg-support { align-self: stretch; color: var(--whisper); }
.msg-support::before { content: '[Support] whispers: '; }
.msg-system { align-self: center; max-width: 92%; text-align: center; color: var(--warn); font-style: italic; font-size: 13px; padding: 4px 8px; }
.msg-system::before { content: '[System] '; font-style: normal; }
.composer { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid #000; box-shadow: 0 -1px 0 var(--bronze); background: linear-gradient(var(--umber-800), var(--umber-900)); }
.composer textarea { flex: 1; min-width: 0; resize: none; height: 46px; max-height: 140px; padding: 12px 16px; border-radius: 3px; border: 0; color: var(--text); background: linear-gradient(#070503, #120d08); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 0 1px #000, 0 0 0 2px var(--bronze); font-size: 14.5px; line-height: 1.45; overflow-y: hidden; }
.composer textarea:focus { outline: none; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 0 1px #000, 0 0 0 2px var(--gold), var(--glow-gold); }
.composer .btn { --h: 46px; padding: 0 18px; }
.paid-burst { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 18px 0 6px; }
/* the wax seal: a 12-bump lacquer disc pops in, the gold rim draws itself, then the tick */
.paid-burst svg { width: 72px; height: 72px; overflow: visible; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.7)) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.6)); }
.paid-burst .seal-wax { fill: var(--lacquer); stroke: var(--lacquer-lo); stroke-width: 1; transform-origin: 36px 36px; animation: seal-pop 0.5s var(--ease) both; }
.paid-burst .seal-shine { fill: rgba(255, 235, 200, 0.22); }
.paid-burst .seal-rim { fill: none; stroke: var(--gold-hi); stroke-width: 2; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 1s var(--ease) 0.3s forwards; }
.paid-burst .seal-check { fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw 0.6s var(--ease) 0.9s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes seal-pop { from { scale: 0.6; opacity: 0; } }
.paid-burst h2 { font: 700 26px/1.1 var(--display); color: var(--gold-hi); }
.paid-burst p { color: var(--muted); max-width: 380px; }
/* "zone not discovered": 404 and order-not-found share this framed notice */
.center-state { min-height: 60vh; display: grid; place-items: center; text-align: center; gap: 16px; }
.center-state > div { display: grid; justify-items: center; gap: 14px; width: min(540px, 100%); padding: 34px 30px 32px; animation: panel-in 0.9s var(--ease) both; }
.center-state .eyebrow { gap: 14px; }
.center-state .eyebrow::before, .center-state .eyebrow::after { content: ''; width: 48px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-lo) 40%, var(--gold-hi)); }
.center-state .eyebrow::after { scale: -1 1; }
.center-state h1 { font: 700 clamp(28px, 4.5vw, 44px)/1.1 var(--display); color: var(--gold-hi); text-shadow: 0 1px 0 #000; text-wrap: balance; }
.center-state p { color: var(--muted); max-width: 420px; }
.center-state .parchment { padding: 12px 16px; font-size: 15px; color: var(--ink-text); }
.lost-mark { width: 76px; height: 76px; color: var(--gold); filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 14px rgba(232, 184, 74, 0.35)); }
.lost-mark .needle { transform-origin: 38px 38px; animation: needle 7s var(--ease) infinite alternate; }
@keyframes needle { 0% { rotate: -28deg; } 40% { rotate: 22deg; } 70% { rotate: -10deg; } 100% { rotate: 30deg; } }
@keyframes panel-in { from { opacity: 0; translate: 0 24px; } }
/* 404: ghosted 1px-stroke numeral + faint radially-masked rune tile behind the copy */
.center-state.is-lost > div { isolation: isolate; overflow: clip; }
.center-state.is-lost .ghost-num { position: absolute; left: 50%; top: 50%; translate: -50% -54%; z-index: -1; pointer-events: none; user-select: none; font: 700 clamp(180px, 30vw, 360px)/1 var(--display); letter-spacing: 0.04em; color: transparent; -webkit-text-stroke: 1px var(--gold-lo); opacity: 0.18; }
.center-state.is-lost > div::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05; background: var(--rune-tile) center / 120px 120px repeat; -webkit-mask: radial-gradient(closest-side, #000 15%, transparent 70%); mask: radial-gradient(closest-side, #000 15%, transparent 70%); }
@media (forced-colors: active) { .center-state.is-lost .ghost-num, .center-state.is-lost > div::after { display: none; } }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 980px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .plan.popular { order: -1; }
  .faq-grid { grid-template-columns: 1fr; gap: 0; }
  .faq-head { position: static; justify-items: center; text-align: center; }
  .faq-head .eyebrow::before { display: block; }
  .ticket-grid { grid-template-columns: minmax(0, 1fr); }
  .chat { position: static; height: 600px; }
}
@media (max-width: 760px) {
  /* the main nav becomes the action bar at the bottom of the screen */
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; justify-content: space-around; align-self: auto;
    height: calc(56px + env(safe-area-inset-bottom, 0px)); padding: 0 4px env(safe-area-inset-bottom, 0px);
    background: var(--umber-900); border-top: 1px solid #000; box-shadow: 0 -1px 0 var(--bronze), 0 -2px 0 #000, 0 -10px 30px -10px #000;
  }
  .nav a { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 5px; min-width: 44px; max-width: 100%; padding: 0 2px; font-size: 10.5px; line-height: 1.1; letter-spacing: 0.04em; text-align: center; white-space: normal; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
  /* the long half of "How it works" is for the desktop bar only */
  .nav .nav-long { display: none; }
  .nav a::before {
    content: ''; width: 24px; height: 24px; border-radius: 5px;
    background: var(--diamond-svg) center / 22px no-repeat, radial-gradient(circle at 35% 30%, #3b2f22, #120d09);
    box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-deep), 0 0 0 3px #000;
  }
  .nav a::after { bottom: auto; top: 0; left: 6px; right: 6px; }
  body:has(.site-header .nav) { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-bottom: 72px; }
  .site-header { height: 56px; }
  /* no backdrop-filter on the header here: it would become the containing block of the fixed action bar */
  .site-header.scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; background: linear-gradient(#1c1510, #0e0a07); }
  .hero-title { font-size: clamp(38px, 11vw, 60px); }
  .features { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 48px 1fr; padding: 16px; }
  .feature-icon { width: 48px; height: 48px; }
  .frame, .plan, .faq, .reviews, .checkout-panel, .panel, .guide-article, .guide-more, .center-state > div { border-width: 8px; border-image-width: 8px; }
  .steps-wrap { padding: 4px 16px; }
  .steps-line { left: 37px; top: 48px; height: calc(100% - 96px); }
  .hero-pay { flex-wrap: wrap; justify-content: center; }
  .review { grid-template-columns: 1fr; grid-template-areas: 'cap' 'stars' 'body'; }
  .stars { justify-self: start; }
  .faq-body p { margin: 0 14px 16px; padding: 14px; }
  .faq-item summary { padding: 16px; }
  #app .qp::before { inset: -10px; border-width: 10px; border-image-width: 10px; }
  .letterbox::before, .letterbox::after { height: 6vh; }
  .site-footer { padding-bottom: 36px; }
  /* on phones the legal links take their own line under the disclaimer */
  .footer-legal { flex-basis: 100%; }
}
@media (max-width: 560px) {
  .header-actions { gap: 8px; }
  .logo { font-size: 14px; letter-spacing: 0.1em; gap: 8px; } /* the longer brand name must leave room for two header buttons */
  .header-actions .btn { --h: 40px; padding: 0 10px; font-size: 11.5px; }
  .panel:not(.chat):not(.auth-panel) { padding: 18px; }
  .center-state > div { padding: 26px 18px 24px; }
  .pay-grid { grid-template-columns: minmax(0, 1fr); }
  .qr { width: 180px; justify-self: center; }
  .meta-grid { grid-template-columns: minmax(0, 1fr); }
  .amount-row { flex-direction: column; align-items: flex-start; }
  /* the chat tabs drop under the title instead of squeezing the subtitle beside them */
  .chat-head { grid-template-columns: minmax(0, 1fr); }
  .chat-tabs { grid-column: 1; grid-row: auto; justify-self: start; }
  .save-link { flex-direction: column; align-items: flex-start; }
  /* the reward dialog becomes a bottom sheet */
  .checkout { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; }
  .checkout-panel { padding: 24px 16px 20px; max-height: 92dvh; border-width: 12px 0 0 0; border-image-width: 12px 0 0 0; }
  .coin { grid-template-columns: 38px 1fr; }
  .coin-icon { width: 38px; height: 38px; padding: 4px; }
  .coin-amount { grid-column: 2; text-align: left; }
}

/* =====================================================================
   MOTION, TRANSPARENCY AND CONTRAST PREFERENCES
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  *, *::before, *::after { animation-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .grain, .embers, .curtain, .letterbox { display: none; }
  .js [data-reveal] { opacity: 1; translate: 0 0; }
  .js .hero-title .word > span, .js .hero-eyebrow, .js .hero-text, .js .hero-cta, .js .hero-pay { opacity: 1; translate: 0 0; letter-spacing: inherit; filter: none; }
  .js .section-head[data-reveal] h2 { opacity: 1; letter-spacing: 0.02em; }
  .feature { transform: none !important; }
  .plan.popular::after, .btn-gold::after, .js .frame[data-reveal].in::after { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .frame, .feature, .plan, .faq, .reviews, .panel, .checkout-panel, .site-header { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .frame, .plan, .faq, .reviews, .checkout-panel, .steps-wrap, .panel, .guide-article, .guide-more, .center-state > div, #app .qp::before { background-color: var(--umber-800); }
  .feature, .guide-card { background: var(--ink); }
  .paper-page::before { display: none; }
}
@media (forced-colors: active) {
  .frame, .feature, .plan, .faq, .reviews, .panel, .guide-article, .guide-more, .guide-card, .center-state > div, .coin, .input, .btn { border: 1px solid CanvasText; forced-color-adjust: auto; }
  .hero-title .word > span, .metal { background: none; color: CanvasText; -webkit-text-fill-color: CanvasText; }
}

/* =====================================================================
   CINEMATIC 3D LAYER (canvas behind the page; html.webgl while it runs)
   ===================================================================== */
.scene-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
html.webgl .hero-bg, html.webgl .grain, html.webgl .ticket-page > .orb { display: none; }

/* loading screen: black curtain with a filling bar, then the letterbox bars open */
.curtain { position: fixed; inset: 0; z-index: 95; background: #000; pointer-events: none; animation: curtain-out 0.7s var(--ease) 1.45s forwards; }
@keyframes curtain-out { to { opacity: 0; visibility: hidden; } }
.curtain::before, .curtain::after { content: ''; position: absolute; left: 50%; bottom: 14vh; translate: -50% 0; border-radius: 3px; }
.curtain::before {
  width: min(560px, 80vw); height: 18px; background: linear-gradient(#0d0906, #1c130b); border: 1px solid #000;
  box-shadow: 0 0 0 1px var(--bronze), 0 0 0 2px #000, inset 0 2px 5px rgba(0, 0, 0, 0.85);
}
.curtain::after {
  width: calc(min(560px, 80vw) - 4px); height: 14px; bottom: calc(14vh + 2px); transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, transparent calc(100% - 6px), rgba(255, 243, 207, 0.9)), linear-gradient(180deg, #ffd86b, #e39a24 55%, #a8560e);
  box-shadow: 0 0 14px rgba(255, 180, 60, 0.8);
  animation: load-fill 1.3s var(--ease) 0.05s forwards;
}
@keyframes load-fill { to { transform: scaleX(1); } }
.curtain-label {
  position: absolute; left: 50%; bottom: calc(14vh + 34px); translate: -50% 0; white-space: nowrap;
  font: 600 14px/1 var(--display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); text-shadow: var(--glow-text);
}
body[data-scene]:not([data-scene='landing']) .curtain { animation-delay: 0.8s; }
body[data-scene]:not([data-scene='landing']) .curtain::after { animation-duration: 0.7s; }
.letterbox::before, .letterbox::after {
  content: ''; position: fixed; left: 0; right: 0; height: 10vh; z-index: 94; background: #000; pointer-events: none;
  animation: bars-out 1.8s var(--ease) 2.9s forwards;
}
.letterbox::before { top: 0; transform-origin: top; box-shadow: inset 0 -1px 0 var(--bronze); }
.letterbox::after { bottom: 0; transform-origin: bottom; box-shadow: inset 0 1px 0 var(--bronze); }
@keyframes bars-out { to { transform: scaleY(0); } }

/* text stays readable over the scene */
html.webgl .hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 62% 78% at 26% 56%, rgba(6, 5, 10, 0.78), rgba(6, 5, 10, 0.4) 55%, transparent 75%); }
/* alpha floor ≥ 0.7 out to the halo's 75% band, so .section-sub never sits on thin scrim */
html.webgl .section-head::before {
  content: ''; position: absolute; inset: -56px -18%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(5, 4, 10, 0.9) 40%, rgba(5, 4, 10, 0.75) 75%, transparent);
}
/* faint rune tile behind the halo (≈5% at the centre), radially masked */
html.webgl .section-head::after {
  content: ''; position: absolute; inset: -56px -18%; z-index: -1; pointer-events: none; opacity: 0.1;
  background: var(--rune-tile) center / 120px 120px repeat;
  -webkit-mask: radial-gradient(closest-side, #000 15%, transparent 70%); mask: radial-gradient(closest-side, #000 15%, transparent 70%);
}
html.webgl .section-head h2 { text-shadow: 0 1px 0 #000, 0 0 12px rgba(0, 0, 0, 0.85), 0 4px 32px rgba(0, 0, 0, 0.85); }
/* unframed text over the world uses the full text colour, never the muted one */
html.webgl .section-sub, html.webgl .hero-pay { color: var(--text); }
html.webgl .hud-label { padding: 4px 10px; border-radius: 3px; background: rgba(12, 9, 6, 0.85); box-shadow: 0 0 0 1px #000; }

/* glass over the world: capped blur, alpha floors keep text ≥ 4.5:1 on the brightest sky */
html.webgl .frame, html.webgl .plan, html.webgl .faq, html.webgl .reviews, html.webgl .checkout-panel, html.webgl .panel { backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); }
html.webgl .feature { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
html.webgl .meta, html.webgl .address-box, html.webgl .amount-row { background: rgba(12, 9, 6, 0.9); }
@media (pointer: coarse) {
  html.webgl .frame, html.webgl .plan, html.webgl .faq, html.webgl .reviews, html.webgl .checkout-panel, html.webgl .panel, html.webgl .feature { backdrop-filter: none; -webkit-backdrop-filter: none; }
  html.webgl .frame, html.webgl .plan, html.webgl .faq { background-color: rgba(21, 17, 12, 0.97); }
  html.webgl .reviews, #app .qp::before { background-color: rgba(12, 9, 6, 0.97); }
  html.webgl .feature { background: linear-gradient(var(--ink-line), var(--ink-line)) 50% calc(100% - 9px) / 60% 1px no-repeat, rgba(9, 8, 18, 0.97); }
}

/* hero framing: text left, relic right on wide screens; relic above the text on phones */
@media (min-width: 981px) {
  html.webgl .hero { place-items: center start; padding-left: max(var(--gutter), calc((100vw - 1180px) / 2 + var(--gutter))); }
  html.webgl .hero-inner { justify-items: start; text-align: left; max-width: 660px; }
  html.webgl .hero-title { font-size: clamp(56px, 6.4vw, 96px); }
  html.webgl .hero-cta, html.webgl .hero-pay { justify-content: flex-start; }
  /* the radial scrim thins to ≈0.25 at the right edge of the text column; a left-to-right band keeps it ≥ 0.85 across the whole column */
  html.webgl .hero::before {
    background:
      linear-gradient(90deg, rgba(6, 5, 10, 0.85) 0 48%, transparent 78%),
      radial-gradient(ellipse 62% 78% at 26% 56%, rgba(6, 5, 10, 0.78), rgba(6, 5, 10, 0.4) 55%, transparent 75%);
  }
}
@media (max-width: 980px) {
  html.webgl .hero { place-items: end center; padding-bottom: 110px; }
  html.webgl .hero::before { background: linear-gradient(to top, rgba(5, 4, 10, 0.92) 25%, rgba(5, 4, 10, 0.55) 62%, transparent 82%); }
}

/* =====================================================================
   HUD — the experience bar along the bottom of the screen
   ===================================================================== */
.hud {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: 22px; pointer-events: none;
  opacity: 0; translate: 0 8px; transition: opacity 0.8s var(--ease), translate 0.8s var(--ease);
}
.hud.on { opacity: 1; translate: 0 0; }
.hud-label {
  position: absolute; left: var(--gutter); bottom: 12px; display: inline-flex; align-items: center;
  font: 600 11px/1 var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); text-shadow: var(--glow-text);
}
.hud-label b { font-weight: 700; color: var(--gold); }
.hud-label i { display: inline-block; width: 1px; height: 10px; margin: 0 10px; background: var(--bronze); }
.hud-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; overflow: hidden; background: var(--umber-900); border-top: 1px solid #000; box-shadow: inset 0 1px 0 var(--bronze); }
.hud-bar span { position: absolute; inset: 1px 0 0; background: linear-gradient(#c79cff, #8b5cf6); transform-origin: left; transform: scaleX(var(--p, 0)); box-shadow: 0 0 10px rgba(139, 92, 246, 0.7); }
.hud-bar::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 calc(5% - 1px), rgba(0, 0, 0, 0.65) calc(5% - 1px) 5%); }
@media (max-width: 980px) { .hud { display: none; } }

/* =====================================================================
   SIGN IN / REGISTER (kept rendering; restyled by the second pass)
   ===================================================================== */
/* the character-select window: two tabs on top of one gold frame, a crest, parchment hint, lacquer "Accept" */
.auth-page { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 110px var(--gutter) 60px; }
.auth-panel { width: min(460px, 100%); padding: 0; overflow: hidden; animation: panel-in 0.9s var(--ease) 0.9s both; }
.tabs {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 6px 6px 0;
  background: linear-gradient(var(--umber-900), var(--umber-800)); border-bottom: 1px solid #000; box-shadow: 0 1px 0 var(--bronze);
}
/* faint rune tile behind the tabs, radially masked */
.tabs::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.1;
  background: var(--rune-tile) center / 120px 120px repeat;
  -webkit-mask: radial-gradient(closest-side, #000 20%, transparent 80%); mask: radial-gradient(closest-side, #000 20%, transparent 80%);
}
.tabs a {
  position: relative; padding: 14px 12px; text-align: center; border-radius: 3px 3px 0 0;
  font: 600 12.5px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  background: linear-gradient(var(--umber-700), var(--umber-800)); box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255, 220, 150, 0.08);
  transition: color 0.3s, background-color 0.3s, box-shadow 0.3s;
}
.tabs a:hover { color: var(--text); background: linear-gradient(var(--umber-600), var(--umber-700)); }
.tabs a.active { color: var(--gold-hi); background: rgba(21, 17, 12, 0.94); box-shadow: 0 0 0 1px #000, inset 0 2px 0 var(--gold); text-shadow: 0 1px 0 #000; }
.auth-form { display: grid; gap: 16px; padding: 26px 28px 30px; }
.auth-crest { width: 68px; height: 68px; justify-self: center; color: var(--gold); filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 14px rgba(232, 184, 74, 0.35)); }
.auth-crest svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.auth-form h1 { font: 700 26px/1.1 var(--display); color: var(--gold-hi); text-align: center; text-shadow: 0 1px 0 #000; margin-top: -6px; }
.auth-sub { font-size: 14px; text-align: center; padding: 10px 14px; margin-top: -4px; }
.field { display: grid; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.field .input { font-family: var(--sans); font-size: 15px; letter-spacing: 0; text-transform: none; }
.field small { font-weight: 400; color: var(--dim); font-size: 12px; letter-spacing: 0; text-transform: none; }
.auth-form .form-error { margin: -6px 0 -4px; text-align: center; }
.auth-foot { text-align: center; font-size: 13px; color: var(--dim); margin-top: 2px; }
.auth-foot a { color: var(--gold); }
.auth-foot a:hover { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }
/* consent lines under the sign-up button and the checkout button */
.consent { font-size: 12.5px; line-height: 1.5; color: var(--dim); text-align: center; text-wrap: balance; }
.consent a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(164, 150, 123, 0.45); transition: color 0.3s, text-decoration-color 0.3s; }
.consent a:hover { color: var(--gold-hi); text-decoration-color: var(--gold-lo); }
.auth-form .consent { margin-top: -6px; }
.checkout .consent { margin-top: -4px; }
.muted { color: var(--muted); font-size: 14px; }

/* =====================================================================
   ACCOUNT (kept rendering; restyled by the second pass)
   ===================================================================== */
/* the character sheet: portrait, name plate, subscription as an XP bar, token as an inscription, orders as a quest log */
.account-page { padding-top: 120px; padding-bottom: 80px; }
.account-head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 22px; row-gap: 6px; align-items: center; margin-bottom: 30px; animation: panel-in 0.9s var(--ease) 0.9s both; }
.portrait {
  grid-row: 1 / 4; width: 88px; height: 88px; padding: 12px; border-radius: 7px; color: var(--gold-hi);
  background: radial-gradient(circle at 35% 30%, #3b2f22, #120d09);
  box-shadow: 0 0 0 1px #000, 0 0 0 3px var(--gold-deep), 0 0 0 4px #000, inset 0 0 0 1px rgba(255, 210, 120, 0.45), inset 0 -14px 16px rgba(0, 0, 0, 0.6), var(--glow-gold);
}
.portrait svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 1px 0 #000); }
.account-head .eyebrow { grid-column: 2; text-shadow: var(--glow-text); }
.account-head h1 { grid-column: 2; font: 700 clamp(34px, 5vw, 56px)/1.05 var(--display); color: var(--gold-hi); text-shadow: var(--glow-text); overflow-wrap: anywhere; }
.account-head .muted { grid-column: 2; text-shadow: var(--glow-text); }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.account-grid .panel { display: grid; gap: 16px; animation: panel-in 0.9s var(--ease) both; animation-delay: calc(1s + var(--i, 0) * 0.12s); }
.account-grid .panel-title { margin: 0; }
.orders-panel { grid-column: 1 / -1; }
.sub-state { display: grid; gap: 8px; justify-items: start; }
.sub-plan { font: 700 24px/1.2 var(--display); color: var(--gold-hi); text-shadow: 0 1px 0 #000; }
.sub-bar { position: relative; height: 14px; border-radius: 3px; background: linear-gradient(#0d0906, #1c130b); border: 1px solid #000; box-shadow: 0 0 0 1px var(--bronze), 0 0 0 2px #000, inset 0 2px 5px rgba(0, 0, 0, 0.85); overflow: hidden; }
.sub-bar span { display: block; height: 100%; background: linear-gradient(90deg, transparent calc(100% - 6px), rgba(255, 243, 207, 0.9)), linear-gradient(180deg, #ffd86b, #e39a24 55%, #a8560e); box-shadow: 0 0 12px rgba(255, 180, 60, 0.75); transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease); }
.sub-bar::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0, 0, 0, 0.6) calc(10% - 1px) 10%); }
.sub-days { display: flex; justify-content: space-between; font: 600 11px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-top: -8px; }
.account-grid .btn { justify-self: start; }
.token-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 3px; background: linear-gradient(#070503, #120d08); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 0 1px #000, 0 0 0 2px var(--bronze); }
.token-box code { font: 500 14px/1.5 var(--mono); letter-spacing: 0.02em; word-break: break-all; color: var(--gold-hi); text-shadow: 0 0 10px rgba(232, 184, 74, 0.35); }
.orders { display: grid; gap: 8px; }
.order-row {
  display: grid; grid-template-columns: 14px 120px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; min-height: 48px; padding: 12px 16px; border-radius: 3px;
  background: var(--umber-900); box-shadow: var(--shadow-rim); transition: background-color 0.3s, box-shadow 0.3s;
}
.order-row::before { content: ''; width: 9px; height: 9px; rotate: 45deg; justify-self: center; background: var(--gold-lo); box-shadow: 0 0 0 1px #000; }
.order-row:hover { background: var(--umber-700); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo), 0 0 0 3px #000; }
.order-row:has(.status-paid)::before { background: var(--ok); box-shadow: 0 0 0 1px #000, 0 0 8px var(--ok); }
.order-row:has(.status-awaiting)::before, .order-row:has(.status-checking)::before { background: var(--warn); box-shadow: 0 0 0 1px #000, 0 0 8px var(--warn); }
.order-code { font: 500 13.5px/1 var(--mono); color: var(--dim); }
.order-plan { font: 600 14.5px/1.3 var(--display); color: var(--text); }
.order-amount { font: 500 13.5px/1 var(--mono); color: var(--muted); }
/* danger zone: the last panel of the sheet, its title marker and hairline in lacquer red */
.danger-panel { grid-column: 1 / -1; }
.danger-panel .panel-title { color: var(--danger); }
.danger-panel .panel-title::before { background: var(--danger); box-shadow: 0 0 0 1px #000, 0 0 8px rgba(255, 122, 106, 0.5); }
.danger-panel .panel-title::after { background: linear-gradient(90deg, rgba(255, 122, 106, 0.55), transparent); }
.danger-panel .muted { max-width: 72ch; }
.delete-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; }
.delete-form .field { flex: 1 1 240px; max-width: 420px; }
.delete-form .form-error { flex-basis: 100%; margin: 0; }
@media (max-width: 760px) {
  .account-grid { grid-template-columns: minmax(0, 1fr); }
  .account-head { column-gap: 14px; }
  .portrait { width: 64px; height: 64px; padding: 9px; }
  .order-row { grid-template-columns: 14px minmax(0, 1fr) auto; row-gap: 4px; }
  .order-row::before { grid-row: 1 / 3; }
  .order-code, .order-plan { grid-column: 2; }
  .order-row .status { grid-column: 3; grid-row: 1 / 3; }
  .order-amount { display: none; }
}

/* ---------- demo banner on the order page ---------- */
.demo-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; padding: 14px 16px;
  border-radius: 3px; font-size: 13.5px; color: #d8ccff; background: rgba(139, 92, 246, 0.12); border: 1px dashed rgba(167, 139, 250, 0.5);
}
.demo-banner p { flex: 1 1 260px; }

/* ---------- demo Telegram console (untouched) ---------- */
.tg-body { background: #0e1621; }
.tg-app { position: relative; display: grid; grid-template-rows: auto 1fr auto auto; height: 100vh; height: 100dvh; max-width: 760px; margin: 0 auto; background: #0e1621; color: #e9eef4; font: 400 15px/1.45 var(--sans); }
/* the console keeps its Telegram body, but its header is the site's gold-rimmed bar */
.tg-head {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: linear-gradient(#1c1510, #0e0a07); border-bottom: 1px solid #000; box-shadow: 0 1px 0 var(--bronze), 0 2px 0 #000, 0 10px 30px -10px #000;
}
.tg-head::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--gold-lo) 15%, var(--gold-hi) 50%, var(--gold-lo) 85%, transparent); }
.tg-avatar {
  width: 40px; height: 40px; padding: 6px; border-radius: 6px; display: grid; place-items: center; font: 700 18px/1 var(--display); color: var(--gold-hi);
  background: radial-gradient(circle at 35% 30%, #3b2f22, #120d09);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-deep), 0 0 0 3px #000, inset 0 0 0 1px rgba(255, 210, 120, 0.45), inset 0 -6px 8px rgba(0, 0, 0, 0.6);
}
.tg-avatar svg { width: 100%; height: 100%; }
.tg-title { font: 700 15px/1.2 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-hi); text-shadow: 0 1px 0 #000; }
.tg-subtitle { font-size: 12.5px; color: var(--muted); }
.tg-demo { margin-left: auto; padding: 5px 10px; border-radius: 3px; font-size: 11.5px; color: #c4b5fd; background: rgba(139, 92, 246, 0.15); border: 1px dashed rgba(167, 139, 250, 0.45); text-align: right; }
.tg-feed { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.tg-msg { max-width: 82%; padding: 8px 12px 6px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.tg-bot { align-self: flex-start; background: #182533; border-bottom-left-radius: 4px; }
.tg-admin { align-self: flex-end; background: #2b5278; border-bottom-right-radius: 4px; }
.tg-text a { color: #6ab3f3; text-decoration: underline; }
.tg-text blockquote { margin: 6px 0; padding: 2px 10px; border-left: 3px solid #6ab3f3; background: rgba(106, 179, 243, 0.08); border-radius: 4px; }
.tg-text i { color: #8fa1b3; }
.tg-quote { margin-bottom: 4px; padding: 2px 8px; border-left: 2px solid #6ab3f3; font-size: 13px; color: #9fc6ec; }
.tg-meta { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 2px; font-size: 11.5px; color: #6d8094; }
.tg-reply { padding: 0; border: 0; background: none; color: #6ab3f3; font-size: 12px; cursor: pointer; }
.tg-buttons { display: grid; gap: 4px; margin: 8px -6px 2px; }
.tg-row { display: flex; gap: 4px; }
.tg-row button { flex: 1; padding: 8px 10px; border: 0; border-radius: 8px; background: rgba(106, 179, 243, 0.14); color: #e9eef4; font-size: 13.5px; cursor: pointer; }
.tg-row button:hover { background: rgba(106, 179, 243, 0.24); }
.tg-replying { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #17212b; border-top: 1px solid #0b1118; font-size: 13px; color: #6ab3f3; }
.tg-replying span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-replying button { border: 0; background: none; color: #7f91a4; font-size: 20px; cursor: pointer; }
.tg-composer { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; background: #17212b; }
.tg-chips { display: flex; gap: 6px; width: 100%; }
.tg-chips button { padding: 4px 10px; border-radius: 4px; border: 1px solid #2b3a4a; background: none; color: #6ab3f3; font-size: 12.5px; cursor: pointer; }
.tg-composer input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 0; border-radius: 21px; background: #0e1621; color: #e9eef4; font-size: 15px; }
.tg-composer input:focus { outline: 1px solid #2b5278; }
.tg-send { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #2b5278; color: #fff; font-size: 16px; cursor: pointer; }
.tg-toast { position: absolute; left: 50%; top: 76px; translate: -50% 0; padding: 8px 14px; border-radius: 10px; background: rgba(0, 0, 0, 0.8); font-size: 13.5px; }
.gold-link { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- review form on the account page ---------- */
.review-panel { grid-column: 1 / -1; }
.review-form { display: grid; gap: 14px; }
.star-input { display: flex; gap: 4px; }
.star-input button {
  width: 44px; height: 44px; border: 0; border-radius: 4px; background: none; cursor: pointer;
  font-size: 28px; line-height: 1; color: rgba(236, 225, 200, 0.45); transition: color 0.2s, scale 0.3s var(--ease);
}
.star-input button:hover { scale: 1.15; }
.star-input button.on { color: var(--gold); text-shadow: 0 0 14px rgba(232, 184, 74, 0.6); }
.review-text { height: auto; padding: 12px 16px; font: 400 15px/1.5 var(--sans); resize: vertical; min-height: 96px; }
.review-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* =====================================================================
   THE APP WINDOW (an HTML copy of the ForeverBot addon window — untouched)
   ===================================================================== */
.qp { --qp-gold: #ffc74d; --qp-text: #eddfc7; --qp-dim: #9e917a; --qp-green: #59f259; margin: 0 auto; max-width: 1040px; }
.qp-defs { position: absolute; width: 0; height: 0; }
.qp-window {
  display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 8px; padding: 8px; border-radius: 10px;
  background: rgba(14, 11, 9, 0.96); border: 2px solid rgba(255, 199, 77, 0.85);
  box-shadow: 0 0 0 1px #000, 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 60px -20px rgba(255, 199, 77, 0.35);
  color: var(--qp-text); font: 400 13px/1.35 var(--sans); text-align: left;
}
.qp-side { display: flex; flex-direction: column; gap: 8px; padding: 14px 10px 10px; border-radius: 8px; background: rgba(8, 6, 5, 0.95); border: 1px solid rgba(255, 199, 77, 0.55); }
.qp-logo { font: 700 26px/1 var(--display); color: var(--qp-gold); text-align: center; text-shadow: 0 2px 0 #000; margin-bottom: 8px; }
.qp-logo small { display: block; margin-top: 6px; font: 400 11px/1 var(--sans); color: var(--qp-dim); }
.qp-tabs { display: grid; gap: 8px; }
.qp-tab {
  display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
  min-height: 62px; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--qp-text);
  background: rgb(20, 17, 13); border: 1px solid rgba(255, 199, 77, 0.4); transition: background-color 0.2s, border-color 0.2s;
}
.qp-tab:hover { background: rgb(36, 29, 20); }
.qp-tab .qp-icon { grid-row: 1 / 3; }
.qp-tab b { font: 600 16px/1.1 var(--display); }
.qp-tab small { font-size: 11px; color: var(--qp-dim); }
.qp-tab.is-on { background: rgb(82, 61, 20); border-color: var(--qp-gold); }
.qp-tab.is-on b { color: var(--qp-gold); }
.qp-icon, .qp-pi, .qp-si, .qp-bi {
  display: block; border-radius: 4px; background: radial-gradient(circle at 35% 30%, #3a2e22, #120d09);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(255, 199, 77, 0.5);
}
.qp-icon { width: 38px; height: 38px; padding: 4px; }
.qp-pi { width: 20px; height: 20px; padding: 2px; }
.qp-si { width: 24px; height: 24px; padding: 2px; }
.qp-bi { width: 20px; height: 20px; padding: 2px; background: rgba(0, 0, 0, 0.3); }
.qp-who { margin-top: auto; padding: 10px 12px; border-radius: 6px; background: rgb(20, 17, 13); border: 1px solid rgba(255, 199, 77, 0.4); display: grid; gap: 4px; }
.qp-who b { font-weight: 500; }
.qp-state-running { color: var(--qp-green); }
.qp-state-paused { color: #66aaff; }
.qp-state-stopped { color: #ff5555; }

.qp-main { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; min-width: 0; }
.qp-header {
  position: relative; overflow: hidden; padding: 14px 22px 16px; border-radius: 6px; border: 1px solid rgba(255, 199, 77, 0.85);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.6)),
    radial-gradient(ellipse 40% 90% at 20% 80%, #5a6a34, transparent 70%),
    radial-gradient(ellipse 35% 80% at 70% 30%, #6a7a3c, transparent 70%),
    radial-gradient(ellipse 30% 70% at 90% 90%, #3a5a6a, transparent 70%),
    linear-gradient(#4a5228, #2e3a1c);
}
.qp-header h3 { font: 700 36px/1 var(--display); color: var(--qp-gold); text-shadow: 0 2px 0 #000, 0 0 20px rgba(0, 0, 0, 0.8); }
.qp-header p { margin-top: 6px; font-size: 13px; color: var(--qp-text); text-shadow: 0 1px 2px #000; }

.qp-pages { min-height: 430px; }
.qp-page { display: none; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-content: start; }
.qp-page.is-on { display: grid; animation: qp-in 0.35s var(--ease); }
@keyframes qp-in { from { opacity: 0; transform: translateY(6px); } }
.qp-w4 { grid-column: span 4; } .qp-w5 { grid-column: span 5; } .qp-w6 { grid-column: span 6; }
.qp-w7 { grid-column: span 7; } .qp-w8 { grid-column: span 8; } .qp-w12 { grid-column: span 12; }
.qp-panel { padding: 10px 12px; border-radius: 6px; background: rgba(23, 19, 14, 0.94); border: 1px solid rgba(255, 199, 77, 0.8); display: grid; gap: 4px; align-content: start; }
.qp-panel h4 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding-bottom: 7px; border-bottom: 1px solid rgba(255, 199, 77, 0.35);
  font: 700 15px/1 var(--display); color: var(--qp-gold);
}
.qp-check { display: flex; align-items: center; gap: 8px; min-height: 24px; cursor: pointer; font-size: 12px; }
.qp-check input { position: absolute; opacity: 0; pointer-events: none; }
.qp-check i {
  flex: none; position: relative; width: 18px; height: 18px; border-radius: 3px;
  background: linear-gradient(#2a2420, #0e0b09); box-shadow: inset 0 0 0 1px #6a5a3a, inset 0 2px 3px rgba(0, 0, 0, 0.8);
}
.qp-check input:checked + i::after {
  content: ""; position: absolute; left: 4px; top: 0; width: 7px; height: 12px; border: solid #ffd700; border-width: 0 3px 3px 0;
  transform: rotate(40deg); filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.7));
}
.qp-check input:focus-visible + i { outline: 2px solid var(--qp-gold); }
.qp-slider, .qp-drop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: center; gap: 8px; min-height: 28px; font-size: 12px; }
.qp-drop { grid-template-columns: minmax(0, 1fr) auto; }
.qp-slider output { min-width: 42px; color: var(--qp-gold); }
.qp-slider input[type=range] { width: 100%; accent-color: #c9a35a; height: 14px; }
.qp-drop select {
  min-width: 120px; min-height: 32px; padding: 0 22px 0 8px; border-radius: 3px; color: var(--qp-text); font-size: 12px;
  background: #050403; border: 1px solid rgba(255, 199, 77, 0.6);
}
.qp-para { font-size: 12px; line-height: 1.55; color: var(--qp-text); }
.qp-status { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 8px; margin: 0; font-size: 12px; }
.qp-status dt { color: var(--qp-dim); }
.qp-status dd { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qp-buttons { display: flex; gap: 8px; margin: 2px 0 4px; }
.qp-btn {
  min-height: 32px; padding: 0 14px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 600; color: #ffd100;
  background: linear-gradient(#8a1a12, #4a0a06); border: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.qp-btn:hover { filter: brightness(1.2); }
.qp-targets { display: grid; }
.qp-x { margin-left: auto; min-width: 32px; min-height: 32px; border-radius: 3px; cursor: pointer; color: #ffd100; font-size: 11px; background: linear-gradient(#8a1a12, #4a0a06); border: 1px solid #000; }
/* touch: every control in the addon window reaches 40px */
@media (pointer: coarse) {
  .qp-btn, .qp-x, .qp-drop select, .qp-check { min-height: 40px; }
  .qp-slider input[type=range] { height: 28px; }
}
.qp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.qp-list button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 4px; cursor: pointer;
  color: var(--qp-text); font-size: 12px; text-align: left; background: rgba(0, 0, 0, 0.3); border: 1px solid transparent;
}
.qp-list button small { color: var(--qp-dim); }
.qp-list button:hover, .qp-list button.is-on { border-color: rgba(255, 199, 77, 0.6); background: rgba(82, 61, 20, 0.5); }
.qp-skill { display: grid; grid-template-columns: auto auto minmax(0, 1fr) 110px 70px; align-items: center; gap: 8px; min-height: 34px; font-size: 12px; }
.qp-skill meter { width: 110px; height: 14px; }
.qp-skill em { font-style: normal; }
.qp-map { position: relative; min-height: 152px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255, 199, 77, 0.8); }
.qp-map-wide { min-height: 190px; }
.qp-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.qp-map-label { position: absolute; left: 8px; bottom: 6px; font: 600 12px/1 var(--display); color: var(--qp-gold); text-shadow: 0 1px 2px #000; }
.qp-player {
  position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #ffe066;
  box-shadow: 0 0 0 2px #000, 0 0 12px #ffd23a; transition: left 0.9s linear, top 0.9s linear;
}
.qp.is-running .qp-player { animation: qp-ping 1s ease-out infinite; }
@keyframes qp-ping { 0% { box-shadow: 0 0 0 2px #000, 0 0 0 0 rgba(255, 210, 58, 0.7); } 100% { box-shadow: 0 0 0 2px #000, 0 0 0 10px rgba(255, 210, 58, 0); } }
.qp-bar { display: flex; align-items: center; gap: 8px; }
.qp-big {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; min-width: 118px; padding: 0 12px; border-radius: 6px; cursor: pointer;
  font: 700 15px/1 var(--display); color: #fff; text-shadow: 0 1px 2px #000; border: 1px solid rgba(255, 199, 77, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.qp-big:hover { filter: brightness(1.25); }
.qp-dark { background: rgb(41, 33, 23); min-width: 140px; }
.qp-start { background: rgb(31, 115, 26); }
.qp-pause { background: rgb(26, 56, 128); }
.qp-stop { background: rgb(140, 26, 20); }
.qp-toast { flex: 1; text-align: center; font-size: 12px; color: var(--qp-gold); opacity: 0; transition: opacity 0.3s; }
.qp-toast.on { opacity: 1; }
@media (max-width: 900px) {
  .qp-window { grid-template-columns: minmax(0, 1fr); }
  .qp-side { padding: 10px; }
  .qp-logo { display: none; }
  .qp-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .qp-tab { grid-template-columns: 1fr; justify-items: center; text-align: center; min-height: 0; padding: 6px 2px; }
  .qp-tab .qp-icon { grid-row: auto; width: 30px; height: 30px; }
  .qp-tab b { font-size: 9.5px; letter-spacing: -0.02em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .qp-tab small, .qp-who { display: none; }
  .qp-page > * { grid-column: span 12; }
  .qp-header h3 { font-size: 26px; }
  .qp-bar { flex-wrap: wrap; }
  .qp-big { min-width: 0; flex: 1 1 30%; font-size: 13px; padding: 0 8px; }
  .qp-dark { flex-basis: 45%; }
  .qp-toast { order: 9; flex-basis: 100%; }
}

/* =====================================================================
   GUIDE PAGES (kept rendering; restyled by the second pass)
   ===================================================================== */
/* the library: a dark table with a faint rune tile, tooltip cards for each guide, and the guide itself as a parchment page inside a gold frame */
.paper-page {
  position: relative; z-index: 0; min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 15% 0%, rgba(120, 80, 30, 0.35), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(60, 40, 90, 0.35), transparent 60%),
    radial-gradient(ellipse 120% 60% at 50% 110%, rgba(30, 50, 25, 0.4), transparent 60%),
    #120d0a;
}
.paper-page::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.09;
  background: var(--rune-tile) center / 160px 160px repeat;
  -webkit-mask: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent); mask: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent);
}
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 26px; font: 600 11.5px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 40px; color: var(--muted); transition: color 0.3s; }
.breadcrumbs a:hover { color: var(--gold-hi); }
.breadcrumbs > span:not(:last-child) { font-size: 0; width: 6px; height: 6px; rotate: 45deg; background: var(--gold-lo); box-shadow: 0 0 0 1px #000; }
.guides-page, .guide-page { padding-top: 110px; padding-bottom: 40px; }
.guides-head { position: relative; display: grid; gap: 14px; justify-items: center; text-align: center; margin-bottom: 44px; }
.guides-head .eyebrow { gap: 14px; }
.guides-head .eyebrow::before, .guides-head .eyebrow::after { content: ''; width: 80px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-lo) 40%, var(--gold-hi)); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); }
.guides-head .eyebrow::after { scale: -1 1; }
.guides-head h1 { font: 700 clamp(40px, 6vw, 72px)/1 var(--display); letter-spacing: 0.01em; }
.guides-head .section-sub { max-width: 560px; text-wrap: balance; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
/* each guide is an item tooltip: ink fill, silver-violet rim, gold name, a "Use:" flavour line */
.guide-card {
  position: relative; display: grid; grid-template-rows: 180px auto; overflow: hidden; border-radius: 4px;
  background: linear-gradient(180deg, rgba(14, 12, 26, 0.96), rgba(6, 5, 14, 0.98)); border: 1px solid var(--ink-line);
  box-shadow: 0 0 0 1px #000, 0 20px 40px -24px #000; transition: translate 0.32s var(--ease), box-shadow 0.3s, border-color 0.3s;
}
.guide-card:hover { translate: 0 -4px; border-color: #9a95bd; box-shadow: 0 0 0 1px #000, 0 24px 48px -24px #000, 0 0 28px rgba(183, 108, 255, 0.22); }
.guide-card img, .guide-card-art { width: 100%; height: 180px; object-fit: cover; border-bottom: 1px solid var(--ink-line); }
/* fallback cover: an original "map scrap" — hills, a river, a route with waypoints */
.guide-card-art {
  display: block;
  background:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 180'><path d='M-10 140 C40 100 80 150 130 120 S220 90 270 130 340 110 340 110' fill='none' stroke='%232d5a7a' stroke-width='9' stroke-linecap='round' opacity='.8'/><path d='M30 150 C70 120 120 130 150 95 S210 60 260 75 300 40 300 40' fill='none' stroke='%23e8b84a' stroke-width='2' stroke-dasharray='6 7' stroke-linecap='round'/><g fill='%23e8b84a' stroke='%23000'><path d='M30 143 37 150 30 157 23 150z'/><path d='M150 88 157 95 150 102 143 95z'/><path d='M260 68 267 75 260 82 253 75z'/></g><g fill='none' stroke='%23e8b84a' stroke-opacity='.45'><path d='M60 60 l14-22 14 22z'/><path d='M86 70 l10-16 10 16z'/><path d='M220 150 l12-20 12 20z'/></g></svg>") center / cover no-repeat,
    radial-gradient(ellipse 60% 70% at 30% 40%, #5a6a34, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 70%, #3a5a6a, transparent 70%),
    linear-gradient(#3e4a24, #22301a);
}
.guide-card-body { display: grid; gap: 8px; padding: 16px 18px 20px; }
.guide-card time { font: 600 11px/1 var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.guide-card h2 { font: 700 19px/1.2 var(--display); letter-spacing: 0.02em; color: var(--gold-hi); text-shadow: 0 1px 0 #000; }
.guide-card p { font-size: 14.5px; color: var(--text); }
.guide-card-body::after { content: 'Use: Read the guide'; margin-top: 4px; font: italic 400 13.5px/1.4 var(--sans); color: var(--gold); }
.guides-empty { grid-column: 1 / -1; padding: 24px; text-align: center; color: var(--muted); font-style: italic; }
.guide-article { max-width: 960px; margin: 0 auto; padding: clamp(20px, 3vw, 36px); }
.guide-head { display: grid; gap: 12px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid rgba(232, 184, 74, 0.2); }
.guide-head h1 { font: 700 clamp(32px, 4.6vw, 52px)/1.08 var(--display); letter-spacing: 0.01em; color: var(--gold-hi); text-shadow: 0 1px 0 #000; text-wrap: balance; }
.guide-lead { font-size: 17.5px; color: var(--muted); text-wrap: pretty; overflow-wrap: anywhere; }
.guide-meta { font: 600 11.5px/1.4 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.guide-cover { width: 100%; max-height: 440px; object-fit: cover; border-radius: 3px; margin-bottom: 26px; box-shadow: var(--shadow-rim); }
.guide-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.guide-layout:has(> .guide-body:first-child) { grid-template-columns: minmax(0, 1fr); }
.guide-toc { position: sticky; top: 90px; display: grid; gap: 2px; font-size: 13.5px; padding: 14px 10px 12px; border-radius: 3px; background: var(--umber-900); box-shadow: var(--shadow-rim); }
.guide-toc b { font: 600 11px/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px 8px; }
.guide-toc a { position: relative; display: flex; align-items: center; min-height: 40px; padding: 7px 8px 7px 24px; border-radius: 3px; color: var(--muted); transition: color 0.3s, background-color 0.3s; }
.guide-toc a::before { content: ''; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; rotate: 45deg; background: var(--gold-lo); box-shadow: 0 0 0 1px #000; }
.guide-toc a:hover { color: var(--gold-hi); background: rgba(255, 255, 255, 0.03); }
/* the page itself: parchment, ink text, burnt edge */
.guide-body {
  padding: clamp(22px, 3.5vw, 40px) clamp(20px, 3.5vw, 44px); border-radius: 3px;
  font-size: 17px; line-height: 1.75; color: var(--ink-text); overflow-wrap: anywhere;
  background:
    radial-gradient(ellipse 70% 60% at 50% 30%, rgba(255, 246, 222, 0.45), transparent 75%),
    var(--fibre),
    linear-gradient(180deg, var(--parchment), var(--parchment-lo));
  background-size: auto, 220px 220px, auto;
  box-shadow: inset 0 0 0 1px rgba(90, 60, 20, 0.45), inset 0 0 36px rgba(110, 70, 20, 0.35), 0 0 0 1px #000, 0 6px 20px -10px #000;
}
.guide-body ::selection { background: rgba(180, 129, 46, 0.35); color: var(--ink-text); }
.guide-body > * + * { margin-top: 1.1em; }
/* a readable measure on parchment, and an illuminated initial on the first paragraph */
.guide-body > p, .guide-body > ul, .guide-body > ol, .guide-body > blockquote { max-width: 68ch; }
.guide-body > p:first-of-type::first-letter { font: 700 3.2em/0.8 var(--display); float: left; margin: 0.08em 0.12em 0 0; color: #5a3a12; }
/* legal texts open with "Effective date", which takes no illuminated initial */
.legal-body > p:first-of-type::first-letter { font: inherit; float: none; margin: 0; color: inherit; }
.guide-body h2 { font: 700 27px/1.2 var(--display); letter-spacing: 0.01em; color: #5a3a12; margin-top: 1.7em; padding-bottom: 0.3em; border-bottom: 1px solid rgba(90, 60, 20, 0.35); scroll-margin-top: 90px; }
.guide-body > h2:first-child { margin-top: 0; }
.guide-body h3 { font: 700 20px/1.3 var(--display); color: var(--ink-text); margin-top: 1.4em; scroll-margin-top: 90px; }
.guide-body a { color: #5a3a12; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: currentColor; word-break: break-word; }
.guide-body a:hover { color: var(--gold-deep); }
.guide-body strong { color: #1a1008; }
.guide-body ul, .guide-body ol { padding-left: 1.4em; }
.guide-body li + li { margin-top: 0.35em; }
.guide-body li::marker { color: var(--gold-deep); }
.guide-body blockquote { margin-left: 0; padding: 12px 18px; border-left: 3px solid var(--gold-deep); background: rgba(90, 60, 20, 0.08); border-radius: 0 3px 3px 0; color: var(--ink-text-2); font-style: italic; }
.guide-body code { padding: 2px 6px; border-radius: 3px; background: rgba(43, 29, 16, 0.09); box-shadow: inset 0 0 0 1px rgba(43, 29, 16, 0.18); font: 500 0.88em/1.4 var(--mono); color: #3a2410; }
.guide-body pre { padding: 16px 18px; border-radius: 3px; background: #15100a; color: var(--text); box-shadow: var(--shadow-rim); overflow-x: auto; }
.guide-body pre code { padding: 0; background: none; box-shadow: none; color: inherit; }
.guide-body figure { margin: 1.6em 0; }
.guide-body img { width: 100%; height: auto; border-radius: 3px; box-shadow: var(--shadow-rim); }
.guide-body figcaption { margin-top: 8px; font-size: 13.5px; color: var(--ink-text-2); text-align: center; font-style: italic; }
.guide-body table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.guide-body th, .guide-body td { padding: 8px 10px; border-bottom: 1px solid rgba(90, 60, 20, 0.3); text-align: left; }
.guide-body th { font: 700 12px/1.3 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: #5a3a12; }
.guide-body hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-deep), transparent); }
.guide-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 30px; padding-top: 24px; border-top: 1px solid rgba(232, 184, 74, 0.2); color: var(--muted); font-size: 15.5px; }
/* more guides: a quest-log list with "!" markers */
.guide-more { max-width: 960px; margin: 28px auto 0; display: grid; gap: 4px; padding: 18px 20px 20px; }
.guide-more h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font: 700 13px/1 var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); text-shadow: 0 1px 0 #000; }
.guide-more h2::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-lo), transparent); }
.guide-more a { position: relative; padding: 10px 10px 10px 36px; border-radius: 3px; font: 600 15px/1.3 var(--display); color: var(--muted); transition: color 0.3s, background-color 0.3s; }
.guide-more a::before { content: ''; position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; margin-top: -7px; rotate: 45deg; background: var(--umber-900); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo), 0 0 0 3px #000; }
.guide-more a::after { content: ''; position: absolute; left: 16px; top: 50%; width: 2px; height: 9px; margin-top: -4.5px; background: linear-gradient(var(--gold) 0 5.5px, transparent 5.5px 7px, var(--gold) 7px); }
.guide-more a:hover { color: var(--gold-hi); background: rgba(255, 255, 255, 0.03); }
@media (max-width: 860px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-toc { position: static; }
  .guide-body { padding: 20px 16px; font-size: 16px; }
}

/* demo console: attach files */
.tg-attach { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; color: #7f91a4; font-size: 20px; }
.tg-attach:hover { color: #6ab3f3; }
.tg-attach input { display: none; }

/* =====================================================================
   SECONDARY PAGES — shared bits (sign-in, account, order, guides, 404)
   ===================================================================== */
/* the current page in the header nav keeps its gold underline */
.nav a[aria-current='page'] { color: var(--gold-hi); }
.nav a[aria-current='page']::after { scale: 1 1; }
/* pages without the hero: the header is solid from the first pixel */
.site-header.scrolled .logo { font-size: 16px; }
/* a small footer under the account / order / 404 pages */
.site-footer.is-slim { margin-top: 40px; padding: 28px 0 40px; }
.site-footer.is-slim .footer-inner { justify-content: center; text-align: center; }
.site-footer.is-slim .footer-note { flex-basis: 100%; max-width: 640px; margin: 0 auto; }
.site-footer.is-slim .footer-legal { justify-content: center; }
/* the order page's reward frame gets the same stagger as the account sheet */
.ticket-grid > .panel { animation: panel-in 0.9s var(--ease) both; }
.ticket-grid > .panel:nth-child(2) { animation-delay: 0.12s; }
.ticket-page .center-state > div { animation-delay: 0.9s; }
/* "Send exactly" amount: a lit inscription */
.amount { text-shadow: 0 1px 0 #000, 0 0 18px rgba(232, 184, 74, 0.3); }
.notice { position: relative; padding-left: 40px; }
.notice::before { content: ''; position: absolute; left: 14px; top: 50%; width: 12px; height: 12px; margin-top: -6px; rotate: 45deg; background: var(--umber-900); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo), 0 0 0 3px #000; }
.notice::after { content: ''; position: absolute; left: 19px; top: 50%; width: 2px; height: 8px; margin-top: -4px; background: linear-gradient(var(--gold) 0 5px, transparent 5px 6px, var(--gold) 6px); }
.notice.ok::before { background: var(--ok); box-shadow: 0 0 0 1px #000, 0 0 8px var(--ok); }
.notice.ok::after { display: none; }
@media (max-width: 760px) {
  .site-footer.is-slim { padding-bottom: 32px; }
}
