/* Griefun: two themes of one system. Light: dawn in the valley. Dark: the Nether.
   The theme follows the system; the header button switches it for this tab only
   (html[data-theme], kept in sessionStorage). */

@font-face {
  font-family: "Press Start 2P";
  src: url("/fonts/press-start-2p.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f3f0e8;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.9);
  --text: #1c1a17;
  --muted: #5c574e;
  --line: #ddd5c5;
  --accent: #a8430c;
  --accent-strong: #7f3008;
  --brand: #d4621f;
  --play: #2e7d32;
  --play-hover: #256b29;
  --play-text: #ffffff;
  --danger: #b3261e;
  --ok: #2e7d32;
  --gold: #8a5a00;
  --mark: #ffe08a;
  --todo: #ffd0d0;
  --shadow: 0 4px 0 rgba(60, 40, 20, 0.1), 0 10px 30px rgba(60, 40, 20, 0.08);
  --hero-img: image-set(url("/img/hero-light-valley-1672.avif") type("image/avif"), url("/img/hero-light-valley-1672.webp") type("image/webp"));
  --hero-img-s: image-set(url("/img/hero-light-valley-900.avif") type("image/avif"), url("/img/hero-light-valley-900.webp") type("image/webp"));
  --hero-veil: rgba(243, 240, 232, 0.94);
  --potion-a: #2fd3e6;
  --potion-b: #2b6fe3;
  --potion-c: #8a5cff;
  --potion-glow: rgba(70, 190, 255, 0.55);
  --radius: 8px;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --potion-a: #c45cff;
    --potion-b: #ff3fb4;
    --potion-c: #5c6bff;
    --potion-glow: rgba(205, 90, 255, 0.6);
    --bg: #111215;
    --surface: #1a1c20;
    --glass: rgba(22, 24, 28, 0.9);
    --text: #ecebe7;
    --muted: #a9a59c;
    --line: #30333a;
    --accent: #f5a05a;
    --accent-strong: #ffc08a;
    --brand: #f08a3c;
    --danger: #ff8a80;
    --ok: #6fd67a;
    --gold: #f2c14e;
    --mark: #6b5310;
    --todo: #5c2020;
    --shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 12px 30px rgba(0, 0, 0, 0.3);
    --hero-img: image-set(url("/img/hero-dark-nether-1672.avif") type("image/avif"), url("/img/hero-dark-nether-1672.webp") type("image/webp"));
    --hero-img-s: image-set(url("/img/hero-dark-nether-900.avif") type("image/avif"), url("/img/hero-dark-nether-900.webp") type("image/webp"));
    --hero-veil: rgba(17, 18, 21, 0.92);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --potion-a: #c45cff;
  --potion-b: #ff3fb4;
  --potion-c: #5c6bff;
  --potion-glow: rgba(205, 90, 255, 0.6);
  --bg: #111215;
  --surface: #1a1c20;
  --glass: rgba(22, 24, 28, 0.9);
  --text: #ecebe7;
  --muted: #a9a59c;
  --line: #30333a;
  --accent: #f5a05a;
  --accent-strong: #ffc08a;
  --brand: #f08a3c;
  --danger: #ff8a80;
  --ok: #6fd67a;
  --gold: #f2c14e;
  --mark: #6b5310;
  --todo: #5c2020;
  --shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 12px 30px rgba(0, 0, 0, 0.3);
  --hero-img: image-set(url("/img/hero-dark-nether-1672.avif") type("image/avif"), url("/img/hero-dark-nether-1672.webp") type("image/webp"));
  --hero-img-s: image-set(url("/img/hero-dark-nether-900.avif") type("image/avif"), url("/img/hero-dark-nether-900.webp") type("image/webp"));
  --hero-veil: rgba(17, 18, 21, 0.92);
  color-scheme: dark;
}

/* Base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  overflow-x: hidden;
}
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.35; font-family: var(--pixel); font-weight: 400; letter-spacing: 0; hyphens: auto; overflow-wrap: break-word; }
h1 { font-size: 1.75rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 0.95rem; margin: 1.5rem 0 0.5rem; }
table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: 0.45rem 0.65rem; text-align: left; vertical-align: top; }
th { background: var(--bg); }
code { font-size: 0.92em; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 0 0.25em; }
input, textarea, button { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -100px; z-index: 10; background: var(--surface); padding: 0.5rem 1rem; border-radius: var(--radius); }
.skip:focus { top: 8px; }
.ico { width: 1.5em; height: 1.5em; flex: none; image-rendering: pixelated; }

.wide { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }


/* Draft banner and placeholders */
.draft { background: var(--todo); color: var(--text); text-align: center; padding: 0.5rem 16px; font-weight: 600; }
mark.todo { background: var(--todo); color: inherit; padding: 0 0.2em; border-radius: 3px; }
mark { background: var(--mark); color: inherit; border-radius: 2px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; gap: 0.5rem 1.25rem; min-height: 60px; }
.logo { display: block; color: var(--brand); flex: none; }
.logo-long, .logo-head { display: block; background: currentColor; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.logo-long { --logo: url("/logo.svg"); width: 140px; aspect-ratio: 4314 / 1144; }
.logo-head { --logo: url("/logo-head.svg"); width: 32px; aspect-ratio: 684 / 633; }
.top .logo-head { display: none; }
.menu { display: flex; align-items: center; gap: 0.5rem 1.25rem; flex: 1; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; flex: 1; }
.nav a, .langs a { color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover, .langs a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.langs { display: flex; gap: 0.6rem; font-size: 0.9rem; }
.langs a { color: var(--muted); }
.langs a[aria-current="true"] { color: var(--text); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.theme-toggle, .menu-toggle {
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  width: 38px; height: 38px; padding: 0; color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.menu-toggle { display: none; }
.theme-ico { width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--theme-ico) center / contain no-repeat; mask: var(--theme-ico) center / contain no-repeat; }
/* Light theme shows a moon (switch to dark), dark shows a sun. */
:root { --theme-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath d='M3 0h3v1H3zM2 1h2v1H2zM1 2h2v1H1zM1 3h1v3H1zM1 6h2v1H1zM2 7h2v1H2zM3 8h4v1H3zM6 7h2v1H6zM7 6h1v1H7zM2 2h1v5H2zM3 1h1v7H3zM4 6h3v2H4z'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] { --theme-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath d='M4 0h1v1H4zM4 8h1v1H4zM0 4h1v1H0zM8 4h1v1H8zM1 1h1v1H1zM7 1h1v1H7zM1 7h1v1H1zM7 7h1v1H7zM3 2h3v1H3zM2 3h5v3H2zM3 6h3v1H3z'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --theme-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath d='M4 0h1v1H4zM4 8h1v1H4zM0 4h1v1H0zM8 4h1v1H8zM1 1h1v1H1zM7 1h1v1H7zM1 7h1v1H1zM7 7h1v1H7zM3 2h3v1H3zM2 3h5v3H2zM3 6h3v1H3z'/%3E%3C/svg%3E"); }
}
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }

/* Footer */
.foot { margin-top: 4rem; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.9rem; padding: 2rem 0 2.5rem; }
.foot-grid { display: grid; gap: 0.75rem 2rem; grid-template-columns: 1fr auto; align-items: start; }
.foot-brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 600; }
.foot-brand .logo-head { color: var(--brand); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; justify-content: flex-end; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--accent); }
.foot p { margin: 0; grid-column: 1 / -1; }
.foot .mojang { font-weight: 600; margin-top: 0.5rem; }

/* Reading pages: content on a panel */
main.page {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 2rem;
  padding: 1.5rem 1.75rem 2rem;
}
main.page > :first-child { margin-top: 0; }
.meta { color: var(--muted); font-size: 0.95rem; }

/* Home: hero */
.hero {
  position: relative;
  min-height: min(640px, 82vh);
  display: flex; align-items: center;
  background: var(--hero-img) 70% 40% / cover no-repeat;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--hero-veil) 0%, var(--hero-veil) 28%, transparent 62%),
    linear-gradient(0deg, var(--bg) 0%, transparent 28%);
}
.hero-in { width: 100%; max-width: 1160px; margin: 0 auto; padding: 3rem 16px 6rem; }
.hero-in > * { max-width: 34rem; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.9rem); line-height: 1.15; text-shadow: 0 4px 0 rgba(0,0,0,.18); margin: 0 0 1.25rem; text-wrap: balance; }
.hero h1 + p { font-size: 1.3rem; font-weight: 600; margin: 0 0 0.5rem; }
.hero p { margin: 0 0 0.5rem; }

.play-card {
  margin-top: 1.75rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem 0.85rem;
  max-width: 34rem;
}
.addr-field {
  position: relative; display: flex; align-items: stretch;
  background: var(--bg); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.08);
}
.addr-field:focus-within { border-color: var(--accent); }
.addr-field .dot { align-self: center; margin-left: 0.8rem; }
.dot { width: 12px; height: 12px; flex: none; background: #8a8f98; box-shadow: 0 0 0 3px rgba(138, 143, 152, 0.25); }
.dot.up { background: #3fb950; box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.3); }
.addr-field input.addr { flex: 1; width: auto; min-width: 0; font: 0.95rem var(--pixel); color: var(--text); background: none; border: 0; border-radius: 0; padding: 0.8rem 0.7rem; cursor: default; }
.addr:focus-visible { outline: none; }
.addr::selection { background: var(--potion-b); color: #fff; }
.copy {
  display: inline-flex; align-items: center; gap: 0.45rem; flex: none;
  background: var(--play); color: var(--play-text); border: 0; margin: -2px -2px -2px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0 1.1rem; font-weight: 700; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}
.copy-ico { width: 1.25rem; height: 1.25rem; }
.copied {
  position: absolute; right: 0; bottom: calc(100% + 8px);
  background: var(--text); color: var(--bg); font-weight: 700; font-size: 0.85rem;
  padding: 0.3rem 0.65rem; border-radius: 6px; pointer-events: none;
  opacity: 0; transform: translateY(4px); transition: opacity 0.15s, transform 0.15s;
}
.copied::after { content: ""; position: absolute; right: 1.5rem; top: 100%; border: 6px solid transparent; border-top-color: var(--text); }
.copied.show { opacity: 1; transform: none; }
.copy:hover { background: var(--play-hover); }
.play-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0.85rem 0 0; font-size: 0.9rem; color: var(--muted); }
.play-meta div { display: flex; gap: 0.35rem; }
.play-meta dt::after { content: ":"; }
.play-meta dd { margin: 0; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Home: month scale — a glass flask in a gold frame, a gold marker below */
.wipe-scale {
  --p: 0;
  --flask-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 10' shape-rendering='crispEdges'%3E%3Crect x='2' y='0' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='0' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='4' y='0' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='1' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='3' y='1' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='4' y='1' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='0' y='2' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='2' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='3' y='2' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='4' y='2' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='3' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='3' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='2' y='3' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='3' width='1' height='1' fill='rgba%28255%2C255%2C255%2C0.9%29'/%3E%3Crect x='4' y='3' width='1' height='1' fill='rgba%28255%2C255%2C255%2C0.9%29'/%3E%3Crect x='0' y='4' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='4' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='2' y='4' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='4' width='1' height='1' fill='rgba%28190%2C225%2C255%2C0.22%29'/%3E%3Crect x='4' y='4' width='1' height='1' fill='rgba%28255%2C255%2C255%2C0.45%29'/%3E%3Crect x='0' y='5' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='5' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='2' y='5' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='5' width='1' height='1' fill='rgba%28190%2C225%2C255%2C0.22%29'/%3E%3Crect x='4' y='5' width='1' height='1' fill='rgba%28190%2C225%2C255%2C0.22%29'/%3E%3Crect x='0' y='6' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='6' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='2' y='6' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='6' width='1' height='1' fill='rgba%2890%2C140%2C195%2C0.5%29'/%3E%3Crect x='4' y='6' width='1' height='1' fill='rgba%2890%2C140%2C195%2C0.5%29'/%3E%3Crect x='0' y='7' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='7' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='2' y='7' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='3' y='7' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='4' y='7' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='8' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='8' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='3' y='8' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='4' y='8' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='2' y='9' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='9' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='4' y='9' width='1' height='1' fill='%232a1d0e'/%3E%3C/svg%3E");
  --flask-m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 10' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='1' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='0' y='2' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='3' width='1' height='1' fill='rgba%28255%2C255%2C255%2C0.9%29'/%3E%3Crect x='0' y='4' width='1' height='1' fill='rgba%28190%2C225%2C255%2C0.22%29'/%3E%3Crect x='0' y='5' width='1' height='1' fill='rgba%28190%2C225%2C255%2C0.22%29'/%3E%3Crect x='0' y='6' width='1' height='1' fill='rgba%2890%2C140%2C195%2C0.5%29'/%3E%3Crect x='0' y='7' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='8' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='0' y='9' width='1' height='1' fill='%232a1d0e'/%3E%3C/svg%3E");
  --flask-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 10' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='0' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='0' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='1' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='2' y='1' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='3' y='1' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='2' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='2' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='3' y='2' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='4' y='2' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='3' width='1' height='1' fill='rgba%28255%2C255%2C255%2C0.9%29'/%3E%3Crect x='1' y='3' width='1' height='1' fill='rgba%28255%2C255%2C255%2C0.9%29'/%3E%3Crect x='2' y='3' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='3' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='4' y='3' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='4' width='1' height='1' fill='rgba%28255%2C255%2C255%2C0.45%29'/%3E%3Crect x='1' y='4' width='1' height='1' fill='rgba%28190%2C225%2C255%2C0.22%29'/%3E%3Crect x='2' y='4' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='4' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='4' y='4' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='5' width='1' height='1' fill='rgba%28190%2C225%2C255%2C0.22%29'/%3E%3Crect x='1' y='5' width='1' height='1' fill='rgba%28190%2C225%2C255%2C0.22%29'/%3E%3Crect x='2' y='5' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='5' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='4' y='5' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='6' width='1' height='1' fill='rgba%2890%2C140%2C195%2C0.5%29'/%3E%3Crect x='1' y='6' width='1' height='1' fill='rgba%2890%2C140%2C195%2C0.5%29'/%3E%3Crect x='2' y='6' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='6' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='4' y='6' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='7' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='7' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='7' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='3' y='7' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='4' y='7' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='8' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='1' y='8' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='2' y='8' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='3' y='8' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='9' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='9' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='9' width='1' height='1' fill='%232a1d0e'/%3E%3C/svg%3E");
  --flask-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 9' shape-rendering='crispEdges'%3E%3Crect x='3' y='0' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='1' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='1' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='4' y='1' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='2' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='3' y='2' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='4' y='2' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='5' y='2' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='3' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='3' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='2' y='3' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='3' y='3' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='4' y='3' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='5' y='3' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='6' y='3' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='0' y='4' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='1' y='4' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='4' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='3' y='4' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='4' y='4' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='5' y='4' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='6' y='4' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='5' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='5' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='4' y='5' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='6' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='6' width='1' height='1' fill='%23f0c24a'/%3E%3Crect x='4' y='6' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='7' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='7' width='1' height='1' fill='%23a3741a'/%3E%3Crect x='4' y='7' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='2' y='8' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='3' y='8' width='1' height='1' fill='%232a1d0e'/%3E%3Crect x='4' y='8' width='1' height='1' fill='%232a1d0e'/%3E%3C/svg%3E");
  margin: 1.25rem 0 0; max-width: 34rem;
}
.wipe-text { font-family: var(--pixel); font-size: 0.85rem; margin: 0 0 0.6rem; min-height: 1.4em; }
.flask {
  position: relative; height: 30px; image-rendering: pixelated;
  background: var(--flask-l) left top / 15px 30px no-repeat, var(--flask-r) right top / 15px 30px no-repeat;
}
.flask::before { content: ""; position: absolute; left: 15px; right: 15px; top: 0; height: 30px; background: var(--flask-m) 0 0 / 3px 30px repeat-x; image-rendering: pixelated; }
.flask-fill {
  position: absolute; left: 15px; top: 9px; height: 12px; z-index: 1; overflow: hidden;
  width: calc((100% - 30px) * var(--p));
  /* A magic potion: colours flowing along the flask, light on top, deeper at the bottom. */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0 3px, transparent 3px 9px, rgba(0, 0, 0, 0.25) 9px),
    linear-gradient(90deg, var(--potion-a), var(--potion-b) 33.3%, var(--potion-c) 66.6%, var(--potion-a)) 0 0 / 270px 100% repeat-x;
  box-shadow: 0 0 10px 1px var(--potion-glow);
  animation: potion-flow 7s linear infinite, potion-glow 2.4s ease-in-out infinite alternate;
}
/* The bright edge of the liquid. */
.flask-fill::after {
  content: ""; position: absolute; right: 0; top: 0; width: 3px; height: 12px;
  background: rgba(255, 255, 255, 0.7);
}
/* A few pixel bubbles; home.js gives each a random place and pace every time it rises. */
.bubble {
  position: absolute; left: var(--x, 50%); bottom: 0; width: 3px; height: 3px; background: #fff;
  opacity: 0; animation: potion-bubble var(--d, 2s) steps(4) var(--delay, 0s) 1 forwards;
}
@keyframes potion-flow { from { background-position: 0 0, 0 0; } to { background-position: 0 0, 270px 0; } }
@keyframes potion-glow { from { box-shadow: 0 0 6px 0 var(--potion-glow); } to { box-shadow: 0 0 16px 3px var(--potion-glow); } }
@keyframes potion-bubble {
  0% { transform: translateY(0); opacity: 0.85; }
  80% { opacity: 0.85; }
  100% { transform: translateY(-9px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .flask-fill { animation: none; }
  .bubble { display: none; }
}
.flask-mark {
  position: absolute; top: 28px; z-index: 2;
  left: calc(15px + (100% - 30px) * var(--p)); transform: translateX(-50%);
  width: 21px; height: 27px; background: var(--flask-mark) center / 21px 27px no-repeat; image-rendering: pixelated;
}
.wipe-scale:not(.live) .flask-mark, .wipe-scale:not(.live) .flask-fill { display: none; }
.flask-ends { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); margin-top: 4px; min-height: 1.3em; padding: 0 2px; }

/* Home: cards and tiles */
.cards, .tiles, .section-title { max-width: 1160px; margin-left: auto; margin-right: auto; }
.cards, .tiles { padding: 0 16px; display: grid; gap: 1.25rem; }
.main-tiles { grid-template-columns: repeat(4, 1fr); margin-top: -4rem; position: relative; }
.cards { grid-template-columns: repeat(2, 1fr); }
.cards.info { margin-top: 1.25rem; }
.cards.modes { grid-template-columns: 1fr; }
.modes .card ul { columns: 2 22rem; column-gap: 2rem; }
.modes .card li { break-inside: avoid; }
.join h2 { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 0.75rem; font-size: 1.1rem; }
.join ol { margin: 0; padding-left: 1.4rem; }
.card.join li { position: static; padding: 0 0 0 0.25rem; border: 0; margin: 0 0 0.5rem; break-inside: avoid; }
.section-title { padding: 0 16px; margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.3rem; }
.card, .tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.4rem 1.4rem;
}
.card h2 { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 1rem; font-size: 1.25rem; }
.card h2 .ico { width: 1.25em; height: 1.25em; }
.card ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.card li { position: relative; padding: 0.5rem 0 0.5rem 2.4rem; border-top: 1px solid var(--line); }
.card li:first-child { border-top: 0; }
.card li .ico { position: absolute; left: 0; top: 0.6rem; width: 1.6rem; height: 1.6rem; }
.card p:last-child { margin-bottom: 0; }

.tile { display: flex; flex-direction: column; gap: 0.25rem; color: var(--text); text-decoration: none; }
.tile h3 { margin: 0.5rem 0 0.4rem; font-size: 0.95rem; }
.tile p { margin: 0; color: var(--muted); }
.tile-art { height: 4.5rem; display: flex; align-items: center; margin-bottom: 0.25rem; }
.tile-art .brand { width: 4rem; height: 4rem; }
.tile-art .treasure { width: auto; height: 4.5rem; aspect-ratio: 28 / 16; }
a.tile:hover { border-color: var(--accent); }
.tile-action { margin-top: auto !important; padding-top: 0.5rem; font-weight: 700; color: var(--accent) !important; }
.tile.soon .tile-action { align-self: flex-start; color: var(--muted) !important; font-weight: 600; font-size: 0.85rem; border: 1px dashed var(--line); border-radius: 999px; padding: 0.1rem 0.7rem; margin-top: auto; }
.tile.soon .tile-action { margin-top: auto !important; }
.main-tiles .tile { min-height: 11rem; }

/* Rules */
.search { position: sticky; top: 60px; background: var(--surface); padding: 0.75rem 0; margin: 1rem 0; z-index: 1; }
.search label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.search .meta { margin: 0.25rem 0 0; min-height: 1.5em; }
input[type="search"], input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
.toc-title { font-size: 0.85rem; margin: 1.5rem 0 0.6rem; color: var(--muted); }
.toc ul { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.4rem; }
.toc a { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); text-decoration: none; }
.toc a:hover { border-color: var(--accent); color: var(--accent); }
.toc-n { font-family: var(--pixel); font-size: 0.75rem; color: var(--accent); min-width: 1.6rem; }

/* Fun: the clarifications table, verdicts as coloured badges */
.table-wrap { margin: 1rem 0; }
.verdicts table { display: table; border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.verdicts th, .verdicts td { border: 0; border-top: 1px solid var(--line); padding: 0.6rem 0.8rem; }
.verdicts thead th { border-top: 0; color: var(--muted); font-weight: 600; }
.verdict { white-space: nowrap; font-weight: 700; }
.verdict::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 0.5rem; vertical-align: 0.05em; background: currentColor; }
.verdict.yes { color: var(--ok); }
.verdict.no { color: var(--danger); }
.verdict.reward { color: var(--gold); }
.verdict { white-space: normal; }

/* Report form: fields with an error */
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
fieldset:has([aria-invalid="true"]) legend { color: var(--danger); }
#form-error:not([hidden]) { padding: 0.6rem 0.8rem; border: 1px solid var(--danger); border-radius: var(--radius); }
.case-id { display: inline-block; font-family: var(--pixel); font-size: 1rem; padding: 0.4rem 0.7rem; background: var(--bg); border: 1px dashed var(--accent); border-radius: var(--radius); letter-spacing: 0.05em; }
.rule-section h2 a { color: var(--muted); text-decoration: none; }
.rule { display: grid; grid-template-columns: 3.5rem 1fr; gap: 0 0.5rem; padding: 0.4rem 0; border-top: 1px solid var(--line); scroll-margin-top: 10rem; }
.rule:target { background: var(--bg); outline: 2px solid var(--accent); border-radius: 6px; }
.rule-id { font-weight: 700; text-decoration: none; padding-top: 0.05rem; }
.rule-text > :first-child { margin-top: 0; }
.rule-text > :last-child { margin-bottom: 0; }

/* Report form */
.report fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem 1rem; margin: 0 0 1rem; background: var(--bg); }
.report legend { font-weight: 700; padding: 0 0.35rem; }
.field { margin: 0.5rem 0 0.75rem; }
.field label { display: block; font-weight: 600; }
.hint { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.92rem; }
.choice { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.4rem 0; }
.choice input { margin-top: 0.35rem; flex: none; accent-color: var(--play); }
.error { color: var(--danger); margin: 0.25rem 0 0; font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
button[type="submit"] {
  background: var(--play); color: var(--play-text); border: 0; border-radius: var(--radius);
  padding: 0.7rem 1.6rem; font-weight: 700; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}
button[type="submit"]:hover { background: var(--play-hover); }
button[disabled] { opacity: 0.6; cursor: progress; }

/* Site root: language choice */
.root main { padding-top: 3rem; }
.root-logo { color: var(--brand); margin: 2rem 0 2rem; font-size: 3rem; }
.root-logo .logo-long { width: min(420px, 100%); }
.root .pick { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem; }
.root .pick a { display: block; padding: 1rem; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; font-weight: 600; color: var(--text); }
.root .pick a:hover { border-color: var(--accent); }

/* Narrow screens */
@media (max-width: 980px) {
  .main-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .top-row { flex-wrap: wrap; }
  .logo { margin-right: auto; }
  .js .menu { display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 0.5rem 0 1rem; }
  .js .menu.open { display: flex; }
  .js .nav { flex-direction: column; gap: 0; }
  .js .nav a { padding: 0.6rem 0; border-top: 1px solid var(--line); font-size: 1.1rem; }
  .js .langs { padding: 0.75rem 0 0.5rem; font-size: 1rem; gap: 1rem; }
  .js .theme-toggle { align-self: flex-start; }
  .js .menu-toggle { display: inline-flex; order: 2; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 1.1rem; }
  main.page h2 { font-size: 1rem; }
  .hero { min-height: 0; align-items: flex-end; background-image: var(--hero-img-s); background-position: 72% top; background-size: auto 380px; padding-top: 260px; background-color: var(--bg); }
  .hero::before { background: linear-gradient(0deg, var(--bg) 0%, var(--bg) calc(100% - 330px), transparent calc(100% - 200px)); }
  .hero-in { padding: 0 16px 5rem; }
  .addr-field input.addr { font-size: 0.78rem; padding: 0.8rem 0.5rem; }
  .addr-field .dot { margin-left: 0.6rem; }
  .wipe-text { font-size: 0.72rem; }
  .main-tiles { gap: 0.75rem; }
  .tile { padding: 1rem; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-links { justify-content: flex-start; }
  main.page { margin: 1rem 0 0; border-radius: 0; border-left: 0; border-right: 0; padding: 1.25rem 16px 2rem; }
  .rule { grid-template-columns: 2.9rem 1fr; }
  .verdicts table, .verdicts tbody, .verdicts tr, .verdicts td { display: block; width: 100%; }
  .verdicts thead { display: none; }
  .verdicts table { border: 0; }
  .verdicts tr { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 0.6rem; background: var(--bg); }
  .verdicts td { border: 0; padding: 0.55rem 0.8rem 0.2rem; }
  .verdicts td.verdict { padding: 0 0.8rem 0.6rem; }
  .toc ul { grid-template-columns: 1fr 1fr; }
  .toc a { padding: 0.4rem 0.5rem; font-size: 0.92rem; }
}
@media (max-width: 420px) {
  .copy { padding: 0 0.85rem; }
  .copy-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
