/* Long Game — the only stylesheet. No fonts, no external requests.
   Tokens such as data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 9 9%22 width=%229%22 height=%229%22 shape-rendering=%22crispEdges%22%3E%3Cpath fill=%22%23141a4f%22 d=%22M3 3h3v1h-3zm0 1h1v2h-1zm2 0h1v2h-1zm-1 1h1v1h-1z%22/%3E%3Cpath fill=%22%2305061a%22 d=%22M2 0h5v1h-5zm-1 1h1v1h-1zm6 0h1v1h-1zm-7 1h1v5h-1zm8 0h1v5h-1zm-7 5h1v1h-1zm6 0h1v1h-1zm-5 1h5v1h-5z%22/%3E%3Cpath fill=%22%23a9b1e6%22 d=%22M2 2h5v1h-5zm0 1h1v4h-1zm4 0h1v4h-1zm-3 3h3v1h-3z%22/%3E%3Cpath fill=%22%23f2f0ff%22 d=%22M2 1h5v1h-5zm-1 1h1v5h-1zm6 0h1v5h-1zm-5 5h5v1h-5z%22/%3E%3C/svg%3E are pixel drawings inlined by build.py. */

:root {
  --bg: #060818;
  --ink: #f1f2ff;
  --ink-2: #c3c9f2;
  --gold: #ffd866;
  --cyan: #8fe3ff;
  --green: #7ef0a0;
  --red: #ffa8a8;
  --win-a: #2d3b9f;
  --win-b: #18216a;
  --win-c: #121a5c;
  --slot: #1c2672;
  --deep: #0b1145;
  --shade: #05061a;
  --px: 2px;      /* one pixel of the pixel font */
  --b: 8px;       /* window frame: 4 frame pixels x 2px */
  --gap: 16px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 1.0625rem/1.65 var(--sans);
  background: var(--bg) url("/img/stars-a.svg") 0 0 / 320px 320px repeat;
}

/* a second star layer that slowly blinks */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("/img/stars-b.svg") 61px 23px / 480px 480px repeat;
  animation: twinkle 3.6s steps(2, jump-none) infinite alternate;
}

img, svg { max-width: 100%; }
img { image-rendering: pixelated; }
a { color: var(--cyan); }
a:hover { color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

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

.skip {
  position: absolute;
  left: 12px; top: -80px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--gold);
  color: #10123a;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- pixel lettering ---------- */

.px {
  display: inline-block;
  vertical-align: middle;
  width: calc(var(--w) * var(--px));
  height: calc(7 * var(--px));
  fill: currentColor;
  shape-rendering: crispEdges;
  overflow: visible;
  filter: drop-shadow(var(--px) var(--px) 0 var(--shade));
}

/* ---------- windows ---------- */

.win {
  position: relative;
  margin: 0;
  padding: 16px 20px;
  color: var(--ink);
  border: var(--b) solid #c9cff5;
  border-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 9 9%22 width=%229%22 height=%229%22 shape-rendering=%22crispEdges%22%3E%3Cpath fill=%22%23141a4f%22 d=%22M3 3h3v1h-3zm0 1h1v2h-1zm2 0h1v2h-1zm-1 1h1v1h-1z%22/%3E%3Cpath fill=%22%2305061a%22 d=%22M2 0h5v1h-5zm-1 1h1v1h-1zm6 0h1v1h-1zm-7 1h1v5h-1zm8 0h1v5h-1zm-7 5h1v1h-1zm6 0h1v1h-1zm-5 1h5v1h-5z%22/%3E%3Cpath fill=%22%23a9b1e6%22 d=%22M2 2h5v1h-5zm0 1h1v4h-1zm4 0h1v4h-1zm-3 3h3v1h-3z%22/%3E%3Cpath fill=%22%23f2f0ff%22 d=%22M2 1h5v1h-5zm-1 1h1v5h-1zm6 0h1v5h-1zm-5 5h5v1h-5z%22/%3E%3C/svg%3E") 4 / var(--b) stretch;
  background: linear-gradient(180deg, var(--win-a), var(--win-b) 240px, var(--win-c)) padding-box;
  background-color: var(--win-c);
}

.win > :first-child { margin-top: 0; }
.win > :last-child { margin-bottom: 0; }

.wt {
  margin: 0 0 14px;
  color: var(--gold);
  line-height: 1.3;
  --px: 2px;
}

/* a small title window that sits on the next window's frame */
.tab {
  justify-self: start;
  margin: 0 0 calc(-1 * var(--gap) - 10px) 12px;
  padding: 8px 16px;
  z-index: 1;
}
.tab-title { margin: 0; color: var(--gold); line-height: 1; --px: 3px; }

.group-title {
  margin: 12px 0 -4px 4px;
  color: var(--gold);
  line-height: 1;
  --px: 2px;
}

/* ---------- page shell ---------- */

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--gap);
  display: grid;
  gap: var(--gap);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "mast" "menu" "main" "side" "foot";
}
.shell--hero { grid-template-areas: "menu" "main" "side" "foot"; }
.masthead { grid-area: mast; }
.menu { grid-area: menu; }
.main { grid-area: main; }
.side { grid-area: side; }
.foot { grid-area: foot; }
.main, .side { min-width: 0; display: grid; gap: var(--gap); align-content: start; }

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding: 6px 4px 0;
}
.brand { color: var(--gold); line-height: 0; text-decoration: none; --px: 3px; }
.brand:hover { color: #fff; }
.tagline { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* ---------- menus and the cursor ---------- */

.win.menu { padding: 10px 14px 10px 10px; }
.menu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; }

.cmd {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  min-height: 34px;
  padding: 6px 6px 6px 24px;
  color: var(--ink);
  text-decoration: none;
  --px: 2px;
}
.cmd::before {
  content: "";
  position: absolute;
  left: 4px; top: 50%;
  width: 12px; height: 18px;
  margin-top: -9px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 6 9%22 width=%226%22 height=%229%22 shape-rendering=%22crispEdges%22%3E%3Cpath fill=%22%2314132b%22 d=%22M0 0h2v1h-2zm0 1h1v8h-1zm2 0h1v1h-1zm1 1h1v1h-1zm1 1h1v1h-1zm1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1z%22/%3E%3Cpath fill=%22%23e89a3c%22 d=%22M4 4h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1z%22/%3E%3Cpath fill=%22%23f6f5ff%22 d=%22M1 1h1v3h-1z%22/%3E%3Cpath fill=%22%23ffd866%22 d=%22M2 2h1v4h-1zm1 1h1v2h-1zm-2 1h1v3h-1z%22/%3E%3C/svg%3E") center / 12px 18px no-repeat;
  visibility: hidden;
}
.cmd:hover, .cmd:focus-visible, .cmd[aria-current="page"], .cmd.is-here { color: var(--gold); }
.cmd:hover::before, .cmd:focus-visible::before,
.cmd[aria-current="page"]::before, .cmd.is-here::before, .cmd.is-default::before {
  visibility: visible;
  animation: blink 1.1s steps(1) infinite;
}
.cmd:focus-visible { outline-offset: 0; }
/* only one cursor at a time: hovering or focusing another entry moves it */
.menu-list:hover .cmd:not(:hover)::before,
.menu-list:focus-within .cmd:not(:focus-visible):not(:hover)::before { visibility: hidden; }
.cmd-hint { color: var(--ink-2); font-size: .95rem; text-align: left; }
.cmd:hover .cmd-hint { color: var(--ink); }

/* phones and tablets: a command grid; the cursor lives in the gutter between columns */
@media (max-width: 959px) {
  .win.menu { padding: 6px; }
  .menu .menu-list { display: grid; grid-template-columns: repeat(2, max-content); column-gap: 16px; padding-left: 14px; }
  .menu .cmd { padding: 6px 0; }
  .menu .cmd::before { left: -14px; }
}
@media (max-width: 349px) { .menu .menu-list { grid-template-columns: max-content; } }
@media (min-width: 600px) and (max-width: 959px) { .menu .menu-list { grid-template-columns: repeat(3, max-content); column-gap: 28px; } }
@media (min-width: 960px) {
  .win.menu { padding: 12px 14px 12px 10px; }
  .menu .menu-list { flex-direction: column; gap: 2px; }
  .menu .cmd { display: flex; }
}

/* ---------- title screen ---------- */

.hero {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: space-between;
  gap: 28px;
  min-height: min(100vh, 760px);
  padding: clamp(36px, 9vh, 96px) var(--gap) calc(var(--gap) + 8px);
  background: #0a0f2e url("/img/scenes/night.svg") 50% 100% / cover no-repeat;
  border-bottom: 4px solid #03040f;
  text-align: center;
}
@supports (min-height: 100svh) { .hero { min-height: min(100svh, 760px); } }
.hero-head { display: grid; justify-items: center; gap: 18px; }
.hero-title { margin: 0 0 calc(var(--px) * 3); color: var(--gold); line-height: 0; --px: 4px; }
.hero-px {
  filter:
    drop-shadow(0 var(--px) 0 #e0623a)
    drop-shadow(0 var(--px) 0 #8e2b46)
    drop-shadow(var(--px) 0 0 #10123a)
    drop-shadow(calc(var(--px) * -1) 0 0 #10123a)
    drop-shadow(0 calc(var(--px) * -1) 0 #10123a)
    drop-shadow(0 var(--px) 0 #10123a);
}
.hero-sub {
  margin: 0;
  max-width: 34rem;
  color: var(--ink);
  line-height: 1.9;
  --px: 2px;
}
.hero-sub .px { margin: 0 4px; }

/* phones: keep the castle above the dialog box; the lake colour continues below the picture */
@media (max-width: 599px) {
  .hero { background-color: #0b1140; background-size: auto 72%; background-position: 50% 0; }
}
@media (min-width: 600px) { .hero-title { --px: 6px; } }
@media (min-width: 960px) {
  .hero { background-position: 64% 100%; }
  .hero-title { --px: 8px; }
}

/* ---------- dialog box with typed text ---------- */

.dialog {
  width: min(100%, 780px);
  margin-top: 30px;
  padding: 26px 24px 18px;
  text-align: left;
}
.nametag {
  position: absolute;
  top: -40px; left: 14px;
  padding: 6px 14px;
  color: var(--gold);
  line-height: 0;
  --px: 2px;
}
.typed { margin: 0; font-size: 1.125rem; line-height: 1.7; }
.tw > i {
  font-style: normal;
  animation: type-in 1ms linear both;
  animation-delay: calc(var(--i) * 24ms + 500ms);
}
.more {
  display: inline-block;
  width: 18px; height: 12px;
  margin-left: 8px;
  vertical-align: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 9 6%22 width=%229%22 height=%226%22 shape-rendering=%22crispEdges%22%3E%3Cpath fill=%22%2314132b%22 d=%22M0 0h9v1h-9zm0 1h1v1h-1zm8 0h1v1h-1zm-7 1h1v1h-1zm6 0h1v1h-1zm-5 1h1v1h-1zm4 0h1v1h-1zm-3 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1z%22/%3E%3Cpath fill=%22%23e89a3c%22 d=%22M7 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1z%22/%3E%3Cpath fill=%22%23f6f5ff%22 d=%22M1 1h1v1h-1z%22/%3E%3Cpath fill=%22%23ffd866%22 d=%22M2 1h5v1h-5zm0 1h4v1h-4zm1 1h2v1h-2z%22/%3E%3C/svg%3E") center / 18px 12px no-repeat;
  animation: type-in 1ms linear both, blink 1.1s steps(1) infinite;
  animation-delay: calc(var(--n) * 24ms + 500ms), calc(var(--n) * 24ms + 500ms);
}
.choices { margin-top: 14px; gap: 2px 32px; }
.choices .cmd { --px: 2px; }

/* ---------- quest lists ---------- */

.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.q {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 6px 14px;
  align-items: start;
  padding: 12px 10px 12px 26px;
}
.q::before {
  content: "";
  position: absolute;
  left: 4px; top: 27px;
  width: 12px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 6 9%22 width=%226%22 height=%229%22 shape-rendering=%22crispEdges%22%3E%3Cpath fill=%22%2314132b%22 d=%22M0 0h2v1h-2zm0 1h1v8h-1zm2 0h1v1h-1zm1 1h1v1h-1zm1 1h1v1h-1zm1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1z%22/%3E%3Cpath fill=%22%23e89a3c%22 d=%22M4 4h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1z%22/%3E%3Cpath fill=%22%23f6f5ff%22 d=%22M1 1h1v3h-1z%22/%3E%3Cpath fill=%22%23ffd866%22 d=%22M2 2h1v4h-1zm1 1h1v2h-1zm-2 1h1v3h-1z%22/%3E%3C/svg%3E") center / 12px 18px no-repeat;
  visibility: hidden;
}
.q:hover, .q:focus-within { background: rgba(255, 255, 255, .06); }
.q:hover::before, .q:focus-within::before { visibility: visible; animation: blink 1.1s steps(1) infinite; }
.q:focus-within { outline: 3px solid var(--gold); outline-offset: -3px; }
.q-icon, .slot-icon {
  width: 48px; height: 48px;
  background: var(--slot);
  box-shadow: inset 0 0 0 2px var(--deep);
}
.q-meta { margin: 0 0 2px; color: var(--ink-2); font-size: .875rem; }
.q-no { color: var(--gold); font-family: var(--mono); font-size: .8125rem; }
.q-title { margin: 0; font-size: 1.1875rem; line-height: 1.3; }
.q-title a { color: var(--ink); text-decoration: none; }
.q-title a::after { content: ""; position: absolute; inset: 0; }
.q-title a:focus-visible { outline: none; }
.q:hover .q-title a, .q:focus-within .q-title a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.q-desc { grid-column: 2; margin: 0; color: var(--ink-2); font-size: .975rem; }
@media (max-width: 599px) {
  .q { grid-template-columns: 40px minmax(0, 1fr); align-items: center; padding: 12px 8px 12px 22px; }
  .q::before { left: 2px; top: 23px; }
  .q-icon { width: 40px; height: 40px; }
  .q-desc { grid-column: 1 / -1; }
}
.win-foot { margin: 14px 0 0; padding-top: 12px; border-top: 2px dashed rgba(195, 201, 242, .35); }

/* ---------- small key/value panels ---------- */

.kv { margin: 0; display: grid; gap: 6px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-family: var(--mono); color: var(--ink); text-align: right; }

.equip { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.equip a {
  display: flex; align-items: center; gap: 12px;
  padding: 4px;
  color: var(--ink);
  text-decoration: none;
}
.equip a:hover { color: var(--gold); background: rgba(255, 255, 255, .06); }
.equip img { width: 32px; height: 32px; flex: none; background: var(--slot); box-shadow: inset 0 0 0 2px var(--deep); }
.equip .slot-name { display: block; color: var(--ink-2); font-size: .8125rem; }

.plain { margin: 0; padding-left: 1.2em; }
.plain li { margin: .25em 0; }

/* ---------- a quest entry ---------- */

.post-win { padding: 22px clamp(16px, 4vw, 40px) 26px; }
.post-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 2px dashed rgba(195, 201, 242, .35);
}
.post-icon { width: 64px; height: 64px; background: var(--slot); box-shadow: inset 0 0 0 2px var(--deep); }
.post-title { margin: 0; color: var(--gold); font-size: clamp(1.6rem, 4.2vw, 2.3rem); line-height: 1.15; text-wrap: balance; }
.post-meta { margin: 8px 0 0; color: var(--ink-2); font-size: .9375rem; }
.post-meta a { color: var(--ink-2); }
.post-meta a:hover { color: var(--gold); }

.prose { max-width: 68ch; font-size: 1.125rem; line-height: 1.75; }
.prose p { margin: 0 0 1.15em; }
.prose h2 {
  position: relative;
  margin: 1.9em 0 .6em;
  padding-left: 22px;
  color: var(--gold);
  font-size: 1.3rem;
  line-height: 1.3;
}
.prose h2::before {
  content: "";
  position: absolute;
  left: 0; top: .3em;
  width: 10px; height: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 6 9%22 width=%226%22 height=%229%22 shape-rendering=%22crispEdges%22%3E%3Cpath fill=%22%2314132b%22 d=%22M0 0h2v1h-2zm0 1h1v8h-1zm2 0h1v1h-1zm1 1h1v1h-1zm1 1h1v1h-1zm1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1z%22/%3E%3Cpath fill=%22%23e89a3c%22 d=%22M4 4h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1z%22/%3E%3Cpath fill=%22%23f6f5ff%22 d=%22M1 1h1v3h-1z%22/%3E%3Cpath fill=%22%23ffd866%22 d=%22M2 2h1v4h-1zm1 1h1v2h-1zm-2 1h1v3h-1z%22/%3E%3C/svg%3E") center / 10px 15px no-repeat;
}
.prose a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose em, .prose strong { color: #fff; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.5em; }
.prose li { margin: .35em 0; padding-left: .2em; }
.prose ul { list-style: none; padding-left: 1.4em; }
.prose ul > li { position: relative; }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: -1.1em; top: .62em;
  width: 6px; height: 6px;
  background: var(--gold);
  box-shadow: 2px 2px 0 var(--shade);
}
.prose ol li::marker { color: var(--gold); font-family: var(--mono); }
.prose blockquote { margin: 1.4em 0; padding: 12px 18px; border-left: 4px solid var(--gold); background: rgba(5, 6, 26, .3); }
.prose code { font-family: var(--mono); font-size: .9em; background: rgba(5, 6, 26, .35); padding: .1em .35em; }

.fig { margin: 1.7em 0; }
.fig img { display: block; width: 100%; height: auto; background: var(--deep); box-shadow: 0 0 0 2px var(--deep); }
.fig--narrow img { max-width: 384px; }
.fig figcaption { margin-top: .6em; color: var(--ink-2); font-size: .9375rem; line-height: 1.5; }

.saveslot {
  display: grid;
  gap: 10px;
  max-width: 420px;
  margin: 1.6em 0;
  padding: 14px 18px;
  --px: 2px;
}
.saveslot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; line-height: 0; }
.saveslot .lit { color: var(--gold); }

.swatches { list-style: none; margin: 0 0 1.15em; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 8px 18px; }
.prose .swatches > li { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; font-size: 1rem; }
.prose .swatches > li::before { display: none; }
.sw { flex: none; width: 26px; height: 26px; box-shadow: inset 0 0 0 2px rgba(5, 6, 26, .45); }

.post-foot { margin-top: 30px; padding-top: 20px; border-top: 2px dashed rgba(195, 201, 242, .35); }
.cleared { margin: 0 0 16px; color: var(--green); line-height: 0; --px: 2px; }
@media (min-width: 600px) { .cleared { --px: 3px; } }
.pn { display: grid; gap: 10px; }
.pn a { display: block; padding: 10px 12px; background: rgba(5, 6, 26, .25); color: var(--ink); text-decoration: none; }
.pn a:hover { background: rgba(255, 255, 255, .06); color: var(--gold); }
.pn small { display: block; color: var(--ink-2); font-size: .8125rem; letter-spacing: .04em; text-transform: uppercase; }
.pn .next { text-align: right; }
@media (min-width: 640px) { .pn { grid-template-columns: 1fr 1fr; } .pn .next { grid-column: 2; } }

.mini-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: .9375rem; }
.mini-log a { display: block; padding: 5px 6px; color: var(--ink); text-decoration: none; line-height: 1.35; }
.mini-log a:hover { color: var(--gold); background: rgba(255, 255, 255, .06); }
.mini-log a[aria-current="page"] { color: var(--gold); }
.mini-log span { color: var(--ink-2); font-family: var(--mono); font-size: .8125rem; margin-right: 6px; }

/* ---------- save points ---------- */

.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.slot { scroll-margin-top: 16px; }
.slot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; line-height: 0; --px: 2px; }
.slot-file { color: var(--ink-2); }
.slot-month { margin: 0; color: var(--gold); line-height: 0; }
.slot-count { margin-left: auto; color: var(--ink-2); font-size: .875rem; line-height: 1.4; }
.slot-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.slot-list li { display: flex; gap: 12px; align-items: baseline; }
.slot-list time { flex: none; width: 4.2em; color: var(--ink-2); font-family: var(--mono); font-size: .875rem; }
.slot--empty { --win-a: #1b2264; --win-b: #141a52; --win-c: #121848; padding-block: 12px; }
.slot--empty .slot-month { color: var(--ink-2); }
.slot-empty { margin: 0 0 0 auto; color: var(--ink-2); font-size: .875rem; line-height: 1.4; letter-spacing: .08em; }
.slot:target { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- inventory and bestiary cards ---------- */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--gap); }
.card { scroll-margin-top: 16px; display: flex; flex-direction: column; }
.card:target { outline: 3px solid var(--gold); outline-offset: 4px; }
.card-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 12px; }
.card-icon { width: 64px; height: 64px; background: var(--slot); box-shadow: inset 0 0 0 2px var(--deep); }
.card-name { margin: 0; color: var(--gold); font-size: 1.15rem; line-height: 1.25; }
.card-type { margin: 3px 0 0; color: var(--ink-2); font-size: .875rem; }
.badge { color: var(--green); }
.stats { margin: 0 0 12px; display: grid; gap: 3px; font-family: var(--mono); font-size: .875rem; }
.stats > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted rgba(195, 201, 242, .25); padding-bottom: 2px; }
.stats dt { color: var(--ink-2); }
.stats dd { margin: 0; text-align: right; }
.stats--text > div { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr); gap: 10px; align-items: baseline; }
.stats--text dd { text-align: left; font-family: var(--sans); font-size: .9375rem; line-height: 1.45; }
.kv--text dd { font-family: var(--sans); }
.up { color: var(--green); }
.down { color: var(--red); }
.card-special { margin: 0 0 8px; font-size: .9375rem; }
.label { color: var(--gold); font-family: var(--mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; margin-right: 6px; }
.card-desc { margin: 0; color: var(--ink-2); font-size: .9375rem; }
.card-desc a { color: var(--cyan); }
.notes { margin: 0; font-size: .9375rem; }

/* ---------- status screen ---------- */

.status-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: center; }
@media (min-width: 560px) { .status-top { grid-template-columns: 136px minmax(0, 1fr); } }
.emblem { width: 128px; height: 128px; box-shadow: 0 0 0 4px var(--deep); }
.status-name { margin: 0 0 10px; color: var(--gold); line-height: 0; --px: 4px; }
.status-lines { margin: 0; display: grid; gap: 8px; }
.status-lines > div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 12px; align-items: center; }
.status-lines dt { color: var(--gold); font-family: var(--mono); font-size: .875rem; letter-spacing: .06em; }
.status-lines dd { margin: 0; }
.meter { display: grid; gap: 3px; }
.meter small { color: var(--ink-2); font-size: .8125rem; }
.bar { position: relative; height: 12px; background: var(--deep); box-shadow: inset 0 0 0 2px var(--shade); }
.bar > i {
  position: absolute;
  left: 2px; top: 2px; bottom: 2px;
  width: calc((100% - 4px) * var(--v) / 100);
  background: linear-gradient(var(--green) 50%, #3fae63 50%);
}
.bar--mp > i { background: linear-gradient(var(--cyan) 50%, #4fb3d9 50%); }
.attr { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attr li { display: grid; grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr) 2.5rem; gap: 12px; align-items: center; }
.attr .num { font-family: var(--mono); text-align: right; }
.abilities { margin: 0; display: grid; gap: 10px; }
.abilities dt { color: var(--ink); font-weight: 600; }
.abilities dt span { color: var(--gold); font-family: var(--mono); font-size: .8125rem; font-weight: 400; margin-left: 8px; }
.abilities dd { margin: 0; color: var(--ink-2); font-size: .9375rem; }
.bio p { margin: 0 0 .9em; }

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

.hero--over {
  min-height: min(78vh, 620px);
  background-image: url("/img/scenes/dusk.svg");
  background-position: 50% 100%;
}
@media (max-width: 599px) { .hero--over { background-color: #140309; background-position: 50% 0; } }
/* wider screens: a taller scene keeps the sun and the sword above the Continue window */
@media (min-width: 600px) { .hero--over { min-height: min(96vh, 860px); } }
.over-title { margin: 0 0 calc(var(--px) * 3); color: #ff8a7a; line-height: 0; --px: 5px; }
@media (min-width: 600px) { .over-title { --px: 8px; } }
.over-text { margin: 0; max-width: 30rem; color: var(--ink); font-size: 1.125rem; text-shadow: 2px 2px 0 var(--shade); }
.continue { width: min(100%, 460px); text-align: left; }

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

.foot-win { padding: 12px 18px; font-size: .9375rem; }
.foot-win p { margin: 0; }
.foot-win p + p { margin-top: 4px; color: var(--ink-2); font-size: .875rem; }

/* ---------- desktop layout ---------- */

@media (min-width: 960px) {
  :root { --gap: 18px; }
  .shell {
    grid-template-columns: minmax(0, 1fr) 17rem;
    grid-template-areas: "mast mast" "main menu" "main side" "foot foot";
    grid-template-rows: auto auto 1fr auto;
    align-items: start;
  }
  .shell--hero { grid-template-areas: "main menu" "main side" "foot foot"; grid-template-rows: auto 1fr auto; }
}

@media (max-width: 420px) {
  :root { --gap: 12px; }
  .win { padding: 14px 14px; }
  .post-head { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; }
  .post-icon { width: 48px; height: 48px; }
  .attr li { grid-template-columns: minmax(0, 1fr) 2.5rem; }
  .attr .bar { grid-column: 1 / -1; grid-row: 2; }
}

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

@keyframes blink { 50% { opacity: 0; } }
@keyframes type-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes twinkle { from { opacity: .15; } to { opacity: 1; } }
@keyframes win-open { from { transform: scaleY(.08); } to { transform: scaleY(1); } }

.boot .win { animation: win-open .2s steps(4, end) backwards; }
.boot .nametag { animation-delay: .2s; }

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

/* ---------- print ---------- */

@media print {
  body { background: #fff; color: #000; }
  body::before, .menu, .side, .skip, .foot, .hero, .tab, .post-foot { display: none; }
  .shell { display: block; max-width: none; padding: 0; }
  .win { border: 0; background: none; padding: 0; color: #000; }
  .post-title, .prose h2 { color: #000; }
  .prose a { color: #000; }
}
