/* Settle: shared styles. Every colour and font is a variable in :root (art direction is reviewed later). */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: 'Bricolage Grotesque'; src: url('../fonts/bricolage-grotesque-opsz.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: block; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: block; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: block; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: block; }

/* ---------- Tokens ---------- */
:root {
  --paper: #FFFFFF;
  --tint: #F7F5F0;
  --ink: #1B2A2F;
  --muted: #56636A;
  --line: #E4E1DA;
  --line-strong: #D5D1C7;
  --accent: #FFB400;
  --accent-hover: #F2A600;
  --ok: #0E6B40;
  --ok-bg: #E4F3EA;
  --photo: #F1E7D0;
  --skeleton: #EDEAE2;
  --tile-grey: #E8EDEA;

  --font-head: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;

  --radius-card: 24px;
  --radius-photo: 18px;
  --radius-sheet: 24px;
  --shadow-card: 0 6px 24px rgba(27, 42, 47, .07);
  --shadow-lift: 0 12px 36px rgba(27, 42, 47, .12);
  --shadow-float: 0 12px 36px rgba(27, 42, 47, .18);

  --gutter: 24px;
  --container: 1152px;
}
@media (max-width: 767px) { :root { --gutter: 16px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--paper); }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; padding: 0; background: transparent; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.muted { color: var(--muted); }
.link { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Buttons and chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px;
  background: var(--ink); color: #fff; font-family: var(--font-body); font-weight: 700; font-size: 16px; line-height: 1.2;
  text-decoration: none; cursor: pointer;
}
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: none; padding: 0 16px; }
.btn--lg { min-height: 56px; font-size: 18px; }
.chip { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.5; background: var(--tint); color: var(--muted); }

/* Heart (save) buttons. Pressed state is the aria-pressed attribute. */
.save__btn {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .94); color: var(--ink);
}
.save__btn--inline { position: static; width: 48px; height: 48px; flex: none; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
button[aria-label="Save to shortlist"][aria-pressed="true"] svg path { fill: currentColor; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 8px; padding-block: 16px; }
.site-header__spacer { flex-grow: 1; }
.logo { display: flex; align-items: center; gap: 10px; margin-right: 16px; min-width: 0; }
.logo svg { flex: none; }
.logo__word { font-family: var(--font-head); font-weight: 700; font-size: 26px; letter-spacing: -.03em; line-height: 1.2; }

.browse { position: relative; }
.browse__btn { min-height: 48px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: 16px; }
.browse__panel {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; width: 380px; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-float); padding: 24px;
}
.browse.is-open .browse__panel { display: block; }
.browse__title { font-size: 26px; }
.browse__panel p { margin-top: 6px; color: var(--muted); }
.browse__links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.browse__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 600; }
.browse__panel > .btn { width: 100%; }

.loc { position: relative; }
.loc__btn { min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 700; font-size: 16px; }
.loc__panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: 340px; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-float); padding: 24px;
}
.loc__panel h3 { font-size: 26px; }
.loc__panel > p { margin-top: 6px; color: var(--muted); }
.loc__rows { margin: 16px 0 20px; display: flex; flex-direction: column; gap: 4px; }
.loc__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 6px 14px; border: 0; border-radius: 14px; background: transparent; text-align: left; font-weight: 600; }
.loc__row--on { background: var(--ok-bg); color: var(--ok); }
.loc__row small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.loc__row:disabled { cursor: default; color: var(--muted); }
.loc__panel > button { width: 100%; min-height: 48px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 16px; }

.nav__menu { display: none; }
.header__list, .header__sell { display: inline-flex; }
@media (max-width: 1200px) { .header__list { display: none; } }
@media (min-width: 1201px) { .header__sell { display: none; } }
.header__sell { padding: 0 22px; }
.header__signin { font-weight: 700; }
@media (max-width: 767px) {
  .site-header__inner { padding-block: 12px; }
  .logo { flex: 1 1 auto; gap: 8px; margin-right: 0; }
  .logo svg { width: 64px; height: 48px; }
  .logo__word { font-size: 24px; }
  .browse, .header__list, .header__sell, .header__signin { display: none; }
  .loc__btn { min-height: 44px; padding: 0 14px; }
  .nav__menu { display: inline-flex; min-height: 44px; padding: 0 16px; }
  /* On a phone the location panel hangs from the full-width header. */
  .loc { position: static; }
  .loc__panel { left: var(--gutter); right: var(--gutter); width: auto; }
}

/* ---------- Mobile drawer (R1c) ---------- */
.scrim { display: none; position: fixed; inset: 0; z-index: 50; background: rgb(27 42 47 / .6); }
.scrim.is-open { display: block; }
.drawer {
  position: fixed; top: 0; left: 0; height: 100%; width: min(320px, 85vw); z-index: 60; overflow-y: auto;
  background: #fff; padding: 24px; transform: translateX(-100%);
}
.drawer.is-open { transform: none; box-shadow: var(--shadow-float); }
.drawer__title { font-size: 32px; }
.drawer > p { margin-top: 6px; color: var(--muted); }
.drawer ul { margin: 20px 0 24px; display: flex; flex-direction: column; }
.drawer li a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 18px; }
.drawer > button { width: 100%; min-height: 48px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 16px; }
@media (min-width: 768px) { .drawer, .scrim { display: none; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; }
.site-footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.site-footer__head { font-weight: 700; }
.site-footer ul { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); }
.site-footer__legal { margin-top: 32px; font-size: 14px; color: var(--muted); }
@media (max-width: 767px) {
  .site-footer { padding: 32px 0; }
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__legal { font-size: 13px; margin-top: 24px; }
}

/* ---------- Toast (R3b popover) ---------- */
.toast { inset: auto; bottom: 24px; left: 50%; transform: translateX(-50%); margin: 0; padding: 14px 14px 14px 22px; border: 0; border-radius: 20px; background: var(--ink); color: #fff; box-shadow: var(--shadow-float); max-width: calc(100vw - 32px); }
.toast:popover-open { display: flex; align-items: center; gap: 16px; }
.toast p { font-weight: 600; }
.toast button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; }

/* ---------- Dialogs ---------- */
dialog::backdrop { background: rgb(27 42 47 / .6); }
.dlg { width: min(480px, calc(100vw - 32px)); max-width: none; padding: 28px; border: 0; border-radius: 28px; background: #fff; color: var(--ink); box-shadow: var(--shadow-float); }
.dlg h2 { font-size: 32px; }
.dlg p { margin-top: 10px; color: var(--muted); }
.dlg label { display: block; margin-top: 20px; font-weight: 700; }
.dlg select { display: block; width: 100%; min-height: 48px; margin-top: 8px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: #fff; font: inherit; }
.dlg__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.dlg__rows { margin-top: 20px; }
.dlg__rows div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dlg__rows dt { color: var(--muted); }
.dlg__rows dd { font-weight: 600; text-align: right; }
.dlg__rows div:last-child { border-bottom: 0; font-weight: 700; }
.dlg__rows div:last-child dt { color: var(--ink); }

/* ---------- Page heads ---------- */
.crumbs { font-size: 15px; color: var(--muted); }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cards (home: BEM) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
@media (max-width: 1023px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .cards { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.card { display: flex; flex-direction: column; gap: 12px; }
.card__media { position: relative; }
.card__photo { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-photo); overflow: hidden; background: var(--photo); }
.card__img { width: 100%; height: 100%; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: 2px; }
.card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card__title { font-family: var(--font-body); font-size: 18px; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.card__price { font-weight: 700; font-size: 20px; }
.card__meta { font-size: 15px; color: var(--muted); }
.card__body .chip { align-self: flex-start; margin-top: 6px; }

/* ---------- Cards fetched or inserted later (hashed classes) ---------- */
:is(._x7f3k9, .css-9fa3d2) { display: flex; flex-direction: column; gap: 10px; }
:is(._x7f3k9, .css-9fa3d2) > div:first-child { position: relative; }
:is(._x7f3k9, .css-9fa3d2) > div:first-child > a { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-photo); overflow: hidden; background: var(--photo); }
:is(._x7f3k9, .css-9fa3d2) img { width: 100%; height: 100%; object-fit: cover; }
:is(._x7f3k9, .css-9fa3d2) > div:first-child > button { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .94); color: var(--ink); }
:is(._x7f3k9, .css-9fa3d2) > div:nth-child(2) { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
:is(._x7f3k9, .css-9fa3d2) h3 { font-family: var(--font-body); font-size: 18px; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
:is(._x7f3k9, .css-9fa3d2) > div:nth-child(2) > p { font-weight: 700; font-size: 20px; }
:is(._x7f3k9, .css-9fa3d2) > p { font-size: 15px; color: var(--muted); }

/* ---------- Home ---------- */
.hero { padding-block: 72px 64px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero__title { font-size: 72px; max-width: 820px; }
.hero__sub { font-size: 22px; color: var(--muted); max-width: 640px; }
.hero__search { width: 100%; max-width: 860px; margin-top: 20px; min-height: 82px; }
.search { display: flex; align-items: center; padding: 10px 10px 10px 32px; border: 1px solid var(--line); border-radius: 999px; background: #fff; box-shadow: var(--shadow-float); }
.search__field { flex: 1; display: flex; flex-direction: column; padding: 0 24px; }
.search__field:first-child { padding-left: 0; border-right: 1px solid var(--line); }
.search__label { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.search select { border: 0; padding: 2px 0; background: transparent; font: inherit; font-size: 17px; color: var(--muted); min-height: 32px; }
.search > button { min-height: 60px; padding: 0 40px; border: 0; border-radius: 999px; background: var(--accent); color: var(--ink); font-weight: 700; font-size: 18px; }
.search > button:hover { background: var(--accent-hover); }
.chips { margin-top: 12px; padding: 20px; border-radius: var(--radius-card); background: var(--tint); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.chips h2 { font-size: 24px; }
.chips ul { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 600; }
.chips > a { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; display: inline-flex; align-items: center; min-height: 44px; }

.section { padding-bottom: 80px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section__title { font-size: 40px; }

.dani { background: var(--tint); padding: 88px 0; }
.dani__inner { display: flex; flex-wrap: wrap; gap: 48px; }
.dani__left { flex: 1 1 320px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.dani__eyebrow { background: var(--accent); color: var(--ink); letter-spacing: .04em; }
.dani__title { font-size: 48px; }
.dani__text { flex: 1.6 1 440px; display: flex; flex-direction: column; gap: 18px; font-size: 19px; }
.dani__sign { font-family: var(--font-head); font-weight: 700; font-size: 24px; margin-top: 4px; }

.areas { padding-top: 88px; padding-bottom: 24px; }
.areas__title { font-size: 40px; margin-bottom: 28px; }
.areas__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 180px; padding: 32px; border-radius: var(--radius-card); background: var(--photo); }
.tile--live { background: var(--accent); }
.tile--grey { background: var(--tile-grey); }
.tile .chip { align-self: flex-start; background: #fff; }
.tile--live .chip { background: var(--ink); color: #fff; }
.tile__name { font-size: 36px; }
.tile__count { font-weight: 600; }

.sell { padding-top: 56px; padding-bottom: 88px; }
.sell__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 56px; border-radius: 28px; background: var(--tint); }
.sell__title { font-size: 40px; }
.sell__text { margin-top: 8px; font-size: 19px; color: var(--muted); }

@media (max-width: 767px) {
  .hero { padding-block: 36px 32px; gap: 14px; }
  .hero__title { font-size: 42px; }
  .hero__sub { font-size: 18px; }
  .hero__search { margin-top: 0; min-height: 194px; }
  .section { padding-bottom: 40px; }
  .section__head { margin-bottom: 20px; }
  .section__title { font-size: 28px; }
  .dani { padding: 48px 0; }
  .dani__inner { flex-direction: column; gap: 18px; }
  .dani__left { flex: 0 0 auto; }
  .dani__text { font-size: 17px; flex: 0 0 auto; }
  .dani__title { font-size: 34px; }
  .dani__sign { font-size: 22px; }
  .areas { padding-top: 48px; padding-bottom: 16px; }
  .areas__title { font-size: 28px; margin-bottom: 20px; }
  .areas__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tile { min-height: 0; padding: 24px; }
  .tile--live { min-height: 130px; }
  .tile__name { font-size: 30px; }
  .sell { padding-top: 32px; padding-bottom: 48px; }
  .sell__inner { padding: 28px 24px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .sell__title { font-size: 30px; }
  .sell__text { font-size: 17px; margin-top: 0; }
}

/* ---------- Area page (non-utility parts) ---------- */
.area-head { padding-top: 32px; }
.area-head__text { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 36px; }
.area-head__title { font-size: 56px; }
.area-head__intro { font-size: 19px; color: var(--muted); max-width: 640px; }
.area { display: flex; align-items: flex-start; gap: 40px; padding-bottom: 80px; }
.results { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.filters { flex: 0 0 clamp(208px, 25%, 256px); display: flex; flex-direction: column; gap: 28px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.filters__group { display: flex; flex-direction: column; gap: 2px; }
.filters__title { padding: 0; margin-bottom: 8px; font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.filters label, .sheet label { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-weight: 400; cursor: pointer; }
.filters input[type="radio"], .sheet input[type="radio"] { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 2px solid #B9B4A8; border-radius: 50%; background: #fff; }
.filters input[type="radio"]:checked, .sheet input[type="radio"]:checked { border: 6px solid var(--ink); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar__count { font-weight: 600; }
.toolbar__actions { display: flex; align-items: center; gap: 8px; }
.filters-open { display: none; }
.sort { position: relative; }
.sort__panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: 240px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-float); opacity: 0; pointer-events: none; }
.sort.is-open .sort__panel { opacity: 1; pointer-events: auto; }
.sort__label { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.sort__panel button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; font-weight: 500; }
.sort__panel button[aria-pressed="true"] { background: var(--tint); font-weight: 700; }
.more { display: flex; justify-content: center; margin-top: 16px; }
.more:empty { display: none; }
.more__btn { padding: 8px 16px; border: 0; border-radius: 4px; background: #E5E5E5; color: #000; font-family: Arial, sans-serif; font-weight: 400; font-size: 14px; }
.empty { padding: 56px 24px; border-radius: var(--radius-card); background: var(--tint); text-align: center; }
.empty h2 { font-size: 28px; }
.empty p { margin-top: 8px; color: var(--muted); }

.sheet { width: 100%; max-width: none; max-height: 90vh; margin: auto 0 0; padding: 24px 16px 20px; border: 0; border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; background: #fff; color: var(--ink); }
.sheet__title { font-size: 30px; margin-bottom: 8px; }
.sheet .filters__group { margin-top: 16px; }
.sheet .dlg__actions { margin-top: 24px; }

@media (max-width: 767px) {
  .area-head { padding-top: 20px; }
  .area-head__text { gap: 10px; margin: 12px 0 0; }
  .area-head__title { font-size: 38px; }
  .area-head__intro { font-size: 17px; }
  .area { display: block; padding-bottom: 48px; }
  .filters { display: none; }
  .filters-open { display: inline-flex; min-height: 44px; padding: 0 18px; }
  .toolbar { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; }
  .toolbar__actions { order: -1; }
  .toolbar__actions .btn { min-height: 44px; padding: 0 18px; }
  .results { gap: 16px; }
}

/* ---------- Listing page ---------- */
.listing { padding-top: 24px; padding-bottom: 72px; }
.gallery { position: relative; margin: 20px 0 32px; min-height: 460px; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; height: 460px; border-radius: var(--radius-card); overflow: hidden; }
.mosaic__main { width: 100%; height: 100%; object-fit: cover; }
.mosaic__grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; min-height: 0; }
.mosaic__grid img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); }
.swipe::-webkit-scrollbar { display: none; }
.swipe li { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 3; background: var(--photo); }
.swipe img { width: 100%; height: 100%; object-fit: cover; }
.dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.dots span.is-on { background: #fff; }

.listing__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr; grid-template-areas: "head side" "body side"; column-gap: 56px; row-gap: 36px; align-items: start; }
.listing__head { grid-area: head; display: flex; flex-direction: column; gap: 12px; }
.listing__side { grid-area: side; }
.listing__body { grid-area: body; display: flex; flex-direction: column; gap: 36px; }
.listing__titlerow { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.listing__title { font-size: 48px; }
.listing__where { font-size: 18px; color: var(--muted); }
.listing__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.listing__section { display: flex; flex-direction: column; gap: 16px; padding-top: 32px; border-top: 1px solid var(--line); }
.listing__section h2 { font-size: 28px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { font-weight: 600; }
.listing__desc { gap: 16px; font-size: 18px; }
.seller { flex-direction: row; align-items: center; gap: 16px; }
.seller__avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--photo); font-family: var(--font-head); font-weight: 700; font-size: 28px; }
.seller__info { display: flex; flex-direction: column; min-width: 0; }
.seller__btn { align-self: flex-start; min-height: 32px; padding: 0; border: 0; background: transparent; font-family: var(--font-head); font-weight: 700; font-size: 22px; text-decoration: underline; text-underline-offset: 4px; }
.seller__meta { font-size: 14px; color: #B8B8B8; }
.seller__pop { width: min(380px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--ink); box-shadow: var(--shadow-float); }
.seller__pop-title { font-size: 26px; }
.seller__pop p { margin: 8px 0 16px; color: var(--muted); }
.seller__pop button { min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; }

.ready { display: none; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius-card); background: var(--tint); }
.ready h3 { font-size: 24px; }
.ready p { color: var(--muted); }
@media (max-width: 767px) { .ready { display: flex; } }

.price { display: flex; flex-direction: column; gap: 16px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-lift); }
.price__amount { font-family: var(--font-head); font-weight: 700; font-size: 44px; letter-spacing: -.02em; line-height: 1.08; }
.price__note { color: var(--muted); }
.price__buy { display: flex; flex-direction: column; }
.price__buy > button, .ready > button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 56px; margin-top: 4px; padding: 0 24px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--ink); font-family: var(--font-body); font-weight: 700; font-size: 18px; line-height: 1.2;
}
.price__buy > button:hover, .ready > button:hover { background: var(--accent-hover); }
.ready > button { align-self: flex-start; }
@media (max-width: 767px) { .price__buy { display: none; } }
.tip { margin-top: 16px; padding: 16px; border-radius: var(--radius-photo); background: var(--tint); font-size: 15px; }
@media (max-height: 699px) { .tip { display: none; } }

.chat { position: relative; inset: auto; width: auto; max-width: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--ink); }
.chat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.chat__head h3 { font-size: 22px; }
.chat__close { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--tint); font-weight: 700; }
.chat__log { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; }
.chat__log li { max-width: 85%; padding: 10px 14px; border-radius: 16px; background: var(--tint); }
.chat__log li.is-me { align-self: flex-end; background: var(--ink); color: #fff; }
.chat__form { display: flex; flex-direction: column; gap: 8px; padding: 0 20px 20px; }
.chat__form label { font-weight: 700; }
.chat__form textarea { width: 100%; min-height: 80px; padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: 14px; font: inherit; resize: vertical; }
.chat__form > button { align-self: flex-start; min-height: 48px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--accent); color: var(--ink); font-weight: 700; }

.rail { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.rail--more { margin-top: 56px; padding-top: 0; border-top: 0; }
.rail__title { font-size: 34px; margin-bottom: 24px; }
.rail__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.sentinel { height: 1px; }
.skel__photo { aspect-ratio: 4 / 3; border-radius: var(--radius-photo); background: var(--skeleton); }
.skel__line { height: 23px; margin-top: 10px; border-radius: 8px; background: var(--skeleton); }
.skel__line--short { height: 22px; width: 55%; }

@media (max-width: 1023px) and (min-width: 768px) {
  .listing__grid { column-gap: 32px; }
  .listing__title { font-size: 40px; }
}
@media (max-width: 767px) {
  .listing { padding-top: 16px; padding-bottom: 48px; }
  .gallery { margin: 16px 0 20px; min-height: 75vw; }
  .listing__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "head" "side" "body"; row-gap: 28px; }
  .listing__body { gap: 28px; }
  .listing__title { font-size: 34px; }
  .listing__where { font-size: 16px; }
  .listing__section { padding-top: 24px; }
  .listing__section h2 { font-size: 26px; }
  .listing__desc { font-size: 17px; gap: 14px; }
  .seller { gap: 14px; }
  .seller__avatar { width: 56px; height: 56px; font-size: 24px; }
  .seller__btn { font-size: 21px; }
  .price { padding: 22px; gap: 12px; }
  .price__amount { font-size: 40px; }
  .rail { margin-top: 48px; padding-top: 32px; }
  .rail--more { margin-top: 40px; }
  .rail__title { font-size: 28px; margin-bottom: 20px; }
  .rail__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* ---------- Lab (lab.html only). Plain on purpose. Target elements are styled by element selector inside the card, never by tier class. ---------- */
.lab-header { border-bottom: 1px solid var(--line); background: #fff; }
.lab-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding: 12px var(--gutter); }
.lab-header__word { font-family: var(--font-head); font-weight: 700; font-size: 24px; letter-spacing: -.03em; }
.lab-header__title { font-weight: 700; }
.lab-header .vp { color: var(--muted); font-variant-numeric: tabular-nums; }
.lab-header__back { margin-left: auto; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.lab { max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding: 32px var(--gutter) 80px; }
.lab h1 { font-size: 40px; max-width: 860px; }
.lab__intro { margin-top: 12px; font-size: 19px; color: var(--muted); }
.jump { margin-top: 20px; line-height: 2.2; }
.jump a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; white-space: nowrap; }
.st { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.st h2 { font-size: 26px; }
.st--intro { margin-top: 32px; }
.st--intro p, .st--intro ol { margin-top: 10px; max-width: 720px; }
.st--intro ol { list-style: decimal; padding-left: 22px; }
.how { margin-top: 16px; display: grid; gap: 4px 20px; max-width: 860px; }
.how dt { font-weight: 700; margin-top: 10px; }
.how dd { color: var(--muted); }
.lab code { font-size: .92em; background: var(--tint); padding: 1px 5px; border-radius: 6px; }
.benches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; margin-top: 24px; align-items: start; }
.benches--stack { grid-template-columns: minmax(0, 1fr); }
.bench { padding: 16px; border: 1px solid var(--line); border-radius: 24px; background: #fff; min-width: 0; }
.bench__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tag { display: inline-block; padding: 2px 10px; border: 1px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; font-size: 14px; }
.name { font-weight: 600; }
.bench__note { margin-top: 4px; font-size: 14px; color: var(--muted); }
.bench__note strong { color: var(--ink); }
.bench__row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.bench--menu .bench__row { min-height: 14rem; }
.bench__side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 14px; color: var(--muted); }
.state { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--tint); color: var(--muted); font-size: 13px; font-weight: 600; }
.tap { margin-left: 8px; font-size: 13px; color: var(--muted); }
.bench button, .ctl, .twin-controls button { min-height: 44px; padding: 0 18px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 700; font-size: 15px; }
.bench h3 { font-size: 20px; }
.bench p { margin-top: 6px; }
.bench .bench__note, .bench .bench__head { margin-top: 4px; }

.menu { position: relative; display: inline-block; }
.menu__panel { position: absolute; top: calc(100% + .5rem); left: 0; width: min(20rem, calc(100vw - 2rem)); z-index: 5; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-float); }
.menu__panel button { margin-top: 12px; background: var(--ink); color: #fff; box-shadow: none; }
.s1a .menu__panel { display: none; }
.s1a .menu.is-open .menu__panel { display: block; }
.s1b .menu__panel { opacity: 0; pointer-events: none; }
.s1b .menu.is-open .menu__panel { opacity: 1; pointer-events: auto; }
.s1c .menu__panel { transform: translateX(-100vw); }
.s1c .menu.is-open .menu__panel { transform: none; }
.s2 .menu__panel { display: none; }
.s2 .menu.is-open .menu__panel { display: block; }
.events { font-size: 13px; }
.why { font-size: 13px; }

.pop { max-width: 22rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); }
.pop button { margin-top: 12px; background: var(--ink); color: #fff; box-shadow: none; }
dialog.modal, dialog.nonmodal { padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); max-width: min(22rem, calc(100vw - 2rem)); }
dialog.nonmodal { position: relative; inset: auto; margin: 1rem 0; }
dialog form button { margin-top: 12px; background: var(--ink); color: #fff; box-shadow: none; }

.mq-a, .mq-b, .mq-c { margin-top: 12px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; }
@media (max-width: 767px)  { .mq-a { display: none; } }
@media (min-width: 1201px) { .mq-b { display: none; } }
@media (max-height: 699px) { .mq-c { display: none; } }
.mq-box button, .sw button, .swm button, .twin-box button, .lazy-card button, .bench .ctl__btn { margin-top: 10px; }
.mq-status, .sw-status, .twin-status, .lazy-status { margin-top: 10px; font-size: 14px; color: var(--muted); }
.vp-line { margin-top: 12px; }
.vp { font-variant-numeric: tabular-nums; }
.bp { margin-top: 12px; border-collapse: collapse; font-size: 14px; }
.bp caption { text-align: left; font-weight: 700; padding-bottom: 4px; }
.bp th, .bp td { text-align: left; padding: 4px 16px 4px 0; border-bottom: 1px solid var(--line); }

.sw-slot { margin-top: 12px; }
.sw, .swm { padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.swm__steps { margin: 8px 0 0 20px; list-style: decimal; }

.twin-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.twin-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 768px) { .twin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.twin-box { margin-top: 12px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.twin-d { display: block; }
.twin-m { display: block; }
@media (max-width: 767px) { .twin-d { display: none; } }
@media (min-width: 768px) { .twin-m { display: none; } }

.lazy-slot { margin-top: 12px; }
.lazy-card { padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.spacer { height: 120vh; margin-top: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; display: flex; align-items: flex-start; padding: 12px; color: var(--muted); }
.marker { margin-top: 12px; padding: 6px 12px; background: var(--tint); border-radius: 8px; font-weight: 700; }

.tiers { margin-top: 16px; max-width: 860px; display: flex; flex-direction: column; gap: 6px; list-style: disc; padding-left: 22px; }
.ctl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rep-label { margin-top: 16px; font-weight: 600; }
.rep { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.rep li { display: flex; align-items: center; }
.bench h3[id], .bench h3 { }

@media (max-width: 767px) {
  :root { --lab-gutter: 12px; }
  .lab { padding-inline: 12px; }
  .lab-header__inner { padding-inline: 12px; }
  .lab h1 { font-size: 30px; }
  .bench .menu { margin-left: -12px; }
}

@media (max-width: 480px) { .hero__search { min-height: 246px; } }
