:root {
  --bg: #f4efe8;
  --surface: #fffdf9;
  --sunk: #ebe4da;
  --ink: #2a2420;
  --ink-2: #4a413a;
  --muted: #776c62;
  --line: #e2d9cd;
  --accent: #7a4e2d;
  --accent-2: #9a6a45;
  --wa: #1e8e4e;
  --reader: #1f1b18;
  --reader-2: #2b2622;
  --r: 14px;
  --shadow: 0 1px 2px rgba(42, 36, 32, .06), 0 8px 24px rgba(42, 36, 32, .08);
  --shadow-lg: 0 18px 50px rgba(20, 14, 10, .28);
  --font: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
/* a sheet, drawer or viewer is open: the page behind stays put */
html.locked, html.locked body { overflow: hidden; }
.d-body, .q-body, .ov-body, .lb, .rail, .chips { overscroll-behavior: contain; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin: 0; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 500; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #683f22; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #18773f; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn[aria-pressed="true"] { background: var(--sunk); color: var(--ink); border-color: var(--line); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; }
.count.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: rgba(244, 239, 232, .9); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-weight: 500; letter-spacing: .12em; text-transform: uppercase; font-size: 14px; }
.brand small { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.nav { display: none; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); }
.nav a:hover { background: var(--sunk); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.btn-wa-top span { display: none; }
.btn-wa-top { width: 42px; padding: 0; color: var(--wa); }
@media (min-width: 860px) {
  .nav { display: flex; }
  .btn-wa-top { width: auto; padding: 0 16px; }
  .btn-wa-top span { display: inline; }
}
@media (max-width: 420px) { .list-btn .lbl { display: none; } .list-btn { padding: 0 12px; } }

/* boot */
.boot { min-height: 60vh; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); }
.boot img { border-radius: 50%; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .5; transform: scale(.96); } }

/* hero */
.hero { display: grid; gap: 40px; padding: 36px 0 56px; align-items: center; overflow-x: clip; }
@media (min-width: 980px) { .hero { grid-template-columns: 1.05fr .95fr; padding: 56px 0 80px; } }
.hero h1 { font-size: clamp(34px, 5.2vw, 58px); font-weight: 400; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 18px; color: var(--ink-2); max-width: 52ch; margin: 18px 0 26px; }
.search { position: relative; display: flex; gap: 8px; max-width: 560px; }
.search input { flex: 1; min-width: 0; height: 52px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); padding: 0 20px 0 46px; font-size: 16px; box-shadow: var(--shadow); }
.search input:focus { outline: none; border-color: var(--ink); }
.search svg { position: absolute; left: 17px; top: 17px; color: var(--muted); pointer-events: none; }
.search .btn { height: 52px; padding: 0 22px; }
.suggest { position: absolute; top: 58px; left: 0; right: 0; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; margin: 0; list-style: none; max-height: 420px; overflow: auto; }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; text-decoration: none; }
.suggest a:hover, .suggest a.on { background: var(--sunk); }
.suggest img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 8px; }
.suggest small { display: block; color: var(--muted); font-size: 13px; }
.suggest .all { justify-content: center; color: var(--accent); font-weight: 500; }
.stats { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; padding: 0; margin: 28px 0 0; color: var(--muted); font-size: 15px; }
.stats b { display: block; color: var(--ink); font-size: 26px; font-weight: 500; line-height: 1.1; }

/* fanned books */
.books { position: relative; height: clamp(320px, 46vw, 520px); perspective: 1600px; }
.books a { position: absolute; top: 50%; left: 50%; width: clamp(128px, 13vw, 190px); aspect-ratio: 9/16; margin: 0; border-radius: 6px 12px 12px 6px; overflow: hidden; box-shadow: var(--shadow-lg); transform-origin: 50% 110%; transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; background: var(--sunk); }
.books a img { width: 100%; height: 100%; object-fit: cover; }
.books a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(0,0,0,0) 8%, rgba(255,255,255,.08) 10%, rgba(0,0,0,0) 14%); pointer-events: none; }
/* Each cover keeps its own place (--x, --r); hover only lifts it, so nothing moves away from the
   pointer and the cover you click is the one you get. */
.books a { --x: 0%; --r: 0deg; --lift: 0%; --s: 1; transform: translate(-50%, -50%) translateX(var(--x)) translateY(var(--lift)) rotate(var(--r)) scale(var(--s)); }
.books a:nth-child(1) { --x: -78%; --r: -11deg; z-index: 1; }
.books a:nth-child(2) { --x: -26%; --r: -4deg; z-index: 2; }
.books a:nth-child(3) { --x: 26%; --r: 4deg; z-index: 3; }
.books a:nth-child(4) { --x: 78%; --r: 11deg; z-index: 4; }
@media (hover: hover) {
  .books a:hover, .books a:focus-visible { --lift: -7%; --s: 1.05; z-index: 9; box-shadow: 0 30px 70px rgba(20, 14, 10, .4); }
}
@media (max-width: 979px) {
  /* phones and tablets: a swipeable row of whole covers instead of an overlapping fan */
  .books { order: -1; height: auto; perspective: none; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin: 0 -16px; padding: 6px 16px 18px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .books::-webkit-scrollbar { display: none; }
  .books a, .books a:nth-child(n) { position: relative; top: auto; left: auto; flex: 0 0 auto; width: 40vw; max-width: 200px; transform: none; scroll-snap-align: start; box-shadow: var(--shadow); }
}

/* sections */
.sec { padding: 56px 0; border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 400; }
.sec-head p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }

/* catalogue cards */
.shelf { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cat-card { background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(42,36,32,.06), 0 22px 44px rgba(42,36,32,.14); }
.cat-cover { position: relative; display: block; aspect-ratio: 4/5; overflow: hidden; background: var(--sunk); }
.cat-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s; }
.cat-card:hover .cat-cover img { transform: scale(1.04); }
.cat-cover .pill { position: absolute; left: 12px; bottom: 12px; background: rgba(255,253,249,.92); padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.cat-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cat-body h3 { font-size: 22px; }
.cat-body p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.cat-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* chips */
.chip-groups { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.chip-groups h3 { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: 14px; white-space: nowrap; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--ink); }
.chip small { color: var(--muted); font-size: 12px; }
.chip[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip[aria-current="true"] small { color: rgba(255,255,255,.7); }

/* steps */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--surface); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.steps li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sunk); color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.steps b { display: block; font-weight: 500; font-size: 18px; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

/* projects */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 210px); gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.proj { scroll-snap-align: start; text-decoration: none; }
.proj .pimg { aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; background: var(--sunk); box-shadow: var(--shadow); }
.proj img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.proj:hover img { transform: scale(1.05); }
.proj b { display: block; font-weight: 500; margin-top: 10px; }
.proj small { color: var(--muted); }

.proj .pimg.land { aspect-ratio: 4/3; }
.rail-wide { grid-auto-columns: minmax(240px, 300px); }
.rail .proj .pimg { aspect-ratio: 4/5; }
.rail .proj .pimg.land { aspect-ratio: 4/3; }
.proj-grid { display: grid; gap: 18px 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); padding: 20px 0 50px; }
@media (min-width: 720px) { .proj-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px 20px; } }
.proj-grid .pimg { aspect-ratio: 4/5; }

/* project page */
.pj-head { padding: 8px 0 22px; }
.pj-head h1 { font-size: clamp(30px, 4.6vw, 50px); font-weight: 400; }
.pj-head .sub { color: var(--muted); font-size: 18px; margin: 4px 0 0; }
.pj-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pj-grid { columns: 1; column-gap: 14px; padding-bottom: 40px; }
@media (min-width: 720px) { .pj-grid { columns: 2; } }
@media (min-width: 1100px) { .pj-grid { columns: 3; } }
.pj-ph { display: block; width: 100%; padding: 0; margin: 0 0 14px; border: 0; background: var(--sunk); border-radius: 12px; overflow: hidden; break-inside: avoid; cursor: zoom-in; }
.pj-ph img { width: 100%; height: auto; transition: transform .5s; }
.pj-ph:hover img { transform: scale(1.03); }
@media (max-width: 719px) { .pj-grid { margin: 0 -16px; } .pj-ph { border-radius: 0; margin-bottom: 4px; } .pj-actions { display: grid; } .pj-actions .btn { width: 100%; } }

.proj small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rail .proj > small:first-of-type:last-child { margin-top: 8px; display: -webkit-box; }
.pj-sec { padding: 6px 0 18px; scroll-margin-top: 80px; }
.pj-jump { display: flex; gap: 8px; margin-top: 16px; }
.pj-jump a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--sunk); text-decoration: none; font-size: 14px; }
.pj-jump small { color: var(--muted); }
.pj-sec + .pj-sec { border-top: 1px solid var(--line); padding-top: 26px; }
.pj-sec-head { margin-bottom: 16px; }
.pj-sec-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 400; }
.pj-sec-head p { margin: 4px 0 0; color: var(--muted); }
.pj-fig { margin: 0 0 14px; break-inside: avoid; }
.pj-fig .pj-ph { margin-bottom: 0; }
.pj-fig figcaption { font-size: 14px; color: var(--ink-2); padding: 8px 2px 0; }
@media (max-width: 719px) {
  .pj-fig { margin-bottom: 10px; }
  .pj-fig figcaption { padding: 8px 16px 4px; }
  .pj-grid[data-kind="making"] { columns: 2; column-gap: 8px; margin: 0; }
  .pj-grid[data-kind="making"] .pj-ph { border-radius: 10px; }
  .pj-grid[data-kind="making"] figcaption { padding: 6px 2px 4px; font-size: 13px; line-height: 1.35; }
}

/* lightbox */
.ov-lb .ov-body { overflow: hidden; position: relative; }
.lb { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.lb::-webkit-scrollbar { display: none; }
.lb figure { flex: 0 0 100%; height: 100%; margin: 0; display: grid; place-items: center; scroll-snap-align: center; padding: 0 0 calc(10px + env(safe-area-inset-bottom)); }
.lb figure { grid-template-rows: 1fr auto; }
.lb img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; min-height: 0; }
.lb figcaption { color: rgba(242,235,226,.85); font-size: 15px; text-align: center; padding: 10px 16px 0; max-width: 640px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; }
.lb-nav:hover { background: rgba(255,255,255,.24); }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
@media (hover: none) { .lb-nav { display: none; } }

/* product grid */
.list-head { padding: 32px 0 8px; display: grid; gap: 16px; }
.list-head h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 400; }
.list-head .search { max-width: 640px; }
.filters { position: sticky; top: 68px; z-index: 10; background: var(--bg); padding: 12px 0; border-bottom: 1px solid var(--line); }
.filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters .chips::-webkit-scrollbar { display: none; }
.filters .chips + .chips { margin-top: 8px; }
.result-meta { color: var(--muted); margin: 18px 0 14px; font-size: 15px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); padding-bottom: 60px; }
@media (min-width: 720px) { .grid { gap: 18px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }
.card { background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(42,36,32,.06), 0 16px 36px rgba(42,36,32,.14); }
.card-img { display: block; aspect-ratio: 1; background: #fff; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card-body .code { font-weight: 500; text-decoration: none; letter-spacing: .02em; }
.card-body .meta { color: var(--muted); font-size: 13px; line-height: 1.35; }
.card-foot { display: flex; gap: 6px; padding: 0 12px 12px; }
.card-foot .btn { flex: 1; height: 34px; font-size: 13px; padding: 0 10px; }
.add[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* product page */
.crumbs { padding: 22px 0 8px; font-size: 14px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.pd { display: grid; gap: 28px; padding: 8px 0 40px; }
@media (min-width: 900px) { .pd { grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; } }
.pd-img { margin: 0; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.pd-img img { width: 100%; height: 100%; object-fit: contain; }
.pd-info h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 400; }
.pd-info .sub { color: var(--muted); font-size: 18px; margin-top: 6px; }
.facts { margin: 22px 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.note { background: var(--sunk); border-radius: 12px; padding: 14px 16px; color: var(--ink-2); font-size: 15px; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pd-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.pd-nav a { text-decoration: none; color: var(--muted); }
.pd-nav a:hover { color: var(--ink); }

/* drawers */
.scrim { position: fixed; inset: 0; background: rgba(20, 14, 10, .45); z-index: 60; opacity: 0; transition: opacity .25s; }
.scrim.on { opacity: 1; }
.drawer, .quick { position: fixed; z-index: 70; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transition: transform .32s cubic-bezier(.2, .8, .2, 1); visibility: hidden; }
.drawer { top: 0; right: 0; bottom: 0; width: min(440px, 100vw); transform: translateX(100%); }
.drawer.on, .quick.on { transform: none; visibility: visible; }
.quick { left: 0; right: 0; bottom: 0; max-height: 88vh; border-radius: 20px 20px 0 0; transform: translateY(100%); }
@media (min-width: 900px) { .quick { left: auto; top: 0; width: 420px; max-height: none; border-radius: 0; transform: translateX(100%); } }
.d-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.d-head h2 { font-size: 22px; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sunk); display: grid; place-items: center; }
.x:hover { background: var(--line); }
.d-body { flex: 1; overflow: auto; padding: 14px 20px; }
.d-foot { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 8px; }
.d-foot .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.li { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.li img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.li a { text-decoration: none; font-weight: 500; }
.li small { display: block; color: var(--muted); font-size: 13px; }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); }
.qty input { width: 46px; height: 30px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.rm { border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; padding: 4px 0; }
.fields { display: grid; gap: 10px; margin: 18px 0 6px; }
.fields label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.fields input, .fields textarea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 15px; color: var(--ink); }
.fields textarea { min-height: 70px; resize: vertical; }
.d-empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.d-empty b { display: block; color: var(--ink); font-size: 18px; font-weight: 500; margin-bottom: 6px; }
.q-img { background: #fff; aspect-ratio: 4/3; max-height: 40vh; width: 100%; display: grid; place-items: center; flex: none; }
.q-body { flex: 1; min-height: 0; }
.q-body > a { color: var(--accent); font-size: 15px; text-decoration: none; font-weight: 500; }
.q-actions { grid-template-columns: 1fr 1fr; }
.q-actions .btn { width: 100%; padding: 0 10px; }
.q-img img { width: 100%; height: 100%; object-fit: contain; }
.q-body { padding: 18px 20px; overflow: auto; }
.q-body h3 { font-size: 26px; font-weight: 400; }
.q-body .facts { margin: 14px 0; }
.q-list .li { grid-template-columns: 56px 1fr auto; }
.q-list .li img { width: 56px; height: 56px; }

.share-opt { display: grid; gap: 4px; padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.share-opt b { font-weight: 500; font-size: 17px; }
.share-url { color: var(--muted); font-size: 14px; word-break: break-all; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 15px; z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--ink-2); font-size: 15px; }
.foot-in { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot b { font-weight: 500; display: block; margin-bottom: 6px; color: var(--ink); }
.foot p { margin: 0; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------- reader ---------- */
body.reading { background: var(--reader); overflow: hidden; overscroll-behavior: none; }
body.reading .top, body.reading .foot { display: none; }
.reader { position: fixed; inset: 0; display: flex; flex-direction: column; color: #f2ebe2; background: radial-gradient(120% 90% at 50% 40%, #2d2722 0%, var(--reader) 70%); }
.rbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); }
.rbtn { height: 40px; min-width: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #f2ebe2; text-decoration: none; font-size: 14px; white-space: nowrap; }
.rbtn:hover { background: rgba(255,255,255,.14); }
.rbtn svg { flex: none; }
.rbtn .count { background: #f2ebe2; color: var(--reader); }
.rtitle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.rtitle b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtitle select { max-width: 200px; height: 40px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #f2ebe2; padding: 0 12px; }
.rtitle select option { color: var(--ink); }
.r-hide-sm { display: none !important; }
@media (min-width: 760px) { .r-hide-sm { display: inline-flex !important; } }
@media (max-width: 759px) { .rtitle b { display: none; } .rtitle select { max-width: none; flex: 1; } .rbtn .lbl { display: none; } }
.rstage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.book-wrap { position: relative; }
.book { margin: 0 auto; }
.rnav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; z-index: 5; transition: background .15s, opacity .2s; }
.rnav:hover { background: rgba(255,255,255,.22); }
.rnav:disabled { opacity: .2; cursor: default; }
.rprev { left: 12px; }
.rnext { right: 12px; }
@media (max-width: 759px) { .rnav { width: 40px; height: 40px; background: rgba(0,0,0,.35); } .rprev { left: 4px; } .rnext { right: 4px; } }
.rfoot { display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); }
.rfoot input[type=range] { flex: 1; accent-color: #d9b48f; }
.rpage { font-size: 14px; color: rgba(242,235,226,.75); white-space: nowrap; min-width: 92px; text-align: center; font-variant-numeric: tabular-nums; }

/* pages inside the flipbook */
.page { background: #f6f2ec; overflow: hidden; }
.pg { position: relative; width: 100%; height: 100%; }
.pg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.pg .lo { filter: blur(6px); transform: scale(1.02); }
.hs { position: absolute; padding: 0; margin: 0; touch-action: pinch-zoom; -webkit-user-select: none; user-select: none; border: 1.5px solid transparent; border-radius: 6px; background: transparent; z-index: 2; transition: border-color .15s, background .15s, box-shadow .15s; }
.hs::after { content: "+"; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(42, 36, 32, .78); color: #fff; font: 500 18px/24px var(--font); text-align: center; pointer-events: none; transition: transform .15s, background .15s; }
.hs:hover { border-color: rgba(122, 78, 45, .9); background: rgba(122, 78, 45, .06); box-shadow: 0 0 0 4px rgba(255, 255, 255, .35); }
.hs:hover::after { background: var(--accent); transform: scale(1.12); }
.hs.in::after { content: "✓"; background: var(--accent); font-size: 14px; }
.lk { position: absolute; z-index: 2; border-radius: 6px; border: 0; padding: 0; background: transparent; }
.lk:hover { background: rgba(122, 78, 45, .12); }
@media (hover: none) { .hs::after { width: 22px; height: 22px; line-height: 22px; font-size: 16px; } }
.coach { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(255,253,249,.96); color: var(--ink); border-radius: 999px; padding: 8px 16px; font-size: 14px; box-shadow: var(--shadow-lg); z-index: 6; white-space: nowrap; animation: coach 6s ease forwards; pointer-events: none; }
@keyframes coach { 0% { opacity: 0; transform: translate(-50%, 10px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* zoom + page grid overlays */
.overlay { position: fixed; inset: 0; z-index: 80; background: #0f0c0a; display: flex; flex-direction: column; }
.ov-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); color: #f2ebe2; }
.ov-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }
.zoom-pages { display: flex; justify-content: center; gap: 4px; padding: 0 0 20px; min-width: min-content; margin: 0 auto; }
.zoom-pages img { width: min(92vw, 900px); height: auto; cursor: zoom-in; }
.zoom-pages.big img { width: min(180vw, 1620px); cursor: zoom-out; }
.pgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); padding: 6px 16px 30px; max-width: 1240px; margin: 0 auto; }
.pgrid a { text-decoration: none; color: rgba(242,235,226,.7); font-size: 12px; text-align: center; }
.pgrid .pth { aspect-ratio: 9/16; border-radius: 6px; overflow: hidden; background: var(--reader-2); margin-bottom: 4px; outline: 2px solid transparent; }
.pgrid a.cur .pth, .pgrid a:hover .pth { outline-color: #d9b48f; }
.pgrid img { width: 100%; height: 100%; object-fit: cover; }
.pgrid h4 { grid-column: 1 / -1; margin: 12px 0 0; color: #f2ebe2; font-weight: 500; font-size: 16px; }

/* ---------- phone first ---------- */
.top-search { display: none; }
.tabbar { display: none; }
.rfp, .rfn { display: none !important; }
.rpage { background: none; border: 0; padding: 6px 4px; color: rgba(242,235,226,.75); }
.rpage:hover { color: #fff; }
@media (max-width: 759px) {
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  body.reading { padding-bottom: 0; }
  .top-in { height: 56px; }
  .brand img { width: 36px; height: 36px; }
  .top-actions { display: none; }
  .top-search { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
  .filters { top: 56px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255, 253, 249, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  body.reading .tabbar { display: none; }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 60px; border: 0; background: none; text-decoration: none; font-size: 11px; color: var(--muted); touch-action: manipulation; }
  .tabbar [aria-current="page"] { color: var(--ink); }
  .tabbar [aria-current="page"] svg { color: var(--accent); }
  .tabbar .tb-wa { color: var(--wa); }
  .tabbar .dot { position: absolute; top: 6px; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font: 600 11px/18px var(--font); font-style: normal; text-align: center; }
  .tabbar .dot.zero { display: none; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }

  .hero { padding: 18px 0 40px; gap: 22px; }
  .hero h1 { font-size: 34px; }
  .lede { font-size: 16px; margin: 12px 0 18px; }
  .search input { height: 48px; }
  .search .btn { height: 48px; padding: 0 16px; }
  .search svg { top: 15px; }
  .stats { gap: 8px 20px; margin-top: 20px; }
  .stats b { font-size: 22px; }
  .sec { padding: 40px 0; }

  .shelf { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat-cover { aspect-ratio: 3/4; }
  .cat-cover .pill { left: 8px; bottom: 8px; font-size: 11px; padding: 3px 8px; }
  .cat-body { padding: 12px; gap: 6px; }
  .cat-body h3 { font-size: 17px; }
  .cat-body p { display: none; }
  .cat-actions { margin-top: 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .cat-actions .btn { width: 100%; height: 36px; font-size: 12.5px; padding: 0 6px; }
  .cat-actions .btn:first-child { grid-column: 1 / -1; font-size: 13px; }
  .cat-actions .btn:nth-child(2) { display: none; }
  .cat-actions .btn svg { display: none; }

  .pd { gap: 18px; }
  .pd-info > .pd-actions { position: sticky; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 5; background: var(--bg); margin: 16px -16px 0; padding: 10px 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; }
  .pd-info > .pd-actions .btn { width: 100%; }
  .pd-info > .pd-actions .btn-ghost { grid-column: 1 / -1; }

  /* reader: page controls live in the bottom bar */
  .rnav { display: none; }
  .rfp, .rfn { display: inline-flex !important; width: 44px; padding: 0; }
  .rfoot input[type=range] { display: none; }
  .rfoot { gap: 6px; }
  .rpage { min-width: 74px; font-size: 15px; color: #f2ebe2; }
  .onpage { margin-left: auto; }
  .rbar { gap: 8px; padding-left: 10px; padding-right: 10px; }
}
@media (hover: none) {
  .card:hover, .cat-card:hover { transform: none; }
  .cat-card:hover .cat-cover img, .proj:hover img, .pj-ph:hover img { transform: none; }
  button, a { -webkit-tap-highlight-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* project photos: video tiles, stage labels, two buttons in a section head */
.pj-ph { position: relative; }
.pj-ph .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 62px; height: 62px; border-radius: 50%; background: rgba(20, 14, 10, .58); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.pj-ph .play svg { margin-left: 3px; }
.lb video { max-width: 100%; max-height: 100%; width: auto; height: auto; min-height: 0; background: #000; }
.pj-jump { flex-wrap: wrap; }
.sec-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.proj small .stage { display: inline; font-weight: 500; margin: 0; color: var(--ink-2); }

/* home range: square collection tiles, selling points */
.rail-sq .proj .pimg.sq, .rail-sq .proj .pimg { aspect-ratio: 1; background: #fff; }
.rail-sq { grid-auto-columns: minmax(150px, 180px); }
.points { margin: 4px 0 14px; padding-left: 20px; color: var(--ink-2); }
.points li { margin: 2px 0; }

/* shop by type: one tap from the home page to every chair, table, sofa, bed... */
.sec-types { padding-top: 6px; }
.type-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.type-tile { display: grid; gap: 2px; text-decoration: none; background: var(--surface); border-radius: 14px; padding: 10px 10px 12px; box-shadow: var(--shadow); transition: transform .2s; }
.type-tile:hover { transform: translateY(-2px); }
.type-tile .tt-img { display: block; aspect-ratio: 1; background: #fff; border-radius: 10px; overflow: hidden; margin-bottom: 6px; }
.type-tile img { width: 100%; height: 100%; object-fit: contain; }
.type-tile b { font-weight: 500; }
.type-tile small { color: var(--muted); font-size: 13px; }
@media (max-width: 719px) { .type-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .type-tile { padding: 6px 6px 8px; border-radius: 12px; } .type-tile b { font-size: 14px; } .type-tile small { font-size: 12px; } }
.chips-type .chip { font-weight: 500; }

/* only the type row is pinned while scrolling; catalogue, kind and collection rows scroll away */
.filters { padding: 10px 0; }
.filters-more { padding: 10px 0 2px; }
.filters-more .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters-more .chips::-webkit-scrollbar { display: none; }
.filters-more .chips + .chips { margin-top: 8px; }

/* shop-by-type tiles live in the hero: full width under it on desktop, right under the covers on phones */
.hero-types { grid-column: 1 / -1; }
@media (max-width: 979px) { .hero-types { order: -1; } }

/* quick view: keep the product photo inside its box (the 500x500 size hints made it overflow on phones) */
.q-img { position: relative; overflow: hidden; }
.q-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* hospitality menu: group headings on the home page link to the group */
.chip-groups h3 a { color: inherit; text-decoration: none; }
.chip-groups h3 a:hover { text-decoration: underline; }
