/* Night Shift: nightshiftpuzzle.com. Dressed like the game: the night-blue warehouse, yellow sign-boards with
   hazard tape, Russo One for anything that shouts and Geist for reading (both self-hosted, public/fonts/, OFL).
   One column for reading, mobile first, no outside requests. Motion is small and stops under reduced motion. */

/* ------------------------------------------------------------------------------------------- fonts */
@font-face { font-family: "Russo One"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/russo-one-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Russo One"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/russo-one-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Russo One"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/russo-one-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --bg: #0f1f2c;            /* the warehouse at night: the game's backdrop */
  --deep: #0b1823;
  --panel: #132737;
  --grid: #1a3142;
  --rail: #7b90a2;
  --text: #dfe8ee;
  --dim: #a9b6c2;
  --accent: #f2b705;        /* the crane, the sign-boards, SHIFT */
  --accent-dark: #b98600;
  --ink: #1b232a;           /* writing on yellow */
  --tape: #15191e;
  --line: rgba(123, 144, 162, 0.28);
  --display: "Russo One", "Arial Black", Impact, system-ui, sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
  --bar-h: 65px;            /* the fixed bar at the top of every page (two rows on a phone: see "The bar") */
  --hazard: repeating-linear-gradient(-45deg, var(--accent) 0 10px, var(--tape) 10px 20px);
  color-scheme: dark;
}

/* ------------------------------------------------------------------------------------------- languages
   Russo One and Geist cover Latin and Cyrillic. Japanese, Korean and Chinese use the system's own fonts, with
   no italics; lines break the way each language does. */
:lang(ja) { --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif; }
:lang(ko) { --sans: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif; }
:lang(zh) { --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif; }
:is(:lang(ja), :lang(ko), :lang(zh)) { --display: "Russo One", var(--sans); }
:lang(ja), :lang(zh) { line-break: strict; word-break: normal; overflow-wrap: anywhere; }
:lang(ko) { line-break: strict; word-break: keep-all; overflow-wrap: anywhere; }
html:is(:lang(ja), :lang(ko), :lang(zh)) :is(em, i) { font-style: normal; }
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; hyphenate-limit-chars: 10 4 4; text-wrap: balance; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: #ffd34d; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; color: #fff; }
h1, h2 { font-family: var(--display); font-weight: 400; }
h3 { font-weight: 650; }
p { margin: 0 0 1em; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* skip link: hidden until it gets keyboard focus */
.skip {
  position: absolute; z-index: 60; left: 12px; top: -60px;
  padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--ink);
  font: 600 0.9375rem/1.2 var(--sans); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ================================================================================== the bar
   On every page, fixed to the top, before the header. Wide screens: the game, the page links, the two store badges
   (Apple's first, 40 px high, 12 px between), the language switcher, in one row. Narrower: the page links leave for
   the page's own header (.anchors-sub); on a phone the badges take a second row. nightshift.js sets .stores-off
   while another store block is on screen (Apple: one App Store badge per layout), and .at-top while the page stands
   at its top, where the bar is clear. */
.topnav {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 16px;
  padding: max(8px, env(safe-area-inset-top)) var(--gutter) 8px;
  font: 500 0.9375rem/1 var(--sans);
}
.topnav::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: rgba(11, 24, 35, 0.86);
  border-bottom: 1px solid rgba(123, 144, 162, 0.22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: opacity 0.25s ease;
}
.topnav.at-top::before { opacity: 0; }
.topnav a { color: var(--text); text-decoration: none; }
.topnav a:hover { color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font: 400 1.1875rem/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; flex: 0 0 auto; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.anchors { display: flex; gap: clamp(14px, 2vw, 28px); margin: 0; padding: 0; list-style: none; }
.anchors a { display: inline-flex; align-items: center; min-height: 48px; white-space: nowrap; }
.anchors a[aria-current="page"] { color: var(--accent); }
.topnav .anchors { margin-inline: auto 0; }
.top-stores { flex: none; display: grid; grid-template-rows: 1fr; margin-left: auto; }
.topnav .anchors + .top-stores { margin-left: auto; }
.topnav .stores-top { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 12px; margin: 0; min-height: 0; transition: opacity 0.25s ease; }
.topnav .stores-top .badge img { height: 40px; }
.topnav .stores-top .badge:focus-visible { outline-offset: 2px; }
.topnav.stores-off .stores-top { opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s 0.25s; }
.top > .anchors-sub { display: none; }

/* the language switcher: a list that opens from the bar; in the footer, plain links */
.langs ul { display: flex; flex-wrap: wrap; gap: 0 14px; margin: 0; padding: 0; list-style: none; }
.langs a[aria-current] { color: var(--accent); }
.langs-foot { flex-basis: 100%; }
.langs-top { position: relative; flex: none; }
.langs-top summary { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; cursor: pointer; color: var(--text); white-space: nowrap; list-style: none; }
.langs-top summary::-webkit-details-marker { display: none; }
.langs-top summary::after { content: ""; width: 0.42em; height: 0.42em; margin-top: -0.2em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; rotate: 45deg; opacity: 0.8; }
.langs-top[open] summary::after { rotate: 225deg; margin-top: 0.2em; }
.langs-top ul {
  position: absolute; right: 0; top: 100%; z-index: 10; flex-direction: column; gap: 0; min-width: 12em;
  max-height: calc(100svh - 90px); overflow-y: auto; overscroll-behavior: contain;
  padding: 8px; border-radius: 12px; background: var(--panel); border: 2px solid var(--rail); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.langs-top a { display: block; padding: 10px 12px; color: var(--text); text-decoration: none; border-radius: 8px; }
.langs-top a:hover { background: rgba(242, 183, 5, 0.1); }
.langs-code { display: none; letter-spacing: 0.06em; }

/* ================================================================================ store badges
   The stores' own artwork, as provided (site/store.mjs), never restyled beyond their size. Apple's black badge first,
   then Google's, both in the page's language, at the same visible height. Never under 40px; a quarter of the height
   clear around each. The dimmed state (an empty APP_STORE_URL) is kept from lanternsecret.com. */
.stores { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; margin: 18px 0 0; }
.badge { display: inline-flex; flex-direction: column; align-items: center; gap: 14px; text-decoration: none; line-height: 0; border-radius: 7px; flex: none; }
.badge img { display: block; height: 52px; width: auto; max-width: none; }
.badge-sm img { height: 40px; }
a.badge:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.badge-off { cursor: default; user-select: none; }
.badge-off .badge-art { display: block; background: #000; border-radius: 7px; line-height: 0; }
.badge-off img { opacity: 0.45; }
.badge-off .soon { font: 600 0.8125rem/1.2 var(--sans); color: var(--text); padding: 4px 10px; border-radius: 999px; background: rgba(11, 24, 35, 0.8); }
@media (max-width: 420px) { .badge img { height: 46px; } .badge-sm img { height: 40px; } .stores { gap: 12px; } }
.trademark { margin: 0; color: var(--dim); font-size: 0.75rem; line-height: 1.4; }

/* ================================================================================== the hero */
.hero {
  position: relative; overflow: clip; isolation: isolate;
  padding: calc(var(--bar-h) + clamp(16px, 4vw, 48px)) var(--gutter) 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(242, 183, 5, 0.07), transparent 70%),
    linear-gradient(#0c1a26, var(--bg) 60%, #102434);
}
/* the warehouse lamps and their cones of light, as on the title screen */
.lamp { position: absolute; z-index: -1; top: 0; width: min(46vw, 520px); height: 100%; pointer-events: none;
  background: conic-gradient(from 160deg at 50% 0, transparent 0deg, rgba(255, 226, 150, 0.09) 14deg, rgba(255, 226, 150, 0.09) 26deg, transparent 40deg); }
.lamp::before { content: ""; position: absolute; left: calc(50% - 22px); top: 0; width: 44px; height: 14px; border-radius: 0 0 22px 22px; background: #2b3d4d; box-shadow: 0 6px 18px 4px rgba(255, 214, 120, 0.35); }
.lamp-l { left: 2%; }
.lamp-r { right: 2%; }
.moon { position: absolute; z-index: -1; left: 54%; top: calc(var(--bar-h) + 28px); width: 22px; height: 22px; border-radius: 50%; box-shadow: 7px -3px 0 0 #f3c969; opacity: 0.85; }
.hero-in {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: clamp(28px, 6vw, 80px); align-items: center;
  width: min(100%, 1100px); margin: 0 auto;
}
/* the game's title art: NIGHT over SHIFT in Russo One, the hazard tape, the descriptor */
.title { margin: 0; line-height: 0.92; }
.t-name { display: block; font: 400 clamp(3.5rem, 11vw, 7rem)/0.92 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.t-night, .t-shift { display: block; }
.t-night { color: #eef3f6; }
.t-shift { color: var(--accent); }
.tape { display: block; width: min(360px, 100%); height: 14px; margin: 22px 0 16px; border-radius: 7px; background: repeating-linear-gradient(-45deg, var(--accent) 0 12px, var(--tape) 12px 24px); }
.t-sub { display: block; font: 400 clamp(1.125rem, 2.4vw, 1.625rem)/1.2 var(--display); color: #fff; text-transform: uppercase; letter-spacing: 0.03em; }
.promise { margin: 18px 0 12px; font-size: clamp(1.125rem, 1.8vw, 1.3125rem); color: var(--dim); }
.hero-lead { max-width: 34em; }
.plat { margin: 14px 0 0; color: var(--dim); font-size: 0.875rem; letter-spacing: 0.02em; }
.hero .stores { margin-top: 22px; }
.hero-shot { margin: 0; }
/* a phone: the screenshot inside a dark frame with the rail colour of the game's boards */
.screen { display: block; padding: 6px; border-radius: 30px; background: #0a141d; border: 3px solid var(--rail); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7); }
.screen img { width: 100%; border-radius: 22px; }
/* the warehouse floor: a row of crates, the game's own art */
.floor { display: flex; justify-content: center; gap: 4px; margin: clamp(32px, 6vw, 56px) calc(-1 * var(--gutter)) 0; padding: 0 0 0; border-bottom: 6px solid #22384a; overflow: hidden; }
.floor img { width: 48px; height: 48px; flex: none; }

/* ================================================================================= sections */
main { display: block; }
.sec { width: min(100% - 2 * var(--gutter), 1100px); margin-inline: auto; padding-top: clamp(56px, 9vw, 112px); }
.lede { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); color: var(--text); max-width: 40em; }
/* a sign-board: the yellow plate with hazard tape under it, as the game's boards */
.sign {
  display: inline-block; max-width: 100%; margin: 0 0 22px; padding: 10px 18px 22px; border-radius: 12px;
  background: var(--hazard) bottom / 100% 10px no-repeat, var(--accent);
  color: var(--ink); font-size: clamp(1.375rem, 3.4vw, 2rem); line-height: 1.15; text-transform: uppercase; letter-spacing: 0.01em;
}
.sign-sub { margin-top: clamp(36px, 5vw, 56px); font-size: clamp(1.25rem, 2.8vw, 1.625rem); }
:is(:lang(ja), :lang(ko), :lang(zh)) .sign { text-transform: none; }

/* 1. what it is */
.what-body { max-width: 46rem; }
.what-body > p { font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); }
.facts { margin: 26px 0 0; border: 3px solid var(--rail); border-radius: 18px; background: var(--panel); overflow: hidden; }
.facts div { display: grid; grid-template-columns: minmax(0, 10em) minmax(0, 1fr); gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.facts div:first-child { border-top: 0; }
.facts dt { font: 400 0.875rem/1.6 var(--display); color: var(--accent); text-transform: uppercase; letter-spacing: 0.03em; }
.facts dd { margin: 0; }

/* 2. how it plays */
.how { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.steps { margin: 24px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 18px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; }
.steps li::before { content: counter(step); grid-row: span 2; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--ink); font: 400 1.25rem/1 var(--display); }
.steps h3 { font-size: 1.125rem; margin: 2px 0 2px; }
.steps p { margin: 0; color: var(--dim); }
.more { margin: 22px 0 0; font-weight: 600; }
.more a::after { content: " \2192"; }
.how-shot { margin: 0; max-width: 340px; justify-self: center; }

/* 3. crates and upgrades */
.crate-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 14px; }
.crate { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px; border-radius: 16px; background: var(--panel); border: 2px solid var(--grid); }
.crate img { width: 56px; height: 56px; }
.crate h3 { font: 400 1.0625rem/1.3 var(--display); margin: 2px 0 4px; }
.crate p { margin: 0; color: var(--dim); font-size: 0.9688rem; }

/* 4. shifts */
.kinds { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 10px; }
.kinds li { padding: 12px 16px; border-radius: 12px; border: 2px solid var(--grid); background: rgba(19, 39, 55, 0.6); }
.kinds b { display: block; font: 400 1rem/1.3 var(--display); color: var(--accent); text-transform: uppercase; letter-spacing: 0.02em; }
.kinds span { color: var(--dim); font-size: 0.9375rem; }
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 18px; }
.board { border: 3px solid var(--rail); border-radius: 18px; background: var(--panel); overflow: hidden; }
.board h3 {
  padding: 12px 18px 22px; background: var(--hazard) bottom / 100% 10px no-repeat, var(--accent);
  color: var(--ink); font: 400 1.125rem/1.25 var(--display); text-transform: uppercase; letter-spacing: 0.01em;
}
:is(:lang(ja), :lang(ko), :lang(zh)) .board h3 { text-transform: none; }
.board p { margin: 0; padding: 16px 18px 20px; }

/* 5. screenshots */
.phones { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); align-items: start; }
.phone { margin: 0; }
.phone .screen { padding: 4px; border-radius: 22px; border-width: 2px; }
.phone .screen img { border-radius: 17px; }
.phone figcaption { margin-top: 12px; color: var(--dim); font-size: 0.875rem; line-height: 1.4; text-align: center; }

/* 6. learn more */
.cards { list-style: none; margin: 1.2em 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 14px; }
.cards li { margin: 0; }
.cards a {
  display: block; height: 100%; padding: 16px 18px; border-radius: 16px; text-decoration: none;
  border: 2px solid var(--grid); background: var(--panel);
  transition: border-color 0.2s ease;
}
.cards a:hover { border-color: var(--accent); }
.cards b { display: block; color: #fff; font: 400 1.0625rem/1.3 var(--display); margin-bottom: 6px; }
.cards span { display: block; color: var(--dim); font-size: 0.9375rem; line-height: 1.5; }

/* 7. get the game */
.get-card {
  max-width: 44rem; margin: 0 auto; text-align: center; padding: clamp(24px, 4vw, 40px);
  border: 3px solid var(--rail); border-radius: 22px; background: var(--panel);
  box-shadow: inset 0 10px 0 -2px transparent;
  position: relative; overflow: hidden;
}
.get-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 10px; background: var(--hazard); }
.get-card h2 { font-size: clamp(1.625rem, 3.4vw, 2.25rem); margin: 8px 0 10px; text-transform: uppercase; }
.get-card .stores { justify-content: center; }

/* 8. support */
.support { padding-bottom: clamp(56px, 9vw, 112px); }
.support > * { max-width: 46rem; }
.support h2 { font-size: clamp(1.375rem, 2.6vw, 1.75rem); margin-bottom: 12px; }

/* ===================================================================================== footer */
.foot {
  position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 34px var(--gutter) max(32px, env(safe-area-inset-bottom));
  background: var(--deep); color: var(--dim); font-size: 0.875rem;
}
.foot::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: var(--hazard); opacity: 0.9; }
.foot a { color: var(--text); text-decoration: none; display: inline-block; padding: 12px 0; }
.foot a:hover { color: var(--accent); }
.foot-links, .foot-by { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
.foot-links span { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
.foot a.badge { display: inline-flex; padding: 0; }
.foot-stores { flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.foot-stores .stores { margin: 8px 0 0; }

/* ============================================================================= inner pages
   The guides, the FAQ, the articles and the legal pages: the warehouse header with the hazard tape, then one
   readable column. */
.top {
  position: relative; overflow: clip; isolation: isolate;
  padding-top: var(--bar-h);
  min-height: clamp(200px, 26vw, 300px);
  display: flex; flex-direction: column;
  background:
    radial-gradient(40% 90% at 18% 0%, rgba(255, 226, 150, 0.1), transparent 70%),
    radial-gradient(40% 90% at 82% 0%, rgba(255, 226, 150, 0.08), transparent 70%),
    linear-gradient(#0c1a26, #12283a);
}
.top::after { content: ""; position: absolute; inset: auto 0 0; height: 12px; background: var(--hazard); }
.top-title { margin: auto var(--gutter) clamp(30px, 4vw, 48px); width: min(100% - 2 * var(--gutter), 46rem); align-self: center; }
.top h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.08; letter-spacing: 0.005em; }
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0 0 10px; padding: 0; list-style: none; font: 500 0.875rem/1.4 var(--sans); }
.crumbs li { display: flex; align-items: center; color: var(--dim); }
.crumbs li + li::before { content: "\203A"; margin: 0 8px; color: var(--accent); }
.crumbs a, .crumbs [aria-current] { display: inline-block; padding: 6px 0; }
.crumbs a { color: var(--text); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: var(--dim); }

.legal { padding: clamp(32px, 6vw, 64px) var(--gutter) clamp(64px, 9vw, 112px); }
.prose { max-width: 46rem; margin: 0 auto; color: var(--text); font-size: 1.0625rem; line-height: 1.72; }
.prose h2 { font-size: clamp(1.375rem, 2.6vw, 1.75rem); line-height: 1.25; margin: 2.1em 0 0.6em; color: var(--accent); }
.prose h3 { font-size: 1.1875rem; margin: 1.6em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--accent-dark); }
.prose strong { color: #fff; font-weight: 600; }
.prose .meta { color: var(--dim); font-size: 0.9375rem; padding-bottom: 1.2em; border-bottom: 1px solid var(--line); margin-bottom: 1.6em; }
.prose .lede { font-size: clamp(1.125rem, 1.9vw, 1.3125rem); line-height: 1.55; color: #fff; margin-bottom: 1.4em; }
.toc { margin: 0 0 2em; padding: 16px 20px; border: 2px solid var(--grid); border-radius: 16px; background: var(--panel); }
.toc p { margin: 0 0 8px; color: var(--accent); font: 400 0.8125rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2 16em; column-gap: 2em; }
.toc li { margin: 0.2em 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
[id] { scroll-margin-top: calc(var(--bar-h) + 12px); }

/* tables: a sign-board header row, a quiet body */
.table-wrap { overflow-x: auto; margin: 1.4em 0 1.8em; border: 2px solid var(--grid); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0; font-size: 0.9375rem; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.prose thead th { background: var(--panel); color: var(--accent); font: 400 0.875rem/1.4 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.prose tbody tr:nth-child(even) { background: rgba(19, 39, 55, 0.5); }
.prose tbody tr:last-child > * { border-bottom: 0; }
.prose th[scope="row"] { color: #fff; font-weight: 600; }
.table-fig { margin: 1.4em 0 1.8em; }
.table-fig .table-wrap { margin: 0; }
.table-fig figcaption { padding: 8px 4px 0; color: var(--dim); font-size: 0.875rem; line-height: 1.5; }

/* figures: a screenshot from the game, then the caption and the numbered legend that match its marks */
.fig { margin: 1.6em 0 2em; }
.fig img { width: 100%; border-radius: 16px; border: 2px solid var(--rail); background: var(--deep); }
.fig-wide { max-width: 36rem; margin-inline: auto; }
.fig-narrow { max-width: 26rem; margin-inline: auto; }
.fig-phone { max-width: 20rem; margin-inline: auto; }
.fig figcaption { margin-top: 12px; color: var(--dim); font-size: 0.9375rem; line-height: 1.55; }
.legend { margin: 8px 0 0; padding: 0; list-style: none; }
.legend li { position: relative; padding-left: 2.1em; margin: 0.45em 0; }
.legend li::before {
  content: attr(value); position: absolute; left: 0; top: 0.05em;
  width: 1.5em; height: 1.5em; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--ink); font: 400 0.8125rem/1 var(--display);
}
.fig-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 18px; margin: 1.6em 0 2em; align-items: start; }
.fig-row .fig { margin: 0; }

.note { margin: 1.4em 0; padding: 16px 20px; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; background: rgba(242, 183, 5, 0.08); }
.note p { margin: 0; color: #fff; }
.note .stores { margin-top: 16px; }

/* the game's own art (crates, upgrades) with a name and a line */
.items, .prose .items { list-style: none; margin: 0.6em 0 1.6em; padding: 0; display: grid; gap: 10px; }
.items li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: center; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.items img { width: 48px; height: 48px; object-fit: contain; }
.items b { display: block; color: #fff; font: 400 1.0625rem/1.3 var(--display); }
.items span { color: var(--text); font-size: 0.9688rem; }

/* worked steps */
.walk, .prose .walk { list-style: none; padding: 0; counter-reset: step; }
.walk > li { counter-increment: step; margin: 0 0 1.4em; }
.walk h3 { display: flex; align-items: baseline; gap: 12px; }
.walk h3::before { content: counter(step); flex: 0 0 auto; width: 1.6em; height: 1.6em; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: var(--ink); font: 400 0.9em/1 var(--display); }

/* the FAQ: every answer open, so it reads as a page and matches its structured data */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0 6px; }
.faq summary { list-style: none; cursor: default; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 1em 0 0.4em; font-size: 1.1875rem; }
.faq-a p { margin: 0 0 0.8em; }

.related { margin-top: 3em; padding-top: 1.4em; border-top: 1px solid var(--line); }
.related h2 { margin-top: 0; }

/* the 404 */
.lost-crates { display: flex; gap: 8px; margin-bottom: 1.4em; }
.lost-crates img { width: 64px; height: 64px; }
.lost-crates img:nth-child(2) { translate: 0 -10px; rotate: 6deg; }

/* ================================================================================ widths */
@media (max-width: 1180px) { .topnav-home .anchors { display: none; } }  /* the home page's in-page links are the widest row */
@media (max-width: 1040px) {
  .topnav .anchors { display: none; }
  .top > .anchors-sub { display: flex; gap: 6px 22px; flex-wrap: wrap; margin: 0 var(--gutter); padding: 0; list-style: none; font: 500 0.9375rem/1 var(--sans); }
  .anchors-sub a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
  .anchors-sub a:hover { color: #fff; }
}
@media (max-width: 899px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-shot { width: min(62vw, 280px); margin: 0 auto; }
  .how { grid-template-columns: minmax(0, 1fr); }
  .how-shot { width: min(70vw, 300px); }
  .phones {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 8px; gap: 16px; scroll-padding-inline: var(--gutter);
  }
  .phones::-webkit-scrollbar { display: none; }
  .phone { flex: 0 0 min(56vw, 240px); scroll-snap-align: center; }
}
/* a phone: the badges take a row of their own under the game and the language */
@media (max-width: 700px) {
  :root { --bar-h: 109px; }
  .topnav { flex-wrap: wrap; row-gap: 0; }
  .topnav .brand { margin-right: auto; }
  .top-stores { order: 3; flex-basis: 100%; transition: grid-template-rows 0.3s ease; }
  .topnav .stores-top { overflow: hidden; padding: 4px 4px 0; margin-inline: -4px; }
  .topnav.stores-off .top-stores { grid-template-rows: 0fr; }
  .topnav.stores-off .stores-top { padding-top: 0; }
  .langs-name { display: none; }
  .langs-code { display: inline; }
  .langs-top ul { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; width: min(22rem, calc(100vw - 2 * var(--gutter))); }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .toc ol { columns: 1; }
  .crate { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .crate img { width: 44px; height: 44px; }
  .lamp { width: 70vw; }
  .lamp-r { display: none; }
  /* tables: every row is a card; each cell names its column (data-label, written by the build); the first cell is the card's title.
     The <table> stays in the markup for screen readers and search; the header row is hidden visually only. */
  .table-wrap { overflow: visible; border: 0; border-radius: 0; background: none; }
  .prose table, .prose tbody, .prose tr, .prose th, .prose td { display: block; width: 100%; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .prose thead th { text-transform: none; letter-spacing: normal; hyphens: auto; overflow-wrap: break-word; }
  .prose tbody tr { margin: 0 0 12px; background: none; border: 2px solid var(--grid); border-radius: 14px; overflow: hidden; }
  .prose tbody tr:nth-child(even) { background: none; }
  .prose tbody tr:last-child { margin-bottom: 0; }
  .prose tbody th[scope="row"] { background: var(--panel); border-bottom: 1px solid var(--line); font: 400 1rem/1.4 var(--display); color: var(--accent); overflow-wrap: break-word; hyphens: auto; }
  .prose tbody td { border-bottom: 1px solid var(--line); overflow-wrap: break-word; hyphens: auto; }
  .prose tbody td:last-child { border-bottom: 0; }
  .prose tbody td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--dim); font-size: 0.8125rem; line-height: 1.4; }
}
@media (max-width: 420px) { .anchors-sub li:first-child { display: none; } } /* the brand already leads back to the game */

/* =========================================================================== print and motion */
@media print {
  :root { color-scheme: light !important; }
  *, *::before, *::after { background: transparent !important; box-shadow: none !important; color: #000 !important; }
  .topnav, .skip, .toc, .foot, .related, .langs, .crumbs, .stores, .top::after { display: none !important; }
  .top { padding: 0 !important; min-height: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
