/* CribbbMC — public site stylesheet.
 *
 * Hand-built. No game textures or assets: every pattern below is a CSS gradient, and the
 * pixel icons in index.html are original 16x16 drawings.
 *
 * Heading font: Pixelify Sans, (c) 2021 The Pixelify Sans Project Authors,
 * licensed under the SIL Open Font License 1.1 — full text in fonts/OFL.txt.
 * Self-hosted; used for headings and labels only. Body text is the system sans.
 */

@font-face {
  font-family: "Pixelify Sans";
  src: url("/fonts/pixelify-sans-600.woff2?v=1") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Deepslate and stone */
  --bg: #1b1c21;
  --bg-2: #232429;
  --panel: #2c2d34;
  --panel-hi: #3b3c45;
  --panel-lo: #15161a;
  --slot: #202127;
  --slot-hi: #4a4b55;
  --slot-lo: #0e0e11;
  --edge: #09090b;

  /* Text — all pairs checked at WCAG AA or better on --bg, --panel and --slot */
  --text: #eeede8;
  --muted: #bdbbb3;
  --faint: #a09e96;

  /* Accents */
  --grass: #6cc644;
  --grass-dk: #3f7d25;
  --dirt: #6b4a2f;
  --dirt-dk: #4a3220;
  --emerald: #41d97c;
  --emerald-dk: #1e7a43;
  --amethyst: #c29bf5;
  --amethyst-dk: #5b3591;
  --gold: #f2c230;
  --red: #ff7a6e;
  --red-dk: #8e2620;

  --font-pixel: "Pixelify Sans", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --hotbar-h: 76px;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font-body);
  background-color: var(--bg);
  /* Deepslate: a faint 4px dither over horizontal strata. Pure CSS, no image. */
  background-image:
    repeating-conic-gradient(rgba(255, 255, 255, .018) 0 25%, transparent 0 50%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 22px, rgba(255, 255, 255, .02) 22px 24px, transparent 24px 46px);
  background-size: 8px 8px, 100% 46px;
  padding-bottom: calc(var(--hotbar-h) + 24px + env(safe-area-inset-bottom, 0px));
}

img, svg { display: block; max-width: 100%; }
svg.icon { image-rendering: pixelated; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

a { color: var(--emerald); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: #7ef0aa; }

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

code, kbd {
  font-family: var(--font-mono);
  font-size: .92em;
  background: var(--slot-lo);
  color: #f5f4ee;
  padding: .08em .35em;
  border: 1px solid #3a3b44;
  overflow-wrap: anywhere;
}

h1, h2, h3 {
  font-family: var(--font-pixel);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .02em;
  margin: 0 0 .5em;
}

h2 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--gold);
  color: #111;
  font-weight: 700;
  text-decoration: none;
  border: 3px solid var(--edge);
}
.skip-link:focus { top: 8px; }

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

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ------------------------------------------------------------------ GUI panels */

/* An outset panel, like a game window: light top-left edge, dark bottom-right. */
.panel {
  background: var(--panel);
  border: 3px solid var(--edge);
  box-shadow:
    inset 3px 3px 0 var(--panel-hi),
    inset -3px -3px 0 var(--panel-lo);
  padding: 20px;
}

/* An inset inventory slot: dark top-left edge, light bottom-right. */
.slot {
  background: var(--slot);
  border: 2px solid var(--edge);
  box-shadow:
    inset 3px 3px 0 var(--slot-lo),
    inset -3px -3px 0 var(--slot-hi);
  padding: 16px 16px 14px;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  --btn-bg: #5a5b66;
  --btn-hi: rgba(255, 255, 255, .28);
  --btn-lo: rgba(0, 0, 0, .38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px;
  font: 600 1.05rem/1.1 var(--font-pixel);
  letter-spacing: .03em;
  color: #fff;
  text-decoration: none;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .55);
  background: var(--btn-bg);
  border: 3px solid var(--edge);
  border-radius: 0;
  box-shadow: inset 3px 3px 0 var(--btn-hi), inset -3px -4px 0 var(--btn-lo);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover { filter: brightness(1.12); color: #fff; }
/* Pressed: the bevel flips and the face drops a pixel, like a GUI button under the cursor. */
.btn:active,
.btn.is-pressed {
  box-shadow: inset 3px 4px 0 var(--btn-lo), inset -3px -3px 0 var(--btn-hi);
  transform: translateY(2px);
  filter: brightness(.95);
}
.btn .icon { width: 24px; height: 24px; }

.btn--grass { --btn-bg: #2f6e1c; }
.btn--stone { --btn-bg: #50515c; }
.btn--amethyst { --btn-bg: #62389c; }
.btn--small { min-height: 44px; padding: 8px 14px; font-size: .98rem; }

.btn[hidden] { display: none; }

/* ------------------------------------------------------------------ launch countdown */
/* A strip above the hero. Numbers sit in inventory slots; the clock is hidden until app.js has
   real values, so nobody sees a flash of zeros. Remove with the HTML block after launch. */

.launch {
  padding: 14px 0;
  background: linear-gradient(180deg, rgba(242, 194, 48, .12), rgba(242, 194, 48, .03));
  border-bottom: 3px solid var(--edge);
  box-shadow: inset 0 -3px 0 rgba(242, 194, 48, .22);
}
.launch-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 24px;
  text-align: center;
}
.launch-title { margin: 0; font: 600 1.1rem/1.4 var(--font-pixel); color: var(--text); }
.launch-kicker {
  display: inline-block;
  margin-right: 8px;
  padding: 3px 8px;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #111;
  background: var(--gold);
  border: 2px solid var(--edge);
  vertical-align: 2px;
}
.launch.is-live .launch-kicker { background: var(--emerald); }
.launch-clock { display: flex; gap: 6px; }
.launch[hidden], .launch-clock[hidden], .launch-local[hidden] { display: none; }
.launch-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  padding: 6px 6px 5px;
  background: var(--slot);
  border: 2px solid var(--edge);
  box-shadow: inset 3px 3px 0 var(--slot-lo), inset -3px -3px 0 var(--slot-hi);
}
.launch-num { font: 600 1.7rem/1 var(--font-pixel); color: var(--gold); font-variant-numeric: tabular-nums; }
.launch-lbl { margin-top: 3px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.launch-local { flex-basis: 100%; margin: 0; font-size: .9rem; color: var(--muted); }

@media (max-width: 380px) {
  .launch-unit { min-width: 54px; }
  .launch-num { font-size: 1.5rem; }
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  padding: 44px 0 36px;
  background:
    linear-gradient(180deg, rgba(108, 198, 68, .10), transparent 60%);
}

.hero-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; align-items: start; }
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(2.6rem, 1.6rem + 5vw, 4.2rem);
  color: #f4ffe9;
  text-shadow: 4px 4px 0 #0b0b0d, -2px -2px 0 rgba(108, 198, 68, .35);
  margin-bottom: 12px;
}
.wordmark .icon { width: 1em; height: 1em; }
.wordmark .b3 { color: var(--grass); }

.tagline {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34em;
}

.address {
  margin: 20px 0 8px;
}
.address-label {
  display: block;
  font: 600 .95rem/1.2 var(--font-pixel);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.address-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.address-field {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 8px 12px;
  background: #0c0c0f;
  border: 3px solid var(--edge);
  box-shadow: inset 3px 3px 0 #000, inset -3px -3px 0 #3a3b44;
  font: 700 clamp(1.05rem, .85rem + 1.2vw, 1.5rem)/1.2 var(--font-mono);
  color: #fff;
  white-space: nowrap;
  user-select: all;
  -webkit-user-select: all;
}
.address-row .btn { flex: 0 0 auto; min-width: 6.5em; }
.address-note {
  font-size: .95rem;
  color: var(--muted);
  margin: 6px 0 18px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  min-height: 48px;
}
.discord-missing {
  flex-basis: 100%;
  margin: 0;
  font-size: .95rem;
  color: var(--muted);
}
.discord-missing[hidden] { display: none; }

/* ------------------------------------------------------------------ status widget */

.status {
  margin-top: 4px;
}
.status-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.lamp {
  width: 22px;
  height: 22px;
  flex: none;
  border: 3px solid var(--edge);
  background: #6f6f78;
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .35), inset 3px 3px 0 rgba(255, 255, 255, .25);
}
.status[data-state="online"] .lamp { background: #45d35b; }
.status[data-state="offline"] .lamp { background: #d9443a; }
.status-label {
  font: 600 1.5rem/1 var(--font-pixel);
  letter-spacing: .03em;
}
.status[data-state="online"] .status-label { color: #7fea8f; }
.status[data-state="offline"] .status-label { color: var(--red); }
/* "unknown" = the status check can't report (stale file, fetch failed). Grey lamp, plain label:
   it must never look like "offline" (STATUS-JSON.md rule 1). */
.status[data-state="unknown"] .lamp { background: #6f6f78; }
.status[data-state="unknown"] .status-label { color: var(--muted); }
.status-detail { margin: 0 0 6px; color: var(--muted); }
.status-updated { margin: 0; font-size: .9rem; color: var(--faint); }

.players {
  list-style: none;
  margin: 10px 0 8px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.players li {
  font: .92rem/1 var(--font-mono);
  padding: 6px 8px;
  background: var(--slot-lo);
  border: 2px solid #3a3b44;
}
.players:empty { display: none; }

.no-js .status-live { display: none; }
.status-nojs { display: none; margin: 0; color: var(--muted); }
.no-js .status-nojs { display: block; }

/* ------------------------------------------------------------------ section frame */

.section {
  padding: 18px 0 40px;
  scroll-margin-top: 12px;
}

/* The grass-over-dirt divider on top of every section — gradients only. */
.section::before {
  content: "";
  display: block;
  height: 18px;
  margin-bottom: 28px;
  background:
    /* jagged grass fringe: 4px blocks, alternating depth */
    repeating-linear-gradient(90deg, var(--grass) 0 8px, transparent 8px 12px, var(--grass) 12px 16px, transparent 16px 24px) 0 6px / 100% 4px no-repeat,
    linear-gradient(var(--grass) 0 6px, transparent 6px) 0 0 / 100% 100% no-repeat,
    /* dirt with 4px speckle */
    repeating-conic-gradient(var(--dirt-dk) 0 25%, var(--dirt) 0 50%) 0 0 / 8px 8px;
  border-top: 3px solid var(--edge);
  border-bottom: 3px solid var(--edge);
  image-rendering: pixelated;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-title .icon { width: 40px; height: 40px; }

.lede { font-size: 1.12rem; color: var(--text); max-width: 42em; }

.badge {
  display: inline-block;
  vertical-align: middle;
  font: 600 .8rem/1 var(--font-pixel);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 8px 4px;
  color: #1a1a1a;
  background: var(--gold);
  border: 2px solid var(--edge);
  margin-left: 4px;
}

/* Themed sections */
.theme-amethyst .section-title { color: #dcc4ff; }
.theme-amethyst::before {
  background:
    repeating-linear-gradient(90deg, var(--amethyst) 0 8px, transparent 8px 12px, var(--amethyst) 12px 16px, transparent 16px 24px) 0 6px / 100% 4px no-repeat,
    linear-gradient(var(--amethyst) 0 6px, transparent 6px) 0 0 / 100% 100% no-repeat,
    repeating-conic-gradient(#2d1f45 0 25%, #3d2a5e 0 50%) 0 0 / 8px 8px;
}
.theme-emerald .section-title { color: #9ff5c0; }
.theme-emerald::before {
  background:
    repeating-linear-gradient(90deg, var(--emerald) 0 8px, transparent 8px 12px, var(--emerald) 12px 16px, transparent 16px 24px) 0 6px / 100% 4px no-repeat,
    linear-gradient(var(--emerald) 0 6px, transparent 6px) 0 0 / 100% 100% no-repeat,
    repeating-conic-gradient(#35363e 0 25%, #45464f 0 50%) 0 0 / 8px 8px;
}

/* ------------------------------------------------------------------ inventory grids */

.grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin: 18px 0;
}
@media (min-width: 620px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 360px) and (max-width: 619px) {
  .grid--shops { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .grid--shops .slot { padding: 12px 12px 10px; }
  .grid--shops h3 { font-size: 1.02rem; }
  .grid--shops p { font-size: .95rem; line-height: 1.45; }
}

.slot h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: .35em;
}
.slot h3 .icon { width: 28px; height: 28px; }
.slot p:last-child, .slot ul:last-child, .slot ol:last-child { margin-bottom: 0; }

/* Numbered steps: the number sits in its own little slot, like a stack count. */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 18px 0;
  display: grid;
  gap: 10px;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 64px;
  min-height: 56px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font: 600 1.3rem/1 var(--font-pixel);
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  background: var(--panel-hi);
  border: 2px solid var(--edge);
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .4), inset 2px 2px 0 rgba(255, 255, 255, .15);
}
.steps > li > strong:first-child { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.steps p { margin: 0; }
.theme-amethyst .steps > li::before { background: var(--amethyst-dk); }
.theme-emerald .steps > li::before { background: var(--emerald-dk); }

/* Callouts */
.callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  margin: 18px 0;
  border: 3px solid var(--edge);
  background: #3a2a10;
  box-shadow: inset 4px 0 0 var(--gold);
}
.callout p { margin: 0; }
.callout p + p { margin-top: .5em; }
.callout-title {
  display: block;
  font: 600 1.15rem/1.2 var(--font-pixel);
  color: #ffe38a;
  margin-bottom: 4px;
}
.callout--danger { background: #3b1715; box-shadow: inset 4px 0 0 var(--red); }
.callout--danger .callout-title { color: #ffb0a8; }
.callout--amethyst { background: #2a1d40; box-shadow: inset 4px 0 0 var(--amethyst); }
.callout--amethyst .callout-title { color: #e2ccff; }
.callout--info { background: #1b2a33; box-shadow: inset 4px 0 0 #7cc4ef; }
.callout--info .callout-title { color: #b9e3ff; }
.callout .icon { width: 32px; height: 32px; margin-top: 2px; }

/* Tables — trust levels */
.table-wrap { overflow-x: auto; margin: 18px 0; border: 3px solid var(--edge); }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--slot);
  font-size: 1rem;
}
caption {
  text-align: left;
  padding: 12px 14px;
  font: 600 1.1rem/1.2 var(--font-pixel);
  background: var(--panel);
  border-bottom: 3px solid var(--edge);
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 2px solid #34353d;
}
thead th {
  font-family: var(--font-pixel);
  font-weight: 600;
  letter-spacing: .03em;
  background: #26272d;
  color: var(--muted);
}
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td code, th code { white-space: nowrap; }

/* Stacked table on narrow screens */
@media (max-width: 640px) {
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack tr { display: block; padding: 10px 0; border-bottom: 2px solid #34353d; }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack th, .table-stack td { display: block; border: 0; padding: 4px 14px; }
  .table-stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font: 600 .82rem/1.3 var(--font-pixel);
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--faint);
  }
}

/* Command list */
.cmds { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.cmds li { display: grid; grid-template-columns: minmax(9.5em, max-content) 1fr; gap: 4px 14px; align-items: baseline; }
.cmds code { justify-self: start; }
@media (max-width: 480px) { .cmds li { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ screenshots */

.shot { margin: 18px 0; }
.shot-frame {
  position: relative;
  border: 3px solid var(--edge);
  box-shadow: inset 3px 3px 0 var(--panel-hi), inset -3px -3px 0 var(--panel-lo);
  padding: 6px;
  background: var(--panel);
}
.shot-frame img {
  width: 100%;
  height: auto;
  background:
    repeating-conic-gradient(#26272d 0 25%, #2b2c33 0 50%) 0 0 / 16px 16px;
}
.shot--16x9 img { aspect-ratio: 16 / 9; object-fit: cover; }
.shot--4x3 img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Placeholder until the real screenshot exists: the frame keeps its size and says so. */
.shot.is-missing img { visibility: hidden; }
.shot.is-missing .shot-frame::after {
  content: "Screenshot coming soon";
  position: absolute;
  inset: 6px;
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  font: 600 1rem/1.3 var(--font-pixel);
  letter-spacing: .04em;
  color: var(--muted);
  background:
    repeating-conic-gradient(#24252b 0 25%, #2a2b32 0 50%) 0 0 / 16px 16px;
}
figcaption {
  margin-top: 8px;
  font-size: .95rem;
  color: var(--muted);
}

.two-col {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 880px) {
  .two-col { grid-template-columns: 1.1fr .9fr; align-items: start; }
  .two-col > .shot { margin-top: 18px; }
}

/* ------------------------------------------------------------------ FAQ */

.faq { display: grid; gap: 8px; margin: 18px 0; }
.faq details {
  background: var(--slot);
  border: 2px solid var(--edge);
  box-shadow: inset 3px 3px 0 var(--slot-lo), inset -3px -3px 0 var(--slot-hi);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px 14px 48px;
  position: relative;
  font-weight: 700;
  min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  position: absolute;
  left: 14px;
  top: 12px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font: 600 1.1rem/1 var(--font-pixel);
  color: #fff;
  background: var(--panel-hi);
  border: 2px solid var(--edge);
}
.faq details[open] summary::before { content: "\2212"; }
.faq details > div { padding: 0 16px 16px 48px; }
.faq details > div > :last-child { margin-bottom: 0; }

.rules { margin: 12px 0 0; padding-left: 1.4em; }
.rules li { margin-bottom: .5em; }
.rules li::marker { font-family: var(--font-pixel); color: var(--grass); }

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

.site-footer {
  margin-top: 20px;
  padding: 28px 0 12px;
  border-top: 3px solid var(--edge);
  background: #141418;
  color: var(--muted);
  font-size: .95rem;
}
.site-footer p { margin: 0 0 .6em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.disclaimer { color: var(--faint); }

/* ------------------------------------------------------------------ hotbar nav */

.hotbar {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
}
.hotbar-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 5px 10px 4px;
  font: 600 1rem/1.1 var(--font-pixel);
  letter-spacing: .03em;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  background: rgba(16, 16, 20, .92);
  border: 2px solid var(--amethyst-dk);
  pointer-events: none;
  opacity: 0;
}
.hotbar-label.is-shown { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .hotbar-label { transition: opacity .35s steps(3, end); }
}

.hotbar ol {
  list-style: none;
  margin: 0;
  padding: 3px;
  display: flex;
  background: rgba(20, 20, 24, .94);
  border: 3px solid var(--edge);
  box-shadow: inset 2px 2px 0 #4a4b55, inset -2px -2px 0 #0a0a0c;
}
.hotbar li { display: block; }
.hotbar a {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 52px;
  color: var(--text);
  text-decoration: none;
  background: #2a2b31;
  border: 2px solid #0a0a0c;
  box-shadow: inset 2px 2px 0 #121216, inset -2px -2px 0 #4b4c56;
}
.hotbar a + a,
.hotbar li + li a { margin-left: 2px; }
.hotbar .icon { width: 30px; height: 30px; }
.hotbar .key {
  position: absolute;
  left: 3px;
  top: 1px;
  font: 600 .78rem/1 var(--font-pixel);
  color: var(--muted);
  text-shadow: 1px 1px 0 #000;
}
.hotbar .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The selected slot gets the thick light frame the game uses for the held item. */
.hotbar a[aria-current="true"] {
  background: #3a3b44;
  outline: 3px solid #f0f0f0;
  outline-offset: -1px;
  z-index: 1;
}
.hotbar a:hover { background: #3a3b44; }
.hotbar a:focus-visible { outline: 3px solid var(--gold); outline-offset: -1px; z-index: 2; }

@media (min-width: 720px) {
  :root { --hotbar-h: 84px; }
  .hotbar a { width: 58px; height: 60px; }
  .hotbar .icon { width: 36px; height: 36px; }
}
@media (max-width: 380px) {
  .hotbar a { width: 42px; height: 48px; }
  .hotbar .icon { width: 26px; height: 26px; }
}

/* ------------------------------------------------------------------ live shop price lists */

/* .grid sets display:grid, which would beat the UA's [hidden] rule. */
.grid[hidden], .shops-live[hidden] { display: none; }

.shops-updated { margin: 18px 0 10px; font-size: .95rem; color: var(--muted); }
.shops { display: grid; gap: 8px; margin: 0 0 18px; }

.shop {
  background: var(--slot);
  border: 2px solid var(--edge);
  box-shadow: inset 3px 3px 0 var(--slot-lo), inset -3px -3px 0 var(--slot-hi);
}
.shop summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 14px 16px 14px 48px;
  min-height: 48px;
}
.shop summary::-webkit-details-marker { display: none; }
.shop summary::before {
  content: "+";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font: 600 1.1rem/1 var(--font-pixel);
  color: #fff;
  background: var(--emerald-dk);
  border: 2px solid var(--edge);
}
.shop[open] summary::before { content: "\2212"; }
.shop summary:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.shop-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.shop-name { font: 600 1.15rem/1.3 var(--font-pixel); color: var(--text); }
.shop-count { font-size: .9rem; color: var(--faint); }
.shop-blurb { display: block; margin-top: 2px; font-size: .97rem; color: var(--muted); }
.shop .table-wrap { margin: 0 12px 12px; border-width: 2px; }

/* Shop screenshot (R2), loaded on first open. The box is reserved at 16:9 so the table
   below doesn't jump when the image arrives; a failed image removes the whole figure. */
.shop-shot {
  margin: 0 12px 12px;
  max-width: 560px;
  border: 2px solid var(--edge);
  background: var(--panel-lo);
}
.shop-shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.trades { font-size: .97rem; }
.trades th, .trades td { padding: 8px 12px; }
.trades td { width: 50%; }
.trades tbody tr:nth-child(even) td { background: #1c1d22; }

.item { display: inline; }
.item-count { font-family: var(--font-mono); font-size: .92em; color: var(--faint); white-space: nowrap; }
.item-name { color: var(--text); }
.item--coin .item-name { color: var(--emerald); font-weight: 600; }
.item--named .item-name { color: var(--amethyst); font-weight: 600; }
.item-extra { color: var(--muted); }
.item-plus { color: var(--faint); }
.item-icon { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; margin-right: 5px; }  /* the base img rule is display:block */

/* Named items this shop trades: a slot-framed icon + the in-game tooltip image (512×128,
   shown at exactly half size). Both are images from /img/items/, built by app.js. */
.shop-items { margin: 0 12px 12px; }
.shop-items-label { margin: 0 0 6px; font-size: .9rem; color: var(--faint); }
.shop-items-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.shop-item { display: flex; align-items: center; gap: 8px; min-width: 0; }
.shop-item-icon {
  flex: none;
  box-sizing: content-box;
  width: 48px;
  height: 48px;
  padding: 6px;
  background: var(--slot-lo);
  border: 2px solid var(--edge);
}
.shop-item-tip { flex: 0 1 auto; min-width: 0; width: 256px; max-width: 100%; height: auto; }

@media (max-width: 480px) {
  .shop summary { padding-left: 44px; }
  .shop .table-wrap { margin: 0 6px 8px; }
  .shop-shot { margin: 0 6px 8px; }
  .shop-items { margin: 0 6px 8px; }
  .shop-item-icon { width: 40px; height: 40px; padding: 5px; }
  .shop-item-tip { width: 208px; }
  .trades th, .trades td { padding: 7px 8px; }
  .trades { font-size: .92rem; }
}

/* ------------------------------------------------------------------ misc */

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .btn:active, .btn.is-pressed { transform: none; }
}

@media print {
  .hotbar, .skip-link { display: none; }
  body { background: #fff; color: #000; padding: 0; }
}

/* ------------------------------------------------------------------ teaser video */

.teaser { margin: 18px 0; }
.teaser-frame { padding: 6px; }
.teaser-loop {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background:
    repeating-conic-gradient(#26272d 0 25%, #2b2c33 0 50%) 0 0 / 16px 16px;
}
/* Centred without transform (so .btn's pressed translateY still works): auto margins between
   left/right 0, sized to its text. Shrinks its type on phones so it stays on one line. */
.teaser-play {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  width: max-content;
  max-width: calc(100% - 28px);
  margin-inline: auto;
  white-space: nowrap;
}
@media (max-width: 420px) {
  .teaser-play { bottom: 12px; min-height: 42px; padding: 7px 12px; gap: 8px; font-size: .92rem; }
  .teaser-play .icon { width: 20px; height: 20px; }
}

.teaser-dialog {
  width: min(1120px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  color: var(--text);
  background: var(--panel);
  border: 3px solid var(--edge);
  box-shadow: inset 3px 3px 0 var(--panel-hi), inset -3px -3px 0 var(--panel-lo);
}
.teaser-dialog::backdrop { background: rgba(8, 8, 10, .85); }
.teaser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 14px;
}
.teaser-title { margin: 0; font: 600 1.15rem/1.2 var(--font-pixel); letter-spacing: .03em; }
.teaser-full {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 110px);
  aspect-ratio: 16 / 9;
  background: #000;
}
