/* Gleisplan website - "the map is the page": the game's own map print on its sea opens every
   page; text stands on printed paper sheets with one ink hairline, no UI shadows; Charter for
   names and text, Inter Bold spaced capitals for labels; the ink stamp is the one primary
   element. Map colours only as accents. No script. */

/* palette:begin - generated by tools/site/gen_site.py from src/ui/theme/Palette.gd; do not edit by hand */
:root {
  --paper: #F4ECD8;
  --paper-down: #E8DDC3;
  --land: #F7EFDD;
  --tile: #FFFDF8;
  --ink: #3A3229;
  --on-ink: #FBF4E2;
  --rule: rgba(58, 50, 41, 0.62);
  --rule-soft: rgba(58, 50, 41, 0.28);
  --accent: #0F766E;
  --warning-ink: #B02A2A;
  --sea: #B9CED2;
  --coast-glow: #DDE9E6;
  --locked: #DCDBD2;
  --ink-label: #544A3A;
  --line-0: #106887;
  --line-1: #814136;
  --line-2: #386D5A;
  --line-3: #61225A;
  --line-4: #3B3410;
  --line-5: #3D4949;
  --metro-0: #D19A14;
  --metro-1: #E0567A;
  --metro-2: #7A5AD0;
  --metro-3: #1E9FA0;
  --metro-4: #4E8A2A;
}
/* palette:end */

@font-face { font-family: "Charter"; src: url("fonts/Charter-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Charter"; src: url("fonts/Charter-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --serif: "Charter", "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  --caps: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --hair: 1.5px solid var(--rule);
  --gut: 16px;
  --frame: 80rem;   /* one page measure: header, content and footer of every page */
  --stop: 44px;     /* the route line's lane (wide screens) */
  color-scheme: light;
}
/* Scripts the two faces do not hold (their subsets are Latin): the system's faces of that script, a serif first
   as in the game. Vietnamese stacks marks the subsets lack, so it leaves both faces out. */
:root:lang(vi) { --serif: Georgia, "Times New Roman", "Noto Serif", serif; --caps: -apple-system, "Segoe UI", Roboto, sans-serif; }
:root:lang(ja) { --serif: "Charter", "Hiragino Mincho ProN", "Noto Serif CJK JP", "Yu Mincho", "Hiragino Sans", "Yu Gothic", "Noto Sans CJK JP", serif;
  --caps: "Inter", "Hiragino Sans", "Yu Gothic", "Noto Sans CJK JP", sans-serif; }
:root:lang(ko) { --serif: "Charter", "Noto Serif CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", serif;
  --caps: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif; }
:root:lang(zh-CN) { --serif: "Charter", "Songti SC", "Noto Serif CJK SC", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", serif;
  --caps: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
:root:lang(zh-TW) { --serif: "Charter", "Songti TC", "Noto Serif CJK TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", serif;
  --caps: "Inter", "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif; }
:root:lang(ar) { --serif: "Charter", "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", Tahoma, serif;
  --caps: "Inter", "Geeza Pro", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif; }
:root:lang(th) { --serif: "Charter", "Thonburi", "Noto Serif Thai", "Leelawadee UI", "Noto Sans Thai", serif;
  --caps: "Inter", "Thonburi", "Leelawadee UI", "Noto Sans Thai", sans-serif; }
:root:lang(hi) { --serif: "Charter", "Kohinoor Devanagari", "Noto Serif Devanagari", "Nirmala UI", "Noto Sans Devanagari", serif;
  --caps: "Inter", "Kohinoor Devanagari", "Nirmala UI", "Noto Sans Devanagari", sans-serif; }
@media (min-width: 720px) { :root { --gut: 32px; } }
@media (min-width: 1024px) { :root { --gut: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper) url("img/grain.png");
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--serif);
  overflow-wrap: break-word;
}
@media (min-width: 720px) { body { font-size: 1.125rem; } }
img, svg { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3, p, ul, ol, dl, dd, address { margin: 0; }
address { font-style: normal; }
p, li, dd { text-wrap: pretty; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 16px; top: 12px; z-index: 9; background: var(--tile); padding: 8px 14px; border: var(--hair); border-radius: 999px; }

/* labels: Inter Bold spaced capitals; small secondary text in the label ink (>= 4.5:1 on grain) */
.caps, .nav a, .nav summary, .stamp, th {
  font-family: var(--caps); font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem;
}
.soft { color: var(--ink-label); }
/* a script without capitals takes no letter spacing (it would tear Arabic apart) and a larger label; stacked marks need taller lines */
:root:is(:lang(ja), :lang(ko), :lang(zh), :lang(ar), :lang(th), :lang(hi)) :is(.caps, .nav a, .stamp, th, .shut, .fs, .tools a, dt, .inspect h4, h1, h2) { letter-spacing: 0; }
:root:is(:lang(ja), :lang(ko), :lang(zh), :lang(ar), :lang(th), :lang(hi)) :is(.caps, .nav > ul > li > a, th, .fs, .tools a, .imprint dt, .gestures dt, .inspect h4) { font-size: 0.875rem; }
:root:is(:lang(ar), :lang(th), :lang(hi)) :is(h1, h2, h3, .lead) { line-height: 1.4; }

/* --- the sea: the map's own ground, one grain over sea and print alike --- */
.sea { position: relative; isolation: isolate; background: var(--sea); }
.sea::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: url("img/grain.png"); }
/* the grain lies over the print too (no visible edge); paper and navigation above it */
.sea .bar, .sea .card { position: relative; z-index: 2; }
.sea .bar { z-index: 3; }   /* the open language menu lies over the card */

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: var(--frame); margin: 0 auto; padding: 12px var(--gut); }
.brand { font-weight: 700; font-size: 1.9rem; line-height: 1; letter-spacing: -0.015em; text-decoration: none; padding: 6px 0; }
.nav > ul { list-style: none; display: flex; margin: 0; padding: 0 6px; background: var(--tile); border: var(--hair); border-radius: 999px; }
.nav a { display: inline-flex; align-items: center; gap: 0.4em; min-height: 44px; padding: 0 11px; text-decoration: none; color: var(--ink-label); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.5em; }
.nav a:focus-visible { border-radius: 999px; outline-offset: -3px; }
@media (max-width: 759px) { .nav .wide { display: none; } }
/* a link to an English-only page (the legal pages of a translated language) needs the widest bar; the footer has it too */
@media (max-width: 1023px) { .nav .far { display: none; } }
@media (max-width: 380px) { .nav a, .lang summary { padding: 0 8px; } .brand { font-size: 1.7rem; } }
/* the language menu: a <details> (no script) with the languages' own names */
.lang details { position: relative; }
.lang summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 11px; cursor: pointer; list-style: none; color: var(--ink); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.lang details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.lang summary:focus-visible { border-radius: 999px; outline-offset: -3px; }
.lang ul { position: absolute; z-index: 9; top: calc(100% + 8px); inset-inline-end: -7px; display: grid; grid-template-columns: 1fr 1fr;
  width: min(21rem, calc(100vw - 2 * var(--gut))); margin: 0; padding: 8px; list-style: none; background: var(--tile); border: var(--hair); border-radius: 20px; }
.lang ul a { display: flex; padding: 0 12px; border-radius: 12px; font: 400 1rem/1.2 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); }
.lang ul a[aria-current] { font-weight: 700; }

/* --- start: the map is the hero; pitch above it, the beta right below it --- */
.home .bar { position: absolute; z-index: 3; top: 0; right: 0; left: 0; justify-content: flex-end; pointer-events: none; }
.home .bar > * { pointer-events: auto; }
.hero { max-width: var(--frame); margin: 0 auto; padding: 12px var(--gut) 32px; }
.wordmark { font-weight: 700; font-size: clamp(2.3rem, 10.5vw, 4.2rem); line-height: 1.1; letter-spacing: -0.02em;
  min-height: 46px; animation: rise 700ms cubic-bezier(.2, .7, .2, 1) both; }
.lead { font-weight: 700; font-size: 1.45rem; line-height: 1.2; margin-top: 8px; }
.pitch { margin-top: 4px; max-width: 30rem; line-height: 1.45; }
.map { display: block; margin: 14px auto 0; }
/* the whole country, never cropped: its height gives way so the beta stays in a short first screen */
.map img { height: clamp(220px, calc(100svh - 400px), 560px); width: auto; margin: 0 auto;
  animation: settle 1100ms cubic-bezier(.2, .7, .2, 1) both; }
.card { max-width: 34rem; margin: 14px auto 0; padding: 16px; background: var(--tile); border: var(--hair); border-radius: 24px;
  animation: rise 700ms 60ms cubic-bezier(.2, .7, .2, 1) both; }
.act { display: flex; align-items: center; gap: 12px; }
.stamp { flex: 1; display: inline-flex; justify-content: center; align-items: center; min-height: 54px; padding: 8px 20px; line-height: 1.3; text-align: center; text-wrap: balance;
  border-radius: 999px; background: var(--ink); color: var(--on-ink); text-decoration: none; font-size: 0.82rem; letter-spacing: 0.16em;
  transition: transform 120ms ease-out; }
.stamp:hover { color: var(--on-ink); }
.stamp:active { transform: scale(0.96); }
.datestamp { flex: 0 0 auto; width: 46px; height: 46px; color: var(--warning-ink); opacity: 0.85; transform: rotate(-12deg);
  animation: thunk 420ms 700ms cubic-bezier(.3, 1.5, .5, 1) both; }
.datestamp .arc { font: 700 9px var(--caps); letter-spacing: 1.6px; fill: currentColor; }
.datestamp .mid { font: 700 26px var(--serif); fill: currentColor; }
.status { margin-top: 10px; color: var(--ink-label); font-size: 0.95rem; line-height: 1.4; }
@media (max-width: 380px) { .stamp { letter-spacing: 0.12em; padding: 8px 14px; } }

@media (min-width: 1024px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-rows: 1fr auto auto auto auto 1.3fr;
    column-gap: 48px; min-height: min(100svh, 1000px); padding-top: 0; padding-bottom: 0; }
  .wordmark { grid-column: 1; grid-row: 2; padding-top: 56px; white-space: nowrap; font-size: clamp(4rem, 6.4vw, 6.8rem); }
  .lead { grid-column: 1; grid-row: 3; font-size: 2.1rem; margin-top: 12px; }
  .pitch { grid-column: 1; grid-row: 4; font-size: 1.25rem; max-width: 27rem; }
  .card { grid-column: 1; grid-row: 5; align-self: start; margin: 28px 0 64px; max-width: 30rem; padding: 20px 22px; }
  .map { grid-column: 2; grid-row: 1 / -1; align-self: center; margin: 0; }
  .map img { height: min(calc(100svh - 24px), 980px); max-width: 100%; object-fit: contain; }
  .act .stamp { flex: 0 1 auto; padding: 8px 28px; }
}

/* --- the route: on wide screens one line down the page, a dot for every section --- */
.route { position: relative; isolation: isolate; max-width: var(--frame); margin: 0 auto; padding: 48px var(--gut) 8px; }
.leg { position: relative; padding-bottom: 64px; }
.leg:last-child { padding-bottom: 32px; }
@media (min-width: 1024px) {
  .route { padding-inline-start: calc(var(--gut) + var(--stop)); padding-top: 64px; }
  .leg::before { content: ""; position: absolute; inset-inline-start: -44px; top: 6px; width: 28px; height: 28px; border-radius: 50%;
    background: var(--tile); border: 6px solid var(--line-0); }
  .leg:last-child::before { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 4px var(--tile); }
  .leg::after { content: ""; position: absolute; z-index: -1; inset-inline-start: -33px; top: 20px; bottom: -22px; width: 6px; background: var(--line-0); }
  .leg:first-child::after { top: -64px; }
  .leg:last-child::after { display: none; }
}
h2 { font-size: clamp(1.7rem, 6vw, 2.5rem); line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 20px; }
h3 { font-size: 1.15rem; line-height: 1.3; }

.legend { list-style: none; padding: 0; display: grid; gap: 22px; }
.legend li { display: grid; grid-template-columns: 18px 1fr; column-gap: 14px; align-content: start; }
.legend li::before { content: ""; grid-row: 1 / span 2; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--dot); }
.legend .ring::before { background: transparent; border: 4.5px solid var(--dot); }
.legend p { grid-column: 2; margin-top: 2px; }
.legend li:nth-child(1) { --dot: var(--metro-0); } .legend li:nth-child(2) { --dot: var(--metro-1); }
.legend li:nth-child(3) { --dot: var(--metro-2); } .legend li:nth-child(4) { --dot: var(--metro-3); }
.legend li:nth-child(5) { --dot: var(--metro-4); }
@media (min-width: 720px) { .legend { grid-template-columns: 1fr 1fr; gap: 30px 40px; } }

/* pictures: phones swipe a scroll-snap strip (a sliver of the next card as the cue); wide screens see all */
.strip { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: min(calc(100% - 48px), 300px); gap: 16px;
  margin: 0 calc(var(--gut) * -1); padding: 4px var(--gut) 14px; scroll-padding-inline: var(--gut); overflow-x: auto;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--rule-soft) transparent; }
.strip li { scroll-snap-align: start; }
.strip img { border: var(--hair); border-radius: 24px; background: var(--tile); padding: 5px; }
.strip figcaption { margin-top: 10px; font-size: 0.95rem; line-height: 1.4; }
.strip figcaption .caps { display: block; color: var(--ink-label); margin-bottom: 2px; }
/* a picture opens large (popover: no script; Esc or a click beside it closes) */
.zoom { all: unset; display: block; cursor: zoom-in; border-radius: 24px; }
.zoom:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }
.lightbox { border: var(--hair); border-radius: 28px; background: var(--tile); padding: 8px; max-width: 94vw; overflow: visible; }
.lightbox::backdrop { background: color-mix(in srgb, var(--ink) 62%, transparent); }
.lightbox img { border: 0; padding: 0; display: block; height: min(86svh, 1494px); width: auto; max-width: calc(94vw - 16px); object-fit: contain; border-radius: 21px; }
.shut { all: unset; display: block; margin: 8px auto 2px; padding: 0 18px; min-height: 44px; line-height: 44px; cursor: pointer;
  font-family: var(--caps); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-label); }
.shut:focus-visible { outline: 2.5px solid var(--accent); outline-offset: -3px; border-radius: 999px; }
.swipe { margin: -12px 0 12px; color: var(--ink-label); font-size: 0.95rem; }
/* wide: 3 + 2, the second row centred as a pair (same card width); from 1400 px all five in a row */
@media (min-width: 720px) {
  .strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px 24px; margin: 0; padding: 0; overflow: visible; }
  .strip li { flex: 0 0 calc((100% - 48px) / 3); }
  .swipe { display: none; }
}
@media (min-width: 1200px) { .strip li { flex-basis: calc((100% - 96px) / 5); } }

.sheet { background: var(--tile); border: var(--hair); border-radius: 24px; padding: 22px 20px; }
@media (min-width: 720px) { .sheet { padding: 32px 36px; } }
.offline p + p { margin-top: 10px; }
.offline .plain { font-size: 1.2rem; line-height: 1.45; }

.stores { list-style: none; padding: 0; display: grid; gap: 14px; }
@media (min-width: 560px) { .stores { grid-template-columns: 1fr 1fr; } }
.stores li { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 80px; padding: 10px 20px;
  border: var(--hair); border-radius: 18px; background: var(--tile); font-weight: 700; font-size: 1.3rem; line-height: 1.2; }
/* the whole tile is the link */
.stores a::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.aside { margin-top: 18px; color: var(--ink-label); }

/* --- inner pages: a sea band with the title and a cut-out of the real render; below it a side
   column (contents, contact) and the text column on the route line, all on the one frame --- */
.band-in { position: relative; z-index: 0; max-width: var(--frame); margin: 0 auto; padding: 4px var(--gut) 0; }
.band-title { position: relative; z-index: 2; }
.band h1 { font-size: clamp(2.2rem, 9.5vw, 4.4rem); line-height: 1.05; letter-spacing: -0.02em; animation: rise 700ms cubic-bezier(.2, .7, .2, 1) both; }
.band .kick { color: var(--ink-label); margin-bottom: 6px; }
.band .sub { margin-top: 10px; max-width: 30rem; font-size: 1.1rem; line-height: 1.45; }
.date { color: var(--ink-label); margin-top: 8px; }
/* the cut-out: its sea is the band's sea; soft edges where it meets the band and the paper */
.crop { display: block; margin: 10px calc(var(--gut) * -1) 0; }
.crop img { width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 55%, transparent 94%);
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 55%, transparent 94%);
  animation: settle 1100ms cubic-bezier(.2, .7, .2, 1) both; }
/* phones: a low strip, so the page's first content comes early */
@media (max-width: 719px) { .crop img { height: 5.5rem; object-fit: cover; } }
@media (min-width: 720px) { .crop { margin-inline-start: 30%; } }
@media (min-width: 1024px) {
  .band-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; min-height: 380px; padding-top: 0; }
  .band-title { padding: 40px 0 56px; }
  .crop { position: absolute; z-index: 1; top: -76px; inset-inline-end: 0; bottom: 0; width: 58%; margin: 0; }
  .crop img { height: 100%; object-fit: cover; object-position: center;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 30%), linear-gradient(to bottom, #000 72%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 30%), linear-gradient(to bottom, #000 72%, transparent);
    mask-composite: intersect; }
  /* right to left: the cut-out stands on the left and fades towards the title on the right */
  [dir="rtl"] .crop img {
    -webkit-mask-image: linear-gradient(to left, transparent, #000 30%), linear-gradient(to bottom, #000 72%, transparent);
    mask-image: linear-gradient(to left, transparent, #000 30%), linear-gradient(to bottom, #000 72%, transparent); }
}

.doc { max-width: var(--frame); margin: 0 auto; padding: 28px var(--gut) 0; }
.side { margin-bottom: 28px; }
.ask { display: none; }
.toc { border-top: var(--hair); border-bottom: var(--hair); }
.toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0; cursor: pointer; list-style: none; color: var(--ink); }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font: 700 1.3rem var(--serif); }
.toc[open] summary::after { content: "–"; }
.toc ol { list-style: none; padding: 0 0 8px; margin: 0; }
.toc li { border-top: 1px solid var(--rule-soft); }
.toc a { display: flex; align-items: center; min-height: 44px; text-decoration: none; line-height: 1.3; }
.toc a:hover { text-decoration: underline; }

.text > * { max-width: 37rem; }
.text > .wide { max-width: none; }
.text > p, .text > ul, .text > ol, .text > table, .text > address, .text > dl, .text > div, .text > section, .text > details { margin-bottom: 1em; }
.text ul, .text ol { padding-inline-start: 1.3em; }
.text li { margin-bottom: 0.4em; }
.text h2 { font-size: clamp(1.5rem, 5.4vw, 2.1rem); line-height: 1.15; letter-spacing: -0.01em; margin: 56px 0 14px; scroll-margin-top: 20px; }
.text > h2:first-child { margin-top: 0; }
.text h3 { margin: 1.6em 0 0.4em; }
.text h2:target { color: var(--accent); }

@media (min-width: 1024px) {
  .doc { display: grid; grid-template-columns: 15rem minmax(0, 1fr); column-gap: 64px; align-items: start; padding-top: 48px; }
  .side { position: sticky; top: 24px; margin: 0; }
  .ask { display: block; }
  /* the contents stay open on wide screens (the summary stays as its label) */
  .toc::details-content { content-visibility: visible; height: auto; }
  .toc summary { pointer-events: none; color: var(--ink-label); }
  .toc summary::after { content: none; }
  .ask { margin-top: 20px; padding: 16px 18px; background: var(--tile); border: var(--hair); border-radius: 18px; }
  .ask .caps { display: block; color: var(--ink-label); margin-bottom: 4px; }
  /* the route: a line down the text, a stop at every heading, a terminus at the end */
  .text { position: relative; isolation: isolate; padding-inline-start: var(--stop); padding-bottom: 40px; }
  .text::before { content: ""; position: absolute; z-index: -1; inset-inline-start: 11px; top: 14px; bottom: 14px; width: 6px; background: var(--line-0); }
  .text::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 28px; height: 28px; border-radius: 50%;
    background: var(--ink); box-shadow: inset 0 0 0 4px var(--tile), inset 0 0 0 7px var(--ink); }
  .text h2 { position: relative; }
  .text h2::before { content: ""; position: absolute; inset-inline-start: calc(var(--stop) * -1); top: 0.12em; width: 28px; height: 28px; border-radius: 50%;
    background: var(--tile); border: 6px solid var(--line-0); }
}

/* cards in the text column */
.promise, .imprint, .gestures > div, .inspect, .ask { background: var(--tile); border: var(--hair); border-radius: 20px; }
.promise { padding: 20px; margin: 8px 0 1.4em; }
.promise > .caps { color: var(--ink-label); }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0 !important; margin: 10px 0 14px; }
.facts li { margin: 0; font-weight: 700; font-size: 1.3rem; line-height: 1.2; }
.facts li::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-inline-end: 8px; border-radius: 50%; border: 3px solid var(--accent); }
@media (min-width: 720px) { .promise { padding: 26px 30px; } .facts li { font-size: 1.5rem; } }

table.stored { border-collapse: collapse; width: 100%; background: var(--tile); border: var(--hair); border-radius: 20px; border-spacing: 0; overflow: hidden; }
.stored th, .stored td { text-align: start; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--rule-soft); }
.stored tr:last-child th, .stored tr:last-child td { border-bottom: 0; }
.stored th { width: 11rem; color: var(--ink); }
@media (max-width: 599px) { .stored th, .stored td { display: block; width: auto; } .stored th { padding-bottom: 0; border: 0; } }

.imprint { display: block; padding: 6px 20px; font-style: normal; }
.imprint dl { margin: 0; }
.imprint div { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
.imprint div:last-child { border-bottom: 0; }
.imprint dt, .gestures dt, .inspect h4 { font-family: var(--caps); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; color: var(--ink-label); }
.imprint dd { margin-top: 2px; }
@media (min-width: 720px) { .imprint { padding: 8px 30px; } .imprint div { display: grid; grid-template-columns: 13rem 1fr; column-gap: 20px; }
  .imprint dt { padding-top: 0.35em; } .imprint dd { margin: 0; } }

/* help: the six editing gestures as equal cards (2 x 3 from 720 px), the colour arc's cut-out in
   its own card (beside the text where the card is wide enough); then "Inspect" as one wide block
   with the line card's cut-out below its text */
.gestures { display: grid; gap: 12px; margin: 14px 0 12px; container-type: inline-size; }
.gestures > div { padding: 14px 18px 16px; }
.gestures dt, .inspect h4 { color: var(--ink); }
.gestures dd { margin-top: 4px; }
@media (min-width: 720px) { .gestures { grid-template-columns: 1fr 1fr; } }
.gestures .shot { margin-top: 12px; }
.shot img, .inspect img { border: var(--hair); border-radius: 14px; }
.shot img { width: 100%; max-width: 16.25rem; }
.shot figcaption, .inspect figcaption { margin-top: 6px; font-size: 0.9rem; line-height: 1.4; color: var(--ink-label); }
/* two cards of at least ~23rem: the cut-out beside the text (phones: under it) */
@container (min-width: 47rem) {
  .with-shot { display: grid; grid-template-columns: minmax(0, 1fr) 9.5rem; column-gap: 16px; align-content: start; }
  .with-shot dt, .with-shot dd { grid-column: 1; }
  .gestures .shot { grid-column: 2; grid-row: 1 / span 2; margin-top: 2px; }
}
.inspect { padding: 14px 18px 18px; margin-bottom: 1.4em; }
.inspect h4 { margin: 0; }
.inspect p { max-width: 37rem; margin-top: 4px; }
.inspect p + p { margin-top: 0.6em; }
.inspect figure { max-width: 32.5rem; margin-top: 16px; }
@media (min-width: 720px) { .inspect { padding: 18px 22px 22px; } }

.text > details { border-top: 1px solid var(--rule-soft); margin: 0; }
.text > details:last-of-type { border-bottom: 1px solid var(--rule-soft); margin-bottom: 1em; }
.text > details summary { cursor: pointer; font-weight: 700; padding: 11px 0; min-height: 44px; }
.text > details > p { margin-bottom: 14px; }
.addr { display: inline-block; padding: 14px 20px; background: var(--tile); border: var(--hair); border-radius: 18px; font-style: normal; }
.gone .plain { font-size: 1.25rem; line-height: 1.45; }
.gone .stamp { flex: none; margin: 18px 0 22px; }
.gone .other { color: var(--ink-label); font-size: 0.95rem; }
@media (min-width: 1024px) { .doc.solo { display: block; } }

/* --- footer --- */
.foot { max-width: var(--frame); margin: 0 auto; padding: 28px var(--gut) 40px; color: var(--ink-label); font-size: 0.95rem; }
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; padding: 8px 0 0; border-top: var(--hair); }
.foot a { display: inline-flex; align-items: center; gap: 0.3em; min-height: 44px; color: var(--ink-label); }
.doc + .foot { margin-top: 48px; }
/* after the route the footer keeps the route's measure and its text edge */
@media (min-width: 1024px) { .route + .foot { padding-inline-start: calc(var(--gut) + var(--stop)); } }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes settle { from { opacity: 0; transform: scale(1.02); } }
@keyframes thunk { from { opacity: 0; transform: rotate(-12deg) scale(1.6); } }
@keyframes fade { from { opacity: 0; } }
/* Reduced motion (as in the game, docs/MOTION.md): nothing travels, grows or turns - every
   entrance keeps its timing as a plain fade, fades stay, transform transitions go (a press still answers at once). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-name: fade !important; transition-property: opacity, visibility !important;
    scroll-behavior: auto !important; }
}

/* --- play page (/spielen/, /en/play/): the game on a phone-shaped stage on the sea; on a phone
   in portrait the stage is the whole screen. play.js switches .stage[data-state]:
   nojs | loading | ready | running | unsupported | failed. --- */
.play { background: var(--sea) url("img/grain.png"); display: flex; flex-direction: column; height: 100vh; height: 100svh;
  overflow: hidden; overscroll-behavior: none; }
.play .bar { width: 100%; padding-top: 8px; padding-bottom: 8px; }
.arena { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 var(--gut) 12px; }
.stage { flex: 1; min-height: 0; container-type: size; display: grid; place-items: center; }
.stage:fullscreen { background: var(--sea) url("img/grain.png"); }
/* 9:16 at the widest, 9:19.5 at the narrowest: between them the stage takes the space it gets */
.device { position: relative; width: min(100cqw, 100cqh * 9 / 16); height: min(100cqh, 100cqw * 19.5 / 9);
  padding: 8px; background: var(--tile); border: var(--hair); border-radius: 40px;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.device canvas { display: block; width: 100%; height: 100%; border-radius: 32px; background: #EDE5D2; touch-action: none; outline: none; }
.cover { position: absolute; inset: 8px; border-radius: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px; text-align: center; background: var(--paper) url("img/grain.png"); transition: opacity 400ms ease-out, visibility 0s 400ms; }
.cover .wordmark { font-size: clamp(2.3rem, 13cqw, 3.4rem); min-height: 0; }
.track { position: relative; width: min(70%, 240px); height: 6px; margin: 4px 0; border-radius: 3px; background: var(--rule-soft); }
.track::before, .track::after { content: ""; position: absolute; top: -5px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--tile); border: 4px solid var(--line-0); z-index: 1; }
.track::before { inset-inline-start: -8px; } .track::after { inset-inline-end: -8px; border-color: var(--rule-soft); }
.fill { display: block; height: 100%; border-radius: 3px; background: var(--line-0); transform: scaleX(0); transform-origin: left; transition: transform 250ms ease-out; }
[dir="rtl"] .fill { transform-origin: right; }
.say { max-width: 22rem; line-height: 1.45; }
.say, .go, .retry { display: none; }
/* one place for the next step: the loading status, the start stamp and the retry sit in it in turn */
.slot { position: relative; align-self: stretch; display: grid; place-items: center; min-height: 54px; }
.slot > * { grid-area: 1 / 1; }
/* the reason below the retry, out of the flow: the retry stays where the stamp was */
.slot .failed { position: absolute; top: 100%; right: 0; left: 0; max-width: none; margin-top: 10px; }
[data-state="failed"] .note { visibility: hidden; }
.slot .loading { color: var(--ink-label); }
.go { flex: none; min-width: 180px; border: 0; cursor: pointer; animation: rise 500ms cubic-bezier(.2, .7, .2, 1) both; }
.note { color: var(--ink-label); font-size: 0.85rem; line-height: 1.4; }
.legal { position: absolute; bottom: 16px; color: var(--ink-label); font-size: 0.85rem; }
.legal a { color: var(--ink-label); display: inline-block; padding: 8px 4px; }
[data-state="nojs"] .nojs, [data-state="loading"] .loading, [data-state="unsupported"] .unsupported, [data-state="failed"] .failed { display: block; }
[data-state="ready"] .go, [data-state="failed"] .retry { display: inline-flex; }
[data-state="ready"] .track::after { border-color: var(--line-0); }
[data-state="nojs"] .track, [data-state="unsupported"] .track { display: none; }
[data-state="failed"] .track { visibility: hidden; }
[data-state="running"] .cover { opacity: 0; visibility: hidden; }
/* the row at the stage: fullscreen, the help, the save note; the cover's note and legal links only
   where the stage is the screen or the header hides the legal links */
.tools { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 4px; min-height: 44px; margin-top: 8px; }
.fs, .tools a { all: unset; font-family: var(--caps); font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; cursor: pointer; color: var(--ink-label); }
.fs:hover, .tools a:hover { color: var(--ink); }
.fs:focus-visible, .tools a:focus-visible { outline: 2.5px solid var(--accent); outline-offset: -3px; border-radius: 999px; }
.tools .note { padding: 0 14px; }
.cover .note { display: none; }
/* iPhone only (play.js sets data-ringer): Web Audio there obeys the silent switch, which a page cannot read */
.cover .note.ringer { display: none; }
@media (min-width: 760px) { .cover .legal { display: none; } }
.fs[hidden] { display: none; }
/* a phone in portrait: the stage is the screen */
@media (max-width: 599px) and (orientation: portrait) {
  .stage { position: fixed; inset: 0; z-index: 5; background: var(--paper); }
  .device { width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; }
  .device canvas, .cover { border-radius: 0; }
  .cover { inset: 0; }
  .cover .note { display: block; }
  [data-ringer] .cover .note.ringer { display: block; margin-top: -12px; }
  .tools { display: none; }
}
