/* GHB version 1 — key art up top, the game's features on one plate, itch doodles at the sides */

@font-face { font-family: "Anton"; font-weight: 400; font-display: swap; src: url(fonts/anton-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Anton"; font-weight: 400; font-display: swap; src: url(fonts/oswald-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Sofia Sans Semi Condensed"; font-weight: 400; font-display: swap; src: url(fonts/sofia-sans-semi-condensed-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Sofia Sans Semi Condensed"; font-weight: 500; font-display: swap; src: url(fonts/sofia-sans-semi-condensed-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Sofia Sans Semi Condensed"; font-weight: 700; font-display: swap; src: url(fonts/sofia-sans-semi-condensed-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Sofia Sans Semi Condensed"; font-weight: 400; font-display: swap; src: url(fonts/sofia-sans-semi-condensed-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Sofia Sans Semi Condensed"; font-weight: 500; font-display: swap; src: url(fonts/sofia-sans-semi-condensed-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Sofia Sans Semi Condensed"; font-weight: 700; font-display: swap; src: url(fonts/sofia-sans-semi-condensed-latin-700-normal.woff2) format("woff2"); }

:root {
  --night: #0d121a;
  --plate: #19202c;
  --plate-2: #222b39;
  --ink: #e8edf3;
  --muted: #b0bac8;
  --steel: #cdd8e4;
  --steel-hi: #e6eef6;
  --steel-ink: #0d121a;
  --copper: #c2603a;

  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --text: "Sofia Sans Semi Condensed", "Arial Narrow", sans-serif;

  --s-small: 0.9375rem;
  --s-body: 1.125rem;
  --s-lead: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --s-head: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);

  --plate-w: 1120px;
  --pad: clamp(18px, 4vw, 64px);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--plate-2) var(--night); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; color: var(--ink); background: var(--night); font: 400 var(--s-body)/1.55 var(--text); overflow-x: hidden; }
/* the itch doodle wallpaper: one image, fixed behind everything, so it never tiles or seams */
section[id] { scroll-margin-top: 84px; }
html.i18n-wait body { opacity: 0; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--night) url(img/doodle-night.webp) center / cover no-repeat;
  background-image: -webkit-image-set(url(img/doodle-night.webp) 1x, url(img/doodle-night-2x.webp) 2x);
  background-image: image-set(url(img/doodle-night.webp) 1x, url(img/doodle-night-2x.webp) 2x);
  --edge: calc(50% - var(--plate-w) / 2);
  -webkit-mask-image: linear-gradient(to right, #000 calc(var(--edge) - 30px), transparent calc(var(--edge) + 50px), transparent calc(100% - var(--edge) - 50px), #000 calc(100% - var(--edge) + 30px));
          mask-image: linear-gradient(to right, #000 calc(var(--edge) - 30px), transparent calc(var(--edge) + 50px), transparent calc(100% - var(--edge) - 50px), #000 calc(100% - var(--edge) + 30px));
}
/* on narrow screens the wallpaper is fully masked out anyway: don't download it */
@media (max-width: 1099px) { body::before { background-image: none; -webkit-mask-image: none; mask-image: none; } }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { list-style: none; padding: 0; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--steel); color: var(--steel-ink); }
:focus-visible { outline: 2px solid var(--steel-hi); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 60; background: var(--steel); color: var(--steel-ink); padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 12px; }

/* buttons */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 54px; padding: 12px 26px; border: 0; border-radius: 3px; cursor: pointer;
  font: 700 var(--s-body)/1.15 var(--text); letter-spacing: 0.01em; text-decoration: none; text-align: center;
  transition: transform 160ms var(--ease), background-color 200ms ease;
}
.btn:active { transform: translateY(1px) scale(0.985); }
/* steel plate: same cold metal as the logo; lit from the top, sits on a soft shadow */
.btn-steel {
  color: var(--steel-ink);
  background: linear-gradient(180deg, #edf3f8 0%, #cbd6e2 55%, #b9c6d4 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(13, 18, 26, 0.18), 0 8px 20px -10px rgba(0, 0, 0, 0.85);
  transition: transform 160ms var(--ease), box-shadow 200ms var(--ease), filter 200ms;
}
.btn-steel:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(13, 18, 26, 0.18), 0 12px 26px -10px rgba(0, 0, 0, 0.9); }
.btn-tone { background: var(--plate-2); color: var(--ink); }
.btn-tone:hover { background: #2d384a; }
.btn-meta { font-weight: 400; font-size: var(--s-small); opacity: 0.8; margin-top: 2px; }
.btn-wide { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }

/* top bar after the hero (desktop) */
.bar {
  position: fixed; z-index: 40; inset: 0 0 auto 0; height: 60px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad);
  background: rgba(13, 18, 26, 0.97);
  transform: translateY(-100%); transition: transform 300ms var(--ease);
}
.bar.is-on { transform: none; }
.bar-mark img { height: 38px; width: auto; }
.bar nav { display: flex; align-items: center; gap: 28px; font-weight: 500; }
.bar nav a { text-decoration: none; }
.bar nav a:not(.bar-cta):hover { color: var(--steel-hi); text-decoration: underline; }
.bar-cta { background: var(--steel); color: var(--steel-ink); padding: 9px 18px; border-radius: 3px; font-weight: 700; }
.bar-cta:hover { background: var(--steel-hi); }

/* hero: the art, fading into one centred strip with the action */
.hero { position: relative; background: var(--night); }
.hero-art { position: relative; display: block; height: min(74svh, 57.3vw); overflow: hidden; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.hero-art::after { /* the art melts into the strip below instead of ending on a hard edge */
  content: ""; position: absolute; inset: auto 0 0 0; height: 22%;
  background: linear-gradient(to bottom, rgba(13, 18, 26, 0), var(--night));
}
@media (prefers-reduced-motion: no-preference) { .hero-art img { animation: settle 2.4s var(--ease) both; } }
@keyframes settle { from { transform: scale(1.04); } to { transform: none; } }
.hero-strip {
  position: relative; display: grid; justify-items: center; gap: 16px; text-align: center;
  padding: 8px var(--pad) clamp(36px, 4vw, 56px); margin-top: -8px;
}
.hero-lede { font-size: var(--s-lead); line-height: 1.35; max-width: 44ch; }
.btn-hero { min-height: 64px; min-width: 300px; padding: 16px 40px; font-size: 1.375rem; }
.cue { display: inline-grid; justify-items: center; gap: 2px; padding: 6px 14px; color: var(--ink); font-weight: 500; text-decoration: none; }
.cue svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cue:hover span { text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) {
  .cue svg { animation: nudge 1.8s ease-in-out infinite; }
  @keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
}

/* language switch: top right of the first screen, in the top bar and in the footer */
.lang { display: inline-flex; padding: 4px; gap: 4px; border-radius: 5px; background: rgba(13, 18, 26, 0.72); box-shadow: inset 0 0 0 1px rgba(205, 216, 228, 0.22); }
.lang button {
  min-width: 56px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 3px; cursor: pointer;
  background: transparent; color: var(--muted); font: 700 1.125rem/1 var(--text); letter-spacing: 0.04em;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--steel); color: var(--steel-ink); }
.hero-media { position: relative; }
.lang-hero { position: absolute; z-index: 2; top: 18px; right: var(--pad); }
.bar .lang { margin-left: 4px; padding: 3px; }
.bar .lang button { min-height: 38px; min-width: 50px; font-size: 1rem; }

@media (min-width: 900px) {
  .hero { height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
  .hero-media { position: absolute; inset: 0; }
  .hero-art { position: absolute; inset: 0; height: auto; }
  .hero-art img { object-position: 18% 0%; } /* narrow windows crop the right side, never the logo */
  .hero-art::after { height: 46%; background: linear-gradient(to bottom, rgba(13, 18, 26, 0), rgba(13, 18, 26, 0.88) 52%, var(--night)); }
  .hero-strip { position: absolute; inset: auto 0 0 0; margin: 0; padding: 0 var(--pad) clamp(14px, 2.4vh, 28px); gap: clamp(10px, 1.8vh, 16px); }
  .hero-lede { text-shadow: 0 1px 12px rgba(13, 18, 26, 0.9); }
}
@media (min-width: 900px) and (max-height: 720px) {
  .hero-lede { font-size: var(--s-body); }
  .btn-hero { min-height: 56px; }
}
/* big monitors: the call to action grows with the screen instead of staying laptop-sized */
@media (min-width: 1900px) and (min-height: 1000px) {
  .hero-lede { font-size: clamp(1.25rem, 0.9vw, 1.625rem); }
  .btn-hero { min-height: clamp(64px, 3.6vw, 84px); min-width: clamp(300px, 17vw, 420px); font-size: clamp(1.375rem, 1vw, 1.75rem); }
}

/* the plate: one solid surface for the whole page, doodles only at the sides */
.plate { max-width: var(--plate-w); margin: 0 auto; padding: clamp(40px, 4vw, 56px) var(--pad) 0; }
/* the doodles fade in under the first screen instead of starting on a hard line */
.plate::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; height: 280px; margin-top: calc(-1 * clamp(40px, 4vw, 56px)); background: linear-gradient(var(--night), rgba(13, 18, 26, 0)); pointer-events: none; }
.sec + .sec { margin-top: clamp(64px, 7vw, 88px); }

/* section headings: plain condensed caps, no backdrop */
h2.brush {
  margin: 0 auto 32px; max-width: 100%;
  font: 400 var(--s-head)/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; text-align: center;
}
.sec-lede { text-align: center; color: var(--muted); font-size: var(--s-lead); max-width: 44ch; margin: -12px auto 32px; }

/* worn game panel as the frame for the trailer and every screenshot */
.frame {
  position: relative; display: block; padding: 6px; border-radius: 8px;
  background: linear-gradient(180deg, #2b3547, #1a212d);
  box-shadow: inset 0 0 0 1px rgba(205, 216, 228, 0.16), 0 28px 60px -26px rgba(0, 0, 0, 0.95);
}
.frame img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }

/* trailer: on short laptop screens the whole video (and its controls) stays in view */
.trailer-box { max-width: calc((100vh - 170px) * 16 / 9); max-width: calc((100svh - 170px) * 16 / 9); margin-inline: auto; }
.trailer-box::after { content: ""; position: absolute; inset: 6px; border-radius: 4px; pointer-events: none; background: linear-gradient(to bottom, rgba(13, 18, 26, 0) 55%, rgba(13, 18, 26, 0.55)); }
.trailer-box.is-playing::after { display: none; }
.trailer-box video { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); border-radius: 4px; background: #000; z-index: 1; }
/* the poster keeps the frame's size while the video plays on top of it */
.trailer-box.is-playing img { visibility: hidden; }
.trailer-box.is-playing .play { display: none; }
.play {
  position: absolute; z-index: 2; left: 50%; bottom: clamp(16px, 4%, 36px); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 28px 0 22px;
  background: var(--steel); color: var(--steel-ink); border: 0; border-radius: 3px; cursor: pointer;
  font: 700 1.25rem/1 var(--text); white-space: nowrap;
  transition: transform 160ms var(--ease), background-color 200ms;
}
.play:hover { background: var(--steel-hi); }
.play.is-soon { cursor: default; background: rgba(13, 18, 26, 0.82); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(205, 216, 228, 0.25); }
.play:active { transform: translateX(-50%) scale(0.97); }
.play svg { width: 22px; height: 22px; fill: currentColor; }
.play-len { font-weight: 400; font-size: var(--s-small); opacity: 0.75; }

/* features on the copper line */
.feats { position: relative; display: grid; gap: clamp(40px, 4vw, 56px); padding-left: 52px; margin-top: 0; }
.feats::before, .feats::after { content: ""; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; }
.feats::before { background: rgba(194, 96, 58, 0.26); }
.feats::after { background: var(--copper); transform-origin: top; transform: scaleY(var(--route, 1)); }
.feat { position: relative; display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.feat::before {
  content: ""; position: absolute; left: -48px; top: 50%; margin-top: -10px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--plate); box-shadow: inset 0 0 0 4px var(--copper); z-index: 1;
}
.feat h3 { text-wrap: balance; font: 400 clamp(1.75rem, 1.3rem + 1.3vw, 2.375rem)/1.02 var(--display); text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 12px; }
.feat-text p { color: var(--muted); max-width: 38ch; }
/* the story opens a bit louder */
.feat-intro .feat-text p { color: var(--ink); font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); line-height: 1.55; max-width: 40ch; }
/* first point of the line: the story; extra paragraphs and the 18+ line */
.feat-text p + p { margin-top: 12px; }
.feat-text .rating { font-size: var(--s-small); color: var(--ink); opacity: 0.8; }

/* download */
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
html[data-platform="windows"] .platforms [data-os="windows"],
html[data-platform="android"] .platforms [data-os="android"],
html[data-platform="mac"] .platforms [data-os="mac"] { order: -1; }
.platforms li { display: grid; gap: 6px; }
/* iPhone: the builds can't run here, so the buttons step back and just send the link */
html[data-platform="ios"] .platforms .btn { color: var(--ink); background: rgba(34, 43, 57, 0.85); filter: none; box-shadow: inset 0 0 0 1px rgba(205, 216, 228, 0.22); }
.platforms .btn { min-height: 76px; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 12px 22px; text-align: left; }
.platforms .btn-text { display: grid; gap: 2px; }
.dev-ico { width: 28px; height: 28px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sec-note { margin-top: 18px; text-align: center; color: var(--muted); font-size: var(--s-small); }
.age-note { margin-top: 6px; text-align: center; color: var(--muted); font-size: var(--s-small); }
html[data-platform="ios"] #play .age-note { margin-top: 18px; }
[data-only], [data-only-inapp] { display: none; }
html[data-platform="ios"] [data-only="ios"] { display: block; }
html[data-platform="ios"] #play .sec-note { display: none; }
html[data-platform="android"][data-inapp] [data-only-inapp] { display: block; }
.ios-note, .inapp { background: var(--plate-2); border-radius: 3px; padding: 16px 18px; }
.ios-note { margin: 0 auto 24px; max-width: 640px; text-align: center; }
.inapp { margin: 0 auto 20px; max-width: 640px; text-align: center; }
.howto-status[hidden] { display: none; }
.ios-note .row { justify-content: center; margin-top: 14px; }
.status { min-height: 1.4em; margin-top: 8px; color: var(--muted); font-size: var(--s-small); }
.inapp, .small { font-size: var(--s-small); }

/* support and community: the game's own phone app icons */
/* support and community: one row of compact links (icon, name, what it is for) */
.apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 auto; }
.apps a {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 16px 12px 12px; border-radius: 12px; text-decoration: none;
  background: rgba(34, 43, 57, 0.72); box-shadow: inset 0 0 0 1px rgba(205, 216, 228, 0.08);
  transition: background-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}
.apps a:hover { background: #2b3647; box-shadow: inset 0 0 0 1px rgba(205, 216, 228, 0.18); transform: translateY(-2px); }
.apps a:active { transform: translateY(0); }
.apps a:focus-visible { outline: 2px solid var(--steel); outline-offset: 3px; }
.apps img { width: 52px; height: auto; flex: none; }
.apps a > b, .apps a > span { display: block; }
.apps .app-text { display: grid; gap: 2px; min-width: 0; }
.apps b { font-weight: 700; font-size: 1.125rem; line-height: 1.15; color: var(--ink); }
.apps span { color: var(--muted); font-size: var(--s-small); line-height: 1.3; }

.foot { display: grid; justify-items: center; gap: 6px; padding: clamp(72px, 7vw, 88px) 0 clamp(48px, 5vw, 64px); text-align: center; color: var(--muted); font-size: var(--s-small); }
.foot img { width: 190px; margin-bottom: 10px; }

/* how to start the game: opens after a download button is pressed; always fits one screen */
.howto {
  /* height follows the content: Safari otherwise stretches a modal dialog to the full screen height */
  width: min(920px, calc(100% - 32px)); height: -webkit-fit-content; height: fit-content; max-height: calc(100dvh - 24px);
  margin: auto; padding: 0; border: 0; border-radius: 4px;
  color: var(--ink); background: var(--plate); overflow: hidden;
  display: none; grid-template-columns: 300px 1fr;
}
.howto[open] { display: grid; }
html:has(dialog[open]) { overflow: hidden; }
.howto::backdrop { background: rgba(6, 9, 14, 0.8); }
.howto-art { position: relative; min-height: 0; overflow: hidden; background: var(--night); }
.howto-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 22%; }
.howto-body { min-height: 0; padding: 26px 32px 26px; overflow-y: auto; overscroll-behavior: contain; }
.howto h2 { padding-right: 40px; }
.howto-status { display: flex; align-items: center; gap: 8px; margin: -8px 0 18px; color: #a9d3b4; font-size: var(--s-small); font-weight: 500; }
.howto-status::before { content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M7.8 12.3l2.8 2.8 5.6-5.8'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M7.8 12.3l2.8 2.8 5.6-5.8'/%3E%3C/svg%3E") center / contain no-repeat; }
.howto h2 { font: 400 clamp(1.625rem, 1.3rem + 1vw, 2.125rem)/1.05 var(--display); text-transform: uppercase; margin: 0 0 16px; }
.howto-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.howto-steps li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; counter-increment: step; }
.howto-pic svg { display: block; width: 100%; height: auto; }
.howto-steps b { display: block; font-size: 1.125rem; line-height: 1.2; margin-bottom: 2px; }
.howto-steps b::before { content: counter(step) ". "; color: var(--copper); }
.howto-steps span { display: block; color: var(--muted); font-size: 1rem; line-height: 1.35; }
.howto-extra { margin: 14px 0 0; padding: 9px 12px; background: var(--plate-2); border-radius: 3px; font-size: var(--s-small); }
.howto-ok { margin-top: 16px; min-width: 170px; min-height: 48px; }
.howto-x { position: absolute; top: 8px; right: 8px; margin: 0; }
.howto-x button {
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  font: 400 28px/1 var(--text); color: var(--ink); background: rgba(13, 18, 26, 0.6);
}
.howto-x button:hover { background: var(--plate-2); }
.howto-x button:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; }
/* computer: the whole window scales with the screen (everything inside is in em), capped by both width and height so it always fits */
@media (min-width: 900px) {
  .howto { font-size: clamp(15px, min(1.4vw, 2.35vh), 22px); width: min(58em, calc(100% - 48px)); grid-template-columns: 19.5em 1fr; }
  .howto-body { padding: 1.75em 2.25em 1.75em 2em; }
  .howto-status { font-size: 0.9em; gap: 0.5em; margin: -0.5em 0 1.1em; }
  .howto-status::before { width: 1.15em; height: 1.15em; }
  .howto h2 { font-size: 2.15em; margin-bottom: 0.45em; padding-right: 1.6em; }
  .howto-steps { gap: 0.7em; }
  .howto-steps li { grid-template-columns: 9.75em 1fr; gap: 1.1em; }
  .howto-steps b { font-size: 1.2em; }
  .howto-steps span { font-size: 1em; }
  .howto-extra { font-size: 0.9em; margin-top: 1em; padding: 0.6em 0.8em; }
  .howto-ok { font-size: 1em; margin-top: 1.1em; min-width: 10.5em; min-height: 2.9em; }
  .howto-x { top: 0.6em; right: 0.6em; }
}
@media (prefers-reduced-motion: no-preference) {
  .howto[open] { animation: howto-in 240ms var(--ease); }
  @keyframes howto-in { from { opacity: 0; transform: translateY(12px); } }
}

.dock { display: none; }

@media (max-width: 899px) {
  .bar { display: none; }
  .hero-art { height: auto; }
  .hero-art img { height: auto; object-fit: initial; }
  .hero-strip { padding-top: 4px; }
  .hero-lede { font-size: var(--s-body); }
  .btn-hero { width: 100%; min-width: 0; font-size: 1.25rem; }
  .lang-hero { top: auto; bottom: 14px; right: 10px; }
  .plate { padding-top: 40px; }
  .frame { padding: 4px; border-radius: 8px; }
  .trailer-box::after { inset: 4px; }
  .trailer-box video { inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); }
  .play { min-height: 48px; padding: 0 18px 0 14px; font-size: 1.0625rem; bottom: 10px; }
  .play-len { display: none; }
  .feats { padding-left: 34px; margin-top: 0; }
  .sec + .sec { margin-top: 64px; }
  .feats::before, .feats::after { left: 7px; }
  .feat { grid-template-columns: 1fr; gap: 16px; }
  .feat .frame { order: -1; }
  .feat::before { left: -34px; top: 10px; margin-top: 0; width: 17px; height: 17px; }
  .platforms { grid-template-columns: 1fr; }
  .lang button { min-width: 48px; min-height: 44px; padding: 0 12px; font-size: 1rem; }
  /* phone: full screen; the picture takes whatever height the steps leave free */
  .howto { width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; border-radius: 0; grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .howto-art img { object-position: 30% 22%; }
  .howto-body { padding: 16px 16px calc(14px + env(safe-area-inset-bottom)); }
  .howto h2 { font-size: 1.625rem; margin-bottom: 12px; }
  .howto-steps { gap: 8px; }
  .howto-steps li { grid-template-columns: 116px 1fr; gap: 12px; }
  .howto-steps b { font-size: 1.125rem; }
  .howto-steps span { font-size: 1rem; }
  .howto-extra { margin-top: 10px; }
  .howto-ok { width: 100%; margin-top: 12px; }
  section[id] { scroll-margin-top: 12px; }
  .apps { grid-template-columns: 1fr; gap: 10px; max-width: 420px; }
  .apps img { width: 48px; }
  .dock {
    display: block; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(13, 18, 26, 0.97);
    transform: translateY(110%); transition: transform 300ms var(--ease);
  }
  .dock.is-on { transform: none; }
  .dock .btn { width: 100%; min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
  .feats::after { transform: none; }
}
