/* =====================================================================
   House Hunt · Apple design language
   Calm, precise, premium. System fonts only, no build step.
   Phone/tablet layout is the default; the desktop layout (one screen,
   no page scroll) switches on at (min-width:900px) and (min-height:540px).
   ===================================================================== */

/* Self-hosted type (OFL, latin subset; licences in assets/). One variable sans for text, one serif for display.
   Preloaded in index.html; swap so text never waits. */
@font-face { font-family: "HH Sans"; src: url("assets/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "HH Serif"; src: url("assets/cormorant-garamond-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
/* One italic cut, declared across the range so emphasis inside a heavier heading is never faux-bolded */
@font-face { font-family: "HH Serif"; src: url("assets/cormorant-garamond-latin-500-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }

:root {
  color-scheme: light; /* light by default; dark is opt-in per device: html[data-theme="dark"] (see the dark block below) */
  --font: "HH Sans", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-display: "HH Sans", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-serif: "HH Serif", "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-round: ui-rounded, "SF Pro Rounded", "HH Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* surfaces + ink (light) */
  --bg: #f2f2f7;
  --bg-elev: #ffffff;
  --bg-sunk: #e9e9ee;
  --label: #1d1d1f;
  --label-2: #48484d;
  --label-3: #6e6e73;
  --sep: rgba(60, 60, 67, .16);
  --sep-2: rgba(60, 60, 67, .3);
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .2);
  --tint: #0071e3;
  --tint-text: #0066cc;
  --tint-soft: rgba(0, 113, 227, .11);
  --btn: #0071e3;
  --on-btn: #ffffff;
  --purple: #8a3fb0; --purple-soft: rgba(175, 82, 222, .13);

  /* status: text-safe ink + a mark colour + a wash; always shipped with an icon or label */
  --good: #1e7b34; --good-mark: #34c759; --good-soft: rgba(52, 199, 89, .14);
  --warn: #b25000; --warn-mark: #ff9500; --warn-soft: rgba(255, 149, 0, .15);
  --bad: #d70015;  --bad-mark: #ff3b30; --bad-soft: rgba(255, 59, 48, .12);
  --info: #0066cc; --info-mark: #007aff; --info-soft: rgba(0, 122, 255, .12);
  --badge: #ff3b30;

  /* materials */
  --glass: rgba(255, 255, 255, .62);
  --glass-hi: rgba(252, 252, 254, .86);
  --glass-edge: rgba(255, 255, 255, .7);
  --glass-line: rgba(0, 0, 0, .08);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .08);
  --insp: rgba(250, 250, 252, .86);
  --panel: #ffffff;
  --rater-bg: rgba(255, 255, 255, .5);
  --stage-veil: rgba(242, 242, 247, .46);
  --photo-shadow: 0 26px 60px -14px rgba(0, 0, 0, .38), 0 4px 14px rgba(0, 0, 0, .12);
  --track: rgba(118, 118, 128, .22);
  --notch: rgba(255, 255, 255, .9);
  --thumb: #ffffff;
  --seg-on: #ffffff;
  --focus: rgba(0, 113, 227, .55);
  --skel: rgba(118, 118, 128, .14);
  --sc-l: rgb(124, 124, 128);
  --sc-d: rgb(152, 152, 157);

  /* geometry + motion */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.36, .64, 1);
  --toolbar-h: 52px;
  --insp-w: clamp(380px, 31vw, 500px);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --kb: 0px;
  --rater-h: 196px;
  --stage-h: calc(var(--sat) + clamp(300px, 47vh, 440px));
}
@supports (transition-timing-function: linear(0, 1)) {
  /* a gentle spring with ~2% overshoot */
  :root { --spring: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001 85.9%, 1); }
}
/* Dark: only when this device opted in (account menu → Dark mode). The system dark setting no longer switches it. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #000000;
    --bg-elev: #1c1c1e;
    --bg-sunk: #0e0e10;
    --label: #f5f5f7;
    --label-2: #c7c7cc;
    --label-3: #98989d;
    --sep: rgba(84, 84, 88, .5);
    --sep-2: rgba(120, 120, 128, .55);
    --fill: rgba(118, 118, 128, .24);
    --fill-2: rgba(118, 118, 128, .34);
    --tint: #0a84ff;
    --tint-text: #4ba3ff;
    --tint-soft: rgba(10, 132, 255, .2);
    --btn: #0a6fd8;
    --purple: #da8fff; --purple-soft: rgba(191, 90, 242, .2);
    --good: #30d158; --good-mark: #30d158; --good-soft: rgba(48, 209, 88, .16);
    --warn: #ffa53d; --warn-mark: #ff9f0a; --warn-soft: rgba(255, 159, 10, .17);
    --bad: #ff6961;  --bad-mark: #ff453a; --bad-soft: rgba(255, 69, 58, .18);
    --info: #4ba3ff; --info-mark: #0a84ff; --info-soft: rgba(10, 132, 255, .2);
    --badge: #ff453a;
    --glass: rgba(38, 38, 40, .56);
    --glass-hi: rgba(36, 36, 38, .86);
    --glass-edge: rgba(255, 255, 255, .11);
    --glass-line: rgba(255, 255, 255, .08);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .3);
    --insp: rgba(22, 22, 24, .84);
    --panel: #1c1c1e;
    --rater-bg: rgba(255, 255, 255, .035);
    --stage-veil: rgba(0, 0, 0, .44);
    --photo-shadow: 0 26px 60px -14px rgba(0, 0, 0, .75), 0 4px 14px rgba(0, 0, 0, .4);
    --track: rgba(118, 118, 128, .38);
    --notch: rgba(0, 0, 0, .6);
    --thumb: #f5f5f7;
    --seg-on: #636366;
    --focus: rgba(10, 132, 255, .75);
    --skel: rgba(118, 118, 128, .22);
}

/* Score colour (diverging around "meh"): JS sets --sc-l / --sc-d on .sc elements. */
.sc { --score: var(--sc-l); }
[data-theme="dark"] .sc { --score: var(--sc-d); }

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; font: 15px/1.4 var(--font); color: var(--label); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
button:disabled { cursor: default; opacity: .4; }
a { color: var(--tint-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.i-fill { fill: currentColor; stroke: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
kbd { display: inline-block; min-width: 20px; padding: 2px 5px; border-radius: 5px; background: var(--fill); color: var(--label); font: 600 11.5px/1.3 var(--font); text-align: center; box-shadow: inset 0 -1px 0 var(--sep); }
.muted { color: var(--label-3); }
.skip-link { position: fixed; left: 8px; top: -80px; z-index: 200; padding: 10px 14px; border-radius: 10px; background: var(--bg-elev); box-shadow: var(--glass-shadow); }
.skip-link:focus { top: calc(var(--sat) + 8px); }
.haptic { position: fixed; left: -200px; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px;
  border-radius: 12px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  transition: background-color .2s, transform .14s var(--ease-out), opacity .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--btn); color: var(--on-btn); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.btn-primary:hover { background: color-mix(in srgb, var(--btn) 88%, #fff); }
.btn-secondary { background: var(--fill); color: var(--label); }
.btn-secondary:hover { background: var(--fill-2); }
.btn-plain { color: var(--tint-text); background: transparent; }
.btn-plain:hover { background: var(--tint-soft); }
.btn-danger { background: var(--bad-mark); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.kbd-hint { font-weight: 500; opacity: .72; font-size: 13px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; color: var(--label-2);
  transition: background-color .2s, color .2s, transform .14s var(--ease-out);
}
.icon-btn:hover { background: var(--fill); color: var(--label); }
.icon-btn:active { transform: scale(.94); }
.close-btn { border-radius: 50%; width: 36px; height: 36px; background: var(--fill); }
.close-btn .i { width: 16px; height: 16px; stroke-width: 2.2; }
.linkish { color: var(--tint-text); font-weight: 600; border-radius: 4px; }
.linkish:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- segmented control */
.segmented { position: relative; display: inline-flex; padding: 2px; border-radius: 10px; background: var(--fill); isolation: isolate; flex: none; }
.segmented button {
  position: relative; z-index: 1; height: 28px; min-width: 58px; padding: 0 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--label-2); transition: color .2s;
}
.segmented button[aria-pressed="true"] { color: var(--label); }
.segmented button:hover { color: var(--label); }
.seg-thumb {
  position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 0; width: 0; border-radius: 8px; background: var(--seg-on);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04); opacity: 0;
  transition: transform .34s var(--spring), width .34s var(--spring), opacity .2s;
}
.segmented.has-sel .seg-thumb { opacity: 1; }
.seg-sm button { height: 28px; min-width: 0; padding: 0 12px; }

/* ---------------------------------------------------------------- toolbar (shared bits) */
.toolbar { display: flex; align-items: center; gap: 12px; z-index: 30; }
.tb-lead, .tb-centre, .tb-trail { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tb-trail { margin-left: auto; gap: 4px; }
.wordmark { display: inline-flex; align-items: center; gap: 7px; font: 600 21px/1 var(--font-serif); letter-spacing: .005em; white-space: nowrap; }
.wordmark .i { width: 23px; height: 23px; color: #8a6a3d; stroke-width: 1.5; } /* the onboarding's bronze fanlight mark */
[data-theme="dark"] .wordmark .i { color: #c8a46a; }
.sync {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; color: var(--label-2); background: var(--fill); white-space: nowrap; flex: none; max-width: 240px;
}
.sync-text { overflow: hidden; text-overflow: ellipsis; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--label-3); flex: none; }
.sync[data-state="ok"] .sync-dot { background: var(--good-mark); }
.sync[data-state="syncing"] .sync-dot { background: var(--info-mark); animation: pulse 1s ease-in-out infinite; }
.sync[data-state="retrying"] .sync-dot { background: var(--warn-mark); animation: pulse 1.4s ease-in-out infinite; }
.sync[data-state="offline"] .sync-dot { background: var(--bad-mark); }
.sync[data-state="offline"], .sync[data-state="retrying"] { color: var(--label); }
@keyframes pulse { 50% { opacity: .3; } }
.tb-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 12px; border-radius: 10px;
  background: var(--fill); font-size: 13px; font-weight: 500; white-space: nowrap; max-width: 250px; transition: background-color .2s;
}
.tb-pill span { overflow: hidden; text-overflow: ellipsis; }
.tb-pill .i { width: 14px; height: 14px; color: var(--label-3); stroke-width: 2.2; }
.tb-pill:hover { background: var(--fill-2); }
.tb-pill.on { background: var(--tint-soft); color: var(--tint-text); }
.tb-pill.on .i { color: var(--tint-text); }
/* The deck pill (every screen): deck name + "N left" (desktop: on one line; phones: stacked) */
.tb-deck-t { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.tb-deck-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-deck-s { flex: none; font-size: 12px; font-weight: 500; color: var(--label-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-deck-s:empty { display: none; }
.tb-pill.on .tb-deck-s { color: var(--tint-text); opacity: .8; }
/* sync on phones: nothing when all is saved; a dot on the avatar while pending/retrying (amber) or offline (red) */
.av-sync { display: none; position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg-elev); pointer-events: none; }
.av-sync[data-state="syncing"], .av-sync[data-state="pending"] { display: block; background: var(--info-mark); animation: pulse 1s ease-in-out infinite; }
.av-sync[data-state="retrying"] { display: block; background: var(--warn-mark); animation: pulse 1.4s ease-in-out infinite; }
.av-sync[data-state="offline"] { display: block; background: var(--bad-mark); }
@media (min-width: 900px) and (min-height: 540px) { .av-sync { display: none !important; } }
.metrics { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--label-2); white-space: nowrap; }
.metrics .m { display: inline-flex; align-items: center; gap: 4px; }
.metrics b { font-weight: 600; color: var(--label); font-variant-numeric: tabular-nums; }
.metrics .i { width: 14px; height: 14px; }
.metrics .m-hi .i { color: var(--bad-mark); }
.metrics .m-lo .i { color: var(--label-3); stroke-width: 2.4; }
.metrics .m-acc .i { color: var(--tint); }
.tb-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--label); transition: background-color .2s, color .2s;
}
.tb-btn:hover { background: var(--fill); }
.tb-learn .i { width: 17px; height: 17px; color: var(--tint); }
.tb-learn.hot { background: var(--btn); color: var(--on-btn); }
.tb-learn.hot .i { color: var(--on-btn); }
.tb-learn.hot .badge { background: #fff; color: var(--btn); }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--badge); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1;
}
.tb-icon { display: inline-grid; place-items: center; width: 36px; height: 32px; border-radius: 10px; color: var(--label); transition: background-color .2s; position: relative; }
.tb-icon:hover { background: var(--fill); }
.tb-icon[aria-expanded="true"], .tb-icon.on { background: var(--fill-2); }
.tb-icon .i { width: 19px; height: 19px; }
.tb-icon .dot-badge { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--badge); box-shadow: 0 0 0 2px var(--bg-elev); }

/* ---------------------------------------------------------------- stage: ambient + carousel */
.ambient { pointer-events: none; overflow: hidden; z-index: 0; background: var(--bg-sunk); }
.ambient img {
  position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; opacity: 0;
  filter: blur(46px) saturate(165%); transform: translateZ(0); transition: opacity .8s ease;
}
.ambient img.on { opacity: 1; }
.ambient::after { content: ""; position: absolute; inset: 0; background: var(--stage-veil); }
.stage { overflow: hidden; }
.carousel {
  position: absolute; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  transition: transform .4s var(--spring), opacity .3s var(--ease-out);
}
.carousel::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; overflow: hidden; }
/* Never upscaled, never cropped: the photo keeps its own aspect ratio and is capped at its natural size. */
.photo {
  position: absolute; inset: 0; margin: auto; display: block; width: auto; height: auto; max-width: 100%; max-height: 100%;
  -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; transition: opacity .35s ease;
}
.photo.loading { opacity: 0; }
.slide.zoomable .photo { cursor: zoom-in; }
.slide.zoomed { overflow: auto; overscroll-behavior: contain; }
.slide.zoomed .photo { position: static; margin: 0; max-width: none !important; max-height: none !important; border-radius: 0 !important; box-shadow: none !important; cursor: zoom-out; }
html.enlarge .slide:not(.slide-fp) .photo { width: 100%; height: 100%; object-fit: contain; box-shadow: none !important; border-radius: 0 !important; }
.slide-fp .photo { background: #fff; }
.slide-label {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); pointer-events: none; white-space: nowrap;
}
.sv-holder { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .18); overflow: hidden; }
.sv-holder iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #1b1f27; }
.sv-load {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 22px; border-radius: 18px;
  color: #fff; font-size: 15px; font-weight: 600; background: rgba(0, 0, 0, .42); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.sv-load .i { width: 34px; height: 34px; stroke-width: 1.5; }
.ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--label-3); text-align: center; padding: 20px; }
.ph-mono { font: 700 64px/1 var(--font-round); letter-spacing: .04em; color: var(--label-3); opacity: .55; }
.ph small { font-size: 13px; }
.slide-loading { display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--fill-2); border-top-color: var(--label-3); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.stage-nav {
  position: absolute; top: 50%; z-index: 4; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%;
  display: grid; place-items: center; color: var(--label); background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border: .5px solid var(--glass-edge); box-shadow: var(--glass-shadow); transition: opacity .2s, transform .14s var(--ease-out);
}
.stage-nav .i { width: 20px; height: 20px; stroke-width: 2.2; }
.stage-nav:active { transform: scale(.92); }
.stage-nav.prev { left: 16px; }
.stage-nav.next { right: 16px; }
.counter { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 14px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.counter:empty { display: none; }
.sb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--label); white-space: nowrap; transition: background-color .2s, transform .14s var(--ease-out); }
.sb-btn .i { width: 18px; height: 18px; }
.sb-btn:hover { background: var(--fill); }
.sb-btn:active { transform: scale(.95); }
.sb-btn.on { background: var(--fill-2); }
.sb-icon { width: 36px; padding: 0; }
.viewer-done { display: none; }
.thumb { position: relative; flex: none; width: 58px; height: 42px; border-radius: 8px; overflow: hidden; background: var(--fill); opacity: .62; transition: opacity .2s, transform .25s var(--spring), box-shadow .2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { opacity: .95; }
.thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--label); transform: scale(1.04); }
.thumb-sv, .thumb-fp-ico { display: grid; place-items: center; color: var(--label); }
.thumb-sv .i { width: 20px; height: 20px; }
.thumb-fp img { background: #fff; object-fit: contain; }

/* card change motion */
.details { transition: transform .4s var(--spring), opacity .3s var(--ease-out); }
.leave-right { transform: translateX(44px); opacity: 0; transition: transform .2s var(--ease-out), opacity .18s ease !important; }
.leave-left  { transform: translateX(-44px); opacity: 0; transition: transform .2s var(--ease-out), opacity .18s ease !important; }
.leave-up    { transform: translateY(-22px); opacity: 0; transition: transform .2s var(--ease-out), opacity .18s ease !important; }
.enter       { transform: translateY(14px) scale(.985); opacity: 0; transition: none !important; }

/* ---------------------------------------------------------------- inspector content */
.skel-wrap { padding-top: 4px; }
.skel { border-radius: 8px; background: var(--skel); animation: skel 1.4s ease-in-out infinite; }
@keyframes skel { 50% { opacity: .45; } }
.eyebrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 600; background: var(--fill); color: var(--label-2); white-space: nowrap;
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.tag-buy { color: var(--info); background: var(--info-soft); }
.tag-rent { color: var(--purple); background: var(--purple-soft); }
.st-live { color: var(--good); background: var(--good-soft); }
.st-under-offer, .st-sold-let { color: var(--warn); background: var(--warn-soft); }
.st-stale { color: var(--bad); background: var(--bad-soft); }
.tag-rated { color: var(--label); }
.tag-rated .dot { background: var(--score); }
.price { font: 700 34px/1.08 var(--font-display); letter-spacing: -.026em; font-variant-numeric: tabular-nums; }
.price small { font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--label-3); margin-left: 6px; }
.price-note { margin-top: 3px; font-size: 12.5px; color: var(--label-3); }
.ppsf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 7px; font-size: 14px; line-height: 1.3; }
.ppsf-v { font-weight: 600; font-variant-numeric: tabular-nums; }
.ppsf-v .u { font-weight: 500; color: var(--label-3); }
.ppsf-cmp { color: var(--label-3); font-variant-numeric: tabular-nums; }
.delta { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 6px; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.over { color: var(--warn); background: var(--warn-soft); }
.delta.under { color: var(--good); background: var(--good-soft); }
.delta.even { color: var(--label-2); background: var(--fill); }
.lowsample { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-soft); }
.info-btn { width: 30px; height: 30px; margin: -5px -6px -5px -4px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--label-3); transition: background-color .2s, color .2s; }
.info-btn .i { width: 17px; height: 17px; }
.info-btn:hover, .info-btn[aria-expanded="true"] { color: var(--tint-text); background: var(--tint-soft); }
.ppsf-note { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--fill); font-size: 12.5px; line-height: 1.45; color: var(--label-2); }
.ppsf-note a { font-weight: 600; white-space: nowrap; }
.address { margin-top: 14px; font: 600 21px/1.22 var(--font-display); letter-spacing: -.016em; overflow-wrap: anywhere; }
.address .pc { color: var(--label-3); font-weight: 500; margin-left: 6px; white-space: nowrap; }
.subtitle { margin-top: 4px; font-size: 14px; line-height: 1.38; color: var(--label-2); }
.actions-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.act {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; height: 54px;
  padding: 0 4px; border-radius: 12px; background: var(--fill); color: var(--tint-text); font-size: 12px; font-weight: 600;
  text-decoration: none !important; transition: background-color .2s, transform .14s var(--ease-out);
}
.act > span:not(.badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act .i { width: 21px; height: 21px; }
.act:hover { background: var(--fill-2); }
.act:active { transform: scale(.96); }
.act.on { background: var(--tint-soft); }
.act .badge { position: absolute; top: 5px; left: calc(50% + 6px); }
.act[aria-disabled="true"] { color: var(--label-3); cursor: default; opacity: .65; }
.verdict { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--fill); font-size: 13.5px; line-height: 1.42; color: var(--label-2); }
.verdict .vtag { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; font-weight: 700; color: var(--label); }
.verdict .vtag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--label-3); }
.v-strong .vtag::before, .v-good .vtag::before { background: var(--good-mark); }
.v-maybe .vtag::before { background: var(--warn-mark); }
.v-weak .vtag::before, .v-reject .vtag::before { background: var(--bad-mark); }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; padding: 11px 0; border-top: .5px solid var(--sep); border-bottom: .5px solid var(--sep); }
.spec { min-width: 0; padding: 0 12px; border-left: .5px solid var(--sep); }
.spec:first-child { padding-left: 0; border-left: 0; }
.spec-k { font-size: 11px; font-weight: 600; letter-spacing: .045em; text-transform: uppercase; color: var(--label-3); }
.spec-v { margin-top: 2px; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.spec-v small { font-size: 12px; font-weight: 500; color: var(--label-3); letter-spacing: 0; }
.spec-v.unk { color: var(--label-3); font-weight: 500; }
.typeline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; line-height: 1.3; background: var(--fill); color: var(--label-2); }
.chip .i { width: 14px; height: 14px; }
.chip-style { color: var(--purple); background: var(--purple-soft); }
.chip-style.warn { color: var(--warn); background: var(--warn-soft); }

.yours { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--fill); }
.yours-top { display: flex; align-items: center; gap: 12px; }
.yours-score { font: 700 30px/1 var(--font-round); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.yours-band { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.yours-band .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--score); }
.yours-when { font-size: 12.5px; color: var(--label-3); }
.yours-c { margin-top: 8px; font-size: 13.5px; line-height: 1.42; color: var(--label-2); font-style: italic; overflow-wrap: anywhere; }
.pred { margin-top: 10px; padding-top: 10px; border-top: .5px solid var(--sep); }
.pred-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13.5px; color: var(--label-2); }
.pred-line b { color: var(--label); font-variant-numeric: tabular-nums; }
.pred-line .off { font-weight: 600; color: var(--label); white-space: nowrap; font-variant-numeric: tabular-nums; }
.retro { font-size: 11px; font-weight: 600; color: var(--label-3); padding: 1px 5px; border-radius: 4px; background: var(--fill); }
.cmp-bar { position: relative; height: 6px; margin: 12px 6px 4px; border-radius: 3px; background: var(--track); }
.cmp-bar i { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; left: calc(var(--x) * 1%); box-shadow: 0 0 0 2px var(--bg-elev); }
.cmp-you { background: var(--score); z-index: 1; }
.cmp-hh { background: var(--label-2); }
.cmp-key { display: flex; gap: 12px; font-size: 11.5px; color: var(--label-3); margin-top: 6px; }
.cmp-key span { display: inline-flex; align-items: center; gap: 5px; }
.cmp-key span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--label-2); }
.cmp-key .k-you::before { background: var(--score); }
.why { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.why span { display: inline-flex; gap: 4px; align-items: baseline; padding: 3px 9px; border-radius: 999px; font-size: 12px; background: var(--bg-elev); color: var(--label-2); box-shadow: inset 0 0 0 .5px var(--sep); }
.why b { font-weight: 700; font-variant-numeric: tabular-nums; }
.why .neg b { color: var(--bad); }
.why .pos b { color: var(--good); }

.street { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 16px; padding: 12px; border-radius: 14px; background: var(--fill); }
.ring { position: relative; width: 46px; height: 46px; display: grid; place-items: center; font: 700 15px/1 var(--font-round); font-variant-numeric: tabular-nums; --ring: var(--label-3); }
.ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--p, 0) * 1%), var(--track) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4.5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4.5px), #000 calc(100% - 4px));
}
.street.good .ring { --ring: var(--good-mark); }
.street.mid .ring { --ring: var(--warn-mark); }
.street.bad .ring { --ring: var(--bad-mark); }
.street-t { font-size: 14px; font-weight: 600; }
.street-t b { font-variant-numeric: tabular-nums; }
.street-t .was { margin-left: 6px; font-size: 12.5px; font-weight: 500; color: var(--label-3); }
.street-v { margin-top: 2px; font-size: 13.5px; line-height: 1.42; color: var(--label-2); overflow-wrap: anywhere; }
.street-v.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.street-more { margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--tint-text); border-radius: 4px; }
.street-m { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; font-size: 12.5px; line-height: 1.35; }
.street-m .i { width: 14px; height: 14px; margin-right: 3px; vertical-align: -2px; stroke-width: 2.2; }
.walked { color: var(--good); font-weight: 500; }
.nowalk { color: var(--warn); font-weight: 500; }
.busy { color: var(--bad); font-weight: 600; }

/* what's nearby (9 Oct 2026): a concierge line on the card that opens into the full section in place */
.nb { margin-top: 16px; border-radius: 14px; background: var(--fill); }
.nb-sum {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 1px; align-items: center;
  width: 100%; padding: 12px; border-radius: 14px; text-align: left; transition: background-color .2s;
}
@media (hover: hover) { .nb-sum:hover { background: var(--fill); } }
.nb-ic { grid-column: 1; grid-row: 1 / span 2; align-self: start; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-elev); color: var(--tint-text); box-shadow: inset 0 0 0 .5px var(--sep); }
.nb-ic .i { width: 18px; height: 18px; }
.nb-k { grid-column: 2; grid-row: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; min-width: 0; font-size: 11px; font-weight: 600; letter-spacing: .045em; text-transform: uppercase; color: var(--label-3); }
.nb-cue { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--tint-text); white-space: nowrap; }
.nb-cue .i { width: 13px; height: 13px; stroke-width: 2.6; }
.nb-t {
  grid-column: 2; grid-row: 2; font-size: 13.5px; line-height: 1.42; color: var(--label-2); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nb-t b { font-weight: 600; color: var(--label); }
.nb-sep { color: var(--label-3); }
.nb-chev { grid-column: 3; grid-row: 1 / span 2; width: 18px; height: 18px; color: var(--label-3); transition: transform .3s var(--ease); }
.nb-sum[aria-expanded="true"] .nb-chev { transform: rotate(180deg); }
.nb-panel { margin: 0 12px; padding-bottom: 12px; border-top: .5px solid var(--sep); }
.nb-grp { padding: 14px 0 2px; }
.nb-grp + .nb-grp { margin-top: 10px; border-top: .5px solid var(--sep); }
.nb-h { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--label); }
.nb-h > .i { width: 17px; height: 17px; color: var(--label-3); }
.nb-fitlbl { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; height: 21px; padding: 0 8px 0 6px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--tint-text); background: var(--tint-soft); white-space: nowrap; }
.nb-fitlbl .i { width: 12px; height: 12px; stroke-width: 2.8; }
.nb-counts { margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--label-3); font-variant-numeric: tabular-nums; }
.nb-miss { margin-top: 5px; font-size: 12.5px; line-height: 1.4; color: var(--label-2); font-style: italic; }
.nb-empty { margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--label-3); }
.nb-sub { margin: 12px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .045em; text-transform: uppercase; color: var(--label-3); }
.nb-list { list-style: none; margin: 0; padding: 0; }
.nb-row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; }
.nb-row + .nb-row { border-top: .5px solid var(--sep); }
.nb-main { flex: 1; min-width: 0; }
.nb-line { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; }
.nb-name { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--label); overflow-wrap: anywhere; }
a.nb-name:hover { color: var(--tint-text); }
.nb-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; color: var(--label-2); background: var(--bg-elev); box-shadow: inset 0 0 0 .5px var(--sep); white-space: nowrap; }
.nb-fit-ic { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--tint); color: #fff; }
.nb-fit-ic .i { width: 10px; height: 10px; stroke-width: 3.4; }
.nb-grade { margin-top: 2px; font-size: 12.5px; line-height: 1.38; color: var(--label-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.nb-grade.t-top { color: var(--tint-text); font-weight: 600; }
.nb-grade.t-warn { color: var(--warn); }
.nb-muted { color: var(--label-3); font-weight: 400; }
.nb-subline { margin-top: 1px; font-size: 12px; line-height: 1.35; color: var(--label-3); }
.nb-badge { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; color: var(--label-2); box-shadow: inset 0 0 0 1px var(--sep-2); }
.nb-d { flex: none; padding-top: 1px; font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nb-more { display: inline-flex; align-items: center; gap: 2px; min-height: 28px; font-size: 12.5px; font-weight: 600; color: var(--tint-text); border-radius: 4px; }
.nb-more .i { width: 14px; height: 14px; stroke-width: 2.2; transition: transform .25s var(--ease); }
.nb-more[aria-expanded="true"] .i { transform: rotate(180deg); }
.nb-areas { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; margin: 2px 0 4px; padding: 8px 10px; border-radius: 10px; background: var(--bg-elev); font-size: 12px; line-height: 1.35; }
.nb-areas dt { color: var(--label-3); }
.nb-areas dd { margin: 0; text-align: right; color: var(--label-2); }
.nb-areas dd.t-top { color: var(--tint-text); font-weight: 600; }
.nb-areas dd.t-warn { color: var(--warn); }
.nb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.nb-stat { min-width: 0; padding: 8px 4px 7px; border-radius: 10px; text-align: center; background: var(--bg-elev); box-shadow: inset 0 0 0 .5px var(--sep); }
.nb-stat b { display: block; font: 600 19px/1.1 var(--font-round); font-variant-numeric: tabular-nums; color: var(--label); }
.nb-stat span:not(.sr) { display: block; margin-top: 2px; font-size: 11px; color: var(--label-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-stat.zero b { color: var(--label-3); font-weight: 500; }
.nb-stat.fit { box-shadow: inset 0 0 0 1px var(--tint); }
.nb-stat.fit b { color: var(--tint-text); }
.nb-names { margin-top: 9px; font-size: 12.5px; line-height: 1.5; color: var(--label-3); overflow-wrap: anywhere; }
.nb-names b { font-weight: 600; color: var(--label-2); margin-right: 3px; }
.nb-foot { margin-top: 14px; padding-top: 10px; border-top: .5px solid var(--sep); font-size: 11.5px; line-height: 1.45; color: var(--label-3); overflow-wrap: anywhere; }
.nb-foot p + p { margin-top: 3px; }

.sec { margin-top: 20px; }
.sec-h { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; font-size: 13px; font-weight: 600; color: var(--label-2); }
.sec-h .n { font-weight: 500; color: var(--label-3); font-variant-numeric: tabular-nums; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.facts li { position: relative; padding-left: 28px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.facts li b { font-weight: 600; }
.facts .mk { position: absolute; left: 0; top: 0; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; }
.facts .mk .i { width: 12px; height: 12px; stroke-width: 2.8; }
.facts-good .mk { background: var(--good-soft); color: var(--good); }
.facts-warn .mk { background: var(--warn-soft); color: var(--warn); }
.facts-ask .mk { background: var(--info-soft); color: var(--info); }
.facts-ask li { color: var(--label-2); }
.lcsrc { margin-top: 10px; font-size: 12px; color: var(--label-3); }
.note-peek {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 18px; padding: 12px; border-radius: 14px;
  background: var(--fill); text-align: left; transition: background-color .2s;
}
.note-peek:hover { background: var(--fill-2); }
.np-ic { position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(140deg, #5e5ce6, #0a84ff); }
.np-ic .i { width: 18px; height: 18px; }
.np-dot { position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--badge); box-shadow: 0 0 0 2px var(--bg-elev); }
.np-body { flex: 1; min-width: 0; }
.np-h { display: block; font-size: 12px; color: var(--label-3); }
.np-h b { color: var(--label-2); font-weight: 600; }
.np-t { display: block; margin-top: 1px; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-peek > .i { color: var(--label-3); width: 16px; height: 16px; }
.meta { margin-top: 20px; padding-top: 14px; border-top: .5px solid var(--sep); font-size: 12.5px; line-height: 1.5; color: var(--label-3); overflow-wrap: anywhere; }
.meta-k { font-weight: 600; color: var(--label-2); }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.link-chip { display: inline-flex; align-items: center; gap: 3px; height: 32px; padding: 0 11px; border-radius: 9px; background: var(--fill); font-size: 13px; font-weight: 600; color: var(--tint-text); }
.link-chip .i { width: 13px; height: 13px; stroke-width: 2.2; }
.link-chip:hover { background: var(--fill-2); text-decoration: none; }
.link-chip.strong { background: var(--tint-soft); }
.empty { padding: 40px 8px; text-align: center; }
.empty-glyph { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #34c759, #30b0c7); box-shadow: 0 10px 24px rgba(52, 199, 89, .3); }
.empty-glyph .i { width: 32px; height: 32px; stroke-width: 2.4; }
.empty h2 { font: 600 28px/1.15 var(--font-serif); letter-spacing: 0; }
.empty p { margin-top: 6px; color: var(--label-2); font-size: 14.5px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }

/* ---------------------------------------------------------------- the rating instrument */
.rater { display: grid; }
.instrument, .composer { grid-area: 1 / 1; min-width: 0; }
.readout { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.readout-val { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 12px; height: 52px; }
.score-num {
  min-width: 3ch; padding: 0 6px; border-radius: 10px; text-align: center; cursor: text; -webkit-user-select: none; user-select: none;
  font: 700 46px/1.1 var(--font-round); letter-spacing: -.025em; font-variant-numeric: tabular-nums; color: var(--label);
  transition: background-color .2s, transform .22s var(--spring);
}
.score-num:hover { background: var(--fill); }
.score-num.bump { transform: scale(1.06); }
.score-input {
  width: 3.4ch; height: 50px; border: 0; border-radius: 10px; padding: 0 4px; text-align: center; background: var(--fill);
  font: 700 44px/1 var(--font-round); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--label); box-shadow: 0 0 0 3px var(--focus);
}
.band-pill { display: inline-flex; align-items: center; gap: 7px; min-width: 7.2em; font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--label); white-space: nowrap; }
.band-pill::before { content: ""; width: 11px; height: 11px; border-radius: 50%; flex: none; background: var(--score); box-shadow: 0 0 0 3px color-mix(in srgb, var(--score) 24%, transparent); transition: background-color .2s; }
.band-pill.swap { animation: bandSwap .34s var(--spring); }
@keyframes bandSwap { from { transform: translateY(5px); opacity: .25; } }
.stepper { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--label); transition: background-color .15s, transform .14s var(--ease-out); }
.stepper .i { width: 18px; height: 18px; stroke-width: 2.4; }
.stepper:hover { background: var(--fill-2); }
.stepper:active { transform: scale(.9); }
.track-wrap { position: relative; margin-top: 8px; --pad: 15px; }
.track { position: relative; height: 40px; border-radius: 20px; cursor: pointer; touch-action: pan-y; outline: none; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 12px; margin-top: -6px; border-radius: 6px; background: var(--track); }
.track-fill {
  position: absolute; left: 0; top: 50%; height: 12px; margin-top: -6px; border-radius: 6px; background: var(--score);
  width: calc(var(--pad) + (100% - 2 * var(--pad)) * var(--v, 50) / 100); transition: width .22s var(--ease-out), background-color .2s;
}
.track-notch { position: absolute; top: 50%; width: 2px; height: 12px; margin: -6px 0 0 -1px; border-radius: 1px; background: var(--notch); left: calc(var(--pad) + (100% - 2 * var(--pad)) * var(--at) / 100); }
.track-notch.tick { animation: notch .42s var(--spring); }
@keyframes notch { 35% { transform: scaleY(2.2); background: var(--label); } }
.track-thumb {
  position: absolute; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--thumb);
  left: calc(var(--pad) + (100% - 2 * var(--pad)) * var(--v, 50) / 100);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2), 0 0 0 .5px rgba(0, 0, 0, .1); transition: left .22s var(--ease-out), transform .24s var(--spring);
}
.track-thumb::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--score); transition: background-color .2s; }
.track.dragging .track-fill, .track.dragging .track-thumb { transition-property: transform, background-color; }
.track.dragging .track-thumb { transform: scale(1.14); }
.track:focus-visible .track-thumb { box-shadow: 0 0 0 4px var(--focus), 0 3px 10px rgba(0, 0, 0, .2); }
.scale { position: relative; height: 28px; margin: 0 var(--pad); }
.scale::before {
  content: ""; position: absolute; left: 0; right: -1px; top: 1px; height: 7px;
  background:
    repeating-linear-gradient(90deg, var(--sep-2) 0 1px, transparent 1px 10%) top / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, var(--sep) 0 1px, transparent 1px 5%) top / 100% 4px no-repeat;
}
.scale-l { position: absolute; top: 11px; left: calc(var(--at) * 1%); transform: translateX(-50%); font-size: 11px; font-weight: 500; color: var(--label-3); white-space: nowrap; transition: color .2s; }
.scale-l.scale-end { left: auto; right: calc(-1 * var(--pad)); transform: none; }
.scale-l.on { color: var(--label); font-weight: 650; }
.scrub-hint {
  position: absolute; left: 50%; top: -30px; z-index: 3; transform: translate(-50%, 4px); padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; color: var(--label); background: var(--glass-hi); box-shadow: var(--glass-shadow);
  opacity: 0; transition: opacity .2s, transform .25s var(--spring); pointer-events: none; white-space: nowrap;
}
.scrub-hint.on { opacity: 1; transform: translate(-50%, 0); }
.rater-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.rater-actions .btn-primary { flex: 1; }
.keys-hint { margin-top: 8px; font-size: 11.5px; color: var(--label-3); text-align: center; }
.composer-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; min-width: 0; }
.staged-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--fill); font-size: 14px; font-weight: 600; flex: none; transition: background-color .2s; }
.staged-pill:hover { background: var(--fill-2); }
.staged-pill .i { width: 16px; height: 16px; stroke-width: 2.4; color: var(--label-3); }
.staged-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--score); }
.staged-pill b { font: 700 18px/1 var(--font-round); font-variant-numeric: tabular-nums; }
.composer-q { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#comment {
  display: block; width: 100%; height: 64px; resize: none; border: 0; border-radius: 12px; padding: 10px 12px;
  background: var(--fill); color: var(--label); font-size: 15px; line-height: 1.4;
}
#comment:focus { box-shadow: 0 0 0 3px var(--focus); }
#comment::placeholder, textarea::placeholder, input::placeholder { color: var(--label-3); opacity: 1; }
.phrases { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 8px; padding: 1px; }
.phrases::-webkit-scrollbar { display: none; }
.phrase { flex: none; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--label-2); box-shadow: inset 0 0 0 1px var(--sep-2); transition: background-color .15s, color .15s; }
.phrase:hover { background: var(--fill); color: var(--label); }
.phrase.used { background: var(--tint-soft); color: var(--tint-text); box-shadow: none; }
.composer-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ---------------------------------------------------------------- panels (History, Notes) */
.scrim { position: fixed; inset: 0; z-index: 38; background: rgba(0, 0, 0, .32); animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.panel { position: fixed; z-index: 40; display: flex; flex-direction: column; background: var(--panel); visibility: hidden; }
.panel.open { visibility: visible; }
.grabber { display: none; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px 20px; flex: none; }
.panel-titles { flex: 1; min-width: 0; }
.panel-title { flex: 1; font: 600 26px/1.15 var(--font-serif); letter-spacing: 0; }
.panel-sub { margin-top: 2px; font-size: 13px; color: var(--label-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-tools { padding: 0 20px 10px; flex: none; }
.panel-tools .segmented { display: flex; }
.panel-tools .segmented button { flex: 1; }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 24px; }
.accline { margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--tint-soft); font-size: 13px; line-height: 1.4; color: var(--label-2); }
.accline b { color: var(--label); font-variant-numeric: tabular-nums; }
.accline .i { width: 15px; height: 15px; color: var(--tint); margin-right: 4px; vertical-align: -3px; }
.patterns { margin-bottom: 6px; border-radius: 12px; background: var(--fill); }
.patterns summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 10px 12px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; border-radius: 12px; }
.patterns summary::-webkit-details-marker { display: none; }
.patterns summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--label-3); border-bottom: 2px solid var(--label-3); transform: rotate(-45deg); margin-right: 4px; transition: transform .2s; align-self: center; }
.patterns[open] summary::before { transform: rotate(45deg); }
.sum-sub { font-size: 12px; font-weight: 500; color: var(--label-3); }
#patterns { padding: 2px 12px 12px; }
.pt-h { margin: 10px 0 4px; font-size: 12px; font-weight: 600; color: var(--label-2); }
.pt-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 28px 28px; align-items: center; gap: 8px; min-height: 22px; font-size: 12.5px; }
.pt-k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--label-2); }
.pt-bar { position: relative; height: 8px; }
.pt-bar::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--sep-2); }
.pt-bar i { position: absolute; top: 0; height: 8px; border-radius: 2px; }
.pt-bar i.pos { left: 50%; width: calc((var(--a) - 50) * 1%); background: #1f6fd1; border-radius: 0 3px 3px 0; }
.pt-bar i.neg { right: 50%; width: calc((50 - var(--a)) * 1%); background: #d03b3b; border-radius: 3px 0 0 3px; }
.pt-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-n { text-align: right; color: var(--label-3); font-variant-numeric: tabular-nums; }
.pt-legend { margin-top: 10px; font-size: 11.5px; color: var(--label-3); }
.hlist { list-style: none; margin: 0; padding: 0; }
.hrow { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: .5px solid var(--sep); align-items: start; }
.hthumb { width: 60px; height: 45px; border-radius: 8px; object-fit: cover; display: block; background: var(--fill); }
.htitle { font-size: 14.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.hprice { font-weight: 500; color: var(--label-3); white-space: nowrap; }
.hmeta { margin-top: 2px; font-size: 12px; color: var(--label-3); line-height: 1.35; }
.hcomment { margin-top: 5px; font-size: 13.5px; line-height: 1.4; color: var(--label-2); font-style: italic; overflow-wrap: anywhere; }
.hbtns { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 8px; }
.hbtns button { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: var(--fill); color: var(--tint-text); }
.hbtns button:hover { background: var(--fill-2); }
.hbtns .danger { color: var(--bad); }
.hscore { text-align: right; }
.hscore b { display: block; font: 700 22px/1 var(--font-round); font-variant-numeric: tabular-nums; }
.hmeter { display: block; width: 40px; height: 4px; margin: 6px 0 0 auto; border-radius: 2px; background: var(--track); overflow: hidden; }
.hmeter::after { content: ""; display: block; height: 100%; width: calc(var(--v) * 1%); background: var(--score); }
.hrow.superseded { opacity: .45; }
.hempty { padding: 24px 0; color: var(--label-3); text-align: center; font-size: 14px; }

.nlist { list-style: none; margin: 0; padding: 4px 16px 16px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; }
.nempty { padding: 24px 8px; color: var(--label-3); text-align: center; font-size: 14px; line-height: 1.45; }
.note-card { padding: 12px 14px; border-radius: 16px; background: var(--fill); }
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 12.5px; color: var(--label-3); }
.note-head b { color: var(--label); font-weight: 600; }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 10px; font-weight: 700; color: #fff; background: linear-gradient(140deg, #5e5ce6, #0a84ff); }
.note-title { margin-bottom: 4px; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.note-text { font-size: 14px; line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.note-imgs a { display: block; border-radius: 10px; overflow: hidden; background: var(--fill); }
.note-imgs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.note-imgs a:hover img { transform: scale(1.03); }
.note-me { align-self: flex-end; max-width: 86%; }
.note-them { align-self: flex-start; max-width: 86%; }
.bubble { padding: 9px 13px; font-size: 14.5px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-me .bubble { background: var(--btn); color: #fff; border-radius: 18px 18px 5px 18px; }
.note-them .bubble { background: var(--fill-2); border-radius: 18px 18px 18px 5px; }
.bubble-meta { margin: 3px 8px 0; font-size: 11.5px; color: var(--label-3); }
.note-me .bubble-meta { text-align: right; }
.pend { opacity: .6; }
.ncompose { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px calc(10px + var(--sab)); border-top: .5px solid var(--sep); background: var(--panel); }
.ncompose .segmented { align-self: flex-start; }
.nreply { display: flex; align-items: flex-end; gap: 8px; }
#noteText { flex: 1; min-height: 40px; max-height: 140px; resize: none; padding: 9px 14px; border-radius: 20px; border: 0; background: var(--fill); font-size: 15px; line-height: 1.35; color: var(--label); }
#noteText:focus { box-shadow: 0 0 0 3px var(--focus); }
.send-btn { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--btn); color: #fff; transition: transform .14s var(--ease-out), opacity .2s; }
.send-btn .i { width: 18px; height: 18px; stroke-width: 2.6; }
.send-btn:active { transform: scale(.9); }

/* ---------------------------------------------------------------- shortlist */
.shortlist { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; background: var(--bg); opacity: 0; transform: scale(.985); transition: opacity .25s ease, transform .35s var(--spring); }
.shortlist.open { opacity: 1; transform: none; }
.sl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: calc(var(--sat) + 18px) calc(var(--sar) + 24px) 14px calc(var(--sal) + 28px); flex: none; }
.sl-titles { min-width: 0; margin-right: auto; }
.sl-title { font: 600 38px/1.05 var(--font-serif); letter-spacing: -.005em; }
.sl-sub { margin-top: 3px; font-size: 13.5px; color: var(--label-3); }
.sl-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.sl-filters button { height: 32px; padding: 0 13px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--fill); color: var(--label-2); transition: background-color .2s, color .2s; }
.sl-filters button[aria-pressed="true"] { background: var(--label); color: var(--bg-elev); font-weight: 600; }
.sl-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; align-content: start; padding: 6px calc(var(--sar) + 28px) calc(var(--sab) + 40px) calc(var(--sal) + 28px); }
.sl-card { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--bg-elev); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 10px 30px rgba(0, 0, 0, .06); transition: transform .3s var(--spring), box-shadow .3s; }
.sl-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 18px 40px rgba(0, 0, 0, .12); }
.sl-img { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; background: var(--fill); overflow: hidden; }
.sl-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sl-img .np-dot { top: 10px; right: 10px; width: 12px; height: 12px; }
.sl-badge { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.sl-badge b { font: 700 15px/1 var(--font-round); font-variant-numeric: tabular-nums; }
.sl-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--score); }
.sl-body { flex: 1; display: flex; flex-direction: column; gap: 7px; padding: 14px 16px 16px; font-size: 13px; }
.sl-h { font: 600 16.5px/1.25 var(--font-display); letter-spacing: -.012em; overflow-wrap: anywhere; }
.sl-h span { color: var(--label-3); font-weight: 500; margin-left: 4px; font-size: 14px; }
.sl-p { font-weight: 600; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.sl-p .ppsf-cmp { font-weight: 500; }
.sl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sl-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--fill); color: var(--label-2); }
.sl-pill .i { width: 13px; height: 13px; stroke-width: 2.2; }
.sl-pill.good { color: var(--good); background: var(--good-soft); }
.sl-pill.mid { color: var(--warn); background: var(--warn-soft); }
.sl-pill.bad { color: var(--bad); background: var(--bad-soft); }
.sl-g { display: flex; flex-wrap: wrap; gap: 5px; }
.sl-g span { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--tint-text); background: var(--tint-soft); }
.sl-g .i { width: 12px; height: 12px; }
.slc { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 3px; font-size: 12.5px; line-height: 1.35; }
.slc li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--label-2); }
.slc li b { font-weight: 600; margin-right: 3px; }
.slc .y b { color: var(--good); } .slc .n b { color: var(--bad); } .slc .u b { color: var(--warn); }
.sln { font-size: 12.5px; line-height: 1.4; color: var(--label-2); padding-left: 9px; border-left: 2px solid var(--tint); }
.sln b { color: var(--label); }
.slq { font-size: 12.5px; }
.slq b { font-weight: 600; }
.slq ul { margin: 3px 0 0; padding-left: 16px; color: var(--label-2); line-height: 1.4; }
.sl-actions { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; }
.sl-actions a { margin-left: auto; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.sl-actions a .i { width: 13px; height: 13px; stroke-width: 2.2; }
.sl-empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--label-3); font-size: 15px; }

/* ---------------------------------------------------------------- popover menus */
.pop-scrim { position: fixed; inset: 0; z-index: 69; background: rgba(0, 0, 0, .3); animation: fadeIn .2s ease; }
.popover {
  position: fixed; z-index: 70; min-width: 260px; max-width: min(380px, calc(100vw - 16px)); max-height: min(72vh, 600px); overflow-y: auto;
  padding: 6px; border-radius: 14px; background: var(--glass-hi); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border: .5px solid var(--glass-edge); box-shadow: 0 22px 54px rgba(0, 0, 0, .24), 0 2px 8px rgba(0, 0, 0, .1);
  transform-origin: top center; animation: popIn .24s var(--spring); overscroll-behavior: contain;
}
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(-4px); } }
.pop-title { padding: 8px 10px 6px; font-size: 13px; font-weight: 600; color: var(--label-2); }
.pop-h { padding: 9px 10px 3px; font-size: 12px; font-weight: 600; color: var(--label-3); }
.pop-sep { height: .5px; margin: 5px 8px; background: var(--sep); }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 6px 10px; border-radius: 8px; text-align: left; font-size: 14px; color: var(--label); }
.pop-item:hover, .pop-item:focus-visible { background: var(--tint); color: #fff; outline: none; }
.pop-item:hover .pop-count, .pop-item:focus-visible .pop-count, .pop-item:hover .i, .pop-item:focus-visible .i { color: inherit; }
.pop-item .i { width: 17px; height: 17px; color: var(--label-2); }
.pop-item.danger { color: var(--bad); }
.pop-item.danger:hover, .pop-item.danger:focus-visible { background: var(--bad-mark); color: #fff; }
.pop-check { width: 16px; display: grid; place-items: center; visibility: hidden; flex: none; }
.pop-check .i { width: 15px; height: 15px; stroke-width: 2.6; color: inherit; }
.pop-item[aria-checked="true"] .pop-check { visibility: visible; }
.pop-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-count { font-size: 12.5px; color: var(--label-3); font-variant-numeric: tabular-nums; }
.pop-sub { display: block; margin-top: 1px; font-size: 12.5px; color: var(--label-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-item:hover .pop-sub, .pop-item:focus-visible .pop-sub { color: inherit; opacity: .82; }
.pop-note { display: flex; align-items: center; gap: 8px; padding: 2px 10px 8px; font-size: 13px; color: var(--label-2); }
.pop-note[data-state="ok"] .sync-dot { background: var(--good-mark); }
.pop-note[data-state="syncing"] .sync-dot, .pop-note[data-state="pending"] .sync-dot { background: var(--info-mark); }
.pop-note[data-state="retrying"] .sync-dot { background: var(--warn-mark); }
.pop-note[data-state="offline"] .sync-dot { background: var(--bad-mark); }
.pop-note[data-state="offline"], .pop-note[data-state="retrying"] { color: var(--label); font-weight: 600; }
.hmetrics { flex-wrap: wrap; gap: 8px 14px; margin: 2px 0 12px; }
.pop-item kbd { background: transparent; box-shadow: none; color: inherit; opacity: .6; }
.pop-seg { display: flex; padding: 2px; margin: 4px 4px 6px; border-radius: 10px; background: var(--fill); }
.pop-seg button { flex: 1; height: 32px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--label-2); }
.pop-seg button[aria-checked="true"] { background: var(--seg-on); color: var(--label); box-shadow: 0 3px 8px rgba(0, 0, 0, .12); }
.switch { position: relative; width: 38px; height: 23px; border-radius: 12px; flex: none; background: var(--fill-2); transition: background-color .22s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--spring); }
[aria-checked="true"] > .switch { background: var(--good-mark); }
[aria-checked="true"] > .switch::after { transform: translateX(15px); }

/* ---------------------------------------------------------------- dialogs */
dialog { padding: 0; border: 0; border-radius: 18px; background: var(--bg-elev); color: var(--label); width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(0, 0, 0, .34); }
dialog[open] { animation: dlgIn .3s var(--spring); }
@keyframes dlgIn { from { opacity: 0; transform: scale(.94); } }
.dlg { display: flex; flex-direction: column; gap: 12px; padding: 20px; max-height: calc(100dvh - 48px); }
.dlg-wide { width: 100%; }
dialog:has(.dlg-wide) { width: min(640px, calc(100vw - 32px)); }
.dlg h3 { font: 600 18px/1.3 var(--font-display); letter-spacing: -.012em; }
.dlg p { color: var(--label-2); font-size: 14px; line-height: 1.45; }
.dlg p code { font-family: var(--font-mono); font-size: 12.5px; background: var(--fill); padding: 1px 4px; border-radius: 4px; }
.dlg-sub { margin-top: 2px; font-size: 13px !important; color: var(--label-3) !important; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.dlg-alert { text-align: left; }
.dlg-foot { font-size: 12.5px !important; color: var(--label-3) !important; }
.field { width: 100%; height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--fill); font-size: 15px; color: var(--label); }
.field:focus { box-shadow: 0 0 0 3px var(--focus); }
textarea.field { height: auto; min-height: 200px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.mono { font-family: var(--font-mono) !important; font-size: 12.5px !important; }
.glist { display: flex; flex-direction: column; max-height: 46vh; overflow-y: auto; margin: 0 -8px; }
.grow { display: flex; align-items: center; gap: 4px; padding: 0 4px 0 8px; border-radius: 10px; }
.grow:hover { background: var(--fill); }
.grow label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.grow input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gcheck { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--sep-2); color: transparent; transition: background-color .2s, color .2s; }
.gcheck .i { width: 14px; height: 14px; stroke-width: 2.8; }
.grow input:checked + .gcheck { background: var(--tint); color: #fff; box-shadow: none; }
.grow input:focus-visible + .gcheck { outline: 3px solid var(--focus); outline-offset: 2px; }
.gname { flex: 1; min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcount { font-size: 13px; color: var(--label-3); font-variant-numeric: tabular-nums; }
.gdel { width: 36px; height: 36px; color: var(--label-3); }
.gdel:hover { color: var(--bad); background: var(--bad-soft); }
.gdel .i { width: 17px; height: 17px; }
.gnew { display: flex; gap: 8px; }
.gempty { padding: 6px 8px 10px; color: var(--label-3); font-size: 14px; line-height: 1.45; }
.keys { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
.keys div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: .5px solid var(--sep); }
.keys dt { white-space: nowrap; }
.keys dd { margin: 0; font-size: 13px; color: var(--label-2); line-height: 1.4; }

/* ---------------------------------------------------------------- toast / reveal */
.toast {
  position: fixed; z-index: 90; left: 50%; top: calc(var(--sat) + 64px); display: flex; align-items: center; gap: 12px;
  max-width: min(560px, calc(100vw - 24px)); padding: 11px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; line-height: 1.35;
  background: var(--glass-hi); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border: .5px solid var(--glass-edge); box-shadow: 0 14px 44px rgba(0, 0, 0, .2), 0 1px 3px rgba(0, 0, 0, .1);
  opacity: 0; pointer-events: none; transform: translate(-50%, -12px) scale(.97); transition: opacity .2s ease, transform .38s var(--spring);
}
.toast:empty { display: none; }
.toast.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.toast.has-act { padding-right: 8px; }
.toast-act { flex: none; height: 32px; padding: 0 13px; border-radius: 999px; background: var(--fill); color: var(--tint-text); font-size: 13px; font-weight: 600; }
.toast-act:hover { background: var(--fill-2); }
.toast.rich { border-radius: 20px; padding: 14px 14px 14px 16px; align-items: flex-start; width: min(420px, calc(100vw - 24px)); }
.rv { flex: 1; min-width: 0; }
.rv-h { font-size: 13px; color: var(--label-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-h b { color: var(--label); font-weight: 600; }
.rv-nums { display: flex; align-items: flex-end; gap: 18px; margin-top: 6px; }
.rv-n { display: flex; flex-direction: column; }
.rv-n span { font-size: 11.5px; font-weight: 600; color: var(--label-3); }
.rv-n b { font: 700 28px/1.05 var(--font-round); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.rv-off { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--label-2); padding-bottom: 3px; white-space: nowrap; }
.rv .cmp-bar { margin: 12px 6px 2px; }
.rv .cmp-bar i { box-shadow: 0 0 0 2px var(--glass-hi); }
.rv .why { margin-top: 10px; }

/* =====================================================================
   PHONE + TABLET (default below the desktop breakpoint)
   ===================================================================== */
@media (max-width: 899.98px), (max-height: 539.98px) {
  body { min-height: 100dvh; }
  .toolbar {
    position: fixed; top: 0; left: 0; right: 0; gap: 8px;
    padding: calc(var(--sat) + 6px) calc(var(--sar) + 10px) 6px calc(var(--sal) + 10px);
    transition: background-color .25s, box-shadow .25s;
  }
  /* One compact bar over the photo: Deck · Learn · Shortlist · You. History, the counts, the sync words and More (⋯)
     are in the account menu; the starter note is in the deck pill. */
  .toolbar .tb-lead, .toolbar #stats, .toolbar #btnHistory, .toolbar #btnMore { display: none; }
  .toolbar .tb-deck-t { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.15; }
  .toolbar .tb-deck-s { margin-top: 1px; font-size: 11.5px; color: var(--label-2); }
  .toolbar .tb-centre { min-width: 0; flex: 1 1 auto; }
  .toolbar .tb-trail { flex: none; gap: 6px; }
  .toolbar .tb-pill, .toolbar .tb-icon, .toolbar .tb-btn {
    height: 44px; min-width: 44px; border-radius: 22px; color: var(--label); background: var(--glass);
    -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    border: .5px solid var(--glass-edge); box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
  }
  .toolbar .tb-pill { padding: 0 12px 0 16px; font-size: 15px; font-weight: 600; max-width: 100%; }
  .toolbar .tb-pill .i { width: 15px; height: 15px; color: var(--label-2); }
  .toolbar .tb-icon { width: 44px; }
  .toolbar .tb-icon .i, .toolbar .tb-btn .i { width: 21px; height: 21px; }
  .toolbar .tb-learn { padding: 0; width: 44px; justify-content: center; }
  .toolbar .tb-learn .tb-label { display: none; }
  .toolbar .tb-learn .badge { position: absolute; top: -3px; right: -3px; box-shadow: 0 0 0 2px var(--bg-elev); }
  .toolbar .tb-learn.hot { background: var(--btn); }
  /* at 5+ new ratings Learn says its name, so it asks to be pressed exactly when that's worthwhile */
  .toolbar .tb-learn.hot { width: auto; padding: 0 14px 0 12px; gap: 6px; }
  .toolbar .tb-learn.hot .tb-label { display: inline; }
  .toolbar .tb-learn.hot .badge { position: static; box-shadow: none; }
  html.scrolled .toolbar { background: var(--glass-hi); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: 0 .5px 0 var(--sep); }
  html.scrolled .toolbar .tb-pill, html.scrolled .toolbar .tb-icon, html.scrolled .toolbar .tb-btn:not(.hot) { background: var(--fill); border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

  .workspace { position: relative; }
  .ambient { position: absolute; top: 0; left: 0; right: 0; height: var(--stage-h); }
  .stage { position: relative; z-index: 1; height: var(--stage-h); }
  .carousel { left: 0; right: 0; top: var(--sat); bottom: 16px; }
  .photo { border-radius: 0; }
  .slide-fp .photo { max-width: calc(100% - 24px); max-height: calc(100% - 64px); border-radius: 10px; box-shadow: var(--photo-shadow); }
  .slide-sv .sv-holder { inset: 56px 0 0; }
  .stage-nav { display: none; width: 40px; height: 40px; margin-top: -20px; }
  .stage-nav.prev { left: 8px; } .stage-nav.next { right: 8px; }
  .stage.on-sv .stage-nav { display: grid; }
  .stage-bar { position: absolute; left: calc(var(--sal) + 12px); right: calc(var(--sar) + 12px); bottom: 26px; z-index: 4; display: flex; align-items: center; gap: 8px; pointer-events: none; }
  .stage-bar > * { pointer-events: auto; }
  .filmstrip { display: none; }
  .counter { margin-right: auto; color: #fff; background: rgba(0, 0, 0, .46); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .sb-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, .42); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .sb-btn span { display: none; }
  .sb-btn:hover { background: rgba(0, 0, 0, .55); }
  .sb-btn.on { background: rgba(0, 0, 0, .66); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); }

  .inspector {
    position: relative; z-index: 2; margin-top: -16px; border-radius: 18px 18px 0 0; background: var(--bg-elev);
    min-height: calc(100dvh - var(--stage-h) + 16px); padding-bottom: calc(var(--rater-h) + 16px);
    box-shadow: 0 -0.5px 0 var(--sep), 0 -8px 24px rgba(0, 0, 0, .06);
  }
  .insp-scroll { padding: 10px calc(var(--sar) + 18px) 24px calc(var(--sal) + 18px); }
  .strip { display: flex; align-items: center; gap: 12px; margin: 0 calc(-1 * (var(--sar) + 18px)) 12px calc(-1 * (var(--sal) + 18px)); padding: 2px calc(var(--sar) + 18px) 10px calc(var(--sal) + 18px); overflow-x: auto; scrollbar-width: none; border-bottom: .5px solid var(--sep); }
  .strip::-webkit-scrollbar { display: none; }
  .strip .metrics { gap: 12px; font-size: 12.5px; }
  .price { font-size: 30px; }
  .address { font-size: 20px; }
  .facts li { font-size: 15px; }
  .act { height: 58px; font-size: 12.5px; }
  .link-chip { height: 40px; padding: 0 13px; }
  .info-btn { width: 44px; height: 44px; margin: -12px -12px -12px -8px; }
  .street-more { padding: 8px 0; }
  .nb-sum { min-height: 64px; }
  .nb-name { font-size: 14.5px; }
  .nb-more { min-height: 44px; }

  .rater {
    position: fixed; left: 0; right: 0; bottom: var(--kb); z-index: 25;
    padding: 8px calc(var(--sar) + 16px) calc(10px + var(--sab)) calc(var(--sal) + 16px);
    background: var(--glass-hi); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
    border-top: .5px solid var(--sep); box-shadow: 0 -6px 24px rgba(0, 0, 0, .06);
  }
  html.kb .rater { padding-bottom: 10px; }
  .readout-val { height: 46px; }
  .score-num { font-size: 40px; }
  .score-input { font-size: 38px; height: 46px; }
  .track { height: 44px; }
  .track-thumb { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
  .track-thumb::after { inset: 11px; }
  .scale { height: 24px; }
  .scale-l { top: 10px; font-size: 10.5px; }
  .keys-hint { display: none; }
  .rater-actions { margin-top: 4px; }
  .rater-actions .btn { height: 48px; }
  .composer { display: none; }
  .rater.composing .instrument { display: none; }
  .rater.composing .composer { display: block; animation: sheetUp .34s var(--spring); }
  @keyframes sheetUp { from { opacity: 0; transform: translateY(12px); } }
  #comment { height: 84px; font-size: 16px; }
  .phrase { height: 36px; padding: 0 13px; font-size: 13.5px; }
  .composer-actions .btn { height: 48px; }
  .composer-actions .btn-primary { flex: 1; }

  .panel {
    left: 0; right: 0; bottom: 0; top: calc(var(--sat) + 12px); border-radius: 16px 16px 0 0;
    transform: translateY(102%); transition: transform .38s var(--ease), visibility 0s .38s; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
  }
  .panel.open { transform: none; transition: transform .42s var(--spring), visibility 0s; }
  .panel.dragging { transition: none !important; }
  .grabber { display: block; width: 38px; height: 5px; margin: 7px auto 0; border-radius: 3px; background: var(--fill-2); flex: none; }
  .panel-head { padding: 8px 14px 10px 18px; touch-action: none; }
  .close-btn { width: 40px; height: 40px; }
  .panel-tools { padding: 0 18px 10px; }
  .panel-tools .segmented button { height: 36px; font-size: 14px; }
  .ncompose .segmented button { height: 36px; font-size: 14px; }
  .panel-body { padding: 0 18px calc(24px + var(--sab)); }
  .hbtns button { height: 40px; padding: 0 14px; font-size: 13.5px; }
  .send-btn { width: 44px; height: 44px; }
  #noteText { min-height: 44px; font-size: 16px; padding: 11px 15px; }

  .sl-head { padding: calc(var(--sat) + 14px) calc(var(--sar) + 16px) 12px calc(var(--sal) + 18px); }
  .sl-title { font-size: 32px; }
  .sl-filters { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; }
  .sl-filters button { flex: none; height: 40px; padding: 0 15px; font-size: 14px; }
  .sl-grid { grid-template-columns: 1fr; gap: 16px; padding: 4px calc(var(--sar) + 16px) calc(var(--sab) + 32px) calc(var(--sal) + 16px); }
  .sl-actions .btn-sm { height: 40px; padding: 0 14px; }

  .popover {
    left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(8px + var(--sab)) !important; max-width: none; min-width: 0;
    max-height: 80vh; padding: 8px; border-radius: 20px; transform-origin: bottom center; animation: sheetUp .36s var(--spring);
  }
  .pop-item { min-height: 46px; font-size: 16px; padding: 8px 12px; }
  .pop-seg button { height: 40px; font-size: 15px; }
  .pop-h { font-size: 13px; padding: 10px 12px 4px; }
  .toast { top: calc(var(--sat) + 62px); }
  .keys { grid-template-columns: 1fr; }
  dialog .btn { height: 46px; }
  .gdel { width: 44px; height: 44px; }

  /* full-screen photo viewer */
  html.viewing, html.viewing body { overflow: hidden; }
  html.viewing .stage { position: fixed; inset: 0; z-index: 50; height: auto; background: #000; }
  html.viewing .carousel { top: calc(var(--sat) + 56px); bottom: calc(var(--sab) + 70px); }
  html.viewing .stage-bar { bottom: calc(var(--sab) + 16px); }
}

/* =====================================================================
   DESKTOP — one wide screen, no page scroll
   ===================================================================== */
@media (min-width: 900px) and (min-height: 540px) {
  html, body { height: 100%; overflow: hidden; }
  .app { position: fixed; inset: 0; }
  .toolbar {
    position: absolute; top: 0; left: 0; right: 0; height: var(--toolbar-h); padding: 0 12px 0 18px;
    background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
    border-bottom: .5px solid var(--glass-line);
  }
  .tb-centre { margin-left: 8px; }
  .workspace { position: absolute; inset: 0; }
  .ambient { position: absolute; inset: 0; }
  .stage { position: absolute; left: 0; top: 0; bottom: 0; right: var(--insp-w); z-index: 1; }
  .carousel { left: 0; right: 0; top: var(--toolbar-h); bottom: 82px; }
  .photo { max-width: calc(100% - 64px); max-height: calc(100% - 32px); border-radius: 10px; box-shadow: var(--photo-shadow); }
  .slide-sv .sv-holder { inset: 16px 32px; border-radius: 12px; box-shadow: var(--photo-shadow); }
  .stage-nav { opacity: 0; }
  .stage:hover .stage-nav, .stage-nav:focus-visible { opacity: 1; }
  .stage-bar {
    position: absolute; left: 50%; bottom: 16px; z-index: 4; transform: translateX(-50%); max-width: calc(100% - 32px);
    display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 18px; background: var(--glass);
    -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
    border: .5px solid var(--glass-edge); box-shadow: var(--glass-shadow);
  }
  .filmstrip { position: relative; display: flex; gap: 5px; min-width: 0; max-width: 560px; overflow-x: auto; scrollbar-width: none; padding: 3px; margin-right: 4px; }
  .filmstrip::-webkit-scrollbar { display: none; }
  .filmstrip:empty { display: none; }
  .counter { color: var(--label-2); padding: 0 8px; }
  .inspector {
    position: absolute; top: var(--toolbar-h); right: 0; bottom: 0; z-index: 2; width: var(--insp-w); display: flex; flex-direction: column;
    background: var(--insp); -webkit-backdrop-filter: blur(40px) saturate(160%); backdrop-filter: blur(40px) saturate(160%);
    border-left: .5px solid var(--glass-line);
  }
  .insp-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 24px; scrollbar-width: thin; scrollbar-color: var(--fill-2) transparent; }
  .insp-scroll.more-below { -webkit-mask-image: linear-gradient(#000 calc(100% - 36px), transparent); mask-image: linear-gradient(#000 calc(100% - 36px), transparent); }
  .strip { display: none; }
  .rater { flex: none; position: relative; padding: 12px 24px 12px; border-top: .5px solid var(--sep); background: var(--rater-bg); }
  .instrument, .composer { transition: opacity .22s var(--ease-out), transform .34s var(--ease), visibility 0s; }
  .composer { opacity: 0; transform: translateY(10px); visibility: hidden; transition: opacity .16s, transform .3s var(--ease), visibility 0s .3s; display: flex; flex-direction: column; }
  .composer #comment { flex: 1; min-height: 54px; }
  .rater.composing .instrument { opacity: 0; transform: translateY(-8px) scale(.985); visibility: hidden; transition: opacity .14s, transform .3s var(--ease), visibility 0s .3s; }
  .rater.composing .composer { opacity: 1; transform: none; visibility: visible; transition: opacity .22s .04s, transform .38s var(--spring), visibility 0s; }

  .panel {
    top: var(--toolbar-h); right: 0; bottom: 0; width: var(--insp-w); border-left: .5px solid var(--glass-line);
    transform: translateX(100%); transition: transform .34s var(--ease), visibility 0s .34s; box-shadow: -18px 0 50px rgba(0, 0, 0, .12);
  }
  .panel.open { transform: none; transition: transform .4s var(--spring), visibility 0s; }
  .toast { left: calc((100% - var(--insp-w)) / 2); top: calc(var(--toolbar-h) + 14px); }

  /* full-screen photo viewer */
  html.viewing .stage { position: fixed; inset: 0; right: 0; z-index: 50; background: #000; }
  html.viewing .carousel { top: 60px; bottom: 86px; }
  html.viewing .stage-bar { background: rgba(40, 40, 42, .66); border-color: rgba(255, 255, 255, .1); }
  html.viewing .stage-bar .sb-btn, html.viewing .counter { color: #f5f5f7; }
  html.viewing .stage-bar .sb-btn:hover { background: rgba(255, 255, 255, .12); }
  html.viewing .thumb[aria-current="true"] { box-shadow: 0 0 0 2px #fff; }
}
/* Narrow desktops: stats move into the inspector strip; labels shrink */
@media (min-width: 900px) and (max-width: 1239.98px) and (min-height: 540px) {
  .toolbar #stats { display: none; }
  .strip { display: flex; align-items: center; gap: 12px; margin: -6px 0 14px; padding-bottom: 12px; border-bottom: .5px solid var(--sep); flex-wrap: wrap; }
  .strip .metrics { gap: 12px; font-size: 12.5px; flex-wrap: wrap; }
  .strip #syncStatusM { display: none; }
}
@media (min-width: 900px) and (max-width: 1099.98px) and (min-height: 540px) {
  .wordmark-text { display: none; }
  .segmented button { min-width: 48px; padding: 0 10px; }
  .tb-pill { max-width: 160px; }
}
@media (min-width: 1500px) and (min-height: 540px) {
  .tb-pill { max-width: 300px; }
}
/* Short desktops (e.g. 1366×768, 1280×720): tighten the rater + header */
@media (min-width: 900px) and (min-height: 540px) and (max-height: 800px) {
  .readout-val { height: 46px; }
  .score-num { font-size: 40px; }
  .score-input { font-size: 38px; height: 44px; }
  .stepper { width: 40px; height: 40px; }
  .keys-hint { display: none; }
  .rater { padding-top: 8px; padding-bottom: 10px; }
  .rater-actions .btn { height: 40px; }
  .rater-actions .icon-btn { width: 40px; height: 40px; }
  .price { font-size: 30px; }
  .insp-scroll { padding-top: 16px; }
  .act { height: 48px; }
  .act .i { width: 19px; height: 19px; }
  .phrases { display: none; }
}
@media (min-width: 900px) and (min-height: 540px) and (max-height: 640px) {
  .scale-l { display: none; }
  .scale { height: 10px; }
}

/* ---------------------------------------------------------------- viewer, stacking, small states */
html.viewing .viewer-done {
  display: inline-flex; align-items: center; position: absolute; z-index: 6; top: calc(var(--sat) + 12px); right: calc(var(--sar) + 16px);
  height: 36px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 600; color: #fff;
  background: rgba(60, 60, 64, .66); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: .5px solid rgba(255, 255, 255, .14);
}
html.viewing .viewer-done:hover { background: rgba(80, 80, 84, .8); }
html.viewing .slide-label { top: 18px; }
html.sl-open .panel { z-index: 47; }
html.sl-open .scrim { z-index: 46; }
html.sl-open body, html.sheet-open body { overflow: hidden; }
.slide-empty .ph .i { width: 56px; height: 56px; stroke-width: 1.4; opacity: .4; }
.slide .ph .i { width: 34px; height: 34px; stroke-width: 1.5; }
@media (hover: none) and (min-width: 900px) and (min-height: 540px) { .stage-nav { opacity: .92; } }
.pt-bar i.pos { background: #1f6fd1; } .pt-bar i.neg { background: #d03b3b; }
[data-theme="dark"] .pt-bar i.pos { background: #4d97f0; } [data-theme="dark"] .pt-bar i.neg { background: #ec6767; }

/* ---------------------------------------------------------------- motion + contrast preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .track::before, .track-fill { forced-color-adjust: none; }
  .track-fill { background: Highlight; }
  .seg-thumb { outline: 2px solid Highlight; }
}

/* 9 Oct 2026 deep test: a sideways swipe on the hero photo could trigger the phone's back gesture (Tinder already
   blocks this at the root). */
html, body { overscroll-behavior-x: none; }

/* 9 Oct 2026 v3 hotfix (Becky, iPhone): iOS zooms the whole page in when a field under 16px gets focus, and keeps that zoom
   on the deck. Every typing field is 16px on touch screens; nothing may make the page wider than the screen. */
@media (hover: none), (pointer: coarse) {
  /* (muxB, audit #14: not the exact-score field, whose 30–38px type can't trigger zoom and shrank to 16px when tapped) */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not(.score-input), textarea, select { font-size: 16px !important; }
}
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }

/* v3 (9 Oct 2026, Becky's iPhone): on touch screens the Street View slide is a calm tile (no live Google widget inside the
   swipeable gallery); "Tap to look around" opens it in the full-screen viewer, where Done stays clear of Google's controls. */
.sv-tile {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 20px; text-align: center;
  color: #fff; background: linear-gradient(180deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .38)); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sv-tile-ic {
  display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 4px; border-radius: 50%;
  background: rgba(0, 0, 0, .34); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); border: .5px solid rgba(255, 255, 255, .22);
}
.sv-tile-ic .i { width: 30px; height: 30px; stroke-width: 1.5; }
.sv-tile b { font: 600 21px/1.2 var(--font-display); letter-spacing: -.01em; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.sv-tile small { font-size: 14px; line-height: 1.3; opacity: .88; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.sv-open {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 10px; padding: 0 22px; border-radius: 999px;
  font: 600 15px/1 var(--font); color: #fff; background: rgba(255, 255, 255, .2); border: .5px solid rgba(255, 255, 255, .4);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  transition: background-color .2s, transform .14s var(--ease-out);
}
.sv-open:active { transform: scale(.97); background: rgba(255, 255, 255, .3); }
.sv-open:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Phones: the photo area is short and the glass stage bar floats over its foot, so the tile is compact and sits above it
   (clear of the ‹ › arrows at the sides). */
@media (max-width: 899.98px), (max-height: 539.98px) {
  .sv-tile { padding: 4px 60px 62px; gap: 2px; }
  .sv-tile-ic { width: 48px; height: 48px; margin-bottom: 6px; }
  .sv-tile-ic .i { width: 24px; height: 24px; }
  .sv-tile b { font-size: 19px; }
  .sv-tile small { display: none; }
  .sv-open { margin-top: 12px; }
}
@media (hover: none), (pointer: coarse) {
  /* .mono (the import/export text box) set 12.5px !important with a class, which beat the 16px field rule above */
  textarea.mono, input.mono { font-size: 16px !important; }
  html.viewing .slide-sv .sv-holder { inset: 0; border-radius: 0; box-shadow: none; }
  html.viewing .slide-sv .slide-label { display: none; }   /* it sat on Google's address card; the counter says where you are */
  html.viewing .viewer-done { height: 44px; padding: 0 20px; font-size: 16px; background: rgba(60, 60, 64, .82); }
}
/* v3 deck honesty: the starter / quick-look note (search-status.js) heads the inspector, above the facts. */
.insp-scroll > .hhk { margin: 2px 0 12px; background: var(--fill); color: var(--label-2); }

/* =====================================================================================================================
   v3 responsive (9 Oct 2026): a real tablet layout, finger-sized controls on every touch screen, landscape phones.
   Device classes use the pointer as well as the size: a 1180x820 iPad is touch, a 1280x800 laptop is not.
     iPad landscape   (pointer: coarse) and (min-width: 900px) and (min-height: 540px)
                      → photos left with the rater docked under them (thumb reach), the details scrolling on the right
     iPad portrait    (pointer: coarse) and (min-width: 700px) and (max-width: 899.98px) and (orientation: portrait)
                      → a taller photo, the details in a centred reading column, the rater centred at the bottom
     landscape phone  (max-height: 539.98px) and (orientation: landscape) and (max-width: 999.98px)
                      → photo on the left half, the details (page scroll, no nested scroller) and a compact rater on the right
   ===================================================================================================================== */

/* sentences are never under 14px (labels, chips and the keyboard legend may be smaller) */
.insp-scroll > .hhk { font-size: 14px; line-height: 1.4; }
.street-v, .nb-t, .lcsrc { font-size: 14px; }

/* ---- every touch screen: hit areas of at least 44 x 44 ---- */
@media (pointer: coarse) {
  .keys-hint { display: none !important; }
  .stage-nav { width: 44px; height: 44px; margin-top: -22px; }
  .close-btn, .icon-btn { min-width: 44px; min-height: 44px; }
  .info-btn { width: 44px; height: 44px; }
  .street-more { min-height: 44px; min-width: 44px; }
  .gdel { width: 44px; height: 44px; }
  input.field, #groupNew, #noteText, #agText { min-height: 44px; }
  .send-btn { width: 44px; height: 44px; }
  .pop-item { min-height: 46px; }
  .scale { pointer-events: none; }
  .track { height: 44px; }
}

/* ---- iPad landscape: photos left with the rater docked under them, details scrolling on the right ---- */
@media (pointer: coarse) and (min-width: 900px) and (min-height: 540px) {
  :root { --rater-tab: 198px; }
  /* toolbar: finger-sized */
  .toolbar { height: 60px; }
  :root { --toolbar-h: 60px; }
  .tb-pill, .tb-btn, .tb-icon, .tb-avatar { min-height: 44px; }
  .tb-icon, .tb-avatar { min-width: 44px; }
  .sync { position: relative; }
  .sync::after { content: ""; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
  /* the inspector keeps the details; the rater leaves it for the foot of the photo column (a fixed bar: the inspector's
     blur would otherwise contain it, so on touch tablets the inspector is a solid pane) */
  .inspector { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg-elev); }
  .stage { bottom: var(--rater-tab); }
  .rater {
    position: fixed; z-index: 3; left: 0; right: var(--insp-w); bottom: 0; height: var(--rater-tab); display: grid; align-content: center;
    padding: 10px 32px calc(10px + var(--sab)); border-top: .5px solid var(--glass-line);
    background: var(--glass-hi); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  }
  .instrument, .composer { width: min(100%, 620px); justify-self: center; }
  .composer #comment { min-height: 44px; }
  .phrases { display: none; }
  .readout-val { height: 46px; }
  .score-num { font-size: 40px; }
  .stepper { width: 48px; height: 48px; }
  .rater-actions .btn, .rater-actions .icon-btn { height: 48px; min-width: 48px; }
  .stage-bar { bottom: 12px; padding: 5px; }
  .thumb { height: 46px; }
  .sb-btn { flex: none; height: 46px; min-width: 46px; }
  .stage-bar .counter { flex: none; }
  .filmstrip { flex: 1 1 auto; min-width: 0; }
  .toast { left: calc((100% - var(--insp-w)) / 2); }
  html.viewing .stage { bottom: 0; }
  html.viewing .rater { visibility: hidden; }
}

/* ---- iPad portrait: a taller photo, a centred reading column, the rater centred at the bottom ---- */
@media (pointer: coarse) and (min-width: 700px) and (max-width: 899.98px) and (orientation: portrait) {
  :root { --stage-h: calc(var(--sat) + clamp(380px, 44vh, 560px)); --rater-h: 196px; }
  .toolbar { padding-left: calc(var(--sal) + 20px); padding-right: calc(var(--sar) + 20px); }
  .tb-pill { max-width: 360px; }
  .insp-scroll { width: min(100%, 760px); margin: 0 auto; padding-left: 28px; padding-right: 28px; }
  .strip { margin-left: -28px; margin-right: -28px; padding-left: 28px; padding-right: 28px; }
  .price { font-size: 36px; }
  .address { font-size: 23px; }
  .facts li { font-size: 16px; }
  .act { height: 64px; font-size: 14px; }
  .rater { padding-left: max(28px, calc((100% - 700px) / 2)); padding-right: max(28px, calc((100% - 700px) / 2)); padding-top: 10px; padding-bottom: calc(14px + var(--sab)); }
  .score-num { font-size: 44px; }
  .readout-val { height: 52px; }
  .stepper { width: 50px; height: 50px; }
  .rater-actions .btn { height: 52px; }
  .scale-l { font-size: 12px; }
  .panel { left: 50%; right: auto; width: min(100%, 720px); translate: -50% 0; }
  .popover { left: 50% !important; right: auto !important; width: min(100% - 16px, 560px); translate: -50% 0; }
}

/* ---- landscape phones: photo on the left half, details and a compact rater on the right ---- */
@media (max-height: 539.98px) and (orientation: landscape) and (max-width: 999.98px) {
  :root { --lp-w: 52vw; --rater-h: 150px; }
  .toolbar { right: calc(100% - var(--lp-w)); }
  html:not(.viewing) .ambient { position: fixed; top: 0; left: 0; bottom: 0; right: auto; width: var(--lp-w); height: auto; }
  html:not(.viewing) .stage { position: fixed; top: 0; left: 0; bottom: 0; width: var(--lp-w); height: auto; }
  html:not(.viewing) .carousel { top: calc(var(--sat) + 56px); bottom: 0; }
  html:not(.viewing) .stage-bar { left: calc(var(--sal) + 10px); right: 10px; bottom: calc(10px + var(--sab)); }
  .inspector { margin: 0 0 0 var(--lp-w); border-radius: 0; min-height: 100dvh; box-shadow: -0.5px 0 0 var(--sep); padding-bottom: calc(var(--rater-h) + 12px); }
  .insp-scroll { padding: calc(var(--sat) + 12px) calc(var(--sar) + 18px) 16px 18px; }
  .strip { margin-left: -18px; margin-right: calc(-1 * (var(--sar) + 18px)); padding-left: 18px; }
  .price { font-size: 26px; }
  .address { font-size: 18px; }
  .rater { left: var(--lp-w); padding: 6px calc(var(--sar) + 14px) calc(6px + var(--sab)) 14px; }
  .readout-val { height: 44px; }
  .score-num { font-size: 32px; min-height: 44px; }
  .score-input { font-size: 30px; height: 40px; }
  .track-wrap { margin-top: 2px; }
  .scale { display: none; }
  .rater-actions { margin-top: 4px; }
  .rater-actions .btn { height: 44px; }
  .sv-tile { padding: 4px 44px 56px; }
  .toast { left: calc(var(--lp-w) + 12px); right: 12px; }
}

/* =====================================================================================================================
   Rounds of ten (9 Oct 2026): rounds.js (shared with Tinder) draws the waiting / thanks screen, the round bar at the top
   of the inspector, "Your rounds" and the Learn progress pill. Here they take the Apple language: system greys and
   elevated white, one tint, an Activity-style ring, inset grouped lists, Cormorant display with one italic phrase.
   ===================================================================================================================== */
:root {
  --hhr-bg: var(--bg); --hhr-surface: var(--bg-elev); --hhr-fill: var(--fill); --hhr-hover: var(--fill);
  --hhr-ink: var(--label); --hhr-ink-2: var(--label-2); --hhr-ink-3: var(--label-3); --hhr-accent: var(--tint); --hhr-kicker: var(--tint-text); --hhr-on-c: #fff;
  --hhr-btn: var(--btn); --hhr-on-btn: var(--on-btn); --hhr-line: var(--sep); --hhr-line-2: var(--sep-2); --hhr-pip: var(--track);
  --hhr-serif: var(--font-serif); --hhr-sans: var(--font); --hhr-r: var(--r-xl); --hhr-ease: var(--ease); --hhr-focus: var(--focus);
  --hhr-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -18px rgba(0, 0, 0, .22); --hhr-good: var(--good); --hhr-warn: var(--warn); --hhr-warn-soft: var(--warn-soft);
  --hhr-hi: #1f6fd1; --hhr-mid: #7c7c80; --hhr-lo: #d03b3b;
}
:root[data-theme="dark"] { --hhr-hi: #2f7fe0; --hhr-mid: #6e6e73; --hhr-lo: #d84a4a; --hhr-shadow: none; }
html.hhr-on #stage, html.hhr-on #inspector, html.hhr-on .ambient { display: none !important; }
.workspace > .hhr-screen { background: radial-gradient(900px 520px at 50% -10%, var(--tint-soft), transparent 70%), var(--bg); }
.hhr-screen .hhr-h { font-weight: 500; font-size: clamp(36px, 8.4vw, 50px); line-height: 1.02; letter-spacing: -.005em; }
.hhr-screen .hhr-h em { font-style: italic; }
.hhr-kicker { font-size: 12px; letter-spacing: .16em; }
.hhr-lede { color: var(--label-2); font-size: 16px; }
/* the mark: an Activity-style ring around a quiet house glyph */
.hhr-mark { width: 120px; height: 120px; }
.hhr-ring circle { stroke-width: 4; }
.hhr-ring .trk { stroke: var(--track); }
.hhr-disc { width: 80px; height: 80px; background: var(--bg-elev); color: var(--tint); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .28), 0 0 0 .5px var(--sep); }
.hhr-mark[data-k="done"] .hhr-disc { background: var(--tint); color: #fff; box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--tint) 70%, transparent); }
.hhr-mark[data-k="done"] .hhr-ring .trk { stroke: color-mix(in srgb, var(--tint) 22%, transparent); }
.hhr-mark[data-k="warn"] .hhr-disc { color: var(--warn); }
.hhr-card { border: 0; box-shadow: var(--hhr-shadow); }
.hhr-card-h h2 { font-weight: 600; font-size: 24px; }
.hhr-card-h span { font-size: 14px; }
.hhr-st b { font-weight: 600; }
.hhr-btn { border: 0; border-radius: 12px; background: var(--fill); color: var(--label); font-weight: 600; }
.hhr-btn:hover { background: var(--fill-2); }
.hhr-btn .hhr-i { color: var(--tint-text); }
.hhr-btn.pri { background: var(--btn); color: var(--on-btn); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.hhr-btn.pri .hhr-i { color: inherit; }
.hhr-th { border-radius: 10px; }
.hhr-recap h2 { font-size: 12px; letter-spacing: .14em; }
/* the round bar: the first thing in the inspector, a quiet filled capsule */
.insp-scroll > .hhr-bar { margin: 4px 0 14px; background: var(--fill); }
.hhr-bar-t b { font-weight: 650; }
.hhr-bar-btn { background: var(--bg-elev); box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 0 0 .5px var(--sep); }
.hhr-bar-btn .hhr-i { color: var(--tint); }
/* "Your rounds": a grouped sheet */
.hhr-dlg { background: var(--bg); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.hhr-dlg-head { background: var(--glass-hi); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); border-bottom: .5px solid var(--sep); }
.hhr-dlg-head h2 { font-weight: 600; font-size: 28px; }
.hhr-rd-h h3 { font-family: var(--font); font-weight: 650; font-size: 17px; }
.hhr-list { background: var(--bg-elev); border-radius: 14px; }
.hhr-list li + li { border-top: .5px solid var(--sep); margin-left: 84px; }
.hhr-house .hhr-ph { border-radius: 8px; }
.hhr-dlg::backdrop { background: rgba(0, 0, 0, .34); }
.hhr-pill { background: var(--glass-hi); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); border: .5px solid var(--glass-edge); box-shadow: var(--glass-shadow); }
.tb-learn.learning .i { animation: spin 1.1s linear infinite; }
@media (min-width: 900px) and (min-height: 540px) {
  .workspace > .hhr-screen { position: absolute; inset: var(--toolbar-h) 0 0 0; z-index: 3; padding-top: 40px; }
  .hhr-pill { top: calc(var(--toolbar-h) + 14px); }
  html:not(.hhr-on) .hhr-pill { left: calc((100% - var(--insp-w)) / 2); }   /* over the photo, never over the inspector's round bar */
  .hhr-pair > .hhr-recap { border: 0; }
}
@media (max-width: 899.98px), (max-height: 539.98px) {
  .workspace > .hhr-screen { min-height: 100dvh; overflow: visible; padding-top: calc(var(--sat) + 78px); }
  .hhr-mark { width: 108px; height: 108px; margin-bottom: 16px; }
  .hhr-disc { width: 72px; height: 72px; }
  .hhr-dlg-head { padding-top: 14px; }
  .hhr-dlg-head::before { content: ""; position: absolute; left: 50%; top: 6px; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--fill-2); }
  .hhr-dlg-head { position: relative; }
  .hhr-list li + li { margin-left: 0; }
}
@media (max-width: 400px) { .hhr-bar { gap: 9px; padding-left: 13px; } .hhr-bar-t { gap: 5px; } }
@media (prefers-reduced-motion: reduce) { .tb-learn.learning .i { animation-duration: 3s; } }

/* ---- muxA (10 Oct 2026): phones. Photo arrows on touch screens too; a shorter photo on short screens; the key facts
   (street, £/sq ft vs the area, layout check, the prediction once rated, top highlight and watch-out) under the price and
   clear of the rating dock, with a pull-up to the rest; the "Why this score?" phrases scroll sideways with edge fades. ---- */
.kf, .kf-more { display: none; }
.phrases.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.phrases.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }
.phrases.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
@media (max-width: 899.98px), (max-height: 539.98px) {
  /* ‹ › on the photo from the first view: 44px dark glass discs, the same as the stage-bar buttons */
  .stage-nav {
    display: grid; width: 44px; height: 44px; margin-top: -22px; border: 0; color: #fff; background: rgba(0, 0, 0, .42);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 0 0 .5px rgba(255, 255, 255, .14);
  }
  .stage-nav .i { width: 19px; height: 19px; stroke-width: 2.4; }
  .stage-nav.prev { left: calc(var(--sal) + 4px); } .stage-nav.next { right: calc(var(--sar) + 4px); }

  /* the head of the card: price, address, key facts, then the pull-up; the tags, notes and £/sq ft detail follow it */
  #details { display: flex; flex-direction: column; }
  #details > .price, #details > .address, #details > .kf, #details > .kf-more { order: -1; }
  #details > .eyebrow { margin: 14px 0 6px; }
  .address { margin-top: 4px; font-size: 19px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .insp-scroll > .hhr-bar { margin-bottom: 12px; }
  .kf { display: block; margin-top: 12px; }
  .kf-cells { display: flex; padding: 8px 0; border-top: .5px solid var(--sep); border-bottom: .5px solid var(--sep); }
  .kf-c { flex: 1 1 auto; min-width: 0; padding: 0 10px; border-left: .5px solid var(--sep); }
  .kf-c:first-child { padding-left: 0; border-left: 0; }
  .kf-k { display: block; font-size: 11px; font-weight: 600; letter-spacing: .045em; text-transform: uppercase; color: var(--label-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kf-v { display: flex; align-items: center; gap: 1px; margin-top: 2px; font-size: 17px; font-weight: 600; line-height: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; }
  .kf-v small { font-size: 12.5px; font-weight: 500; color: var(--label-3); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
  .kf-dot { flex: none; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--label-3); }
  .kf-good .kf-dot { background: var(--good-mark); } .kf-mid .kf-dot { background: var(--warn-mark); } .kf-bad .kf-dot { background: var(--bad-mark); }
  .kf-bad .kf-k { color: var(--bad); }
  .kf-under .kf-v { color: var(--good); } .kf-over .kf-v { color: var(--warn); }
  .kf-lc .kf-v { gap: 9px; }
  .kf-y { color: var(--good); } .kf-x { color: var(--bad); } .kf-q { color: var(--info); }
  .kf-l { display: flex; align-items: center; gap: 9px; margin-top: 9px; font-size: 14px; line-height: 20px; }
  .kf-l + .kf-l { margin-top: 5px; }
  .kf-m { flex: none; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; }
  .kf-m .i { width: 12px; height: 12px; stroke-width: 2.8; }
  .kf-l-pro .kf-m { background: var(--good-soft); color: var(--good); }
  .kf-l-con .kf-m { background: var(--warn-soft); color: var(--warn); }
  .kf-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--label-2); }
  .kf-t b { font-weight: 600; color: var(--label); }
  .kf-more {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 48px; margin-top: 10px; padding: 6px 0 4px;
    border-top: .5px solid var(--sep); color: var(--tint-text); font-size: 14px; font-weight: 600; -webkit-tap-highlight-color: transparent;
  }
  .kf-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); transition: background-color .2s; }
  .kf-more-t { display: inline-flex; align-items: center; gap: 5px; }
  .kf-more .i { width: 14px; height: 14px; stroke-width: 2.6; }
  .kf-more:active .kf-grab { background: var(--label-3); }

  /* "Why this score?" phrases: a 44px row of 36px pills, 14px text */
  .phrases { gap: 6px; margin-top: 4px; scroll-padding-inline: 16px; }
  .phrase { position: relative; isolation: isolate; height: 44px; padding: 0 14px; font-size: 14px; background: none !important; box-shadow: none !important; }
  .phrase::before { content: ""; position: absolute; inset: 4px 0; z-index: -1; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--sep-2); transition: background-color .15s; }
  .phrase.used::before { background: var(--tint-soft); box-shadow: none; }
}
/* portrait phones: the phrase row runs to the screen edges, with the dock's padding inside it */
@media (max-width: 699.98px) and (min-height: 540px) {
  .phrases { margin-left: calc(-1 * (var(--sal) + 16px)); margin-right: calc(-1 * (var(--sar) + 16px)); padding: 0 calc(var(--sar) + 16px) 0 calc(var(--sal) + 16px); }
}
/* short phones (iPhone SE, small Android): a shorter photo so the key facts sit above the dock */
@media (max-width: 699.98px) and (min-height: 540px) and (max-height: 760px) {
  :root { --stage-h: calc(var(--sat) + clamp(210px, 32vh, 270px)); }
  .insp-scroll { padding-top: 8px; }
  .insp-scroll > .hhr-bar { margin: 2px 0 8px; }
  .price { font-size: 28px; }
  .kf { margin-top: 10px; }
  .kf-cells { padding: 6px 0; }
  .kf-l { margin-top: 7px; }
  .kf-more { min-height: 44px; margin-top: 6px; padding: 4px 0 2px; gap: 5px; }
  /* a slightly tighter dock: same controls, same 44px+ targets */
  .rater { padding-top: 6px; padding-bottom: calc(8px + var(--sab)); }
  .readout-val { height: 44px; }
  .score-num { font-size: 38px; }
  .track-wrap { margin-top: 2px; }
  .scale { height: 21px; }
  .scale-l { top: 8px; }
  .rater-actions { margin-top: 2px; }
  .rater-actions .btn { height: 46px; }
}
@media (max-width: 699.98px) and (min-height: 761px) {
  :root { --stage-h: calc(var(--sat) + clamp(300px, 41vh, 420px)); }
}
/* the shortest phones (iPhone SE): a long address keeps to one line so the pull-up stays clear of the dock (the full
   address is in the heading's text, and the area repeats in the subtitle below) */
@media (max-width: 699.98px) and (min-height: 540px) and (max-height: 700px) {
  .address { -webkit-line-clamp: 1; }
}

/* ======================================================================================================================
   muxB (10 Oct 2026): voice-first comments and notes (voice-note.js). One compact mic (48px, tint) beside a small keyboard
   button; the text field slides in from the keyboard button, or arrives with the transcript to check before Save.
   ====================================================================================================================== */
.vox { --lvl: 0; }
.composer-voice { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.composer-voice .composer-actions { margin-top: 0; align-items: center; }
.vox-type[hidden] { display: none; }
.cs-gap { flex: 1 1 0; min-width: 0; }
.vox-mic { position: relative; flex: none; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border-radius: 50%; background: var(--btn); color: var(--on-btn); box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 6px 16px -8px color-mix(in srgb, var(--btn) 70%, transparent); touch-action: manipulation; transition: transform .14s var(--ease-out), filter .2s; isolation: isolate; }
.vox-mic:active { transform: scale(.94); }
.vox-mic.sm { width: 44px; height: 44px; }
.vox-mic .vox-ic { grid-area: 1 / 1; display: grid; place-items: center; transition: opacity .15s, transform .2s var(--spring); }
.vox-mic .i { width: 22px; height: 22px; stroke-width: 2.1; }
.vox-mic.sm .i { width: 20px; height: 20px; }
.vox-mic .vox-ic-stop { opacity: 0; transform: scale(.6); }
.vox-lvl { position: absolute; inset: -5px; border-radius: 50%; background: color-mix(in srgb, var(--btn) 28%, transparent); opacity: 0; pointer-events: none; z-index: -1; }
.vox-spin { position: absolute; inset: -4px; border-radius: 50%; border: 2.5px solid transparent; border-top-color: var(--btn); opacity: 0; pointer-events: none; }
.vox[data-vox="rec"] .vox-mic { background: var(--bad-mark, #d63a4a); }
.vox[data-vox="rec"] .vox-lvl { background: color-mix(in srgb, var(--bad-mark, #d63a4a) 28%, transparent); opacity: calc(.45 + var(--lvl) * .9); transform: scale(calc(1 + var(--lvl) * .45)); transition: transform .08s linear, opacity .08s linear; }
.vox[data-vox="rec"] .vox-ic-mic, .vox[data-vox="sending"] .vox-ic-mic { opacity: 0; transform: scale(.6); }
.vox[data-vox="rec"] .vox-ic-stop { opacity: 1; transform: none; }
.vox[data-vox="starting"] .vox-mic { animation: voxPulse 1s ease-in-out infinite; }
.vox[data-vox="sending"] .vox-mic { filter: saturate(.5); opacity: 1; }
.vox[data-vox="sending"] .vox-spin { opacity: 1; animation: voxSpin .8s linear infinite; }
@keyframes voxPulse { 50% { transform: scale(.92); opacity: .75; } }
@keyframes voxSpin { to { transform: rotate(360deg); } }
.vox-kb { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; background: var(--fill); color: var(--label-2); transition: background-color .2s, color .2s; touch-action: manipulation; }
.vox-kb .i { width: 20px; height: 20px; }
.vox-kb[aria-expanded="true"] { background: var(--tint-soft); color: var(--tint-text); }
.vox[data-vox="rec"] .vox-kb, .vox[data-vox="starting"] .vox-kb { opacity: .4; }
.vox-status { margin: 0; font-size: 14px; line-height: 1.35; color: var(--label-2); }
.vox-status[hidden] { display: none; }
.vox-status.err { color: var(--warn); }
.vox[data-vox="rec"] .vox-status { color: var(--label); font-variant-numeric: tabular-nums; }
.vox-retry { padding: 0 2px; color: var(--tint-text); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cs-skip-s { display: none; }
@media (max-width: 420px) { .cs-skip-l { display: none; } .cs-skip-s { display: inline; } .composer-voice .composer-actions { gap: 6px; } .composer-voice .composer-actions .btn { padding: 0 14px; } }
@media (max-width: 360px) { .composer-voice .composer-actions { flex-wrap: wrap; } .composer-voice .composer-actions .btn { flex: 1 1 40%; } }
/* the dock's composer: on phones the mic row replaces the old 84px box, so the dock is shorter until you type */
@media (pointer: coarse) { .composer-voice #comment { height: auto; min-height: 64px; } }
/* Notes: status · mic · one-line field · send */
.nreply.vox { flex-wrap: wrap; }
.nreply .vox-status { flex-basis: 100%; padding: 0 4px; }

/* muxB: layout checks are buttons; a tap opens the reason in one row under the chips (audit #7) */
.lcchips { display: flex; flex-wrap: wrap; gap: 8px 6px; }
.lcc { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px 0 7px; border-radius: 999px; background: var(--fill); color: var(--label); font-size: 14px; font-weight: 600; touch-action: manipulation; transition: background-color .15s, box-shadow .15s; }
.lcc::before { content: ""; position: absolute; inset: -4px -2px; }
.lcc-m { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.lcc-y .lcc-m { background: var(--good-soft); color: var(--good); }
.lcc-n .lcc-m { background: var(--bad-soft, rgba(255, 59, 48, .14)); color: var(--bad, #d70015); }
.lcc-u .lcc-m { background: var(--info-soft); color: var(--info); }
.lcc[aria-expanded="true"] { background: var(--tint-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tint) 60%, transparent); }
@media (hover: hover) { .lcc:hover { background: var(--fill-2); } }
.lc-why { margin-top: 10px; padding: 11px 13px; border-radius: 12px; background: var(--bg-elev); box-shadow: inset 0 0 0 .5px var(--sep-2); font-size: 14.5px; line-height: 1.45; color: var(--label-2); animation: lcIn .2s var(--ease-out); }
.lc-why[hidden] { display: none; }
.lc-why-t { margin: 0; }
.lc-why-t b { margin-right: 4px; color: var(--label); font-weight: 650; }
.lc-why-t .lcw-n { color: var(--bad, #d70015); } .lc-why-t .lcw-u { color: var(--info); } .lc-why-t .lcw-y { color: var(--good); }
.lc-why-src { margin: 4px 0 0; font-size: 13px; color: var(--label-3); }
.lc-none { color: var(--label-3); font-style: italic; }
@keyframes lcIn { from { opacity: 0; transform: translateY(-4px); } }
.kf-go { margin-left: 2px; color: var(--label-3); font-weight: 600; }
.kf-lc { cursor: pointer; }

/* ======================================================================================================================
   muxB (10 Oct 2026): mobile UX audit P1/P2 fixes — tap targets (#5), the 320px squeeze (#6), shortlist layout lines
   (#7, #11), touch clutter (#10), Groups as a bottom sheet (#13), contrast and tiny labels (#15).
   ====================================================================================================================== */
@media (pointer: coarse) {
  .kbd-hint { display: none; }                                   /* no ⏎ glyphs on touch screens */
  .staged-pill { height: 44px; }                                 /* composer "‹ 50 Okay" back pill was 34px */
  .phrase { position: relative; height: 40px; }
  .phrase::before { content: ""; position: absolute; inset: -2px 0; }
  .sl-filters button { height: 44px; }
  .sl-actions .btn-sm { height: 44px; min-width: 44px; }
  .sl-actions a { min-height: 44px; padding: 0 6px; }
  .hbtns button { height: 44px; }
  .composer-head .composer-q { font-size: 16px; }
}
/* shortlist filters wrap instead of being cut ("Barnes shortli…") */
.sl-filters { flex-wrap: wrap; }
/* shortlist layout lines: two lines, a tap shows the rest */
.slc li { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; cursor: pointer; }
.slc li.full { -webkit-line-clamp: unset; line-clamp: unset; display: block; }
/* WebKit without backdrop blur (and old Android): the dock and composer get a solid background instead of see-through glass */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .rater, .composer { background: var(--bg-elev); }
}
/* Groups: a bottom sheet on phones, so "Add" and "Done" sit above the keyboard rather than in a centred box */
@media (max-width: 599.98px) {
  dialog#groupDlg { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); max-height: calc(100dvh - 40px); }
  dialog#groupDlg[open] { animation: sheetUp .34s var(--spring); }
}
/* contrast: the danger fill passes 4.5:1 with white text; small scale labels at least 11px */
.btn-danger { background: #d63a4a; }
.scale-l { font-size: 11px; }
@media (max-width: 899.98px) { .scale-l { font-size: 11px; } }
/* toasts (errors and one-off notes only since muxA) sit under the Notes/History panels; dialogs are in the top layer
   anyway (audit #3). A wrapped toast gets a rounded box rather than a pill. */
.toast { z-index: 39; border-radius: 18px; }
/* layout checks on touch: 44px chips; the key-facts Layout cell gets a 44px hit area */
@media (pointer: coarse) {
  .lcc { height: 44px; }
  .kf-c.kf-lc { position: relative; }
  .kf-c.kf-lc::before { content: ""; position: absolute; inset: -8px 0; }
}

/* ===== PROD1 (10 Oct 2026): five-level rating control (levels.js) — iOS-style segmented control + voice-first composer ===== */
.lv { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.lv-rail { position: relative; flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 3px; border-radius: 13px; background: var(--bg-sunk); box-shadow: inset 0 0 0 .5px var(--sep); touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.lv-track, .lv-dot { display: none; }
.lv-thumb { position: absolute; top: 3px; bottom: 3px; left: calc(3px + (100% - 6px) * var(--lv, 2) / 5); width: calc((100% - 6px) / 5); border-radius: 10px; background: var(--bg-elev); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .06), inset 0 -3px 0 var(--score, var(--tint)); transition: left .3s var(--ease-out), box-shadow .2s; pointer-events: none; }
.lv.dragging .lv-thumb { transition-duration: .14s; transform: scale(.97); }
.lv-stop { position: relative; z-index: 1; min-width: 0; min-height: 48px; display: grid; place-items: center; padding: 4px 2px 6px; border: 0; border-radius: 10px; background: none; color: var(--label-2, var(--label)); font: 590 14px/1.08 var(--font); letter-spacing: -.01em; text-align: center; touch-action: manipulation; cursor: pointer; transition: color .15s; }
.lv-name { max-width: 100%; overflow-wrap: anywhere; }
.lv-stop[aria-checked="true"] { color: var(--label); font-weight: 700; }
.lv-stop:focus-visible { outline: 2px solid var(--tint); outline-offset: -2px; }
.lv-exact { flex: none; min-width: 44px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--tint-text); font: 600 13px/1 var(--font); }
.lv-exact .lv-num { color: var(--label-2, var(--label)); }
.lv-exact[aria-expanded="true"] { font-weight: 700; }
.rater:not(.exact) .track-wrap, .rater:not(.exact) .stepper, .rater:not(.exact) #scoreOut, .rater:not(.exact) .score-input, .rater:not(.exact) .keys-hint { display: none; }
.rater:not(.exact) .readout { display: none; }   /* the segmented control is the readout */
.rater:not(.exact) .lv { margin-top: 2px; }
.rater.exact .lv-rail { opacity: .6; }
.staged-pill b:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .lv-thumb { transition: none; } }

/* composer: the mic is the primary action; typing slides in from the keyboard button */
.cs-voxrow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; margin: 6px 0 4px; }
.cs-voxrow .vox-kb { justify-self: start; margin-left: 14px; }
.vox-mic.big { width: 68px; height: 68px; }
.vox-mic.big .i { width: 28px; height: 28px; }
.composer .phrases { display: flex; }

/* ======================================================================================================================
   PROD2 (10 Oct 2026)
   ====================================================================================================================== */
/* 1–10 rating: one compact row — undo · slider · "6/10 Next" (rating10.js). Replaces the segmented levels, steppers, Exact. */
.instrument.rrow { display: flex; align-items: center; gap: 10px; }
.instrument.rrow > .icon-btn { width: 44px; height: 44px; }
#track { flex: 1; min-width: 0; }
.r10 { position: relative; height: 48px; touch-action: none; cursor: pointer; outline: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; --p: .5; }
.r10-track { position: absolute; left: 15px; right: 15px; top: 50%; height: 6px; margin-top: -3px; border-radius: 99px; background: var(--fill-2, rgba(120, 120, 128, .2)); overflow: hidden; pointer-events: none; }
.r10-fill { position: absolute; inset: 0; background: linear-gradient(90deg, #ff3b30, #ff9500 30%, #ffcc00 50%, #8fd14f 72%, #34c759); clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0 round 99px); transition: clip-path .16s var(--ease-out); }
.r10-ticks { position: absolute; left: 15px; right: 15px; top: 50%; height: 0; pointer-events: none; }
.r10-ticks i { position: absolute; left: calc(var(--i) / 9 * 100%); width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--bg-elev, #fff); opacity: .85; }
.r10-thumb { position: absolute; top: 50%; left: calc(15px + var(--p) * (100% - 30px)); width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: #fff; box-shadow: 0 0.5px 4px rgba(0, 0, 0, .12), 0 6px 13px rgba(0, 0, 0, .18), 0 0 0 .5px rgba(0, 0, 0, .04); transition: left .16s var(--spring, ease), transform .12s; pointer-events: none; }
.r10.dragging .r10-thumb { transform: scale(1.1); transition-duration: .06s, .12s; }
.r10:focus-visible .r10-thumb { outline: 3px solid var(--focus, #0a84ff); outline-offset: 2px; }
.rnext.btn { flex: none; height: 48px; gap: 6px; padding: 0 12px 0 6px; border-radius: 999px; }
.rnext .rn-v { display: inline-flex; align-items: baseline; justify-content: center; min-width: 52px; height: 36px; padding: 0 9px; border-radius: 999px; background: #fff; color: var(--sc-l); line-height: 36px; }
[data-theme="dark"] .rnext .rn-v { background: #1c1c1e; color: var(--sc-d); }
.rnext .score-num { font: 750 21px/36px var(--font-round, inherit); font-variant-numeric: tabular-nums; color: inherit; letter-spacing: -.02em; }
.rnext .rn-v small { font-size: 12px; font-weight: 650; opacity: .6; margin-left: 1px; }
.rnext .i { width: 16px; height: 16px; }
.instrument.rrow .rskip { display: none; }
@media (min-width: 700px) { .instrument.rrow .rskip { display: inline-flex; } }
#stagedBand { opacity: .65; margin-left: -2px; }

/* Card photo on phones: ~40% of the screen on an iPhone SE, 45–50% on an iPhone 15 (linear in the height); the rater is one row */
@media (max-width: 699.98px) and (min-height: 540px) {
  :root { --stage-h: calc(var(--sat) + clamp(240px, 76.8vh - 229px, 520px)); --rater-h: 72px; }
  .rater { padding-top: 8px; padding-bottom: calc(8px + var(--sab)); }
  .inspector { padding-bottom: calc(var(--rater-h) + 24px); }
}

/* Street out of 5, coloured by the number */
.st5 { display: inline-flex; align-items: baseline; gap: 1px; padding: 1px 7px; border-radius: 999px; background: var(--st5c, var(--fill-2)); color: #fff; font: 700 13px/1.3 var(--font-round, inherit); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st5 small { font-size: .78em; font-weight: 600; opacity: .85; }
.st5[data-n="1"] { --st5c: #d70015; } .st5[data-n="2"] { --st5c: #c93400; } .st5[data-n="3"] { --st5c: #a05a00; }
.st5[data-n="4"] { --st5c: #248a3d; } .st5[data-n="5"] { --st5c: #007a3d; }
.st5.none { color: var(--label-3); }
.street.s5-1 .ring { --ring: #ff3b30; } .street.s5-2 .ring { --ring: #ff6a00; } .street.s5-3 .ring { --ring: #ffb000; }
.street.s5-4 .ring { --ring: #7ac943; } .street.s5-5 .ring { --ring: #34c759; }
.kf-c .kf-v .st5 { font-size: 14px; }
.sl-pill .st5 { font-size: 11.5px; padding: 0 6px; }

/* Heart on the photo (save to My houses) */
#btnHeart .i-on { display: none; }
#btnHeart.on .i-on { display: block; color: #ff375f; fill: currentColor; }
#btnHeart.on .i-off { display: none; }

/* My houses: your score and your partner's side by side; heart; contact agent (placeholder) */
.mh-pair { display: flex; gap: 8px; margin: 10px 0 8px; }
.mh-sc { flex: 1 1 0; min-width: 0; display: flex; align-items: baseline; gap: 4px; padding: 8px 10px; border-radius: 12px; background: var(--fill); }
.mh-sc small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--label-2); font-size: 12.5px; font-weight: 600; }
.mh-sc small .i { width: 12px; height: 12px; margin-left: 4px; color: #ff375f; vertical-align: -1px; }
.mh-sc b { color: var(--score, var(--label)); font: 700 24px/1 var(--font-round, inherit); font-variant-numeric: tabular-nums; }
.mh-sc i { color: var(--label-3); font-size: 12px; font-style: normal; font-weight: 600; }
.mh-sc.me { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint, #0a84ff) 45%, transparent); }
.mh-sc.none b { color: var(--label-3); }
.sl-card { position: relative; }
.mh-heart { position: absolute; right: 10px; top: 10px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, .42); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.mh-heart .i { width: 20px; height: 20px; }
.mh-heart.on { color: #ff375f; }
.mh-contact[disabled] { opacity: .55; cursor: not-allowed; }
.mh-contact small { margin-left: 4px; padding: 1px 6px; border-radius: 99px; background: var(--fill-2); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sl-filters button .i { width: 13px; height: 13px; margin-right: 3px; color: #ff375f; vertical-align: -1px; }
.instrument.rrow .rkeys { display: none; }
@media (min-width: 700px) and (hover: hover) { .instrument.rrow .rkeys { display: inline-grid; } }
.rater .rnext #scoreOut { display: inline; min-width: 0; padding: 0; border-radius: 0; cursor: pointer; }
.rater .rnext #scoreOut:hover { background: none; }
.st5 small, .kf-v .st5 small { color: inherit; font-size: .78em; }
@media (max-width: 699.98px) and (min-height: 540px) {
  /* the one-row rater sits over the details: keep it solid enough to read whatever scrolls under it */
  .rater { background: color-mix(in srgb, var(--bg-elev) 94%, transparent); }
}
@media (max-width: 699.98px) and (min-height: 540px) {
  .rater { background: var(--bg-elev); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* wider screens (the side panel): the slider gets the full width on its own line, buttons under it; the hidden composer
   no longer reserves its height */
@media (min-width: 700px) {
  .instrument.rrow { flex-wrap: wrap; row-gap: 6px; align-self: end; }
  .instrument.rrow #track { flex: 1 0 100%; order: -1; }
  .instrument.rrow .rskip { margin-left: auto; }
  .rater:not(.composing) .composer { display: none; }
}
/* My houses on phones (WebKit): the card's photo shrank to nothing and the rest was clipped — card parts keep their size */
.sl-card > * { flex-shrink: 0; }
.sl-grid { grid-auto-rows: max-content; }
