/* drechols.prof, the student site, in Pixel Quest's Crystal Serif interface
   (07-Assets/Design/Pixel Quest/README.md, adopted 2026-11-28): blue glass
   windows with bright bevels, Alegreya SC titles, Alegreya choices, Atkinson
   Hyperlegible for longer text, a pointing hand for the selected choice.

   Every page is a pixel island (quest.js). Without JavaScript the island is
   hidden and the List view (#places) is the page. The colour tokens and the
   starter picker's styles are Codex's, 2026-11-28; the Open Workshop
   stylesheet they replaced is in 09-Archive/drechols.prof Open Workshop Build/. */

:root {
  --mat: #081738;
  --mat-deep: #040b1d;
  --gold: #e8c979;
  --gold-soft: #fff1bd;
  --card: #102b62;
  --ink: #fff8e8;
  --muted: #d2dded;
  --meta: #b9c8df;
  --surface-soft: #173b7a;
  --frame: #eef5ff;
  --bevel: #6f8fbd;
  --rule: rgba(232, 201, 121, .5);
  --sea: #24508f;
  --shadow: 7px 8px 0 rgba(2, 7, 21, .84);
  --shadow-small: 3px 4px 0 rgba(2, 7, 21, .78);
  --read: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;
  --serif: "Alegreya", "Iowan Old Style", Georgia, serif;
  --display: "Alegreya SC", "Iowan Old Style", Georgia, serif;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --focus: var(--gold-soft);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--mat-deep); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(45, 91, 169, .44), transparent 28rem),
    linear-gradient(180deg, #0b1f49 0, var(--mat) 28rem, var(--mat-deep) 100%);
  color: var(--ink);
  font-family: var(--read);
  font-size: 17px;
  line-height: 1.5;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; }
a { color: var(--gold-soft); text-underline-offset: 4px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button, input { font: inherit; }
img { max-width: 100%; height: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 14px; background: var(--gold); color: var(--mat-deep); font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------- windows */
/* A Crystal Serif window: a bright frame, an inner bevel, a gold rule. */
.window {
  position: relative;
  border: 3px solid var(--frame);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .07), transparent 36%),
    radial-gradient(circle at 80% 0, rgba(82, 133, 220, .35), transparent 50%),
    var(--card);
  box-shadow: inset 0 0 0 2px var(--bevel), var(--shadow);
}
.window::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--rule);
  pointer-events: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 2px solid var(--gold-soft);
  border-radius: 3px;
  background: var(--gold);
  color: var(--mat-deep);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-small);
}
.button:hover { color: var(--mat-deep); box-shadow: 0 0 0 3px rgba(232, 201, 121, .34), var(--shadow-small); }
.button:active { transform: translateY(2px); box-shadow: 1px 1px 0 rgba(2, 7, 21, .78); }
.button-secondary { border-color: var(--meta); background: var(--surface-soft); color: var(--ink); }
.button-secondary:hover { background: #244e92; color: var(--ink); }
.button-small { min-height: 38px; padding: 0 12px; font-size: 15px; }

/* -------------------------------------------------------- top bar */
/* The Pixel Quest header menu (design system, revised 2026-11-29): one glass
   strip with a gold rule under it, the page title on a darker pane at the left
   with the brand under it, framed command buttons in Alegreya small capitals,
   with a gold frame on the command under the pointer, focused or open. One row;
   the courses sit in a pulldown. The commands follow the title pane directly,
   and the title pane's edge is the bar's only divider. The pixel arrow appears
   only in the pulldown's list, never on a button (Reid, 2026-11-29: "only use
   the hand/arrow when selecting from outside of buttons, not inside button bars
   or toolbars"). */
:root {
  --hand:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 11' shape-rendering='crispEdges'%3E%3Cpath fill='%2306112c' d='M7 0h1v1h-1zM6 1h1v1h-1zM8 1h1v1h-1zM6 2h1v1h-1zM9 2h1v1h-1zM1 3h6v1h-6zM10 3h1v1h-1zM0 4h1v1h-1zM11 4h1v1h-1zM0 5h1v1h-1zM12 5h1v1h-1zM0 6h1v1h-1zM11 6h1v1h-1zM1 7h6v1h-6zM10 7h1v1h-1zM6 8h1v1h-1zM9 8h1v1h-1zM6 9h1v1h-1zM8 9h1v1h-1zM7 10h1v1h-1z'/%3E%3Cpath fill='%239a7a2e' d='M1 6h6v1h-6zM10 6h1v1h-1zM9 7h1v1h-1zM8 8h1v1h-1zM7 9h1v1h-1z'/%3E%3Cpath fill='%23e8c979' d='M7 2h1v1h-1zM7 3h2v1h-2zM7 4h3v1h-3zM1 5h10v1h-10zM7 6h3v1h-3zM7 7h2v1h-2zM7 8h1v1h-1z'/%3E%3Cpath fill='%23fff1bd' d='M7 1h1v1h-1zM8 2h1v1h-1zM9 3h1v1h-1zM1 4h6v1h-6zM10 4h1v1h-1zM11 5h1v1h-1z'/%3E%3C/svg%3E");
  --caret:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 4' shape-rendering='crispEdges'%3E%3Cpath fill='%23e8c979' d='M0 0h7v1h-7zM1 1h5v1h-5zM2 2h3v1h-3zM3 3h1v1h-1z'/%3E%3C/svg%3E");
  --surface-command: rgba(3, 15, 53, .42); --surface-command-selected: linear-gradient(180deg, rgba(232, 201, 121, .30), rgba(232, 201, 121, .12));
  --shadow-command: inset 0 2px 0 rgba(255, 255, 255, .18), 0 3px 0 #06112c; --shadow-command-selected: inset 0 2px 0 rgba(255, 241, 189, .30), 0 3px 0 #06112c;
  --glass-frame: #eef5ff; --glass-pane: rgba(3, 15, 53, .42); --glass-strip: rgba(4, 15, 47, .5);
  --glass-pane-rule: #5477aa; --gilt-wash: rgba(232, 201, 121, .22); --hand-outline: #06112c;
  --surface-window: radial-gradient(circle at 24% -20%, #2b5da0, #163773 42%, #071538 92%);
  --shadow-window: inset 0 0 0 2px #7f9cc5, inset 0 0 38px rgba(255, 255, 255, .12), 0 6px 0 #10182c;
  --shadow-header: inset 0 -2px 0 #9a7a2e, inset 0 0 38px rgba(255, 255, 255, .12), 0 6px 0 #10182c;
  --shadow-pane: inset 0 0 0 1px #5477aa, 3px 3px 0 rgba(0, 0, 0, .24);
}
.bar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: stretch;
  min-height: 76px;
  background: var(--surface-window);
  border-bottom: 4px solid var(--gold);
  box-shadow: var(--shadow-header);
}
.bar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 20px 8px 14px;
  background: var(--glass-strip);
  border-right: 1px solid var(--rule);
  min-width: 0;
}
.bar-portrait { flex: none; width: 29px; height: 51px; image-rendering: pixelated; }
.bar-titles { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.brand-name { margin: 0; color: var(--gold); font-family: var(--pixel); font-size: 11px; font-weight: 400; letter-spacing: .06em; line-height: 1; text-decoration: none; }
.brand-name:hover { color: var(--gold-soft); text-decoration: underline; }
.page-title { margin: 0; color: var(--ink); font-size: 25px; line-height: 1; letter-spacing: .03em; text-shadow: 2px 2px 0 var(--hand-outline); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-actions { display: flex; align-items: center; justify-content: flex-start; gap: 12px; flex: 1; flex-wrap: nowrap; padding: 8px 18px; }

/* commands: framed buttons in serif small capitals; a gold frame marks the one in play */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 16px;
  border: 2px solid var(--glass-frame); border-radius: 5px;
  background: var(--surface-command); color: var(--ink);
  font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: .03em; line-height: 1;
  white-space: nowrap; cursor: pointer;
  box-shadow: var(--shadow-command);
}
.btn:hover, .btn:focus-visible, .btn[aria-expanded="true"] { border-color: var(--gold); background: var(--surface-command-selected); box-shadow: var(--shadow-command-selected); color: var(--gold-soft); }
.btn:active { transform: translateY(2px); }
.btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-soft); }
.caret { flex: none; width: 14px; height: 8px; margin-left: 2px; background: var(--caret) no-repeat center / 14px 8px; image-rendering: pixelated; }
.btn[aria-expanded="true"] .caret { transform: rotate(180deg); }

.menu { position: relative; flex: none; }
.menu-panel {
  position: absolute; left: 0; top: calc(100% + 10px); z-index: 50;
  min-width: 300px; width: max-content; max-width: calc(100vw - 24px);
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px;
  background: var(--surface-window);
  border: 4px solid var(--glass-frame); border-radius: 9px;
  box-shadow: var(--shadow-window);
}
.menu-panel.right { left: auto; right: 0; }
.menu-panel a {
  display: flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 4px 12px 4px 4px;
  border-radius: 3px;
  color: var(--muted); font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: .03em;
  text-decoration: none; white-space: nowrap;
}
.menu-panel a::before {
  content: ""; flex: none; width: 26px; height: 22px;
  background: var(--hand) no-repeat center / 26px 22px; image-rendering: pixelated; visibility: hidden;
}
.menu-panel a img { flex: none; width: 36px; height: auto; image-rendering: pixelated; }
.menu-panel .menu-extra {
  display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 6px; padding: 4px 12px 4px 4px;
  border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: none;
  color: var(--muted); font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: .03em; text-align: left; cursor: pointer;
}
.menu-panel .menu-extra::before { content: ""; flex: none; width: 22px; height: 16px; background: var(--hand) no-repeat center / 22px 16px; image-rendering: pixelated; visibility: hidden; }
.menu-panel .menu-extra:hover, .menu-panel .menu-extra:focus-visible { color: var(--ink); }
.menu-panel .menu-extra:hover::before, .menu-panel .menu-extra:focus-visible::before { visibility: visible; opacity: .55; }
.menu-panel a:hover, .menu-panel a:focus-visible { color: var(--gold-soft); background: linear-gradient(90deg, rgba(232, 201, 121, .26), rgba(232, 201, 121, .06)); box-shadow: inset 0 0 0 2px var(--gold); }
.menu-panel a:hover::before, .menu-panel a:focus-visible::before { visibility: visible; }
.menu-panel a[aria-current="page"] { color: var(--gold-soft); }
.menu-panel a[aria-current="page"]::after { content: "You are here"; margin-left: auto; padding-left: 16px; color: var(--gold); font-family: var(--pixel); font-size: 11px; font-weight: 400; letter-spacing: .06em; }

@media (max-width: 1200px) {
  .bar-actions { gap: 10px; padding: 8px 12px; }
  .btn { min-height: 40px; padding: 6px 12px; font-size: 16px; }
  .page-title { font-size: 22px; }
}
@media (max-width: 1000px) {
  .bar-brand { padding: 6px 12px 6px 10px; }
  .bar-portrait { width: 20px; height: 36px; }
  .page-title { font-size: 20px; }
  .bar-actions { gap: 8px; padding: 6px 10px; }
  .btn { padding: 6px 10px; font-size: 15px; }
}
@media (max-width: 860px) {
  .bar { flex-direction: column; min-height: 0; }
  .bar-brand { border-right: 0; border-bottom: 1px solid var(--rule); }
  .bar-actions { justify-content: flex-start; gap: 8px; padding: 6px 10px; }
}

/* ---------------------------------------------------------- the map */
.has-map, .has-map body { height: 100%; }
.has-map body { display: flex; flex-direction: column; overflow: hidden; }
.has-map main { position: relative; flex: 1; min-height: 0; display: flex; }
#stage { position: relative; flex: 1; min-width: 0; display: grid; place-items: center; overflow: hidden; background: var(--sea); }
#frame { position: relative; z-index: 0; overflow: hidden; }     /* its own layer, so buildings never cover a sign */
#view { display: block; image-rendering: pixelated; cursor: pointer; }
#view:focus-visible { outline-offset: -4px; }
#labels { position: absolute; inset: 0; overflow: hidden; z-index: 100000; pointer-events: none; }
#labels .lab { pointer-events: auto; }
/* the campus buildings stand over the map as images, ordered by depth with the characters */
.site { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.site img { display: block; image-rendering: pixelated; }
/* a gold pennant on every place a student has found; it pops up the first time */
.flag { position: absolute; right: 8px; top: -18px; width: 3px; height: 30px; background: #2b1d2e; box-shadow: 1px 0 0 #6b5a3a; transform-origin: 50% 100%; }
.flag::after { content: ""; position: absolute; left: 3px; top: 1px; width: 17px; height: 12px; background: var(--gold); clip-path: polygon(0 0, 100% 0, 72% 50%, 100% 100%, 0 100%); box-shadow: inset 0 -3px 0 #b47c2a; }
.site.pop .flag { animation: flag-pop .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.site.pop img { animation: site-glow 1.2s ease-out; }
@keyframes flag-pop { 0% { transform: scaleY(0); } 70% { transform: scaleY(1.15); } 100% { transform: scaleY(1); } }
@keyframes site-glow { 0% { filter: brightness(1.6) drop-shadow(0 0 6px var(--gold-soft)); } 100% { filter: none; } }
.sparkles { position: absolute; left: 50%; top: 10px; width: 0; height: 0; pointer-events: none; }
.sparkles i {
  --dx: 0px; --dy: 0px;     /* each sparkle's own direction, set by quest.js */
  position: absolute; left: -3px; top: -3px; width: 6px; height: 6px;
  background: var(--gold-soft); box-shadow: 0 0 0 1px #b47c2a;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: sparkle 1s ease-out both;
}
.sparkles.big i { width: 9px; height: 9px; background: #fff; }
@keyframes sparkle { 0% { transform: translate(0, 0) scale(.4); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.1); opacity: 0; } }

/* the banner that counts the places found */
#toast {
  position: absolute; z-index: 2; left: 50%; top: 14px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 14px; max-width: calc(100% - 24px);
  font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--gold-soft);
}
#toast::before { inset: 5px; }
#toast.show { animation: toast-in .45s cubic-bezier(.3, 1.4, .5, 1) both; }
#toast.all { border-color: var(--gold); font-size: 20px; }
.toast-flag { position: relative; flex: none; width: 3px; height: 26px; background: #2b1d2e; }
.toast-flag::after { content: ""; position: absolute; left: 3px; top: 1px; width: 15px; height: 11px; background: var(--gold); clip-path: polygon(0 0, 100% 0, 72% 50%, 100% 100%, 0 100%); }
.toast-text { position: relative; }
.toast-count { position: relative; flex: none; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 3px; color: var(--ink); font-family: var(--pixel); font-size: 13px; font-weight: 400; }
@keyframes toast-in { 0% { transform: translate(-50%, -24px); opacity: 0; } 100% { transform: translate(-50%, 0); opacity: 1; } }
.lab {
  position: absolute; left: 0; top: 0;
  padding: 2px 7px;
  border: 1px solid rgba(238, 245, 255, .7);
  background: rgba(4, 11, 29, .86);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  will-change: transform;
}
.lab.near { border-color: var(--gold-soft); background: var(--gold); color: var(--mat-deep); }
#hero, #npc {
  position: absolute; left: 0; top: 0;
  width: auto; height: 60px; max-width: none;
  image-rendering: pixelated;
  pointer-events: none;
  will-change: transform;
}
#hint {
  position: absolute; left: 12px; top: 12px; margin: 0;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  border: 2px solid var(--frame);
  background: rgba(4, 11, 29, .88);
  font-size: 15px;
}

/* The sign: the place's section from the List view, opened at its door. */
#card {
  position: absolute; z-index: 1; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(680px, calc(100% - 24px));
  max-height: 62%;
  overflow-y: auto;
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 48px 20px 22px;
}
/* on a wide screen the sign stands beside the walker; on a narrow one it may sit above (quest.js placeCard) */
#card.side { left: auto; right: 16px; top: 16px; bottom: auto; transform: none; width: min(560px, 42%); max-height: calc(100% - 32px); }
#card.side.left { right: auto; left: 16px; }
#card.at-top { top: 16px; bottom: auto; }
#toast.low { top: auto; bottom: 14px; }
#card.talking:not(.side) { max-height: 40%; }
#card .portrait { display: none; }
#card.with-face .portrait { display: block; flex: none; width: 68px; height: 120px; image-rendering: pixelated; }
#cardBody { position: relative; min-width: 0; }
#cardBody > h2 { margin: 0 0 8px; color: var(--gold-soft); font-size: 26px; line-height: 1.1; text-shadow: 2px 2px 0 var(--mat-deep); }
.window-close {
  position: absolute; right: 12px; top: 12px; z-index: 1;
  width: 34px; height: 34px;
  border: 1px solid var(--meta); border-radius: 2px;
  background: rgba(4, 11, 29, .62); color: var(--ink);
  font-size: 22px; line-height: 1; cursor: pointer;
}

/* --------------------------------------- places: the List view and signs */
.place p, .place li { font-size: 16px; }
.place > p:first-of-type { margin-top: 0; }
.place h3 { margin: 16px 0 4px; color: var(--gold); font-size: 18px; }
.place-links { margin: 6px 0 4px; padding: 0; list-style: none; }
.place-links li { position: relative; padding: 7px 0 7px 26px; border-top: 1px solid rgba(185, 200, 223, .2); }
.place-links li:first-child { border-top: 0; }
.place-links li::before { content: "☛"; position: absolute; left: 0; top: 6px; color: var(--gold); opacity: 0; }
.place-links li:hover::before, .place-links li:focus-within::before { opacity: 1; }
.place-links a { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.place-links-long p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.tool-list .tool-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
.tool-list .tool-item::before { display: none; }
.tool-list .tool-item { padding-left: 0; }
.tool-shot img { display: block; width: 112px; height: auto; border: 2px solid var(--bevel); border-radius: 2px; }
.welcome-lead { font-family: var(--serif); font-size: 20px !important; color: var(--gold-soft); }
.place h4 { margin: 12px 0 2px; color: var(--meta); font-family: var(--serif); font-size: 16px; }
.place-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.place-shot { margin: 0 0 12px; }
.place-shot img { display: block; width: 100%; max-width: 420px; border: 2px solid var(--bevel); border-radius: 2px; }
.go { margin-top: 10px; }
.go {
  min-height: 36px; padding: 0 12px;
  border: 1px solid var(--meta); border-radius: 2px;
  background: rgba(4, 11, 29, .5); color: var(--ink);
  font-family: var(--serif); font-weight: 700; cursor: pointer;
}
.go:hover { border-color: var(--gold); }

/* Without the map, the List view is the page. */
#places {
  width: min(860px, calc(100% - 24px));
  margin: 24px auto 48px;
  padding: 26px clamp(18px, 4vw, 40px) 30px;
}
#places .place { position: relative; padding: 20px 0; border-top: 1px solid var(--rule); scroll-margin-top: 16px; }
#places .place:first-child { border-top: 0; padding-top: 4px; }
#places .place > h2 { margin: 0 0 8px; color: var(--gold-soft); font-size: 26px; line-height: 1.1; }
#places .place > h2:focus { outline: none; }
.list-footer { position: relative; margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--meta); font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0; padding: 0; list-style: none; }
.copyright { margin-bottom: 0; }

/* With the map, the list opens as a panel beside it. */
.has-map #places { display: none; }
.has-map.list-open #places {
  display: block;
  flex: none;
  width: min(400px, 100%);
  margin: 0;
  overflow-y: auto;
  border-width: 0 0 0 3px;
  border-radius: 0;
  box-shadow: inset 2px 0 0 var(--bevel);
}
.has-map.list-open #places::before { display: none; }
.has-map .go:not([hidden]) { display: inline-flex; align-items: center; }

/* ---------------------------------------------- the starter screen */
.portrait { image-rendering: pixelated; }
.quest-dialog {
  width: min(1040px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.quest-dialog::backdrop { background: rgba(1, 4, 14, .8); }
.quest-dialog-frame {
  position: relative;
  padding: clamp(22px, 4vw, 40px);
  border: 4px solid var(--frame);
  border-radius: 6px;
  background:
    radial-gradient(circle at 100% 0, rgba(73, 123, 209, .42), transparent 36%),
    linear-gradient(155deg, #173b7a, #081738 72%);
  box-shadow: inset 0 0 0 3px var(--bevel), 9px 11px 0 rgba(2, 7, 21, .9);
}
.quest-dialog-frame::before {
  content: ""; position: absolute; inset: 9px;
  border: 1px solid rgba(232, 201, 121, .62); pointer-events: none;
}
.quest-dialog-header { position: relative; display: flex; gap: 20px; align-items: center; }
.quest-dialog-header .portrait {
  flex: none; width: 76px; height: 128px;
  padding: 4px; border: 2px solid var(--bevel); background: rgba(4, 11, 29, .5);
}
.quest-dialog h2 { margin: 0; color: var(--gold-soft); font-size: clamp(34px, 5vw, 52px); line-height: 1; text-shadow: 2px 3px 0 var(--mat-deep); }
.quest-dialog-intro { margin: 10px 0 0; max-width: 640px; color: var(--muted); font-family: var(--serif); font-size: 20px; line-height: 1.35; }
.quest-picker-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 20px; margin-top: 24px; }
.quest-choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quest-choice {
  position: relative;
  min-height: 140px;
  display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 12px;
  padding: 12px 12px 12px 26px;
  border: 2px solid var(--bevel); border-radius: 3px;
  background: rgba(4, 11, 29, .62); color: var(--ink);
  text-align: left; cursor: pointer;
  box-shadow: var(--shadow-small);
}
.quest-choice:hover { border-color: var(--gold); background: rgba(23, 59, 122, .78); }
.quest-choice[aria-pressed="true"] { border-color: var(--gold-soft); background: var(--surface-soft); box-shadow: inset 0 0 0 1px var(--gold), var(--shadow-small); }
.quest-cursor { position: absolute; left: 6px; top: 50%; translate: 0 -50%; color: var(--gold-soft); font-size: 17px; opacity: 0; }
.quest-choice[aria-pressed="true"] .quest-cursor { opacity: 1; }
.quest-choice-sprite { display: grid; place-items: end center; align-self: stretch; }
.quest-choice-sprite img, .quest-detail-art img { width: auto; image-rendering: pixelated; }
.quest-choice-sprite img { width: 72px; height: auto; max-height: 100px; }
.picker-step { position: relative; margin: 22px 0 10px; color: var(--gold); font-size: 20px; }
.character-list { position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.character-choice {
  position: relative; display: grid; place-items: end center;
  min-height: 92px; padding: 8px 4px 6px;
  border: 2px solid var(--bevel); border-radius: 3px;
  background: rgba(4, 11, 29, .62); cursor: pointer;
  box-shadow: var(--shadow-small);
}
.character-choice img { width: auto; height: 72px; image-rendering: pixelated; }
.character-choice:hover { border-color: var(--gold); background: rgba(23, 59, 122, .78); }
.character-choice[aria-checked="true"] { border-color: var(--gold-soft); background: var(--surface-soft); box-shadow: inset 0 0 0 1px var(--gold), var(--shadow-small); }
.character-choice .quest-cursor { left: 5px; top: 8px; translate: none; }
.character-choice[aria-checked="true"] .quest-cursor { opacity: 1; }
.quest-choice-copy { display: grid; gap: 2px; min-width: 0; }
.quest-choice-copy strong { color: var(--gold-soft); font-family: var(--display); font-size: 22px; line-height: 1; }
.quest-choice-copy > span { font-family: var(--serif); font-size: 17px; line-height: 1.15; }
.quest-detail-stack { border: 2px solid var(--meta); background: linear-gradient(180deg, rgba(16, 43, 98, .92), rgba(4, 11, 29, .92)); box-shadow: inset 0 0 0 1px var(--bevel); }
.quest-detail { padding: 20px; }
/* Every course's details share one grid cell, the unselected ones invisible, so
   the box is always as tall as the longest and nothing beside it jumps. */
.quest-detail-stack { display: grid; }
.quest-detail-stack > .quest-detail { grid-area: 1 / 1; }
.quest-detail-stack > .quest-detail[hidden] { display: block !important; visibility: hidden; }
.quest-picker-layout { align-items: start; }
.quest-choice-list { align-content: start; }
.quest-detail-art {
  height: 150px; display: grid; place-items: end center;
  margin: -4px -4px 14px;
  border-bottom: 2px solid var(--gold);
  background: radial-gradient(ellipse at 50% 100%, rgba(92, 145, 228, .4), transparent 68%);
}
.quest-detail-art img { width: auto; height: 132px; }
.quest-detail h3 { margin: 0; color: var(--gold-soft); font-size: 26px; line-height: 1.05; }
.quest-detail > p { margin: 10px 0 16px; color: var(--muted); font-size: 16px; }
.quest-dialog-footer {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.quest-dialog-footer p { max-width: 380px; margin: 0; color: var(--meta); font-size: 14px; text-align: right; }
.quest-help ul { position: relative; margin: 18px 0 22px; padding-left: 20px; }
.quest-help li { margin-bottom: 8px; }
.quest-help form { position: relative; }
.quest-help { width: min(620px, calc(100% - 32px)); }

/* --------------------------------------------------------------- 404 */
.lost { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.lost-window { width: min(620px, 100%); padding: 34px; }
.lost-window .portrait { position: relative; float: left; width: 68px; height: 120px; margin: 0 22px 8px 0; }
.lost-window .place-actions { clear: both; position: relative; }
.lost-window h1 { position: relative; margin: 0 0 10px; color: var(--gold-soft); font-size: 40px; line-height: 1.05; }
.lost-window p { position: relative; }

/* ------------------------------------------------------ smaller screens */
@media (max-width: 900px) {
  .quest-picker-layout { grid-template-columns: 1fr; }
  .quest-detail { display: grid; grid-template-columns: 130px 1fr; column-gap: 18px; align-items: center; }
  .quest-detail-stack > .quest-detail[hidden] { display: grid !important; }
  .quest-detail-art { grid-row: 1 / 4; height: 100%; min-height: 180px; margin: 0; border: 0; border-right: 2px solid var(--gold); }
  .quest-detail .button { justify-self: start; }
}
@media (max-width: 700px) {
  .bar { flex-direction: column; min-height: 0; }
  .bar-brand { padding: 6px 12px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .bar-portrait { width: 20px; height: 36px; }
  .brand-name { font-size: 13px; }
  .page-title { font-size: 20px; }
  .bar-actions { padding: 6px 8px; gap: 6px; flex-wrap: nowrap; }
  .bar-actions > .btn, .bar-actions > .menu { flex: 1 1 0; min-width: 0; }
  .bar-actions .btn { width: 100%; min-height: 40px; padding: 6px 4px; font-size: 14px; white-space: normal; text-align: center; }
  .menu { position: static; }
  .menu-panel, .menu-panel.right { left: 8px; right: 8px; top: calc(100% + 6px); min-width: 0; width: auto; max-width: none; }
  .menu-panel a { font-size: 16px; white-space: normal; }
  .has-map.list-open #places { position: absolute; inset: 0; z-index: 4; width: 100%; border-width: 0; }
  #card { bottom: 8px; padding: 16px 44px 16px 16px; max-height: 62%; }
  #card.at-top { top: 8px; bottom: auto; }
  #card.with-face .portrait { width: 34px; height: 60px; }
  .tool-list .tool-item { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; }
  .tool-shot img { width: 76px; }
  #cardBody > h2 { font-size: 22px; }
  .quest-dialog { width: calc(100% - 12px); max-height: calc(100dvh - 12px); }
  .quest-dialog-frame { padding: 20px 16px; }
  .quest-dialog-header .portrait { width: 42px; height: 68px; }
  .quest-dialog-intro { font-size: 17px; }
  .quest-choice-list { gap: 8px; }
  .quest-choice { min-height: 112px; grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 10px 8px; gap: 4px; }
  .quest-choice-sprite img { width: 52px; }
  .character-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .character-choice { min-height: 76px; }
  .character-choice img { height: 56px; }
  .quest-choice-copy strong { font-size: 18px; }
  .quest-choice-copy > span { font-size: 14px; }
  .quest-cursor { left: 6px; top: 14px; translate: none; }
  .quest-detail { display: block; padding: 14px; }
  .quest-detail-stack > .quest-detail[hidden] { display: block !important; }
  .quest-detail-art { display: none; }
  .quest-dialog-footer { flex-direction: column; align-items: stretch; }
  .quest-dialog-footer p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .button:active { transform: none; }
  .site.pop .flag, .site.pop img, #toast.show { animation: none; }
}

/* ------------------------------------------- day and night (2026-11-29) */
#shade, #glow { position: absolute; left: 0; top: 0; pointer-events: none; }
#shade { z-index: 99998; mix-blend-mode: multiply; }
#glow { z-index: 99999; }

/* Dr. Echols's speech bubble */
#bubble {
  position: absolute; left: 0; top: 0; z-index: 100001; margin: 0;
  width: max-content; max-width: min(300px, 80vw);
  padding: 10px 14px;
  font-size: 16px; line-height: 1.35; color: var(--ink);
  pointer-events: none; will-change: transform;
}
#bubble::after {
  content: ""; position: absolute; left: var(--tail, 50%); bottom: -9px; width: 14px; height: 9px; margin-left: -7px;
  background: var(--frame); clip-path: polygon(0 0, 100% 0, 50% 100%);
}
#bubble.show { animation: bubble-in .3s ease-out both; }
@keyframes bubble-in { 0% { opacity: 0; margin-top: 8px; } 100% { opacity: 1; margin-top: 0; } }

/* the fishing dock */
.lab-dock { border-style: dashed; }
.fish-status { margin: 0 0 10px; font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--gold-soft); }
.fish-catch { position: relative; margin: 0 0 12px; padding: 12px 14px 4px 86px; border: 1px solid var(--rule); background: rgba(4, 11, 29, .45); }
.fish-img { position: absolute; left: 12px; top: 14px; width: 64px; height: auto; image-rendering: pixelated; }
.fish-quote { margin: 0 0 6px; font-family: var(--serif); font-size: 19px; font-style: italic; line-height: 1.4; }
.fish-source { margin: 0; font-size: 15px; color: var(--meta); }
.fish-source cite { font-style: italic; }
.fish-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.logbook-list { margin: 8px 0 0; padding: 0; list-style: none; max-height: 52vh; overflow-y: auto; }
.logbook-list > li { padding: 12px 0; border-top: 1px solid rgba(185, 200, 223, .2); }
.logbook-list .place-links { margin: 4px 0 0; }
.logbook-count, .logbook-hint { margin: 0; }
.logbook-hint:empty { display: none; }
.logbook-hint { margin-top: 10px; font-style: italic; color: var(--gold-soft); }

/* the secret character, once found */
.character-choice.secret { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-soft); }

@media (max-width: 600px) {
  .fish-catch { padding-left: 14px; }
  .fish-img { position: static; display: block; margin-bottom: 6px; width: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  #bubble.show { animation: none; }
}
/* beside Dr. Echols, when there is no room above him */
#bubble.side::after { left: -9px; top: 18px; bottom: auto; margin: 0; width: 9px; height: 14px; clip-path: polygon(100% 0, 100% 100%, 0 50%); }
#bubble.side.left::after { left: auto; right: -9px; clip-path: polygon(0 0, 0 100%, 100% 50%); }
/* the line under the banner when the secret character joins */
.toast-sub { display: block; margin-top: 4px; font-family: var(--read); font-size: 15px; font-weight: 400; color: var(--ink); }
