:root {
  font: 15px/1.45 'Inter', system-ui, sans-serif;
  color: #1d2c31;
  background: #f3f6f5;
  color-scheme: light;
  --line: #dbe5e1;
  --muted: #4f6468;
  --accent: #0f604e;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
h2 { font-size: 18px; }
h3 { margin: 18px 0 12px; font-size: 21px; }
.top, main { max-width: 1530px; margin: auto; padding: 20px clamp(14px, 3vw, 42px); }
.top, .heading, .actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
main { display: grid; align-items: start; gap: 18px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding-top: 0; }
.preview, .picker { background: white; border: 1px solid var(--line); border-radius: 16px; }
.preview { position: sticky; top: 14px; overflow: hidden; }
.preview > .heading, .picker, .build-summary { padding: 16px; }
.viewport { background: #e8efed; position: relative; }
canvas { display: block; width: 100%; height: clamp(290px, 48vh, 580px); cursor: grab; touch-action: none; }
canvas:active { cursor: grabbing; }
#scene-message { position: absolute; inset: 20px; }
.caption { padding: 7px 16px; background: #f7faf9; font-size: 12px; color: var(--muted); }
#status, #count { color: var(--muted); margin-top: 6px; font-size: 13px; }
#status[data-error=true], .conflict { color: #963d20; }
#selected { list-style: none; margin: 8px 0 0; padding: 0; max-height: 135px; overflow: auto; }
#selected li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
#selected li span { font-size: 13px; }
#total, .price { color: var(--accent); font-weight: 750; white-space: nowrap; }
button, input, select { font: inherit; }
button { background: #fff; color: #23383a; border: 1px solid #bfcfc9; border-radius: 8px; padding: 7px 10px; cursor: pointer; }
button:hover { background: #edf6f2; }
button.primary, nav button[aria-pressed=true] { background: var(--accent); color: white; border-color: var(--accent); }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid #087961; outline-offset: 2px; }
nav { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
nav button { font-size: 13px; }
form, #spec-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; align-items: end; }
#spec-filters { display: contents; }
form label { display: grid; gap: 4px; font-size: 13px; font-weight: 650; }
form .search { grid-column: 1/-1; }
form .check { display: flex; align-items: center; min-height: 35px; }
input:not([type=checkbox]), select { width: 100%; min-width: 0; background: #fafcfb; color: inherit; border: 1px solid #bed0c9; border-radius: 8px; padding: 8px; }
#results { margin-top: 6px; }
.product { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.product h4 { margin: 0 0 3px; font-size: 14px; overflow-wrap: anywhere; }
.product p { font-size: 13px; color: var(--muted); }
.product .conflict { color: #963d20; }
.product-actions { display: grid; gap: 5px; justify-items: end; }
@media (max-width:850px) { main { grid-template-columns: minmax(0,1fr); } .preview { position: static; } canvas { height: 320px; } }
.top > .actions { justify-content: flex-start; }
#selected li span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width:480px) {
  .top { align-items: flex-start; }
  .picker, .preview > .heading, .build-summary { padding: 12px; }
}
:root { --line:#d8e4ee; --accent:#007eae; --muted:#526575; color:#132536; background:#f3f7fb; }
.brand { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.brand img { max-width:100%; height:auto; }
.brand h1 { font-size:22px; letter-spacing:-.025em; }
.top { background:white; max-width:none; border-bottom:1px solid var(--line); margin-bottom:14px; }
button:hover { background:#eaf6fb; }
:focus-visible { outline-color:#0084b8; }
.viewport { background:#edf5fb; }
.caption { background:#f4f9fc; }
.preview { position:static; }
#selected { max-height:none; overflow:visible; }
#selected li { justify-content:start; border-bottom:1px solid var(--line); }
#selected li:last-child { border-bottom:0; }
#selected li span { flex:1; }
.category-picker { display:grid; gap:5px; margin-top:14px; font-weight:650; }
h3 { margin-top:16px; }
.product { grid-template-columns:72px minmax(0,1fr) auto; }
.product-photo,.photo-placeholder { display:grid; place-items:center; width:68px; height:68px; padding:4px; background:#f7fbfe; border:1px solid var(--line); border-radius:8px; text-align:center; color:var(--muted); font-size:11px; }
.product-photo img { width:100%; height:100%; min-height:0; object-fit:contain; }
#selected .product-photo,#selected .photo-placeholder { width:48px; height:48px; flex:0 0 48px; }
#photo-dialog { border:1px solid var(--line); border-radius:12px; max-width:min(720px,92vw); }
#photo-dialog::backdrop { background:#14283c88; }
#photo-dialog form { display:block; text-align:right; }
#photo-image { display:block; max-width:100%; max-height:74vh; margin:auto; object-fit:contain; }
@media(min-width:851px) {
  body { height:100dvh; display:grid; grid-template-rows:auto minmax(0,1fr); overflow:hidden; }
  main { height:100%; width:100%; align-items:stretch; min-height:0; }
  .preview,.picker { min-height:0; overflow:auto; scrollbar-gutter:stable; }
}
@media(max-width:480px) {
  .product { grid-template-columns:52px minmax(0,1fr) auto; }
  .product-photo,.photo-placeholder { width:50px; height:50px; }
}
.top { width:100%; }
button,input:not([type=checkbox]),select { border-color:#c8dbe8; }
input:not([type=checkbox]),select { background:#f8fbfd; }
.picker { padding:14px 16px; }
.category-picker { margin:8px 0; gap:3px; }
#filters { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
#filters label { gap:3px; }
.picker input:not([type=checkbox]), .picker select { padding:6px 8px; }
.extra-filters { grid-column:1/-1; margin-top:2px; }
.extra-filters summary { cursor:pointer; color:var(--accent); font-size:13px; min-height:27px; padding-top:3px; }
.extra-filters > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; gap:6px; padding:4px 0; }
.results-heading { display:flex; align-items:center; justify-content:space-between; min-height:28px; }
.results-heading button { font-size:12px; padding:3px 7px; }
#results { margin-top:0; }
.product { padding:8px 0; }
#pan[aria-pressed=true] { color:white; background:var(--accent); border-color:var(--accent); }
#scene[data-pan=true] { cursor:move; }
@media(max-width:480px) { #filters { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.compatibility-notice { border:1px solid #e9c4a5; border-radius:8px; padding:12px; background:#fff7ef; color:#703716; margin:4px 0 10px; }
.compatibility-notice button { margin-top:8px; }
#catalogue-date { color:var(--muted); font-size:12px; margin-top:5px; }
.mobile-jump { display:none; }
@media(max-width:850px) {
  .mobile-jump { display:flex; margin:0; padding:0 14px 10px; gap:12px; }
  .mobile-jump a { color:var(--accent); padding:6px 8px; }
}
