/* Fonts are served from here (static/fonts, SIL Open Font License 1.1), so browsers don't contact Google.
   Onest covers Latin and Cyrillic, so Russian gets the same face as every other language. */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/onest-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/onest-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/onest-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/onest-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  color-scheme: light;  /* no dark theme yet: say so, so native controls and scrollbars match the page */
  /* Fern: the shell, primary actions, selection. Green means AerialSpace and no apparatus. */
  --brand-900: #1d4733; --brand-800: #2b6448; --brand-700: #2a6046; --brand-600: #2e6a4e; --brand-100: #e2efe6; --brand-50: #f1f7f2;
  --accent: #e2efe6; --accent-strong: #cfe3d5; --accent-ink: #17241f;
  /* The dye legend (app.js DYES): one colour per apparatus family, meaning that apparatus and nothing else.
     Never on buttons, never as decoration; text never sits on a dye. -on-ink variants are for the fern header. */
  --dye-pole: #2f5d8a; --dye-silks: #b8326b; --dye-hoop: #c47a10; --dye-trapeze: #13808f; --dye-straps: #6a3fa0; --dye-rope: #8a5a2b; --dye-other: #625e78;
  --dye-pole-on-ink: #9cc3ea; --dye-silks-on-ink: #f59cc0; --dye-hoop-on-ink: #f0b65a; --dye-trapeze-on-ink: #6fd3df; --dye-straps-on-ink: #c8adf0;
  /* Neutrals: a pale leaf-grey ground and white cards. */
  --bg: #f4f6f2; --surface: #ffffff; --surface-2: #edf1eb; --line: #dde4da; --line-strong: #c6d0c4;
  --text: #17241f; --muted: #536059;  /* ≥ 5:1 on every surface and tinted panel */ --subtle: #636e68;  /* placeholders: ≥ 4.5:1 on white and surface-2 */
  /* Status */
  --ok: #1f7a4d; --ok-bg: #e3f4ea; --warn: #8a5a00; --warn-bg: #fdf0d3; --bad: #a3341f; --bad-bg: #fbe6e1; --info: #2f5f9e; --info-bg: #e5eefb;
  --focus: #2f6fd6;
  /* Type: one face; hierarchy from size and weight. */
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --display: var(--font);
  /* In rem, so the reader's own text size (browser or phone setting) is honoured: 16px is 1rem. */
  --fs-xs: 0.75rem; --fs-sm: 0.8125rem; --fs-md: 0.9375rem; --fs-lg: 1.0625rem; --fs-xl: 1.3125rem; --fs-2xl: 1.75rem; --fs-3xl: clamp(1.75rem, 3.6vw, 2.75rem);
  /* Space & shape: an 8 px cell. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgb(23 36 31 / .06), 0 1px 1px rgb(23 36 31 / .04);
  --shadow-2: 0 6px 18px rgb(23 36 31 / .08), 0 2px 4px rgb(23 36 31 / .05);
  --shadow-3: 0 18px 50px rgb(23 36 31 / .2);
  --header-h: 64px; --tabbar-h: 0px;
  --container: 1240px;
}
.dye-pole { --dye: var(--dye-pole); } .dye-silks { --dye: var(--dye-silks); } .dye-hoop { --dye: var(--dye-hoop); } .dye-trapeze { --dye: var(--dye-trapeze); }
.dye-straps { --dye: var(--dye-straps); } .dye-rope { --dye: var(--dye-rope); } .dye-other { --dye: var(--dye-other); }

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
html { scrollbar-color: var(--line-strong) var(--bg); accent-color: var(--brand-700); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-md)/1.5 var(--font); -webkit-font-smoothing: antialiased; padding-bottom: var(--tabbar-h); caret-color: var(--brand-600); }
::selection { background: #cfe3d5; color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: var(--brand-600); text-underline-offset: .18em; }
h1, h2, h3, h4, p { margin: 0 0 var(--s3); }
h1 { font: 750 var(--fs-3xl)/1.08 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
h2 { font: 700 var(--fs-xl)/1.25 var(--display); letter-spacing: -0.02em; }
h3 { font: 700 var(--fs-lg)/1.3 var(--display); letter-spacing: -0.01em; }
h4 { font: 700 var(--fs-md)/1.3 var(--display); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus, h1:focus { outline: none; }
.hidden { display: none !important; }
.muted, .meta { color: var(--muted); }
.small { font-size: var(--fs-xs); }
.sub { font-size: var(--fs-lg); color: var(--muted); }
.context { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); margin-bottom: var(--s2); }
.receipt-brand { font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--s2); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--brand-800); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700; }
.skip-link:focus { top: 12px; }
main { max-width: var(--container); margin: 0 auto; padding: var(--s6) max(4vw, 16px) 96px; }

/* ==========================================================================
   Header and navigation
   ========================================================================== */
header { position: sticky; top: 0; z-index: 50; height: var(--header-h); display: flex; align-items: center; gap: var(--s4); padding: 0 max(4vw, 16px);
  background: var(--brand-800); color: #fff; }
.brand { display: inline-flex; align-items: center; font: 800 1.3125rem var(--display); letter-spacing: -0.04em; color: #fff; text-decoration: none; white-space: nowrap; margin-right: auto; }
/* The dye legend as the mark: five apparatus families side by side. Four of the bars are box-shadows painted 28px to
   the right of the 5px box, so the 28px right margin is the room they are drawn in: never make it smaller. */
.brand::after { content: ""; flex: none; width: 5px; height: 16px; margin: 0 28px 0 10px; border-radius: 2px; background: var(--dye-pole-on-ink);
  box-shadow: 7px 0 var(--dye-silks-on-ink), 14px 0 var(--dye-hoop-on-ink), 21px 0 var(--dye-trapeze-on-ink), 28px 0 var(--dye-straps-on-ink); }
header nav { display: flex; gap: var(--s1); }
.nav { position: relative; border: 0; background: transparent; padding: 9px 14px; border-radius: var(--r-md); font-weight: 600; color: #d5e6da; white-space: nowrap; }
.nav:hover { background: rgb(255 255 255 / .08); color: #fff; }
.nav.active { background: rgb(255 255 255 / .14); color: #fff; }
.nav-icon { display: none; }
.header-tools { display: flex; align-items: center; gap: var(--s2); margin-left: var(--s2); }
.lang { margin: 0; }  /* not a form field: no gap below, same height as the bell and name */
.lang select { width: auto; min-width: 7.2em; height: 38px; min-height: 0; margin: 0; padding: 0 28px 0 12px; border-radius: var(--r-md); border: 1px solid rgb(255 255 255 / .24); background-color: transparent; color: #fff; font-weight: 600; font-size: var(--fs-sm);
  background-image: linear-gradient(45deg, transparent 50%, #d5e6da 50%), linear-gradient(135deg, #d5e6da 50%, transparent 50%); }
.lang select option { color: var(--text); background: var(--surface); }
.account { height: 38px; border: 1px solid rgb(255 255 255 / .24); background: transparent; color: #fff; border-radius: var(--r-md); padding: 0 16px; font-weight: 700; white-space: nowrap; max-width: 14em; overflow: hidden; text-overflow: ellipsis; }
.account:hover { border-color: rgb(255 255 255 / .6); }
.account-wrap { position: relative; }
.notify-wrap { position: relative; }
.notify-wrap[hidden] { display: none; }
.icon-btn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid rgb(255 255 255 / .24); background: transparent; color: #fff; border-radius: var(--r-md); }
.icon-btn:hover { border-color: rgb(255 255 255 / .6); }
.icon-btn .count { position: absolute; top: -4px; right: -4px; min-width: 1.125rem; height: 1.125rem; padding: 0 5px; border-radius: var(--r-pill); background: #fff; color: var(--brand-900); box-shadow: 0 0 0 2px var(--brand-800);  /* a count, not an alarm */
  font-size: 0.6875rem; font-weight: 700; line-height: 1.125rem; text-align: center; }
.icon-btn .count[hidden] { display: none; }
/* Tablet widths, before the nav moves to the bottom bar: the full desktop header (language names, a 14em account
   button) ran up to 94px past the edge signed in. Compact sizes, and the account name gives up width last. */
@media (max-width: 1100px) {
  header { gap: var(--s2); }
  .nav { padding: 9px 10px; }
  .lang select { width: 4.4em; min-width: 0; padding: 0 22px 0 10px; }  /* a code (EN), not the 7.2em of a name */
  .header-tools { min-width: 0; margin-left: 0; gap: 6px; }
  .account-wrap { min-width: 0; display: flex; }
  .account { min-width: 0; padding: 0 12px; }  /* as wide as the room left (up to 14em), then initials */
}
/* Where the name would be cut ("De…"), the button shows the initials instead, square like the bell (app.js fitAccount). */
.account.guest { flex: none; max-width: none; }
.account.initials { flex: none; width: 38px; max-width: none; padding: 0; text-align: center; font-size: 0; }  /* the name stays as text, unseen */
.account.initials::after { content: attr(data-initials); font-size: var(--fs-sm); letter-spacing: .02em; }
.notify-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow-y: auto;
  padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-3); }
.notify-panel h2 { font-size: var(--fs-lg); margin-bottom: var(--s2); }
.notify-panel .update { display: grid; gap: 2px; margin: 0; padding: var(--s2) 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.notify-panel .update.unread span { font-weight: 700; }
@media (max-width: 640px) { .notify-panel { position: fixed; left: 16px; right: 16px; top: calc(var(--header-h) + 4px); width: auto; } }
.notify-panel, .account-menu { color: var(--text); }  /* menus open from the ink header onto white */
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px; padding: var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-3); }
.account-menu p { margin: 4px 10px 8px; font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu a { display: block; padding: 10px; border-radius: var(--r-sm); font-weight: 600; color: inherit; text-decoration: none; }
.account-menu a:hover { background: var(--surface-2, var(--brand-50)); }
.account-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px; border-radius: var(--r-sm); font-weight: 600; }
.account-menu button:hover, .account-menu button:focus-visible { background: var(--surface-2); }

/* ==========================================================================
   Buttons, links, fields, chips, badges
   ========================================================================== */
.primary, .secondary, .ghost { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s5);
  border-radius: var(--r-md); font-weight: 700; line-height: 1.2; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.primary { background: var(--brand-800); color: #fff; border: 1px solid var(--brand-800); }
.primary:hover { background: var(--brand-700); }
.primary:active, .secondary:active { transform: translateY(1px); }
.primary:disabled, .secondary:disabled { opacity: .55; cursor: not-allowed; }
.secondary { background: var(--surface); color: var(--brand-800); border: 1px solid var(--line-strong); }
.secondary:hover { border-color: var(--brand-600); background: var(--brand-50); }
.danger.secondary { color: var(--bad); border-color: #e9b9ae; }
.danger.secondary:hover { background: var(--bad-bg); }
.primary.danger { background: var(--bad); border-color: var(--bad); }
.link.danger { color: var(--bad); }
.alternatives { margin: 8px 0; }
.resource-photos { display: flex; gap: 6px; margin: 6px 0 8px; overflow-x: auto; }
.resource-photos img { width: 96px; height: 72px; object-fit: cover; border-radius: var(--r-sm); display: block; }
.photo-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo-option { position: relative; display: block; }
.photo-option img { width: 100%; height: 72px; object-fit: cover; border-radius: var(--r-sm); display: block; }
.photo-option input { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; }
.photo-option input:checked + img { outline: 3px solid var(--brand-600); outline-offset: -3px; }
.alternatives .chips { margin: 4px 0 8px; }
.editor-delete { margin: var(--s4) 0 var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.editor-delete p { margin: 0 0 var(--s1); }
.link, .back { border: 0; background: none; padding: 0; color: var(--brand-600); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
button.link, button.back { min-height: 28px; }  /* text-style buttons still get a usable touch target (WCAG 2.5.8) */
.link:hover { color: var(--brand-800); }
.back { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--s4); color: var(--muted); }
.back:hover { color: var(--text); }

label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--text); margin-bottom: var(--s3); }
input, select, textarea { display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font-size: var(--fs-md); }
/* Fields show the same focus ring as everything else (a checkbox or radio once had only a faint purple halo). */
input:focus, select:focus, textarea:focus { border-color: var(--brand-600); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; margin: 0; accent-color: var(--brand-700); }
input[type=file] { padding: 8px; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea { min-height: 84px; resize: vertical; }
input::placeholder { color: var(--subtle); }
input.blank::-webkit-datetime-edit { color: var(--subtle); }
input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.icon { flex: none; vertical-align: -1px; }
.rating .icon { color: var(--text); }
.search-more { display: none; }
label small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
.check { display: flex; align-items: center; gap: var(--s2); font-weight: 500; min-height: 44px; }  /* the whole row is the target */
.check input[type=checkbox] { width: 20px; height: 20px; flex: none; }
.check input[aria-invalid="true"] { outline: 2px solid var(--bad); outline-offset: 2px; }
.check:has(+ .check) { margin-bottom: 0; }  /* stacked rows: each 44px row has its own room */
.field-label { font-weight: 600; font-size: var(--fs-sm); margin: 0 0 6px; }
.form-error { color: var(--bad); font-weight: 600; min-height: 1em; margin: var(--s2) 0; }
.booking-box .form-error:empty { display: none; }
.quote-what { margin: 0 0 var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.quote-what strong, .quote-what > span:first-of-type { display: block; }
.quote-what strong { font-size: var(--fs-lg); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.pair { display: flex; gap: 6px; }
.pair input { min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s2) 0; }
.chip { display: inline-flex !important; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; margin: 0 !important; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface);
  font-size: var(--fs-sm); font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--brand-600); }
.chip:has(input:checked), .chip[aria-pressed="true"] { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip[data-quick="apparatus"]::before, .fact.dyed::before, .chip.dyed::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--dye); }
.chip[aria-pressed="true"][data-quick="apparatus"]::before { box-shadow: 0 0 0 1.5px #fff; }
.chip[data-value="POLE"] { --dye: var(--dye-pole); } .chip[data-value="SILKS"] { --dye: var(--dye-silks); } .chip[data-value="HOOP"] { --dye: var(--dye-hoop); }
.chip[data-value="TRAPEZE"] { --dye: var(--dye-trapeze); } .chip[data-value="STRAPS"] { --dye: var(--dye-straps); } .chip[data-value="ROPE"] { --dye: var(--dye-rope); }
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.tag, .badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--r-sm); font-size: 0.6875rem; font-weight: 700; letter-spacing: .02em; background: var(--brand-100); color: var(--brand-700); }
.tag.unknown { background: var(--warn-bg); color: var(--warn); }
.badge.ok, .state-confirmed .tag, .state-completed .tag { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.off { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }  /* a state you can't act on (not yet bookable): outlined grey, never the green of good news */
.badge.now { background: var(--brand-800); color: #fff; }  /* a session under way: the one live thing on the page */
.badge.warn, .state-held .tag, .state-pending_host_approval .tag, .state-pending_payment .tag { background: var(--warn-bg); color: var(--warn); }
.state-cancelled_by_renter .tag, .state-cancelled_by_host .tag, .state-declined .tag, .state-expired .tag { background: var(--surface-2); color: var(--muted); }
.state-disputed .tag { background: var(--bad-bg); color: var(--bad); }
/* Fit swatches (app.js fitSwatches): the facts that decide whether a session works, each a white chip under its apparatus dye. */
.swatches { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s1); }
.sw { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.sw::before { content: ""; height: 8px; background: var(--dye); }
.sw-plain::before { background: var(--line-strong); }
/* A value never hides: it wraps (at the slash in Spin/Static) and the chips in a row keep one height. */
.sw b { padding: 6px 8px 0; font-size: var(--fs-sm); font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: break-word; hyphens: auto; }
.sw small { margin-top: auto; }
.sw b.unstated { color: var(--muted); font-weight: 500; }
.sw small { padding: 1px 8px 6px; font-size: var(--fs-sm); line-height: 1.2; color: var(--muted); font-variant-caps: all-small-caps; letter-spacing: .04em; overflow-wrap: break-word; hyphens: auto; }
.resource-list > li, .resource, .fit-row { container-type: inline-size; }
@container (max-width: 360px) { .swatches { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fact { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); font-weight: 600; }
.facts { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s6); box-shadow: var(--shadow-1); }
/* The studio's waiver at checkout: its own words in a named box; long text scrolls inside instead of pushing Confirm away */
.waiver { margin: var(--s3) 0 var(--s2); padding: var(--s3) var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); }
.waiver h3 { margin: 0; font-size: var(--fs-sm); }
.waiver > p { margin: 2px 0 var(--s2); }
.waiver-text { max-height: 12em; overflow-y: auto; overscroll-behavior: contain; white-space: pre-line; overflow-wrap: anywhere; }
.notice { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--r-md); padding: var(--s3) var(--s4); font-size: var(--fs-sm); color: var(--brand-700); }
.trust-note { font-size: var(--fs-sm); color: var(--muted); margin: var(--s3) 0; }
.trust-note strong { color: var(--ok); margin-right: 4px; }
.empty { grid-column: 1 / -1; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); padding: 48px 24px; border-radius: var(--r-lg); color: var(--muted); }
.stack { display: grid; gap: var(--s3); }

/* ==========================================================================
   Explore: hero, search, quick filters
   ========================================================================== */
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s6); margin: var(--s4) 0 var(--s5); }
.intro h1 { margin-bottom: var(--s2); max-width: 22ch; }
.intro .sub { margin: 0; }
.intro .sub-free { margin: var(--s2) 0 0; font-weight: 600; }  /* stays on a phone, where .sub folds away */
.search-panel { display: grid; grid-template-columns: 1.4fr 1fr 0.85fr 0.9fr minmax(16rem, 1.4fr) auto; gap: var(--s2); align-items: end; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s3); box-shadow: var(--shadow-1); }
.search-panel label { margin: 0; padding: 4px 6px; font-size: var(--fs-xs); color: var(--muted); }
.search-panel label > span { padding-left: 4px; }
.search-panel input, .search-panel select { margin-top: 4px; border-color: transparent; background-color: var(--surface-2); }
.search-panel input:focus, .search-panel select:focus { background-color: var(--surface); }
.search-panel .where { position: relative; }
.place-list { position: absolute; left: 6px; right: 6px; top: 100%; z-index: 40; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); max-height: min(320px, 45vh); overflow-y: auto; }
.place-list[hidden] { display: none; }
/* Country and timezone pickers (places-picker.js): the same list, under the field. */
.combo { position: relative; }
.combo .place-list { left: 0; right: 0; }
.place-list li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer;
  color: var(--text); font-size: var(--fs-md); }
.place-list li small { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.place-list li.none span { color: var(--muted); }
.place-list li:hover, .place-list li[aria-selected="true"] { background: var(--brand-50); }
.search-panel .primary { height: 48px; padding: 0 var(--s6); margin: 0 4px 4px; border-radius: var(--r-md); }
.quick-filters { display: flex; gap: var(--s2); overflow-x: auto; padding: var(--s3) 2px var(--s2); margin: 0 -2px; scrollbar-width: none; }
.quick-filters::-webkit-scrollbar { display: none; }
/* With room for two lines (tablets and up) every chip shows; on a phone the row scrolls, its edge fading out as a cue */
@media (min-width: 600px) { .quick-filters { flex-wrap: wrap; overflow-x: visible; } }
@media (max-width: 599px) { .quick-filters { mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); } }
.quick-filters .divider { flex: none; width: 1px; background: var(--line-strong); margin: 6px 2px; }
.filters { margin: 0 0 var(--s2); }
.filters summary { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; font-weight: 700; color: var(--brand-600); font-size: var(--fs-sm); padding: 6px 2px; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters[open] summary .icon { transform: rotate(45deg); }
.filters summary .icon { transition: transform .15s; }
.filter-grid { margin-top: var(--s2); padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4) var(--s5); }
.filter-grid label { margin: 0; }
.filter-group { display: grid; gap: var(--s2); align-content: start; margin: 0; padding: 0; border: 0; min-width: 0; }
.filter-group legend { padding: 0; margin-bottom: var(--s1); font: 800 var(--fs-lg)/1.3 var(--display); }
.filter-foot { grid-column: 1 / -1; display: flex; align-items: end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; padding-top: var(--s3); border-top: 1px solid var(--line); }
.filter-foot label { max-width: 14rem; }
/* "Not on the map" matters only while the map is showing. */
.results-layout:not(.map-open) .no-pin { display: none; }
.sort-note { grid-column: 1 / -1; margin: 0; }
.saved-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; font-size: var(--fs-sm); }
.saved-link[hidden] { display: none; }
.saved-link .icon, .badge.saved .icon { color: var(--brand-700); }
.filter-empty { display: grid; gap: var(--s3); justify-items: start; text-align: left; }
.filter-empty h3 { margin: 0; color: var(--text); }
.active-filters { grid-column: 1 / -1; }
.filter-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip-remove:hover { border-color: var(--brand-700); }
.slot-note { margin: 0 0 var(--s2); color: var(--text); font-weight: 600; }  /* above the slots: the day changed, or the time went */
.slot-note:empty { display: none; }
.filter-count { padding: 1px 8px; border-radius: 999px; background: var(--brand-100); color: var(--brand-900); font-size: var(--fs-xs); }
.section-title { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; margin: var(--s5) 0 var(--s4); }
.section-title h1, .section-title h2 { margin: 0; }
.results-tools { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; color: var(--muted); font-size: var(--fs-sm); }
.sort { display: flex; align-items: center; gap: var(--s2); margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.sort select { width: auto; min-height: 44px; margin: 0; border-radius: var(--r-md); font-weight: 600; font-size: var(--fs-sm); }
.suggest { text-align: center; margin: var(--s8) 0 0; }

/* ==========================================================================
   Results: space cards and map
   ========================================================================== */
.results-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 40%); gap: var(--s5); align-items: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: var(--s4); align-content: start; align-items: start; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow-1); transition: box-shadow .18s, transform .18s, border-color .18s; }
.card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.card.active { border-color: var(--brand-600); box-shadow: 0 0 0 2px var(--brand-600), var(--shadow-2); }
.card-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.card-body { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); flex: 1; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s2); }
.card h3 { margin: 0; font-size: var(--fs-lg); }
.card-open { color: inherit; text-decoration: none; cursor: pointer; }
.card-open::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.card-open:focus-visible { outline: none; }
.card:has(.card-open:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.card .meta { font-size: var(--fs-sm); margin: 0; }
.rating { white-space: nowrap; font-size: var(--fs-sm); font-weight: 700; }
.resource-list { list-style: none; margin: var(--s1) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.resource-list > li + li { padding-top: var(--s3); border-top: 1px solid var(--line); }
.resource-list > li.more { font-size: var(--fs-sm); }
.resource-line { display: flex; justify-content: space-between; gap: var(--s2); margin: 0; font-size: var(--fs-md); font-weight: 600; }
.resource-list .name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-list .price { flex: none; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.card-foot strong { font: 800 var(--fs-md) var(--display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-foot .next-free { font-size: var(--fs-xs); }
.card-foot small { font-weight: 500; color: var(--muted); }
.next-free { display: flex; align-items: center; font-size: var(--fs-sm); font-weight: 600; color: var(--ok); margin: 0; }
.next-free.none, .next-free.avail-none { color: var(--muted); font-weight: 500; }
.next-free.avail-soon, .next-free.avail-later { color: var(--text); }
/* How soon there is time, as a fixed size ramp (the same one as the map pins): today, this week, later, none. */
.free-dot { flex: none; display: inline-block; width: 12px; height: 12px; margin-right: var(--s2); border-radius: 50%; background: var(--ok); }
.avail-soon .free-dot { width: 9px; height: 9px; margin: 0 9px 0 1.5px; background: var(--ok); }
.avail-later .free-dot { width: 6px; height: 6px; margin: 0 11px 0 3px; background: var(--subtle); }
.avail-none .free-dot { width: 8px; height: 8px; margin: 0 10px 0 2px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--subtle); }
.skeleton { pointer-events: none; }
.skeleton .bar { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, #e0e7de 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
.skeleton .bar.wide { width: 70%; height: 16px; } .skeleton .bar.mid { width: 45%; } .skeleton .bar.full { width: 100%; height: 34px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skeleton .bar { animation: none; } .card, .card:hover { transition: none; transform: none; } }

.results-map { position: sticky; top: calc(var(--header-h) + 12px); }
.map-canvas { height: calc(100vh - var(--header-h) - 80px); min-height: 420px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface-2); z-index: 0; }
.small-map { height: 260px; min-height: 0; margin: var(--s3) 0; }
.picker-map { height: 260px; min-height: 0; }
.map-note { margin-top: var(--s2); }
.pin-nudge { margin: var(--s2) 0; }
.pin-nudge .set-location { min-height: 0; padding: 0; margin: 0; font-size: inherit; }
.map-fallback { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 120px; padding: 20px; text-align: center; color: var(--muted); }
.map-area { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 500; min-height: 38px; border-radius: var(--r-pill); box-shadow: var(--shadow-2); }
.map-toggle { display: none; }
.area-chip { min-height: 36px; }
.chip.area-chip.hidden { display: none !important; }
@media (min-width: 901px) {
  .results-layout.map-folded:not(.map-open), .results-layout.map-closed { grid-template-columns: minmax(0, 1fr); }
  .results-layout.map-folded:not(.map-open) .results-map, .results-layout.map-closed .results-map { display: none; }
  /* "Hide map" and "Show map" on a laptop too, so the list can have the full width. */
  .map-toggle { display: inline-flex; width: auto; min-height: 44px; margin: 0; padding: 0 var(--s3); border-radius: var(--r-md); }
}
/* A pin's popup on a phone: the space, its price and next free time, and a way to open it. */
.pin-preview { display: grid; gap: 2px; font: 400 var(--fs-sm)/1.4 var(--font); color: var(--text); }
.pin-preview + .pin-preview { margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--line); }
.pin-preview strong { font-size: var(--fs-md); }
.pin-preview span { color: var(--muted); }
.pin-preview .link { justify-self: start; min-height: 44px; padding: 0; }
.pin-wrap { background: none; border: 0; }
/* The marker box sits at the map point while its label is drawn centred on it, so the focus ring goes on the label. */
.pin-wrap:focus-visible { outline: none; }
.pin-wrap:focus-visible .pin { outline: 3px solid var(--focus); outline-offset: 2px; }
.pin { display: inline-block; transform: translate(-50%, -50%); white-space: nowrap; background: var(--surface); color: var(--brand-800); font: 700 0.75rem var(--font); padding: 5px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); transition: transform .12s, background .12s; }
.pin.pin-unknown { color: var(--warn); border-color: #e2b968; }
.pin.pin-directory { background: var(--surface-2); color: var(--muted); border-style: dashed; font-weight: 600; font-size: 0.6875rem; padding: 3px 8px; }
.pin.pin-group { background: var(--brand-800); color: #fff; border-color: var(--brand-800); }
.pin-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; box-shadow: 0 0 0 1.5px #fff; }
.pin-dot.avail-today { width: 10px; height: 10px; background: var(--ok); }
.pin-dot.avail-soon { background: var(--ok); }
.pin-dot.avail-later { width: 6px; height: 6px; background: var(--subtle); }
.pin-dot.avail-none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--subtle), 0 0 0 1.5px #fff; }
.pin-wrap.active .pin.pin-group { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.pin-wrap.active .pin { transform: translate(-50%, -50%) scale(1.12); background: var(--brand-800); color: #fff; border-color: var(--brand-800); }

/* ==========================================================================
   Listing
   ========================================================================== */
.detail-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s6); align-items: center; }
.detail-hero.no-photo { grid-template-columns: 1fr; }
.detail-image { display: block; width: 100%; aspect-ratio: 4 / 3; max-height: 420px; object-fit: cover; border-radius: var(--r-xl); background: var(--surface-2); }
.detail-copy h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: var(--s1); }
.detail-copy .place { color: var(--muted); font-weight: 600; margin-bottom: var(--s3); }
/* The hero's fit rows: each resource's name and price over its swatches, before any description. */
.fit-rows { list-style: none; margin: var(--s4) 0; padding: 0; display: grid; gap: var(--s4); max-width: 40rem; }
.fit-name { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin: 0; }
.fit-name strong { font-size: var(--fs-lg); }
.fit-price { font-weight: 700; white-space: nowrap; }
.fit-mode { margin: 2px 0 0; }
.fit-more { margin: calc(-1 * var(--s2)) 0 var(--s3); }
.host-info { margin: var(--s3) 0 var(--s4); }
.detail-foot { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: var(--s6) 0 0; }
.detail-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: var(--r-xl); cursor: zoom-in; }
#photoDialog { width: min(1100px, calc(100% - 24px)); }
.viewer { padding: var(--s4); }
.viewer figure { margin: 0; clear: both; padding-top: var(--s2); touch-action: pan-y; }
.viewer figcaption { display: grid; gap: 2px; margin-top: var(--s1); }
.viewer-image { display: block; width: 100%; max-height: calc(100vh - 190px); object-fit: contain; border-radius: var(--r-md); background: var(--surface-2); }
.viewer-nav { display: flex; align-items: center; justify-content: center; gap: var(--s4); margin-top: var(--s3); }
.viewer-nav button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.viewer-count { margin: 0; min-width: 9ch; text-align: center; }
.gallery { display: flex; gap: var(--s2); overflow-x: auto; margin: var(--s4) 0 0; }
.gallery img { display: block; height: 120px; border-radius: var(--r-md); object-fit: cover; }
.gallery-item { padding: 0; border: 0; background: none; border-radius: var(--r-md); cursor: pointer; }
.gallery-item[aria-pressed="true"] { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.gallery figure, .detail-figure { margin: 0; }
.gallery figure { flex: none; max-width: 240px; }
.gallery figcaption, .detail-figure figcaption { display: grid; gap: 2px; margin-top: var(--s1); }
.photo-kind-label { font-size: var(--fs-sm); font-weight: 700; }
.photo-credit { margin: var(--s1) 0 0; font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
figcaption .photo-credit { margin: 0; }
.photo-strip select.photo-kind { display: block; width: 96px; margin-top: 2px; font-size: var(--fs-xs); padding: 2px; }
.card-credit { margin: 0; padding: var(--s1) var(--s3) 0; }
.detail-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); grid-template-rows: auto 1fr; column-gap: var(--s6); row-gap: var(--s5); margin-top: var(--s6); align-items: start; }
.detail-cols > .panel, .detail-more { grid-column: 1; }
.detail-cols > .booking-box { grid-column: 2; grid-row: 1 / span 2; }
.detail-cols.with-hero { grid-template-rows: auto auto 1fr; margin-top: 0; }
.detail-cols > .detail-hero { grid-column: 1; }
.detail-cols.with-hero > .booking-box { grid-row: 1 / span 3; }
/* Beside the box, its picker already says how each space books; the hero's mode lines stay for the phone, where the box is far below. */
@media (min-width: 901px) { .detail-cols.with-hero .fit-mode { display: none; } }
.detail-more { display: grid; gap: var(--s5); }
.resource { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); margin-top: var(--s3); }
.resource h3 { margin: 6px 0 4px; }
.resource .swatches { margin: var(--s2) 0 var(--s3); max-width: 520px; }
.resource p { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--s2); }
.resource .resource-footer { color: var(--text); font-size: var(--fs-md); margin: var(--s2) 0 0; }
.price-times { list-style: none; margin: var(--s1) 0 0; padding: 0; display: grid; gap: 2px; color: var(--muted); }
.price-times strong { color: var(--text); }
.booking-box.pinned { position: sticky; top: calc(var(--header-h) + 16px); }  /* only while it fits: pinBookingBox() in app.js */
.booking-box form > .primary, #reserveForm .primary { width: 100%; }
.resource-picker { display: grid; gap: 6px; margin: 0 0 var(--s4); padding: 0; border: 0; }
.resource-option { display: flex !important; align-items: center; gap: var(--s3); margin: 0 !important; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; font-weight: 500; }
.resource-option:has(input:checked) { border-color: var(--brand-700); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand-700); }
.resource-option .grow { flex: 1; min-width: 0; }
.resource-option .grow strong { display: block; }
.resource-option .grow span { font-size: var(--fs-xs); color: var(--muted); }
.resource-option .price { font-weight: 700; white-space: nowrap; }
.resource-option .price .muted { font-weight: 400; }
.slot-picker { border: 0; padding: 0; margin: var(--s2) 0; }
.slot-picker legend { font-weight: 600; font-size: var(--fs-sm); }
#slotList, .move-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(70px, 100%), 1fr)); gap: 6px; margin-top: 6px; }
#slotList > :not(.slot), .move-slots > :not(.slot) { grid-column: 1 / -1; justify-self: start; }  /* messages, suggestions and the wait button span the row */
.slot { min-height: 40px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.slot .places { display: block; font-weight: 500; font-size: 0.6875rem; color: var(--muted); }
.slot[aria-pressed="true"] .places { color: inherit; }
.slot:hover { border-color: var(--brand-600); }
.slot[aria-pressed="true"] { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.addons { border: 0; padding: 0; margin: var(--s3) 0; }
.addons legend { font-weight: 600; font-size: var(--fs-sm); }
.addon { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 6px 0; }
.addon .check { margin: 0; }
.addon select { width: auto; min-height: 36px; margin: 0; }
.addon small { flex-basis: 100%; }
.price-lines { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin-bottom: var(--s3); }
.price-lines td, .price-lines th { padding: 4px 0; text-align: left; font-weight: 400; }
.price-lines td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: var(--s3); }
.price-lines .total th, .price-lines .total td { font-weight: 800; border-top: 1px solid var(--line); padding-top: 8px; font-size: var(--fs-md); }
#quoteResult .notice { margin-top: var(--s4); }
#reserveForm { margin-top: var(--s3); }
.review-summary { background: var(--surface-2); border-radius: var(--r-md); padding: var(--s3) var(--s4); margin: var(--s3) 0; }
.review-total { font-weight: 800; margin: 0 0 6px; }
.score-list, .check-list { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; font-size: var(--fs-sm); }
.score-list li { display: flex; justify-content: space-between; max-width: 320px; }
.review-item { border-top: 1px solid var(--line); padding: var(--s3) 0; }
.review-item p { margin: 4px 0; }
.mobile-cta { display: none; }

/* ==========================================================================
   Bookings and account
   ========================================================================== */
.booking-group { margin-top: var(--s5); }
.booking-group > h2 { font-size: var(--fs-lg); color: var(--muted); margin-bottom: var(--s3); }
/* Folds: later weeks of a series, cancelled sessions. A quiet full-width line that opens in place. */
.fold > summary { display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--brand-800); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; width: 12px; height: 12px; margin-left: auto; background: currentColor; transition: transform .15s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%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'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.fold[open] > summary { margin-bottom: var(--s3); border-style: solid; background: var(--brand-50); }
.fold[open] > summary::after { transform: rotate(180deg); }
.fold > summary:hover { background: var(--brand-50); }
@media (prefers-reduced-motion: reduce) { .fold > summary::after { transition: none; } }
/* In a tab the tab names the part; the heading stays for screen readers' heading lists. */
#bookingList [role=tabpanel] > .booking-group:first-child { margin-top: 0; }
/* The tab names the first group; a second group in the same tab (Past: "Cancelled before they happened") keeps its heading. */
#bookingList [role=tabpanel] > .booking-group:not(.booking-group + .booking-group) > h2 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The ticket: the next session, answering where, getting in and paying before the list. */
.ticket { display: grid; gap: var(--s4); padding: var(--s5) var(--s6); margin-bottom: var(--s6); border-radius: var(--r-lg); }
.ticket:focus { outline: none; box-shadow: var(--shadow-1), 0 0 0 3px var(--brand-600); }
.ticket-head > * { margin: 0; }
.ticket-new { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3) !important; font-weight: 700; color: var(--ok); }
.ticket-new svg { flex: none; }
.ticket h2 { margin: var(--s2) 0 2px; font-size: var(--fs-2xl); line-height: 1.15; letter-spacing: -0.02em; }
.ticket-time { color: var(--brand-800); white-space: nowrap; }
.ticket:not(.state-confirmed) .ticket-time { color: inherit; }
.ticket-what { font-weight: 600; }
.ticket-what .small { display: block; font-weight: 400; }
.ticket-head .notice { margin-top: var(--s3); }
/* The stub line: one dashed rule where a paper ticket would tear. */
.ticket-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--s4) var(--s6); margin: 0; padding-top: var(--s4); border-top: 1px dashed var(--line-strong); }
.ticket-facts dt { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.ticket-facts dd { margin: 2px 0 0; }
.ticket-facts dd p { margin: 0 0 2px; }
.ticket-facts a { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; font-weight: 700; color: var(--brand-600); }
.ticket-facts .icon { vertical-align: -2px; }
.access-text { white-space: pre-line; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
@media (max-width: 760px) {
  .ticket { padding: var(--s4); }
  .ticket h2 { font-size: var(--fs-xl); }
  .ticket-actions > * { flex: 1 1 auto; justify-content: center; }
}
/* The title gets the width; the actions sit underneath it: the one next step filled, two beside it, the rest under More. */
/* Booking box: what and when first (resource, date, length, times), then people, a pack or a code. */
.book-options { margin: var(--s3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.book-options summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s2); min-height: 44px; cursor: pointer; font-weight: 700; color: var(--brand-600); }
.book-options summary .muted { font-weight: 400; }
.book-options[open] summary { margin-bottom: var(--s2); }
.book-options > label:last-child { margin-bottom: var(--s3); }
.quote-wait { margin: var(--s3) 0 0; }
.day-prices:empty { display: none; }
.day-prices { margin: 0 0 var(--s2); font-weight: 600; }
.guest-note { margin: var(--s3) 0 var(--s2); }
#signInToBook { width: 100%; }
.booking-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2) var(--s4); align-items: start; padding: var(--s4) var(--s5); }
.booking-row .date-block { display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-800); line-height: 1; text-align: center; }
.booking-row .date-block b { font: 800 1.375rem var(--display); }
.booking-row .date-block span { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.booking-row h3 { margin: 6px 0 2px; }
/* The booking a link opened (/bookings/<id>): marked, and focused for keyboard and screen reader users. */
.booking-row.linked { box-shadow: 0 0 0 3px var(--brand-600); }
.booking-row.linked:focus { outline: none; }
.booking-row p { margin: 2px 0; }
.row-actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s2); }
.row-more { position: relative; }
/* A space's line on the host dashboard: city and count, then its buttons and More, wrapping as one row (a <div>: a
   <details> menu can't sit inside a <p>). */
.space-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s2) 0 var(--s3); }
.row-more summary { list-style: none; cursor: pointer; gap: 6px; }
.row-more summary::-webkit-details-marker { display: none; }
.row-more summary::after { content: ""; width: 12px; height: 12px; background: currentColor; transition: transform .15s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%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'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.row-more[open] summary { background: var(--brand-50); border-color: var(--brand-600); }
.row-more[open] summary::after { transform: rotate(180deg); }
.row-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 220px; max-width: min(320px, 80vw); padding: 6px; display: grid;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.menu-item { display: block; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; font-weight: 600; color: var(--text); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); }
.menu-item.danger { color: var(--bad); }
.menu-item:not(.danger) + .menu-item.danger { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); }
.booking-row .secondary, .booking-row .primary { min-height: 38px; padding: 0 14px; }
/* Over: a quieter ground instead of fading, so every line keeps its contrast. */
.state-cancelled_by_renter, .state-cancelled_by_host, .state-declined, .state-expired { background: var(--surface-2); box-shadow: none; }
.booking-row.state-cancelled_by_renter .date-block, .booking-row.state-cancelled_by_host .date-block, .booking-row.state-declined .date-block, .booking-row.state-expired .date-block { background: var(--surface); color: var(--muted); }
.banner { background: var(--warn-bg); border: 1px solid #ecd39b; color: var(--warn); padding: var(--s3) var(--s4); border-radius: var(--r-md); margin-bottom: var(--s4); font-size: var(--fs-sm); }
.banner .link { margin-left: 6px; color: inherit; }
.banner:has(.banner-action) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); }
.claim-hint { font-size: var(--fs-sm); color: var(--muted); text-align: right; }
.banner-text { flex: 1 1 16em; }
.banner-short { display: none; }
.banner-action { min-height: 36px; padding: 0 var(--s4); }
.view-as { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid #ecd39b; padding: var(--s2) max(4vw, 16px); font-size: var(--fs-sm); text-align: center; }
.view-as .link { color: inherit; }
.city-links { margin-top: var(--s6); }
.city-links h2 { font-size: var(--fs-md); }
.city-links ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.browse-all { margin-top: var(--s4); font-weight: 700; }
.two-step form { display: grid; gap: var(--s2); max-width: 360px; }
.two-step .qr { width: 200px; max-width: 100%; }
.two-step .qr svg { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.two-step .secret { font-size: var(--fs-md); letter-spacing: .04em; user-select: all; }
.recovery-codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: var(--s1) var(--s5); }
.update { display: flex; justify-content: space-between; gap: var(--s3); margin: 0; padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.update:last-child { border-bottom: 0; }
.update.unread span { font-weight: 600; }
.update > span { white-space: pre-line; }  /* multi-line updates, e.g. a host's daily agenda */
.update small { flex: none; white-space: nowrap; }
.update.unread span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-600); margin-right: 8px; vertical-align: middle; }
.security { margin-top: var(--s4); }
.security summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.security summary::-webkit-details-marker { display: none; }
.security summary h2 { margin: 0; font-size: var(--fs-lg); }
.security summary::after { content: ""; flex: none; width: 20px; height: 20px; background: var(--muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%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'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .15s ease; }
.security[open] summary::after { transform: rotate(180deg); }
.security[open] summary { margin-bottom: var(--s4); }
.security .sign-out-all, .privacy-actions .secondary { width: auto; }
.privacy-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.data-rights { display: grid; gap: var(--s2); }
.data-rights-note { font-weight: 600; }
.data-rights .document-list { margin: 0; padding-left: 1.2em; }
.security h3 { margin-top: var(--s5); }

/* ==========================================================================
   Dialogs and toast
   ========================================================================== */
dialog { border: 0; border-radius: var(--r-xl); padding: 0; box-shadow: var(--shadow-3); width: min(440px, calc(100% - 24px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: rgb(14 32 24 / .55); }
.modal { padding: var(--s6); }
.modal h2 { margin-right: 36px; }
.modal .primary { width: 100%; margin-top: var(--s2); }
.modal .link { display: block; margin: var(--s3) auto 0; }
.close { float: right; position: relative; width: 36px; height: 36px; margin: -6px -6px 0 0; border: 0; border-radius: 50%; background: var(--surface-2); font-size: 0; color: transparent; }
.close::before { content: ""; position: absolute; inset: 11px; background: var(--text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5l14 14M19 5 5 19' stroke='black' stroke-width='2.6' stroke-linecap='round'/%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'%3E%3Cpath d='M5 5l14 14M19 5 5 19' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.close:hover { background: var(--line); }
.ask h2 { font-size: var(--fs-lg); line-height: 1.4; }
.ask-field { display: grid; gap: var(--s1); margin-top: var(--s3); }
.ask textarea, .ask input { width: 100%; margin-top: var(--s3); }
.ask-field textarea { margin-top: 0; }
.ask-actions { display: grid; gap: var(--s2); margin-top: var(--s4); }
.ask-actions .primary { margin-top: 0; }
#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px); transform: translateX(-50%); z-index: 100; display: none; max-width: min(460px, calc(100% - 24px)); padding: 12px 18px;
  background: var(--brand-900); color: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-3); font-weight: 500; animation: toast-in .2s ease-out; cursor: pointer; }
#toast.error { background: var(--bad); }
#toast .toast-action { margin-left: var(--s2); padding: 4px 10px; min-height: 32px; border: 1px solid rgb(255 255 255 / .5); border-radius: var(--r-sm, 6px); background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
#toast .toast-action:hover { background: rgb(255 255 255 / .12); }
#toast .toast-action:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }  /* a failure (toast(text, true)): white on --bad is 6.8:1 */
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.review-form fieldset { border: 0; padding: 0; margin: var(--s3) 0; }
.review-form legend { font-weight: 600; margin-bottom: 6px; }
.stars { display: flex; gap: 6px; }
.star { display: inline-flex !important; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; margin: 0 !important; font-weight: 800; }
.star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star:has(input:checked) { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.star:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: var(--s2); }
.check-row { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: var(--s2) 0; font-size: var(--fs-sm); }
.check-row > span { flex: 1 1 100%; }
.check-row label { display: inline-flex !important; gap: 4px; margin: 0 !important; align-items: center; }

/* ==========================================================================
   Host: create flow, dashboard, editor, schedule
   ========================================================================== */
/* Host tabs (host-tabs.js): one part of the studio at a time. */
.host-tabs, .view-tabs { display: flex; flex-wrap: wrap; gap: 0 var(--s1); border-bottom: 1px solid var(--line); margin-top: var(--s3);
  position: relative; }  /* the containing block for the tabs' unseen count words, which once widened the page */
.host-tabs.hidden { display: none; }
.host-tabs [role=tab], .view-tabs [role=tab] { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 12px; min-height: 44px; margin-bottom: -1px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.host-tabs [role=tab]:hover, .view-tabs [role=tab]:hover { color: var(--text); }
.host-tabs [role=tab][aria-selected=true], .view-tabs [role=tab][aria-selected=true] { color: var(--text); border-bottom-color: var(--brand-600); }
#host .tab-off { display: none !important; }
.view-tabs { margin: 0 0 var(--s4); }
.view-tabs .badge, .host-tabs .badge { margin-left: 4px; }
/* On a phone the tabs are a grid of equal cells, every one on screen with its count (a sideways-scrolling row hid
   "Money 7" under its fade and "Add a space" past the edge). Each cell has its own line; the chosen one is underlined. */
@media (max-width: 760px) {
  .host-tabs, .view-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: 0; border-bottom: 0; }
  .host-tabs.hidden { display: none; }
  /* Four tabs make two rows of two, never three and one left alone (PT, DE: "Espaços guardados" on a row of its own). */
  .host-tabs:has(> [role=tab]:nth-child(4):last-child), .view-tabs:has(> [role=tab]:nth-child(4):last-child) { grid-template-columns: 1fr 1fr; }
  .host-tabs [role=tab], .view-tabs [role=tab] { margin-bottom: 0; white-space: normal; text-align: start; line-height: 1.25;
    border-bottom: 1px solid var(--line); padding: 10px 8px 8px;
    display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 2px 6px; }  /* labels line up at the top of every cell */
  .view-tabs .badge, .host-tabs .badge { margin-left: 0; }
  .host-tabs [role=tab][aria-selected=true], .view-tabs [role=tab][aria-selected=true] { border-bottom: 3px solid var(--brand-600); padding-bottom: 6px; }
}
#host .host-tabs:not(.hidden) ~ .host-grid, #host .host-part { margin-top: var(--s5); }
.renters-list { margin-top: var(--s2); }
.takings { border-top: 1px solid var(--line); padding-top: var(--s3); margin-top: var(--s3); }
/* Add a space is done in order, so its steps stack in one readable column at every width, the later ones below */
.host-grid { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 720px; gap: var(--s4); }
.host-grid .panel { align-self: start; }
/* A step not open yet folds to its heading and the hint saying what comes first, so the step to do now leads */
.host-grid .step-locked > :not(h2, #hostSpaceId, #hostResourceId) { display: none; }
.host-grid .step-locked h2 { color: var(--muted); }
.host-grid .primary, .host-grid .secondary { width: 100%; margin-top: var(--s2); }
.days { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0 0 var(--s3); }
.days label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-weight: 600; }
.pin-field { margin: 6px 0 var(--s3); }
.pin-picker { margin: var(--s3) 0; }
.picker-search { display: flex; gap: var(--s2); margin-top: var(--s2); }
.picker-search input { flex: 1; margin: 0; }
.picker-search .secondary { width: auto; margin: 0; }
.picker-results { display: grid; gap: 4px; margin-top: 6px; text-align: left; }
#hostDashboard { margin-top: var(--s5); }
#hostDashboard article { padding: var(--s5) 0; border-top: 1px solid var(--line); }
.unpaid-list .session-list { margin-top: var(--s2); }
/* Session details take the room; on a narrow screen the amount and its button wrap to their own line, at the right. */
.unpaid-list .session { flex-wrap: wrap; }
.unpaid-list .session > div { flex: 1 1 14rem; min-width: 0; }
.unpaid-actions { display: inline-flex; align-items: center; gap: var(--s3); margin-left: auto; font-variant-numeric: tabular-nums; }
/* Requests waiting for the studio's answer: who, what and when take the room; the answers sit together at the
   right and drop under the details on a narrow screen. */
.host-requests { margin-bottom: var(--s5); }
.host-requests .session { flex-wrap: wrap; align-items: flex-start; }
.host-requests .session > div { flex: 1 1 16rem; min-width: 0; display: grid; gap: 2px; }
.host-requests .request-who { margin: 0; }
.host-requests .note-text { margin: var(--s1) 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.request-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-left: auto; }
.request-actions button, #hostDashboard .request-actions .secondary { width: auto; margin: 0; min-height: 44px; padding: 0 var(--s5); font-size: inherit; }  /* yes and no the same size */
#hostDashboard .team { padding: var(--s5) 0; border-top: 1px solid var(--line); }
/* A resource on the host's dashboard: name, price, hours, then its actions together in one cell. */
.resource-row { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 2fr) auto; gap: var(--s3); align-items: center;
  padding: var(--s3) var(--s4); margin-top: var(--s2); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); }
.resource-price small { display: block; font-size: var(--fs-xs); }
.resource-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); }
#hostDashboard .resource-actions .secondary { margin: 0; }
#hostDashboard .secondary, .edit-space, .add-resource, .set-location { min-height: 36px; padding: 0 12px; font-size: var(--fs-sm); width: auto; margin: 0 4px 4px 0; }
.photo-strip { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: var(--s3) 0; }
.photo-strip figure { position: relative; margin: 0; }
.photo-strip img { width: 96px; height: 72px; object-fit: cover; border-radius: var(--r-sm); display: block; }
.photo-strip .cover-tag, .photo-strip .make-cover { display: block; font-size: var(--fs-xs, 12px); text-align: center; margin-top: 2px; }
.photo-strip .cover-tag { font-weight: 700; color: var(--brand-700); }
.photo-strip figure button.remove-photo { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgb(23 36 31 / .82); color: #fff; }
.photo-strip label.secondary { margin: 0; cursor: pointer; }
.editor-slot:empty { display: none; }
.editor { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); margin: var(--s3) 0; box-shadow: var(--shadow-1); }
.editor h3 { margin-top: 0; }
.editor fieldset { border: 0; border-top: 1px solid var(--line); padding: var(--s2) 0 var(--s1); margin: var(--s4) 0 0; }
.editor legend { float: left; width: 100%; padding: 0; margin: 0 0 var(--s2); font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.editor legend + * { clear: both; }
.editor .custom-preview:empty { display: none; }
/* What the chosen policy lets the studio charge (pay at the studio): a line under the select, styled like the preview. */
.editor .policy-explain { display: block; margin-top: var(--s2); padding: var(--s2) var(--s3); border-left: 3px solid var(--line-strong); background: var(--surface-2, var(--brand-50)); font-weight: 400; color: var(--text); }
.editor .policy-explain:empty { display: none; }
.editor .custom-preview { padding: var(--s2) var(--s3); border-left: 3px solid var(--line-strong); background: var(--surface-2, var(--brand-50)); }
/* Pinned to the editor's full width, above the fields it passes over (Description once showed through around Save). */
.editor-actions { display: flex; gap: var(--s2); position: sticky; z-index: 3; bottom: calc(var(--tabbar-h) + 8px); background: var(--surface);
  margin: 0 calc(-1 * var(--s5)); padding: var(--s3) var(--s5); border-top: 1px solid var(--line); box-shadow: 0 -8px 16px -12px rgb(0 0 0 / .25); }
.editor-actions .primary, .editor-actions .secondary { width: auto; }
.hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: var(--s2); }
#host.desk details.feed, #host.desk #hostAdd { display: none; }  /* a studio's desk staff: calendars and listings are the owner's */
.host-lead { margin: 0; max-width: 40em; }
#host.has-spaces .host-lead { display: none; }  /* for a first space; Add a space has its own note */
/* No studio tools yet: only the offer to turn them on (host-tabs.js opens "add" before a first space; here the offer is the page) */
#host.no-studio #hostAdd, #host.no-studio #hostSchedule, #host.no-studio details.feed { display: none; }
#host.no-studio #hostDashboard.tab-off { display: block !important; }
.team .invite-link input { flex: 1 1 260px; }
.price-row { display: flex; flex-wrap: wrap; gap: 6px var(--s2); align-items: flex-end; margin: 6px 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.price-row .chips { flex: 1 1 100%; margin: 0; }
.price-row .mini-field { flex: 0 1 130px; }
/* A small label above a field in a row of fields (price rows, the pack form). */
.mini-field { margin: 0; min-width: 0; }
.mini-field input, .mini-field select { width: 100%; margin-top: 4px; }
.price-row .remove-price { min-height: 44px; }
.timed-prices .add-price { width: auto; }
.session:has(.renter-packs) { flex-wrap: wrap; }
.renter-packs, .renter-note { flex: 1 1 100%; }
.renter-packs { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); }
.renter-pack { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); }
.renter-note .note-text { margin: 0 0 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-form textarea { margin-bottom: 4px; }
.pack-form { align-items: flex-end; gap: var(--s2); }
.pack-form .mini-field { flex: 1 1 150px; }
.pack-form .mini-field input, .pack-form .mini-field select { width: 100%; flex: none; }
.pack-form .pack-hint { flex: 1 1 100%; margin: 0; }
.code-form input[name=code] { flex: 2 1 160px; text-transform: uppercase; }
.code-form input[name=percent] { width: 84px; flex: 0 0 84px; }
.code-form input[name=max_uses], .code-form input[name=expires_on] { flex: 1 1 150px; width: auto; }
.addon-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.addon-row input, .addon-row select { margin: 0; }
.addon-row input[name=name] { flex: 2 1 180px; }
.addon-row input[name=price] { flex: 0 1 110px; }
.addon-row input[name=max_quantity] { width: 72px; flex: 0 0 72px; }
.addon-row select { flex: 0 1 140px; width: auto; }
.addon-row .secondary { width: auto; min-height: 40px; }
.addon-row .check { margin: 0; }
.schedule { margin-top: var(--s5); }
.schedule-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.week-nav { display: flex; gap: 6px; }
.week-nav .secondary { width: auto; min-height: 36px; padding: 0 12px; }
.schedule-space { border-top: 1px solid var(--line); padding-top: var(--s3); margin-top: var(--s3); }
/* One row a day, the day's name in its own column, so a booked day has the width for its entries (not one narrow
   tile in a grid while empty days span the page). Entries sit side by side when there's room. */
.schedule .days { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.schedule .day { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: var(--s2) var(--s4); align-items: baseline; }  /* the day's name on its first entry's line */
.schedule .day { background: var(--surface-2); border-radius: var(--r-md); padding: var(--s3); }
.schedule .day h4 { margin: 0; font-size: var(--fs-sm); }
.schedule .day.empty { align-items: baseline; text-align: left; padding: var(--s2) var(--s3); background: transparent; border: 1px dashed var(--line); }
.schedule .day.empty h4, .schedule .day.empty p { margin: 0; }
.schedule .day .day-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px var(--s4); font-size: var(--fs-xs); }
.schedule .day .day-actions .link { min-height: 32px; }
.schedule .day ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr)); gap: 6px; }
@media (max-width: 640px) {
  .schedule .day { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .schedule .day.empty { grid-template-columns: auto minmax(0, 1fr); }  /* an empty day stays one line */
  .schedule .day.empty p { text-align: right; }
  .schedule .day .day-actions { grid-column: 1 / -1; }
}
.schedule .item { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; font-size: var(--fs-sm); background: var(--surface); border-radius: var(--r-sm); padding: 6px 8px; border: 1px solid var(--line-strong); }
.schedule .item .when { font-weight: 700; font-variant-numeric: tabular-nums; }
.schedule .item.block { border-color: var(--line); background: repeating-linear-gradient(135deg, #fff, #fff 6px, var(--surface-2) 6px, var(--surface-2) 12px); }
.schedule .item.state-pending_host_approval, .schedule .item.state-held, .schedule .item.state-pending_payment { border-color: #e2b968; background: var(--warn-bg); }
.schedule .item .link { grid-column: 2; justify-self: start; font-size: var(--fs-xs); }
.block-form, .host-booking-form { margin-top: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); }
.block-form h4, .host-booking-form h4 { margin: 0 0 var(--s2); }
.block-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: var(--s2); }
.block-form .primary, .host-booking-form .primary { width: auto; }
.feed { margin: var(--s2) 0; }
.feed summary { cursor: pointer; font-weight: 700; padding: var(--s2) 0; }
.feed-link .pair { display: flex; gap: 6px; }
.feed-link input { flex: 1; font-size: var(--fs-xs); margin: 0; }
.feed-link .secondary, .feed-actions .secondary { width: auto; margin: 0; }
.feed-actions { display: flex; gap: var(--s3); align-items: center; margin-top: 6px; }
.notice.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.notice.bad { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.notice.small { padding: var(--s2) var(--s3); margin: 6px 0; }
dialog:has(.thread) { width: min(560px, calc(100% - 24px)); }
/* Receipt (app.js openReceipt): a dialog on screen, the only thing on paper. */
dialog:has(.receipt) { width: min(520px, calc(100% - 24px)); }
.receipt-facts { margin: var(--s4) 0; display: grid; gap: var(--s3); }
.receipt-facts dt { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.receipt-facts dd { margin: 0; }
.receipt-lines { width: 100%; border-collapse: collapse; margin-bottom: var(--s3); }
.receipt-lines th { text-align: left; font-weight: 400; }
.receipt-lines td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.receipt-lines th, .receipt-lines td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.receipt-lines .total th, .receipt-lines .total td { font-weight: 700; border-bottom: 0; }
@media print {
  body:has(#receiptDialog[open]) > :not(#receiptDialog) { display: none !important; }
  #receiptDialog[open] { position: static; width: auto; max-height: none; box-shadow: none; margin: 0; color: #000; background: #fff; }
  #receiptDialog::backdrop { display: none; }
  #receiptDialog .no-print { display: none; }
}
.thread .messages { list-style: none; margin: var(--s3) 0; padding: var(--s2); display: flex; flex-direction: column; gap: var(--s2); max-height: min(50vh, 420px); overflow-y: auto; background: var(--surface-2); border-radius: var(--r-md); }
.message { display: flex; flex-direction: column; align-items: flex-start; max-width: 85%; }
.message.mine { align-self: flex-end; align-items: flex-end; }
.message .bubble { padding: var(--s2) var(--s3); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.message.mine .bubble { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.message .meta { margin-top: 2px; display: flex; gap: var(--s2); align-items: center; }
.message .meta .link { font-size: inherit; padding: 0; }
.message-form textarea { resize: vertical; }
.message-form .primary { width: auto; }
.session-list { list-style: none; padding: 0; margin: var(--s2) 0 var(--s3); display: grid; gap: var(--s2); }
.session { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); }
.session.current { border-color: var(--brand-100); background: var(--brand-50); }
.session .secondary { width: auto; flex: none; }
.import-list { list-style: none; padding: 0; margin: var(--s3) 0; display: grid; gap: var(--s2); }
.import-row { padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.import-form { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.import-form .primary { width: auto; }
.schedule .item.imported { border-color: #b9cdea; background: var(--info-bg); }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-grid { display: grid; gap: var(--s4); }
.admin-item { border-top: 1px solid var(--line); padding: var(--s3) 0; display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.admin-item .actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.admin-item .actions .secondary { width: auto; min-height: 36px; padding: 0 12px; }
.admin-lookup, .admin-users { display: flex; gap: var(--s2); }
.admin-lookup input, .admin-users input { flex: 1; margin: 0; }
.admin pre { white-space: pre-wrap; word-break: break-all; font-size: var(--fs-xs); background: var(--surface-2); padding: var(--s3); border-radius: var(--r-md); max-height: 360px; overflow: auto; }
.claim-invite { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); }
.metrics-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.metrics-head select { width: auto; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: var(--s2); margin: var(--s3) 0; }
.stat { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: var(--r-md); padding: var(--s3); }
.stat-value { font: 800 1.375rem var(--display); font-variant-numeric: tabular-nums; }
.stat-label { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.stat-hint { font-size: 0.6875rem; color: var(--muted); }
.metrics-table { border-collapse: collapse; width: 100%; max-width: 420px; font-size: var(--fs-sm); }
.metrics-table th, .metrics-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.metrics-table td:last-child, .metrics-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Footer and legal pages
   ========================================================================== */
.site-footer { max-width: var(--container); margin: 0 auto; padding: var(--s5) max(4vw, 16px) calc(var(--s6) + var(--tabbar-h)); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--muted); }
.site-footer a { color: var(--text); display: inline-block; padding: 4px 0; }
.site-footer p { margin: 0; max-width: 60ch; }
.legal-page header { position: static; }
/* The language menu, at the header's end; full names here (the app's header shows codes on a phone). */
.legal-page header .lang { margin-left: auto; }
/* Help and the legal pages lead back to the search and on to Help; on a phone the footer carries the same links. */
.legal-page header .legal-top { display: flex; gap: var(--s4); margin-left: auto; }
/* Not the app's tab bar: "header nav" turns fixed at the bottom on narrow screens. */
.legal-page header .legal-top { position: static; height: auto; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; justify-content: flex-start; }
.legal-page header .legal-top + .lang { margin-left: var(--s4); }
.legal-page header .legal-top a { color: #d5e6da; font-size: var(--fs-sm); font-weight: 600; text-decoration: none; padding: 12px 0; }
.legal-page header .legal-top a:hover, .legal-page header .legal-top a[aria-current=page] { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
/* Waiting: a card being opened, a button sending, the schedule loading another week. Dimmed, not hidden. */
.card[aria-busy=true], #hostSchedule[aria-busy=true] > :not(h2) { opacity: .55; transition: opacity .15s; cursor: progress; }
button[aria-busy=true] { cursor: progress; opacity: .75; }
.load-failed { display: grid; gap: var(--s2); justify-items: start; }
.load-failed p { margin: 0; }
.empty.load-failed { justify-items: center; }
/* What Confirm commits, said beside it. */
.confirm-what { margin: var(--s3) 0 0; font-size: var(--fs-sm); }
.confirm-what .confirm-warn { color: var(--warn); font-weight: 700; }
/* The studio's booking opened by its link: the facts they check before the session. */
.booking-row .host-facts { margin: var(--s3) 0; padding: var(--s3) 0; border-block: 1px solid var(--line); }
.host-facts ul { margin: 0; padding-left: 1.2em; }
.legal-page .site-footer { padding-bottom: var(--s6); }
@media (max-width: 599px) { .legal-page header .legal-top { display: none; } .legal-page header .legal-top + .lang { margin-left: auto; } }
.legal-page header .lang select { width: auto; min-width: 7.2em; }
.legal .translation-note { padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--info-bg); color: var(--text); }
.legal { max-width: calc(36em + 32px); margin: var(--s6) auto 60px; padding: 0 16px; line-height: 1.65; }  /* about 75 characters a line: 36em, as ch is the width of a zero and text runs narrower */
.legal h2 { font-size: var(--fs-xl); margin-top: var(--s8); }
.legal li { margin: 6px 0; }
.legal h3 { font-size: var(--fs-lg); margin: var(--s5, 20px) 0 4px; }
.legal h3 + p { margin-top: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .search-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-panel .primary { grid-column: span 3; margin: 4px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-group:nth-of-type(3) { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .results-layout { grid-template-columns: 1fr; }
  .results-map { display: none; position: static; order: -1; }
  .results-layout.map-open .results-map { display: block; }
  /* A tablet has room for both: the map beside the list (as on a laptop), so opening it doesn't push every result off screen */
  @media (min-width: 700px) {
    .results-layout.map-open { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .results-layout.map-open .results-map { order: 1; position: sticky; top: calc(var(--header-h) + 12px); }
    .results-layout.map-open .map-canvas { height: calc(100vh - var(--header-h) - 120px); }
  }
  .map-canvas { height: 360px; min-height: 0; }
  .map-toggle { display: inline-flex; width: auto; min-height: 44px; margin: 0; padding: 0 var(--s3); border-radius: var(--r-md); }
  .detail-hero, .detail-cols { grid-template-columns: 1fr; }
  .detail-cols { grid-template-rows: none; }
  .detail-cols > .booking-box, .detail-cols.with-hero > .booking-box { grid-column: 1; grid-row: auto; }
  .booking-box.pinned { position: static; }
  .mobile-cta { display: flex; position: fixed; left: 0; right: 0; bottom: var(--tabbar-h); z-index: 40; align-items: center; justify-content: space-between; gap: var(--s3);
    padding: 10px max(4vw, 16px); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgb(23 36 31 / .08); }
  .mobile-cta strong { font: 800 var(--fs-lg) var(--display); }
  .mobile-cta .primary { width: auto; }
  .mobile-cta { transition: opacity .2s, transform .2s; }
  .mobile-cta.away { opacity: 0; transform: translateY(12px); pointer-events: none; }
  #details { padding-bottom: 72px; }
}
@media (max-width: 760px) {
  :root { --header-h: 56px; --tabbar-h: 4rem; --fs-3xl: 1.875rem; }  /* the tab bar grows with the text size */
  /* A backdrop-filter makes the header the containing block for fixed children, which would
     pin the tab bar to the header instead of the bottom of the screen. */
  header { gap: var(--s2); }
  .brand { font-size: 1.25rem; }
  /* The main nav becomes a bottom tab bar on phones. */
  header nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom);
    background: rgb(255 255 255 / .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); justify-content: space-around; gap: 0; }
  .nav { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 2px; border-radius: var(--r-md); font-size: 0.6875rem; color: var(--muted); }
  .nav:hover { background: var(--surface-2); color: var(--text); }
  .nav .label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .nav.active { background: transparent; color: var(--brand-800); }
  .nav.active .nav-icon { background: var(--brand-100); }
  .nav-icon { display: grid; place-items: center; width: 48px; height: 28px; border-radius: var(--r-pill); }
  .nav-icon svg { width: 20px; height: 20px; }
  .lang select { width: 4.4em; min-width: 0; padding: 0 22px 0 10px; }  /* a code (EN), not the 7.2em of a name */
  .account { max-width: 7.5em; padding: 0 12px; font-size: var(--fs-sm); }  /* signed in, the name and the bell still fit 360 px */
  .header-tools { margin-left: 0; gap: 6px; }
  main { padding: var(--s4) 14px 40px; }
  .intro { margin-top: var(--s2); }
  .intro .sub { display: none; }  /* the heading says it; the first card's fit facts get the room */
  .intro .sub-free { margin-top: var(--s1); font-size: var(--fs-sm); }
  .search-panel { grid-template-columns: 1fr 1fr; padding: var(--s2); border-radius: var(--r-lg); }
  .search-panel label:first-child { grid-column: span 2; }
  .search-panel .primary { grid-column: span 2; }
  .search-panel .search-more { display: inline-flex; height: 48px; margin: 0 0 4px 4px; padding: 0 var(--s3); font-size: var(--fs-sm); }
  .search-panel:not(.open) > label:not(.where) { display: none; }
  /* Closed: When and Find share a row where both fit whole, else each takes its own ("Quando e …" once). */
  .search-panel:not(.open) { display: flex; flex-wrap: wrap; }
  .search-panel:not(.open) > .where { flex: 1 1 100%; }
  .search-panel:not(.open) .search-more { flex: 1 0 auto; }
  .search-panel:not(.open) .primary { flex: 1 0 auto; padding: 0 var(--s4); white-space: nowrap; }
  .search-panel .search-more { white-space: nowrap; overflow: hidden; }
  .search-panel .search-more span { overflow: hidden; text-overflow: ellipsis; }
  .search-panel.open .search-more { grid-column: span 2; margin: 0 4px; }
  .search-more[aria-expanded="true"] { background: var(--brand-50); border-color: var(--brand-600); }
  .filter-grid, .three { grid-template-columns: 1fr; }
  .filter-group:nth-of-type(3) { grid-column: auto; }
  .cards { grid-template-columns: 1fr; }
  .detail-image { aspect-ratio: 16 / 10; border-radius: var(--r-lg); }
  .panel { padding: var(--s4); }
  .booking-row { grid-template-columns: auto minmax(0, 1fr); padding: var(--s4); }
  .row-actions { grid-column: 1 / -1; }
  .row-actions > .primary, .row-actions > .secondary { flex: 1 1 auto; }  /* More stays compact at the end */
  /* On a phone the menu opens in place, full width, instead of floating off the edge. */
  .row-more[open] { flex-basis: 100%; }
  .row-menu { position: static; max-width: none; margin-top: 6px; box-shadow: none; }
  .resource-row { grid-template-columns: minmax(0, 1fr) auto; }
  .resource-row > span:nth-of-type(2), .resource-actions { grid-column: 1 / -1; }
  .resource-actions { justify-content: flex-start; }
  .two { grid-template-columns: 1fr; }
  #toast { bottom: calc(var(--tabbar-h) + 72px); }
}

/* Small phones (iPhone SE, narrow split views): one search field per row, and the account
   button gives up width before the header overflows. */
@media (max-width: 340px) {
  .search-panel { grid-template-columns: minmax(0, 1fr); }
  .search-panel label:first-child, .search-panel .primary { grid-column: auto; }
}
@media (max-width: 380px) {
  .header-tools { min-width: 0; }
  .account-wrap { min-width: 0; }
  .account { max-width: 100%; }
  .brand { font-size: 1.1875rem; }
  /* Signed out, the whole sign-in word fits at 320 px in every language ("Connexion" ran 4px past the edge). */
  header { padding-inline: 12px; gap: 6px; }
  .lang select { padding: 0 20px 0 8px; background-position: calc(100% - 13px) 52%, calc(100% - 8px) 52%; }
  .account { padding: 0 10px; }
}
.reported { margin: var(--s2) 0; padding: var(--s2) var(--s3); border-left: 1px solid var(--line-strong); background: var(--surface-2); white-space: pre-wrap; }
.card .meta .distance { color: var(--brand-700); font-weight: 600; white-space: nowrap; }
.chip.near svg { flex: none; }
.checklist { margin: var(--s3) 0; padding: var(--s3) var(--s4); border: 1px solid var(--warn-bg); border-radius: var(--r-md); background: #fffaf0; }
.checklist.ready { border-color: var(--ok-bg); background: var(--ok-bg); }
.checklist-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.checklist .progress { height: 6px; border-radius: var(--r-pill); background: var(--line); margin: var(--s2) 0; overflow: hidden; }
.checklist .progress span { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.checklist ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist li { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); }
.checklist li.ok { color: var(--muted); }
.checklist .mark { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); font-size: 0.75rem; font-weight: 800; }
.checklist li.ok .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist .check-fix { margin-left: auto; font-size: var(--fs-sm); white-space: nowrap; }
.hero-actions { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s3); }
.hero-actions .secondary { width: auto; min-height: 38px; }
.no-supply { text-align: left; display: grid; gap: var(--s2); max-width: 560px; }
.no-supply h3 { margin: 0; }
.no-supply-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.no-supply-actions .primary, .no-supply-actions .secondary { width: auto; }
.no-supply-actions .link { min-height: 44px; }
.empty .no-supply-actions { justify-content: center; }
.space-gone h1 { font-size: var(--fs-2xl); color: var(--text); margin-bottom: var(--s2); }
.space-gone p { max-width: 34em; margin: 0 auto var(--s5); }
.space-gone .primary { width: auto; }  /* centred like the empty state's own text */
.dashboard-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.dashboard-head h2 { margin: 0; }
.dashboard-head .secondary { width: auto; }
.email-prefs { border: 0; border-top: 1px solid var(--line); margin: var(--s4) 0 0; padding: var(--s3) 0 0; display: grid; gap: var(--s2); }
.email-prefs legend { font-weight: 700; padding: 0; margin-bottom: var(--s2); }
.legal form { margin: var(--s4) 0; }
.review-reply { margin: var(--s2) 0 0 var(--s3); padding: var(--s2) var(--s3); border-left: 1px solid var(--line-strong); background: var(--brand-50); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.review-reply p { margin: 0 0 4px; }
.reply-form { margin-top: var(--s2); }
.reply-form .primary { width: auto; }
.save-space[aria-pressed="true"] { color: var(--bad); border-color: var(--bad-bg); }
.pack-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.pack-list li { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s2) var(--s3); }
.pack-list li.pack-ended { color: var(--muted); }
.pack-total { margin: 0 0 var(--s2); }
.takings-table .methods, .takings-table .methods span { display: block; }  /* one way of paying a line: no dot left dangling at a line's end */
.takings-table .methods span { white-space: nowrap; }
.packs-done { margin-top: var(--s3); }
.packs-done .pack-list { margin-top: var(--s2); }
.saved-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.saved-list li { display: flex; align-items: center; gap: var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s2) var(--s3); }
.saved-item { flex: 1; min-width: 0; display: grid; text-align: left; border: 0; background: none; padding: var(--s1) 0; cursor: pointer; }
.saved-item:disabled { cursor: default; opacity: .7; }

/* Host dashboard: full days renters are waiting on */
.demand-note p{margin:0}
.demand-note ul{margin:6px 0 0;padding-left:18px}
.demand-note li{margin:2px 0}

/* Host dashboard: Your renters */
.takings-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm, 14px); }
.takings-table th, .takings-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.takings-table thead th { font-weight: 600; color: var(--muted); }
.takings-table td { font-variant-numeric: tabular-nums; }
/* On a phone each month is a short list of labelled lines, so "Taken in all" isn't scrolled out of sight. */
@media (max-width: 640px) {
  .takings-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .takings-table, .takings-table tbody, .takings-table tr, .takings-table th, .takings-table td { display: block; }
  .takings-table tr { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
  .takings-table th[scope=row] { padding: 0 0 var(--s1); border: 0; }
  .takings-table td { display: flex; justify-content: space-between; gap: var(--s3); padding: 2px 0; border: 0; }
  .takings-table td::before { content: attr(data-label); color: var(--muted); flex: none; }
  .takings-table td > span { text-align: right; }
}
.table-scroll { overflow-x: auto; }
.renter-toggles { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.renter-toggles .check { margin: 0; }  /* a form label's bottom margin stretched its neighbour: the boxes sat 6px apart */

/* Under the password field: the length rule (when choosing one) and a show/hide switch. */
.password-help { display: flex; justify-content: space-between; gap: var(--s2); margin: calc(-1 * var(--s2)) 0 var(--s3); }
.password-help .link { margin-left: auto; }

/* Questions to a studio and its answers (the listing page and the host's Renters tab). */
.question-list { list-style: none; padding: 0; margin: var(--s2) 0 var(--s3); display: grid; gap: var(--s2); }
.question { padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); }
.question p { margin: 0 0 var(--s2); overflow-wrap: anywhere; }
.question .answer { margin-left: var(--s4); padding-left: var(--s3); border-left: 1px solid var(--line-strong); }
.question form .secondary, .ask-studio form .secondary { width: auto; }
.host-questions { margin-bottom: var(--s5); }

/* Phone: fit must show in the first screen (DESIGN.md), so the results header is one row and the terms notice one line. */
@media (max-width: 760px) {
  .intro { margin-bottom: var(--s3); }
  .section-title { margin: var(--s3) 0 var(--s2); row-gap: var(--s2); }
  .results-tools { width: 100%; gap: var(--s2); }
  .results-tools #count { flex: 1 1 5rem; margin-right: auto; line-height: 1.3; }  /* too narrow for the count, Sort and the map button drop to a second row */
  .results-tools .sort { display: flex; margin: 0; }
  .results-tools .sort > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .results-tools .sort select { width: auto; max-width: 12rem; min-height: 44px; padding-block: 0; }  /* room for the longest choice in any language ("Лучшее совпадение") */
  .results-tools .sort, .results-tools .map-toggle { flex: none; white-space: nowrap; }
  .banner:has(.banner-action) { flex-wrap: nowrap; padding-block: 4px; margin-bottom: var(--s2); }
  .banner-long { display: none; }
  .banner-short { display: inline; }
  .banner-text { flex: 1 1 auto; min-width: 0; }
}

/* A short screen (a phone on its side, or a page zoomed to 200%): the header scrolls away and the tab bar puts its
   labels beside the icons, so the bars don't take half the screen. */
@media (max-width: 760px) and (max-height: 480px) {
  :root { --tabbar-h: 2.75rem; }
  header { position: static; }
  header nav { padding-top: 2px; }
  .nav { flex-direction: row; gap: 6px; }
  .nav-icon { width: 30px; height: 26px; }
  .mobile-cta { padding-block: 6px; }
}
/* A directory listing: where a renter goes next, then a separate part for the owner. */
.directory-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0 0; }
.claim-box { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); }
.claim-box h3 { margin: 0 0 var(--s1); font-size: var(--fs-md); }
/* The studio's plan, at the top of Money. */
.plan-part { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); margin: var(--s5) 0; display: grid; gap: var(--s2); }
.plan-part > * { margin: 0; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.plan-head h3 { margin: 0; }
.plan-part .progress { height: 6px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.plan-part .progress span { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.plan-part .progress.over span { background: var(--warn); }
.plan-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.plan-near { margin: 0 0 var(--s4); }
.plan-part .form-error:empty { display: none; }

/* On wide screens, rows and fields that hold a line or two of content stay near it, not 1,075 px apart */
#hostMoney .unpaid-list, #hostMoney .plan-part, .profile-form, .answer-form, .note-form { max-width: 48rem; }
