/* The Underground: Reborn - one dark look, by choice. Tokens first, everything derives. */
:root {
  --soot: #0e0c0b;
  --tunnel: #191513;
  --seam: #2e2723;
  --bone: #ebe4da;
  --ash: #a69c91;
  --ember: #e8622c;
  --ember-hot: #ff8a4c;
  --pvp: #d9503a;
  --pve: #6f9a5a;
  --safe: #4f9bd6;
  --gas: #b9b04a;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--soot); scroll-behavior: smooth; }
body {
  margin: 0; background: var(--soot); color: var(--bone);
  font: 400 1.0625rem/1.6 var(--body);
  padding-inline: 16px; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 60rem; margin-inline: auto; }
a { color: var(--ember-hot); }
a:focus-visible, .btn:focus-visible, button:focus-visible { outline: 2px solid var(--ember-hot); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
h2 { font-size: clamp(2rem, 5vw, 2.75rem); }
h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: .04em; }
p { margin: 0; }
.label { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ash); }
.lede { max-width: 40rem; color: var(--ash); }
.lede strong { color: var(--bone); font-weight: 600; }
.prose { max-width: 40rem; display: grid; gap: 1rem; }
.prose p strong { font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { color: var(--bone); background: var(--tunnel); padding: .1em .4em; overflow-wrap: anywhere; }

/* Nav */
.nav { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; padding-block: .9rem; border-bottom: 1px solid var(--seam); }
.nav .brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--bone); font: 800 1.1rem/1 var(--display); letter-spacing: .06em; text-transform: uppercase; margin-right: auto; }
.nav .brand img { width: 30px; height: 30px; }
nav.nav.wrap { max-width: 72rem; }   /* wider than the page content so eight links plus the login button stay on one line */
.nav a:not(.brand) { font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--ash); padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:not(.brand):hover { color: var(--bone); }
.nav a[aria-current="page"] { color: var(--bone); border-bottom-color: var(--ember); }
.nav a.discord { color: var(--ember-hot); }

.account { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--ash); }
.account img { border-radius: 50%; }
.account a { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.account a.login { border: 1px solid var(--ember); padding: .3rem .7rem; color: var(--bone); }
.account a.login:hover { background: var(--ember); color: var(--soot); }

/* Hero (home) and page heads */
.hero { padding-block: clamp(2rem, 6vw, 4.5rem) 2.5rem; display: grid; justify-items: center; text-align: center; gap: 1.5rem; position: relative; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0 -16px auto; height: 32rem; z-index: -1; background: radial-gradient(38rem 20rem at 50% 38%, rgb(232 98 44 / .16), transparent 70%); }
#drift { position: absolute; inset: 0 -16px; width: calc(100% + 32px); height: 100%; display: block; z-index: -1; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #drift { display: none; } }
.hero img.logo { width: min(100%, 42rem); height: auto; }
.hero h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.thesis { font-size: clamp(1.15rem, 2.6vw, 1.4rem); max-width: 36rem; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.btn { display: inline-block; padding: .8rem 1.4rem; text-decoration: none; font: 600 1.15rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; border: 2px solid var(--ember); color: var(--bone); background: transparent; cursor: pointer; }
.btn.primary { background: var(--ember); color: var(--soot); }
.btn:hover { background: var(--ember-hot); border-color: var(--ember-hot); color: var(--soot); }
.pagehead { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; display: grid; gap: .75rem; }
.pagehead .label { color: var(--ember-hot); }

/* Forms (appeals) and staff hub */
form { display: grid; gap: .6rem; max-width: 40rem; }
label { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ash); margin-top: .4rem; }
input, select, textarea { font: inherit; color: var(--bone); background: var(--tunnel); border: 1px solid var(--seam); padding: .6rem .75rem; width: 100%; border-radius: 0; }
textarea { resize: vertical; min-height: 9rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ember-hot); outline-offset: 2px; }
.hint { color: var(--ash); font-size: .9rem; text-transform: none; letter-spacing: 0; font-family: var(--body); }
.status { min-height: 1.4em; color: var(--ember-hot); }
.note { background: var(--tunnel); border: 1px solid var(--seam); padding: 1rem 1.25rem; display: grid; gap: .75rem; max-width: 40rem; }
.hublinks { display: grid; gap: .5rem; }
button.btn:disabled { opacity: .5; cursor: default; }

/* Server plate + live status */
.plate { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); border-block: 1px solid var(--seam); margin-block: 1rem 0; }
.plate div { padding: 1rem .75rem; display: grid; gap: .2rem; }
.plate div + div { border-left: 1px solid var(--seam); }
.plate strong { font: 600 1.4rem/1.1 var(--display); letter-spacing: .03em; font-variant-numeric: tabular-nums; }
@media (max-width: 40rem) { .plate div + div { border-left: 0; border-top: 1px solid var(--seam); } }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--ash); margin-right: .4rem; vertical-align: .05em; }
.dot.on { background: var(--pve); box-shadow: 0 0 8px var(--pve); }
.dot.off { background: var(--pvp); }
.join { display: grid; gap: .6rem; justify-items: center; text-align: center; }
.join .addr { font-family: var(--mono); color: var(--ash); font-size: .95rem; }
.join .addr b { color: var(--bone); font-weight: 500; user-select: all; }

section { padding-block: clamp(2.5rem, 6vw, 4rem); display: grid; gap: 1.5rem; }
section + section { border-top: 1px solid var(--seam); }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.75rem 2rem; list-style: none; margin: 0; padding: 0; }
.features li { display: grid; gap: .35rem; align-content: start; min-width: 0; }
.features h3::before { content: ""; display: inline-block; width: .55rem; height: .55rem; background: var(--ember); margin-right: .6rem; vertical-align: .18em; }
.features p { color: var(--ash); }
.features a { color: inherit; text-decoration: none; }
.features a:hover h3 { color: var(--ember-hot); }

/* Steps (a real sequence) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: step; max-width: 44rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: baseline; padding: 1rem 1.25rem; background: var(--tunnel); border: 1px solid var(--seam); }
.steps li::before { content: counter(step); font: 800 2rem/1 var(--display); color: var(--ember); }
.steps li > div { min-width: 0; display: grid; gap: .3rem; }

/* Rules */
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; max-width: 44rem; }
.rules li { padding-left: 1.4rem; position: relative; }
.rules li::before { content: "\2715"; position: absolute; left: 0; color: var(--ember); font-size: .85em; top: .2em; }
.rules strong { font-weight: 600; }

/* News */
.news { display: grid; gap: 2.5rem; max-width: 44rem; }
.news article { display: grid; gap: .6rem; }
.news article h2 { font-size: 1.6rem; }
.news article p { color: var(--ash); }
.news article p strong, .news article li strong { color: var(--bone); font-weight: 600; }
.news ul { margin: 0; padding-left: 1.2rem; color: var(--ash); display: grid; gap: .3rem; }
.news .toc { display: flex; flex-wrap: wrap; gap: .5rem .9rem; font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.news .toc a { text-decoration: none; color: var(--ash); }
.news .toc a:hover { color: var(--ember-hot); }

/* Tables */
.tbl { overflow-x: auto; border: 1px solid var(--seam); background: var(--tunnel); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--seam); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ash); white-space: nowrap; }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ember-hot); white-space: nowrap; }
td:first-child { font-weight: 600; white-space: nowrap; }

/* Notoriety ladders */
.ladders { display: grid; gap: 1.25rem; }
.ladder { display: grid; gap: .5rem; }
.ladder h3 { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.ladder h3 small { font: 400 .8rem/1 var(--mono); letter-spacing: .08em; text-transform: none; color: var(--ash); }
.ranks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; list-style: none; margin: 0; padding: 0; }
.ranks li { background: var(--tunnel); border-top: 3px solid var(--seam); padding: .5rem .5rem .55rem; display: grid; gap: .15rem; min-width: 0; }
.ranks li .n { font-family: var(--mono); font-size: .7rem; color: var(--ash); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.ranks li .name { font: 600 .95rem/1.15 var(--display); letter-spacing: .03em; text-transform: uppercase; overflow-wrap: anywhere; }
.ranks li:nth-child(n+2) { border-top-color: color-mix(in srgb, var(--ember) 30%, var(--seam)); }
.ranks li:nth-child(n+4) { border-top-color: color-mix(in srgb, var(--ember) 60%, var(--seam)); }
.ranks li:nth-child(n+6) { border-top-color: var(--ember); }
.ranks li:last-child { border-top-color: var(--ember-hot); }
.ranks.hostile li:nth-child(n+2) { border-top-color: color-mix(in srgb, var(--pvp) 40%, var(--seam)); }
.ranks.hostile li:nth-child(n+5) { border-top-color: var(--pvp); }
.ranks.hostile li:last-child { border-top-color: var(--pvp); }
@media (max-width: 44rem) { .ranks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Map */
.mapwrap { display: grid; gap: 1rem; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ash); }
.legend button { font: inherit; color: inherit; background: none; border: 0; padding: .2rem 0; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; letter-spacing: inherit; text-transform: inherit; }
.legend button[aria-pressed="false"] { opacity: .4; text-decoration: line-through; }
.legend .sw { width: .8rem; height: .8rem; border-radius: 50%; display: inline-block; border: 2px solid currentColor; }
.legend .sw.pin { border-radius: 0; transform: rotate(45deg); width: .65rem; height: .65rem; }
.mapbox { position: relative; aspect-ratio: 1; max-width: 100%; background: var(--tunnel); border: 1px solid var(--seam); overflow: hidden; }
.mapbox img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.mapbox svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mapbox .z { stroke-width: 1.5; vector-effect: non-scaling-stroke; fill-opacity: .22; cursor: pointer; }
.mapbox .blob circle { stroke: none; }
.mapbox .blob.pvp circle { fill: var(--pvp); }
.mapbox .blob.pve circle { fill: var(--pve); }
.mapbox .blob { cursor: pointer; }
.mapbox .z.pve { stroke: var(--pve); fill: var(--pve); }
.mapbox .z.safe { stroke: var(--safe); fill: var(--safe); fill-opacity: .4; }
.mapbox .z.gas { stroke: var(--gas); fill: var(--gas); stroke-dasharray: 6 4; }
.mapbox .z.dino { stroke: var(--ember-hot); fill: var(--ember-hot); stroke-dasharray: 2 3; }
.mapbox .z:hover, .mapbox .z.hit { fill-opacity: .5; }
.mapbox .pin { fill: var(--bone); stroke: var(--soot); stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; }
.mapbox text { font-family: var(--mono); fill: var(--bone); paint-order: stroke; stroke: var(--soot); stroke-linejoin: round; pointer-events: none; }
.mapbox .hidden { display: none; }
.searchbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; max-width: 40rem; }
.searchbar label { margin: 0; }
.searchbar input { flex: 1 1 14rem; width: auto; }
.legend button[disabled] { opacity: .35; cursor: default; text-decoration: none; }
.mapbox .pl.hit { stroke: var(--bone); stroke-width: 2; }
.mapbox .pl { fill: #ff9a2e; stroke: var(--soot); stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; }
.maptip { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 10px)); background: var(--soot); border: 1px solid var(--seam); padding: .4rem .6rem; font-size: .85rem; white-space: nowrap; pointer-events: none; display: none; }
.maptip b { display: block; font: 600 1rem/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.maptip small { color: var(--ash); }
.zonelist { columns: 2; column-gap: 2rem; font-size: .95rem; color: var(--ash); }
.zonelist li { break-inside: avoid; }
@media (max-width: 36rem) { .zonelist { columns: 1; } }

footer { border-top: 1px solid var(--seam); padding-block: 2rem 3rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: var(--ash); font-size: .9rem; }
footer a { color: var(--ash); }
@media (prefers-reduced-motion: no-preference) { .btn, .nav a { transition: background .15s, border-color .15s, color .15s; } }

.news img { display: block; max-width: 100%; height: auto; margin-top: .5rem; border: 1px solid var(--seam); }
.news blockquote { margin: 0; padding: .4rem 1rem; border-left: 3px solid var(--ember); color: var(--ash); }
.news h3 { font-size: 1.15rem; margin-top: .6rem; }
.news ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.news p { color: var(--bone); }
.news a { overflow-wrap: anywhere; }

/* Locations: image/text cards, alternating sides */
.locations { display: grid; gap: 3rem; padding-bottom: 3rem; }
.loc { display: grid; grid-template-columns: 1.45fr 1fr; gap: 2.25rem; align-items: center; }
.loc:nth-child(even) { grid-template-columns: 1fr 1.45fr; }
.loc:nth-child(even) figure { order: 2; }
.loc figure { position: relative; margin: 0; }
.loc img { width: 100%; height: auto; display: block; border-radius: 1rem; border: 1px solid var(--seam); box-shadow: 0 1.2rem 2.5rem rgb(0 0 0 / .45); }
.loc-body { display: grid; gap: .6rem; align-content: center; min-width: 0; }
.loc-body h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.loc-body p { color: var(--ash); max-width: 28rem; }
.loc-body .more { font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 46rem) {
  .loc, .loc:nth-child(even) { grid-template-columns: 1fr; gap: 1rem; }
  .loc:nth-child(even) figure { order: 0; }
}

/* Locations: the overgrown look. Only pages with a .grove layer get it. Sakura branches over the image
   corners, a green canopy shade and slow mist behind the page, and a moss strip at the very end. */
.grove { display: none; }   /* marker only: its presence on a page switches the look on */
body:has(.grove)::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 45%, transparent 52%, rgb(10 26 10 / .5) 100%),
              linear-gradient(rgb(12 30 12 / .5), transparent 180px),
              linear-gradient(to top, rgb(86 118 84 / .12), transparent 34%); }
html:has(.grove)::after { content: ""; position: fixed; left: 0; bottom: 0; width: 200%; height: 34vh; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 11% 55% at 6% 90%, rgb(150 180 150 / .10), transparent 70%),
    radial-gradient(ellipse 14% 45% at 19% 100%, rgb(150 180 150 / .09), transparent 70%),
    radial-gradient(ellipse 10% 50% at 31% 95%, rgb(150 180 150 / .10), transparent 70%),
    radial-gradient(ellipse 13% 40% at 44% 100%, rgb(150 180 150 / .08), transparent 70%),
    radial-gradient(ellipse 11% 55% at 56% 90%, rgb(150 180 150 / .09), transparent 70%),
    radial-gradient(ellipse 14% 45% at 69% 100%, rgb(150 180 150 / .10), transparent 70%),
    radial-gradient(ellipse 10% 50% at 81% 95%, rgb(150 180 150 / .08), transparent 70%),
    radial-gradient(ellipse 13% 40% at 94% 100%, rgb(150 180 150 / .09), transparent 70%);
  animation: grove-drift 120s linear infinite; }
@keyframes grove-drift { to { transform: translateX(-50%); } }
body:has(.grove) { position: relative; overflow-x: clip; padding-bottom: clamp(30px, 5vw, 70px); }
body:has(.grove) > nav, body:has(.grove) > main, body:has(.grove) > footer { position: relative; z-index: 1; }
body:has(.grove)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: clamp(24px, 4vw, 60px); pointer-events: none;
  background: url(/assets/sak/moss-sakura.webp) center bottom / 100% 100% no-repeat; }
.loc figure::before, .loc figure::after { content: ""; position: absolute; width: 260px; height: 197px; z-index: 2; pointer-events: none;
  background: url(/assets/sak/branch-a.webp) left top / contain no-repeat; filter: drop-shadow(0 4px 5px rgb(0 0 0 / .6)); }
.loc figure::before { top: -26px; left: -26px; }
.loc figure::after { right: -26px; bottom: -26px; transform: rotate(180deg); background-image: url(/assets/sak/branch-b.webp); }
.loc:nth-child(even) figure::before { left: auto; right: -26px; transform: scaleX(-1); background-image: url(/assets/sak/branch-b.webp); }
.loc:nth-child(even) figure::after { right: auto; left: -26px; transform: scaleY(-1); background-image: url(/assets/sak/branch-a.webp); }
@media (max-width: 46rem) {
  .loc figure::before, .loc figure::after { width: 150px; height: 114px; }
  .loc figure::before, .loc:nth-child(even) figure::before { top: -14px; left: -10px; right: auto; transform: none; background-image: url(/assets/sak/branch-a.webp); }
  .loc figure::after, .loc:nth-child(even) figure::after { right: -10px; left: auto; bottom: -14px; transform: rotate(180deg); background-image: url(/assets/sak/branch-b.webp); }
}
@media (prefers-reduced-motion: reduce) { html:has(.grove)::after { animation: none; } }

/* Scenes gallery and page banners: wide 3:1 painted panoramas */
.scenes { display: grid; gap: 4rem; padding-bottom: 3rem; }
.scene { position: relative; margin: 0; }
.scene img, .banner img { width: 100%; height: auto; display: block; border-radius: 1rem; border: 1px solid var(--seam); box-shadow: 0 1.2rem 2.5rem rgb(0 0 0 / .45); }
.banner { margin: 1.5rem 0 0; }
.scene::before, .scene::after { content: ""; position: absolute; width: 260px; height: 197px; z-index: 2; pointer-events: none;
  background: url(/assets/sak/branch-a.webp) left top / contain no-repeat; filter: drop-shadow(0 4px 5px rgb(0 0 0 / .6)); }
.scene::before { top: -26px; left: -26px; }
.scene::after { right: -26px; bottom: -26px; transform: rotate(180deg); background-image: url(/assets/sak/branch-b.webp); }
.scene:nth-child(even)::before { left: auto; right: -26px; transform: scaleX(-1); background-image: url(/assets/sak/branch-b.webp); }
.scene:nth-child(even)::after { right: auto; left: -26px; transform: scaleY(-1); background-image: url(/assets/sak/branch-a.webp); }
@media (max-width: 46rem) {
  .scene::before, .scene::after { width: 150px; height: 114px; }
  .scene::before, .scene:nth-child(even)::before { top: -14px; left: -10px; right: auto; transform: none; background-image: url(/assets/sak/branch-a.webp); }
  .scene::after, .scene:nth-child(even)::after { right: -10px; left: auto; bottom: -14px; transform: rotate(180deg); background-image: url(/assets/sak/branch-b.webp); }
}

/* Sakura look: falling petals and drifting fireflies. The page script adds .petals and .ff to the body on .grove pages
   only. Fireflies are a glow on black, blended with screen so only the light shows. */
.petals, .ff { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.petal { position: absolute; top: -12vh; width: 128px; height: 128px; animation: fall linear infinite; will-change: transform; }
.petal i { display: block; width: 128px; height: 128px; background: url(/assets/sak/petals.webp) 0 0 / 512px 384px; animation: sway ease-in-out infinite alternate; opacity: .9; }
@keyframes fall { to { transform: translate3d(var(--dx), 118vh, 0); } }
@keyframes sway { from { transform: translateX(-26px) rotate(var(--r0)) scale(var(--s)); } to { transform: translateX(26px) rotate(var(--r1)) scale(var(--s)); } }
.ff i { position: absolute; inset: -6%; background: url(/assets/sak/fireflies.webp) center / cover; mix-blend-mode: screen; opacity: .4; animation: ffdrift 46s ease-in-out infinite alternate; }
.ff i + i { transform: scaleX(-1) rotate(180deg); opacity: .3; animation-duration: 71s; animation-direction: alternate-reverse; }
@keyframes ffdrift { from { transform: translate3d(-2%, 2%, 0); } to { transform: translate3d(2%, -3%, 0); } }
@media (max-width: 46rem) { .petals { opacity: .45; } .petal { width: 90px; height: 90px; } }
@media (prefers-reduced-motion: reduce) { .petal, .petal i, .ff i { animation: none; } .petals { display: none; } }

/* Quiet sakura look for reading pages (marker .grove-quiet): a soft green shade at the page edges, a few fireflies that glow
   but do not move, and the petal moss strip at the end. No petals, no mist drift, no corner branches: nothing moves. */
.grove-quiet { display: none; }
body:has(.grove-quiet)::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 45%, transparent 55%, rgb(10 26 10 / .42) 100%),
              linear-gradient(rgb(12 30 12 / .4), transparent 160px),
              linear-gradient(to top, rgb(86 118 84 / .10), transparent 30%); }
body:has(.grove-quiet) { position: relative; overflow-x: clip; padding-bottom: clamp(30px, 5vw, 70px); }
body:has(.grove-quiet) > nav, body:has(.grove-quiet) > main, body:has(.grove-quiet) > footer { position: relative; z-index: 1; }
body:has(.grove-quiet)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: clamp(24px, 4vw, 60px); pointer-events: none;
  background: url(/assets/sak/moss-sakura.webp) center bottom / 100% 100% no-repeat; }
.ff.still i { animation: none; opacity: .24; }
.ff.still i + i { display: none; }

/* Missions and events page */
.mtag { display: inline-block; justify-self: start; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; padding: .15rem .5rem; border: 1px solid var(--seam); color: var(--ash); margin-bottom: .5rem; }
.mtag.pvp { color: var(--pvp); border-color: var(--pvp); }
.mtag.pve { color: var(--pve); border-color: var(--pve); }
.mtag.soon { color: var(--ember-hot); border-color: var(--ember); }
.mission-sec { display: grid; gap: .75rem; max-width: 44rem; }
.mission-sec p { color: var(--ash); }
.mission-sec p strong { color: var(--bone); font-weight: 600; }

/* Defend the Flag carousel (missions page): slides scroll sideways, title text over each picture */
.dtf-carousel { position: relative; margin-top: 1.25rem; }
.dtf-track { list-style: none; margin: 0; padding: 0 0 .75rem; display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--seam) transparent; }
.dtf-track:focus-visible { outline: 2px solid var(--ember-hot); outline-offset: 4px; }
.dtf-slide { position: relative; flex: 0 0 min(80%, 34rem); scroll-snap-align: start; aspect-ratio: 16 / 9; border-radius: 1rem; overflow: hidden; border: 1px solid var(--seam); background: var(--tunnel); }
.dtf-slide .ph, .dtf-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; display: grid; place-items: center; color: var(--ash); font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.dtf-slide h4 { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 2.5rem 1.1rem .9rem; background: linear-gradient(transparent, rgb(8 6 5 / .82)); font-family: var(--display); font-weight: 800; font-size: clamp(1.25rem, 3.2vw, 1.7rem); letter-spacing: .04em; text-transform: uppercase; color: var(--bone); }
.dtf-arrow { position: absolute; top: calc(50% - 1.5rem); z-index: 3; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--seam); background: rgb(14 12 11 / .85); color: var(--bone); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.dtf-arrow:hover { border-color: var(--ember); color: var(--ember-hot); }
.dtf-arrow.prev { left: -.6rem; }
.dtf-arrow.next { right: -.6rem; }
.dtf-arrow[disabled] { opacity: .3; cursor: default; }
.dtf-pause { display: block; margin: .25rem 0 0 auto; background: none; border: 1px solid var(--seam); color: var(--ash); font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .7rem; cursor: pointer; }
.dtf-pause:hover { border-color: var(--ember); color: var(--ember-hot); }
.crate-feature { display: grid; grid-template-columns: 1fr 1.25fr; gap: 2rem; align-items: center; }
.crate-feature figure { margin: 0; min-width: 0; }
.crate-feature img { width: 100%; height: auto; display: block; border-radius: 1rem; border: 1px solid var(--seam); box-shadow: 0 1.2rem 2.5rem rgb(0 0 0 / .45); }
@media (min-width: 46.01rem) { .crate-feature.flip { grid-template-columns: 1.25fr 1fr; } .crate-feature.flip figure { order: -1; } }
@media (max-width: 46rem) { .dtf-arrow { display: none; } .dtf-slide { flex-basis: 84%; } .crate-feature { grid-template-columns: 1fr; gap: 1rem; } }
@media (prefers-reduced-motion: reduce) { .dtf-track { scroll-behavior: auto; } }

/* Centred, looping carousel: the current slide sits in the middle, neighbours peek in and fade at both edges.
   --cw = width of the page column (60rem, or the screen minus the gutters); --fade is always narrower than the peek, so the
   centred slide is never dimmed. The carousel box is capped because its parent is a grid and would otherwise size to the slides. */
.dtf-carousel { width: 100%; max-width: 100%; min-width: 0; --cw: min(60rem, calc(100vw - 32px)); --sw: min(34rem, calc(var(--cw) - 6rem)); --fade: 8rem; }
.dtf-track { padding-inline: calc((var(--cw) - var(--sw)) / 2); scroll-padding-inline: calc((var(--cw) - var(--sw)) / 2);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent); }
.dtf-slide { flex: 0 0 var(--sw); scroll-snap-align: center; }
@media (max-width: 46rem) { .dtf-carousel { --sw: calc(var(--cw) - 8rem); --fade: 3rem; } }
/* Quest Log page */
.qtoc { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 2rem; }
.qtoc a { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--ash); border: 1px solid var(--seam); padding: .35rem .7rem; }
.qtoc a:hover { color: var(--bone); border-color: var(--ember); }
.qfoot { color: var(--ash); font-size: .82rem; margin: 2rem 0 0; }
.qchain { margin-bottom: 2.25rem; scroll-margin-top: 1rem; }
.qchain h2 { margin-bottom: .75rem; }
.qlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--seam); }
.qrow { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) minmax(0, 14rem); gap: .25rem 1.25rem; padding: .7rem 0; border-bottom: 1px solid var(--seam); align-items: start; }
.qname { font-weight: 600; color: var(--bone); }
.qsyn { color: var(--ash); }
.qrew { color: var(--ember-hot); font-weight: 600; text-align: right; }
.qrew b { color: var(--bone); }
.qbadge { display: inline-block; font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; padding: .1rem .4rem; margin-left: .4rem; vertical-align: .1em; border: 1px solid currentColor; }
.qbadge.daily { color: var(--pve); }
.qbadge.weekly { color: var(--safe); }
@media (max-width: 46rem) { .qrow { grid-template-columns: 1fr; } .qrew { text-align: left; } }

/* Systems dropdown: hover or keyboard focus shows Quests and Notoriety; on phones the two links sit inline (no hover there) */
.navdrop { position: relative; display: inline-flex; align-items: center; }
.navdrop > a.has-sub::after { content: " \25BE"; font-size: .75em; }
.navdrop .sub { display: none; position: absolute; top: 100%; left: -.75rem; z-index: 30; min-width: 11rem; padding: .4rem 0; flex-direction: column;
  background: var(--tunnel); border: 1px solid var(--seam); box-shadow: 0 1rem 2rem rgb(0 0 0 / .5); }
.navdrop .sub a { padding: .55rem 1rem; border-bottom: 0; white-space: nowrap; }
.navdrop:hover .sub, .navdrop:focus-within .sub { display: flex; }
@media (max-width: 46rem) {
  .navdrop { flex-wrap: wrap; }
  .navdrop > a.has-sub::after { content: ""; }
  .navdrop .sub { display: flex; position: static; flex-direction: row; gap: .9rem; min-width: 0; padding: 0 0 0 .6rem; border: 0; background: none; box-shadow: none; }
  .navdrop .sub a { padding: .3rem 0; }
}
/* the menu (and its dropdown) must sit above the page content on the pages that layer their content for the grove look */
body:has(.grove) > nav.nav, body:has(.grove-quiet) > nav.nav { z-index: 40; }
/* airdrop story strip: three pictures in order */
.airdrop-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.airdrop-strip li { margin: 0; min-width: 0; }
.airdrop-strip img { width: 100%; height: auto; display: block; border-radius: 1rem; border: 1px solid var(--seam); box-shadow: 0 1rem 2rem rgb(0 0 0 / .4); }
@media (max-width: 46rem) { .airdrop-strip { grid-template-columns: 1fr; } }
/* admin map: events layer (running missions as dots, possible airdrop zones as dotted rings) */
.mapbox .ev { fill: #d36bd0; stroke: var(--soot); stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; }
.mapbox .z.evarea { stroke: #d36bd0; fill: #d36bd0; fill-opacity: .14; pointer-events: none; }
.mapbox .z.az { stroke: var(--bone); fill: var(--bone); fill-opacity: .06; stroke-dasharray: 2 3; }
/* Systems sections: text, with an optional picture beside it (sys-grid > sys-text + figure.sys-fig; flip puts the picture on the left) */
.sys { padding: 2.25rem 0; border-top: 1px solid var(--seam); scroll-margin-top: 1rem; }
.qtoc + .sys, .qtoc ~ .sys:first-of-type { border-top: 0; }
.sys-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 2rem; align-items: center; }
.sys-grid.flip { grid-template-columns: 1.25fr 1fr; }
.sys-grid.flip .sys-fig { order: -1; }
.sys-text { display: grid; gap: .75rem; max-width: 40rem; min-width: 0; }
.sys-text p { color: var(--ash); }
.sys-text .more { font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.sys-fig { margin: 0; min-width: 0; }
.sys-fig img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 1rem; border: 1px solid var(--seam); box-shadow: 0 1.2rem 2.5rem rgb(0 0 0 / .45); }
.sys-sub { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 1rem; }
.sys-sub h3 { margin-bottom: .35rem; }
.sys-sub p { color: var(--ash); }
.sys-sub a { color: var(--ember-hot); }
.qtoc a[hidden], .sys[hidden] { display: none; }
@media (max-width: 46rem) { .sys-grid, .sys-grid.flip { grid-template-columns: 1fr; gap: 1rem; } .sys-grid.flip .sys-fig { order: 0; } }
/* quest chain header picture */
.qchain > figure { margin: 0 0 1.25rem; }
.qchain > figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 1rem; border: 1px solid var(--seam); }
.qchain > figure.portrait { max-width: 22rem; }
.qchain > figure.portrait img { aspect-ratio: 4 / 5; }
.qchain > .qpair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.qchain > .qpair figure { margin: 0; min-width: 0; }
.qchain > .qpair img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 1rem; border: 1px solid var(--seam); }
@media (max-width: 46rem) { .qchain > .qpair { grid-template-columns: 1fr; } }
.ladder-row { display: flex; align-items: center; gap: .9rem; }
.ladder-row > .ranks { flex: 1 1 auto; min-width: 0; }
.rank-sym { width: 4.5rem; height: auto; max-height: 4.5rem; object-fit: contain; flex: 0 0 auto; }
@media (max-width: 44rem) { .rank-sym { width: 3rem; max-height: 3rem; } }
/* top menu: a dot between items so the words are easy to tell apart */
.nav > *:not(.brand):not(.account):not(:nth-child(2))::before { content: "•"; color: var(--ash); margin-right: .6rem; }
.addr-box { display: grid; gap: .45rem; margin: 1rem 0 1.25rem; padding: 1rem 1.2rem; border: 1px solid var(--ember); border-radius: 1rem; background: var(--tunnel); max-width: 40rem; }
.addr-box p { margin: 0; }
.addr-box code { font-family: var(--mono); font-size: 1.1rem; color: var(--bone); user-select: all; }
.addr-box a { font-family: var(--mono); font-size: 1rem; color: var(--ember-hot); word-break: break-all; }
.addr-k { font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ash); display: inline-block; min-width: 14ch; }
.btn-steam { display: inline-flex; align-items: center; gap: .55rem; }
.btn-steam img { width: 22px; height: 22px; display: block; }
