/* ==========================================================================
   VZR gaming layer v2: BASE (every page)
   Tokens, page backdrop, top bar, WC3 panel frame, buttons, tooltip, settings dock, footer,
   and the inner-page skin (guides, download, changelog, credits, privacy, phone alerts).
   Loads AFTER the live CSS and only adds / overrides. Needs <body class="g2">.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --g2-ink: #ece6ea;
  --g2-muted: #bdb2c9;
  --g2-dim: #a094b0;
  --g2-gold: #f1ce86;
  --g2-gold-hi: #ffe6ad;
  --g2-gold-mid: #c9a36a;
  --g2-bronze: #7d6446;
  --g2-violet: #a471c0;
  --g2-violet-hi: #c48cf3;
  --g2-violet-deep: #42215b;
  --g2-green: #39e27d;
  --g2-red: #ff8d8d;
  --g2-amber: #f0b429;
  --g2-cyan: #3ec6dc;
  --g2-sky: #7ebff1;
  --g2-glow: 124, 72, 196;
  --g2-serif: Georgia, "Times New Roman", serif;
  --g2-ui: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  --g2-w: min(1800px, calc(100% - 48px));      /* the live board allowed 1840px; this keeps a little air at 1920 */
  --g2-gold-btn: linear-gradient(180deg, #f0cc84 0, #c9a04a 55%, #b5852f 100%);   /* dark text #2a1706 stays above 4.5:1 on all of it */
  --g2-sky-light: radial-gradient(46% 42% at 82% 3%, rgba(176, 148, 255, .16), transparent 72%);
}
html[data-g2-time="day"] {
  --g2-glow: 150, 92, 170;
  --g2-sky-light: radial-gradient(56% 46% at 16% 0%, rgba(255, 196, 120, .11), transparent 72%);
}

body.g2 {
  --g2-frame:
    linear-gradient(180deg, rgba(255, 240, 210, .05), transparent 64px) padding-box,
    radial-gradient(100% 70% at 50% 0, rgba(var(--g2-glow), .30), transparent 72%) padding-box,
    linear-gradient(180deg, #251c33 0, #160f20 46%, #0b0810 100%) padding-box,
    linear-gradient(140deg, #f5d99b 0, #9b7b4c 16%, #5e4a3b 34%, #a471c0 50%, #5e4a3b 66%, #9b7b4c 84%, #f5d99b 100%) border-box;
  --g2-frame-hi:
    linear-gradient(180deg, rgba(255, 240, 210, .07), transparent 64px) padding-box,
    radial-gradient(100% 70% at 50% 0, rgba(var(--g2-glow), .42), transparent 72%) padding-box,
    linear-gradient(180deg, #2c2140 0, #1a1226 46%, #0d0912 100%) padding-box,
    linear-gradient(140deg, #fff0c4 0, #d9b56e 18%, #8d6fbd 50%, #d9b56e 82%, #fff0c4 100%) border-box;
  --g2-depth: inset 0 0 0 1px rgba(255, 226, 170, .09), inset 0 0 30px rgba(var(--g2-glow), .14),
    0 14px 34px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .55);
  color: var(--g2-ink);
  background: #07050b;
}

body.g2 .g2-sr, .g2-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- page backdrop: the key art, left half, with a night / day sky ---------- */
body.g2::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    var(--g2-sky-light),
    linear-gradient(180deg, rgba(7, 5, 11, .34) 0, rgba(7, 5, 11, .70) 52%, rgba(7, 5, 11, .90) 100%),
    url("art/bg-demon.webp") 0 0 / cover no-repeat,
    radial-gradient(90% 60% at 90% 30%, rgba(80, 40, 140, .35), transparent 70%),
    #07050b;
}
body.g2.changelog-page::before { display: none; }
body.g2.art-page, body.g2.guide-stage, body.g2.vzr-v2 { background: #07050b; background-attachment: scroll; }
.g2 .ambient { display: none; }
@media (max-width: 800px) {
  body.g2::after {
    background:
      var(--g2-sky-light),
      linear-gradient(180deg, rgba(7, 5, 11, .38) 0, rgba(7, 5, 11, .76) 46%, rgba(7, 5, 11, .92) 100%),
      url("art/bg-demon.webp") 16% 0 / cover no-repeat,
      #07050b;
  }
}

/* ---------- focus ---------- */
body.g2 a:focus-visible, body.g2 button:focus-visible, body.g2 input:focus-visible, body.g2 summary:focus-visible,
body.g2 [tabindex]:focus-visible, body.g2 select:focus-visible {
  outline: 2px solid var(--g2-gold-hi); outline-offset: 3px; border-radius: 4px;
}

/* ---------- top bar ---------- */
body.g2 .topbar {
  padding: 5px max(24px, calc((100vw - 1800px) / 2)); gap: 14px;
  background: linear-gradient(180deg, rgba(44, 28, 66, .95), rgba(14, 9, 23, .96));
  border-bottom: 1px solid #08050c;
  box-shadow: 0 1px 0 rgba(236, 202, 138, .30), 0 2px 0 rgba(0, 0, 0, .8), 0 14px 30px rgba(0, 0, 0, .55);
}
body.g2 .topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(196, 140, 243, .75) 20%, rgba(255, 230, 173, .9) 50%, rgba(196, 140, 243, .75) 80%, transparent);
}
body.g2 .topbar nav { gap: 8px; }
body.g2 .topbar nav a.nav-banner { position: relative; border-radius: 8px; transition: transform .18s ease; }
body.g2 .topbar nav a.nav-banner img { transition: filter .18s ease; }
/* Same purple hover / current glow on EVERY tile (beats any per-tile filter).
   Hover only on devices that really hover: on a phone the last tap keeps :hover alive, so after Back the tile under the
   old finger position glowed next to the current page's tile. */
body.g2 .topbar nav a.nav-banner[aria-current] img {
  filter: drop-shadow(0 0 8px #e7c6ff) drop-shadow(0 0 16px rgba(200, 150, 255, .55)) brightness(1.18);
}
@media (hover: hover) and (pointer: fine) {
  body.g2 .topbar nav a.nav-banner:hover { transform: translateY(-2px); }
  body.g2 .topbar nav a.nav-banner:hover img {
    filter: drop-shadow(0 0 8px #e7c6ff) drop-shadow(0 0 16px rgba(200, 150, 255, .55)) brightness(1.18);
  }
}
/* The live styles-tutorial.css / styles-v2.css glow every :hover tile; cancel that where hover is not real. */
@media not all and (hover: hover) and (pointer: fine) {
  body.g2 .topbar nav a.nav-banner:not([aria-current]):hover img { filter: none; }
}
body.g2 .topbar nav a.nav-banner[aria-current]::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: -3px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--g2-gold-hi), transparent); box-shadow: 0 0 10px rgba(255, 230, 173, .8);
}
@media (min-width: 1181px) {
  body.g2 .topbar nav a.nav-banner img {
    height: clamp(40px, 3vw, 50px); width: calc(clamp(40px, 3vw, 50px) * 3);
  }
  body.g2 .topbar .logo { flex: 1 1 auto; min-width: 0; }
  body.g2 .topbar .logo img.wordmark { width: 100%; max-width: 400px; max-height: 56px; }
}
/* Below 1180px the eight tiles no longer fit beside the wordmark (the live home page overlaps them from 1100 down):
   stack the wordmark above a swipeable tile row, as the live inner pages already do. */
@media (max-width: 1180px) {
  body.g2 .topbar {
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 8px;
    width: 100%; max-width: 100%; min-width: 0; padding: 10px 0 4px; overflow: hidden;
  }
  body.g2 .topbar .logo { flex: 0 0 auto; width: 100%; max-width: 100%; min-width: 0; justify-content: center; }
  body.g2 .topbar .logo img.wordmark { display: block; width: min(340px, 86vw); height: auto; max-width: 86vw; max-height: none; margin-inline: auto; }
  body.g2 .topbar nav {
    width: 100%; max-width: 100%; min-width: 0; flex: 0 0 auto; justify-content: flex-start; flex-wrap: nowrap; gap: 8px; padding: 0 12px 10px;
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  body.g2 .topbar nav::-webkit-scrollbar { display: none; }
  /* all eight tiles fit from about 1040px up; narrower than that the row swipes */
  body.g2 .topbar nav a.nav-banner img { height: clamp(40px, calc((100vw - 72px) / 24), 52px); width: calc(clamp(40px, calc((100vw - 72px) / 24), 52px) * 3); }
}
@media (max-width: 700px) {
  body.g2 .topbar nav a.nav-banner img { height: 52px; width: 156px; }
}

/* Home page: the hero carries the title, so the wordmark leaves the bar and the eight tiles are centred, a little larger.
   (Inner pages keep a small wordmark: they have no hero title, and it is their only brand mark.) */
body.g2.vzr-v2 .topbar .logo { display: none; }
body.g2.vzr-v2 .topbar nav { flex: 0 1 auto; justify-content: center; }
body.g2.vzr-v2 .topbar { justify-content: center; }
@media (min-width: 1181px) {
  body.g2.vzr-v2 .topbar nav a.nav-banner img { height: clamp(40px, 3.4vw, 58px); width: calc(clamp(40px, 3.4vw, 58px) * 3); }
}
@media (max-width: 1180px) {
  body.g2.vzr-v2 .topbar nav { justify-content: safe center; }
}

/* ---------- WC3 panel frame: gold hairline, inner glow, corner ornaments ---------- */
body.g2 :is(.g2-panel, .info-card, .guide-title, .sidebar, .chapter, .lobby-board, .mi-chat, .mi-panel, .step-card, .log-release) {
  position: relative; border: 2px solid transparent; border-radius: 7px;
  background: var(--g2-frame); box-shadow: var(--g2-depth); backdrop-filter: none;
}
body.g2 :is(.g2-panel, .info-card, .guide-title, .sidebar, .chapter, .lobby-board, .mi-chat, .mi-panel)::before {
  content: ""; position: absolute; inset: -3px; z-index: 3; pointer-events: none;
  background:
    var(--g2-corner-tl) left top / 22px 22px no-repeat,
    var(--g2-corner-tr) right top / 22px 22px no-repeat,
    var(--g2-corner-bl) left bottom / 22px 22px no-repeat,
    var(--g2-corner-br) right bottom / 22px 22px no-repeat;
}
body.g2 a.info-card { transition: transform .2s ease, box-shadow .2s ease; }
body.g2 a.info-card:hover { background: var(--g2-frame-hi); transform: translateY(-3px); }
body.g2 .g2-lite, body.g2 :is(.controlbar, .notice, .chapter-lead, .chapter-notes, .log-row) {
  border-radius: 6px;
}
.g2-h { margin: 0; font: 800 14px/1.2 var(--g2-serif); letter-spacing: .1em; color: var(--g2-gold); text-transform: uppercase; text-shadow: 0 2px 4px #000; }

/* ---------- buttons ---------- */
.g2-btn, body.g2 :is(.chapter-nav button, .log-open, .gold-links a, .log-more) {
  --b-top: #4b3468; --b-bot: #22142f; --b-edge: #a98ac4; --b-text: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 42px; padding: 0 20px; border: 1.5px solid transparent; border-radius: 6px;
  font: 800 12px/1 var(--g2-ui); letter-spacing: .09em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--b-text); cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .20) 0, rgba(255, 255, 255, .04) 48%, rgba(0, 0, 0, .06) 52%, rgba(0, 0, 0, .22) 100%) padding-box,
    linear-gradient(180deg, var(--b-top), var(--b-bot)) padding-box,
    linear-gradient(180deg, var(--b-edge), #3a2a46) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), inset 0 0 0 1px rgba(0, 0, 0, .35), 0 3px 0 rgba(0, 0, 0, .6), 0 9px 18px rgba(0, 0, 0, .45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85);
  transition: transform .14s ease, filter .14s ease, box-shadow .14s ease;
}
.g2-btn:hover, body.g2 :is(.chapter-nav button, .log-open, .gold-links a, .log-more):not(:disabled):hover { filter: brightness(1.16); transform: translateY(-1px); }
.g2-btn:active, body.g2 :is(.chapter-nav button, .log-open, .gold-links a, .log-more):not(:disabled):active {
  transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 0 0 1px rgba(0, 0, 0, .4), 0 1px 0 rgba(0, 0, 0, .6);
}
.g2-btn:disabled { opacity: .45; cursor: default; }
.g2-btn .g2-ico { font-size: 17px; }
.g2-btn-gold, body.g2 .gold-links a:not(.primary) {
  --b-top: #f0cc84; --b-bot: #b5852f; --b-edge: #fff1c8; --b-text: #2a1706; text-shadow: 0 1px 0 rgba(255, 240, 200, .55);
}
.g2-btn-violet, body.g2 .gold-links a.primary { --b-top: #6a3fa0; --b-bot: #2c1648; --b-edge: #d3a8f5; }
.g2-btn-ghost { --b-top: #2f2440; --b-bot: #151020; --b-edge: #8c7050; }
.g2-btn-small { min-height: 34px; padding: 0 14px; font-size: 11px; }
body.g2 .log-more { border-radius: 6px; margin-top: 22px; }

/* ---------- chips ---------- */
.g2-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font: 800 10.5px/1 var(--g2-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--g2-muted);
  border: 1px solid rgba(201, 163, 106, .45); background: rgba(10, 7, 16, .7);
}

/* ---------- WC3 style tooltip (one shared element, filled by g2-core.js) ---------- */
.g2-tip {
  position: fixed; left: 0; top: 0; z-index: 3000; pointer-events: none; box-sizing: border-box;
  width: max-content; max-width: min(330px, calc(100vw - 16px)); padding: 10px 13px 11px; border-radius: 4px;
  background: linear-gradient(180deg, #1d1428 0, #0b0810 100%); border: 1px solid #d6b06a;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(255, 226, 170, .16), 0 12px 30px rgba(0, 0, 0, .8);
  font: 13px/1.45 var(--g2-ui); color: #fff; opacity: 0; transform: translateY(5px); transition: opacity .12s ease, transform .12s ease;
}
.g2-tip.is-on { opacity: 1; transform: none; }
.g2-tip-title { font: 800 14.5px/1.25 var(--g2-ui); color: #ffd23f; letter-spacing: .01em; }
.g2-tip-title u { text-decoration: none; color: #fff; border-bottom: 2px solid #ffd23f; }
.g2-tip-sub { margin-top: 2px; font-size: 11.5px; color: #c7bad6; letter-spacing: .04em; text-transform: uppercase; }
.g2-tip-body { margin-top: 5px; color: #fff; }
.g2-tip-line { margin-top: 5px; font-weight: 700; }
.g2-tip-line.g { color: #6ff59d; }
.g2-tip-line.r { color: #ff9a9a; }
.g2-tip-line.b { color: #86c4ff; }
.g2-tip-line.y { color: #ffd23f; }
.g2-tip-line.p { color: #d7a8ff; }

/* ---------- settings dock ---------- */
.g2-dock { position: fixed; left: 4px; bottom: 12px; z-index: 1500; font-family: var(--g2-ui); }
.g2-dock-btn {
  position: relative; isolation: isolate;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer; opacity: .94;
  color: var(--g2-gold-hi); font-size: 20px;
  border: 2px solid transparent;
  background: radial-gradient(circle at 35% 30%, #4a3368, #170f24 70%) padding-box, linear-gradient(145deg, #fff0c4, #8a6a3c 50%, #e6c387) border-box;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .7), inset 0 0 12px rgba(var(--g2-glow), .4);
  transition: transform .15s ease, box-shadow .15s ease;
}
.g2-dock-btn:hover, .g2-dock-btn:focus-visible, .g2-dock-btn[aria-expanded="true"] { transform: scale(1.06); opacity: 1; }
/* A soft golden halo and a few twinkling stars so people notice there are settings. Quieter once the panel has been opened;
   calm mode and "reduce motion" switch the animation off and leave a still halo. */
.g2-dock-btn::before {
  content: ""; position: absolute; inset: -9px; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 214, 120, .5) 0, rgba(255, 190, 90, .22) 46%, rgba(255, 190, 90, 0) 70%);
  opacity: .6; animation: g2-dock-glow 3.2s ease-in-out infinite;
}
.g2-dock-btn .g2-ico { animation: g2-dock-icon 3.2s ease-in-out infinite; }
.g2-dock-spark {
  position: absolute; width: 10px; height: 10px; pointer-events: none; opacity: 0; z-index: 2;
  background: radial-gradient(circle, #fffbe6 0, #ffd23f 52%, rgba(255, 210, 63, 0) 72%);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 3px rgba(255, 210, 63, .9)); animation: g2-dock-spark 3.6s ease-in-out infinite;
}
.g2-dock-spark.s0 { top: -9px; left: 24px; animation-delay: 0s; }
.g2-dock-spark.s1 { top: 10px; left: -11px; width: 8px; height: 8px; animation-delay: 1.1s; }
.g2-dock-spark.s2 { bottom: -9px; left: 4px; width: 7px; height: 7px; animation-delay: 2.1s; }
.g2-dock-spark.s3 { top: 0; right: -10px; width: 8px; height: 8px; animation-delay: 2.8s; }
.g2-dock-btn.is-seen::before { inset: -6px; opacity: .35; animation-duration: 5.5s; }
.g2-dock-btn.is-seen .g2-dock-spark { display: none; }
.g2-dock-btn.is-seen .g2-ico { animation: none; }
@keyframes g2-dock-glow { 0%, 100% { opacity: .35; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes g2-dock-icon { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 214, 120, 0)); } 50% { filter: drop-shadow(0 0 5px rgba(255, 214, 120, .95)); } }
@keyframes g2-dock-spark { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); } 42%, 58% { opacity: 1; transform: scale(1) rotate(45deg); } }
.g2-dock-btn[aria-expanded="true"] { box-shadow: 0 6px 16px rgba(0, 0, 0, .7), 0 0 0 3px rgba(255, 230, 173, .35), inset 0 0 12px rgba(var(--g2-glow), .4); }
.g2-dock-panel {
  position: absolute; left: 0; bottom: 52px; width: min(320px, calc(100vw - 28px)); padding: 14px 14px 12px; box-sizing: border-box;
  border: 2px solid transparent; border-radius: 7px; background: var(--g2-frame); box-shadow: var(--g2-depth), 0 18px 40px rgba(0, 0, 0, .7);
}
.g2-dock-panel[hidden] { display: none; }
.g2-dock-title { margin: 0 0 10px; font: 800 13px/1 var(--g2-serif); letter-spacing: .12em; color: var(--g2-gold); text-transform: uppercase; }
.g2-dock-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(201, 163, 106, .18); }
.g2-dock-row:first-of-type { border-top: 0; }
.g2-dock-row b { display: block; font: 700 13px/1.2 var(--g2-ui); color: var(--g2-ink); }
.g2-dock-row small { display: block; margin-top: 3px; font: 11.5px/1.3 var(--g2-ui); color: var(--g2-dim); }
.g2-seg { display: inline-flex; border: 1px solid rgba(201, 163, 106, .5); border-radius: 6px; overflow: hidden; flex: none; }
.g2-seg button {
  border: 0; padding: 7px 10px; background: rgba(10, 7, 16, .8); color: var(--g2-muted); cursor: pointer;
  font: 800 11px/1 var(--g2-ui); letter-spacing: .06em; text-transform: uppercase;
}
.g2-seg button + button { border-left: 1px solid rgba(201, 163, 106, .3); }
.g2-seg button[aria-pressed="true"] { background: var(--g2-gold-btn); color: #2a1706; }
.g2-switch {
  position: relative; width: 46px; height: 26px; flex: none; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(201, 163, 106, .55); background: #140e1c; transition: background .15s ease;
}
.g2-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(145deg, #d8cce6, #8d7fa3); transition: transform .15s ease, background .15s ease;
}
.g2-switch[aria-checked="true"] { background: linear-gradient(180deg, #5b2f93, #351a58); border-color: #d3a8f5; }
.g2-switch[aria-checked="true"]::after { transform: translateX(20px); background: linear-gradient(145deg, #fff0c4, #d6a64c); }
.g2-dock-hint { margin: 8px 0 0; font: 11.5px/1.4 var(--g2-ui); color: var(--g2-dim); }
.g2-dock-label { display: none; }
/* Phones: settings stay off and out of the way (no dock under the footer). */
@media (max-width: 800px) {
  .g2-dock { display: none !important; }
}

/* ---------- gauntlet cursor (off by default; the dock adds html.g2-cursor) ---------- */
html.g2-cursor, html.g2-cursor body { cursor: var(--g2-cursor-arrow), auto; }
html.g2-cursor :is(a, button, summary, [role="button"], [role="switch"], select, label, input[type="submit"], .g2-stackbtn, .g2-cmd) { cursor: var(--g2-cursor-hand), pointer; }

/* ---------- footer ---------- */
body.g2 footer, body.g2 .site-footer {
  position: relative; margin-top: 34px; padding: 38px 16px 30px; border-top: 0; text-align: center; color: var(--g2-dim);
  background: none;   /* the page veil already darkens the bottom; a footer plate would end in a hard line on short pages */
}
body.g2 footer::before, body.g2 .site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 16px;
  background: var(--g2-emb-divider) center / 320px 16px no-repeat; opacity: .95;
}
body.g2 footer p, body.g2 .site-footer p { color: var(--g2-dim); font: 12.5px/1.6 var(--g2-ui); max-width: 56rem; margin-inline: auto; }
body.g2 .site-footer .footer-also { font-family: var(--g2-serif); font-size: 13.5px; color: #a89bb8; }
body.g2 footer a:not(.footer-brand) { color: #d3b6f3; text-underline-offset: 3px; }
body.g2 .footer-wordmark { opacity: .95; filter: drop-shadow(0 4px 14px rgba(var(--g2-glow), .55)); }
.g2-foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin: 14px auto 6px; }
.g2-foot-nav a, body.g2 .site-footer nav a {
  font: 800 11px/1 var(--g2-ui); letter-spacing: .16em; text-transform: uppercase; color: #cdb99a; text-decoration: none; padding: 7px 2px;
  border-bottom: 1px solid transparent;
}
.g2-foot-nav a:hover, body.g2 .site-footer nav a:hover { color: var(--g2-gold-hi); border-bottom-color: var(--g2-gold-mid); }
body.g2 .site-footer small { font: 11.5px/1.5 var(--g2-ui); color: #8d8199; }
body.g2 .visit-count { color: #a094b0; font-family: var(--g2-ui); }

/* ==========================================================================
   INNER PAGES
   ========================================================================== */
body.g2 .brand-banner { display: none; }
body.g2 .wrap { padding-top: 22px; padding-bottom: 20px; }
body.g2.guide-stage .wrap {
  background: linear-gradient(180deg, rgba(13, 11, 20, .94), rgba(9, 7, 14, .97)); border-radius: 8px; margin-top: 18px;
  box-shadow: 0 0 0 1px rgba(201, 163, 106, .3), 0 0 0 5px rgba(7, 5, 11, .8), 0 24px 60px rgba(0, 0, 0, .75);
}
body.g2 .guide-title { padding: 22px 28px; margin-bottom: 16px; }
body.g2 .guide-title .eyebrow, body.g2 .info-card .card-tag, body.g2 .chapter-kicker {
  display: inline-flex; align-items: center; gap: 9px; color: #d3b6f3; font: 800 10.5px/1 var(--g2-ui); letter-spacing: .2em; text-transform: uppercase;
}
body.g2 .guide-title .eyebrow::before, body.g2 .info-card .card-tag::before, body.g2 .chapter-kicker::before {
  content: ""; width: 7px; height: 7px; background: linear-gradient(135deg, #fff0c4, #b8893a); transform: rotate(45deg); flex: none; box-shadow: 0 0 8px rgba(255, 220, 140, .6);
}
body.g2 .guide-title h1, body.g2 .info-card h1, body.g2 .chapter-info h2 {
  font-family: var(--g2-serif); font-weight: 800; letter-spacing: .01em;
  color: #f6d890; text-shadow: 0 2px 0 #000, 0 0 22px rgba(var(--g2-glow), .45);
  background: linear-gradient(180deg, #fff2cf 0, #f0c574 52%, #c28e3e 100%); -webkit-background-clip: text; background-clip: text;
}
@supports (-webkit-background-clip: text) {
  body.g2 .guide-title h1, body.g2 .info-card h1, body.g2 .chapter-info h2 { -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 2px 0 #000); }
  body.g2 .guide-title h1 span { -webkit-text-fill-color: #d9a6ff; }
}
body.g2 .guide-title h1 span { color: #d9a6ff; }
body.g2 .guide-title p:last-child { color: var(--g2-muted); font: 14px/1.6 var(--g2-ui); max-width: 660px; }
body.g2 .guide-summary strong { font: 800 38px/1 var(--g2-serif); color: #ffe2a0; text-shadow: 0 2px 0 #000, 0 0 18px rgba(255, 200, 100, .35); }
body.g2 .guide-summary span { color: var(--g2-muted); letter-spacing: .1em; }

body.g2 .info-card { padding: 20px 22px 22px; }
body.g2 .info-card h1, body.g2 .info-card h2, body.g2 .info-card h3 { color: var(--g2-gold); }
body.g2 .info-card p { color: var(--g2-ink); font: 14.5px/1.65 var(--g2-ui); }
body.g2 .info-card p.card-tag { display: inline-flex; }
body.g2 .info-card .tag { color: var(--g2-gold); }
body.g2 .info-card.players h2 { background: none; -webkit-text-fill-color: initial; color: #fff0c4; filter: none; text-shadow: 0 2px 0 #000, 0 0 26px rgba(var(--g2-glow), .6); }
body.g2 .credits-quiet { background: var(--g2-frame); border: 1px solid transparent; border-radius: 6px; color: #f6f0ff; }
body.g2 .info-card .credits-thanks { color: #e9d4ff; text-shadow: 0 0 22px rgba(var(--g2-glow), .8); }

/* notices become quest-log callouts */
body.g2 .notice {
  position: relative; margin-top: 16px; padding: 14px 18px 14px 64px; border: 1px solid #8a6f44; border-left-width: 1px; border-radius: 6px;
  background: linear-gradient(180deg, #2f2632, #1a141f); color: #d8cde3; font: 13.5px/1.6 var(--g2-ui);
  box-shadow: inset 0 0 0 1px rgba(255, 226, 170, .07), inset 0 0 26px rgba(214, 170, 90, .07), 0 8px 22px rgba(0, 0, 0, .5);
  backdrop-filter: none;
}
body.g2 .notice::before {
  content: "!"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center;
  font: 900 24px/1 var(--g2-serif); color: #ffd23f; text-shadow: 0 0 14px rgba(255, 210, 63, .9), 0 2px 0 #4a3000;
  border: 1.5px solid #c9a36a; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4a3a1c, #1a1208);
  box-shadow: 0 0 16px rgba(255, 210, 63, .35), inset 0 0 8px rgba(0, 0, 0, .8);
}
body.g2 .notice strong { color: #ffd98a; }

/* guide */
body.g2 .controlbar { border: 1px solid #6a5370; background: linear-gradient(180deg, #1f1729, #120d1a); box-shadow: inset 0 0 0 1px rgba(255, 226, 170, .06), 0 6px 16px rgba(0, 0, 0, .45); }
body.g2 .screen-search { border: 1px solid #8a6f44; border-radius: 5px; background: #0a0710; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .7); }
body.g2 .screen-search input { font: 13.5px var(--g2-ui); }
body.g2 .screen-search input::placeholder { color: #a99bb6; }
body.g2 .toggle, body.g2 .menu-switch { border: 1px solid #6a5370; border-radius: 5px; background: #18121f; color: var(--g2-muted); }
body.g2 .toggle.active { background: var(--g2-gold-btn); border-color: #fff1c8; color: #2a1706; }
body.g2 .sidebar-head { color: var(--g2-gold); letter-spacing: .16em; }
body.g2 .topic { border: 1px solid #6d5a45; border-radius: 5px; background: linear-gradient(180deg, #2b2233, #140f1b); box-shadow: inset 0 1px 0 rgba(255, 226, 170, .1); transition: border-color .15s, background .15s, transform .15s; }
body.g2 .topic:hover { border-color: #d3a8f5; background: linear-gradient(180deg, #3b2a4c, #1b1226); transform: translateX(2px); }
body.g2 .topic[aria-current="true"] { border-color: var(--g2-gold-mid); background: linear-gradient(100deg, #55296a, #241334); box-shadow: inset 0 0 14px rgba(var(--g2-glow), .45), 0 0 14px rgba(var(--g2-glow), .35); }
body.g2 .topic img, body.g2 .chapter-head > img { border-radius: 4px; border-color: #b8934f; }
body.g2 .chapter-head { border: 1px solid #8a6f44; border-radius: 6px; background: linear-gradient(95deg, #33203f 0, #150f1f 72%); }
body.g2 .chapter-lead { background: linear-gradient(180deg, #1a1423, #120d1a); border-color: #4a3a56; color: #e1d7e8; }
body.g2 .chapter-notes { border: 1px solid #8a6f44; border-radius: 6px; background: linear-gradient(130deg, #2f2530, #17111e); }
body.g2 .step-card { border-radius: 7px; }
body.g2 .step-card .card-header { background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent); border-bottom-color: rgba(201, 163, 106, .35); }
body.g2 .step-card .why { border-radius: 0; }
body.g2 .step-points li { border-radius: 0 4px 4px 0; }
body.g2 .tip { border-radius: 0 4px 4px 0; }
body.g2 .chapter-nav { border-top-color: rgba(201, 163, 106, .3); }
body.g2 .chapter-nav button:disabled { opacity: .35; filter: none; transform: none; }
@media (max-width: 700px) {
  body.g2 .chapter-nav { flex-wrap: wrap; justify-content: center; }
  body.g2 .chapter-nav button { padding: 0 11px; min-height: 40px; font-size: 11px; letter-spacing: .04em; white-space: normal; }
}
body.g2 .main-shot { border-radius: 4px; }
body.g2 .main-shot .zoom-label { border-radius: 3px; }

/* changelog */
body.g2 .log-nav a { border: 1px solid #8a6f44; border-radius: 5px; background: linear-gradient(180deg, #2a2133, #150f1c); color: var(--g2-gold); transition: border-color .15s, color .15s, transform .15s; }
body.g2 .log-nav a:hover { border-color: #d3a8f5; color: #fff; transform: translateY(-1px); }
body.g2 .log-release { padding: 20px 22px; }
body.g2 .log-release li { border-radius: 0 5px 5px 0; }
body.g2 .log-release .log-pre { border-radius: 4px; }
body.g2 .log-shots button { border-radius: 4px; overflow: hidden; border-color: #8a6f44; }
body.g2 .log-legend { font-family: var(--g2-ui); }
body.g2 .log-row h3, body.g2 .log-history { color: var(--g2-gold); }

/* download / pages */
body.g2 .download-grid .info-card:not(:first-child) { padding-top: 22px; }
body.g2 .download-grid .info-card:not(:first-child) .card-tag { color: var(--g2-gold); }
body.g2 .page-grid .info-card h3 { font-size: 24px; }

/* ==========================================================================
   PHONE ALERTS PAGE (standalone mini-site, 440px column)
   ========================================================================== */
body.g2.g2-phone {
  font-family: var(--g2-ui);
  background: #07050b;
}
body.g2.g2-phone::after {
  background: var(--g2-sky-light), linear-gradient(180deg, rgba(7, 5, 11, .5), rgba(7, 5, 11, .86) 40%, rgba(7, 5, 11, .96)), url("art/bg-demon.webp") 12% 0 / cover no-repeat, #07050b;
}
.g2-phone main {
  position: relative; z-index: 1; width: min(460px, 100% - 20px); margin: 14px auto 28px; padding: 18px 0 22px; border: 2px solid transparent; border-radius: 9px;
  background: var(--g2-frame); box-shadow: var(--g2-depth);
}
.g2-phone main::before {
  content: ""; position: absolute; inset: -3px; z-index: 3; pointer-events: none;
  background: var(--g2-corner-tl) left top / 22px 22px no-repeat, var(--g2-corner-tr) right top / 22px 22px no-repeat,
    var(--g2-corner-bl) left bottom / 22px 22px no-repeat, var(--g2-corner-br) right bottom / 22px 22px no-repeat;
}
.g2-phone header img { border-radius: 8px; border: 2px solid #b8934f; box-shadow: 0 0 16px rgba(var(--g2-glow), .6); }
.g2-phone header strong { color: var(--g2-gold); font-family: var(--g2-serif); letter-spacing: .06em; }
.g2-phone header span { color: #d3b6f3; letter-spacing: .2em; }
.g2-phone h1 { font-family: var(--g2-serif); color: #fff0c4; text-shadow: 0 2px 0 #000, 0 0 20px rgba(var(--g2-glow), .6); }
.g2-phone label.tag { display: block; }
.g2-phone .tag span, .g2-phone .section small, .g2-phone .row small { color: #c3b6d6; }
.g2-phone .tag input, .g2-phone .quiet-times input { border-radius: 6px; border: 1px solid #8a6f44; background: #0a0710; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .7); }
.g2-phone .row { border-radius: 8px; border: 1px solid #5d4a70; background: linear-gradient(180deg, #241a31, #140e1c); box-shadow: inset 0 1px 0 rgba(255, 226, 170, .08); }
.g2-phone .ico { border-radius: 8px; background: radial-gradient(circle at 35% 30%, #4a3368, #1d1230); border: 1px solid #8a6f44; }
.g2-phone .switch i { background: #231a30; border: 1px solid #6a5578; }
.g2-phone .switch i::before { background: linear-gradient(145deg, #d8cce6, #8d7fa3); }
.g2-phone .switch input:checked + i { background: linear-gradient(180deg, #6a3fa0, #351a58); border-color: #d3a8f5; }
.g2-phone .switch input:checked + i::before { background: linear-gradient(145deg, #fff0c4, #d6a64c); }
.g2-phone .section { color: var(--g2-gold); font-family: var(--g2-serif); letter-spacing: .04em; }
.g2-phone .pills button, .g2-phone .roles button, .g2-phone .actions button {
  border-radius: 6px; border: 1px solid #8a6f44; background: linear-gradient(180deg, #2c2238, #150f1c); color: #f1e6ff; font-family: var(--g2-ui);
}
.g2-phone .pills button.on, .g2-phone .roles button.on { background: var(--g2-gold-btn); border-color: #fff1c8; color: #2a1706; }
.g2-phone #save { background: linear-gradient(180deg, #6a3fa0, #2c1648); border-color: #d3a8f5; color: #fff; }
.g2-phone #saved { color: var(--g2-gold); }
.g2-phone .link-timer, .g2-phone .link-help, .g2-phone .install { border-radius: 8px; border-color: #8a6f44; background: linear-gradient(180deg, #241a31, #140e1c); }
.g2-phone .link-help { color: #cfc4dc; }
.g2-phone .link-help b, .g2-phone .link-timer strong { color: #ffd98a; }
.g2-phone .install button { border-radius: 6px; background: var(--g2-gold-btn); color: #2a1706; border-color: #fff1c8; }
.g2-phone a { color: #dcc0fa; }

/* ---------- calm mode and reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body.g2 *, body.g2 *::before, body.g2 *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
html.g2-calm body.g2 *, html.g2-calm body.g2 *::before, html.g2-calm body.g2 *::after { animation: none !important; transition: none !important; }
