/* 机械摸鱼所 — design tokens. Every component below reads from these. */
:root {
  color-scheme: light;
  /* grounds */
  --paper: #e6e5e0;
  --paper-2: #d9d7d0;
  --stone: #c2c1bb;
  --graphite: #1e211d;
  --graphite-2: #2a2e29;
  --graphite-3: #383e37;
  --oxide: #3c5343;
  --brass: #c8952f;
  /* inks */
  --ink: #191b18;
  --ink-soft: #464943;
  --on-dark: #efefea;
  --on-dark-soft: #bcbfb6;
  --brass-ink: #855f17;
  --brass-light: #e5bd66;
  --signal-on: #74c278;
  --signal-off: #e0674c;
  --danger: #8f301f;
  --danger-dark: #702416;
  --danger-soft: #f1ddd5;
  --danger-ink: #6f2615;
  /* type */
  --font-text: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "Big Shoulders", "Noto Sans SC", sans-serif;
  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  --step-lead: clamp(1.25rem, 1.05rem + 0.75vw, 1.625rem);
  --step-sub: clamp(1.5rem, 1.1rem + 1.4vw, 2.5rem);
  --step-head: clamp(2.5rem, 1.45rem + 3.5vw, 4.5rem);
  --step-display: clamp(3.25rem, 6.6vw, 6rem);
  /* frame */
  --frame: 1600px;
  --margin: clamp(1rem, 3vw, 3rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section-space: clamp(6rem, 11vw, 10.5rem);
  --header-height: 76px;
  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur-base: 240ms;
  --dur-reveal: 640ms;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; scrollbar-gutter: stable; background: var(--ink); }
body { margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.6; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
::selection { background: var(--brass); color: var(--ink); }
html { scrollbar-color: var(--graphite-3) var(--paper-2); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--graphite-3); border: 3px solid var(--paper-2); }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 4px; }
h1, h2, h3, p, dl, dd, figure, ol { margin: 0; }
h1, h2, h3 { font-weight: 900; text-wrap: balance; }
.phrase { display: inline-block; }
p, li { text-wrap: pretty; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link { position: fixed; top: 12px; left: 12px; z-index: 1000; transform: translateY(-160%); background: var(--brass); color: var(--ink); padding: 12px 18px; font-weight: 700; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }

/* ---------- controls ---------- */
.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 4px 12px; padding: 14px 26px; border: 0; border-radius: 2px; font-size: 1rem; font-weight: 700; line-height: 1.1; text-decoration: none; cursor: pointer; transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out); }
.button:active { transform: translateY(2px); }
.button--large { min-height: 64px; padding: 18px 34px; font-size: 1.125rem; }
.button--small { min-height: 44px; padding: 10px 18px; font-size: 1rem; }
.button--primary { background: var(--brass); color: var(--ink); }
.button--primary:hover { background: var(--brass-light); }
.button--ink { background: var(--ink); color: var(--on-dark); }
.button--ink:hover { background: var(--graphite-3); }
.text-action { min-height: 48px; display: inline-flex; align-items: center; gap: 10px; padding: 0 0 2px; border: 0; background: transparent; color: var(--ink); font-size: 1rem; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.45em; cursor: pointer; transition: color var(--dur-fast) ease, text-decoration-color var(--dur-fast) ease; }
.text-action img { width: 22px; height: 22px; object-fit: contain; }
.text-action:hover { color: var(--brass-ink); }
.text-action--light { color: var(--on-dark); }
.text-action--light:hover { color: var(--brass-light); }
.text-action--light img { filter: invert(1); }

/* glyphs: one tinted family from the project's icon files */
.glyph { display: block; flex: none; width: 56px; height: 56px; background: currentColor; -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; }
.glyph--wheat { --glyph: url("../img/wheat.png"); }
.glyph--train { --glyph: url("../img/train.png"); }
.glyph--tea { --glyph: url("../img/tea_cup.png"); }
.glyph--wrench { background: url("../img/jxdl.png") center / contain no-repeat; -webkit-mask: none; mask: none; }

/* ---------- header ---------- */
.site-header { position: relative; z-index: 100; min-height: var(--header-height); display: flex; align-items: center; gap: clamp(1rem, 3vw, 3rem); padding: 10px var(--margin); background: var(--paper); }
.brand-lockup { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--ink); text-decoration: none; }
.brand-lockup img { width: 48px; height: 48px; object-fit: cover; mix-blend-mode: multiply; }
.brand-lockup span { display: grid; gap: 2px; }
.brand-lockup strong { font-size: 1rem; font-weight: 900; line-height: 1.1; }
.brand-lockup small { font-family: var(--font-display); font-size: var(--step-small); font-weight: 700; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-soft); }
.desktop-nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.6vw, 2.5rem); }
.desktop-nav a { position: relative; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); font-size: 1rem; font-weight: 700; text-decoration: none; }
.desktop-nav a::after { content: ""; position: absolute; right: 0; bottom: 8px; left: 0; height: 3px; transform: scaleX(0); transform-origin: right; background: var(--brass); transition: transform var(--dur-base) var(--ease-out); }
.desktop-nav a:hover::after, .desktop-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle, .mobile-menu { display: none; }

/* ---------- hero: title on paper, the world on the right, the station board beneath ---------- */
.hero { max-width: var(--frame); min-height: calc(100svh - var(--header-height)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: minmax(0, 1fr) auto; column-gap: var(--gutter); padding: 0 var(--margin) var(--margin); }
.hero-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; padding: clamp(1.5rem, 6vh, 5rem) 0 clamp(1.5rem, 4vh, 3rem); }
.hero h1 { font-size: var(--step-display); line-height: 1; letter-spacing: -0.03em; }
.hero-en { margin-top: 0.75rem; max-width: 9em; color: var(--brass-ink); font-family: var(--font-display); font-size: clamp(1.875rem, 3.4vw, 3.25rem); font-weight: 800; line-height: 0.9; text-transform: uppercase; }
.hero-lead { max-width: 21em; font-size: var(--step-lead); font-weight: 500; line-height: 1.5; }
.hero-spec { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 1.25rem; color: var(--ink-soft); font-size: var(--step-small); font-weight: 500; }
.hero-spec span { display: inline-flex; align-items: center; gap: 10px; }
.hero-spec span::before { content: ""; width: 8px; height: 8px; background: var(--brass); }
.hero-actions, .community-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 32px; margin-top: 2.25rem; }

.hero-media { position: relative; min-height: 420px; overflow: hidden; background: var(--graphite); }
.hero-slides, .hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-slide { object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 1.6s var(--ease-in-out), transform 7s linear; }
.hero-slide.is-active { z-index: 1; opacity: 1; transform: scale(1); }

/* status board: built like a station display board, holds only live data */
.status-board { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 3.4fr); gap: 3px; background: var(--graphite); color: var(--on-dark); font-variant-numeric: tabular-nums; border: 3px solid var(--graphite); }
.status-board__state { display: flex; align-items: center; gap: 16px; padding: 18px 22px; background: var(--graphite-2); }
.status-board__state > div { display: grid; gap: 2px; }
.status-board__state strong { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.status-board__time { color: var(--on-dark-soft); font-size: var(--step-small); }
.status-indicator { position: relative; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--brass); }
.status-indicator.is-online { background: var(--signal-on); }
.status-indicator.is-offline { background: var(--signal-off); }
.status-board__data { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 3px; }
.status-cell { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 16px 20px 18px; background: var(--graphite-2); }
.status-cell dt { color: var(--on-dark-soft); font-size: var(--step-small); }
.status-cell dd { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-display); font-size: clamp(2rem, 2.6vw, 2.75rem); font-weight: 800; line-height: 1; }
.status-cell dd small { font-family: var(--font-text); font-size: var(--step-small); font-weight: 500; color: var(--on-dark-soft); }
.status-sep { color: var(--on-dark-soft); font-weight: 700; }
.flap { position: relative; min-width: 1.4em; display: inline-block; padding: 6px 10px 1px; border-bottom: 3px solid var(--graphite-3); background: var(--graphite); color: var(--brass-light); text-align: center; }
.flap--dim { color: var(--on-dark); }
.flap.is-flipping { animation: flap 420ms var(--ease-out); }
.status-word { font-family: var(--font-text) !important; font-size: clamp(1.375rem, 1.8vw, 1.75rem) !important; font-weight: 900 !important; }
.status-word--small { font-size: 1.125rem !important; font-weight: 700 !important; overflow-wrap: anywhere; }
.status-cell--players dd { flex-wrap: wrap; }
.load-bar { flex-basis: 100%; height: 6px; margin-top: 12px; background: var(--graphite); }
.load-bar i { display: block; width: calc(var(--load, 0) * 100%); height: 100%; background: var(--brass); transition: width 900ms var(--ease-out); }
.status-board__motd { grid-column: 1 / -1; display: flex; gap: 16px; min-width: 0; padding: 10px 22px; background: var(--graphite); color: var(--on-dark-soft); font-size: var(--step-small); }
.status-board__motd span:first-child { flex: none; color: var(--brass-light); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.02em; }
.status-board__motd span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- shared section frame ---------- */
.section-pad { padding: var(--section-space) max(var(--margin), (100% - var(--frame)) / 2 + var(--margin)); }
h2 { font-size: var(--step-head); line-height: 1.08; letter-spacing: -0.03em; }

/* ---------- about ---------- */
.about-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: end; }
.about-head h2 { grid-column: 1 / span 7; }
.about-copy { grid-column: 8 / -1; display: grid; gap: 20px; }
.about-copy .statement { font-size: var(--step-lead); font-weight: 700; line-height: 1.5; }
.about-copy p:last-child { color: var(--ink-soft); }
.principles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); margin-top: clamp(4rem, 8vw, 7rem); }
.principle-lead { grid-column: 1 / span 6; min-height: 460px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: clamp(1.75rem, 3.5vw, 3.5rem); background: var(--graphite); color: var(--on-dark); }
.principle-lead img { width: clamp(150px, 15vw, 220px); height: auto; image-rendering: pixelated; }
.principle-lead h3 { font-size: var(--step-sub); line-height: 1.15; }
.principle-lead p { max-width: 26em; margin-top: 14px; color: var(--on-dark-soft); }
.principle-list { grid-column: 8 / -1; display: grid; align-content: space-between; gap: 48px; padding-block: 12px; }
.principle-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 24px; align-items: start; }
.principle-item .glyph { width: 64px; height: 64px; color: var(--ink); }
.principle-item h3 { font-size: 1.5rem; line-height: 1.25; }
.principle-item p { margin-top: 8px; color: var(--ink-soft); }

/* ---------- world ---------- */
.world { background: var(--stone); }
.world-panorama img { width: 100%; height: clamp(320px, 64svh, 760px); object-fit: cover; object-position: center 45%; }
.world-inner { max-width: var(--frame); margin: 0 auto; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; padding: clamp(4rem, 8vw, 7rem) var(--margin) var(--section-space); }
.world-heading { grid-column: 1 / span 4; }
.world-heading p { margin-top: 24px; max-width: 22em; color: var(--ink); }
.world-meadow { grid-column: 6 / -1; margin-top: clamp(-11rem, -12vw, -5rem); }
.world-meadow img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.world-meadow figcaption { margin-top: 12px; font-size: var(--step-small); font-weight: 500; }

/* ---------- features ---------- */
.features { background: var(--graphite); color: var(--on-dark); overflow: hidden; }
.features-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: center; }
.features-head > div:first-child { grid-column: 1 / span 6; }
.features-head p { max-width: 26em; margin-top: 24px; color: var(--on-dark-soft); font-size: var(--step-lead); line-height: 1.5; }
.cog-pair { --s: clamp(200px, 24vw, 360px); grid-column: 8 / -1; justify-self: end; position: relative; width: calc(var(--s) * 1.4); height: calc(var(--s) * 1.04); }
.cog { display: block; }
.cog--large { position: absolute; top: 0; left: calc(var(--s) * 0.4); width: var(--s); height: var(--s); fill: var(--graphite-3); transform: rotate(calc(20.65deg + var(--spin, 0deg))); }
.cog--small { position: absolute; top: calc(var(--s) * 0.537); left: calc(var(--s) * 0.034); width: calc(var(--s) * 0.5); height: calc(var(--s) * 0.5); fill: var(--brass); transform: rotate(calc(43.8deg - 2 * var(--spin, 0deg))); }
.feature-primary { display: grid; gap: 4px; margin-top: clamp(3.5rem, 7vw, 6rem); }
.feature-row { display: grid; grid-template-columns: 72px minmax(0, 5fr) minmax(0, 5fr); gap: var(--gutter); align-items: center; padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 2.5rem); background: var(--graphite-2); }
.feature-row .glyph { width: 56px; height: 56px; color: var(--brass-light); }
.feature-row h3 { font-size: var(--step-sub); line-height: 1.15; }
.feature-row p { max-width: 24em; color: var(--on-dark-soft); font-size: var(--step-lead); line-height: 1.5; }
.feature-row:first-child { padding-block: clamp(2.5rem, 5vw, 4.5rem); background: var(--brass); color: var(--ink); }
.feature-row:first-child h3 { font-size: var(--step-head); }
.feature-row:first-child p { color: var(--ink); }
.feature-row:first-child .glyph { width: 72px; height: 72px; }
.feature-secondary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin-top: clamp(3rem, 6vw, 5rem); }
.feature-secondary h3 { font-size: 1.5rem; line-height: 1.25; color: var(--brass-light); }
.feature-secondary p { margin-top: 10px; color: var(--on-dark-soft); }

/* ---------- downloads: the ticket ---------- */
.downloads { background: var(--brass); }
.ticket { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); background: var(--paper); }
.ticket::before, .ticket::after { content: ""; position: absolute; left: calc(700% / 12 - 22px); width: 44px; height: 44px; border-radius: 50%; background: var(--brass); }
.ticket::before { top: -22px; }
.ticket::after { bottom: -22px; }
.ticket-main { padding: clamp(2rem, 5.5vw, 5.5rem); }
.ticket-sub { margin-top: 12px; font-size: var(--step-sub); font-weight: 700; line-height: 1.25; }
.ticket-text { max-width: 30em; margin-top: 28px; color: var(--ink-soft); }
.ticket-button { flex-direction: column; align-items: flex-start; margin-top: 40px; padding-inline: 32px 56px; }
.ticket-button span { font-size: 1.125rem; }
.ticket-button small { color: var(--on-dark-soft); font-size: var(--step-small); font-weight: 500; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 40px; color: var(--ink-soft); font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.01em; text-transform: uppercase; }
.ticket-stub { display: flex; flex-direction: column; padding: clamp(2rem, 4.5vw, 4.5rem); background: var(--paper-2); border-left: 6px dotted var(--brass); }
.ticket-stub h3 { font-size: 1.5rem; line-height: 1.2; }
.ticket-stub ol { display: grid; gap: 22px; margin-top: 32px; padding: 0; list-style: none; counter-reset: steps; }
.ticket-stub li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; counter-increment: steps; }
.ticket-stub li::before { content: counter(steps); color: var(--brass-ink); font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.ticket-stub .text-action { margin-top: auto; padding-top: 36px; align-self: flex-start; }

/* ---------- rules ---------- */
.rules { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.rules-intro { grid-column: 1 / span 4; align-self: start; position: sticky; top: 32px; }
.rules-intro p { margin-top: 24px; max-width: 20em; color: var(--ink-soft); }
.rules-body { grid-column: 6 / -1; }
.rules-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 52px var(--gutter); padding: 0; list-style: none; counter-reset: rules; }
.rules-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; counter-increment: rules; }
.rules-list li::before { content: counter(rules); grid-row: 1 / span 2; color: var(--brass-ink); font-family: var(--font-display); font-size: 2.75rem; font-weight: 800; line-height: 0.85; }
.rules-list strong { font-size: 1.5rem; font-weight: 900; line-height: 1.3; }
.rules-list span { margin-top: 6px; color: var(--ink-soft); }
.rules-note { margin-top: clamp(3rem, 6vw, 4.5rem); padding: 24px 28px; background: var(--graphite); color: var(--on-dark); font-weight: 700; }

/* ---------- ban notice: the rules' ledger continued, one tone step down ---------- */
.ban-notice { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); padding-top: clamp(4rem, 7vw, 6rem); background: var(--paper-2); }
.ban-notice__intro { grid-column: 1 / span 4; align-self: start; position: sticky; top: 32px; }
.ban-notice__intro h2 { font-size: var(--step-sub); }
.ban-notice__intro p { margin-top: 16px; max-width: 20em; color: var(--ink-soft); }
.ban-notice__all { margin-top: 20px; }
.ban-notice__body { grid-column: 6 / -1; min-width: 0; }
.ban-ledger { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.ban-ledger__state { padding: 28px; background: var(--paper); color: var(--ink-soft); }
.ban-ledger__state--empty { display: grid; gap: 4px; }
.ban-ledger__state--empty strong { color: var(--ink); font-size: 1.125rem; }

.ban-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1.5fr); gap: 8px 24px; align-items: center; padding: 18px 22px; background: var(--paper); }
.ban-row__who { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.ban-row__name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; line-height: 1; letter-spacing: 0.01em; overflow-wrap: anywhere; }
.ban-row__type { padding: 3px 8px; background: var(--stone); font-size: var(--step-small); font-weight: 700; line-height: 1.3; }
.ban-row--perm_ban .ban-row__type { background: var(--ink); color: var(--on-dark); }
.ban-row--temp_ban .ban-row__type { background: var(--brass); color: var(--ink); }
.ban-row--warning .ban-row__type { background: transparent; padding-inline: 0; color: var(--brass-ink); }
.ban-row__reason { min-width: 0; overflow-wrap: anywhere; }
.ban-row__meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 20px; margin: 0; }
.ban-row__meta dt { color: var(--ink-soft); font-size: 0.8125rem; }
.ban-row__meta dd { margin: 0; font-size: var(--step-small); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ban-row--expired .ban-row__status, .ban-row--lifted .ban-row__status { color: var(--ink-soft); font-weight: 500; }
.ban-row--expired, .ban-row--lifted { background: color-mix(in srgb, var(--paper) 55%, var(--paper-2)); }

/* ---------- community preview: three notes pinned on stone ---------- */
.community-preview { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; background: var(--stone); }
.community-preview__head { grid-column: 1 / span 4; display: grid; justify-items: start; gap: 16px; }
.community-preview__head h2 { font-size: var(--step-sub); }
.community-preview__head p { color: var(--ink); }
.community-preview__head .button { margin-top: 8px; }
.preview-notes { grid-column: 6 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gutter); margin: 0; padding: 0; list-style: none; }
.preview-note { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 200px; padding: 22px; background: var(--paper); }
.preview-note:nth-child(2) { margin-top: 32px; }
.preview-note:nth-child(3) { margin-top: 12px; }
.preview-note__text { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow-wrap: anywhere; white-space: pre-line; }
.preview-note__by { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--step-small); }
.preview-note__by time { margin-left: auto; color: var(--ink-soft); }
.preview-notes__state { grid-column: 1 / -1; display: grid; justify-items: start; gap: 8px; padding: 28px; background: var(--paper); color: var(--ink-soft); }
.preview-notes__state strong { color: var(--ink); font-size: 1.125rem; }
.tag { display: inline-block; padding: 2px 7px; background: var(--paper-2); font-size: 0.8125rem; font-weight: 700; line-height: 1.4; }
.tag--brass { background: var(--brass); color: var(--ink); }
.tag--ink { background: var(--ink); color: var(--on-dark); }

/* ---------- community ---------- */
.community { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: var(--gutter); padding: var(--section-space) max(var(--margin), (100% - var(--frame)) / 2 + var(--margin)); overflow: hidden; background: var(--oxide); color: var(--on-dark); }
.community h2 { max-width: 6em; }
.community p { max-width: 28em; margin-top: 28px; color: var(--on-dark); font-size: var(--step-lead); line-height: 1.55; }
.badge { --b: clamp(240px, 30vw, 440px); position: relative; justify-self: center; width: var(--b); height: var(--b); }
.cog--ring { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--brass); transform: rotate(calc(var(--spin, 0deg) * -0.6)); }
.badge img { position: absolute; top: 22%; left: 22%; width: 56%; height: 56%; object-fit: cover; border-radius: 50%; }

/* ---------- footer ---------- */
.site-footer { padding: clamp(3rem, 6vw, 5rem) var(--margin) max(2rem, env(safe-area-inset-bottom)); background: var(--ink); color: var(--on-dark); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.footer-nav a, .footer-nav button { min-height: 44px; display: inline-flex; align-items: center; padding: 0; border: 0; background: none; color: var(--on-dark); font-size: 1rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: color var(--dur-fast) ease; }
.footer-nav a:hover, .footer-nav button:hover { color: var(--brass-light); }
.footer-name { margin-top: clamp(2.5rem, 6vw, 5rem); overflow: hidden; font-size: clamp(4rem, 15.4vw, 15rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.04em; white-space: nowrap; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-right: 64px; margin-top: clamp(1.5rem, 4vw, 3rem); color: var(--on-dark-soft); font-size: var(--step-small); }
.footer-legal { max-width: 78ch; margin-top: 24px; color: var(--on-dark-soft); font-size: 0.8125rem; line-height: 1.65; }
.footer-legal a { color: var(--on-dark); }

.back-to-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 2px; background: var(--brass); color: var(--ink); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity var(--dur-base) ease, transform var(--dur-base) var(--ease-out), background-color var(--dur-fast) ease; }
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--brass-light); }
.toast { position: fixed; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; z-index: 200; max-width: min(90vw, 420px); transform: translateX(-50%); padding: 14px 18px; background: var(--ink); color: var(--on-dark); font-size: var(--step-small); }
.toast[hidden] { display: none; }

/* ---------- preloader: the cogwheels turn with the real download progress ---------- */
.preloader { display: none; }
.is-loading body { overflow: hidden; }
.is-loading .preloader { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: var(--margin) var(--margin) calc(var(--margin) + 6px); background: var(--paper); color: var(--ink); opacity: 1; transition: opacity 440ms var(--ease-out); }
.is-leaving .preloader { opacity: 0; pointer-events: none; }
.preloader__brand { display: grid; gap: 2px; padding-top: 4px; }
.preloader__brand strong { font-size: 1rem; font-weight: 900; line-height: 1.2; }
.preloader__brand span { color: var(--ink-soft); font-family: var(--font-display); font-size: var(--step-small); font-weight: 700; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; }
.preloader__stage { display: grid; place-items: center; min-height: 0; }
.preloader .cog-pair { --s: clamp(150px, 22vw, 260px); --spin: calc(var(--p, 0) * 360deg); grid-column: auto; justify-self: center; }
.preloader .cog { transition: transform 420ms var(--ease-out); }
.preloader .cog--large { fill: var(--ink); }
.preloader__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; }
.preloader__percent { display: flex; align-items: baseline; font-family: var(--font-display); font-size: clamp(5rem, 14vw, 10rem); font-weight: 800; line-height: 0.8; font-variant-numeric: tabular-nums; }
.preloader__percent small { margin-left: 6px; color: var(--brass-ink); font-size: 0.4em; }
.preloader__info { display: grid; justify-items: end; gap: 4px; text-align: right; }
.preloader__info p:first-child { font-weight: 700; }
.preloader__bytes { color: var(--ink-soft); font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.preloader__skip { margin-top: 8px; visibility: hidden; opacity: 0; transition: opacity var(--dur-base) ease, color var(--dur-fast) ease; }
.can-skip .preloader__skip { visibility: visible; opacity: 1; }
.preloader__bar { position: absolute; right: 0; bottom: 0; left: 0; height: 6px; background: var(--paper-2); }
.preloader__bar i { display: block; width: calc(var(--p, 0) * 100%); height: 100%; background: var(--brass); transition: width 420ms var(--ease-out); }

/* ---------- motion: parts of a section enter in order, once ---------- */
@keyframes flap { from { transform: rotateX(80deg); opacity: 0.3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .has-motion .reveal > * { opacity: 0; transform: translateY(22px); transition: opacity var(--dur-reveal) var(--ease-out) calc(var(--i, 0) * 80ms), transform var(--dur-reveal) var(--ease-out) calc(var(--i, 0) * 80ms); }
  .has-motion .reveal.in-view > * { opacity: 1; transform: none; }
}

/* ---------- laptop / tablet ---------- */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .status-board { grid-template-columns: 1fr; }
  .status-board__state { padding-block: 12px; }
  .about-head h2, .about-copy { grid-column: 1 / -1; }
  .about-copy { max-width: 40em; }
  .principle-lead { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: flex-end; }
  .principle-list { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin-top: 32px; }
  .principle-item { grid-template-columns: 1fr; gap: 16px; }
  .world-heading { grid-column: 1 / span 5; }
  .world-meadow { grid-column: 6 / -1; margin-top: 0; }
  .feature-row { grid-template-columns: 64px minmax(0, 1fr); }
  .feature-row p { grid-column: 2; }
  .rules-intro { grid-column: 1 / -1; position: static; }
  .rules-body { grid-column: 1 / -1; margin-top: 3rem; }
  .ban-notice__intro, .community-preview__head { grid-column: 1 / -1; position: static; }
  .ban-notice__body, .preview-notes { grid-column: 1 / -1; margin-top: 2rem; }
  .ban-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
  .ban-row__meta { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  :root { --header-height: 68px; }
  .desktop-nav, .header-cta { display: none; }
  .brand-lockup small { display: none; }
  .menu-toggle { min-width: 86px; min-height: 44px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0; border: 0; background: transparent; color: var(--ink); font-weight: 700; cursor: pointer; }
  .menu-toggle__icon { width: 24px; display: grid; gap: 6px; }
  .menu-toggle__icon i { display: block; width: 100%; height: 3px; background: currentColor; transition: transform var(--dur-base) var(--ease-out); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__icon i:first-child { transform: translateY(4.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__icon i:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .mobile-menu { position: fixed; inset: var(--header-height) 0 0; z-index: 99; display: grid; align-content: start; gap: 4px; padding: 16px var(--margin) 40px; background: var(--paper); }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu a, .mobile-menu button { min-height: 60px; display: flex; align-items: center; padding: 0 18px; border: 0; background: var(--paper-2); color: var(--ink); font-size: 1.25rem; font-weight: 700; text-decoration: none; cursor: pointer; }
  .mobile-menu button { background: var(--brass); }
  .hero { min-height: 0; grid-template-columns: 1fr; grid-template-rows: auto; }
  .hero-copy { gap: 1.75rem; padding: 1.5rem 0 2rem; }
  .hero-media { min-height: 0; aspect-ratio: 16 / 10; }
  .status-board { margin-top: 3px; }
  .status-board__data { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-heading, .world-meadow { grid-column: 1 / -1; }
  .world-meadow { margin-top: 2.5rem; }
  .features-head > div:first-child { grid-column: 1 / -1; }
  .features-head { position: relative; }
  .features-head .cog-pair { --s: 84px; position: absolute; top: 0; right: 0; }
  .features-head h2 { padding-right: 132px; }
  .features-head p { margin-top: 48px; }
  .ticket { grid-template-columns: 1fr; }
  .ticket::before, .ticket::after { display: none; }
  .ticket-stub { border-left: 0; border-top: 6px dotted var(--brass); }
  .community { grid-template-columns: 1fr; gap: 4rem; }
  .badge { --b: min(72vw, 340px); }
}

@media (max-width: 560px) {
  :root { --section-space: 5.5rem; }
  .brand-lockup img { width: 44px; height: 44px; }
  .hero h1 { font-size: 16vw; }
  .preloader__info { justify-items: start; text-align: left; }
  .hero-actions, .community-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .hero-actions .button, .community-actions .button { width: 100%; }
  .hero-actions .text-action, .community-actions .text-action { align-self: flex-start; }
  .status-board__state { padding: 16px; }
  .status-cell { padding: 14px 16px 16px; }
  .status-cell--players { grid-column: 1 / -1; }
  .status-board__motd { padding: 10px 16px; }
  .principle-lead { flex-direction: column; align-items: flex-start; }
  .principle-list { grid-template-columns: 1fr; gap: 36px; }
  .principle-item { grid-template-columns: 52px minmax(0, 1fr); }
  .principle-item .glyph { width: 52px; height: 52px; }
  .feature-row { grid-template-columns: 1fr; gap: 14px; }
  .feature-row p { grid-column: 1; }
  .feature-row .glyph, .feature-row:first-child .glyph { width: 48px; height: 48px; }
  .feature-secondary { grid-template-columns: 1fr; gap: 32px; }
  .ticket-button { width: 100%; }
  .rules-list { grid-template-columns: 1fr; gap: 36px; }
  .rules-list li { grid-template-columns: 44px minmax(0, 1fr); }
  .rules-list li::before { font-size: 2.25rem; }
  .ban-row { grid-template-columns: 1fr; padding: 16px; }
  .ban-row__meta { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; }
  .ban-row__meta dd { white-space: normal; }
  .preview-notes { grid-template-columns: 1fr; }
  .preview-note, .preview-note:nth-child(n) { min-height: 0; margin-top: 0; }
  .footer-name { font-size: 18vw; }
  .footer-meta { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .hero-slide:not(.is-active) { display: none; }
}
