/* Age of Dragons website. Pages are built by web/generate.py; docs/website.md.
 *
 * Night over Krynn: the real Milky Way (ESO) and the Moon (NASA) as the three moons,
 * silver Solinari, red Lunitari and black Nuitari, over generated mountains. Dark only.
 * Type: Newsreader for display, Hanken Grotesk for text, Geist Mono for the game's own text.
 */

@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/newsreader.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap; src: url("fonts/newsreader-italic.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/hanken-grotesk.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("fonts/hanken-grotesk-italic.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geist-mono.woff2") format("woff2"); }

:root {
  --night: #05070f;      /* the page */
  --deep: #0a0f1f;       /* panels: code, the game window, search */
  --text: #e3e7f0;
  --muted: #98a1b6;
  --faint: #6b7590;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --solinari: #eef1f8;   /* the silver moon: primary buttons, filled moons */
  --lunitari: #e2604a;   /* the red moon: link underlines, the neutral gods */
  --nuitari: #8c80c8;    /* the black moon's rim */
  --exits: #7fd1c3;      /* the game's exit line */
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wide: 76rem;
  --measure: 40rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  color-scheme: dark;
}

/* ---- Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(226, 96, 74, 0.45); color: #fff; }
a { color: inherit; text-decoration-color: rgba(226, 96, 74, 0.7); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--lunitari); }
:focus-visible { outline: 2px solid var(--solinari); outline-offset: 3px; border-radius: 3px; }
img { max-width: 100%; }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; color: #fff; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.8rem, 6vw, 4.75rem); line-height: 0.98; letter-spacing: -0.03em; font-variation-settings: "opsz" 72; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.08; letter-spacing: -0.02em; font-variation-settings: "opsz" 48; margin: 3.2rem 0 1rem; }
h3 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.012em; font-weight: 400; font-variation-settings: "opsz" 24; margin: 2.2rem 0 0.6rem; }
p { margin: 0 0 1.05em; }
code, pre { font-family: var(--mono); font-size: 0.86em; }
code { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 5px; padding: 0.05em 0.35em; }
pre { background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: 1em 1.2em; overflow-x: auto; line-height: 1.6; margin: 0 0 1.3em; color: #cdd4e4; }
pre code { background: none; border: 0; padding: 0; }
.skip { position: absolute; left: -999px; top: 0.6rem; z-index: 50; background: var(--solinari); color: var(--night); padding: 0.5em 0.9em; border-radius: 6px; }
.skip:focus { left: 0.6rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Masthead -------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 7, 15, 0.72);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.masthead-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 4.25rem;
  display: flex;
  align-items: center;
  gap: 2.4rem;
}
.mark { display: flex; align-items: center; gap: 0.65rem; color: #fff; text-decoration: none; font: 400 1.28rem var(--serif); letter-spacing: -0.012em; white-space: nowrap; }
.moons { width: 1.9rem; height: auto; flex: none; }
.moons .solinari { fill: var(--solinari); }
.moons .lunitari { fill: var(--lunitari); }
.moons .nuitari { fill: var(--night); stroke: var(--nuitari); stroke-width: 1.2; }
.masthead nav { display: flex; gap: 1.7rem; margin-left: auto; }
.masthead nav a { color: rgba(227, 231, 240, 0.7); text-decoration: none; font-size: 0.94rem; letter-spacing: 0.005em; white-space: nowrap; padding: 0.3rem 0; }
.masthead nav a:hover { color: #fff; }
.masthead nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -1px 0 var(--lunitari); }
.online { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.online:hover { color: #fff; }
.online-moon { width: 0.55rem; height: 0.55rem; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--faint); }
.online.live .online-moon { background: var(--solinari); box-shadow: 0 0 0.7rem rgba(238, 241, 248, 0.55); }
.play-now { font-size: 0.9rem; font-weight: 600; color: #fff; text-decoration: none; padding: 0.5rem 1.05rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-strong); white-space: nowrap; }
.play-now:hover { background: rgba(255, 255, 255, 0.14); }

/* On the home page the masthead floats over the sky. */
.page-index .masthead { position: absolute; inset: 0 0 auto; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; }

/* ---- The sky (home page hero, and a smaller one atop every page) ----------- */

.sky { position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 70% at 50% 100%, #2a1f3c 0%, #121733 38%, var(--night) 75%); }
.milkyway { position: absolute; z-index: -4; left: 50%; top: 46%; width: 165%; max-width: none; translate: -50% -50%; rotate: -21deg;
  mix-blend-mode: screen; opacity: 0.9;
  -webkit-mask-image: radial-gradient(60% 55% at 50% 50%, #000 40%, transparent 85%);
  mask-image: radial-gradient(60% 55% at 50% 50%, #000 40%, transparent 85%); }
.moon { position: absolute; z-index: -2; border-radius: 50%; mix-blend-mode: screen; }
.glow { position: absolute; z-index: -3; border-radius: 50%; aspect-ratio: 1; pointer-events: none; }
.ridges { position: absolute; inset: auto 0 0; height: 46%; z-index: -1; }
.ridges img { width: 100%; height: 100%; object-fit: cover; object-position: bottom; display: block; }
.nuitari-disc { position: absolute; z-index: -1; aspect-ratio: 1; border-radius: 50%; background: #04050b;
  box-shadow: 0 0 0 1px rgba(150, 128, 255, 0.28), 0 0 1.4rem rgba(130, 100, 255, 0.18); }

.hero { height: max(42rem, 100svh); }
.hero .solinari { width: clamp(11rem, 21vw, 21rem); right: 13%; top: 12%; filter: brightness(1.08) contrast(1.05); }
.hero .glow.sol { width: calc(clamp(11rem, 21vw, 21rem) + 14rem); right: calc(13% - 7rem); top: calc(12% - 7rem);
  background: radial-gradient(circle, rgba(215, 225, 255, 0.22), rgba(215, 225, 255, 0.05) 45%, transparent 70%); }
.hero .lunitari { width: clamp(4.5rem, 8vw, 8rem); left: 16%; top: 19%; rotate: 160deg; filter: sepia(1) saturate(5.5) hue-rotate(-28deg) brightness(0.95); }
.hero .glow.lun { width: calc(clamp(4.5rem, 8vw, 8rem) + 8rem); left: calc(16% - 4rem); top: calc(19% - 4rem);
  background: radial-gradient(circle, rgba(255, 110, 80, 0.25), transparent 65%); }
.hero .nuitari-disc { width: clamp(2.6rem, 4vw, 4rem); right: 35%; top: 9%; }
.hero-copy { position: absolute; inset: auto 0 11%; text-align: center; padding: 0 var(--gutter); }
.title { font-size: clamp(3.6rem, 10vw, 9.5rem); line-height: 0.9; letter-spacing: -0.035em; text-shadow: 0 0.2em 2em rgba(5, 7, 15, 0.6); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.5; color: rgba(232, 235, 243, 0.84); max-width: 34rem; margin: 1.4rem auto 2.2rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.9rem; }
.who-line { color: rgba(232, 235, 243, 0.7); font-size: 0.95rem; text-decoration: none; margin: 1.4rem 0 0; display: inline-flex; align-items: center; gap: 0.5rem; }
.who-line::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--solinari); box-shadow: 0 0 0.6rem rgba(238, 241, 248, 0.6); }
.who-line[hidden] { display: none; }
.sky-credit { position: absolute; right: 1.2rem; bottom: 0.8rem; margin: 0; font-size: 0.72rem; color: rgba(154, 163, 184, 0.55); }
.sky-credit a { color: inherit; text-decoration: none; }
.sky-credit a:hover { color: var(--muted); }

/* Smaller sky over every other page */
.page-head { height: clamp(15rem, 34vh, 21rem); display: flex; align-items: flex-end; }
.page-head .milkyway { top: 30%; width: 120%; opacity: 0.75; }
.page-head .ridges { inset: 40% 0 0; height: auto; }  /* the peaks, from the top of the picture, down to the bottom */
.page-head .ridges img { object-position: top; }
.page-head .solinari { width: clamp(4rem, 7vw, 6.5rem); right: 12%; top: 18%; }
.page-head .glow.sol { width: calc(clamp(4rem, 7vw, 6.5rem) + 8rem); right: calc(12% - 4rem); top: calc(18% - 4rem);
  background: radial-gradient(circle, rgba(215, 225, 255, 0.2), transparent 65%); }
.page-head-inner { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) 2.2rem; }
.page-head h1 { text-shadow: 0 0.15em 1.5em rgba(5, 7, 15, 0.7); }
.page-lede { color: rgba(232, 235, 243, 0.78); font-size: 1.12rem; margin: 0.9rem 0 0; max-width: 38rem; }
/* The gods' page shows all three moons. */
.page-gods .page-head .lunitari { width: clamp(2.4rem, 4vw, 3.6rem); right: 26%; top: 30%; rotate: 160deg; filter: sepia(1) saturate(5.5) hue-rotate(-28deg) brightness(0.95); }
.page-gods .page-head .nuitari-disc { width: clamp(1.6rem, 2.6vw, 2.4rem); right: 21%; top: 12%; }

/* ---- Buttons and the address ------------------------------------------------- */

.btn { display: inline-flex; align-items: center; gap: 0.6rem; font: 600 1rem var(--sans); text-decoration: none; padding: 0.85rem 1.6rem; border-radius: 999px; border: 0; cursor: pointer; }
.btn-primary { background: #f4f6fb; color: #0a0f1f; box-shadow: 0 0.6rem 2rem rgba(200, 210, 255, 0.16); }
.btn-primary:hover { background: #fff; }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid var(--line-strong); font-weight: 500;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-ghost code { font: 500 0.92rem var(--mono); background: none; border: 0; padding: 0; }
.btn .hint { color: var(--muted); font-size: 0.88rem; font-weight: 500; }

/* ---- Home below the sky ------------------------------------------------------ */

.band { max-width: var(--wide); margin: 0 auto; padding: 7rem var(--gutter) 0; }
.inside { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.inside h2 { margin-top: 0; font-size: clamp(2.4rem, 4.4vw, 3.6rem); line-height: 1.02; letter-spacing: -0.025em; font-variation-settings: "opsz" 60; }
.inside p { color: var(--muted); font-size: 1.12rem; max-width: 30rem; }
.window { background: linear-gradient(180deg, #0e1428, #0a0f1f); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 2.5rem 6rem rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.4); }
.window-bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); font: 500 0.78rem var(--mono); color: var(--muted); }
.window-bar i { width: 0.7rem; height: 0.7rem; border-radius: 50%; }
.window-bar i:nth-child(1) { background: var(--solinari); }
.window-bar i:nth-child(2) { background: var(--lunitari); }
.window-bar i:nth-child(3) { background: var(--night); box-shadow: inset 0 0 0 1px var(--nuitari); }
.window-bar span { margin-left: auto; }
.screen { margin: 0; border: 0; border-radius: 0; background: none; padding: 1.4rem 1.5rem 1.6rem; font: 400 0.72rem/1.75 var(--mono); color: #cdd4e4; white-space: pre; overflow-x: auto; scrollbar-width: none; }
.screen .room { color: #fff; font-weight: 600; }
.screen .exits { color: var(--exits); }
.screen .prompt { color: var(--faint); }
.screen .cmd { color: #fff; }
.caret { display: inline-block; width: 0.55em; height: 1.15em; vertical-align: text-bottom; background: #cdd4e4; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); border-top: 1px solid var(--line); margin-top: 7rem; padding-top: 3.2rem; }
.features h3 { margin: 0 0 0.6rem; font-size: 1.6rem; font-weight: 400; }
.features p { color: var(--muted); margin: 0; }

.home-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 5vw, 4.5rem); }
.home-split h2 { margin-top: 0; }
.wn-side { position: sticky; top: 6rem; align-self: start; }
.wn-head { font: 300 2.2rem/1.1 var(--serif); margin: 0 0 1.4rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; }
.wn-head span { font: 400 0.95rem var(--sans); color: var(--muted); }
.wn-month + .wn-month { margin-top: 4rem; }
.whats-new .hl, .whats-new .fixes { border-top: 1px solid var(--line); padding-top: 1.3rem; }
.whats-new .hl { padding-bottom: 1.5rem; }
.wn-older { margin: 3rem 0 0; color: var(--muted); }
.explore { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.explore a { display: block; padding: 1.3rem 0 1.4rem; border-top: 1px solid var(--line); text-decoration: none; }
.explore a:hover .explore-name { color: #fff; text-decoration: underline 1px var(--lunitari); text-underline-offset: 0.2em; }
.explore-name { display: block; font: 400 1.6rem/1.15 var(--serif); color: var(--text); letter-spacing: -0.012em; }
.explore-desc { display: block; color: var(--muted); font-size: 0.98rem; margin-top: 0.35rem; }

/* ---- News -------------------------------------------------------------------- */

.news-list { list-style: none; margin: 0; padding: 0; }
.news { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.5rem; padding: 1.3rem 0; border-top: 1px solid var(--line); }
.news time, .news .when { color: var(--muted); font-size: 0.94rem; padding-top: 0.12rem; font-variant-numeric: tabular-nums; }
.news-body { min-width: 0; }
h2.year { font-size: 2.2rem; margin: 3rem 0 0.4rem; }
.news-group:first-child h2.year { margin-top: 0.5rem; }
.group-sum { color: var(--muted); margin: 0 0 1.2rem; font-size: 0.98rem; }

/* A new place or feature: what it is, its title, its text. */
.hl { padding-bottom: 1.25rem; }
.hl + .hl, .hl + .fixes { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.hl-kind { font: 600 0.74rem var(--sans); letter-spacing: 0.09em; text-transform: uppercase; margin: 0 0 0.35rem; color: var(--muted); display: flex; gap: 0.7rem; align-items: center; }
.hl-kind::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--nuitari); }
.hl-place .hl-kind::before { background: var(--lunitari); }
.hl-kind time { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--faint); font-size: 0.86rem; margin-left: auto; padding: 0; }
.hl h3 { font-size: 1.7rem; line-height: 1.15; font-weight: 400; margin: 0 0 0.45rem; }
.hl h3 + p { margin: 0; }
.hl-see { margin: 0.7rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; font-weight: 500; }
.hl-see a::after { content: " \2192"; color: var(--lunitari); }

/* The smaller changes: a plain list, or folded under a month on the home page. */
.fixes ul { margin: 0; padding-left: 1.05em; }
.fixes li { margin: 0 0 0.35em; font-size: 0.95rem; line-height: 1.55; color: var(--muted); }
.fixes li::marker { color: var(--faint); }
.fixes-label { font: 600 0.74rem var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); margin: 0 0 0.5rem; }
.fixes summary { cursor: pointer; color: var(--muted); font-size: 0.95rem; width: fit-content; list-style: none; }
.fixes summary::-webkit-details-marker { display: none; }
.fixes summary::before { content: "+"; display: inline-block; width: 1.1rem; color: var(--faint); }
.fixes[open] summary::before { content: "\2013"; }
.fixes summary:hover { color: #fff; }
details.fixes ul { margin-top: 0.7rem; }

/* The News page's choice of what to show, at the top of the contents column. */
.page-toc .news-filter { border-left: 0; display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.8rem; }
.news-filter button { display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; width: 100%; font: 500 0.94rem var(--sans); color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 999px; padding: 0.42rem 0.95rem; cursor: pointer; text-align: left; }
.news-filter button span { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 0.86rem; }
.news-filter button:hover { color: #fff; border-color: var(--line-strong); }
.news-filter button[aria-pressed="true"] { color: #0a0f1f; background: var(--solinari); border-color: var(--solinari); }
.news-filter button[aria-pressed="true"] span { color: #4a5368; }
.news-group[hidden], .news[hidden], .news [hidden], .group-sum[hidden] { display: none; }

/* ---- Reading pages: contents beside the text --------------------------------- */

.page { max-width: var(--wide); margin: 0 auto; padding: 3.2rem var(--gutter) 0; display: grid; grid-template-columns: 14.5rem minmax(0, var(--measure)); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.page-single { grid-template-columns: minmax(0, var(--measure)); }
.page-body { min-width: 0; }
.page-toc { position: sticky; top: 5.6rem; max-height: calc(100svh - 7rem); overflow-y: auto; font-size: 0.94rem; padding-bottom: 1rem;
  scrollbar-width: none; }
.page-toc::-webkit-scrollbar { display: none; }
.page-toc p { color: var(--faint); font-size: 0.84rem; margin: 0 0 0.7rem; letter-spacing: 0.01em; }
.page-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.page-toc li a { display: block; padding: 0.28rem 0 0.28rem 1rem; margin-left: -1px; color: var(--muted); text-decoration: none; border-left: 1px solid transparent; line-height: 1.35; }
.page-toc li a:hover { color: #fff; border-left-color: var(--line-strong); }
.page-toc li a.current { color: #fff; border-left-color: var(--lunitari); }
.page-toc .group { margin-bottom: 1.2rem; }
.page-toc .group-name { display: flex; align-items: center; gap: 0.55rem; color: var(--text); text-decoration: none; margin-bottom: 0.4rem; font-weight: 500; }
.page-toc .group-name::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; flex: none; }
.group.solinari .group-name::before { background: var(--solinari); }
.group.lunitari .group-name::before { background: var(--lunitari); }
.group.nuitari .group-name::before { background: var(--night); box-shadow: inset 0 0 0 1.5px var(--nuitari); }
.group.chaos .group-name::before { background: conic-gradient(var(--solinari), var(--lunitari), var(--nuitari), var(--solinari)); }

.intro { font-size: 1.2rem; line-height: 1.6; color: var(--text); }
.intro p:last-child { margin-bottom: 0; }
.footnote { color: var(--muted); font-size: 0.95rem; }

/* ---- Help text, wherever it appears ------------------------------------------ */

.entry { padding: 0.2rem 0 0.8rem; scroll-margin-top: 5.5rem; }
.entry + .entry { border-top: 1px solid var(--line); }
.entry.flat { border: 0; padding: 0; }
.entry > h2, .entry > h3 { margin: 2rem 0 0.35rem; }
.entry .anchor { color: inherit; text-decoration: none; }
.entry .anchor:hover { text-decoration: underline 1px var(--lunitari); text-underline-offset: 0.12em; }
.entry:target > h2, .entry:target > h3 { text-decoration: underline 1px var(--lunitari); text-underline-offset: 0.15em; }
.aka { color: var(--faint); font-size: 0.92rem; margin: 0 0 0.9em; }
.text { overflow-wrap: break-word; color: #d3d8e3; }
.text ul { padding-left: 1.15em; margin: 0 0 1.05em; }
.text li { margin: 0.2em 0; }
.text li::marker { color: var(--faint); }
.see-also { color: var(--muted); font-size: 0.97rem; }
.see-also > span { color: var(--faint); margin-right: 0.35em; }

/* ---- Tables ------------------------------------------------------------------ */

.table-wrap { overflow-x: auto; margin: 1.4em 0 1.6em; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.015);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
table { border-collapse: collapse; width: 100%; font-size: 0.96rem; font-variant-numeric: tabular-nums; }
th, td { padding: 0.62rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: baseline; }
tbody tr:last-child > * { border-bottom: 0; }
thead th { color: var(--faint); font-weight: 500; font-size: 0.86rem; background: rgba(255, 255, 255, 0.02); }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.matrix thead th:not(:first-child), .matrix td { text-align: center; }
.matrix th, .matrix td { padding: 0.6rem 0.35rem; }
.matrix th:first-child { padding-left: 1rem; }
.matrix td:last-child { padding-right: 0.8rem; }
.matrix thead th { font-size: 0.8rem; white-space: nowrap; }
.matrix th[scope="row"] { white-space: nowrap; font-weight: 500; }
.matrix th[scope="row"] a { text-decoration: none; }
.matrix th[scope="row"] a:hover { text-decoration: underline 1px var(--lunitari); }
/* a full silver moon where the class is open to the race, an empty one where it isn't */
.matrix .yes, .matrix .no span { display: inline-block; width: 0.66rem; height: 0.66rem; border-radius: 50%; font-size: 0; vertical-align: middle; }
.matrix .yes { background: var(--solinari); box-shadow: 0 0 0.5rem rgba(238, 241, 248, 0.25); }
.matrix .no span { box-shadow: inset 0 0 0 1px var(--faint); opacity: 0.6; }
.zones td:last-child { white-space: nowrap; color: var(--muted); }

/* ---- Play -------------------------------------------------------------------- */

.steps { counter-reset: step; }
.step h2 { display: flex; align-items: baseline; gap: 0.9rem; }
.step h2::before { counter-increment: step; content: counter(step); font: 500 0.95rem var(--sans); color: var(--night); background: var(--solinari);
  width: 1.7rem; height: 1.7rem; border-radius: 50%; display: inline-grid; place-items: center; flex: none; translate: 0 -0.25rem; }
.step:first-child h2 { margin-top: 0; }
.clients { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.clients li { background: var(--night); padding: 1rem 1.15rem; }
.clients strong { display: block; color: #fff; font-weight: 600; margin-bottom: 0.15rem; }
.clients span { color: var(--muted); font-size: 0.94rem; }
.page-play .window { margin: 1.4rem 0; }

/* ---- Help -------------------------------------------------------------------- */

.help-layout { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 16rem minmax(0, var(--measure)); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.help-index { position: sticky; top: 4.25rem; max-height: calc(100svh - 4.25rem); overflow-y: auto; padding: 2.4rem 0.4rem 2rem 0;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
.help-entries { padding-top: 0.6rem; min-width: 0; }
.search input { width: 100%; font: 1rem var(--sans); color: #fff; background: var(--deep); border: 1px solid var(--line-strong); border-radius: 10px; padding: 0.7rem 0.9rem; }
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: 2px solid var(--solinari); outline-offset: 1px; }
#help-count { color: var(--faint); font-size: 0.9rem; min-height: 1.5em; margin: 0.6rem 0 0.3rem; font-variant-numeric: tabular-nums; }
.topics summary { cursor: pointer; color: var(--text); font-weight: 500; padding: 0.45rem 0; list-style: none; display: flex; align-items: baseline; }
.topics summary::-webkit-details-marker { display: none; }
.topics summary::after { content: "+"; color: var(--faint); }
.topics details[open] summary::after { content: "\2013"; }
.topics ul { list-style: none; margin: 0 0 0.8rem; padding: 0; font-size: 0.93rem; line-height: 1.35; }
.topics li a { display: block; padding: 0.22rem 0; color: var(--muted); text-decoration: none; }
.topics li a:hover { color: #fff; }
.count { color: var(--faint); font-weight: 400; font-size: 0.88em; font-variant-numeric: tabular-nums; margin-left: auto; margin-right: 0.8rem; }
.help-entries .entry > h3 { font-size: 1.7rem; }
.empty { color: var(--muted); }

/* ---- Who's online -------------------------------------------------------------- */

.who { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.who h2 { margin-top: 1.2rem; font-size: 1.7rem; }
.who ul { list-style: none; margin: 0; padding: 0; }
.who li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.who li.none { color: var(--faint); }

/* ---- Credits ------------------------------------------------------------------- */

.credits { list-style: none; margin: 0; padding: 0; }
.credits li { padding: 1.3rem 0; border-top: 1px solid var(--line); scroll-margin-top: 5.5rem; }
.credits .credit-title { color: #fff; font: 400 1.35rem/1.25 var(--serif); margin: 0 0 0.3rem; }
.credits p { margin: 0 0 0.25rem; color: var(--muted); font-size: 0.98rem; }

/* ---- Staff reference (web/staff.py): the manuals are Markdown ------------------ */

.staff-mark { display: flex; align-items: center; gap: 0.65rem; }
.staff-tag { font: 600 0.66rem var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--night);
  background: var(--lunitari); padding: 0.2rem 0.5rem; border-radius: 999px; text-decoration: none; }
.staff-tag:hover { background: #fff; }
.doc h2:first-child { margin-top: 0; }
.doc h4 { font: 600 1.02rem/1.35 var(--sans); color: #fff; margin: 1.8rem 0 0.5rem; }
.doc ol { padding-left: 1.4em; margin: 0 0 1.05em; }
.doc li > ul, .doc li > ol { margin: 0.2em 0; }
.doc blockquote { margin: 0 0 1.2em; padding: 0.15em 0 0.15em 1.1em; border-left: 2px solid var(--lunitari); color: var(--text); }
.doc blockquote p:last-child { margin-bottom: 0; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 2.6rem 0; }
.doc strong { color: #fff; font-weight: 600; }
.doc td code, .doc th code { white-space: nowrap; }

/* ---- Staff bug list (web/bugs.py), and the game's boards (web/boards.py) -------- */

.bug-bar, .board-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.bug-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.bug-tabs a { display: flex; align-items: baseline; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.85rem;
  color: var(--muted); text-decoration: none; font-size: 0.94rem; }
.bug-tabs a:hover { color: #fff; border-color: var(--line-strong); }
.bug-tabs a[aria-current] { color: #fff; border-color: var(--line-strong); background: rgba(255, 255, 255, 0.07); }
.bug-tabs .count { margin: 0 0 0 0.45rem; }
.bug-bar .btn, .board-bar .btn { padding: 0.65rem 1.3rem; font-size: 0.95rem; }
.bug-search { margin-bottom: 1.8rem; }
.bug-list, .board-list { list-style: none; margin: 0; padding: 0; }
.bug-row, .board-row { padding: 1rem 0 1.1rem; border-top: 1px solid var(--line); }
.bug-row > a, .board-row > a { display: block; font: 400 1.35rem/1.25 var(--serif); letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.bug-row > a:hover, .board-row > a:hover { color: #fff; text-decoration: underline 1px var(--lunitari); text-underline-offset: 0.18em; }
.bug-num, .board-num { color: var(--faint); font: 400 0.92rem var(--sans); font-variant-numeric: tabular-nums; margin-right: 0.5rem; }
.feedback-said { margin: 0; font-size: 1.05rem; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.bug-meta, .board-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 1rem; margin: 0.4rem 0 0; color: var(--muted); font-size: 0.92rem; }
.bug-meta strong, .board-meta strong, .comment-head strong, .page-lede strong, .form-end strong { color: var(--text); font-weight: 600; }
.bug-status { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text); font-weight: 500; white-space: nowrap; }
.bug-status::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; flex: none; }
.bug-status.open::before { background: var(--lunitari); box-shadow: 0 0 0.5rem rgba(226, 96, 74, 0.5); }
.bug-status.fixed::before { background: var(--exits); }
.bug-status.closed::before { box-shadow: inset 0 0 0 1.5px var(--faint); }
.page-lede .bug-status { margin-right: 0.6rem; }
.bug-back, .board-back { margin: 0 0 1.6rem; font-size: 0.94rem; }
.bug-back a, .board-back a { color: var(--muted); text-decoration: none; }
.bug-back a::before, .board-back a::before { content: "\2190\00a0"; }
.bug-back a:hover, .board-back a:hover { color: #fff; }

/* What people wrote: line breaks kept, pasted game output in the game's font */
.said { overflow-wrap: anywhere; color: #d3d8e3; }
.said p { white-space: pre-wrap; }
.said pre { white-space: pre; overflow-wrap: normal; }
.comments { list-style: none; margin: 0; padding: 0; }
.comment { padding: 1.1rem 0 0.3rem; border-top: 1px solid var(--line); scroll-margin-top: 5.5rem; }
.comment-head { display: flex; flex-wrap: wrap; gap: 0 0.8rem; align-items: baseline; margin: 0 0 0.5rem; color: var(--muted); font-size: 0.92rem; }
.comment-head a { color: inherit; text-decoration: none; }
.comment-head a:hover { color: #fff; }
.comment-status { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.94rem; }
.comment-status .bug-status { margin-left: 0.3rem; }
.comment:target .comment-head strong { text-decoration: underline 1px var(--lunitari); text-underline-offset: 0.2em; }

.bug-form, .board-form { margin-top: 2.6rem; scroll-margin-top: 5.5rem; }
.field { display: block; margin: 0 0 1.3rem; }
.field > span { display: block; color: #fff; font-weight: 500; margin-bottom: 0.45rem; }
.field > .field-hint { color: var(--muted); font-weight: 400; font-size: 0.93rem; margin-top: -0.2rem; }
.field input, .field textarea, .field select { width: 100%; font: 1rem/1.55 var(--sans); color: #fff; background: var(--deep);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 0.7rem 0.9rem; }
.field textarea { resize: vertical; min-height: 7.5rem; }
.field select { width: auto; max-width: 100%; padding-right: 2rem; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--solinari); outline-offset: 1px; }
.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; margin: 0.4rem 0 0; }
.form-end .btn { padding: 0.75rem 1.5rem; }
.form-end .note { color: var(--muted); font-size: 0.94rem; }
.form-error { color: #ffc4b8; background: rgba(226, 96, 74, 0.1); border: 1px solid rgba(226, 96, 74, 0.5); border-radius: 10px; padding: 0.7rem 0.95rem; }
.form-done { color: #d3efea; background: rgba(127, 209, 195, 0.07); border: 1px solid rgba(127, 209, 195, 0.4); border-radius: 10px; padding: 0.7rem 0.95rem; }
.form-done .btn { margin-top: 0.7rem; padding: 0.55rem 1.1rem; }

/* ---- Staff logins (web/bugs.py): the login page, your login, and Logins -------- */

.page-login .staff-mark + .online { margin-left: auto; }
/* The staff masthead has ten links, so they sit closer than the public site's five,
   and take a row of their own sooner (as the public site's do under 62rem). */
@media (min-width: 78.01rem) {
  .page-staff .masthead-inner { gap: 1.6rem; }
  .page-staff .masthead nav { gap: 1.15rem; }
}
@media (max-width: 78rem) {
  .page-staff .masthead-inner { flex-wrap: wrap; height: auto; padding-top: 0.8rem; gap: 0.6rem 1rem; }
  .page-staff .masthead nav { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0.1rem var(--gutter) 0.6rem;
    overflow-x: auto; scrollbar-width: none; gap: 1.4rem; }
  .page-staff .masthead nav::-webkit-scrollbar { display: none; }
  .page-staff .online { margin-left: auto; }
}
.page-staff .online[aria-current="page"] { color: #fff; box-shadow: inset 0 -1px 0 var(--lunitari); padding: 0.3rem 0; }
.login-form { max-width: 28rem; }
.page-login .login-form { margin-top: 0; }
.page-account .page-body > h2:first-child, .page-account .form-done + h2 { margin-top: 0; }
.field-check { display: flex; gap: 0.65rem; align-items: baseline; margin: 0 0 1.3rem; color: var(--text); }
.field-check input { accent-color: var(--solinari); width: 1rem; height: 1rem; translate: 0 0.12rem; }
.login-list { list-style: none; margin: 0 0 3rem; padding: 0; }
.login-row { padding: 1rem 0 1.1rem; border-top: 1px solid var(--line); }
.login-name { display: flex; align-items: center; gap: 0.7rem; margin: 0; font: 400 1.35rem/1.25 var(--serif); color: #fff; }
.login-admin { font: 600 0.66rem var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--text);
  border: 1px solid var(--line-strong); padding: 0.15rem 0.5rem; border-radius: 999px; }
.login-you { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.94rem; }
.login-change { margin-top: 0.5rem; }
.login-change summary { cursor: pointer; color: var(--muted); font-size: 0.94rem; width: fit-content; }
.login-change summary:hover { color: #fff; }
.login-change[open] summary { margin-bottom: 0.4rem; }
.login-inline { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.5rem 0 0; }
.login-inline input { flex: 1 1 16rem; max-width: 26rem; font: 0.95rem/1.5 var(--sans); color: #fff; background: var(--deep);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 0.5rem 0.8rem; }
.login-inline input:focus { outline: 2px solid var(--solinari); outline-offset: 1px; }
.login-inline .btn, .login-out .btn { padding: 0.55rem 1.1rem; font-size: 0.93rem; }

/* Posts and messages of the day are the game's own text, 80 letters wide: the
   column is widened to fit a line of them, in the game's font. */
.page-boards .page-single { grid-template-columns: minmax(0, 48rem); }
.board-heading { margin: 2.8rem 0 0.8rem; }
.board-heading:first-child { margin-top: 0; }
.board-type { color: var(--text); font-weight: 500; }
.board-meta a { color: inherit; }
.board-meta a:hover { color: #fff; }
.board-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.board-note { color: var(--muted); }
.board-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.6rem 0 0; }
.board-actions .btn { padding: 0.65rem 1.3rem; font-size: 0.95rem; }
.field textarea.game-text { font: 0.86rem/1.6 var(--mono); }
.pager { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin: 1.8rem 0 0; font-size: 0.94rem; }

/* ---- Staff Players page (web/bugs.py, from web/players.py) ----------------------- */

.page-players .page-single { grid-template-columns: minmax(0, 54rem); }
.page-players .page-body > h2:first-child { margin-top: 0; }
.page-players .table-wrap { margin: 1rem 0 0.7rem; }
.stats th, .stats td { padding-left: 0.75rem; padding-right: 0.75rem; }
.stats th[scope="row"] { font-weight: 500; white-space: nowrap; }
.stats .num { text-align: right; white-space: nowrap; }
.stats .all { color: #fff; font-weight: 600; }
.stats .zero { color: var(--faint); }
.stats .pct { display: inline-block; min-width: 2.5rem; color: var(--faint); font-size: 0.82rem; font-weight: 400; }
.stats .all .pct { display: block; min-width: 0; font-size: 0.78rem; }
.stats tr.change td { color: var(--text); font-size: 0.88rem; padding: 0.4rem 1rem; background: rgba(226, 96, 74, 0.06); }
.stats tr.change td::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 0.55rem;
  background: var(--lunitari); box-shadow: 0 0 0.5rem rgba(226, 96, 74, 0.5); }
/* a dot by a new character on in the last 7 days */
.stats tr.on th::after { content: ""; display: inline-block; width: 0.45rem; height: 0.45rem; border-radius: 50%; margin-left: 0.5rem;
  vertical-align: 0.1em; background: var(--exits); }
.stats .tag { font: 600 0.62rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line-strong); padding: 0.1rem 0.4rem; border-radius: 999px; margin-left: 0.4rem; }

/* ---- Maps (web/maps.py draws them; colours are written into each SVG) ---------- */

.maps { max-width: var(--wide); margin: 0 auto; padding: 3.2rem var(--gutter) 0; }
.maps > .intro { max-width: var(--measure); }
.map-jump ul { list-style: none; margin: 1.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.map-jump a { display: block; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.9rem; color: var(--muted); text-decoration: none; font-size: 0.94rem; }
.map-jump a:hover { color: #fff; border-color: var(--line-strong); }
.map-key { list-style: none; margin: 0.8rem 0 0; padding: 0.8rem 1.2rem; display: flex; flex-wrap: wrap; gap: 0.7rem 1.6rem;
  border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 0.9rem; }
.map-key li { display: flex; align-items: center; gap: 0.5rem; }
.map-key svg { width: 1.1rem; height: 1.1rem; flex: none; font-family: var(--sans); }
.city { scroll-margin-top: 5.5rem; }
.city > p { max-width: var(--measure); color: #d3d8e3; }
.city .anchor { color: inherit; text-decoration: none; }
.city .anchor:hover { text-decoration: underline 1px var(--lunitari); text-underline-offset: 0.12em; }
.map-panels { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.5rem; margin-top: 1.6rem; }
.map-panel { margin: 0; min-width: 0; }
.map-panel figcaption { font: italic 300 1.15rem var(--serif); color: var(--muted); margin-bottom: 0.5rem; }
.map-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--deep);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
.map { display: block; width: 100%; height: auto; }
.map [data-room] { cursor: pointer; }
.map [data-room]:hover, .map [data-room].picked { stroke: #fff; }
.map .place.lit circle, .map circle.place.lit, .map .place.lit rect, .map rect.place.lit { stroke: #fff; stroke-width: 2.5; }
.room-name { min-height: 1.6em; margin: 0.6rem 0 0; color: var(--muted); font-size: 0.92rem; }
.legend { columns: 3 15rem; column-gap: 2.5rem; margin-top: 1.2rem; }
.legend-group { break-inside: avoid; margin-bottom: 1.2rem; }
.legend h4 { font: 600 0.8rem var(--sans); color: var(--faint); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.5rem; }
.legend ul { list-style: none; margin: 0; padding: 0; }
.legend li { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.22rem 0; font-size: 0.94rem; color: #d3d8e3; }
.legend li strong { font-weight: 600; color: #fff; }
.legend .does { display: block; color: var(--muted); font-size: 0.88rem; }
.pin { flex: none; display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; color: var(--night);
  font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums; translate: 0 0.2rem; }
.pin.rest { background: #eef1f8; }
.pin.shop { background: #e8b04a; }
.pin.train { background: #e2604a; }
.pin.board { background: #a99ce0; }
.pin.stair { background: #7fd1c3; border-radius: 4px; }

/* ---- A zone's own page (web/zones.py): a painting across the top, a rough map --- */

.zone-head { position: relative; overflow: hidden; isolation: isolate; height: clamp(19rem, 48vh, 30rem); background: var(--deep); }
.zone-picture { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.zone-head::after { content: ""; position: absolute; inset: 0; z-index: -1;  /* the picture darkens into the page, under the title */
  background: linear-gradient(to top, var(--night) 0%, rgba(5, 7, 15, 0.6) 26%, rgba(5, 7, 15, 0.08) 60%, rgba(5, 7, 15, 0.25) 100%); }
.zone-head h1 { text-shadow: 0 0.1em 1.2em rgba(5, 7, 15, 0.9); }
.zone-head .page-lede { color: rgba(232, 235, 243, 0.9); text-shadow: 0 0 1em rgba(5, 7, 15, 0.9); }
.zone-head .sky-credit { top: 0.8rem; bottom: auto; color: rgba(232, 235, 243, 0.6); text-shadow: 0 0 0.6em rgba(5, 7, 15, 0.9); }
.zone-facts { display: flex; flex-wrap: wrap; gap: 1.1rem 2.6rem; margin: 0 0 2.2rem; padding: 0 0 1.6rem; border-bottom: 1px solid var(--line); }
.zone-facts dt { color: var(--faint); font-size: 0.84rem; margin-bottom: 0.15rem; }
.zone-facts dd { margin: 0; color: var(--text); }
.zone-about p:first-child { font-size: 1.2rem; line-height: 1.6; color: var(--text); }
.zone-map { margin: 1.4rem 0 0; }
.zone-where { margin: 1.4rem 0 1.8rem; max-width: 22rem; }
.zone-where > a { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.zone-where figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.9rem; }

/* ---- The map of Ansalon (web/atlas.py draws it; site.js fills the card) ---------- */

.atlas { scroll-margin-top: 5.5rem; }
.atlas > h2 { margin-top: 0; }
.atlas > p { max-width: var(--measure); color: #d3d8e3; }
.atlas-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 1.4rem 0 0; color: var(--muted); font-size: 0.94rem; }
.atlas-tools label { color: var(--text); }
.atlas-tools input[type="range"] { flex: 0 1 16rem; min-width: 9rem; accent-color: var(--lunitari); }
.atlas-tools output { min-width: 11rem; font-variant-numeric: tabular-nums; }
.atlas-tools button { border: 1px solid var(--line-strong); border-radius: 999px; background: none; color: var(--text); font: inherit; padding: 0.25rem 0.9rem; cursor: pointer; }
.atlas-tools button:hover { border-color: var(--muted); }
.atlas-frame { position: relative; margin-top: 1rem; }
.atlas-map a { cursor: pointer; outline: none; }
.atlas-map a:hover .atlas-shape, .atlas-map a:focus-visible .atlas-shape, .atlas-map a.picked .atlas-shape { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 1px #fff); }
.atlas-map a:hover .atlas-line, .atlas-map a:focus-visible .atlas-line, .atlas-map a.picked .atlas-line { stroke-width: 3.4; filter: drop-shadow(0 0 2px #fff); }
.atlas-map a, .atlas-map [data-trail] { transition: opacity 0.2s ease; }
.atlas.leveled .atlas-map a:not(.fits) { opacity: 0.16; }
.atlas.leveled .atlas-trails { opacity: 0.3; }
.atlas.leveled .atlas-list li:not(.fits) { opacity: 0.45; }
.atlas-card { position: absolute; top: 0.9rem; left: 0.9rem; width: min(17rem, 22.5%); max-height: calc(100% - 1.8rem); overflow-y: auto; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(8, 12, 26, 0.9); backdrop-filter: blur(6px); font-size: 0.84rem; line-height: 1.45; color: #d3d8e3; }
.atlas-card.filled { border-color: var(--line-strong); }
.atlas-card p { margin: 0.45rem 0 0; }
.atlas-card h4, .atlas-list h4 { margin: 0; font: 500 1.25rem/1.2 var(--serif); color: #fff; }
.atlas-hint { margin: 0 !important; color: var(--muted); }
.atlas-facts { color: var(--exits); }
.atlas-lede { color: var(--text); }
.atlas-more a { color: #fff; }
.atlas-list { margin-top: 1.4rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.atlas-list summary { padding: 0.9rem 0; cursor: pointer; color: var(--text); font-weight: 500; }
.atlas-list summary:hover { color: #fff; }
.atlas-regions { columns: 3 17rem; column-gap: 2.5rem; padding: 0.4rem 0 1.4rem; }
.atlas-regions section { break-inside: avoid-column; }
.atlas-regions h3 { font: 600 0.8rem var(--sans); color: var(--faint); letter-spacing: 0.08em; text-transform: uppercase; margin: 1rem 0 0.6rem; }
.atlas-regions ul { list-style: none; margin: 0; padding: 0; }
.atlas-regions li { break-inside: avoid; padding: 0.55rem 0; border-top: 1px solid var(--line); font-size: 0.9rem; line-height: 1.45; color: #c3c9d6; scroll-margin-top: 6rem; }
.atlas-regions li p { margin: 0.25rem 0 0; }
.atlas-regions li h4 { font-size: 1.08rem; }
.atlas-regions li:target h4 { color: var(--lunitari); }
@media (max-width: 75rem) {
  .atlas-card { position: static; width: auto; max-height: none; margin-top: 0.8rem; min-height: 5.5rem; font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) { .atlas-map a, .atlas-map [data-trail] { transition: none; } }
.zone-help { margin: 0; padding: 0.1rem 0 0.1rem 1.3rem; border-left: 1px solid var(--line-strong); }
.zone-help p:last-child { margin-bottom: 0; }
.zone-help + .footnote { margin-top: 0.9rem; }
.page-body > .window { margin: 0.6rem 0 0; }
.zone-back { margin: 3rem 0 0; }
.zone-more { margin: -0.3em 0 1em; color: var(--muted); }

/* The World page's pictures of the zones that have a page of their own. */
.places { margin: 0 0 2.6rem; }
.places h2 { margin-top: 0; }
.places ul { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.place { position: relative; display: flex; align-items: flex-end; min-height: 13rem; border-radius: 6px; overflow: hidden; background: var(--deep); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.place img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.place::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 7, 15, 0.94) 0%, rgba(5, 7, 15, 0.62) 42%, rgba(5, 7, 15, 0.05) 78%); }
.place-text { position: relative; z-index: 1; padding: 1rem 1.1rem; }
.place-name { display: block; font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; }
.place-lede { display: block; margin-top: 0.3rem; color: #c3c9d6; font-size: 0.9rem; line-height: 1.45; }
.place:hover, .place:focus-visible { border-color: var(--line-strong); }
.place:hover img, .place:focus-visible img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .place img { transition: none; } }
.zone-city { padding-top: 0; scroll-margin-top: 5.5rem; }
.zone-city > p { max-width: var(--measure); color: #d3d8e3; }
.zone-after { padding-top: 0; }

/* ---- Footer -------------------------------------------------------------------- */

.colophon { max-width: var(--wide); margin: 7rem auto 0; padding: 2.4rem var(--gutter) 3rem; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; color: var(--muted); font-size: 0.92rem; }
.colophon p { margin: 0 0 0.35rem; }
.colophon code { background: none; border: 0; padding: 0; color: var(--text); }
.colophon nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; align-content: start; justify-content: flex-end; }
.colophon nav a { text-decoration: none; color: var(--muted); }
.colophon nav a:hover { color: #fff; }

/* ---- Play now: the game in the browser (web/play.js) ---------------------------- */

/* The game fills the window under the masthead; play.js sets --term-height to what
   is really visible, which on a phone with its keyboard up is much less. */
.term { --term-size: 0.875rem; height: var(--term-height, calc(100dvh - 4.25rem)); min-height: 220px; max-width: 66rem; margin: 0 auto;
  padding: 1.1rem var(--gutter) 1.3rem; display: flex; }
.term-window { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.term-bar { flex: none; padding: 0.55rem 0.7rem 0.55rem 1rem; min-height: 2.9rem; }
.term-bar span { margin-left: 0; }
.term-bar .term-state { margin-left: 0.5rem; }
.term.live .term-state { color: var(--exits); }
.term-bar .term-tools { margin-left: auto; display: flex; gap: 0.3rem; }
.term-bar button { font: 500 0.78rem var(--mono); color: var(--muted); background: none; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.3rem 0.7rem; cursor: pointer; }
.term-bar button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.term-bar .term-again { color: #0a0f1f; background: #f4f6fb; border-color: transparent; font-weight: 600; }
.term-bar .term-again:hover { color: #0a0f1f; background: #fff; }
.term-body { flex: 1; min-height: 0; display: flex; }
.term-view { position: relative; flex: 1; min-width: 0; min-height: 0; }
.term-out { position: absolute; inset: 0; overflow: hidden auto; overscroll-behavior: contain; padding: 1rem 1.2rem; font: 400 var(--term-size)/1.5 var(--mono);
  font-variant-ligatures: none; color: #cdd4e4; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-width: thin; scrollbar-gutter: stable; scrollbar-color: var(--line-strong) transparent; }
.term-out:focus-visible { outline-offset: -2px; }
/* A line of the game's text. play.js gives the ones laid out in columns that don't fit a smaller size. */
.ln { min-height: 1.5em; }
.term-typed { color: #fff; }
.term-note { color: var(--muted); font-style: italic; }
.term-start { position: absolute; inset: 0; overflow-y: auto; display: grid; align-content: center; justify-items: center; text-align: center; padding: 1.5rem; }
.term-start h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.term-start p { max-width: 30rem; margin: 1rem 0 0; }
.term-start .btn { margin: 0.6rem 0 0.4rem; }
.term-more { position: absolute; right: 1.1rem; bottom: 0.8rem; font: 600 0.82rem var(--sans); color: #0a0f1f; background: #f4f6fb; border: 0; border-radius: 999px;
  padding: 0.45rem 0.95rem; cursor: pointer; box-shadow: 0 0.4rem 1.4rem rgba(0, 0, 0, 0.5); }
.term-start[hidden], .term-more[hidden], .term-again[hidden] { display: none; }
.term-input { flex: none; display: flex; gap: 0.45rem; padding: 0.6rem 0.7rem; border-top: 1px solid var(--line); }
/* 1rem (16px) or more: phones zoom the page in on a smaller input. */
.term-input input { flex: 1; min-width: 0; font: 400 1rem/1.4 var(--mono); color: #fff; background: rgba(5, 7, 15, 0.7); border: 1px solid var(--line-strong);
  border-radius: 9px; padding: 0.6rem 0.8rem; }
.term-input input::placeholder { color: var(--faint); }
.term-input input:focus-visible { outline-offset: 0; border-color: transparent; }
/* The history and Send buttons are for touch: a keyboard has arrows and Enter. */
.term-key { display: none; flex: none; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.7rem;
  font: 600 0.9rem var(--sans); color: var(--text); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-strong); border-radius: 9px; cursor: pointer; }
.term-send { color: #0a0f1f; background: #f4f6fb; border-color: transparent; }
@media (pointer: coarse) {
  .term-key { display: inline-flex; }
}
/* Beside the text, once the game sends GMCP (play.js): the room and its exits, bars for
   hit points, movement and experience, the opponent while fighting, the map, and the channels. A column
   on the right of a wide screen; a strip above the text on a small one. */
.term.hud { max-width: 80rem; }
.term-side { flex: none; width: 17.5rem; display: flex; flex-direction: column; gap: 0.9rem; padding: 1rem 1rem 0.8rem; border-left: 1px solid var(--line);
  font: 400 0.82rem/1.4 var(--sans); color: var(--muted); min-height: 0; }
.term-side[hidden], .hud-foe[hidden] { display: none; }
.hud-room { margin: 0; display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.hud-room b { font: 500 1.05rem/1.25 var(--serif); color: #fff; overflow-wrap: anywhere; }
.hud-room span { font-size: 0.78rem; color: var(--exits); }
.hud-bars { display: grid; gap: 0.6rem; }
.hud-bar { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0.25rem 0.6rem; min-width: 0; }
.hud-label { font: 600 0.68rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-num { font: 500 0.78rem var(--mono); color: var(--text); text-align: right; white-space: nowrap; }
.hud-track { grid-column: 1 / -1; display: block; height: 0.4rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.hud-track i { display: block; height: 100%; width: 0; border-radius: inherit; background: #7fc98a; transition: width 0.3s ease; }
.hud-hp.low i { background: #d9b55f; }
.hud-hp.lower i, .hud-foe i { background: var(--lunitari); }
.hud-mv i { background: var(--exits); }
.hud-xp i { background: var(--nuitari); }
.hud-foe { padding-top: 0.8rem; border-top: 1px solid var(--line); }
.hud-foe .hud-foe { padding-top: 0; border-top: 0; }  /* its bar has the same class */
.hud-next { padding-top: 0.8rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.hud-next[hidden], .hud-next-go[hidden] { display: none; }
.hud-next p { margin: 0; font-size: 0.86rem; line-height: 1.45; color: var(--text); }
.hud-next b { display: block; font: 600 0.68rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--exits); margin-bottom: 0.15rem; }
.hud-next-go { font: 600 0.82rem var(--sans); color: #0a0f1f; background: #f4f6fb; border: 0; border-radius: 999px; padding: 0.4rem 0.9rem; cursor: pointer; }
.hud-next-go:hover { background: #fff; }
.hud-foe .hud-label { letter-spacing: 0; text-transform: none; font-size: 0.82rem; color: #fff; }
/* A window 80rem wide or more (play.js sets .wide, and moves the panel's parts into
   cards): the game takes the whole window and the site's masthead gives way to the
   game's own bar. The character's cards are a column on the left, the world's one on the
   right, and between them one card holds the room's name, the text, the buttons and the
   input. The window is a grid so that the middle card's parts line up under each other. */
.term-char, .term-world, .term-card, .term-roomhead, .term-home, .hud-head, .hud-stats[hidden] { display: none; }
body:has(.term.wide) .masthead { display: none; }
.term.wide { max-width: 120rem; padding: 0 0.75rem 0.75rem; }
.term.wide .term-window { display: grid; grid-template-columns: 18rem minmax(0, 1fr) 20rem; grid-template-rows: auto auto minmax(0, 1fr) auto auto auto auto;
  column-gap: 0.75rem; background: none; border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
.term.wide .term-body { display: contents; }
.term.wide .term-bar { grid-area: 1 / 1 / 2 / 4; padding: 0.6rem 0.25rem; margin-bottom: 0.75rem; }
.term.wide .term-bar > i { display: none; }
.term.wide .term-home { display: inline; font: 400 1.25rem/1 var(--serif); color: #fff; text-decoration: none; letter-spacing: -0.01em; }
.term.wide .term-bar .term-state { margin-left: 1rem; }
.term.wide .term-char, .term.wide .term-world { grid-row: 2 / 8; display: flex; flex-direction: column; gap: 0.75rem; min-height: 0; overflow: hidden auto;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; font: 400 0.82rem/1.4 var(--sans); color: var(--muted); }
.term.wide .term-char { grid-column: 1; }
.term.wide .term-world { grid-column: 3; }
.term.wide .term-side { display: none; }
.term.wide .term-card { display: block; grid-area: 2 / 2 / 8 / 3; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; }
.term.wide .term-roomhead, .term.wide .term-view, .term.wide .term-quick, .term.wide .term-input { grid-column: 2; position: relative; }
.term.wide .term-roomhead { display: block; grid-row: 2; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--line); }
.term.wide .term-roomhead .hud-room { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }
.term.wide .term-roomhead .hud-room b { font-size: 1.2rem; }
.term.wide .term-roomhead .hud-room span { font-size: 0.82rem; }
.term.wide .term-view { grid-row: 3; }
.term.wide [data-play-can] { grid-row: 4; }
.term.wide [data-play-hints] { grid-row: 5; }
.term.wide [data-play-quick] { grid-row: 6; }
.term.wide .term-input { grid-row: 7; }
.term.wide .term-send { display: inline-flex; }
.hud-card { flex: none; display: flex; flex-direction: column; gap: 0.75rem; padding: 0.9rem 1rem; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; }
.hud-card-grow { flex: 1 0 auto; min-height: 9rem; }
.term-world .hud-card-grow { flex: 1 1 9rem; min-height: 9rem; }
.hud-card-next:has(.hud-next[hidden]), .hud-card-next:not(:has(.hud-next)) { display: none; }
.term.wide .hud-head { display: block; margin: 0; font: 600 0.68rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.term.wide .hud-label[data-long] { font-size: 0; }
.term.wide .hud-label[data-long]::before { content: attr(data-long); font-size: 0.68rem; }
.hud-slot { display: flex; flex-direction: column; gap: 0.75rem; min-height: 0; }
.hud-slot:empty { display: none; }
.hud-slot .hud-pane { flex: none; color: #cdd4e4; }
.hud-slot .hud-pane[hidden] { display: flex; }
.hud-slot .hud-foe, .hud-slot .hud-next, .hud-slot .hud-map { padding-top: 0; border-top: 0; }
.hud-slot .hud-map { height: min(11rem, 22vh); }
.hud-slot .hud-here { max-height: 9rem; }
.hud-slot[data-play-slot="chat"], .hud-slot[data-play-slot="chat"] .hud-pane { flex: 1; min-height: 0; }
.term-char .hud-tabs { margin-bottom: 0; padding-bottom: 0; border-bottom: 1px solid var(--line); }
.term-char .hud-tabs button { padding-bottom: 0.5rem; margin-bottom: -1px; }
.term-char .hud-tabs button[aria-pressed="true"] { color: #fff; border-bottom-color: var(--exits); }
.term-char .hud-sub:first-child { display: none; }
.term-char[data-show="carried"] :is(.hud-part-worn, [data-play-slot="group"]),
.term-char[data-show="worn"] :is(.hud-part-carried, [data-play-slot="group"]),
.term-char[data-show="group"] [data-play-slot="items"] { display: none; }
/* The abilities, the armor and the coins, as SCORE gives them (Char.Stats). */
.hud-stats { padding-top: 0.75rem; border-top: 1px solid var(--line); }
.hud-stats dl { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.4rem; margin: 0 0 0.6rem; text-align: center; }
.hud-stats dt { font: 600 0.62rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hud-stats dd { margin: 0; font: 500 0.95rem var(--mono); color: #fff; }
.hud-stats p { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.2rem 0.75rem; }
.hud-stats b { font: 500 0.82rem var(--mono); color: #fff; }
/* A short window: the panel scrolls, and the channels keep a few lines. */
@media (min-width: 62.01rem) {
  .term-side { overflow: hidden auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
  .term-side .hud-chat { min-height: 9rem; }
}
/* The exits of the room, as buttons: a tap walks that way. */
.hud-exits { display: flex; flex-wrap: wrap; gap: 0.3rem; min-height: 1.85rem; align-items: center; }
.hud-exits:empty::before { content: "No way out that you can see."; color: var(--faint); font-style: italic; }
.hud-exit { flex: 1 0 auto; min-width: 2.2rem; max-width: 4.5rem; padding: 0.3rem 0.4rem; font: 600 0.72rem var(--mono); color: var(--text);
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-strong); border-radius: 7px; cursor: pointer; }
.hud-exit:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
/* The map play.js draws of the rooms walked through; a click on a room walks there. */
.hud-map { position: relative; flex: none; height: min(14rem, 28vh); padding-top: 0.8rem; border-top: 1px solid var(--line); }
.hud-map canvas { display: block; width: 100%; height: 100%; border-radius: 8px; background: rgba(5, 7, 15, 0.55); cursor: pointer; touch-action: none; }
.hud-map-name { position: absolute; left: 0.5rem; right: 0.5rem; bottom: 0.35rem; margin: 0; font-size: 0.72rem; color: #fff; text-shadow: 0 0 4px #05070f, 0 0 4px #05070f;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.hud-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 0.8rem; border-top: 1px solid var(--line); }
/* Its tabs: the channels, who and what is here, the group, and what is affecting the character. */
.hud-tabs { flex: none; display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; margin-bottom: 0.5rem; }
.hud-tabs button { font: 600 0.68rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); background: none; border: 0;
  border-bottom: 2px solid transparent; padding: 0 0 0.2rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem; }
.hud-tabs button:hover { color: var(--text); }
.hud-tabs button[aria-selected="true"] { color: #fff; border-bottom-color: var(--exits); }
.hud-tabs b { font: 600 0.62rem var(--mono); letter-spacing: 0; color: var(--muted); }
.hud-tabs b[hidden], .hud-pane[hidden], .hud-bar[hidden] { display: none; }
.hud-tabs [data-play-count="chat"] { color: #0a0f1f; background: var(--exits); border-radius: 999px; padding: 0 0.35rem; }
.hud-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hud-list { overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; gap: 0.3rem; color: #cdd4e4; }
.hud-here:empty::before { content: "Nobody and nothing here that you can see."; color: var(--faint); font-style: italic; }
.hud-group:empty::before { content: "You are not in a group."; color: var(--faint); font-style: italic; }
.hud-affects:empty::before { content: "Nothing is affecting you."; color: var(--faint); font-style: italic; }
.hud-part { display: flex; flex-direction: column; gap: 0.3rem; }
/* What is worn, as a figure (play.js figure()): only in a wide window's card, where
   it takes the list's place. A spot is lit where something is worn. */
.hud-doll, .hud-doll-info { display: none; }
.term-char .hud-part-worn > :not(.hud-doll, .hud-doll-info) { display: none; }
.term-char .hud-doll { display: block; position: relative; width: 100%; max-width: 13.5rem; aspect-ratio: 256 / 300; margin: 0 auto; }
.hud-doll svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hud-spot { position: absolute; width: 1.25rem; height: 1.25rem; margin: -0.625rem 0 0 -0.625rem; padding: 0; border-radius: 50%; cursor: pointer;
  background: rgba(5, 7, 15, 0.75); border: 1.5px dashed rgba(255, 255, 255, 0.55); }
.hud-spot.on { background: var(--exits); border: 2px solid var(--deep); box-shadow: 0 0 0 1.5px var(--exits); }
.hud-spot:hover, .hud-spot.shown { outline: 2px solid #fff; outline-offset: 2px; }
.hud-spot[aria-pressed="true"] { outline: 2px solid var(--solinari); outline-offset: 2px; }
.term-char .hud-doll-info { display: flex; flex-direction: column; gap: 0.3rem; min-height: 6rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.hud-doll-info p { margin: 0; }
.hud-doll-info .hud-where { font-size: 0.72rem; color: var(--muted); }
.hud-doll-name { font-size: 0.92rem; color: #fff; }
.hud-doll-acts { flex-wrap: wrap; margin-top: 0.2rem; }
.hud-doll-acts button { padding: 0.2rem 0.6rem; text-align: left; }
.hud-part-carried:empty::before { content: "You carry nothing."; color: var(--faint); font-style: italic; }
/* In the list of items: "Worn" and "Carried" over their rows, and where a thing is worn before its name. */
.hud-sub { margin: 0.35rem 0 0; font-size: 0.72rem; color: var(--muted); }
.hud-sub:first-child { margin-top: 0; }
.hud-row:has(.hud-where) { flex-wrap: wrap; row-gap: 0; }
.hud-row .hud-where { flex: 1 0 100%; font-size: 0.72rem; color: var(--muted); }
.hud-row { margin: 0; display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.hud-row-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hud-row.npc .hud-row-name { color: #f6d983; }
.hud-row.fighting .hud-row-name::after { content: " (fighting)"; color: var(--lunitari); }
.hud-row.away { opacity: 0.55; }
.hud-row .hud-num { flex: none; color: var(--muted); }
.hud-acts { flex: none; display: flex; gap: 0.25rem; }
.hud-acts button { font: 500 0.68rem var(--sans); color: var(--muted); background: none; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.1rem 0.5rem; cursor: pointer; }
.hud-acts button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.hud-member { display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 0.5rem; align-items: baseline; }
.hud-member.away { opacity: 0.55; }
.hud-member .hud-num { color: var(--muted); }
.hud-member.low .hud-track i { background: #d9b55f; }
.hud-member.lower .hud-track i { background: var(--lunitari); }
/* A shut door among the exits: the button opens it. */
.hud-exit.hud-door { border-style: dashed; color: var(--muted); }
.hud-mp i { background: #b98ad6; }
.hud-chat-log { flex: 1; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  font: 400 0.76rem/1.45 var(--mono); color: #cdd4e4; overflow-wrap: anywhere; }
.hud-chat-log:empty::before { content: "Nothing said yet."; color: var(--faint); font-style: italic; }
.hud-chat-log:focus-visible { outline-offset: 2px; }
.hud-filter { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.45rem; }
.hud-filter[hidden], .hud-line[hidden] { display: none; }
.hud-filter button { font: 500 0.68rem var(--sans); color: var(--muted); background: none; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.12rem 0.5rem; cursor: pointer; text-transform: capitalize; }
.hud-filter button:hover { color: #fff; }
.hud-filter button[aria-pressed="true"] { color: #0a0f1f; background: #f4f6fb; border-color: transparent; }
/* The speaker's name in a channel line: a click starts a tell to them. */
.hud-who { font: inherit; color: #fff; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 0.2em; }
.hud-who:hover { text-decoration-style: solid; }
.hud-line { margin: 0 0 0.35rem; padding-left: 0.55rem; border-left: 2px solid var(--line-strong); }
.hud-ch-chat { border-left-color: #7494ee; }
.hud-ch-tell { border-left-color: var(--lunitari); color: #fff; }
.hud-ch-group { border-left-color: #7fc98a; }
.hud-ch-shout, .hud-ch-holler { border-left-color: #d9b55f; }
.hud-ch-auction, .hud-ch-congrat { border-left-color: #b98ad6; }
.hud-ch-pray { border-left-color: var(--solinari); }
.term-bar .term-chat-toggle, .term-bar .term-map-toggle { display: none; align-items: center; gap: 0.35rem; }
.term-bar .term-alerts { display: none; }
.term.hud .term-alerts { display: inline-flex; }
.term-bar .term-alerts[aria-pressed="true"] { color: #0a0f1f; background: var(--exits); border-color: transparent; }
/* A phone drops the connection when the page is out of sight, so there is nothing to alert. */
@media (pointer: coarse) {
  .term.hud .term-alerts { display: none; }
}
/* Over the input: the player's own buttons (Tools), or while a word is being
   finished, the ways to finish it. One row that scrolls sideways. */
.term-quick { flex: none; display: flex; gap: 0.35rem; padding: 0.45rem 0.7rem 0; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
.term-quick::-webkit-scrollbar { display: none; }
.term-quick[hidden], .term:not(.hud) .term-quick { display: none; }
.term.hud .term-quick:not([hidden]) ~ .term-input { border-top: 0; }
.term-quick button { flex: none; font: 500 0.78rem var(--sans); color: var(--text); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 0.25rem 0.75rem; cursor: pointer; white-space: nowrap; }
.term-quick button:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
/* The character's skills come first, squarer than the player's own buttons, each
   group under a small name. A skill that works only in a fight is dim out of one. */
.term-quick-label { flex: none; align-self: center; font: 600 0.66rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.term-quick-label:not(:first-child) { margin-left: 0.35rem; padding-left: 0.7rem; border-left: 1px solid var(--line-strong); }
.term-quick .term-skill { border-radius: 0.5rem; }
.term-quick:not(.fight) .term-skill[data-kind="fight"] { opacity: 0.5; }
/* What this room offers, over the skills: tinted, its buttons round, the first one filled. */
.term-can { background: rgba(127, 209, 195, 0.06); padding-bottom: 0.45rem; }
.term-can .term-quick-label { color: var(--exits); }
.term-can .term-quick-label + button { color: #0a0f1f; background: var(--exits); border-color: transparent; }
.term-can .term-quick-label + button:hover { color: #0a0f1f; background: #a5e4d9; }
/* A wide window has the room to show them all: the row wraps. */
.term.wide .term-quick { flex-wrap: wrap; overflow: visible; }
.term.wide .term-quick .term-quick-edit { margin-left: auto; }
/* The way to Tools stays in sight at the row's end, whatever scrolls under it. */
.term-quick .term-quick-edit { position: sticky; right: 0; color: var(--exits); background: #0a0f1f; border-style: dashed;
  box-shadow: -0.5rem 0 0.4rem #0a0f1f; }
.term-quick .term-quick-edit:hover { background: #1a2036; }
.term-quick[data-play-hints] button { font-family: var(--mono); border-style: dashed; }
.term-quick[data-play-hints] button.on { color: #0a0f1f; background: var(--exits); border-color: transparent; }
/* Said to a screen reader, not shown: the ways to finish a word. */
.term-say { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.term-out mark { color: #05070f; border-radius: 2px; }
.term-bar .term-tools-open, .term-bar .term-feedback-open { display: none; }
.term.hud .term-tools-open, .term.hud .term-feedback-open { display: inline-flex; }
.tools.feedback { width: min(32rem, calc(100vw - 1.5rem)); }
.feedback textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 0.9rem; padding: 0.6rem 0.7rem; resize: vertical;
  font: 400 1rem/1.4 var(--sans); color: #fff; background: rgba(5, 7, 15, 0.7); border: 1px solid var(--line-strong); border-radius: 0.5rem; }
.feedback-end { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin: 0.9rem 0 0; color: var(--muted); font-size: 0.86rem; }
.feedback-end .btn { padding: 0.5rem 1.4rem; }
.hud-feedback { display: none; }
/* A phone's bar has no room for it: there it is the first thing under More. */
@media (max-width: 32rem) {
  .term.hud .term-bar .term-feedback-open { display: none; }
  .hud-feedback { display: block; flex: none; margin-bottom: 0.5rem; padding: 0.45rem 0.8rem; font: 500 0.82rem var(--sans); color: var(--text);
    background: none; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
}
/* The Tools window (play.js): the player's buttons, aliases, highlights and triggers. */
.tools { width: min(44rem, calc(100vw - 1.5rem)); max-height: min(46rem, calc(100dvh - 1.5rem)); padding: 1.2rem 1.3rem 1.4rem; color: var(--text);
  background: #0e1426; border: 1px solid var(--line-strong); border-radius: 14px; font: 400 0.9rem/1.5 var(--sans); }
.tools::backdrop { background: rgba(3, 5, 12, 0.7); }
.tools-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tools-head h2 { margin: 0; font-size: 1.5rem; }
.tools-head .btn { padding: 0.4rem 1.1rem; }
.tools-note, .tools-part p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.84rem; }
.tools-move { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 0; }
.tools-move .tools-add { margin-top: 0; }
.tools-file { cursor: pointer; }
.tools-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tools-file:focus-within { outline: 2px solid var(--gold, #f6d983); outline-offset: 2px; }
.tools-part { margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.tools-part h3 { margin: 0; font-size: 1.1rem; color: #fff; }
.tools-list { display: grid; gap: 0.5rem; margin-top: 0.7rem; }
.tools-list:empty { display: none; }
.tools-row { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem; }
.tools-field { flex: 1 1 9rem; min-width: 0; display: grid; gap: 0.15rem; font-size: 0.72rem; color: var(--faint); }
.tools-field:nth-of-type(2) { flex-grow: 2; }
.tools-field input, .tools-field select { min-width: 0; font: 400 1rem/1.3 var(--mono); color: #fff; background: rgba(5, 7, 15, 0.7); border: 1px solid var(--line-strong);
  border-radius: 7px; padding: 0.4rem 0.55rem; }
.tools-flag { flex: none; display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.3rem; font-size: 0.8rem; color: var(--muted); }
.tools-remove, .tools-add { flex: none; font: 500 0.8rem var(--sans); color: var(--muted); background: none; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.4rem 0.8rem; cursor: pointer; }
.tools-remove:hover, .tools-add:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.tools-add { margin-top: 0.7rem; color: var(--text); }
.term-chat-toggle b { font-weight: 600; color: #0a0f1f; background: var(--exits); border-radius: 999px; padding: 0 0.4rem; }
.term-chat-toggle b[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hud-track i { transition: none; }
}
/* Small screens: no frame, and the masthead scrolls away so the game gets the screen. */
@media (max-width: 62rem) {
  .page-play-now .masthead { position: static; }
  .term, .term.hud { --term-size: 0.8125rem; height: var(--term-height, 100dvh); padding: 0; }
  .term-window { border-radius: 0; border-width: 1px 0; }
  .term-out { padding: 0.7rem 0.8rem; }
  .term-input { padding: 0.5rem 0.5rem max(0.5rem, env(safe-area-inset-bottom)); gap: 0.35rem; }
  /* The panel is a strip above the text: the room on one line, the bars side by
     side, and the channels only when the Chat button opens them. */
  .term-body { flex-direction: column; }
  .term-side { order: -1; width: auto; gap: 0.4rem; padding: 0.45rem 0.8rem 0.5rem; border-left: 0; border-bottom: 1px solid var(--line); }
  .hud-room { flex-direction: row; align-items: baseline; gap: 0.6rem; }
  .hud-room b { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hud-room span { margin-left: auto; flex: none; max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hud-bars { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.7rem; }
  .hud-bar { gap: 0.15rem 0.3rem; }
  .hud-label { font-size: 0.62rem; }
  .hud-num { font-size: 0.68rem; overflow: hidden; text-overflow: ellipsis; }
  .hud-track { height: 0.3rem; }
  .hud-foe { padding-top: 0.4rem; }
  .hud-exits { min-height: 2.2rem; flex-wrap: nowrap; }
  .hud-exit { min-height: 2.2rem; min-width: 0; flex: 1 1 0; padding: 0.3rem 0.1rem; }
  .hud-map { display: none; height: 9.5rem; padding-top: 0.4rem; }
  .term.map-open .hud-map { display: block; }
  .hud-chat { display: none; flex: none; padding-top: 0.4rem; }
  .term.chat-open .hud-chat { display: flex; }
  .hud-pane { flex: none; }
  .hud-chat-log { flex: none; height: 6.6rem; }
  .hud-list { max-height: 8rem; }
  .hud-acts button { padding: 0.3rem 0.7rem; }
  .term.hud .term-chat-toggle, .term.hud .term-map-toggle { display: inline-flex; }
  .term-quick { padding: 0.4rem 0.5rem 0; }
  .term-quick button { padding: 0.4rem 0.8rem; }
  .term-bar { padding-left: 0.6rem; }
  .term-bar > i { display: none; }
  .term-bar button { padding: 0.3rem 0.55rem; }
}

/* ---- Small screens ------------------------------------------------------------- */

/* Down to 62rem the masthead's links sit closer together, so they still fit on
   one row; below it they take a row of their own (the next rule). */
@media (max-width: 70rem) {
  .masthead-inner { gap: 1.3rem; }
  .masthead nav { gap: 1rem; }
}

@media (max-width: 62rem) {
  .masthead-inner { flex-wrap: wrap; height: auto; padding-top: 0.8rem; gap: 0.6rem 1rem; }
  .masthead nav { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0.1rem var(--gutter) 0.6rem;
    overflow-x: auto; scrollbar-width: none; gap: 1.4rem; }
  .masthead nav::-webkit-scrollbar { display: none; }
  .online { margin-left: auto; }
  .play-now { display: none; }
  html { scroll-padding-top: 7rem; }

  .hero .solinari { right: 6%; top: 19%; }
  .hero .glow.sol { right: calc(6% - 7rem); top: calc(19% - 7rem); }
  .hero .lunitari { left: 8%; top: 28%; }
  .hero .glow.lun { left: calc(8% - 4rem); top: calc(28% - 4rem); }
  .hero .nuitari-disc { right: 44%; top: 15%; }
  .inside, .home-split, .features { grid-template-columns: minmax(0, 1fr); }
  .features { gap: 2rem; }
  .page, .help-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .page-toc { position: static; max-height: none; margin-bottom: 2rem; }
  .page-toc ul { display: flex; flex-wrap: wrap; gap: 0.4rem; border: 0; }
  .page-toc li a { border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.8rem; margin: 0; }
  .page-toc li a:hover { border-color: var(--line-strong); }
  .help-index { position: static; max-height: none; padding-bottom: 0; }
  .who, .clients { grid-template-columns: minmax(0, 1fr); }
  .news { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .wn-side { position: static; }
  .page-toc .news-filter { flex-direction: row; flex-wrap: wrap; }
  .news-filter button { width: auto; }
  .explore { grid-template-columns: minmax(0, 1fr); }
  .colophon { grid-template-columns: minmax(0, 1fr); }
  .colophon nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
