/* StayMaster guest check-in: the web layout (4 Dec 2026, owner ask "different screens for web and mobile").
   Loaded only from 768px (the media query is on its <link>). Under 768px checkin.css alone is the page, unchanged.
   app.js sets body[data-layout] on every screen (js/layout.js):
     rail     signed in: full-width header, the screen on the left, the stay card on the right (Figma Web hub / Stay page)
     auth     before the phone code and the stop screens: photo panel left, form right (Figma web login, image 18/19)
     landing  "Find my stay" without a link: a photo band with the form on a card over it (Figma home page hero)
     page     My trips with no booking open: one wide column, cards three across (Figma User>booking)
   Tokens and the type scale are checkin.css's; no font size here is a literal. No inline styles (CSP). */
:root { --head: 64px; --wrap: 1240px; --aside: 340px; --gap: 32px; --edge: 32px; --r-l: 16px; }

/* ---------------------------------------------------------------- every web width */
body[data-layout] { background: var(--ground); min-height: 100dvh; }
body[data-layout] #app { --gut: 0px; max-width: none; background: none; box-shadow: none; }
[data-layout] .screen { flex: none; padding: 28px 0 28px; }
[data-layout] .screen.flush { padding-top: 0; }
[data-layout] .screen.nobar { flex: 1; padding-bottom: 56px; }
[data-layout] .top { padding: 14px 0 12px; }
/* The action bar sits under the screen and stays in view while the form scrolls (the "sticky summary" of the web frames). */
[data-layout] .bar {
  position: sticky; left: auto; right: auto; bottom: 0; z-index: 20; margin-top: auto;
  background: var(--ground); border-top: 1px solid var(--line);
  padding: 14px 0 calc(env(safe-area-inset-bottom, 0px) + 16px);
}
[data-layout] .bar-in { max-width: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
[data-layout] .bar-in > .btn { width: auto; min-width: 220px; }
[data-layout] .bar-in > :not(.btn) { flex: 1 1 100%; }
[data-layout] .toast, [data-layout].has-help .toast { bottom: 104px; }
[data-layout] .help-pill { right: 24px; left: auto; bottom: 104px; }

/* Forms: two fields a row (Figma "Pop-up form": First | Last, Email | Mobile, Gender | Date of birth). DOM order is
   the reading and tab order: row by row, left then right. Anything that is not a single field takes the full row. */
[data-layout] .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; align-items: start; }
[data-layout] .grid2 > * { grid-column: 1 / -1; margin-top: 0 !important; }
[data-layout] .grid2 > .f:not(.wide) { grid-column: auto; }
[data-layout] form.grid2, [data-layout] form:has(> .grid2) { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; }
[data-layout] form:has(> .grid2) > .grid2 + .grid2 { margin-top: 18px; }
[data-layout] .grid2 .group-h { margin-top: 8px; }

/* Dialogs: a centred card with the buttons side by side (Figma popups). */
[data-layout] dialog.dlg { width: min(560px, calc(100vw - 64px)); padding: 28px 28px 22px; border-radius: var(--r-l); }
[data-layout] .dlg-b { display: flex; flex-wrap: wrap; gap: 12px; }
[data-layout] .dlg-b > .btn { width: auto; min-width: 160px; }
[data-layout] dialog.dlg:has(.cx) { width: min(860px, calc(100vw - 64px)); }
[data-layout] .cx { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; margin-top: 18px; }
[data-layout] .cx-pic { display: block; min-height: 100%; border-radius: var(--r); overflow: hidden; background: var(--sand); }
[data-layout] .cx-pic img { width: 100%; height: 100%; object-fit: cover; }
[data-layout] .cx-f .f:first-child { margin-top: 0; }

/* The stay header (rail layout): logo, tagline, Check-in / My trips / Help, the guest's first name. */
/* Figma common chrome (5 Dec 2026): white bar, emblem + wordmark left, the menu right, a thin gold rule inset 40px. */
[data-layout="rail"] .d-head, [data-layout="hub"] .d-head { display: block; position: sticky; top: 0; z-index: 25; height: var(--head); background: var(--paper); }
.d-tag { font-size: var(--t-caption); color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line-strong); white-space: nowrap; }
.d-nav { display: flex; gap: 4px; margin-left: auto; }
.d-nav-a { min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-s); background: none; color: var(--ink-2); font-size: var(--t-small); font-weight: 500; cursor: pointer; }
.d-nav-a.on { color: var(--teal-deep); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .d-nav-a:hover { background: var(--teal-wash); } }

/* ---------------------------------------------------------------- rail layout, tablet (768 to 1023): one wider column */
body[data-layout="rail"] #app { max-width: 720px; margin: 0 auto; padding: 0 var(--edge); min-height: calc(100dvh - var(--head)); }
[data-layout="rail"] .top { top: var(--head); }
[data-layout="rail"] .top-mark { visibility: hidden; }
[data-layout="rail"] .hub .hero { margin-top: 24px; height: 300px; max-height: none; border-radius: var(--r-l); }
[data-layout="rail"] .hub .hero::after { display: none; }
[data-layout="rail"] .hub .hero img.hero-mark { display: none; }

/* The stay card (rail). Its look is the same at every web width; it is placed from 1024px. */
.d-rail { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); }
.d-hero { overflow: hidden; border-radius: calc(var(--r-l) - 1px) calc(var(--r-l) - 1px) 0 0; }
.d-hero > img, .d-hero > svg { width: 100%; height: 196px; object-fit: cover; display: block; background: var(--sand); }
.d-hero-t { display: grid; gap: 2px; padding: 14px 18px 12px; color: var(--ink); border-bottom: 1px solid var(--line); }
.d-hero-t b { font: 600 var(--t-title)/1.2 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
.d-hero-t span { font-size: var(--t-small); color: var(--muted); }
.d-ref { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: var(--t-small); color: var(--muted); }
.d-ref b { color: var(--ink); font-size: var(--t-small); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: right; }
.d-stay { padding: 6px 18px 4px; border-bottom: 1px solid var(--line); }
.d-facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 8px 0; }
.d-facts dt { display: flex; align-items: center; gap: 6px; font-size: var(--t-caption); color: var(--muted); }
.d-facts dt .ic { color: var(--teal-deep); }
.d-facts dd { margin: 2px 0 0; font-size: var(--t-small); font-weight: 600; color: var(--ink); font-variant-numeric: lining-nums; }
.d-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.d-h { padding: 16px 18px 0; font-size: var(--t-body); }
.d-steps { list-style: none; margin: 0; padding: 8px 18px 14px; }
.d-steps li { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.d-steps .step-n { width: 26px; height: 26px; font-size: var(--t-caption); }
.d-steps .done .step-n { background: var(--teal); border-color: var(--teal); color: #fff; }
.d-steps .current .step-n { border-color: var(--teal); color: var(--teal-deep); }
.d-step-t { flex: 1; min-width: 0; font-size: var(--t-small); color: var(--ink-2); }
.d-steps .current .d-step-t { color: var(--ink); font-weight: 600; }
.d-steps small { font-size: var(--t-caption); color: var(--muted); white-space: nowrap; }
.d-steps .current small { color: var(--teal-deep); font-weight: 600; }
.d-mgr { border-top: 1px solid var(--line); padding: 14px 4px 6px; }
.d-k { padding: 0 14px; font: 500 var(--t-small)/1.3 var(--font-sans); color: var(--ink-2); }
.d-mgr .mgr-h { padding-top: 10px; }
.d-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 4px; }
.d-acts .btn { flex: 1 1 auto; }
.d-mgr > .txt-btn { margin-left: 14px; }
.d-foot { display: flex; gap: 8px; margin: 0; padding: 12px 18px 16px; border-top: 1px solid var(--line); font-size: var(--t-caption); color: var(--muted); }
.d-foot .ic { flex: none; margin-top: 3px; }

/* ---------------------------------------------------------------- rail layout, computer (1024 and wider) */
@media (min-width: 1024px) {
  body[data-layout="rail"] {
    display: grid; align-items: start;
    grid-template-columns: minmax(var(--edge), 1fr) minmax(0, calc(var(--wrap) - 2 * var(--edge) - var(--aside) - var(--gap))) calc(var(--aside) + var(--gap)) minmax(var(--edge), 1fr);
    grid-template-rows: auto 1fr;
  }
  [data-layout="rail"] .d-head { grid-column: 1 / -1; grid-row: 1; }
  body[data-layout="rail"] #app { grid-column: 2; grid-row: 2; width: 100%; max-width: none; margin: 0; padding: 0; }
  [data-layout="rail"] .d-rail {
    display: block; grid-column: 3; grid-row: 2; align-self: start; position: sticky; top: calc(var(--head) + 24px);
    margin: 24px 0 32px var(--gap); max-height: calc(100dvh - var(--head) - 48px); overflow-y: auto; overscroll-behavior: contain;
  }
  /* The rail carries the photo, the stay and the contacts, so the screen does not repeat them. */
  [data-layout="rail"] .hub .hero { display: none; }
  [data-layout="rail"] .hub .key { margin-top: 28px !important; }
}

/* ---------------------------------------------------------------- the hub, two by two (1280 and wider) */
@media (min-width: 1280px) {
  :root { --aside: 380px; }
  [data-layout="rail"] .hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; align-items: start; }
  [data-layout="rail"] .hub > * { grid-column: 1 / -1; }
  [data-layout="rail"] .hub > .blk.half { grid-column: auto; margin-top: 28px; }
  [data-layout="rail"] .hub > .blk > :first-child { margin-top: 0 !important; }
  [data-layout="rail"] .hub .arr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; margin-left: 0 !important; margin-right: 0 !important; padding: 2px 0 0; }
  [data-layout="rail"] .hub .arr-c { width: auto; min-width: 0; }
}

/* ---------------------------------------------------------------- auth: photo left, form right */
body[data-layout="auth"] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100dvh; }
[data-layout="auth"] .d-art, [data-layout="landing"] .d-art { display: block; position: relative; overflow: hidden; background: var(--teal-deep); }
[data-layout="auth"] .d-art { grid-column: 1; grid-row: 1; position: sticky; top: 0; height: 100dvh; }
.d-art-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.42; }
.d-art-mark { position: absolute; left: 40px; top: 36px; height: 24px; width: auto; }
.d-art-t { position: absolute; left: 40px; right: 40px; bottom: 48px; margin: 0; max-width: 15ch; color: #fff; font: 600 var(--t-display)/1.2 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
body[data-layout="auth"] #app { grid-column: 2; grid-row: 1; width: 100%; max-width: 520px; justify-self: center; padding: 0 var(--edge); min-height: 100dvh; justify-content: center; }
[data-layout="auth"] .screen .hero, [data-layout="landing"] .screen .hero { display: none; }
[data-layout="auth"] .screen.flush { padding-top: 48px; }
[data-layout="auth"] .bar, [data-layout="landing"] .bar { position: static; margin-top: 0; border-top: 0; background: none; padding: 8px 0 48px; }
[data-layout="auth"] .bar-in > .btn { width: 100%; }
[data-layout="auth"] .stop { padding: 48px 0; }
[data-layout="auth"] .top { background: var(--ground); }
@media (min-width: 1024px) {
  body[data-layout="auth"] { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .d-art-t { left: 56px; bottom: 64px; }
  .d-art-mark { left: 56px; top: 44px; }
}

/* ---------------------------------------------------------------- landing: photo band, the form on a card over it */
[data-layout="landing"] .d-art { height: min(58vh, 540px); min-height: 360px; }
[data-layout="landing"] .d-art-t { top: 96px; bottom: auto; left: max(var(--edge), calc(50vw - var(--wrap) / 2 + var(--edge))); }
[data-layout="landing"] .d-art-mark { left: max(var(--edge), calc(50vw - var(--wrap) / 2 + var(--edge))); }
body[data-layout="landing"] #app {
  position: relative; z-index: 2; width: calc(100% - 2 * var(--edge)); max-width: 720px; min-height: 0;
  margin: -180px auto 56px; padding: 0 40px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l);
}
[data-layout="landing"] .screen.flush { padding-top: 36px; }
[data-layout="landing"] .find-s .phone.wide { grid-template-columns: minmax(200px, 38%) 1fr; }
[data-layout="landing"] .bar-in > .btn { min-width: 240px; }
.cx-slot:empty { display: none; }

/* ---------------------------------------------------------------- page: My trips, cards across */
body[data-layout="page"] #app { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--edge); }
[data-layout] .trips-s .tabs { max-width: 520px; }
[data-layout] .trips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
[data-layout] .trip { display: flex; flex-direction: column; }
[data-layout] .trip-pic { aspect-ratio: 16 / 10; min-height: 0; }
[data-layout] .trip-b { flex: 1; display: flex; flex-direction: column; }
[data-layout] .trip-foot { margin-top: auto; padding-top: 14px; }
@media (min-width: 1024px) { [data-layout="page"] .trips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- the home (Figma Frame 1686561501: about, amenities) */
[data-layout] .about .gal-main { border-radius: var(--r-l); aspect-ratio: 16 / 9; }
[data-layout] .about .gal-ts { padding-left: 0; padding-right: 0; }
[data-layout] .amen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[data-layout] .fchips { margin-left: 0 !important; margin-right: 0 !important; padding-left: 0; padding-right: 0; }

@media (prefers-reduced-motion: reduce) { [data-layout] .bar { transition: none; } }

/* ---------------------------------------------------------------- the landing hub (5 Dec 2026, owner rule 9)
   Figma Precheck-in>booker/guest at 1512: a ~1210px container, two equal cards above the fold (Pre Check-In left,
   the property right), then full-width sections: quick facts, services on a teal band, places nearby, the guidebook. */
body[data-layout="hub"] { background: var(--paper); }
body[data-layout="hub"] #app { max-width: none; width: 100%; padding: 0; min-height: calc(100dvh - var(--head)); }
[data-layout="hub"] .d-rail, [data-layout="hub"] .bar, [data-layout="hub"] .lh-phead { display: none; }
[data-layout="hub"] .screen.lhub { padding: 0; }
[data-layout="hub"] .lh-wrap { max-width: calc(1210px + 2 * var(--edge)); margin: 0 auto; padding: 0 var(--edge); }
[data-layout="hub"] .lh-top { padding-top: 32px; }
/* the right column: the stay and the location read as one card (Figma) */
[data-layout="hub"] .lh-side { display: block; background: var(--paper); border: 1px solid var(--card-line); border-radius: var(--r-l); overflow: hidden; }
[data-layout="hub"] .lh-side .lh-card { border: 0; border-radius: 0; }
[data-layout="hub"] .lh-prop-info .lh-prop-b { padding-top: 4px; }
[data-layout="hub"] .lh-ph { aspect-ratio: 16 / 8; }
[data-layout="hub"] .d-head-in { max-width: calc(1210px + 2 * var(--edge)); }
[data-layout="hub"] .lh-card { border-radius: var(--r-l); }
[data-layout="hub"] .lh-pre { padding: 24px; }
[data-layout="hub"] .lh-go-in { display: block; }
[data-layout="hub"] .lh-go-in .btn { width: 100%; }
[data-layout="hub"] .lh-prop-b { padding: 20px 24px; }
[data-layout="hub"] .lh-host { margin: 0 24px 24px !important; }
[data-layout="hub"] .lh-dn-fig { width: 168px; height: 168px; }
[data-layout="hub"] .lh-sec { padding-top: 56px; }
[data-layout="hub"] .lh-sec-t { font-size: var(--t-display); }
[data-layout="hub"] .lh-sec-h { margin-bottom: 20px; }
[data-layout="hub"] .lh-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
[data-layout="hub"] .lh-f.k-rules { grid-column: 1 / -1; }
[data-layout="hub"] .lh-band { margin: 56px 0 0 !important; padding: 56px 0; }
[data-layout="hub"] .lh-svc { padding: 16px; }
[data-layout="hub"] .lh-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[data-layout="hub"] .lh-pls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
[data-layout="hub"] .lh-pl { grid-template-columns: 1fr; padding: 0; overflow: hidden; }
[data-layout="hub"] .lh-pl-ph { aspect-ratio: 16 / 9; border-radius: 0; }
[data-layout="hub"] .lh-pl-b { padding: 4px 16px 16px; gap: 6px; }
[data-layout="hub"] .lh-pl-b .lh-dir { margin-top: auto; }
[data-layout="hub"] .lh-pl { display: flex; flex-direction: column; }
[data-layout="hub"] .lh-pl-b { flex: 1; display: flex; flex-direction: column; }
[data-layout="hub"] .lh-gb { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
[data-layout="hub"] .lh-more-g { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: start; }
[data-layout="hub"] .lh-mine { padding-bottom: 8px; }
[data-layout="hub"] .help-pill { bottom: 24px; right: 24px; }
[data-layout="hub"] .toast { bottom: 88px; }

/* the teal footer, full-bleed on the hub; a rounded block inside the rail's column elsewhere */
[data-layout] .sfoot { margin: 48px 0 0 !important; padding: 40px 32px 24px; border-radius: var(--r-l); }
[data-layout] .screen > .sfoot:last-child { margin-bottom: 0 !important; }
[data-layout="hub"] .sfoot { border-radius: 0; margin-top: 72px !important; padding: 56px 0 28px; }
[data-layout="hub"] .sf-in { max-width: calc(1210px + 2 * var(--edge)); margin: 0 auto; padding: 0 var(--edge); }
[data-layout] .sf-top { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
[data-layout] .sf-tag { font-size: var(--t-dialog); }

@media (min-width: 1024px) {
  [data-layout="hub"] .lh-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
  [data-layout="hub"] .lh-facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  [data-layout="hub"] .lh-f { grid-column: span 2; }
  [data-layout="hub"] .lh-f.k-check_in, [data-layout="hub"] .lh-f.k-check_out { grid-column: span 1; flex-direction: column; }
  [data-layout="hub"] .lh-f.k-rules .lh-f-l { display: flex; flex-wrap: wrap; gap: 4px 28px; }
  [data-layout="hub"] .lh-f.k-rules .lh-f-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
  [data-layout="hub"] .lh-f.k-rules .lh-f-k { flex: 1 0 100%; }
  [data-layout="hub"] .lh-f.k-rules .lh-f-l, [data-layout="hub"] .lh-f.k-rules .lh-f-a { margin-top: 0; }
  [data-layout="hub"] .lh-band-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
  [data-layout="hub"] .lh-svc { margin-top: 0; }
  [data-layout="hub"] .lh-pls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  [data-layout="hub"] .lh-gb { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ================================================================ Figma fidelity, verify fixes (5 Dec 2026) */
/* the header is 64px on the web; the rule under it is gold and lined up with the content (checkin.css .d-head-in) */
[data-layout="hub"] .d-head-in { max-width: calc(1210px + 2 * var(--edge)); }

/* the hub: the services strip inside the property card, under the host chip (Figma) */
[data-layout="hub"] .lh-svm { display: block; padding: 0 24px 24px; }
[data-layout="hub"] .lh-svm > .lh-h { margin: 0 0 10px !important; }
[data-layout="hub"] .lh-svm .lh-tab { min-height: 52px; padding: 6px 2px; }
[data-layout="hub"] .lh-svm .lh-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
[data-layout="hub"] .lh-svm .lh-chip { min-height: 60px; padding: 10px 12px; }
[data-layout="hub"] .lh-host { margin: 0 24px 20px !important; }
/* split stay: each home's times, pin and manager, named (two across) */
@media (min-width: 1024px) {
  [data-layout="hub"] .lh-facts.per-home { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  [data-layout="hub"] .lh-facts.per-home .lh-f { grid-column: span 4; }
  [data-layout="hub"] .lh-facts.per-home .lh-f.k-check_in, [data-layout="hub"] .lh-facts.per-home .lh-f.k-check_out { grid-column: span 3; }
  [data-layout="hub"] .lh-facts.per-home .lh-f.k-rules { grid-column: 1 / -1; }
}
/* one column (768 to 1023): the phone's order (Figma Android Compact-1): the stay summary, then Pre Check-In
   straight after it, then the location, host and services */
@media (max-width: 1023px) {
  [data-layout="hub"] .lh-top { display: flex; flex-direction: column; gap: 24px; }
  [data-layout="hub"] .lh-side { display: contents; }
  [data-layout="hub"] .lh-side .lh-card { border: 1px solid var(--card-line); border-radius: var(--r-l); }
  [data-layout="hub"] .lh-prop-top { order: -1; }
  [data-layout="hub"] .lh-prop-info { order: 1; padding-top: 20px; }
}
[data-layout="hub"] .lh-mine .sec-h h2 { font-size: var(--t-display); }
[data-layout="hub"] .lh-more-g { gap: 48px; }

/* the teal footer, full width after the screen and the stay card on every signed-in web screen (app.js moves it
   out of the screen, after the action bar) */
body[data-layout] > .sfoot { margin: 64px 0 0 !important; padding: 56px 0 28px; border-radius: 0; }
body[data-layout] > .sfoot .sf-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--edge); }
/* My trips (Figma User>booking): white page, the wordmark row over a gold rule, cards three across, the teal footer */
body[data-layout="page"] { background: var(--paper); }
[data-layout="page"] .top { border-bottom: 1px solid var(--gold); }
body[data-layout="page"] #app { min-height: calc(100dvh - 420px); }
[data-layout="page"] .top { background: var(--paper); }
@media (min-width: 1024px) {
  body[data-layout="rail"] > .sfoot { grid-column: 1 / -1; grid-row: 3; }
  [data-layout="rail"] .d-rail { margin-bottom: 0; }
}
[data-layout] .sf-top { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }

/* step screens (rail, 1024 and wider): Figma "Pop-up form" / "Declaration": a white page, the step in a white card
   (1px line, 16px corners) with its header row (back + step), the stay card beside it */
@media (min-width: 1024px) {
  body[data-layout="rail"] { background: var(--paper); }
  body[data-layout="rail"] #app { margin-top: 24px; min-height: 0; padding: 0 40px; background: var(--paper); border: 1px solid var(--card-line); border-radius: var(--r-l); }
  [data-layout="rail"] .top { background: var(--paper); border-bottom: 1px solid var(--line); margin: 0 -40px; padding: 16px 40px 12px; border-radius: var(--r-l) var(--r-l) 0 0; }
  [data-layout="rail"] .bar { background: var(--paper); margin: 0 -40px; padding: 16px 40px 20px; border-radius: 0 0 var(--r-l) var(--r-l); }
  [data-layout="rail"] form.grid2, [data-layout="rail"] form:has(> .grid2) { border: 0; padding: 0; background: none; }
}

/* login and code (1024 and wider): Figma "image-login-signup" / "verify-otp": one full-bleed photo under a teal
   tint, the line on the left, the form on the photo: clear pill fields with white text, a white pill button */
@media (min-width: 1024px) {
  body[data-layout="auth"]:has(#app .phone, #app .otp) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--teal-deep); }
  body[data-layout="auth"]:has(#app .phone, #app .otp) .d-art { grid-column: 1 / -1; }
  [data-layout="auth"]:has(#app .phone, #app .otp) .d-art-pic { opacity: 0.5; }
  [data-layout="auth"]:has(#app .phone, #app .otp) .d-art::after { content: ''; position: absolute; inset: 0; background: rgba(0, 80, 79, 0.45); }
  [data-layout="auth"]:has(#app .phone, #app .otp) .d-art-t { z-index: 1; top: 50%; bottom: auto; transform: translateY(-50%); max-width: 18ch; font-style: italic; font-weight: 400; }
  [data-layout="auth"]:has(#app .phone, #app .otp) .d-art-t::before { content: '\201C'; display: block; font-family: var(--serif); font-size: calc(var(--t-display) * 3); line-height: 0.6; font-weight: 700; font-style: normal; height: 44px; margin-bottom: 8px; }
  [data-layout="auth"]:has(#app .phone, #app .otp) .d-art-mark { z-index: 1; }
  body[data-layout="auth"]:has(#app .phone, #app .otp) #app { position: relative; z-index: 2; grid-column: 2; grid-row: 1; color: var(--paper); }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app :is(h1, p, label, legend, .lab, .small, .hint, .f > label) { color: var(--paper); }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app .top { background: none; }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app .top-mark { visibility: hidden; }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app :is(.top-back, .icon-btn) { color: var(--paper); }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app :is(.in, .sel) { background-color: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.72); border-radius: 999px; color: var(--paper); padding-left: 20px; }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app .sel { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app .sel option { color: var(--ink); background: var(--paper); }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app .in::placeholder { color: rgba(255, 255, 255, 0.7); }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app :is(.in, .sel):focus { outline: 2px solid var(--paper); border-color: var(--paper); }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app .btn.pri { background: var(--paper); color: var(--teal-deep); }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app :is(.link, .txt-btn) { color: var(--paper); }
  /* an error on the photo reads as an error: a solid light chip with red text (final review 5 Dec 2026) */
  [data-layout="auth"]:has(#app .phone, #app .otp) #app .err:not([hidden]) { display: flex; width: fit-content; padding: 6px 12px; border-radius: var(--r-s); background: var(--paper); color: var(--bad); }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app .err .ic { color: var(--bad); }
  [data-layout="auth"]:has(#app .phone, #app .otp) #app .in::placeholder { color: rgba(255, 255, 255, 0.86); }
}
/* final review (5 Dec 2026): Let's connect back in the middle on a computer; the main doors inline from 1280px */
[data-layout] dialog.dlg:has(.cx) { margin: auto; border-radius: var(--r); }
@media (min-width: 1280px) {
  .sh-inline { display: flex; align-items: center; gap: 4px; }
  .sh-in { min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: 500 var(--t-small)/1 var(--sans); cursor: pointer; }
  .sh-in.on { color: var(--teal-deep); background: var(--teal-wash); }
}
@media (min-width: 1280px) and (hover: hover) and (pointer: fine) { .sh-in:hover { color: var(--ink); background: var(--teal-wash); } }
[data-layout="hub"] .lh-notmine { margin: -8px 24px 20px !important; }

/* scan screens: each document's frame sits beside its own label and buttons, as one bordered row */
[data-layout] .cap.guide:not(.has) { display: grid; grid-template-columns: 180px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 24px; align-items: start; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-l); }
[data-layout] .cap.guide:not(.has)::before { grid-column: 1; grid-row: 1 / 3; width: 100%; margin: 0; }
[data-layout] .cap.guide:not(.has) > * { grid-column: 2; }
[data-layout] .cap.guide:not(.has) > .cap-h { margin: 2px 0 12px; }
[data-layout] .cap.guide + .cap.guide { margin-top: 16px; }
/* the photo panel already carries the wordmark: no second one on the form side (stop screens, login, code) */
[data-layout="auth"] #app .top-mark { visibility: hidden; }

/* Done screen (final review, 5 Dec 2026): the rail already carries the stay and the contacts from 1024px. */
@media (min-width: 1024px) { [data-layout="rail"] .done-dup { display: none; } }
/* Add-ons: two cards a row on a computer (final review, 5 Dec 2026). */
@media (min-width: 1024px) { [data-layout] .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
