:root {
  --bg: #f4f1eb; --card: rgba(255, 255, 255, .94); --ink: #1a1a1a; --muted: #6f6c66; --line: #dcd8d0; --soft: #ebe7df;
  --green: #2f5d27; --green-2: #5eb13c; --radius: 18px; --shadow: 0 12px 40px rgba(0, 0, 0, .18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: #dfe6ea; color: var(--ink); font-size: 15px; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* ---------- 3D schermvullend ---------- */
.viewer { position: fixed; inset: 0; touch-action: none; }
.viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.v-overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.v-label, .v-dim { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; }
.v-label { display: flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, .95); border-radius: 999px; padding: 4px 11px 4px 4px; font-size: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.v-label b { background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.v-dim { background: var(--ink); color: #fff; border-radius: 6px; padding: 4px 9px; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- bovenbalk: logo en voortgang ---------- */
.top { position: fixed; z-index: 4; top: 16px; left: 16px; right: 92px; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { flex: none; background: var(--card); backdrop-filter: blur(12px); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); display: block; }
.brand img { display: block; height: 26px; width: auto; }
.stepper { background: var(--card); backdrop-filter: blur(12px); border-radius: 14px; padding: 8px 10px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.stepper::-webkit-scrollbar { display: none; }
.step { flex: none; display: flex; align-items: center; gap: 7px; border: 0; background: none; padding: 3px; border-radius: 999px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.step i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10.5px; letter-spacing: 0; border: 1px solid var(--line); background: #fff; color: var(--muted); }
.step.done i { background: #2a2a2a; border-color: #2a2a2a; color: #fff; }
.step.now { background: var(--soft); color: var(--ink); padding-right: 12px; }
.step.now i { background: var(--ink); border-color: var(--ink); color: #fff; }
.step span { display: none; } .step.now span { display: inline; }

/* ---------- vraagkaart: één vraag tegelijk ---------- */
.card { position: fixed; z-index: 5; left: 16px; bottom: 16px; width: 372px; max-height: calc(100dvh - 104px); background: var(--card); backdrop-filter: blur(14px); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.card-head { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; text-align: left; border: 0; background: none; padding: 15px 18px 13px; border-bottom: 1px solid var(--line); }
.card-head .eyebrow { grid-column: 1; }
.card-head strong { grid-column: 1; font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.card-head .chev { grid-column: 2; grid-row: 1 / 3; width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.card.min .card-head { border-bottom: 0; }
.card.min .chev { transform: rotate(180deg); }
.card.min .panel-body, .card.min .nav { display: none; }
.panel-body { padding: 16px 18px; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
.panel-body h2 { margin: 0 0 6px; font-size: 19px; font-weight: 500; letter-spacing: -.02em; }
.panel-body p.lead { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.nav { display: flex; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.nav .btn { flex: 1; }
.btn { border-radius: 999px; padding: 12px 18px; font-weight: 500; font-size: 14.5px; border: 1px solid transparent; min-height: 46px; }
.btn-dark { background: #2a2a2a; color: #fff; } .btn-dark:hover { background: #000; }
.btn-ghost { background: none; } .btn-ghost:hover { background: var(--soft); }
.btn[disabled] { opacity: .4; cursor: default; }
.btn[hidden] { display: none; }
.btn.block { width: 100%; }

.opts { display: grid; gap: 9px; }
.opt { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 13px; min-height: 50px; transition: border-color .15s, box-shadow .15s; }
.opt:hover { border-color: #b9b4aa; }
.opt:focus-visible, .btn:focus-visible, .rb:focus-visible, .step:focus-visible, .card-head:focus-visible, .pop button:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; }
.opt[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt[disabled] { opacity: .45; cursor: not-allowed; }
.opt .dot { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--green); display: grid; place-items: center; }
.opt[aria-pressed="true"] .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.opt .txt { display: grid; gap: 2px; flex: 1; min-width: 0; }
.opt .txt b { font-weight: 500; font-size: 14.5px; }
.opt .txt small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.opt .sw { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); }
.opt .sw.sq { border-radius: 6px; }
.opt svg.prof { flex: none; width: 42px; height: 54px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 12px 13px; border: 1px dashed var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
.check input { width: 18px; height: 18px; accent-color: var(--green); margin: 1px 0 0; }
.check small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.note { margin-top: 12px; padding: 11px 13px; background: var(--bg); border-radius: 8px; font-size: 13px; line-height: 1.5; color: #4d4a45; }
.note.warn { background: #fbf1dc; color: #6a4a00; }
.dim { margin-bottom: 18px; }
.dim-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.dim-top label { font-weight: 500; }
.dim-num { display: flex; align-items: center; gap: 6px; }
.dim-num input { width: 78px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; text-align: right; font-variant-numeric: tabular-nums; background: #fff; font-size: 16px; }
.dim input[type=range] { width: 100%; accent-color: var(--ink); height: 28px; }
.dim-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.spec { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff; }
.spec b { display: block; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.spec span { font-size: 12px; color: var(--muted); }
.form { display: grid; gap: 11px; }
.form label { display: grid; gap: 5px; font-size: 13px; font-weight: 500; }
.form input, .form textarea { padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; width: 100%; font-size: 16px; }
.form input:focus, .form textarea:focus, .dim-num input:focus { outline: 2px solid var(--green-2); outline-offset: 1px; border-color: transparent; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .err { color: #a3261b; font-size: 13px; min-height: 18px; }
.recap { margin: 0 0 16px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.recap li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--soft); }
.recap li:last-child { border-bottom: 0; }
.recap li span { color: var(--muted); } .recap li b { font-weight: 500; text-align: right; }
.done { text-align: center; padding: 26px 8px; }
.done .tick { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; font-size: 26px; }

.opt .xic { flex: none; width: 40px; height: 40px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; background: var(--bg); border-radius: 10px; padding: 4px; }
.opt .dot.sq { border-radius: 4px; } .opt[aria-pressed="true"] .dot.sq::after { border-radius: 2px; }
.opt .thumb { flex: none; width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: #fff; border: 1px solid var(--line); }
.led-head { display: flex; gap: 12px; align-items: flex-start; }
.led-head img { width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--line); background: #fff; object-fit: cover; flex: none; }
.opt .spot { flex: none; position: relative; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.opt .spot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.opt .spot::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: var(--tone); }

/* ---------- knoppenbalk rechts met uitklapmenu's ---------- */
.rail { position: fixed; z-index: 6; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 2px; background: var(--card); backdrop-filter: blur(12px); border-radius: 16px; padding: 5px; box-shadow: var(--shadow); max-height: calc(100dvh - 32px); overflow-y: auto; scrollbar-width: none; }
.rb { border: 0; background: none; border-radius: 11px; width: 58px; padding: 8px 2px 6px; display: grid; justify-items: center; gap: 3px; }
.rb svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rb small { font-size: 10px; font-weight: 500; letter-spacing: .01em; line-height: 1.1; }
.rb:hover { background: var(--soft); }
.rb[aria-pressed="true"], .rb[aria-expanded="true"] { background: var(--ink); color: #fff; }
.pop { position: fixed; z-index: 7; right: 92px; background: #fff; border-radius: 14px; padding: 6px; box-shadow: var(--shadow); display: grid; gap: 2px; min-width: 190px; }
.pop[hidden] { display: none; }
.pop h3 { margin: 6px 10px 4px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.pop button { border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; min-height: 42px; }
.pop button:hover { background: var(--soft); }
.pop button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pop p { margin: 2px 10px 8px; font-size: 12.5px; color: var(--muted); line-height: 1.4; max-width: 230px; }
.secbar { position: fixed; z-index: 5; top: 78px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 6px 6px 16px; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow); white-space: nowrap; }
.secbar[hidden] { display: none; }
.secbar button { border: 0; background: rgba(255, 255, 255, .16); color: #fff; border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 500; }
.dimmer { position: fixed; z-index: 5; right: 92px; bottom: 16px; background: var(--card); border-radius: 12px; padding: 9px 13px; display: flex; gap: 10px; align-items: center; font-size: 12.5px; font-weight: 500; box-shadow: var(--shadow); }
.dimmer[hidden] { display: none; }
.dimmer input { accent-color: var(--ink); width: 130px; }
.hint { position: fixed; z-index: 3; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(26, 26, 26, .7); color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 12.5px; pointer-events: none; transition: opacity .6s; white-space: nowrap; }
.hint.off { opacity: 0; }
.loading { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: #eef0ee; transition: opacity .5s; }
.loading.off { opacity: 0; pointer-events: none; }
.loading span { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { width: max-content; position: fixed; left: 50%; top: 84px; transform: translate(-50%, -12px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: .3s; z-index: 20; max-width: min(92vw, 520px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at center, rgba(0, 0, 0, .28), rgba(0, 0, 0, .05) 62%); transition: opacity .9s; }
.intro-in { text-align: center; color: #fff; max-width: 520px; text-shadow: 0 2px 22px rgba(0, 0, 0, .55); }
.intro .eyebrow { color: rgba(255, 255, 255, .88); }
.intro h1 { margin: 12px 0 10px; font-size: clamp(30px, 5.4vw, 52px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.intro p { margin: 0 0 26px; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, .92); }
.btn-start { background: #fff; color: var(--ink); padding: 16px 54px; font-size: 16px; font-weight: 600; min-height: 56px; box-shadow: 0 14px 44px rgba(0, 0, 0, .35); text-shadow: none; transition: transform .2s; }
.btn-start:hover { transform: scale(1.04); }
body.started .intro { opacity: 0; pointer-events: none; }
body:not(.started) .card, body:not(.started) .rail, body:not(.started) .top, body:not(.started) .hint { opacity: 0; pointer-events: none; }
.card, .rail, .top { transition: opacity .8s .9s; }

/* ---------- telefoon: smalle strook onderaan, opties naast elkaar, 3D zo groot mogelijk ---------- */
@media (max-width: 760px) {
  .top { top: 10px; left: 10px; right: auto; }
  .brand { padding: 7px 10px; border-radius: 12px; } .brand img { height: 18px; }
  .stepper { display: none; }
  .card { left: 0; right: 0; bottom: 0; width: auto; max-height: 44dvh; border-radius: 20px 20px 0 0; }
  .card.tall { max-height: 74dvh; }
  .card-head { display: flex; align-items: baseline; gap: 10px; padding: 11px 16px 9px; border-bottom: 0; }
  .card-head .eyebrow { font-size: 10px; } .card-head strong { font-size: 15px; flex: 1; }
  .card-head .chev { width: 20px; height: 20px; align-self: center; }
  .panel-body { padding: 0 16px 10px; }
  .panel-body h2, .panel-body p.lead, .note:not(.warn), #specs, .led-head { display: none; }
  .opts { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .opts::-webkit-scrollbar { display: none; }
  .opt { flex: 0 0 auto; width: 43vw; max-width: 190px; min-height: 86px; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 8px; padding: 11px 12px; border-radius: 12px; scroll-snap-align: center; }
  .opt .dot { display: none; }
  .opt .txt b { font-size: 13.5px; line-height: 1.25; }
  .opt .txt small { font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .opt .sw { width: 26px; height: 26px; } .opt svg.prof { width: 30px; height: 38px; }
  .check { margin-top: 8px; padding: 9px 12px; border-radius: 12px; } .check small { display: none; }
  .dim { margin-bottom: 6px; } .dim-top { margin-bottom: 0; } .dim-scale { display: none; } .dim input[type=range] { height: 26px; }
  .dim-num input { padding: 5px 8px; width: 70px; }
  .card.tall .panel-body h2 { display: block; font-size: 17px; }
  .nav { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 0; }
  .btn:not(.btn-start) { min-height: 44px; padding: 10px 14px; }
  .rail { top: 10px; right: 10px; padding: 4px; border-radius: 14px; max-height: calc(56dvh - 20px); }
  .rb { width: 42px; padding: 10px 0; } .rb small { display: none; } .rb svg { width: 20px; height: 20px; }
  .pop { right: 64px; }
  .secbar { top: 56px; left: 10px; right: 64px; transform: none; font-size: 12px; justify-content: space-between; }
  #secName { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .secbar button { min-height: 40px; flex: none; }
  body.started:has(.card.tall:not(.min)) .rail { opacity: 0; pointer-events: none; transition-delay: 0s; }
  .hint { display: none; }
  .dimmer { right: 64px; bottom: auto; top: 10px; } .dimmer input { width: 90px; }
  .toast { top: 56px; }
  .intro p { font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
