/* Hearth: status and wake page for the Boat Damage Inc. Valheim server. */

:root {
  --night-0: #04060e;
  --night-1: #0b1020;
  --night-2: #121a31;
  --night-3: #1a2440;
  --line: #2a3557;
  --line-hi: #3d4b78;
  --text: #edf1f9;
  --text-2: #bcc5da;
  --text-3: #93a0bf;
  --aurora: #6ff0cb;
  --ember: #ffb454;
  --ember-hi: #ffc977;
  --dawn: #ffd88a;
  --frost: #b9c6ea;
  --blood: #ff9d9d;
  --focus: #ffd76a;
  --ink: #1b1006;
  --font-display: "Jersey 15", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Alegreya Sans", "Gill Sans", "Seravek", "Segoe UI", system-ui, sans-serif;
  --font-rune: "Noto Sans Runic", "Segoe UI Historic", "Apple Symbols", serif;
  --tone: var(--dawn);
  color-scheme: dark;
}

body[data-tone="go"] { --tone: var(--aurora); }
body[data-tone="warn"] { --tone: var(--ember); }
body[data-tone="wait"] { --tone: var(--dawn); }
body[data-tone="rest"] { --tone: var(--frost); }
body[data-tone="bad"] { --tone: var(--blood); }

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night-0);
  color: var(--text);
  font: 400 17px/1.5 var(--font-body);
  font-synthesis: none;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

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

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ── Sprites ─────────────────────────────────────────────────────
   The only place sprite files are named. Each file is a horizontal strip
   of equal frames; --frames is the count and aspect-ratio is one frame's
   width / height (from sprites.json). Elements set one dimension. */

.sprite {
  --frames: 1;
  --dur: 1s;
  display: block;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: calc(var(--frames) * 100%) 100%;
}

.sprite--fire-lit       { --frames: 3; --dur: 0.45s; aspect-ratio: 203 / 196; background-image: url("fire-lit.webp"); }
.sprite--fire-kindling  { --frames: 3; --dur: 0.6s;  aspect-ratio: 203 / 196; background-image: url("fire-kindling.webp"); }
.sprite--fire-embers    { --frames: 3; --dur: 1.2s;  aspect-ratio: 203 / 196; background-image: url("fire-embers.webp"); }
.sprite--fire-ashes     { --frames: 2; --dur: 1.6s;  aspect-ratio: 203 / 196; background-image: url("fire-ashes.webp"); }
.sprite--log            { aspect-ratio: 148 / 128; background-image: url("log.webp"); }
.sprite--runestone      { aspect-ratio: 137 / 182; background-image: url("runestone.webp"); }
.sprite--runestone-glow { aspect-ratio: 183 / 200; background-image: url("runestone-glow.webp"); }
.sprite--raven          { aspect-ratio: 102 / 90;  background-image: url("raven.webp"); }
.sprite--raven-fly      { --frames: 2; --dur: 0.4s; aspect-ratio: 174 / 173; background-image: url("raven-fly.webp"); }
.sprite--viking-1       { aspect-ratio: 142 / 159; background-image: url("viking-1.webp"); }
.sprite--viking-2       { aspect-ratio: 144 / 142; background-image: url("viking-2.webp"); }
.sprite--viking-3       { aspect-ratio: 142 / 154; background-image: url("viking-3.webp"); }
.sprite--longship-icon  { aspect-ratio: 149 / 126; background-image: url("longship-icon.webp"); }
.sprite--longship       { aspect-ratio: 1100 / 769; background-image: url("longship.webp"); }
.sprite--portal         { aspect-ratio: 125 / 160; background-image: url("portal.webp"); }
.banner-art,
.shore-track::after     { background-image: url("banner.webp"); }

/* Extras: banner cameos, state props on the card, and the shoreline bestiary. */
.sprite--serpent            { aspect-ratio: 164 / 160; background-image: url("serpent.webp"); }
.sprite--moder              { aspect-ratio: 166 / 160; background-image: url("moder.webp"); }
.sprite--deathsquito        { aspect-ratio: 186 / 160; background-image: url("deathsquito.webp"); }
.sprite--sacrificial-stones { aspect-ratio: 154 / 160; background-image: url("sacrificial-stones.webp"); }
.sprite--mead               { aspect-ratio: 155 / 160; background-image: url("mead.webp"); }
.sprite--shield             { aspect-ratio: 155 / 160; background-image: url("shield.webp"); }
.sprite--troll              { aspect-ratio: 116 / 160; background-image: url("troll.webp"); }
.sprite--frostner-and-bow   { aspect-ratio: 160 / 160; background-image: url("frostner-and-bow.webp"); }
.sprite--tombstone          { aspect-ratio: 106 / 160; background-image: url("tombstone.webp"); }
.sprite--longhouse          { aspect-ratio: 168 / 160; background-image: url("longhouse.webp"); }
.sprite--eikthyr            { aspect-ratio: 133 / 160; background-image: url("eikthyr.webp"); }
.sprite--the-elder          { aspect-ratio: 135 / 160; background-image: url("the-elder.webp"); }
.sprite--bonemass           { aspect-ratio: 155 / 160; background-image: url("bonemass.webp"); }
.sprite--yagluth            { aspect-ratio: 139 / 160; background-image: url("yagluth.webp"); }
.sprite--the-queen          { aspect-ratio: 138 / 160; background-image: url("the-queen.webp"); }
.sprite--greydwarf          { aspect-ratio: 170 / 160; background-image: url("greydwarf.webp"); }
.sprite--draugr             { aspect-ratio: 145 / 160; background-image: url("draugr.webp"); }
.sprite--lox                { aspect-ratio: 186 / 160; background-image: url("lox.webp"); }

/* Steps through the strip: frame i sits at i/(N-1) of the overflow. */
.sprite--anim { animation: sprite-run var(--dur) steps(var(--frames)) infinite; }

@keyframes sprite-run {
  to { background-position-x: calc(100% * var(--frames) / (var(--frames) - 1)); }
}

/* ── Banner ──────────────────────────────────────────────────── */

.banner {
  position: relative;
  height: clamp(300px, 40vw, 560px);
  overflow: hidden;
}

.banner-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 50% 60%;
  background-repeat: no-repeat;
  transition: filter 1.2s;
}

/* Fade the scene into the page. */
.banner-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to bottom, rgba(4, 6, 14, 0), var(--night-0) 92%);
}

body[data-sky="dim"] .banner-art { filter: brightness(0.82) saturate(0.85); }
body[data-sky="off"] .banner-art { filter: brightness(0.5) saturate(0.6); }
body[data-paused="true"] .banner-art { filter: grayscale(0.75) brightness(0.6); }

.banner-text {
  position: relative;
  padding: clamp(26px, 5vw, 56px) 16px 0;
  text-align: center;
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(4, 6, 14, 0.9);
}

.eyebrow {
  margin: 0;
  font: 700 13px/1.2 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
}

.title {
  margin: 4px 0 0;
  font: 400 clamp(42px, 10vw, 84px)/0.95 var(--font-display);
  letter-spacing: 0.01em;
  text-shadow: 0 4px 0 #000, 0 0 28px rgba(4, 6, 14, 0.9);
}

.runes {
  margin: 8px 0 0;
  font: 400 16px/1 var(--font-rune);
  letter-spacing: 0.34em;
  color: #59c9ad;
}

.flyer {
  position: absolute;
  left: -80px;
  top: 30%;
  width: clamp(44px, 6vw, 72px);
  opacity: 0;
  transition: opacity 0.6s;
}

body[data-raven="flying"] .flyer {
  opacity: 1;
  animation: sprite-run var(--dur) steps(var(--frames)) infinite, fly 13s linear infinite;
}

@keyframes fly {
  from { transform: translate(0, 0); }
  50% { transform: translate(calc(50vw + 40px), -18px); }
  to { transform: translate(calc(100vw + 160px), 6px); }
}

/* ── Layout ──────────────────────────────────────────────────── */

.layout {
  position: relative;
  display: grid;
  gap: 28px;
  max-width: 1200px;
  margin: -72px auto 0;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .layout { padding-inline: 32px; margin-top: -96px; }
}

@media (min-width: 1040px) {
  .layout {
    grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
  }
}

/* ── Status panel ────────────────────────────────────────────── */

.panel {
  position: relative;
  width: calc(100% - 8px);
  max-width: 640px;
  margin: 4px auto;
  padding: 22px 20px 20px;
  background: var(--night-1);
  box-shadow:
    0 -4px 0 0 var(--line),
    0 4px 0 0 var(--line),
    -4px 0 0 0 var(--line),
    4px 0 0 0 var(--line);
}

@media (min-width: 480px) {
  .panel { padding: 26px 28px 28px; }
}

@media (min-width: 1040px) {
  .panel { max-width: none; margin: 4px; }
}

/* The raven keeps watch from the top edge of the card. */
.perch {
  position: absolute;
  right: 22px;
  top: -42px;
  width: 52px;
  opacity: 0;
  transition: opacity 0.6s;
}

body[data-raven="perched"] .perch { opacity: 1; }

.panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hearth {
  position: relative;
  flex: none;
  width: clamp(84px, 22vw, 104px);
  aspect-ratio: 203 / 196;
}

.hearth .fire {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s;
}

body[data-fire="lit"] .fire--lit,
body[data-fire="kindling"] .fire--kindling,
body[data-fire="embers"] .fire--embers,
body[data-fire="ashes"] .fire--ashes { opacity: 1; }

.hearth-glow {
  position: absolute;
  inset: -30%;
  opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 150, 60, 0.28), rgba(255, 120, 40, 0) 100%);
  transition: opacity 0.9s;
  animation: flicker 1.4s infinite;
}

body[data-fire="lit"] .hearth-glow { opacity: 1; }
body[data-fire="kindling"] .hearth-glow { opacity: 0.6; }
body[data-fire="embers"] .hearth-glow { opacity: 0.4; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 12px 6px 10px;
  font: 400 18px/1.1 var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tone);
  background: var(--night-2);
  box-shadow: inset 0 0 0 2px var(--night-3);
}

.badge-dot {
  width: 10px;
  height: 10px;
  flex: none;
  background: var(--tone);
}

body[data-tone="go"] .badge-dot { animation: beacon 1.6s steps(2) infinite; }

.headline {
  margin: 10px 0 0;
  font: 400 clamp(28px, 6.5vw, 36px)/1.02 var(--font-display);
  text-wrap: balance;
}

.lede {
  margin: 14px 0 0;
  max-width: 44ch;
  font-size: 18px;
  color: var(--text-2);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  margin: 22px 0 0;
}

.fact {
  min-width: 0;
  padding: 12px 12px 10px;
  background: var(--night-2);
  box-shadow: inset 0 0 0 2px var(--night-3);
}

.fact dt {
  font: 700 13px/1.2 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.fact dd {
  margin: 6px 0 0;
  font: 400 24px/1.05 var(--font-display);
  color: var(--text);
  overflow-wrap: anywhere;
}

.crew {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 3px;
  margin-top: 8px;
}

.crew:empty { display: none; }

.crew-icon { height: 32px; }

.crew-more {
  align-self: center;
  margin-left: 4px;
  font: 400 18px/1 var(--font-display);
  color: var(--text-2);
}

.save {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* The glowing stone carries a halo, so it is larger than the plain one:
   183×200 around a 137×182 stone. Offsets keep the stone in place. */
.save-stone {
  --s: 0.17px;
  position: relative;
  flex: none;
  width: calc(137 * var(--s));
  height: calc(182 * var(--s));
}

.stone { position: absolute; left: 0; top: 0; width: 100%; }

.stone--glow {
  left: calc(-23 * var(--s));
  top: calc(-9 * var(--s));
  width: calc(183 * var(--s));
  opacity: 0;
  transition: opacity 1.2s;
}

body[data-runes="on"] .stone--glow { opacity: 1; animation: rune-pulse 2.4s ease-in-out infinite alternate; }

.join {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 14px;
  background: var(--night-2);
  box-shadow: inset 0 0 0 2px var(--line);
}

.portal {
  flex: none;
  height: 64px;
}

.join-body { min-width: 0; }

.join-label {
  margin: 0 0 6px;
  font: 700 13px/1.2 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.join-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.address {
  font: 600 20px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--aurora);
  overflow-wrap: anywhere;
}

.join-hint {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--text-3);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.actions:not(:has(> :not([hidden]))) { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px;
  border: 0;
  border-radius: 0;
  font: 400 21px/1.05 var(--font-display);
  color: var(--ink);
  text-decoration: none;
  background: var(--ember);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.28), 0 4px 0 #000;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover { background: var(--ember-hi); }

.btn:active {
  transform: translateY(3px);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.28), 0 1px 0 #000;
}

.btn:disabled { cursor: progress; opacity: 0.7; }

.btn--quiet {
  color: var(--text);
  background: var(--night-3);
  box-shadow: inset 0 0 0 2px var(--line-hi), 0 4px 0 #000;
}

.btn--quiet:hover { background: var(--line); }

.btn--small {
  min-height: 44px;
  padding: 8px 14px;
  font: 700 16px/1.15 var(--font-body);
  letter-spacing: 0.02em;
}

.btn-icon {
  flex: none;
  width: 40px;
  margin-left: -6px;
}

.btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.btn-sub {
  font: 500 13px/1.2 var(--font-body);
  opacity: 0.85;
}

.reason {
  margin: 18px 0 0;
  font-size: 15px;
  color: var(--text-3);
}

.reason:empty { display: none; }

.note {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--tone);
}

.noscript {
  margin: 16px 0 0;
  color: var(--ember);
}

/* ── Hero ship ───────────────────────────────────────────────── */

.hero {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 0 4%;
}

/* A pool of dark water under the hull. */
.hero::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 6%;
  bottom: 0;
  height: 16%;
  background: radial-gradient(closest-side, rgba(40, 90, 140, 0.32), rgba(40, 90, 140, 0) 100%);
}

.ship {
  position: relative;
  width: 100%;
  transform-origin: 50% 88%;
  animation: rock 7s ease-in-out infinite;
}

body[data-ui="asleep"] .ship { animation-duration: 14s; }
body[data-paused="true"] .ship { animation-play-state: paused; }

/* ── Footer ──────────────────────────────────────────────────── */

.foot {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 18px 16px 40px;
  border-top: 2px solid var(--night-3);
  font-size: 15px;
  color: var(--text-3);
}

@media (min-width: 720px) {
  .foot { padding-inline: 32px; }
}

.foot p { margin: 0 0 6px; max-width: 70ch; }

.foot-mark {
  flex: none;
  width: 44px;
  margin-top: 2px;
}

.test-mode {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  font: 400 16px/1.3 var(--font-display);
  color: var(--dawn);
  background: var(--night-2);
  box-shadow: inset 0 0 0 2px var(--night-3);
}

/* ── Motion ──────────────────────────────────────────────────── */

@keyframes beacon {
  to { opacity: 0.35; }
}

@keyframes flicker {
  0% { opacity: 0.86; }
  22% { opacity: 1; }
  41% { opacity: 0.8; }
  63% { opacity: 0.96; }
  82% { opacity: 0.76; }
  100% { opacity: 0.9; }
}

@keyframes rune-pulse {
  from { opacity: 0.65; }
  to { opacity: 1; }
}

@keyframes rock {
  0%, 100% { transform: rotate(-1deg) translateY(0); }
  50% { transform: rotate(1deg) translateY(-5px); }
}

body[data-paused="true"] .hearth *,
body[data-paused="true"] .panel * { animation-play-state: paused !important; }

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

/* ── Banner cameos ───────────────────────────────────────────────
   Rare visitors, started by app.js one at a time. The stage matches the
   cover-fitted banner art (positioned 50% 60%), so spots are in art pixels. */

.banner { container-type: size; }

.banner-stage {
  --s: max(100cqw / 1983, 100cqh / 793);
  position: absolute;
  left: calc((100cqw - 1983 * var(--s)) * 0.5);
  top: calc((100cqh - 793 * var(--s)) * 0.6);
  width: calc(1983 * var(--s));
  height: calc(793 * var(--s));
}

.cameo {
  position: absolute;
  display: none;
  pointer-events: none;
}

/* Warm loads the art a moment before the cameo shows. */
.cameo.is-warm { display: block; visibility: hidden; }
.cameo.is-on { visibility: visible; }

.cameo-tag {
  position: absolute;
  white-space: nowrap;
  font: 700 12px/1.2 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  text-shadow: 0 1px 0 #000, 0 0 8px var(--night-0), 0 0 2px var(--night-0);
  opacity: 0;
}

.cameo.is-on .cameo-tag { animation: cameo-tag 5.5s ease-in-out 0.8s both; }

/* The serpent rises out of the water at a spot app.js picks (--cx, --cy). */
.cameo--serpent {
  left: var(--cx, 80%);
  top: var(--cy, 76%);
  width: calc(118 * var(--s));
  height: calc(118 * var(--s));
  transform: translate(-50%, -100%);
}

.serpent-water {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.serpent-art {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  transform: translateY(100%);
}

.cameo--serpent.is-on .serpent-art { animation: surface 7.5s ease-in-out forwards; }

.ripple {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -5%;
  height: 12%;
  border: 2px solid rgba(160, 200, 240, 0.45);
  border-radius: 50%;
  opacity: 0;
}

.cameo--serpent.is-on .ripple { animation: ripple 7.5s ease-out forwards; }
.cameo--serpent .cameo-tag { left: 50%; bottom: 100%; transform: translate(-50%, -4px); }

.cameo--moder {
  left: 100%;
  top: 8%;
  width: calc(150 * var(--s));
}

.moder-art { width: 100%; }
.cameo--moder.is-on { animation: glide 17s linear forwards; }
.cameo--moder.is-on .moder-art { animation: hover-bob 2.6s ease-in-out infinite alternate; }
.cameo--moder .cameo-tag { left: 50%; top: 100%; transform: translate(-50%, 4px); }

.cameo--deathsquito {
  left: 100%;
  top: 3%;
  width: clamp(40px, 5vw, 60px);
}

.deathsquito-art { width: 100%; }
.cameo--deathsquito.is-on { animation: buzz 9s linear forwards; }
.cameo--deathsquito.is-on .deathsquito-art { animation: jitter 0.18s steps(2) infinite; }
.cameo--deathsquito .cameo-tag { left: 100%; top: 25%; margin-left: 6px; }

@keyframes cameo-tag {
  0% { opacity: 0; }
  15%, 80% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes surface {
  0% { transform: translateY(100%); }
  22% { transform: translateY(14%); }
  72% { transform: translateY(18%); }
  100% { transform: translateY(105%); }
}

@keyframes ripple {
  0% { opacity: 0; transform: scale(0.4); }
  15% { opacity: 0.8; }
  60% { opacity: 0.5; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.4); }
}

@keyframes glide {
  from { transform: translate(0, 0); }
  50% { transform: translate(calc(-991 * var(--s) - 50%), 8%); }
  to { transform: translate(calc(-1983 * var(--s) - 100%), -6%); }
}

@keyframes hover-bob {
  to { transform: translateY(10%); }
}

@keyframes buzz {
  0% { transform: translate(0, 0); }
  12% { transform: translate(-22vw, 18px); }
  20% { transform: translate(-30vw, -10px); }
  28% { transform: translate(-36vw, 14px); }
  36% { transform: translate(-44vw, -6px); }
  44% { transform: translate(-48vw, 20px); }
  52% { transform: translate(-52vw, -4px); }
  60% { transform: translate(-58vw, 16px); }
  72% { transform: translate(-70vw, -8px); }
  100% { transform: translate(calc(-100vw - 80px), 10px); }
}

@keyframes jitter {
  to { transform: translate(1px, -2px); }
}

/* ── State props ─────────────────────────────────────────────────
   One prop stands on the card's top-left edge, opposite the raven; which
   one depends on the server state. Each explains itself on hover or focus. */

.camp {
  position: absolute;
  left: 22px;
  top: 2px;
  width: 0;
  height: 0;
}

.camp-prop {
  position: absolute;
  left: 0;
  bottom: 0;
  display: none;
  align-items: flex-end;
  gap: 2px;
  margin: 0;
}

body[data-camp="stones"] .camp-prop--stones,
body[data-camp="mead"] .camp-prop--mead,
body[data-camp="feast"] .camp-prop--feast,
body[data-camp="troll"] .camp-prop--troll,
body[data-camp="gear"] .camp-prop--gear,
body[data-camp="tombstone"] .camp-prop--tombstone,
body[data-camp="longhouse"] .camp-prop--longhouse {
  display: flex;
  animation: prop-in 0.7s ease-out both;
}

.prop-art {
  flex: none;
  height: 56px;
}

@media (min-width: 480px) {
  .prop-art { height: 64px; }
}

.tip {
  position: absolute;
  left: 0;
  bottom: 100%;
  z-index: 2;
  width: max-content;
  max-width: min(260px, 70vw);
  margin-bottom: 8px;
  padding: 8px 10px;
  font: 400 15px/1.35 var(--font-body);
  color: var(--text);
  background: var(--night-2);
  box-shadow: inset 0 0 0 2px var(--line-hi);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.camp-prop:hover .tip,
.camp-prop:focus .tip { opacity: 1; }

.zzz {
  position: absolute;
  left: 72%;
  bottom: 78%;
  font: 400 18px/1 var(--font-display);
  color: var(--frost);
}

.zzz span {
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0;
  animation: zzz 3.6s ease-out infinite;
}

.zzz span:nth-child(2) { font-size: 22px; animation-delay: 1.2s; }
.zzz span:nth-child(3) { font-size: 26px; animation-delay: 2.4s; }

@keyframes prop-in {
  from { opacity: 0; transform: translateY(6px); }
}

@keyframes zzz {
  0% { opacity: 0; transform: translate(0, 0); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(14px, -30px); }
}

/* ── Employee of the Month ───────────────────────────────────────
   Jim, the troll who cleared the land for the base. Static on purpose. */

.eotm {
  max-width: 1200px;
  margin: 48px auto 0;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .eotm { padding-inline: 32px; }
}

.plaque {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 720px;
  padding: 20px;
  border: 3px solid var(--ember);
  outline: 2px solid var(--ink);
  outline-offset: -7px;
  background: linear-gradient(160deg, #2b1a0e 0%, var(--ink) 70%);
  box-shadow: 0 0 0 2px var(--night-0), 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 180, 84, 0.12);
  text-align: center;
}

@media (min-width: 560px) {
  .plaque { flex-direction: row; align-items: center; gap: 24px; padding: 22px 26px; text-align: left; }
}

.plaque-frame {
  flex: none;
  display: grid;
  place-items: end center;
  width: 128px;
  height: 152px;
  padding: 10px 8px 6px;
  border: 3px solid var(--ember-hi);
  background: radial-gradient(circle at 50% 35%, var(--night-3), var(--night-1) 75%);
  box-shadow: inset 0 0 0 2px var(--ink), 0 4px 0 rgba(0, 0, 0, 0.4);
}

.plaque-troll { width: 96px; }

.plaque-kicker {
  margin: 0;
  font: 700 13px/1.2 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember-hi);
}

.plaque-kicker::before,
.plaque-kicker::after { content: "★"; margin: 0 0.5em; color: var(--ember); }

.plaque-name {
  margin: 4px 0 0;
  font: 400 clamp(40px, 9vw, 52px)/0.95 var(--font-display);
  color: var(--dawn);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}

.plaque-role {
  margin: 2px 0 0;
  font: 400 20px/1.2 var(--font-display);
  color: var(--text-2);
}

.plaque-citation {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.45;
  color: var(--text);
}

.plaque-tenure {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--text-3);
}

/* ── Bestiary ────────────────────────────────────────────────────
   Below the status, lazily loaded: app.js adds .is-near as it scrolls close. */

.bestiary {
  max-width: 1200px;
  margin: 48px auto 0;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .bestiary { padding-inline: 32px; }
}

.bestiary:not(.is-near) .sprite,
.bestiary:not(.is-near) .shore-track::after { background-image: none !important; }

.bestiary-title {
  margin: 0;
  font: 400 clamp(28px, 6vw, 34px)/1.05 var(--font-display);
}

.bestiary-sub {
  margin: 6px 0 0;
  font-size: 16px;
  color: var(--text-3);
}

.bestiary-sub + .shore { margin-top: 4px; }
.shore + .bestiary-sub { margin-top: 18px; }

.shore {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.shore-track {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 70px 18px 30px;
  list-style: none;
}

/* Ground: the rocky foreshore from the bottom of the banner art. */
.shore-track::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46px;
  background-repeat: repeat-x;
  background-size: auto 380px;
  background-position: 0 90%;
}

.beast {
  position: relative;
  z-index: 1;
  flex: none;
}

.beast-art {
  height: var(--h, 96px);
  transition: transform 0.2s;
}

.beast:hover .beast-art,
.beast:focus .beast-art { transform: translateY(-4px); }

.beast--eikthyr { --h: 112px; }
.beast--the-elder { --h: 124px; }
.beast--bonemass { --h: 108px; }
.beast--moder { --h: 112px; }
.beast--yagluth { --h: 112px; }
.beast--the-queen { --h: 104px; }
.beast--troll { --h: 104px; }
.beast--greydwarf { --h: 72px; }
.beast--draugr { --h: 86px; }
.beast--lox { --h: 104px; }
.beast--deathsquito { --h: 52px; margin-bottom: 48px; }

@media (max-width: 479px) {
  .beast-art { height: calc(var(--h, 96px) * 0.82); }
  .shore-track { gap: 20px; }
}

.beast-name {
  position: absolute;
  left: 50%;
  bottom: 100%;
  z-index: 2;
  margin-bottom: 8px;
  padding: 6px 10px;
  white-space: nowrap;
  text-align: center;
  font: 400 18px/1.1 var(--font-display);
  color: var(--text);
  background: var(--night-2);
  box-shadow: inset 0 0 0 2px var(--line-hi);
  opacity: 0;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 0.15s;
}

.beast-where {
  display: block;
  margin-top: 2px;
  font: 700 11px/1.3 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.beast:hover .beast-name,
.beast:focus .beast-name { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .cameo { display: none !important; }
  .zzz span { opacity: 0.8; }
  .zzz span:nth-child(2) { transform: translate(8px, -12px); }
  .zzz span:nth-child(3) { transform: translate(16px, -26px); }
}
