/* 3DOM configurator – visual language of the 3DOM landing page (paper tones, DM Sans, square edges, black arrow buttons). */
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/dm-sans-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/dm-sans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f2f0e9;
  --bar: #f5f3ed;      /* top bar, panels */
  --band: #ece9e2;     /* alternate section background */
  --ink: #171a1d;
  --button: #181a1b;
  --text: #3c3d3a;
  --muted: #686965;
  --line: #d8d6ce;
  --error: #a12d1b;
  --gutter: 5.1%;
  --topbar: 82px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }
body { background: var(--paper); color: var(--ink); font-family: "DM Sans", Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(40px, 4.1vw, 72px); line-height: 1.05; letter-spacing: -2px; font-weight: 500; margin-bottom: 25px; }
h2 { font-size: clamp(27px, 2.35vw, 42px); line-height: 1.12; letter-spacing: -.9px; font-weight: 500; margin-bottom: 13px; }
h3 { font-size: 18px; line-height: 1.2; font-weight: 500; margin-bottom: 12px; }
.muted { color: var(--muted); }
.lead { max-width: 540px; font-size: 15px; line-height: 1.65; color: #535550; }
.eyebrow { font-size: 11px; letter-spacing: 2px; font-weight: 600; text-transform: uppercase; margin: 0 0 12px; color: #3f413d; }
.subhead { color: var(--muted); margin-bottom: 28px; }

/* ---------------------------------------------------------------- chrome */
.topbar { height: var(--topbar); padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--bar); position: relative; z-index: 10; }
.brand { display: block; line-height: 0; }
.brand { min-width: 0; }
.brand img { height: 60px; width: auto; object-fit: contain; object-position: left center; }  /* landing page: .logo max-height 60px; on very narrow phones it shrinks in proportion instead of squashing */
.topbar .nav { flex-shrink: 0; margin-left: auto; }
/* Hamburger (landing page: two 34 px lines); shown below 900 px, where the menu drops down under the bar. */
.menu { display: none; border: 0; background: none; width: 42px; padding: 8px 0; flex-direction: column; align-items: flex-end; gap: 5px; cursor: pointer; }
.menu span { display: block; height: 1px; width: 34px; background: #222; transition: transform .2s; }
.menu[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }
.nav { display: flex; gap: 34px; align-items: center; }
.nav a { font-size: 12px; color: var(--text); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav > a { padding: 4px 0; border-bottom: 1px solid transparent; }
.nav > a:hover, .nav > a[aria-current] { border-bottom-color: #8f9089; }
.lang-switch { display: flex; gap: 6px; align-items: center; }
.lang-switch a { display: block; padding: 3px; line-height: 0; opacity: .5; transition: opacity .15s; }
.lang-switch a:hover, .lang-switch a:focus-visible { opacity: 1; }
.lang-switch a[aria-current] { opacity: 1; box-shadow: 0 0 0 1px var(--ink); }
.lang-switch img { width: 22px; height: 15px; object-fit: cover; box-shadow: 0 0 0 1px rgb(0 0 0 / .12); }

.footer { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 26px var(--gutter) 30px; }

.footer nav { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer nav a, .footer small { font-size: 12px; color: var(--text); }
.footer nav a:hover { color: var(--ink); }
.footer small { color: var(--muted); }
.eu-band { background: #fff; line-height: 0; }
.eu-band img { width: 100%; max-width: 1600px; height: auto; margin: 0 auto; }

/* Buttons: black block with a right-aligned arrow (primary), outlined (ghost), underlined text link (link). */
.btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 170px; min-height: 42px; padding: 11px 20px; border: 1px solid var(--button); border-radius: 0; background: var(--button); color: #fff; font: inherit; font-size: 12px; text-align: left; cursor: pointer; transition: background .15s, color .15s, opacity .15s; }
.btn:not(.ghost):not(.link)::after { content: "→"; font-size: 18px; line-height: 14px; }
.btn:hover { background: #33373a; border-color: #33373a; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); justify-content: center; }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.link, .arrow-link { min-width: 0; min-height: 0; padding: 0 0 3px; border: 0; border-bottom: 1px solid #8f9089; background: none; color: var(--ink); font-size: 13px; }
.btn.link:hover, .arrow-link:hover { background: none; border-bottom-color: var(--ink); }
.arrow-link { display: inline-flex; align-items: center; gap: 16px; }
.arrow-link span { font-size: 22px; line-height: 14px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.badge { display: inline-block; font-size: 10px; letter-spacing: 2px; font-weight: 600; text-transform: uppercase; padding: 4px 8px; background: var(--bar); color: #3f413d; border: 1px solid var(--line); }

.section { padding: 48px var(--gutter); }
.section.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.narrow > * { max-width: 760px; }

/* ---------------------------------------------------------------- home */
.hero { min-height: 590px; position: relative; display: flex; align-items: center; overflow: hidden; background: #e8e5dc; }
.hero-image { position: absolute; inset: 0 0 0 46%; background: linear-gradient(90deg, rgb(242 240 233 / .1), rgb(242 240 233 / 0)), url("../img/hero.jpg") right / cover; }
.hero-copy { position: relative; z-index: 1; width: 46%; padding: 70px 24px 70px var(--gutter); }
.hero-copy h1 { font-size: clamp(40px, 3.5vw, 64px); }
.hero-copy .lead { margin-bottom: 32px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); }
.steps article { padding: 0 26px; border-left: 1px solid var(--line); }
.steps article:first-child { padding-left: 0; border-left: 0; }
.steps article:last-child { padding-right: 0; }
.steps .number { font-size: 12px; margin: 0 0 9px; }
.steps article > p:not(.number) { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin-bottom: 2px; }
.section-head .subhead { margin: 0; }

/* ---------------------------------------------------------------- catalog */
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: clamp(32px, 3.2vw, 52px); letter-spacing: -1.5px; margin-bottom: 8px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip { padding: 7px 16px; border: 1px solid var(--line); font-size: 12px; color: var(--text); transition: border-color .15s, background .15s; }
.chip:hover { border-color: #8f9089; }
.chip[aria-current] { background: var(--button); border-color: var(--button); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 34px 26px; }
.card { display: block; }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--band); overflow: hidden; display: grid; place-items: center; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-placeholder { width: 70%; color: var(--muted); opacity: .6; }
.card-media .badge { position: absolute; top: 12px; left: 12px; }
.card-body { padding-top: 16px; }
.card-body h2 { font-size: 18px; letter-spacing: 0; line-height: 1.2; margin-bottom: 6px; }
.card-body p { margin: 0; font-size: 13px; color: var(--muted); }
.card-body .card-meta { margin-top: 10px; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #3f413d; }
.card-body .arrow-link { margin-top: 14px; font-size: 12px; }

/* ---------------------------------------------------------------- product */
.product { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 6%; padding: 48px var(--gutter); }
.product-info h1 { font-size: clamp(32px, 3.2vw, 52px); letter-spacing: -1.5px; margin: 12px 0 14px; }
.product-info h2 { font-size: 11px; letter-spacing: 2px; font-weight: 600; text-transform: uppercase; color: #3f413d; margin: 30px 0 12px; }
.product-info > p { color: var(--muted); }
.product-info .lead { color: #535550; }
.product-info .btn { margin-top: 8px; }
.product-media { display: grid; gap: 10px; align-content: start; }
.stage-preview { aspect-ratio: 4 / 3; }
.gallery-main { position: relative; overflow: hidden; }
.gallery-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--band); cursor: zoom-in; }
.gallery-hint { position: absolute; left: 14px; bottom: 12px; padding: 4px 10px; background: rgb(245 243 237 / .9); color: var(--muted); font-size: 11px; pointer-events: none; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: rgb(245 243 237 / .92); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.gallery-nav.prev { left: 12px; } .gallery-nav.next { right: 12px; }
.gallery-main:hover .gallery-nav, .gallery-nav:focus-visible { opacity: 1; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.thumb { flex: none; width: 84px; aspect-ratio: 4 / 3; padding: 0; border: 0; overflow: hidden; background: var(--band); cursor: pointer; opacity: .6; transition: opacity .15s; box-shadow: inset 0 0 0 1px var(--line); }
.thumb:hover, .thumb:focus-visible { opacity: 1; }
.thumb[aria-current] { opacity: 1; box-shadow: 0 0 0 1px var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-3d { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink); font: inherit; font-size: 11px; letter-spacing: 1px; }
.thumb-3d svg { width: 22px; height: 22px; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 94vw; max-height: 94vh; }
.lightbox::backdrop { background: rgb(23 26 29 / .88); }
.lightbox img { display: block; max-width: 94vw; max-height: 94vh; object-fit: contain; }
.lightbox button { position: fixed; top: 16px; right: 20px; width: 40px; height: 40px; border: 0; background: var(--bar); font-size: 1.4rem; cursor: pointer; }
.specs { display: grid; grid-template-columns: auto 1fr; margin: 0; border-top: 1px solid var(--line); }
.specs dt, .specs dd { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.specs dt { color: var(--muted); padding-right: 24px; }
.specs dd { margin: 0; }
.swatches { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; }
.swatches li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); }
.swatch { display: inline-block; vertical-align: middle; width: 22px; height: 22px; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14); flex: none; }
/* Clear finishes: tinted glass over a checkerboard. */
.swatch.clear { background: linear-gradient(color-mix(in srgb, var(--c) 45%, transparent) 0 0), repeating-conic-gradient(#cfccc5 0 25%, #fff 0 50%) 0 0 / 8px 8px; }

/* ---------------------------------------------------------------- configurator */
.configurator { display: grid; grid-template-columns: minmax(0, 1fr) 400px; border-top: 1px solid var(--line); }
/* Desktop: header, configurator and footer fit the window; only the options panel scrolls.
   Uses :has() rather than a body class, because hx-boost swaps the body content but keeps its attributes. */
@media (min-width: 861px) {
  body:has(.configurator) { height: 100vh; height: 100dvh; overflow: hidden; }
  body:has(.configurator) main { display: flex; flex-direction: column; min-height: 0; }
  body:has(.configurator) :is(.topbar, .footer) { flex-shrink: 0; }
  body:has(.configurator) .eu-band { display: none; }
  .configurator { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
}
.stage { position: relative; background: #fff; min-height: 300px; } /* = 3D studio background */
.canvas-host, .canvas-host canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.dim-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.dim-label { position: absolute; left: 0; top: 0; font-size: 11px; padding: 2px 8px; background: rgb(245 243 237 / .92); color: var(--ink); white-space: nowrap; }
.stage-loading { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); padding: 6px 14px; background: var(--bar); font-size: 12px; border: 1px solid var(--line); }
.viewbar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 0; align-items: center; background: rgb(245 243 237 / .95); border: 1px solid var(--line); }
.viewbar button { border: 0; border-right: 1px solid var(--line); background: none; font: inherit; font-size: 12px; color: var(--text); padding: 9px 16px; cursor: pointer; }
.viewbar button:hover { background: var(--ink); color: #fff; }
.toggle { font-size: 12px; padding: 0 14px; display: flex; gap: 6px; align-items: center; color: var(--muted); white-space: nowrap; }
.toggle input { accent-color: var(--ink); }

.panel { overflow-y: auto; padding: 26px 30px 32px; background: var(--paper); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; }
.panel-head h1 { font-size: 29px; letter-spacing: -.9px; line-height: 1.12; margin: 10px 0 0; }
.cfg-form { display: grid; gap: 20px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 11px; letter-spacing: 2px; font-weight: 600; text-transform: uppercase; color: #3f413d; margin-bottom: 12px; }
.range { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; margin-bottom: 12px; }
.range > span:first-child { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.range input[type=range] { width: 100%; accent-color: var(--ink); }
.num { font-size: 12px; color: var(--muted); white-space: nowrap; }
.num output { display: inline-block; min-width: 3em; text-align: right; color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.num input { width: 6.8em; font: inherit; font-size: 13px; color: var(--ink); padding: 7px 8px; border: 1px solid var(--line); border-radius: 0; background: transparent; text-align: right; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { position: relative; cursor: pointer; }
.option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.option > span:not(.swatch) { display: inline-block; padding: 8px 16px; border: 1px solid var(--line); font-size: 12px; color: var(--text); }
.option:hover > span:not(.swatch) { border-color: #8f9089; }
.option input:checked ~ span:not(.swatch) { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.option input:focus-visible ~ span { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatch-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.swatch-option { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); }
.swatch-option:hover { border-color: #8f9089; }
.swatch-option > span:not(.swatch) { border: 0; padding: 0; font-size: 12px; }
.option.swatch-option input:checked ~ span:not(.swatch) { box-shadow: none; }
.swatch-option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.summary { border-top: 1px solid var(--line); padding-top: 18px; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0; }
.summary-grid dt { font-size: 10px; letter-spacing: 1.5px; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.summary-grid dd { margin: 3px 0 0; font-size: 13px; }
.summary-grid strong { font-weight: 500; }
.summary-grid small { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
.summary-price { grid-column: 1 / -1; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-price strong { font-weight: 500; font-size: 29px; letter-spacing: -.9px; }
.note { font-size: 12px; margin: 10px 0 0; color: var(--text); }
.note.muted { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px 8px; align-items: center; }
.actions .btn:first-child { flex: 1 1 100%; }
.actions .btn.ghost { flex: 1 1 0; min-width: 0; }
.actions .btn.link { margin: 6px 14px 0 0; font-size: 12px; }
.htmx-request .summary, .summary.htmx-request { opacity: .6; transition: opacity .2s; }

/* ---------------------------------------------------------------- modal & forms */
.modal { border: 0; border-radius: 0; padding: 0; width: min(540px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / .2); }
.modal::backdrop { background: rgb(23 26 29 / .45); }
.modal-form { display: grid; gap: 14px; padding: 30px; }
.modal-form h2 { font-size: 29px; }
.modal-form > p { color: var(--muted); }
.modal-form label { display: grid; gap: 5px; font-size: 11px; color: #5b5d58; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font: inherit; font-size: 12px; color: var(--ink); padding: 10px 11px; border: 1px solid var(--line); border-radius: 0; background: transparent; outline-offset: 2px; }
.modal-form input:not([type=checkbox]):not([type=radio]), .modal-form textarea { width: 100%; }
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 1px solid var(--ink); }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); }
.modal-form .check { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.modal-form .check input { margin-top: 3px; }
.modal-form .check > span:not(.field-error) { flex: 1; }
.modal-form .check .field-error { flex-basis: 100%; margin: -4px 0 0 26px; }
.modal-form a { border-bottom: 1px solid #8f9089; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.error { color: var(--error); margin: 0; }
.field-error { display: block; grid-column: 1 / -1; color: var(--error); font-size: 12px; margin-top: 2px; }
.modal-form [aria-invalid="true"]:not([type=checkbox]) { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.modal-form [type=checkbox][aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 1px; }

.cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 620px; margin-left: auto; padding: 20px 22px; background: var(--bar); border: 1px solid var(--line); box-shadow: 0 10px 40px rgb(0 0 0 / .12); font-size: 13px; }
.cookies p { margin: 0 0 14px; color: var(--text); }
.cookies p a { border-bottom: 1px solid #8f9089; }
.cookies-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------------------------------------------------------------- tables */
table.data { border-collapse: collapse; width: 100%; max-width: 760px; margin-bottom: 32px; font-size: 13px; }
table.data th, table.data td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
table.data th { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.bar-cell { width: 40%; }
.bar { display: block; height: 8px; background: var(--ink); }

/* ---------------------------------------------------------------- accounts, order, shared form layout */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hint { display: block; font-size: 11px; color: var(--muted); }
.small { font-size: 12px; }
.pre { white-space: pre-line; }
.inline-link { border-bottom: 1px solid #8f9089; }
.danger { color: var(--error) !important; }
.btn.danger { border-color: var(--error); }
.fav-mark { color: #b08a2e; }
.summary-price .list-price { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--muted); font-size: 20px; }
.summary-price .discount { display: block; margin-top: 4px; font-size: 13px; }
.summary-price .discount strong { font-size: 29px; letter-spacing: -.9px; color: var(--ink); text-decoration: none; }
.pdf-form { display: contents; }

.auth-form, .order-form, .profile-form, .admin-form { display: grid; gap: 14px; }
:is(.auth-form, .order-form, .profile-form, .admin-form, .project-edit) label:not(.check):not(.option) { display: grid; gap: 5px; font-size: 11px; color: #5b5d58; }
:is(.auth-form, .order-form, .profile-form, .admin-form) .check, .filters-bar .check { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
:is(.auth-form, .order-form, .profile-form, .admin-form) .check input { margin-top: 3px; }
:is(.auth-form, .order-form, .profile-form) .check > span:not(.field-error) { flex: 1; }
:is(.auth-form, .order-form, .profile-form, .admin-form) [aria-invalid="true"]:not([type=checkbox]) { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.auth { display: grid; place-items: start center; }
.auth-form { width: min(440px, 100%); }
.auth-form h1, .order h1, .account h1 { font-size: clamp(32px, 3.2vw, 48px); letter-spacing: -1.5px; margin-bottom: 4px; }
.auth-form > p { margin: 0; }
.auth-form .btn { justify-self: start; }
.construction { padding: 16px 18px; background: var(--bar); border: 1px solid var(--line); margin-bottom: 10px; }
.construction p { margin: 10px 0 0; color: var(--text); }
.auth-links { font-size: 12px; color: var(--muted); }
.auth-links a { color: var(--ink); border-bottom: 1px solid #8f9089; }

.account h2 { font-size: 26px; margin-top: 40px; }
.account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.account-head .subhead { margin-bottom: 10px; }
.group-head { margin: 22px 0 12px; font-size: 15px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.project { background: var(--bar); border: 1px solid var(--line); display: flex; flex-direction: column; }
.project-media { display: block; aspect-ratio: 16 / 10; background: #fff; border-bottom: 1px solid var(--line); }
.project-media img { width: 100%; height: 100%; object-fit: contain; }
.project-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.project-body h3 { margin: 0; }
.project-body p { margin: 0; font-size: 12px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.project-actions .btn.link { font-size: 12px; }
.project-edit summary { cursor: pointer; font-size: 12px; color: var(--muted); margin-top: 6px; }
.project-edit form { display: grid; gap: 10px; margin-top: 10px; }
.project-edit input, .project-edit textarea { width: 100%; }
.row-actions { display: flex; gap: 14px; align-items: center; }
.fav-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 20px; }
.fav-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.fav-list li > span:nth-child(2) { flex: 1; }
.fav-toggle { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: #8f9089; padding: 2px 4px; }
.fav-toggle[aria-pressed="true"] { color: #b08a2e; }
.profile-form { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 760px; }
.profile-form .wide { grid-column: 1 / -1; }
.profile-form .btn { justify-self: start; }

.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.order-form { max-width: 680px; }
.order-form fieldset { display: grid; gap: 12px; }
.order-form .btn { justify-self: start; }
.order-summary { background: var(--bar); border: 1px solid var(--line); padding: 22px; position: sticky; top: 20px; }
.order-summary h2 { font-size: 11px; letter-spacing: 2px; font-weight: 600; text-transform: uppercase; color: #3f413d; }
.order-summary img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 14px; }
.order-summary .specs { margin-bottom: 12px; }
.order-status .specs { margin: 20px 0 30px; }
.history { padding-left: 18px; font-size: 13px; }
.history li { margin-bottom: 4px; }
.modal-form .stacked { display: grid; gap: 8px; }

/* ---------------------------------------------------------------- admin panel */
body.admin { font-size: 13px; background: var(--paper); }
.admin-bar { display: flex; align-items: center; gap: 20px; padding: 10px 24px; background: var(--bar); border-bottom: 1px solid var(--line); }
.admin-bar .brand img { height: 34px; }
.admin-title { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; color: #3f413d; }
.admin-user { margin-left: auto; font-size: 12px; color: var(--muted); }
.admin-user a { border-bottom: 1px solid #8f9089; }
form.inline { display: inline; }
.linklike { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; border-bottom: 1px solid #8f9089; }
.admin-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); flex: 1; }
.admin-nav { display: flex; flex-direction: column; padding: 20px 0; border-right: 1px solid var(--line); background: var(--bar); }
.admin-nav a { padding: 9px 24px; color: var(--text); border-left: 2px solid transparent; }
.admin-nav a:hover { color: var(--ink); background: var(--band); }
.admin-nav a[aria-current] { color: var(--ink); border-left-color: var(--ink); background: var(--band); font-weight: 500; }
.admin-main { padding: 28px 36px 60px; min-width: 0; }
.admin-main h1 { font-size: 34px; letter-spacing: -1px; margin-bottom: 14px; }
.admin-main h2 { font-size: 20px; letter-spacing: -.3px; margin: 30px 0 12px; }
.admin-main table.data { max-width: none; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.head-row h1 { margin-bottom: 8px; }
.head-row > span { display: flex; gap: 18px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 18px 0 10px; }
.tile { display: grid; gap: 2px; padding: 16px 18px; background: var(--bar); border: 1px solid var(--line); }
.tile strong { font-size: 30px; font-weight: 500; letter-spacing: -1px; }
.tile span { color: var(--muted); font-size: 12px; }
a.tile:hover { border-color: #8f9089; }
.two-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 12px 40px; align-items: start; }
.filters-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0 18px; }
.filters-bar .btn { min-width: 0; min-height: 36px; padding: 8px 16px; }
.filters-bar input[type=search] { min-width: 240px; }
.status { display: inline-block; font-size: 11px; padding: 2px 8px; border: 1px solid var(--line); white-space: nowrap; }
.status-new { background: #171a1d; color: #fff; border-color: #171a1d; }
.status-confirmed, .status-in_progress { background: #e6eee0; border-color: #c4d3b8; }
.status-in_production, .status-shipped { background: #f1e8d4; border-color: #dccba5; }
.status-cancelled, .status-rejected { color: var(--muted); text-decoration: line-through; }
.num-col { text-align: right !important; font-variant-numeric: tabular-nums; }
table.data td.num-col, table.data th.num-col { padding-right: 16px; }
.thumb-cell img { width: 64px; height: 48px; object-fit: cover; }
.inactive td { color: var(--muted); }
.admin-form { max-width: 980px; }
.admin-form fieldset { display: grid; gap: 12px; padding: 18px 0 6px; border-top: 1px solid var(--line); }
.admin-form legend { padding-right: 10px; }
.admin-form input:not([type=checkbox]):not([type=radio]):not([type=color]), .admin-form select, .admin-form textarea { width: 100%; }
.admin-form input[type=color] { width: 64px; height: 38px; padding: 2px; border: 1px solid var(--line); background: none; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; align-items: start; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; align-items: start; }
.i18n-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.checks { display: grid; gap: 8px; padding-top: 18px; }
.finish-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.finish-checks .check { align-items: center; }
.finish-checks .check input { margin-top: 0; }
.form-actions { display: flex; gap: 16px; align-items: center; padding-top: 6px; }
.note.ok { color: #2f5d24; }
.error-box { border: 1px solid var(--error); background: #fbefec; color: var(--error); padding: 12px 16px; margin: 12px 0; max-width: 980px; }
.error-box ul { margin: 6px 0 0; padding-left: 18px; }
.image-list { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.image-list figure { margin: 0; width: 180px; display: grid; gap: 6px; font-size: 12px; }
.image-list img { width: 180px; height: 135px; object-fit: cover; border: 1px solid var(--line); }
.image-list form { display: flex; gap: 12px; }
.inline-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.advanced { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 14px; max-width: 980px; }
.advanced summary { cursor: pointer; font-weight: 500; }
.advanced form { margin-top: 12px; display: grid; gap: 12px; }
textarea.code { width: 100%; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12px; line-height: 1.45; }
.danger-zone summary { color: var(--error); }
.csv-box { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 16px 20px; background: var(--bar); border: 1px solid var(--line); margin: 16px 0 20px; }
.csv-box h2 { margin-top: 0; }
.steps-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.table-scroll { overflow-x: auto; }
table.data.wide { font-size: 12px; white-space: nowrap; }
.pager { display: flex; gap: 20px; align-items: center; }
.daily { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding: 6px 0; border-bottom: 1px solid var(--line); max-width: 980px; }
.day { flex: 1; height: 100%; display: flex; align-items: flex-end; gap: 1px; }
.day span { flex: 1; display: block; min-height: 1px; }
.bar-s, .key-s { background: #b9b7ae; }
.bar-l, .key-l { background: var(--ink); }
.legend { font-size: 12px; color: var(--muted); }
.key { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 10px; vertical-align: -1px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- wide screens: content column like the landing page */
@media (min-width: 1600px) {
  :root { --gutter: max(5.1%, calc((100vw - 1660px) / 2)); }
  .hero { min-height: 680px; }
}

/* ---------------------------------------------------------------- tablet & mobile */
@media (max-width: 900px) {
  :root { --topbar: 70px; }
  .topbar .nav { display: none; position: absolute; top: var(--topbar); left: 0; right: 0; margin: 0; padding: 22px var(--gutter); background: var(--paper); flex-direction: column; align-items: flex-start; gap: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgb(0 0 0 / .06); }
  .topbar .nav.open { display: flex; }
  .topbar .nav a { font-size: 14px; }
  .menu { display: flex; margin-left: auto; }
  .hero { min-height: 560px; }
  .hero-image { left: 20%; opacity: .6; }
  .hero-copy { width: 75%; padding: 65px var(--gutter); }
  .product { grid-template-columns: 1fr; gap: 30px; }
  .order-grid { grid-template-columns: 1fr; }
  .order-summary { position: static; order: -1; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; padding: 6px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-nav a { padding: 6px 10px; border-left: 0; }
  .admin-main { padding: 20px 16px 40px; }
  .i18n-row { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .gallery-nav { opacity: 1; width: 34px; height: 34px; }
  .thumb { width: 68px; }
  .configurator { grid-template-columns: 1fr; height: auto; }
  .configurator .stage { height: 56vh; height: 56svh; position: sticky; top: 0; z-index: 1; }
  .panel { border-left: 0; overflow: visible; padding: 22px var(--gutter) 32px; }
  .viewbar { bottom: 10px; }
  .toggle { display: none; }
}
@media (max-width: 600px) {
  :root { --gutter: 6%; }
  body { font-size: 13px; }
  .topbar { gap: 12px; }
  .hero { min-height: 570px; align-items: flex-end; }
  .hero-image { inset: 0; background-position: 60% center; opacity: .45; }
  .hero-copy { width: 100%; padding: 75px var(--gutter) 55px; background: linear-gradient(0deg, rgb(242 240 233 / .97), rgb(242 240 233 / .82), rgb(242 240 233 / 0)); }
  h1 { font-size: 43px; letter-spacing: -1.5px; }
  .lead { font-size: 13px; }
  .section, .product { padding: 34px var(--gutter); }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .steps article, .steps article:first-child { padding: 0; border-left: 0; }
  .footer { align-items: flex-start; }
  .footer nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
  .footer nav a { font-size: 11px; }
}
