/* Lewis & Co storefront: "new style, old structure" (30 Nov 2026).
   El Heng's own site, tidied: her blue ground, white type, sage buttons, her logo, her rooms and her words.
   One stylesheet for every public storefront page (home, shop, product, about, contact, privacy, 404). Colours
   and faces come from tokens.css, loaded first. The order and commission pages still load the older kit.
   Quiet chrome: hairlines at 14-24% white, no shadows except under the open Products menu, no motion beyond a
   colour change on hover and focus. Photographs are never cropped (object-fit: contain on a transparent mat),
   except the home hero, which is her own full-bleed room photo as on her old site. */

:root {
  --line: color-mix(in srgb, var(--p-ink) var(--p-line-mix), transparent);
  --line-strong: color-mix(in srgb, var(--p-ink) var(--p-line-strong-mix), transparent);
  --line-control: color-mix(in srgb, var(--p-ink) var(--p-control-mix), transparent);
  --gutter: 16px;
  --wrap: 1160px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --header-h: 64px;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1200px) { :root { --header-h: 88px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--p-bg); color: var(--p-ink);
  font: 400 16px/1.6 var(--font-text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; font-variation-settings: var(--display-axes); text-wrap: balance; line-height: 1.15; }
p, li, dd { text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--p-selection); color: var(--p-selection-ink); }
:focus-visible { outline: 2px solid var(--p-ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--p-muted); }
.skip-link { position: absolute; left: var(--gutter); top: -100px; z-index: 50; padding: 10px 16px; background: var(--p-ink); color: var(--p-bg); text-decoration: none; }
.skip-link:focus { top: 8px; }

/* text links: white, a quiet underline that firms on hover */
.link, .prose a:not(.btn), .crumb a, .footer a, .sub a, .pager a {
  text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 4px;
  transition: text-decoration-color 150ms var(--ease), color 150ms var(--ease);
}
.link:hover, .prose a:not(.btn):hover, .crumb a:hover, .footer a:hover, .sub a:hover, .pager a:hover { text-decoration-color: currentColor; }

/* ---------- buttons: her sage, white label ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 24px; border: 1px solid transparent; border-radius: 2px;
  background: var(--p-action); color: var(--p-action-ink);
  font: 500 15px/1.2 var(--font-text); letter-spacing: 0.01em; text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), scale 150ms var(--ease);
}
.btn:hover { background: var(--p-action-hover); }
.btn:active { scale: 0.98; }
.btn--line { background: transparent; border-color: var(--line-control); color: var(--p-ink); }
.btn--line:hover { background: var(--p-hover-wash); border-color: var(--p-ink); }
.btn--wide { width: 100%; }
@media (min-width: 640px) { .btn--wide { width: auto; min-width: 280px; } }

/* ---------- header ---------- */
.hd { position: sticky; top: 0; z-index: 30; background: var(--p-bg); border-bottom: 1px solid var(--line); }
.hd__bar { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.hd__logo { display: block; flex: none; margin-right: auto; }
.hd__logo img { height: 36px; width: auto; }
.hd__toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; cursor: pointer;
}
.hd__toggle svg { width: 22px; height: 22px; }
.hd__toggle .i-close { display: none; }
.hd__toggle[aria-expanded="true"] .i-open { display: none; }
.hd__toggle[aria-expanded="true"] .i-close { display: block; }
.hd__links { display: flex; }
.hd__link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer; color: var(--p-ink); text-decoration: none;
  font: 400 15px/1.2 var(--font-text); letter-spacing: 0.01em; white-space: nowrap;
}
.hd__link[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--p-accent-hi); text-decoration-thickness: 1px; text-underline-offset: 8px; }
.hd__link:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 8px; }
.hd__chev { width: 12px; height: 12px; transition: transform 150ms var(--ease); }
.hd__products[aria-expanded="true"] .hd__chev { transform: rotate(180deg); }
.hd__actions { display: flex; align-items: center; gap: 24px; }
.hd__lang { font-size: 15px; }
.hd__search { position: relative; display: flex; align-items: center; }
.hd__search-icon { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--p-muted); pointer-events: none; }
.hd__search input {
  width: 100%; min-height: 40px; padding: 8px 12px 8px 36px; border: 1px solid var(--line-control); border-radius: 2px;
  background: transparent; color: var(--p-ink); font: 400 15px/1.2 var(--font-text); -webkit-appearance: none; appearance: none;
  transition: border-color 150ms var(--ease);
}
.hd__search input::placeholder { color: var(--p-muted); opacity: 1; }
.hd__search input:hover { border-color: color-mix(in srgb, var(--p-ink) 75%, transparent); }
.hd__search input:focus { outline: none; border-color: var(--p-ink); box-shadow: 0 0 0 1px var(--p-ink); }
.hd__search input::-webkit-search-decoration { -webkit-appearance: none; }

/* phone: the nav is a sheet under the bar */
@media (max-width: 1199px) {
  .hd__nav {
    display: none; position: fixed; inset: var(--header-h) 0 0; z-index: 29; overflow-y: auto; overscroll-behavior: contain;
    background: var(--p-bg); border-top: 1px solid var(--line); padding: 8px var(--gutter) 32px;
  }
  .hd.is-open .hd__nav { display: flex; flex-direction: column; }
  .hd__search { order: -1; margin: 16px 0 8px; }
  .hd__search input { min-height: 48px; font-size: 16px; }
  .hd__links { flex-direction: column; }
  .hd__links > li { border-bottom: 1px solid var(--line); }
  .hd__link { width: 100%; min-height: 56px; font-size: 17px; justify-content: space-between; }
  .hd__actions { flex-direction: column; align-items: stretch; gap: 16px; padding-top: 24px; }
  .hd__actions .btn { width: 100%; }
  .hd__lang { display: inline-flex; align-items: center; min-height: 44px; }
  body.nav-open { overflow: hidden; }
}
@media (min-width: 1200px) {
  .hd__logo img { height: 48px; }
  .hd__toggle { display: none; }
  .hd__nav { display: flex; align-items: center; gap: 32px; }
  .hd__search input { width: 160px; }
  .hd__links { gap: 32px; }
}

/* the Products menu: her rooms with their categories, then "Choose wood type to view". Below a room,
   everything stays folded until asked for (phone: each room, then e.g. Sofa; desktop: the third level). */
.pm { padding: 8px 0 16px; }
.pm__label { margin: 16px 0 8px; color: var(--p-muted); font-size: 13px; letter-spacing: 0.02em; }
.pm__woods { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.pm__woods a, .pm__cats a { display: inline-flex; align-items: center; min-height: 36px; color: var(--p-ink); text-decoration: none; font-size: 15px; }
.pm__woods a:hover, .pm__cats a:hover, .pm__room-name:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.pm__room { break-inside: avoid; }
.pm__room-head, .pm__cat-head, .pm__wood-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm__room-name { display: inline-flex; align-items: center; min-height: 44px; font: 400 18px/1.25 var(--font-display); color: var(--p-ink); text-decoration: none; }
.pm__fold {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; margin-right: -12px;
  background: none; border: 0; cursor: pointer; color: var(--p-muted); transition: color 150ms var(--ease);
}
.pm__fold:hover { color: var(--p-ink); }
.pm__fold:focus-visible { outline-offset: -2px; }
.pm__fold svg { width: 14px; height: 14px; transition: transform 150ms var(--ease); }
.pm__fold[aria-expanded="true"] svg { transform: rotate(180deg); }
.pm__cats { padding: 0 0 8px; }
.pm__cats a { color: var(--p-muted); }
.pm__cats a:hover { color: var(--p-ink); }
.pm__cats .pm__cats { padding: 0 0 4px 16px; }
.pm__cat:not(.is-open) > .pm__cats { display: none; }
@media (max-width: 1199px) {
  .pm { padding: 0 0 8px; }
  .pm .wrap { padding-inline: 0; }
  .pm__room, .pm__wood-group { border-top: 1px solid var(--line); }
  .pm__room:not(.is-open) > .pm__cats { display: none; }
  .pm__room > .pm__cats { padding-left: 16px; }
  .pm__cats a, .pm__woods a { min-height: 44px; }
  /* the woods row reads like a room row, and the whole row opens it */
  .pm__wood-group { margin-top: 16px; }
  .pm__wood-head { position: relative; }
  .pm__wood-head .pm__label { display: flex; align-items: center; min-height: 44px; margin: 0; font: 400 18px/1.25 var(--font-display); letter-spacing: 0; color: var(--p-ink); }
  .pm__fold--woods::after { content: ""; position: absolute; inset: 0; }
  .pm__wood-group:not(.is-open) > .pm__woods { display: none; }
  .pm__woods { flex-direction: column; gap: 0; padding: 0 0 8px 16px; }
}
@media (min-width: 1200px) {
  .hd__item--products { position: static; }
  .pm {
    position: absolute; left: 0; right: 0; top: 100%; padding: 32px 0 40px;
    background: var(--p-bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 48px var(--p-menu-shadow);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .pm__in { display: grid; grid-template-columns: 1fr 224px; gap: 48px; }
  .pm__wood-group { padding-left: 32px; border-left: 1px solid var(--line); }
  .pm__woods { flex-direction: column; gap: 0; }
  .pm__woods a { min-height: 32px; }
  .pm__label { margin-top: 0; }
  .pm__rooms { columns: 4 180px; column-gap: 32px; }
  .pm__room { padding-bottom: 12px; }
  .pm__room-name { min-height: 36px; }
  .pm__fold { display: none; }
  .pm__cat-head { justify-content: flex-start; gap: 2px; }
  .pm__fold.pm__fold--sub { display: inline-grid; width: 28px; height: 28px; margin-right: 0; }
  .pm__cats a { min-height: 30px; font-size: 14px; }
}

/* ---------- footer ---------- */
.footer { margin-top: 96px; border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: 15px; }
.footer__grid { display: grid; gap: 32px; }
.footer__logo img { height: 40px; width: auto; }
.footer h2 { font: 500 13px/1.4 var(--font-text); letter-spacing: 0.02em; color: var(--p-muted); margin-bottom: 12px; }
.footer ul { list-style: none; padding: 0; display: grid; gap: 4px; }
.footer li, .footer p { line-height: 1.6; }
.footer a { display: inline-flex; align-items: center; min-height: 32px; }
.footer address { font-style: normal; }
.footer__legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--p-muted); font-size: 13px; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 48px; } }

/* ---------- shared page head ---------- */
.page { padding-top: 40px; }
@media (min-width: 768px) { .page { padding-top: 56px; } }
.page__h { font-size: clamp(30px, 4vw, 44px); letter-spacing: var(--display-tracking); }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-bottom: 12px; font-size: 14px; color: var(--p-muted); }
.crumb a { display: inline-flex; align-items: center; min-height: 32px; color: var(--p-muted); }
.crumb a:hover { color: var(--p-ink); }
.crumb__sep { color: var(--p-muted); opacity: 0.7; }
.rule { display: block; width: 24px; height: 1px; background: var(--line-strong); border: 0; margin: 0; }

/* ---------- photo mat (her rule: never cropped) ---------- */
/* Ellie: no white edge round a photo. The frame keeps its size (names and prices stay in line) and the photo stays
   whole, but the frame is see-through, so the letterbox space is the colour of whatever the frame sits on. */
.mat { position: relative; background: transparent; overflow: hidden; }
.mat > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mat--sq { aspect-ratio: 1; }
.mat--tall { aspect-ratio: 4 / 5; }

/* ---------- home ---------- */
.hero { position: relative; background: var(--p-inv-bg); }
.hero__photo, .hero__photo img { display: block; width: 100%; }
.hero__photo img { height: min(78vh, 72vw, 760px); height: min(78svh, 72vw, 760px); min-height: 360px; object-fit: cover; object-position: 50% 60%; }
.hero__panel { background: var(--p-bg); padding: 28px var(--gutter) 8px; }
.hero__h { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: var(--display-tracking); text-wrap: wrap; }
.hero__panel .btn { margin-top: 20px; }
@media (max-width: 767px) {
  .hero__photo img { height: auto; min-height: 0; max-height: 72vh; max-height: 72svh; aspect-ratio: 704 / 1173; object-position: 50% 50%; }
  .hero__panel .btn { width: 100%; }
}
@media (min-width: 768px) {
  .hero__panel {
    position: absolute; left: max(var(--gutter), calc((100% - var(--wrap)) / 2)); bottom: 48px;
    max-width: 560px; padding: 32px 36px 36px; border: 1px solid var(--line);
  }
}

.section { padding-top: 72px; }
@media (min-width: 768px) { .section { padding-top: 96px; } }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.section__h { font-size: clamp(26px, 3vw, 34px); letter-spacing: var(--display-tracking); }

.rooms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 12px; }
@media (min-width: 768px) { .rooms { grid-template-columns: repeat(4, 1fr); gap: 40px 24px; } }
.room { display: grid; gap: 12px; text-decoration: none; color: var(--p-ink); }
.room__name { font: 400 18px/1.3 var(--font-display); }
@media (min-width: 768px) { .room__name { font-size: 20px; } }
.room:hover .room__name { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px; }

/* ---------- shop ---------- */
.shop__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.shop__head .page__h { margin-right: auto; }
.shop__count { color: var(--p-muted); font-size: 15px; font-variant-numeric: tabular-nums; }
/* the server's short intro under the h1 (#shop-intro, a category's count and woods, or her own words) */
.shop__intro { max-width: 62ch; margin-top: 12px; color: var(--p-muted); font-size: 16px; line-height: 1.6; text-wrap: pretty; }
/* bare /shop: her rooms as on the home page, then her woods under "By wood" */
.shop__rooms { margin-top: 32px; }
@media (min-width: 768px) { .shop__rooms { margin-top: 40px; } }
.shop__subh { margin: 72px 0 28px; }
@media (min-width: 768px) { .shop__subh { margin-top: 96px; } }
/* bare /shop: each room a heading (its own link), its categories as tiles under it, then the woods */
.shop__index { margin-top: 8px; }
.shop__room { margin-top: 56px; }
@media (min-width: 768px) { .shop__room { margin-top: 72px; } }
.shop__room:first-child { margin-top: 32px; }
.shop__roomh a { color: inherit; text-decoration: none; }
.shop__roomh a:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 6px; }
.shop__room .shop__rooms { margin-top: 20px; }
@media (min-width: 768px) { .shop__room .shop__rooms { margin-top: 24px; } }
/* The server's tiles are for crawlers and no-script visitors. With script (boot.js sets .mo-js before the first
   paint) they keep their place but stay unseen until shop.js puts the real tiles in, so nothing changes layout
   under the visitor's eye; if the products cannot load they show (data-ssr="keep"). Room tiles from the server
   sit in the same grid as the rooms' layout. */
.mo-js #shop-grid:not([data-ssr="keep"]) .tile--ssr,
.mo-js #shop-grid:not([data-ssr="keep"]) .room--ssr { visibility: hidden; }
#shop-grid:has(.room--ssr) { grid-template-columns: repeat(2, 1fr); gap: 32px 12px; }
#shop-grid > li > .room--ssr { flex: 1; }
@media (min-width: 768px) { #shop-grid:has(.room--ssr) { grid-template-columns: repeat(4, 1fr); gap: 40px 24px; } }
/* All products: "Browse by room or wood" beside the heading opens her rooms, then her woods, in place */
.browse__toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line-control); border-radius: 2px; background: transparent; color: var(--p-ink); cursor: pointer;
  font: 400 15px/1.2 var(--font-text); letter-spacing: 0.01em; align-self: center;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease);
}
.browse__toggle:hover { background: var(--p-hover-wash); border-color: var(--p-ink); }
.browse__toggle[aria-expanded="true"] { border-color: var(--p-ink); }
.browse__toggle svg { width: 12px; height: 12px; transition: transform 150ms var(--ease); }
.browse__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.browse { display: grid; gap: 20px; margin-top: 20px; padding: 16px 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.browse__label { margin-bottom: 4px; font: 400 13px/1.4 var(--font-text); letter-spacing: 0.02em; color: var(--p-muted); }
.browse__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.browse__list a { display: flex; align-items: center; min-height: 44px; color: var(--p-ink); font-size: 15px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color 150ms var(--ease); }
.browse__list a:hover { text-decoration-color: var(--line-strong); }
@media (max-width: 639px) {
  .browse__toggle { width: 100%; justify-content: space-between; }
}
@media (min-width: 640px) {
  .browse__list { display: flex; flex-wrap: wrap; gap: 0 28px; }
  .browse__list a { min-height: 36px; }
}
.sub { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 24px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sub a { display: inline-flex; align-items: center; min-height: 40px; color: var(--p-muted); text-decoration-color: transparent; font-size: 15px; }
.sub a:hover { color: var(--p-ink); text-decoration-color: var(--line-strong); }
.sub a[aria-current] { color: var(--p-ink); text-decoration-color: var(--p-accent-hi); }
.shop__status:empty { display: none; }
.shop__status { margin-top: 32px; color: var(--p-muted); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 12px; margin-top: 32px; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; margin-top: 40px; } }
.grid > li { display: flex; min-width: 0; }
/* the card fills its cell; the name sits at the top, and rule, price and "View details" sit together at the
   bottom, so every card in a row lines up however long its name */
.tile { flex: 1; display: flex; flex-direction: column; min-width: 0; color: var(--p-ink); text-decoration: none; }
.tile__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding-top: 14px; }
.tile__name {
  font: 400 16px/1.35 var(--font-text); min-height: calc(2 * 1.35em);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: break-word;
}
@media (min-width: 900px) { .tile__name { font-size: 17px; } }
.tile__foot { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.tile__price { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--p-muted); }
.tile__more { padding-top: 6px; }
.tile__more span {
  display: flex; align-items: center; justify-content: center; min-height: 40px;
  border: 1px solid var(--line-strong); font-size: 14px; letter-spacing: 0.01em;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease);
}
.tile:hover .tile__more span { background: var(--p-action); color: var(--p-action-ink); border-color: var(--p-action); }
.tile:hover .tile__name { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.tile__stock { font-size: 14px; color: var(--p-ok); }
.empty { grid-column: 1 / -1; display: grid; gap: 20px; justify-items: start; max-width: 56ch; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; margin-top: 64px; font-variant-numeric: tabular-nums; font-size: 15px; }
.pager > a, .pager > span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 6px; }
.pager a { text-decoration-color: transparent; }
.pager a:hover { text-decoration-color: var(--line-strong); }
.pager a[aria-current] { text-decoration-color: var(--p-ink); font-weight: 600; }
.pager__gap { color: var(--p-muted); }
.pager__step { color: var(--p-ink); }
/* phone: the same numbers, compact; the steps keep only their arrows (each target stays 44px) */
@media (max-width: 639px) {
  .pager { flex-wrap: nowrap; gap: 0; margin-inline: -8px; }
  .pager > .pager__gap { min-width: 20px; padding: 0; }
  .pager__word { display: none; }
  .pager__step { font-size: 20px; }
}
@media (width < 360px) {
  .pager { margin-inline: 0; }
  .pager > .pager__gap { min-width: 16px; }
}

/* ---------- product ---------- */
.product__status { padding: 48px 0; color: var(--p-muted); }
.product__grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .product__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; } }
.product__main { aspect-ratio: 1; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumb { position: relative; width: 64px; height: 64px; padding: 0; border: 1px solid transparent; background: transparent; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb[aria-pressed="true"] { border-color: var(--p-ink); outline: 1px solid var(--p-ink); outline-offset: 1px; }
.thumb:hover { border-color: var(--line-strong); }
.product__info { display: grid; gap: 20px; align-content: start; }
@media (min-width: 900px) { .product__info { position: sticky; top: calc(var(--header-h) + 32px); } }
.product__info h1 { font-size: clamp(28px, 3vw, 38px); letter-spacing: var(--display-tracking); }
.product__price { font-size: 19px; font-variant-numeric: tabular-nums; }
.product__stock { color: var(--p-ok); font-size: 15px; }
.product__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.product__actions .btn { flex: 1 1 auto; }
@media (min-width: 900px) { .product__actions .btn { flex: 0 1 auto; } }
.woods { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.woods legend { padding: 0; margin-bottom: 8px; font-size: 14px; color: var(--p-muted); }
.woods__list { display: flex; flex-wrap: wrap; gap: 8px; }
.wood { position: relative; display: inline-flex; }
.wood input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.wood span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-control); font-size: 14px; }
.wood input:checked + span { background: var(--p-ink); color: var(--p-bg); border-color: var(--p-ink); }
.wood input:focus-visible + span { outline: 2px solid var(--p-ink); outline-offset: 3px; }
.facts { border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 112px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts .rows__name { color: var(--p-muted); }
.rows__value--lines { display: grid; }
.product__note { font-size: 14px; color: var(--p-muted); }

/* the buy form (shown only when the API says `buyable`; off on the preview) */
.buy { padding-top: 72px; }
.buy__grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .buy__grid { grid-template-columns: 1fr 1fr; gap: 56px; } }
.buy h2 { font-size: 28px; }
.buy__text p { margin-top: 12px; color: var(--p-muted); }
.buy__summary { margin-top: 20px; }
.buy__photo { display: none; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, .field__label { font-size: 14px; color: var(--p-muted); }
.field input:not([type="checkbox"]), .field select {
  min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-control); border-radius: 2px;
  background: transparent; color: var(--p-ink); font: inherit;
}
.field input:focus, .field select:focus { outline: 2px solid var(--p-ink); outline-offset: 1px; border-color: var(--p-ink); }
.field select option { color: var(--p-field-option-ink); background-color: var(--p-field-option-bg, revert); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--p-action); }
.field-error, .form__status { color: var(--p-error); font-size: 14px; }
.buy__after { font-size: 14px; }

/* ---------- about, contact, privacy, 404: one reading column ---------- */
.prose { max-width: 680px; }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 48px; font-size: 26px; letter-spacing: var(--display-tracking); }
.prose h2 + * { margin-top: 12px; }
.prose ol, .prose ul { padding-left: 1.25em; display: grid; gap: 8px; }
.prose .lead { font-size: 18px; }
.sign { margin-top: 24px; }
.sign__name { font: 400 22px/1.3 var(--font-display); }
.sign__role { color: var(--p-muted); font-size: 15px; }
.facts-list { border-top: 1px solid var(--line); margin-top: 16px; }
.facts-list > div { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts-list dt { color: var(--p-muted); font-size: 14px; }
.facts-list dd { margin: 0; }
@media (min-width: 640px) { .facts-list > div { grid-template-columns: 180px 1fr; gap: 24px; } }
.prose figure { margin-top: 40px; }
.prose figcaption { margin-top: 10px; font-size: 14px; color: var(--p-muted); }
.prose .btn { margin-top: 24px; }
.legal h2 { font-size: 22px; }
.nf__links { display: flex; flex-wrap: wrap; gap: 12px; }
.nf__links .btn { margin-top: 0; }

/* Traditional Chinese: no tracking on Han, a taller line */
:lang(zh) .hd__link, :lang(zh) .btn { letter-spacing: 0.04em; }
:lang(zh) .tile__name { line-height: 1.5; min-height: calc(2 * 1.5em); }

/* reduced motion: no movement (the chevron turn, the press); colour changes stay, they carry the state */
@media (prefers-reduced-motion: reduce) {
  .hd__chev, .pm__fold svg, .browse__toggle svg { transition: none; }
  .btn:active { scale: none; }
}
.about__photo { display: block; aspect-ratio: 800 / 642; }

/* Privacy page: one language block per page language (server sets <html lang>). */
:root:lang(zh) .legal-en { display: none; }
:root:not(:lang(zh)) .legal-zh { display: none; }
.legal mark.confirm { background: var(--p-confirm-bg); color: var(--p-confirm-ink); padding: 0 3px; }

/* Category and room tiles are representative photos, not product shots: they fill the frame (lead, 30 Nov, after Ellie asked for no white edges). Product photos stay uncropped. */
/* Ellie (1 Dec): room and category tiles show the whole photo, in a square frame on the page colour */
.room .mat { aspect-ratio: 1 / 1; }
.room .mat > img { object-fit: contain; object-position: left bottom; }

.tile__sold, .product__sold { font-weight: 600; }
.tile__sold { display: block; }
