/* Waiting-list page (real site; from sample C2 as the owner accepted it, friend pass, handover 346; one file since the final
   round of 23 Nov 2026, handover 358). Night is the main view. Fonts and pictures are the site's own files (../theme/, ../fonts/),
   so nothing is stored twice; the font faces themselves are declared in ../theme/fonts.css and ../fonts/fonts.css.
   Sections: 1 colours and photo, 2 base and type, 3 top bar, 4 first screen, 5 form, 6 offer card, 7 below the first screen,
   8 night/day hint and fade, 9 arrival, 10 screen sizes (phone, tablet, laptop, large), 11 without JavaScript, 12 print. */

/* ---------- 1. Colours and the photo ---------- */
/* the background picture is ONE swappable asset (friend remark 7): the page reads only --photo (a plain file every browser
   can show), --photo-set (the same picture in smaller formats), their -l twins for wide screens, --photo-pos and
   --photo-filter. The owner kept the old-town street (23 Nov 2026). */
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #FFF4DF; --surface: #FFF8EA; --surface-2: #F6E6CA; --ink: #2B1A12; --ink-muted: #6A4B3B;
  --line: #EAD7B8; --line-strong: #A07E66; --brand: #F17943; --on-brand: #24120A; --accent: #FFC94D;
  --sel: #3A241A; --selink: #FFF4DF; --focus: #2B1A12; --bad: #963A4F;
  --glass: rgba(255, 246, 228, .16); --glass-line: rgba(255, 252, 240, .75); --panel: rgba(255, 248, 234, .72);
  --bloom: #FFD77A; --page-glow: color-mix(in srgb, #FFD77A 30%, transparent);
  --photo: url("../theme/img/day-960.jpg"); --photo-l: url("../theme/img/day-1920.jpg");
  --photo-set: image-set(url("../theme/img/day-960.avif") type("image/avif"), url("../theme/img/day-960.webp") type("image/webp"), url("../theme/img/day-960.jpg") type("image/jpeg"));
  --photo-set-l: image-set(url("../theme/img/day-1920.avif") type("image/avif"), url("../theme/img/day-1920.webp") type("image/webp"), url("../theme/img/day-1920.jpg") type("image/jpeg"));
  --photo-pos: 62% 58%;
  --photo-filter: sepia(.35) saturate(.85) brightness(.95);
  --wash: linear-gradient(90deg, rgba(255, 244, 223, .96) 0%, rgba(255, 240, 214, .9) 46%, rgba(255, 232, 196, .34) 100%),
          linear-gradient(180deg, rgba(255, 244, 223, .5) 0%, transparent 22%, transparent 66%, #FFF4DF 100%);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1B110D; --surface: #2A1B15; --surface-2: #36241B; --ink: #FFF1DC; --ink-muted: #D9BFA6;
  --line: #4A3328; --line-strong: #8E715E; --focus: #FFC94D; --sel: #FFE9C4; --selink: #2B1A12; --bad: #E2A0AE;
  --glass: rgba(42, 27, 21, .5); --glass-line: rgba(255, 233, 196, .22); --panel: rgba(42, 27, 21, .62);
  --bloom: #7A3A12; --page-glow: color-mix(in srgb, #7A3A12 62%, transparent);
  --photo: url("../theme/img/night-960.jpg"); --photo-l: url("../theme/img/night-1920.jpg");
  --photo-set: image-set(url("../theme/img/night-960.avif") type("image/avif"), url("../theme/img/night-960.webp") type("image/webp"), url("../theme/img/night-960.jpg") type("image/jpeg"));
  --photo-set-l: image-set(url("../theme/img/night-1920.avif") type("image/avif"), url("../theme/img/night-1920.webp") type("image/webp"), url("../theme/img/night-1920.jpg") type("image/jpeg"));
  --photo-pos: 50% 60%;
  --photo-filter: brightness(1.7) saturate(1.2) contrast(1.05);
  --wash: linear-gradient(90deg, rgba(27, 17, 13, .9) 0%, rgba(27, 17, 13, .8) 46%, rgba(27, 17, 13, .18) 100%),
          linear-gradient(180deg, rgba(27, 17, 13, .35) 0%, transparent 22%, transparent 66%, #1B110D 100%);
}

/* ---------- 2. Base and type ---------- */
/* The text size starts from the visitor's own setting (audit S2): 106.25% is 17 px for most people and grows with a larger
   setting. On a big screen it also grows with the window (17 px up to 1280 wide or 720 high, about 18 px at 1440 x 900, 22 px
   at 1920 x 1080, 24 px at most), so the page fills a large monitor the way it fills a small laptop. --u is "one pixel of the design": 1 px on phones and
   tablets; from 900 px wide it follows the text size, so boxes, gaps and buttons grow together with the words. */
:root {
  font-size: 106.25%; /* for a browser too old for the line below */
  font-size: clamp(106.25%, min(43.75% + 0.78125vw, 43.75% + 1.3889svh), 150%); --u: 1px;
  --latin: "Be Vietnam Pro", "BVP Standin A", "BVP Standin R";
  --font: var(--latin), "Noto Sans", "Noto Sans Devanagari", "Noto Sans Myanmar", "Noto Sans Sinhala", "PingFang SC", "Noto Sans SC Subset", system-ui, sans-serif;
  /* headings: the display face for Latin letters; Nepali, Burmese and Sinhala keep OUR fonts (audit M2), never the phone's */
  --display: "Fraunces FL", "Fraunces Standin G", "Fraunces Standin N", "Noto Sans Devanagari", "Noto Sans Myanmar", "Noto Sans Sinhala", Georgia, serif;
  --cjk: "PingFang SC", "Noto Sans SC Subset", sans-serif;
  /* a language's own name in the two lists: the small names-only fonts (../theme/fonts.css), so three whole fonts are not fetched for three words */
  --names: var(--latin), "Orso Names", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, "Noto Sans SC Subset", sans-serif;
}
@media (min-width: 900px) { :root { --u: calc(1rem / 17); } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px); background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.5; }
/* the soft orange glow on the whole page at night (owner: no plain dark page), fixed to the window so it stays all the way down */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70vmax 46vmax at 10% 100%, var(--page-glow), transparent 70%),
              radial-gradient(60vmax 40vmax at 94% 6%, var(--page-glow), transparent 70%); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.wrap { inline-size: min(calc(1240 * var(--u)), 100% - 64px); margin-inline: auto; }
.vh { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* the layout below answers to the room the page really has (container queries), not to a list of device widths */
main { container: page / inline-size; }

/* ---------- 3. Top bar: the Sunrise wordmark, the language button, the day/night switch (friend remarks 2, 8, 10) ---------- */
.bar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; min-block-size: calc(68 * var(--u) + env(safe-area-inset-top, 0px)); padding-block-start: env(safe-area-inset-top, 0px); } /* notched phones: nothing sits under the camera cut-out */
/* the header never lets the language button touch the logo: the logo keeps its size, and a long language name ends in an ellipsis instead */
.wl-brand { flex: none; line-height: 0; }
.bar-end { display: flex; align-items: center; gap: 8px; min-inline-size: 0; margin-inline-start: 10px; }
.switch { position: relative; flex: none; display: inline-flex; gap: 4px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.switch button { inline-size: 48px; block-size: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-muted); cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--sel); color: var(--selink); }

/* ---------- 4. First screen: the photo, wash and bloom behind the words ---------- */
.scene { position: absolute; inset-inline: 0; inset-block-start: 0; block-size: max(680px, 100vh); block-size: max(680px, 100svh); z-index: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
/* phones and tablets get the small photo (27 KB instead of 99 KB by night, audit S7). The smaller formats only where the
   browser can choose by type: an older iPhone cannot, and there a var() that fails would leave no photo, so it keeps the JPEG */
.photo { position: absolute; inset: 0; background: center / cover; background-image: var(--photo); background-position: var(--photo-pos); filter: var(--photo-filter); }
@supports (background-image: image-set(url("x.avif") type("image/avif"))) { .photo { background-image: var(--photo-set); } }
@media (min-width: 961px) {
  .photo { background-image: var(--photo-l); }
  @supports (background-image: image-set(url("x.avif") type("image/avif"))) { .photo { background-image: var(--photo-set-l); } }
}
.wash { position: absolute; inset: 0; background: var(--wash); }
.bloom { position: absolute; inset-inline-start: 18%; inset-block-start: 74%; inline-size: 1100px; block-size: 640px; translate: -50% -50%; opacity: .55;
  background: radial-gradient(closest-side, var(--bloom) 0%, color-mix(in srgb, var(--bloom) 50%, transparent) 40%, transparent 100%); }
/* one column, the words low on the picture so the street stays open above them; from 900 px of room, two columns (section 10).
   Above the sections after it, so the open language list is on top of them and every row can be tapped (UX re-check 2, S1). */
.hero { position: relative; z-index: 2; min-block-size: calc(100svh - 68 * var(--u) - env(safe-area-inset-top, 0px)); display: grid; grid-template-columns: minmax(0, 1fr);
  gap: calc(32 * var(--u)); align-items: end; align-content: end; padding-block: 8px calc(92 * var(--u)); }
.hero > div { max-inline-size: 640px; }
/* the headline: 3rem where there is room, a little less in a narrow or a short window (a phone on its side) */
.hero h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 3rem; font-size: clamp(2.1rem, min(1.2rem + 4.2cqi, 1.2rem + 4.5svh), 3rem); line-height: 1.07; letter-spacing: -0.018em; text-wrap: balance; }
.hero h1 .ph { display: inline-block; }
/* Chinese headline: a Chinese face, no Latin letter-spacing. Burmese, Nepali and Sinhala: their marks above and below need taller
   lines than the Latin display face's 1.07 (measured at 360 px: the lines touched; UX gate 356, 5) */
.hero h1:lang(zh-Hans) { font-family: var(--cjk); letter-spacing: 0; line-height: 1.2; }
.hero h1:lang(my) { letter-spacing: 0; line-height: 1.55; }
.hero h1:lang(ne), .hero h1:lang(si) { letter-spacing: 0; line-height: 1.3; }
/* the small note under the button: quiet, but full-contrast muted ink (at least 4.5:1 on the wash); never one lonely last word */
.hnote { margin: 10px 0 0; font-size: .76rem; line-height: 1.4; color: var(--ink-muted); text-wrap: balance; }

/* ---------- 5. The sign-up form ---------- */
form { margin-block-start: 24px; }
.label { display: block; margin-block-end: 6px; font-size: .84rem; font-weight: 600; color: var(--ink-muted); }
/* minmax(0, ...): a box may be narrower than its own natural width, so with the text size doubled the form still fits the screen */
.fields { display: grid; grid-template-columns: minmax(0, 1fr) calc(210 * var(--u)); gap: 10px; }
.field { display: flex; flex-direction: column; }
input[type="email"], .pick > button { min-block-size: calc(52 * var(--u)); padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel);
  color: var(--ink); font: inherit; font-size: 1rem; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
input[type="email"]::placeholder { color: var(--ink-muted); opacity: 1; } /* full muted ink: 6:1 by day (UX gate 356, 13) */
input[aria-invalid="true"] { border-color: var(--bad); }
.err { margin: 6px 0 0; font-size: .84rem; color: var(--bad); }
/* the two language lists (the form's box and the header button) are drawn by the page: a button and a list. Kept instead of a
   native <select> (audit S9) because the phone's own picker would draw မြန်မာ in the phone's font (the Zawgyi risk), and the two
   lists must look and behave the same. The form's list opens upward where there is room above it, so it stays inside the window. */
.pick { position: relative; }
.pick > button { inline-size: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; text-align: start; }
.pick > button > span, .pick li { font-family: var(--names); }
.pick ul { position: absolute; inset-inline: 0; inset-block-end: calc(100% + 6px); z-index: 5; margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
.pick li { display: flex; align-items: center; min-block-size: 48px; padding: 8px 12px; border-radius: 9px; cursor: pointer; font-size: .95rem; } /* 48 px rows: the tap size (UX gate 356, 6) */
.pick li[aria-selected="true"] { background: var(--sel); color: var(--selink); }
.pick li:hover:not([aria-selected="true"]) { background: var(--surface-2); }
.pick li:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
/* the header's language button: a pill; its list hangs from its right edge */
.pick.hdr { min-inline-size: 0; }
.pick.hdr > button { inline-size: auto; max-inline-size: 100%; min-inline-size: 0; min-block-size: 48px; padding: 0 14px; gap: 8px; border-radius: 999px; border-color: var(--line); background: var(--surface);
  font-size: .88rem; font-weight: 600; justify-content: center; -webkit-backdrop-filter: none; backdrop-filter: none; }
.pick.hdr > button svg { flex: none; }
.pick.hdr > button > span { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick.hdr ul { inset-block-end: auto; inset-block-start: calc(100% + 6px); inset-inline: auto 0; inline-size: max-content; min-inline-size: 200px; max-inline-size: calc(100vw - 24px); }
.pick.hdr li { justify-content: space-between; gap: 16px; }
.pick.hdr li[aria-selected="true"]::after { content: "✓"; font-weight: 600; }
/* the main button, with the glare (friend remark 6): one slow, soft highlight sweeps across it once when the page has arrived and on hover or
   keyboard focus. No pulse, no loop; nothing moves under "reduce motion". */
.go { display: inline-block; margin-block-start: 16px; min-inline-size: calc(340 * var(--u)); min-block-size: calc(64 * var(--u)); padding: 0 32px; border: 1px solid #C9581F; border-radius: 22px;
  background: var(--brand) linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .26) 50%, transparent 62%) no-repeat 130% 0 / 250% 100%;
  color: var(--on-brand); font: inherit; font-size: 1.08rem; font-weight: 600; cursor: pointer;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(140, 50, 5, .18); }
@keyframes glare { from { background-position: 130% 0; } to { background-position: -30% 0; } }
@media (prefers-reduced-motion: no-preference) {
  .go.glare-once, .go:focus-visible { animation: glare 1.8s ease-in-out 1 both; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) { .go:hover { animation: glare 1.8s ease-in-out 1 both; } }
.go:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
/* while it saves the button shows that it is working and cannot be pressed twice; if the sign-up did not reach the list, the
   same quiet rose as the email error says so, right under the button */
.go[aria-busy="true"] { cursor: progress; opacity: .8; }
.save-err, .save-busy { margin: 10px 0 0; font-size: .9rem; color: var(--bad); }
/* the hidden trap field for form-filling robots (ops/08): out of sight, out of the tab order, ignored by screen readers */
.trap { position: absolute; inset-inline-start: -10000px; inline-size: 1px; block-size: 1px; overflow: hidden; }
/* after sign-up */
.done { display: flex; align-items: center; gap: 14px; margin-block-start: 24px; padding: 20px 24px; border: 1px solid var(--glass-line); border-radius: 20px;
  background: var(--panel); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 1.12rem; font-weight: 600; max-inline-size: 560px; }
.done .tick { flex: none; inline-size: 40px; block-size: 40px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; }

/* ---------- 6. The glass offer card: under the form; from 900 px of room, on the right, level with the button ---------- */
.side { align-self: end; justify-self: start; inline-size: min(calc(390 * var(--u)), 100%); }
.card { padding: 22px 22px 20px; border: 1px solid var(--glass-line); border-radius: 22px; background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1); box-shadow: 0 18px 44px rgba(0, 0, 0, .2); }
.card p { margin: 0; font-size: .95rem; line-height: 1.45; }

/* ---------- 7. Below the first screen ---------- */
.more { position: relative; z-index: 1; padding-block: 8px 40px; }
.box { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.more h2 { margin: 0 0 12px; font-family: var(--display); font-weight: 600; font-size: 1.5rem; }
.more h2:lang(zh-Hans) { font-family: var(--cjk); letter-spacing: 0; } /* the serif display face has no Chinese */
.box ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; color: var(--ink-muted); }
.box ul li { text-wrap: pretty; }
.box ul li::marker { color: var(--accent); }
.privacy { margin: 16px 0 0; font-size: .86rem; color: var(--ink-muted); text-align: center; }
footer { position: relative; z-index: 1; padding-block: 20px max(48px, calc(env(safe-area-inset-bottom, 0px) + 24px)); font-size: .8rem; color: var(--ink-muted); text-align: center; }
footer p { margin: 0; }
/* the privacy page and the seller page: one quiet line at the very bottom, in the footer's own type. Spaced by the layout (no dot
   that could hang at a line end); each link is a full 44 px tap target, and two long names simply sit one above the other */
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 28px; margin-block-start: 6px; }
.foot-links a { display: inline-flex; align-items: center; min-block-size: 44px; color: inherit; text-underline-offset: 3px; }

/* ---------- 8. The night/day hint (once) and the night/day fade ---------- */
/* a soft sun-glow breathes behind the switch, one short line beside it. No arrow, no box, takes no taps. */
.theme-hint { position: absolute; inset: 0; pointer-events: none; }
.sunglow { position: absolute; inset: -18px -22px; z-index: -1; border-radius: 999px; opacity: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, #FFC94D 70%, transparent), color-mix(in srgb, #F17943 35%, transparent) 55%, transparent); }
.theme-hint p { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 12px); margin: 0;
  inline-size: max-content; max-inline-size: min(300px, calc(100vw - 32px)); text-align: end; font-size: .84rem; line-height: 1.3; color: var(--ink); opacity: 0;
  text-shadow: 0 1px 10px var(--bg), 0 0 2px var(--bg); }
.theme-hint.on .sunglow { animation: sunbreath 3s ease-in-out 2 forwards; }
.theme-hint.on p { opacity: 1; transition: opacity .9s ease .3s; }
.theme-hint.off p, .theme-hint.off .sunglow { opacity: 0; transition: opacity .8s ease; animation: none; }
@keyframes sunbreath { 0% { opacity: 0; scale: .85; } 50% { opacity: 1; scale: 1.05; } 100% { opacity: .35; scale: 1; } }
@media (prefers-reduced-motion: reduce) { .theme-hint.on .sunglow { animation: none; opacity: .6; } }
/* The line of words (up to 300 px wide, under the switch) shows only where it cannot reach the headline, the form or the card
   in any language; everywhere else the hint is the glow alone and the words stay in the page for screen readers, out of sight.
   - From 64em (1024 px) wide the words fit inside the right-hand column with room to spare: 1024 - 64 (page edges) - 300
     leaves 660 px, past the left column's 640 px, so they never reach the headline at any height. Two columns start at 900 px,
     but from 900 to 1023 px wide the words reach into the left column, and on a large phone on its side (912 to 956 x 412 to
     440) or a short window (900 x 480 to 700) they lay on the headline (UX re-check 362, B1; measured in 8 languages).
   - Below that, only a tall window (62.5em, 1000 px high: an upright tablet) leaves the top of the page empty under them.
   em, not px: with a larger text setting the columns grow, so the words give way sooner. */
@media (max-width: 599px), (max-width: 63.99em) and (max-height: 62.49em) {
  .theme-hint p { inset-block-start: 0; inline-size: 1px; block-size: 1px; max-inline-size: none; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* in a low window (a phone on its side) the headline starts right under the header: the glow spills upward, toward the top
   edge, and not below the switch, so it stays 8 px clear of the headline even while it breathes (fix round 364) */
@media (max-height: 599px) { .sunglow { inset-block: -9px 0; } }
/* night <-> day: a calm cross-fade of the whole page (picture, glow and words together) in 0.35 s. The old view stays solid and
   the new one fades in over it, so there is no dip or flash in the middle. Short on purpose: while it runs the browser lets
   no tap through, and at 0.8 s a quick tap on the email box was lost (UX re-check 362, N1). */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: none; }
  ::view-transition-new(root) { animation: daynight .35s cubic-bezier(.4, 0, .2, 1); }
  @keyframes daynight { from { opacity: 0; } to { opacity: 1; } }
}

/* ---------- 9. Arrival after the welcome film (only then: wl.js): photo first, then the words, each part after its own
   delay (set here, not in the page: the site's CSP allows no inline styles) ---------- */
.pick.hdr.a, .switch.a { --d: .2s; } .hero h1.a { --d: .35s; } form.a { --d: .95s; } .hnote.a { --d: 1.05s; } .side.a { --d: 1.15s; }
.arriving .photo, .arriving .bloom { opacity: 0; }
.arriving .a { opacity: 0; translate: 0 12px; }
.arriving.in .photo { opacity: 1; transition: opacity 1.3s ease; }
.arriving.in .bloom { opacity: .55; transition: opacity 1.6s ease .2s; }
.arriving.in .a { opacity: 1; translate: 0 0; transition: opacity .8s ease var(--d, .3s), translate 1s cubic-bezier(.2, .7, .2, 1) var(--d, .3s); }
/* a page opening in another language keeps its words out of sight for the moment its words file takes to arrive (wl.js), so
   nobody sees English turn into Burmese; the photo and the logo are there from the start */
html[data-wait] main, html[data-wait] footer, html[data-wait] .bar-end { visibility: hidden; }

/* ---------- 10. Screen sizes ---------- */
/* Tablets upright and laptops (600 px and up): the logo grows with the design */
@media (min-width: 600px) { .wl-brand .orso-wm { block-size: calc(36 * var(--u)); } }
/* 900 px of room and more (tablets on their side, laptops, large screens): the words on the left, the offer card on the
   right, level with the button */
@container page (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, calc(640 * var(--u))) 1fr; }
  .hero > div { max-inline-size: none; }
  .side { justify-self: end; }
  input[type="email"], .pick > button { padding-inline: calc(16 * var(--u)); border-radius: calc(14 * var(--u)); }
  .go { padding-inline: calc(32 * var(--u)); border-radius: calc(22 * var(--u)); }
  .card { padding: calc(22 * var(--u)) calc(22 * var(--u)) calc(20 * var(--u)); border-radius: calc(22 * var(--u)); }
  .switch button { inline-size: calc(48 * var(--u)); block-size: calc(48 * var(--u)); }
  .pick.hdr > button { min-block-size: calc(48 * var(--u)); padding-inline: calc(14 * var(--u)); }
}
/* Phones (under 600 px): the phone look the owner accepted. The hero gives back its extra height, the page edge moves in to 16 px,
   the fields stack, the button is as wide as the page, and the first screen is tightened so the button sits inside a
   360 x 640 window (the fields and the button stay at least 44 px) */
@media (max-width: 599px) {
  .wrap { inline-size: calc(100% - 32px); }
  .hero { min-block-size: 0; padding-block: 24px 48px; }
  .hero > div { max-inline-size: none; }
  .hero h1 { font-size: 2.1rem; }
  .hero h1:lang(zh-Hans) { font-size: 1.85rem; }
  .hero h1:lang(my), .hero h1:lang(si) { font-size: 1.6rem; } /* Sinhala in our own font is as wide as Burmese (it used to fall to the phone font, audit M2) */
  form { margin-block-start: 26px; }
  .fields { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  input[type="email"], .pick > button { min-block-size: 48px; }
  .go { inline-size: 100%; min-inline-size: 0; margin-block-start: 12px; min-block-size: 58px; }
  .more h2 { font-size: 1.2rem; } /* the launch box heading takes two lines */
  /* the text runs the full width, over the lit roofs, so the wash stays strong all the way across (keeps the note and lead above 4.5:1) */
  [data-theme="dark"] .wash { background: linear-gradient(90deg, rgba(27, 17, 13, .88) 0%, rgba(27, 17, 13, .74) 100%), linear-gradient(180deg, rgba(27, 17, 13, .35) 0%, transparent 22%, transparent 66%, #1B110D 100%); }
  [data-theme="light"] .wash { background: linear-gradient(90deg, rgba(255, 244, 223, .94) 0%, rgba(255, 240, 214, .84) 100%), linear-gradient(180deg, rgba(255, 244, 223, .5) 0%, transparent 22%, transparent 66%, #FFF4DF 100%); }
  .sunglow { inset-inline: -12px; } /* the page edge is 16 px from the switch, so the sun-glow stays inside it (no sideways scroll) */
  /* the day/night toggle (both icons, 48 px) is never shrunk; the language button gives way: tighter padding, no arrow (on every
     phone width alike: with it, "Tiếng Việt" was cut short at 402 px), and its name ends in an ellipsis if it must, so logo,
     button and toggle always share one row */
  .bar-end { gap: 6px; margin-inline-start: 8px; }
  .pick.hdr > button { padding: 0 6px; gap: 6px; font-size: .82rem; }
  .pick.hdr > button svg:last-child { display: none; }
  /* the form's language list opens downward, under its box, and never grows past the screen (it scrolls inside); its arrow points down (UX re-checks 356 R3, S9) */
  .pick:not(.hdr) ul { inset-block-end: auto; inset-block-start: calc(100% + 6px); max-block-size: min(60svh, 340px); overflow-y: auto; }
  .pick:not(.hdr) > button svg { transform: rotate(180deg); }
}
@media (max-width: 399px) {
  .wrap { inline-size: calc(100% - 24px); }
  /* the page edge is 12 px here: the glow reaches 7 px past the switch, plus 3 px while it breathes (scale 1.05), so it stays
     inside the window (a wider glow let the page be dragged 1 to 2 px sideways during the hint, UX re-check 362) */
  .sunglow { inset-inline: -7px; }
  .bar-end { margin-inline-start: 6px; }
  .pick.hdr > button { padding: 0 5px; gap: 5px; }
  .pick.hdr > button svg { inline-size: 16px; block-size: 16px; }
}
/* small phones (360 and 375 px): the headline is a touch smaller so it takes 3 lines, not 4 (UX gate 356, 16) */
@media (max-width: 379px) { .hero h1 { font-size: 1.85rem; } }

/* ---------- 11. Without JavaScript (or if the page's script never arrives): nothing on the page pretends to work. The form's
   boxes, its button and the header buttons are not shown; one plain line says why and gives the address to write to; the
   name stands in for the drawn logo. wl.js marks <html class="js"> before the page is drawn. ---------- */
.nojs { margin: 0; max-inline-size: 560px; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel); font-size: .95rem; }
.nojs a, .privacy a { color: inherit; }
.js .nojs { display: none; }
html:not(.js) .fields, html:not(.js) .go, html:not(.js) .bar-end { display: none; }
html:not(.js) .wl-brand .vh { position: static; inline-size: auto; block-size: auto; overflow: visible; clip-path: none; font: 600 1.62rem/1 var(--display); letter-spacing: -0.012em; text-transform: lowercase; }

/* ---------- 12. Print: the words in plain ink on paper, no photo, no controls ---------- */
@media print {
  .scene, body::before, .bar-end, .theme-hint { display: none; }
  :root, [data-theme] { color-scheme: light; --bg: #fff; --ink: #000; --ink-muted: #222; --panel: transparent; --glass: transparent; --surface: #fff; --line: #999; --line-strong: #666; --glass-line: #999; }
  .hero { min-block-size: 0; padding-block: 8px 24px; }
  .card, .box, .done { box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
