/* vraj.pro home. With JS the home page is a world you walk (game.js): the title floats over it and
   each chapter opens as a panel. /?page and no-JS visitors get the chapters as a page: a title
   screen, then projects, how i code, games, football and a way to follow. world.css holds the tokens. */

.home {
  --display: "Archivo", "Space Mono", system-ui, sans-serif;
  --wide: 125%;
  --cage: 84rem;
  --dots: radial-gradient(circle at center, transparent 0 0.9px, var(--void) 1.5px) 0 0 / 4px 4px;
}

/* ---------- title screen ---------- */
.screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto auto;
  column-gap: var(--pad);
  min-height: calc(100svh - var(--bar-h));
  padding: var(--pad);
  isolation: isolate;
  overflow: hidden;
}
.screen::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    var(--dots),
    linear-gradient(to top, var(--void) 14%, rgb(0 0 0 / 0.55) 48%, rgb(0 0 0 / 0.2)),
    linear-gradient(to right, rgb(0 0 0 / 0.6), transparent 60%);
}
/* the last DOOM frame of this session sits behind the title */
.doom-frame {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated;
  opacity: 0.55;
}

.title {
  grid-column: 1 / -1; grid-row: 2;
  margin: 0 0 0 -0.05em;
  font: 900 min(40vw, 54svh)/0.8 var(--display);
  font-stretch: var(--wide);
  letter-spacing: -0.045em;
}
.lede { grid-column: 1; grid-row: 3; align-self: end; display: grid; gap: 0.5rem; padding-top: 1.4rem; }
.lede-line {
  font: 800 clamp(1.15rem, 0.8rem + 1.4vw, 2rem)/1.1 var(--display);
  font-stretch: 112%;
  letter-spacing: -0.01em;
}
.doom-line { color: var(--dust); min-height: 1.65em; text-wrap: pretty; }
.doom-line a { color: var(--bone); }
.doom-line a:hover { color: var(--clay); }
:is([data-doom="died"], [data-doom="quit"]) .doom-line { color: var(--clay); }

/* the menu: a bone bar slides behind the selected line, like a console menu */
.menu {
  grid-column: 2; grid-row: 3; align-self: end;
  display: grid; min-width: 15rem; padding-top: 1.4rem;
}
.menu a {
  position: relative; isolation: isolate;
  display: flex; align-items: baseline; gap: 0.9rem;
  padding: 0.28rem 1rem 0.28rem 0.55rem;
  font: 800 clamp(1.05rem, 0.75rem + 0.8vw, 1.45rem)/1.2 var(--display);
  font-stretch: 112%;
  color: var(--dust); text-decoration: none;
  transition: color 0.2s;
}
/* the number is the chapter's own (01 projects ... 04 football), so the menu and the chapters agree */
.menu a::before {
  content: attr(data-no);
  min-width: 1.3em;
  font: 900 0.9rem/1 var(--font-dot); color: var(--clay);
  transition: color 0.2s;
}
.menu a::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--bone);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--out);
}
.menu a[data-sel] { color: var(--void); }
.menu a[data-sel]::before { color: var(--void); }
.menu a[data-sel]::after { transform: scaleX(1); }
.menu a:focus-visible { outline-offset: 2px; }

/* ---------- chapters ---------- */
main { padding: 0 var(--pad); }
.chapter { max-width: var(--cage); margin: 0 auto; padding-top: clamp(6rem, 13vw, 12rem); }
.chapter-head {
  position: relative;
  display: flex; align-items: flex-end; gap: clamp(1rem, 3vw, 2.4rem);
  margin-bottom: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(0.8rem, 1.5vw, 1.4rem);
}
.chapter-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  border-bottom: 1px solid var(--rule);
  transform-origin: left;
}
.chapter-no { font: 900 clamp(2.6rem, 1.6rem + 5vw, 7rem)/0.78 var(--font-dot); color: var(--clay); }
.heading {
  min-width: 0;
  font: 900 clamp(2.5rem, 1rem + 7.4vw, 8.5rem)/0.82 var(--display);
  font-stretch: var(--wide);
  letter-spacing: -0.04em;
}
.label { color: var(--dust); font-size: var(--t-small); letter-spacing: 0.06em; font-weight: 400; }
.sub { margin: 0 0 0.9rem; color: var(--dust); font-size: var(--t-small); font-weight: 400; letter-spacing: 0.06em; }
.note { font-size: var(--t-small); color: var(--dust); margin-top: 0.7rem; }
.note.is-off { color: var(--clay); }

/* ---------- 01 projects ---------- */
.feature {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  background: var(--panel); border: 1px solid var(--rule);
}
.feature-copy { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 1.1rem; padding: clamp(1.4rem, 3.4vw, 3rem); }
.feature-name {
  font: 900 clamp(3.2rem, 1.6rem + 6vw, 7.5rem)/0.82 var(--display);
  font-stretch: var(--wide);
  letter-spacing: -0.045em;
}
.feature-line { max-width: 36ch; font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.15rem); }
.feature-line code, .feature-quote code { font: inherit; color: var(--clay); }
.install { display: flex; max-width: 30rem; margin-top: 0.4rem; background: var(--void); border: 1px solid var(--rule); }
.install code { flex: 1; min-width: 0; padding: 0.8rem 1rem; overflow-x: auto; white-space: nowrap; font: inherit; }
.install code::before { content: "$ "; color: var(--dust); }
.install button {
  padding: 0 1.1rem;
  background: none; border: 0; border-left: 1px solid var(--rule);
  color: var(--dust); cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.install button:is(:hover, :focus-visible) { background: var(--bone); color: var(--void); }
.feature-link { justify-self: start; color: var(--dust); text-decoration-color: var(--rule); }
.feature-link:hover { color: var(--bone); text-decoration-color: currentColor; }
.feature-link span:not(:empty) { margin-left: 0.4rem; color: var(--clay); }
.feature-quote {
  display: grid; align-content: space-between; gap: 2rem;
  margin: 0; padding: clamp(1.4rem, 3.4vw, 3rem);
  border-left: 1px solid var(--rule);
  background:
    radial-gradient(circle, #1c1c20 0.8px, transparent 1.2px) 0 0 / 14px 14px,
    var(--void);
}
.feature-quote blockquote {
  margin: 0;
  font: 700 clamp(1.15rem, 0.9rem + 1vw, 1.7rem)/1.28 var(--display);
  font-stretch: 100%;
  text-wrap: pretty;
}
.feature-quote blockquote::before {
  content: "\201C"; display: block; height: 0.55em;
  font: 900 4.2rem/1 var(--display); color: var(--clay);
}
.feature-quote figcaption { font-size: var(--t-small); }
.feature-quote figcaption a { color: var(--dust); text-decoration-color: var(--rule); }
.feature-quote figcaption a:hover { color: var(--bone); }

.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 1rem; margin-top: 1rem; }
.models-card {
  position: relative; overflow: hidden;
  display: grid; align-content: space-between; gap: 1.2rem;
  min-height: 17rem; padding: clamp(1.4rem, 2.6vw, 2rem);
  background: var(--panel); border: 1px solid var(--rule);
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.models-card b {
  font: 900 clamp(2.6rem, 1.6rem + 3.4vw, 4.6rem)/0.85 var(--display);
  font-stretch: var(--wide);
  letter-spacing: -0.04em;
}
.models-line { max-width: 30ch; color: var(--dust); transition: color 0.25s; }
.models-card .go {
  position: absolute; top: clamp(1.2rem, 2.4vw, 1.8rem); right: clamp(1.4rem, 2.6vw, 2rem);
  font-size: 1.8rem; line-height: 1;
  transition: transform 0.45s var(--out);
}
.models-card:is(:hover, :focus-visible) { background: var(--bone); border-color: var(--bone); color: var(--void); }
.models-card:is(:hover, :focus-visible) :is(.label, .models-line) { color: var(--graphite); }
.models-card:is(:hover, :focus-visible) .go { transform: translateX(0.5rem); }

.slots { padding: clamp(1.4rem, 2.6vw, 2rem); border: 1px solid var(--rule); }
.slots .rows { margin-top: 0.5rem; }
#repo-list .row > a { text-decoration: none; }
#repo-list .row > a:hover { color: var(--clay); }
#repo-list .row > span { color: var(--dust); white-space: nowrap; }

/* ---------- 02 how i code ---------- */
.track { position: relative; display: grid; padding: 0.5rem 0 0; }
.track-cmds {
  display: grid; grid-template-columns: 6fr 1fr; gap: 1.2rem;
  margin-bottom: 1.6rem;
  font-size: var(--t-small); color: var(--clay);
}
.track-cmds span { padding-bottom: 0.55rem; border-bottom: 1px solid var(--clay); }
.stations { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.stations::before, .stations::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0.45rem; height: 1px;
  background: var(--rule);
}
.stations::after { background: var(--clay); transform-origin: left; }
.stations li { position: relative; display: grid; align-content: start; gap: 0.45rem; padding: 2rem 0.9rem 0 0; }
.stations li::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 0.9rem; height: 0.9rem;
  background: var(--clay); border: 1px solid var(--clay);
  rotate: 45deg;
}
.stations b {
  font: 800 clamp(1.05rem, 0.7rem + 1vw, 1.6rem)/1 var(--display);
  font-stretch: 112%;
  overflow-wrap: anywhere;
}
.stations span { color: var(--dust); font-size: var(--t-small); }
.stations em { font-style: normal; color: var(--clay); }
.exit {
  justify-self: end; margin-top: 1.8rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--clay); color: var(--clay);
  font: 900 1.3rem/1 var(--font-dot);
}
.track-note { max-width: 62ch; margin-top: 1rem; color: var(--dust); }
.track-note a { color: var(--bone); }
.track-note a:hover { color: var(--clay); }

.kit {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
  gap: clamp(2.5rem, 6vw, 6rem); align-items: start;
  margin-top: clamp(3.5rem, 7vw, 6rem);
}
.specs > div {
  display: grid; grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr); gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.specs > div:first-child { border-top: 1px solid var(--rule); }
.specs dt { color: var(--dust); }

/* the stack prints as a receipt: bone paper, black ink, a torn edge */
.receipt {
  position: relative;
  padding: 1.5rem 1.4rem 2.2rem;
  background: var(--bone); color: var(--void);
  font-size: 0.82rem; line-height: 1.5;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
}
.receipt-head {
  font: inherit;
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 0.9rem; margin-bottom: 0.2rem;
  border-bottom: 1px dashed var(--void);
}
.receipt-head b { font: 900 1.9rem/1 var(--font-dot); }
.receipt-head span, .receipt-foot, .receipt-lines .what { color: var(--graphite); }
.receipt-lines > div {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--graphite);
}
.receipt-lines dt, .receipt-lines .price { font-weight: 700; }
.receipt-lines .price { text-align: right; }
.receipt-lines .what { grid-column: 1 / -1; font-size: var(--t-small); }
.receipt-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  margin-top: 0.4rem; padding-top: 0.9rem;
  border-top: 2px solid var(--void);
}
.receipt-total b { font: 900 clamp(1.4rem, 1.1rem + 1vw, 1.9rem)/1 var(--font-dot); text-align: right; }
.receipt-foot { margin-top: 0.3rem; font-size: var(--t-small); text-align: right; }

/* ---------- 03 games: covers sit on a dot screen until you look at one. colour belongs to the games ---------- */
.shelf {
  --cols: 2;
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(1rem, 2vw, 1.6rem);
}
.next {
  grid-column: 1 / -1;
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto auto;
  grid-template-areas: "label date" ". ." "name name" "count count";
  gap: 1rem;
  min-height: 19rem; padding: clamp(1.2rem, 2.4vw, 2rem);
  border: 1px solid var(--clay);
  background:
    repeating-linear-gradient(to bottom, transparent 0 3px, rgb(0 0 0 / 0.38) 3px 4px),
    radial-gradient(120% 70% at 100% 100%, color-mix(in srgb, var(--clay) 34%, transparent), transparent 70%),
    var(--void);
}
.next-name {
  font: 900 clamp(4.2rem, 2rem + 9vw, 9.5rem)/0.78 var(--display);
  font-stretch: var(--wide);
  letter-spacing: -0.05em;
}
.next .label { grid-area: label; }
.next-date { grid-area: date; color: var(--dust); font-size: var(--t-small); }
.next-name { grid-area: name; }
.countdown, .next-out { grid-area: count; }
.countdown, .next-out { display: none; }
.next.is-live .countdown { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; font-size: var(--t-small); }
.countdown b {
  display: inline-block; margin-right: 0.15rem;
  font: 900 clamp(2rem, 1.4rem + 2.2vw, 3.4rem)/1 var(--font-dot);
  color: var(--bone); font-variant-numeric: tabular-nums;
}
.next.is-out .countdown { display: none; }
.next.is-out .next-out { display: block; font: 900 clamp(2.4rem, 1.6rem + 3vw, 4rem)/1 var(--font-dot); color: var(--clay); }

.game { position: relative; perspective: 900px; }
.cover {
  position: relative; overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--panel);
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.6s var(--out), box-shadow 0.6s var(--out);
}
.game[style*="--tilt"] .cover { transition: transform 0.08s linear, box-shadow 0.6s var(--out); }
.cover img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.3) brightness(0.92);
  transition: filter 0.5s var(--out), opacity 0.6s var(--out), scale 0.7s var(--out);
}
.cover::before, .cover::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cover::before { background: var(--dots); transition: opacity 0.5s var(--out); }
.cover::after {
  z-index: 2;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 0%), rgb(255 255 255 / 0.28), transparent 55%);
  opacity: 0; transition: opacity 0.4s;
}
.game:hover .cover { box-shadow: 0 2.2rem 3rem -1.6rem rgb(0 0 0 / 0.9), 0 0 0 1px var(--rule); }
.game:hover .cover::before { opacity: 0; }
.game:hover .cover::after { opacity: 1; }
.game:hover .cover img { filter: none; scale: 1.04; }
.game-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0.3rem 0.8rem; padding-top: 0.8rem; }
.game-meta h3 { font-size: 0.8rem; font-weight: 400; line-height: 1.35; color: var(--dust); transition: color 0.2s; }
.game:hover .game-meta h3 { color: var(--bone); }
.score { color: var(--dust); font-size: var(--t-small); white-space: nowrap; }
.score b { font: 900 2.1rem/0.8 var(--font-dot); color: var(--clay); }

/* the series: 2018 on the shelf, ragnarök when you look */
.series { grid-column: span 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(1rem, 2vw, 1.6rem); }
.series .cover img + img { position: absolute; inset: 0; opacity: 0; }
.series:hover .cover img + img { opacity: 1; }
.series .game-meta { align-content: start; padding-top: 0; }
.series .game-meta h3 { color: var(--bone); font-size: 0.9rem; }
.series-list { grid-column: 1 / -1; margin-top: 0.6rem; font-size: var(--t-small); color: var(--dust); }
.series-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--rule); }

/* ---------- 04 football ---------- */
.pitch { position: relative; max-width: 68rem; margin: 0; }
.pitch svg { width: 100%; height: auto; overflow: visible; }
.pitch-lines * { fill: none; stroke: var(--dust); stroke-width: 1.5; }
.pitch-lines .spot { fill: var(--dust); stroke: none; }
.run { fill: none; stroke: var(--clay); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.me-dot { fill: var(--clay); }
.me-ring { fill: none; stroke: var(--clay); stroke-width: 2; transform-box: fill-box; transform-origin: center; }
/* the position card sits in the empty half, between the box and the centre circle */
.pitch figcaption { position: absolute; left: 20.5%; bottom: 7%; display: grid; gap: 0.5rem; }
.pitch figcaption b { font: 900 clamp(4rem, 2.6rem + 6vw, 9rem)/0.8 var(--font-dot); color: var(--clay); }
.pitch figcaption span { font: 800 clamp(1.1rem, 0.85rem + 0.9vw, 1.6rem)/1.1 var(--display); font-stretch: 112%; }

/* ---------- follow ---------- */
.outro {
  max-width: var(--cage); margin: 0 auto;
  display: grid; justify-items: start; gap: 1rem;
  padding: clamp(8rem, 18vw, 16rem) 0 clamp(4rem, 8vw, 7rem);
}
.handle {
  position: relative; isolation: isolate;
  max-width: 100%;
  margin-left: -0.06em; padding: 0 0.06em;
  font: 900 min(11rem, 10.6vw)/0.95 var(--display);
  font-stretch: var(--wide);
  letter-spacing: -0.045em;
  color: var(--bone); text-decoration: none;
  transition: color 0.3s;
}
.handle::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--bone);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--out);
}
.handle:is(:hover, :focus-visible) { color: var(--void); }
.handle:is(:hover, :focus-visible)::after { transform: scaleX(1); }
.outro-links a { color: var(--dust); }
.outro-links a:hover { color: var(--bone); }

/* ---------- motion: the title screen boots, then scroll drives the rest ---------- */
@keyframes menu-in { from { opacity: 0; translate: -1.2rem 0; } }
@keyframes ping { from { scale: 0.6; opacity: 1; } to { scale: 2.6; opacity: 0; } }
.motion .menu a { animation: menu-in 0.6s var(--out) both; animation-delay: calc(0.35s + var(--i, 0) * 0.06s); }
.menu a:nth-child(2) { --i: 1; }
.menu a:nth-child(3) { --i: 2; }
.menu a:nth-child(4) { --i: 3; }
.menu a:nth-child(5) { --i: 4; }
.menu a:nth-child(6) { --i: 5; }
.motion .me-ring { animation: ping 2.2s var(--out) infinite; }
.gate-on .menu a { animation-play-state: paused; }

@supports (animation-timeline: view()) {
  @keyframes away { to { translate: 0 22%; opacity: 0.15; } }
  @keyframes rule-in { from { transform: scaleX(0); } }
  @keyframes slide-in { from { translate: -40% 0; opacity: 0; } }
  @keyframes fill { from { transform: scaleX(0); } }
  @keyframes node { from { background: var(--void); border-color: var(--dust); } }
  /* both ends are inset() so the clip interpolates; inset() to none would flip at the halfway point */
  @keyframes print { from { clip-path: inset(0 0 100% 0); translate: 0 -1.5rem; } to { clip-path: inset(0); translate: 0 0; } }
  @keyframes draw { from { stroke-dashoffset: 1; } }
  @keyframes color-in { to { filter: none; } }
  @keyframes dots-out { to { opacity: 0; } }

  .motion .title { animation: away linear both; animation-timeline: scroll(root); animation-range: 0 90svh; }
  .motion .chapter-head::after { animation: rule-in linear both; animation-timeline: view(); animation-range: entry 20% cover 40%; }
  .motion .chapter-no { animation: slide-in linear both; animation-timeline: view(); animation-range: entry 10% cover 30%; }

  .motion .track { view-timeline: --track block; }
  .motion .stations::after { animation: fill linear both; animation-timeline: --track; animation-range: entry 70% cover 55%; }
  .motion .stations li::before { animation: node linear both; animation-timeline: --track; }
  .motion .stations li:nth-child(1)::before { animation-range: entry 70% entry 71%; }
  .motion .stations li:nth-child(2)::before { animation-range: entry 90% entry 91%; }
  .motion .stations li:nth-child(3)::before { animation-range: cover 30% cover 31%; }
  .motion .stations li:nth-child(4)::before { animation-range: cover 36% cover 37%; }
  .motion .stations li:nth-child(5)::before { animation-range: cover 42% cover 43%; }
  .motion .stations li:nth-child(6)::before { animation-range: cover 48% cover 49%; }
  .motion .stations li:nth-child(7)::before { animation-range: cover 54% cover 55%; }

  .motion .receipt { animation: print linear both; animation-timeline: view(); animation-range: entry 15% cover 45%; }
  .motion .run { animation: draw linear both; animation-timeline: view(); animation-range: entry 40% cover 55%; }

  /* touch screens have no hover: a cover takes its colour while it crosses the middle of the screen */
  @media (hover: none) {
    .motion .cover img { animation: color-in linear both; animation-timeline: view(); animation-range: contain 30% contain 45%; }
    .motion .cover::before { animation: dots-out linear both; animation-timeline: view(); animation-range: contain 30% contain 45%; }
  }
}

/* ---------- gate: beat E1M1 to get in (doom/gate.js) ---------- */
.gate-on body { overflow: hidden; }
.gate-on body > :not(.gate) { visibility: hidden; }
.gate-on [data-split] .w, .gate-on [data-split] .w::after { animation-play-state: paused !important; }
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-rows: 1fr auto; place-items: center;
  background: var(--void);
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.5s var(--out);
}
.gate.is-out { clip-path: inset(0 0 100% 0); }
.gate-screen {
  position: relative;
  width: min(100vw - 2 * var(--pad), (100svh - var(--bar-h) - 2 * var(--pad)) * 4 / 3);
  aspect-ratio: 4 / 3;
}
.gate canvas { width: 100%; height: 100%; image-rendering: pixelated; background: var(--void); cursor: crosshair; touch-action: none; }
.gate-card {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 0.9rem;
  padding: var(--pad);
  text-align: center;
  background: rgb(0 0 0 / 0.88);
}
.gate-card[hidden] { display: none; }
.motion .gate-card:not([hidden]) { animation: gate-card-in 0.35s var(--out) both; }
.gate-card h2 {
  max-width: 17ch;
  font: 900 clamp(1.8rem, 1rem + 3vw, 3.6rem)/1.02 var(--font-dot);
  letter-spacing: 0.01em;
}
.gate-card p { max-width: 34ch; color: var(--dust); line-height: 1.5; text-wrap: balance; }
.gate button { border: 0; cursor: pointer; }
.gate button kbd { color: inherit; border-color: currentColor; margin-left: 0.4rem; }
.gate-card button {
  min-height: 2.9rem; min-width: 8.5rem;
  padding: 0.6rem 1.3rem;
  background: var(--bone); color: var(--void);
  transition: background 0.2s;
}
.gate-card button:is(:hover, :focus-visible) { background: var(--clay); }
.is-mocked .gate-card h2 { color: var(--clay); }
.motion .is-mocked .gate-card h2 { animation: laugh 0.12s steps(2) 6; }
.gate-bar {
  display: flex; align-items: center; gap: 1.5rem;
  width: 100%; height: var(--bar-h); padding: 0 var(--pad);
  border-top: 1px solid var(--rule);
  font-size: var(--t-small); color: var(--dust);
}
.gate-bar [data-clock] { color: var(--bone); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.gate-keys { margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate-bar button { padding: 0.2rem 0.6rem; background: none; border: 1px solid var(--rule); color: var(--dust); transition: color 0.2s, border-color 0.2s; }
.gate-bar button:is(:hover, :focus-visible) { color: var(--clay); border-color: var(--clay); }
.gate-controls { display: grid; grid-template-columns: repeat(5, auto); gap: 0.6rem 1.6rem; margin: 0.2rem 0 0.4rem; font-size: var(--t-small); }
.gate-controls div { display: grid; justify-items: center; gap: 0.3rem; }
.gate-controls dt { display: flex; gap: 0.2rem; align-items: center; color: var(--bone); white-space: nowrap; }
.gate-controls dd { color: var(--dust); white-space: nowrap; }
.gate-use kbd { border-color: var(--clay); color: var(--clay); }
.gate-controls .gate-use dd { color: var(--bone); }
.gate-nudge {
  position: absolute; left: 50%; bottom: 21%;
  padding: 0.45rem 0.9rem;
  background: rgb(0 0 0 / 0.85); border: 1px solid var(--clay);
  font-size: var(--t-small); white-space: nowrap;
  transform: translateX(-50%); pointer-events: none;
}
.gate-nudge[hidden] { display: none; }
.gate-nudge kbd { border-color: var(--clay); color: var(--clay); }
.motion .gate-nudge:not([hidden]) { animation: gate-nudge-in 0.35s var(--out) both; }
@keyframes laugh { 50% { transform: translate(2px, -2px) rotate(-1deg); } }
@keyframes gate-card-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes gate-nudge-in { from { opacity: 0; transform: translate(-50%, 6px); } }

/* ---------- widths ---------- */
@media (min-width: 48rem) {
  .shelf { --cols: 3; }
  .next { grid-column: span 2; grid-row: span 2; min-height: 0; container-type: inline-size; }
  /* the poster's numeral, outlined in orange behind everything else on the card */
  .next::before {
    content: "vi"; position: absolute; top: 9%; right: -0.1em; z-index: 0;
    font: 900 104cqi/0.8 var(--display); font-stretch: var(--wide); letter-spacing: -0.06em;
    color: transparent; -webkit-text-stroke: 1.5px var(--clay);
    opacity: 0.8; pointer-events: none;
  }
  .next > * { position: relative; z-index: 1; }
}
@media (min-width: 75rem) {
  .shelf { --cols: 5; }
}
@media (max-width: 60rem) {
  .screen { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto auto auto; min-height: min(100svh - var(--bar-h), 52rem); }
  .menu { grid-column: 1; grid-row: 4; min-width: 0; margin: 0 -0.55rem; }
  .feature, .duo, .kit { grid-template-columns: minmax(0, 1fr); }
  .feature-quote { border-left: 0; border-top: 1px solid var(--rule); }
  .gate-keys { display: none; }
}
@media (max-width: 48rem) {
  .track-cmds { display: none; }
  .stations { grid-template-columns: minmax(0, 1fr); padding-left: 2.2rem; }
  .stations::before, .stations::after { left: 0.45rem; right: auto; top: 0.45rem; bottom: 1.4rem; width: 1px; height: auto; }
  .stations::after { transform-origin: top; }
  .stations li { padding: 0 0 1.5rem; grid-template-columns: minmax(6rem, auto) minmax(0, 1fr); align-items: baseline; column-gap: 1rem; }
  .stations li::before { left: -2.2rem; }
  .exit { justify-self: start; margin-top: 0.4rem; }
  .pitch figcaption { position: static; margin-top: 1.4rem; }
  .specs > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  @supports (animation-timeline: view()) {
    @keyframes fill-y { from { transform: scaleY(0); } }
    .motion .stations::after { animation-name: fill-y; }
  }
}
@media (max-width: 40rem) {
  .gate-card { gap: 0.6rem; }
  .gate-controls { grid-template-columns: repeat(3, auto); gap: 0.35rem 1rem; }
}
@media (max-width: 30rem) {
  .series { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------- the world (game.js): the home page as a place you walk ---------- */
.world, .only-world, .hud, .pad, .veil, .panel-close { display: none; }
.js:not(.world-on) .only-page { display: revert; }
.only-page { display: none; }
.skip-world { display: none; }
.js.world-on .skip-world { display: block; }
.js.world-on .skip-page { display: none; }

.js.world-on body { height: 100svh; padding-bottom: 0; overflow: hidden; }
.js.world-on .world {
  display: block;
  position: fixed; left: 0; top: 0;
  width: 100%; height: calc(100% - var(--bar-h));
  background: var(--void);
  touch-action: none; outline: none;
  transition: filter 0.45s var(--out);
}
.js.world-on .reticle, .js.world-on .doom-frame { display: none !important; }
.js.world-on.panel-open .world, .js.world-on.map-open .world { filter: blur(6px) brightness(0.4) saturate(0.8); }
.js.world-on .only-world { display: revert; }
.js.world-on .only-page { display: none; }

/* the title floats over the start, like a game's title screen, and sinks away once you leave */
.js.world-on .screen {
  position: fixed; left: 0; right: 0; top: 0; z-index: 10;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto;
  justify-items: center; align-content: start;
  min-height: 0; padding: clamp(1.5rem, 7svh, 5rem) var(--pad) 0;
  overflow: visible; isolation: auto;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.7s var(--out), translate 0.7s var(--out), visibility 0s;
}
.js.world-on .screen::before { display: none; }
.js.world-on:not(.at-start) .screen { opacity: 0; translate: 0 -1.2rem; visibility: hidden; transition: opacity 0.5s var(--out), translate 0.5s var(--out), visibility 0s 0.5s; }
.js.world-on .title {
  grid-column: 1; grid-row: 1;
  margin: 0;
  font-size: clamp(4.4rem, 1.6rem + 11vw, 12.5rem);
  line-height: 0.82;
  text-shadow: 0 0.05em 0.5em rgb(0 0 0 / 0.65);
}
.js.world-on .lede { grid-column: 1; grid-row: 2; justify-items: center; padding-top: 0.9rem; }
.js.world-on .lede-line { text-shadow: 0 0.1em 0.6em #000; }
.js.world-on .doom-line { min-height: 0; text-shadow: 0 0.1em 0.6em #000; }
.js.world-on .doom-line:empty { display: none; }
/* the title lets clicks through to the world, except on its links */
.js.world-on .doom-line a { pointer-events: auto; }
.js.world-on .menu {
  grid-column: 1; grid-row: 3; align-self: start;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.15rem 0.2rem;
  min-width: 0; max-width: 54rem; padding-top: 1.3rem;
  pointer-events: auto;
}
.js.world-on .menu a { padding: 0.3rem 0.75rem 0.3rem 0.5rem; font-size: clamp(0.9rem, 0.75rem + 0.45vw, 1.15rem); text-shadow: 0 0.1em 0.6em #000; }
.js.world-on .menu a::before { min-width: 0; font-size: 0.75rem; }
.js.world-on .menu a:not([data-no])::before { display: none; }
/* over the world the bar only follows the pointer or focus; nothing is lit before you choose */
.js.world-on .menu a[data-sel] { color: var(--dust); }
.js.world-on .menu a[data-sel]::before { color: var(--clay); }
.js.world-on .menu a[data-sel]::after { transform: scaleX(0); }
.js.world-on .menu a:is(:hover, :focus-visible), .js.world-on .menu a:is(:hover, :focus-visible)::before { color: var(--void); }
.js.world-on .menu a:is(:hover, :focus-visible)::after { transform: scaleX(1); }
/* hud: achievements on the left, map and sound on the right */
.js.world-on .hud {
  display: flex; justify-content: space-between; align-items: flex-start;
  position: fixed; left: 0; right: 0; top: 0; z-index: 14;
  padding: 0.85rem var(--pad);
  pointer-events: none;
}
.hud button { pointer-events: auto; cursor: pointer; }
.hud-shards { display: flex; align-items: center; gap: 0.55rem; padding: 0.25rem 0; background: none; border: 0; color: var(--bone); }
.hud-shards i { width: 0.7rem; height: 0.7rem; rotate: 45deg; background: var(--clay); box-shadow: 0 0 0.9rem rgb(217 119 87 / 0.7); }
.hud-shards b { font: 700 1.05rem/1 var(--font-mono); color: var(--clay); font-variant-numeric: tabular-nums; }
.hud-shards span { color: var(--dust); font-size: var(--t-small); }
.hud-right { display: flex; gap: 0.5rem; }
.hud-right button {
  padding: 0.35rem 0.75rem;
  background: rgb(0 0 0 / 0.55); border: 1px solid var(--rule);
  color: var(--dust); font-size: var(--t-small);
  transition: color 0.2s, border-color 0.2s;
}
.hud-right button kbd { margin-left: 0.3rem; border-color: currentColor; color: inherit; }
.hud-right button:is(:hover, :focus-visible) { color: var(--bone); border-color: var(--dust); }
.hud-right button[aria-pressed="true"] { color: var(--clay); border-color: var(--clay); }

/* the verb over whatever you can use */
.prompt {
  position: fixed; left: 0; top: 0; z-index: 12;
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.3rem 0.7rem 0.3rem 0.35rem;
  background: rgb(0 0 0 / 0.82); border: 1px solid var(--rule);
  font-size: var(--t-small); white-space: nowrap;
  translate: -50% -100%;
  pointer-events: none;
  opacity: 0; transition: opacity 0.2s;
}
.prompt.is-on { opacity: 1; }
.prompt kbd { border-color: var(--clay); color: var(--clay); }

/* the caption over the painting or book you stand at: full size, full contrast */
.caption {
  position: fixed; left: 0; top: 0; z-index: 12;
  display: grid; justify-items: center; gap: 0.15rem;
  max-width: min(22rem, 80vw); padding: 0.45rem 0.8rem 0.5rem;
  background: rgb(0 0 0 / 0.86); border: 1px solid var(--rule);
  text-align: center;
  translate: -50% -100%;
  pointer-events: none;
  opacity: 0; transition: opacity 0.25s;
}
.caption.is-on { opacity: 1; }
.caption b { font: 700 0.85rem/1.3 var(--font-mono); color: var(--bone); }
.caption-score { color: var(--dust); font-size: var(--t-small); }
.caption-score i { margin-right: 0.1rem; font: 900 1.35rem/1 var(--font-dot); font-style: normal; color: var(--clay); }
.caption-score:empty, .caption-meta:empty { display: none; }
.caption-meta { color: var(--dust); font-size: var(--t-small); }
.caption-use { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.2rem; color: var(--bone); font-size: var(--t-small); }
.caption-use:empty { display: none; }
.caption-use kbd { border-color: var(--clay); color: var(--clay); }

/* until the first step, the controls sit beside the skull */
.move-hint {
  position: fixed; left: 0; top: 0; z-index: 12;
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: rgb(0 0 0 / 0.7); border: 1px solid var(--rule);
  color: var(--dust); font-size: var(--t-small); white-space: nowrap;
  translate: -50% -100%;
  pointer-events: none;
  opacity: 0; transition: opacity 0.4s;
}
.move-hint.is-on { opacity: 1; }
.move-hint kbd { color: var(--bone); }
.move-hint kbd + kbd { margin-left: -0.1rem; }

/* a place's name, the first time in a while you walk into it */
.area-card {
  position: fixed; left: 50%; top: 22%; z-index: 11;
  display: grid; justify-items: center; gap: 0.5rem;
  translate: -50% 0.6rem;
  text-align: center;
  pointer-events: none;
  opacity: 0; transition: opacity 0.9s var(--out), translate 0.9s var(--out);
}
.area-card.is-on { opacity: 1; translate: -50% 0; }
.area-card span { font: 900 1.4rem/1 var(--font-dot); color: var(--clay); }
.area-card span:empty { display: none; }
.area-card b {
  font: 900 clamp(2.4rem, 1.2rem + 4.4vw, 5.4rem)/0.88 var(--display);
  font-stretch: var(--wide);
  letter-spacing: -0.04em;
  text-shadow: 0 0.05em 0.5em #000;
}
.area-card::after { content: ""; width: min(24rem, 64vw); height: 1px; margin-top: 0.3rem; background: linear-gradient(90deg, transparent, var(--bone), transparent); }
/* in a shaft the card sits small in the top-left corner, under the count, clear of the skull, the rail and the landings */
.area-card.is-compact { left: var(--pad); top: 3.4rem; justify-items: start; gap: 0.25rem; text-align: left; translate: 0 0.4rem; }
.area-card.is-compact.is-on { translate: 0 0; }
.area-card.is-compact span { font-size: 0.95rem; }
.area-card.is-compact b { font-size: clamp(1.4rem, 1rem + 1.4vw, 2.1rem); }
.area-card.is-compact::after { display: none; }

.toast {
  position: fixed; top: 3.8rem; right: var(--pad); z-index: 28;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.1rem 0.85rem;
  min-width: min(17rem, calc(100vw - 2 * var(--pad))); padding: 0.8rem 1.1rem;
  background: rgb(8 8 9 / 0.94); border: 1px solid var(--clay);
  box-shadow: 0 0 2.5rem rgb(217 119 87 / 0.18);
  pointer-events: none;
  opacity: 0; translate: 0 -0.6rem; transition: opacity 0.35s, translate 0.35s var(--out);
}
.toast.is-on { opacity: 1; translate: 0 0; }
.toast i { grid-row: span 3; width: 0.9rem; height: 0.9rem; margin: 0 0.2rem; rotate: 45deg; background: var(--clay); box-shadow: 0 0 1rem var(--clay); }
.toast .label { color: var(--clay); }
.toast.is-line .label { display: none; }
.toast b { font-weight: 700; }
.toast-more { color: var(--dust); font-size: var(--t-small); }
.toast-more:empty { display: none; }

.fade { position: fixed; inset: 0; z-index: 30; background: var(--void); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.fade.is-on { opacity: 1; }

/* panels: a chapter of the page, opened over the world */
.js.world-on main { padding: 0; }
.js.world-on #main > section { display: none; }
.js.world-on #main > section.is-open {
  --corner: linear-gradient(var(--clay), var(--clay));
  display: block;
  position: fixed; z-index: 25;
  top: clamp(0.75rem, 5svh, 3rem); bottom: calc(var(--bar-h) + clamp(0.75rem, 4svh, 2.5rem));
  left: clamp(0.75rem, 5vw, 4rem); right: clamp(0.75rem, 5vw, 4rem);
  max-width: 78rem; margin: 0 auto;
  padding: clamp(1.1rem, 3vw, 2.6rem);
  overflow: auto; overscroll-behavior: contain;
  background:
    var(--corner) top left / 1.4rem 1px no-repeat, var(--corner) top left / 1px 1.4rem no-repeat,
    var(--corner) top right / 1.4rem 1px no-repeat, var(--corner) top right / 1px 1.4rem no-repeat,
    var(--corner) bottom left / 1.4rem 1px no-repeat, var(--corner) bottom left / 1px 1.4rem no-repeat,
    var(--corner) bottom right / 1.4rem 1px no-repeat, var(--corner) bottom right / 1px 1.4rem no-repeat,
    rgb(6 6 7 / 0.95);
  border: 1px solid var(--rule);
  box-shadow: 0 2rem 6rem rgb(0 0 0 / 0.85);
}
.motion.world-on #main > section.is-open { animation: panel-in 0.4s var(--out) both; }
@keyframes panel-in { from { opacity: 0; translate: 0 0.8rem; } }
.js.world-on .veil { position: fixed; inset: 0; z-index: 24; background: rgb(0 0 0 / 0.3); }
.js.world-on.panel-open .veil { display: block; }
.js.world-on .panel-close {
  display: flex; align-items: center; gap: 0.5rem;
  position: sticky; top: 0; z-index: 3; float: right;
  margin: 0 0 0 1rem;
  padding: 0.4rem 0.75rem;
  background: var(--void); border: 1px solid var(--rule);
  color: var(--dust); font-size: var(--t-small); cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.js.world-on .panel-close kbd { border-color: currentColor; color: inherit; }
.js.world-on .panel-close:is(:hover, :focus-visible) { color: var(--bone); border-color: var(--dust); }
.js.world-on #main .chapter { padding-top: 0; }
.js.world-on #main .chapter-head { margin-bottom: clamp(1.2rem, 3vw, 2.2rem); }
.js.world-on #main .heading { font-size: clamp(2.2rem, 1rem + 4.4vw, 5rem); }
.js.world-on #main .chapter-no { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.8rem); }
.js.world-on #main .kit { margin-top: clamp(2rem, 4vw, 3.5rem); }
.js.world-on #main .outro { padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 3rem); }
.js.world-on #main .outro.is-open { bottom: auto; max-width: 60rem; max-height: calc(100svh - var(--bar-h) - clamp(1.5rem, 9svh, 5.5rem)); }
.js.world-on #main .handle { font-size: min(8rem, 11vw); }
.js.world-on #main .stations::after, .js.world-on #main .stations li::before,
.js.world-on #main .receipt, .js.world-on #main .run,
.js.world-on #main .chapter-head::after, .js.world-on #main .chapter-no { animation: none; }
/* the keeper of the stall sells only the receipt */
.js.world-on #how[data-show="stack"] { max-width: 32rem; bottom: auto; max-height: calc(100svh - var(--bar-h) - clamp(1.5rem, 9svh, 5.5rem)); }
/* a world that never started leaves no overlay behind */
html:not(.world-on) :is(.prompt, .caption, .move-hint, .area-card, .toast, .fade, .map) { display: none !important; }
.js.world-on #how[data-show="stack"] :is(.chapter-head, .track, .track-note, .kit-col:first-child) { display: none; }
.js.world-on #how[data-show="stack"] .kit { grid-template-columns: minmax(0, 1fr); margin: 0; }

/* the map is the pause screen: where you have been, where you can go, what you have done */
.map {
  position: fixed; left: 0; right: 0; top: 0; bottom: var(--bar-h); z-index: 26;
  display: grid; place-items: center;
  padding: clamp(0.75rem, 3vw, 2.5rem);
}
.map[hidden] { display: none; }
.map-box {
  display: grid; grid-template-columns: minmax(0, 1fr) 15rem; grid-template-rows: auto minmax(0, 1fr);
  gap: 1rem 1.8rem;
  width: min(78rem, 100%); max-height: 100%;
  padding: clamp(1rem, 2.6vw, 2.2rem);
  overflow: auto;
  background: rgb(6 6 7 / 0.95); border: 1px solid var(--rule);
  box-shadow: 0 2rem 6rem rgb(0 0 0 / 0.85);
}
.motion .map:not([hidden]) .map-box { animation: panel-in 0.35s var(--out) both; }
.map-box header { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.map-box h2 { font: 900 clamp(2.2rem, 1.2rem + 3.4vw, 4.2rem)/0.82 var(--display); font-stretch: var(--wide); letter-spacing: -0.04em; }
.map-box header button {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.75rem; background: none; border: 1px solid var(--rule);
  color: var(--dust); font-size: var(--t-small); cursor: pointer;
}
.map-box header button kbd { border-color: currentColor; color: inherit; }
.map-box header button:is(:hover, :focus-visible) { color: var(--bone); border-color: var(--dust); }
.map-box canvas {
  width: 100%; aspect-ratio: 184 / 76; align-self: start;
  border: 1px solid var(--rule);
  background: radial-gradient(circle, #1c1c20 0.8px, transparent 1.2px) 0 0 / 14px 14px, var(--void);
  cursor: pointer;
}
.map-side { display: grid; align-content: start; gap: 0.5rem; }
.map-side ul { display: grid; gap: 0.1rem; margin-bottom: 1.1rem; }
.map-side button {
  width: 100%; padding: 0.35rem 0.6rem;
  background: none; border: 0; text-align: left; cursor: pointer;
  font: 800 1rem/1.2 var(--display); font-stretch: 112%;
  color: var(--dust);
  transition: background 0.2s, color 0.2s;
}
/* where you stand gets the map's ring; the bone bar is only for where you point */
.map-side button[aria-current] { color: var(--bone); }
.map-side button[aria-current]::before {
  content: ""; display: inline-block;
  width: 0.5rem; height: 0.5rem; margin-right: 0.5rem;
  border: 2px solid var(--clay); border-radius: 50%;
  vertical-align: 0.02em;
}
.map-side button:is(:hover, :focus-visible) { background: var(--bone); color: var(--void); }
.touch .panel-close kbd, .touch .map-box header button kbd { display: none; }
.ach li { display: flex; align-items: center; gap: 0.6rem; padding: 0.2rem 0; color: var(--dust); font-size: var(--t-small); }
.ach i { flex: none; width: 0.55rem; height: 0.55rem; rotate: 45deg; border: 1px solid var(--graphite); }
.ach .is-got { color: var(--bone); }
.ach .is-got i { background: var(--clay); border-color: var(--clay); }

/* touch: a strip of controls under the world, one cluster per thumb */
.js.world-on.touch { --pad-h: 9.5rem; }
.js.world-on.touch .world { height: calc(100% - var(--bar-h) - var(--pad-h)); }
.js.world-on.touch .pad {
  display: flex; justify-content: space-between; align-items: center;
  position: fixed; left: 0; right: 0; bottom: var(--bar-h); z-index: 13;
  height: var(--pad-h); padding: 0 0.9rem;
  background: var(--void); border-top: 1px solid var(--rule);
}
.pad div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; max-width: 9.6rem; }
.pad div:first-child { max-width: none; }
.pad button {
  width: 4rem; height: 4rem;
  background: rgb(0 0 0 / 0.55); border: 1px solid var(--rule); border-radius: 50%;
  color: var(--bone); font-size: var(--t-small);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.pad button[hidden] { display: none; }
.pad button.is-down { background: var(--bone); color: var(--void); }
.pad [data-act="up"].is-ready { border-color: var(--clay); color: var(--clay); }
.js.world-on.touch.panel-open .pad button, .js.world-on.touch.map-open .pad button { visibility: hidden; }

@media (max-width: 60rem) {
  .map-box { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 30rem) {
  .js.world-on .menu a { padding: 0.25rem 0.55rem 0.25rem 0.4rem; }
  .js.world-on .menu a::before { display: none; }
  .hud-right button kbd { display: none; }
  .pad button { width: 3.6rem; height: 3.6rem; }
}
@media (max-width: 40rem) {
  /* the close button gets its own row so the heading keeps its width */
  .js.world-on .panel-close { float: none; margin: 0 0 0.8rem auto; width: max-content; }
}
