/* Luxstop — iOS-stijl. Kleuren volgen de iOS-systeemkleuren, licht en donker. */

:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --card-pressed: #e5e5ea;
  --fill: rgba(120, 120, 128, 0.12);
  --fill-strong: rgba(120, 120, 128, 0.2);
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.6);
  --label-3: rgba(60, 60, 67, 0.3);
  --sep: rgba(60, 60, 67, 0.29);
  --tint: #e08600;
  --on-label: #ffffff;
  --seg-selected: #ffffff;
  --material: rgba(249, 249, 249, 0.8);
  --knob-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16), 0 3px 1px rgba(0, 0, 0, 0.1);

  --red: #ff3b30;
  --orange: #ff9500;
  --yellow: #ffcc00;
  --green: #34c759;
  --teal: #30b0c7;
  --blue: #007aff;
  --indigo: #5856d6;
  --purple: #af52de;
  --gray: #8e8e93;

  /* De zoeker is altijd donker, zoals de Camera-app. */
  --stage: #000000;
  --hud-yellow: #ffd60a;
  --hud-glass: rgba(28, 28, 30, 0.5);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --gutter: 16px;
  --radius: 12px;
  --tabbar-h: 50px;
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --card: #1c1c1e;
    --card-pressed: #2c2c2e;
    --fill: rgba(118, 118, 128, 0.24);
    --fill-strong: rgba(118, 118, 128, 0.36);
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, 0.6);
    --label-3: rgba(235, 235, 245, 0.3);
    --sep: rgba(84, 84, 88, 0.6);
    --tint: #ffb340;
    --on-label: #000000;
    --seg-selected: #636366;
    --material: rgba(22, 22, 24, 0.8);
    --red: #ff453a;
    --orange: #ff9f0a;
    --yellow: #ffd60a;
    --green: #30d158;
    --teal: #40c8e0;
    --blue: #0a84ff;
    --indigo: #5e5ce6;
    --purple: #bf5af2;
    --gray: #8e8e93;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --card: #1c1c1e;
  --card-pressed: #2c2c2e;
  --fill: rgba(118, 118, 128, 0.24);
  --fill-strong: rgba(118, 118, 128, 0.36);
  --label: #ffffff;
  --label-2: rgba(235, 235, 245, 0.6);
  --label-3: rgba(235, 235, 245, 0.3);
  --sep: rgba(84, 84, 88, 0.6);
  --tint: #ffb340;
  --on-label: #000000;
  --seg-selected: #636366;
  --material: rgba(22, 22, 24, 0.8);
  --red: #ff453a;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --green: #30d158;
  --teal: #40c8e0;
  --blue: #0a84ff;
  --indigo: #5e5ce6;
  --purple: #bf5af2;
  --gray: #8e8e93;
  color-scheme: dark;
}

/* ── Basis ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 17px/1.29 var(--font);
  letter-spacing: -0.41px;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 24px);
}
h1, h2, p { margin: 0; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }

.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
[data-icon] { display: inline-flex; }

.app { max-width: 640px; margin: 0 auto; }

/* ── Navigatiebalk (Gids / Uitrusting) ─────────────── */
.navbar {
  position: fixed; inset: 0 0 auto; z-index: 20;
  height: calc(44px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  pointer-events: none;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.navbar-title { font-weight: 600; font-size: 17px; opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.25s var(--spring); }
.navbar.condensed {
  background: var(--material);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 0.5px 0 var(--sep);
}
.navbar.condensed .navbar-title { opacity: 1; transform: none; }
body.on-meten .navbar { display: none; }

.page { padding: calc(44px + env(safe-area-inset-top, 0px)) var(--gutter) 0; }
.large-title {
  font: 700 34px/1.2 var(--font-display);
  letter-spacing: 0.37px;
  margin: 4px 0 12px;
  text-wrap: balance;
}

/* ── Zoeker ────────────────────────────────────────── */
.stage {
  /* De zoeker blijft staan; het paneel schuift eroverheen, zoals een iOS-sheet. */
  position: sticky; top: 0; z-index: 0;
  background: var(--stage); padding-top: env(safe-area-inset-top, 0px); color: #fff;
}
/* Zwarte strook onder de statusbalk, zodat de witte statusbalktekst leesbaar blijft. */
.statusbar-shield {
  position: fixed; inset: 0 0 auto; z-index: 25; height: env(safe-area-inset-top, 0px);
  background: var(--stage); pointer-events: none;
}
body:not(.on-meten) .statusbar-shield { display: none; }

/* Native app: het camerabeeld ligt achter de pagina en schijnt door de zoeker heen. */
html.native-live, html.native-live body { background: transparent; }
html.native-live .stage {
  background: transparent;
  padding-top: 0;
  border-top: env(safe-area-inset-top, 0px) solid var(--stage);
}
html.native-live .viewfinder { background: transparent; }
html.native-live .viewfinder #demo,
html.native-live .viewfinder video { display: none; }
html.native-live .modes,
html.native-live .stage-error { background: var(--stage); }
.viewfinder {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: 58vh;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  background: #0a0a0a;
}
@media (min-width: 641px) {
  .stage { padding: 16px 16px 0; border-radius: 0 0 28px 28px; }
  .viewfinder { border-radius: 18px; aspect-ratio: 4 / 3; }
}
.viewfinder video,
.viewfinder canvas#demo,
.viewfinder canvas#zebra {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.viewfinder video { opacity: 0; transition: opacity 0.4s; }
.viewfinder.live video { opacity: 1; }
.viewfinder.live #demo { visibility: hidden; }
#zebra { image-rendering: pixelated; pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.viewfinder.zebra #zebra { opacity: 1; }

.grid-thirds {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background-image:
    linear-gradient(to right, transparent calc(33.333% - 0.5px), rgba(255,255,255,0.5) 0, rgba(255,255,255,0.5) calc(33.333% + 0.5px), transparent 0,
      transparent calc(66.666% - 0.5px), rgba(255,255,255,0.5) 0, rgba(255,255,255,0.5) calc(66.666% + 0.5px), transparent 0),
    linear-gradient(to bottom, transparent calc(33.333% - 0.5px), rgba(255,255,255,0.5) 0, rgba(255,255,255,0.5) calc(33.333% + 0.5px), transparent 0,
      transparent calc(66.666% - 0.5px), rgba(255,255,255,0.5) 0, rgba(255,255,255,0.5) calc(66.666% + 0.5px), transparent 0);
}
.viewfinder.grid .grid-thirds { opacity: 1; }

/* Spotmeter: het gele meetkader van de Camera-app, met streepjes op elke zijde */
.spot {
  position: absolute; left: 50%; top: 50%; width: 20%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid var(--hud-yellow);
  pointer-events: none;
  opacity: 0.9;
  background:
    linear-gradient(var(--hud-yellow), var(--hud-yellow)) top center / 1px 6px no-repeat,
    linear-gradient(var(--hud-yellow), var(--hud-yellow)) bottom center / 1px 6px no-repeat,
    linear-gradient(var(--hud-yellow), var(--hud-yellow)) left center / 6px 1px no-repeat,
    linear-gradient(var(--hud-yellow), var(--hud-yellow)) right center / 6px 1px no-repeat;
}

.ae-lock {
  position: absolute; top: 58px; left: 50%; transform: translateX(-50%);
  background: var(--hud-yellow); color: #000;
  font: 600 12px/1 var(--font); letter-spacing: 0.02em;
  padding: 5px 8px; border-radius: 4px; white-space: nowrap;
}

.glass {
  background: var(--hud-glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 0;
  color: #fff;
}
.hud { position: absolute; left: 10px; right: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hud-top { top: 10px; }
.hud-bottom { bottom: 10px; align-items: flex-end; }

.hud-ev, .hud-k {
  display: flex; align-items: baseline; gap: 6px;
  height: 32px; padding: 0 11px; border-radius: 16px; align-items: center;
  font: 600 15px/1 var(--font-rounded);
}
.hud-label { color: var(--hud-yellow); font-size: 12px; letter-spacing: 0.04em; }
#hud-ev { color: var(--hud-yellow); min-width: 3.2ch; }
.hud-swatch { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4); }

.hud-source {
  display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px 0 12px; border-radius: 16px;
  font: 600 13px/1 var(--font); letter-spacing: -0.08px;
  flex: 0 1 auto; min-width: 0; white-space: nowrap;
}
.hud-source > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.hud-source .hud-chevron { font-size: 11px; opacity: 0.7; flex: none; }
.hud-source:disabled .hud-chevron { display: none; }
.hud-source:disabled { cursor: default; }
.hud-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hud-yellow); flex: none; }
.hud-dot.live { background: #30d158; box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.25); }

.hud-ev, .hud-hist { flex: none; }
.hud-hist { width: 92px; height: 38px; border-radius: 10px; padding: 5px 6px; }
.hud-hist canvas { width: 100%; height: 100%; display: block; }

.hud-tools { display: flex; gap: 8px; }
.round {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-size: 19px;
  transition: transform 0.2s var(--spring), background-color 0.2s, color 0.2s;
}
.round:active { transform: scale(0.9); }
.round[aria-pressed="true"] { background: var(--hud-yellow); color: #000; }

.cam-start {
  position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px; border: 0; border-radius: 22px;
  background: var(--hud-yellow); color: #000;
  font: 600 16px/1 var(--font); letter-spacing: -0.2px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--spring), opacity 0.2s;
  white-space: nowrap;
}
.cam-start [data-icon] { font-size: 20px; }
.cam-start:active { transform: translateX(-50%) scale(0.96); }
.cam-start:disabled { opacity: 0.6; }
.viewfinder.live .cam-start { display: none; }

.modes {
  display: flex; justify-content: center; gap: 22px;
  padding: 14px 0 26px;
}
.modes button {
  border: 0; background: none; padding: 4px 2px;
  font: 600 13px/1 var(--font); letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s;
}
.modes button[aria-checked="true"] { color: var(--hud-yellow); }
.stage-error {
  margin: -14px var(--gutter) 0; padding-bottom: 22px;
  text-align: center; font-size: 13px; letter-spacing: -0.08px; color: rgba(255, 255, 255, 0.7);
}

/* ── Sheet ─────────────────────────────────────────── */
.sheet {
  position: relative;
  z-index: 1;
  margin-top: -14px;
  background: var(--bg);
  border-radius: 14px 14px 0 0;
  padding: 8px var(--gutter) 0;
  box-shadow: 0 -0.5px 0 var(--sep);
}
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--label-3); margin: 0 auto 14px; }

.readout {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--card); border-radius: var(--radius);
  padding: 14px 0 12px;
}
.readout-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.readout-cell + .readout-cell { box-shadow: -0.5px 0 0 var(--sep); }
.readout-val {
  font: 600 30px/1.1 var(--font-rounded); letter-spacing: -0.5px;
  white-space: nowrap;
}
.readout-val.changed { animation: tick 0.35s var(--spring); }
@keyframes tick { from { opacity: 0.2; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.readout-lbl {
  font: 600 11px/1.2 var(--font); letter-spacing: 0.04em; text-transform: uppercase; color: var(--label-2);
  max-width: 100%; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.readout-extra { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
body:not(.mode-video) .video-only { display: none; }
.capsule {
  font: 500 13px/1 var(--font); letter-spacing: -0.08px;
  padding: 7px 11px; border-radius: 999px; background: var(--card); color: var(--label);
}
.capsule.accent { background: var(--label); color: var(--on-label); }

.footnote { font-size: 13px; line-height: 18px; letter-spacing: -0.08px; color: var(--label-2); margin-top: 10px; min-height: 18px; }
.footnote.center { text-align: center; text-wrap: balance; }
.footnote.warn { color: var(--red); }

.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 16px calc(-1 * var(--gutter)) 0; padding: 2px var(--gutter);
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start;
  height: 34px; padding: 0 15px; border: 0; border-radius: 17px;
  background: var(--card); color: var(--label);
  font: 500 15px/1 var(--font); letter-spacing: -0.24px; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, transform 0.2s var(--spring);
}
.chip:active { transform: scale(0.95); }
.chip[aria-checked="true"] { background: var(--label); color: var(--on-label); }

/* ── Gegroepeerde lijsten (inset grouped) ──────────── */
.group-title {
  font: 400 13px/18px var(--font); letter-spacing: -0.08px; text-transform: uppercase;
  color: var(--label-2);
  margin: 26px 16px 7px;
}
.group {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  list-style: none; margin: 0; padding: 0;
}
.group-footer {
  font-size: 13px; line-height: 18px; letter-spacing: -0.08px; color: var(--label-2);
  margin: 7px 16px 0; max-width: 62ch;
}
.group-footer:empty { display: none; }

.row {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 8px 16px;
  width: 100%; border: 0; background: none; text-align: left;
}
.group > * { position: relative; }
.group > * + *::before {
  content: ""; position: absolute; top: 0; right: 0; left: 16px;
  height: 0.5px; background: var(--sep); z-index: 1;
}
.group > .row:has(.row-icon)::before { left: 57px; }
.row-icon {
  flex: none; width: 29px; height: 29px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--c, var(--gray)); color: #fff; font-size: 18px;
}
.row-icon .ico { stroke-width: 2; }
.row-label { flex: 1; min-width: 0; }
.row-label.tint { color: var(--tint); }
.row-value {
  color: var(--label-2); text-align: right; display: block; flex: 0 1 auto; max-width: 60%;
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-label { overflow-wrap: anywhere; }
.row-value > span { overflow: hidden; text-overflow: ellipsis; }
.row-accessory { color: var(--label-3); font-size: 14px; margin-left: -6px; }
.row-select {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; appearance: none; border: 0;
}
.row:has(.row-select):active, .row-action:active { background: var(--card-pressed); }
.row:has(.row-select:focus-visible) { box-shadow: inset 0 0 0 2px var(--tint); border-radius: var(--radius); }
.row-input {
  width: 4.5ch; border: 0; background: none; text-align: right; color: var(--label);
  padding: 0; font-size: 17px; -moz-appearance: textfield;
}
.row-input.short { width: 3ch; }
.row-input::-webkit-inner-spin-button, .row-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.row-input:focus { outline: none; color: var(--tint); }

.quality {
  margin-left: 6px; padding: 2px 7px; border-radius: 6px;
  font: 600 12px/16px var(--font); letter-spacing: 0;
  background: var(--fill); color: var(--label-2);
}
.quality.hoog { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.quality.gemiddeld { color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }
.quality.laag { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.quality:empty { display: none; }

/* iOS-schakelaar */
.switch {
  appearance: none; -webkit-appearance: none; margin: 0 0 0 auto;
  width: 51px; height: 31px; border-radius: 16px; flex: none;
  background: var(--fill-strong); position: relative; cursor: pointer;
  transition: background-color 0.25s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: var(--knob-shadow);
  transition: transform 0.3s var(--spring);
}
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(20px); }

/* iOS-schuifregelaar */
.row-slider { flex-direction: column; align-items: stretch; gap: 10px; padding-block: 12px 14px; }
.row-slider-head { display: flex; justify-content: space-between; }
.slider {
  appearance: none; -webkit-appearance: none; width: 100%; height: 28px; margin: 0; background: none;
  --p: 50%;
}
.slider::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--tint) var(--p), var(--fill-strong) var(--p));
}
.slider::-moz-range-track { height: 4px; border-radius: 2px; background: var(--fill-strong); }
.slider::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--tint); }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; margin-top: -12px;
  background: #fff; box-shadow: var(--knob-shadow); border: 0;
}
.slider::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: var(--knob-shadow); border: 0; }

/* ── Lichtmeter-schaal ─────────────────────────────── */
.meter, .kelvin { padding: 14px 16px 14px; }
.meter-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.meter-value { font: 600 22px/1.2 var(--font-rounded); letter-spacing: 0.35px; }
.meter-desc { color: var(--label-2); font-size: 15px; letter-spacing: -0.24px; }

.scale { position: relative; height: 38px; margin-top: 12px; }
.scale-ticks { position: absolute; inset: 0; }
.scale-tick { position: absolute; bottom: 16px; width: 1px; height: 7px; background: var(--label-3); transform: translateX(-0.5px); }
.scale-tick.major { height: 13px; background: var(--label-2); }
.scale-num {
  position: absolute; bottom: 0; transform: translateX(-50%);
  font: 500 11px/1 var(--font-rounded); color: var(--label-2);
}
.scale-marker {
  position: absolute; bottom: 14px; width: 3px; height: 24px; border-radius: 2px;
  background: var(--tint); transform: translateX(-1.5px);
  transition: left 0.5s var(--spring);
  box-shadow: 0 0 0 2px var(--card);
}

.kelvin-bar {
  position: relative; height: 8px; border-radius: 4px; margin: 16px 2px 0;
}
.kelvin-knob {
  position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--knob-color, #fff);
  box-shadow: 0 0 0 3px #fff, var(--knob-shadow);
  transition: left 0.6s var(--spring), background-color 0.6s;
}
.kelvin-labels { position: relative; height: 14px; margin-top: 12px; font: 500 11px/1 var(--font-rounded); color: var(--label-2); }
.kelvin-labels span { position: absolute; transform: translateX(-50%); }
.kelvin-labels span:first-child { transform: none; }
.kelvin-labels span:last-child { transform: translateX(-100%); }

/* ── Segmented control (iOS) ───────────────────── */
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--fill); border-radius: 9px; padding: 2px; gap: 0;
}
.segmented button {
  position: relative; border: 0; background: none; height: 30px; border-radius: 7px;
  font: 500 13px/1 var(--font); letter-spacing: -0.08px; color: var(--label);
  transition: background-color 0.2s, box-shadow 0.2s;
}
.segmented button + button::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 0.5px; background: var(--label-3);
  transition: opacity 0.2s;
}
.segmented button[aria-checked="true"] {
  background: var(--seg-selected); font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
}
.segmented button[aria-checked="true"]::before,
.segmented button[aria-checked="true"] + button::before { opacity: 0; }

/* Twee regels per knop: sluiterhoek met de bijbehorende sluitertijd eronder */
.segmented.two-line button { height: 44px; display: grid; place-content: center; gap: 1px; line-height: 1.1; }
.seg-sub { font: 500 11px/1 var(--font-rounded); color: var(--label-2); letter-spacing: 0; }
.seg-sub:empty { display: none; }
#fps-control button { font-variant-numeric: tabular-nums; padding: 0 2px; }

/* ── Foto's ────────────────────────────────────────── */
.photo { margin: 2px 16px 12px 57px; }
.photo img {
  display: block; width: 100%; max-width: 100%; aspect-ratio: 5 / 3; object-fit: cover;
  border-radius: 10px; background: var(--fill);
}
.photo figcaption, .featured-credit {
  margin-top: 6px; font-size: 12px; line-height: 16px; letter-spacing: 0; color: var(--label-2);
}
.photo figcaption a, .featured-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.featured {
  position: relative; display: block; width: 100%; margin-top: 18px; padding: 0; border: 0;
  aspect-ratio: 4 / 3; max-height: 320px; border-radius: 16px; overflow: hidden; text-align: left;
  background: #1c1c1e center / cover no-repeat; color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  transition: transform 0.3s var(--spring);
}
.featured:active { transform: scale(0.98); }
.featured::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0) 70%);
}
.featured-body { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; display: grid; gap: 3px; }
.featured-eyebrow { font: 600 13px/1.2 var(--font); letter-spacing: 0.02em; text-transform: uppercase; color: rgba(255,255,255,0.75); }
.featured-title { font: 700 26px/1.12 var(--font-display); letter-spacing: 0.2px; text-wrap: balance; }
.featured-sub { font-size: 15px; line-height: 20px; color: rgba(255,255,255,0.85); }
.featured-credit { margin: 6px 4px 0; }

/* ── Tips ──────────────────────────────────────────── */
.tip { align-items: flex-start; padding-block: 11px; }
.tip .row-icon { margin-top: 1px; }
.tip-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tip-title { font-weight: 600; }
.tip-text { font-size: 15px; line-height: 20px; letter-spacing: -0.24px; color: var(--label-2); }
.tip.empty .tip-text { padding-block: 2px; }

/* ── Zon ───────────────────────────────────────────── */
.phase-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin: 0 9px 0 9px; }

/* ── Gids ──────────────────────────────────────────── */
.search {
  display: flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 8px; border-radius: 10px;
  background: var(--fill); color: var(--label-2);
  font-size: 17px;
}
.search [data-icon] { font-size: 16px; }
.search input { flex: 1; border: 0; background: none; outline: none; color: var(--label); min-width: 0; padding: 0; }
.search input::placeholder { color: var(--label-2); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }

.guide-item { border: 0; scroll-margin-top: calc(56px + env(safe-area-inset-top, 0px)); }
.guide-item summary {
  list-style: none; cursor: pointer;
}
.guide-item summary::-webkit-details-marker { display: none; }
.guide-item .row-accessory { margin-left: 0; transition: transform 0.25s var(--spring); }
.guide-item[open] .row-accessory { transform: rotate(90deg); }
.guide-item summary:active { background: var(--card-pressed); }
.guide-text {
  padding: 0 16px 14px 57px; color: var(--label-2);
  font-size: 15px; line-height: 21px; letter-spacing: -0.24px; max-width: 70ch;
}
.group > .guide-item + .guide-item::before { left: 57px; }
.empty { text-align: center; color: var(--label-2); margin-top: 40px; }

/* ── Aankoopgids ───────────────────────────────────── */
.shop-type { margin-top: 12px; }
.shop-toolbar {
  display: flex; align-items: center; gap: 8px; margin: 14px 4px 8px;
}
.shop-count { flex: 1 0 auto; min-width: 0; font-size: 13px; letter-spacing: -0.08px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toolbar-btn {
  position: relative; display: inline-flex; align-items: center; gap: 5px; flex: none;
  height: 30px; padding: 0 11px; border: 0; border-radius: 15px;
  background: var(--fill); color: var(--tint);
  font: 500 15px/1 var(--font); letter-spacing: -0.24px; white-space: nowrap;
}
.toolbar-btn [data-icon] { font-size: 15px; }
.toolbar-btn:active, .toolbar-btn:has(select:active) { opacity: 0.6; }
.toolbar-btn:has(select:focus-visible) { outline: 2px solid var(--tint); outline-offset: 2px; }
#shop-sort-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.toolbar-btn:has(#shop-sort) { flex: 0 1 auto; min-width: 0; }
@media (max-width: 400px) { #shop-filter-btn > span:nth-child(2) { display: none; } }
.count-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--tint); color: var(--on-label);
  font: 600 12px/18px var(--font-rounded); text-align: center;
}

.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.active-filters { margin: 0 0 10px; }
.elsewhere { justify-content: center; margin-top: 14px; }
.chip.small { height: 30px; padding: 0 12px; border-radius: 15px; font-size: 14px; }
.chip.active { background: var(--label); color: var(--on-label); }
.chip.ghost { background: none; color: var(--tint); box-shadow: inset 0 0 0 1px var(--fill-strong); }
.chip-count { color: var(--label-2); font-variant-numeric: tabular-nums; font-size: 12px; }
.chip.active .chip-count { color: inherit; opacity: 0.6; }

.product-row { align-items: center; padding-block: 10px; }
.product-row:active { background: var(--card-pressed); }
.product-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.product-name { font-weight: 500; overflow-wrap: anywhere; }
.product-sub { font-size: 13px; line-height: 17px; letter-spacing: -0.08px; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-meta { flex: none; display: grid; justify-items: end; gap: 3px; max-width: 38%; }
.product-rating { display: inline-flex; align-items: center; gap: 2px; font: 600 13px/1 var(--font-rounded); color: var(--label); }
.product-price { font-size: 13px; color: var(--label-2); white-space: nowrap; }
.badge {
  display: inline-block; padding: 2px 6px; border-radius: 5px;
  font: 600 11px/14px var(--font); letter-spacing: 0.02em; text-transform: uppercase;
  background: var(--fill); color: var(--label-2); white-space: nowrap;
}
.badge.sponsored { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); margin-left: 8px; }

.stars {
  --v: 0; display: inline-block; font-size: 15px; line-height: 1; letter-spacing: 1px;
  background: linear-gradient(90deg, var(--orange) calc(var(--v) / 5 * 100%), var(--label-3) 0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stars.small { font-size: 11px; letter-spacing: 0.5px; }

.btn-plain {
  display: block; width: 100%; margin-top: 12px; height: 44px; border: 0; border-radius: var(--radius);
  background: var(--card); color: var(--tint); font-weight: 500;
}
.btn-plain:active { background: var(--card-pressed); }
.btn-tinted {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border: 0; border-radius: 18px;
  background: color-mix(in srgb, var(--tint) 16%, transparent); color: var(--tint);
  font: 600 15px/1 var(--font); letter-spacing: -0.24px;
  transition: transform 0.2s var(--spring);
}
.btn-tinted:active { transform: scale(0.96); }

/* Pushed productpagina */
.push-page {
  position: fixed; inset: 0; z-index: 30; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg);
  transform: translateX(100%); transition: transform 0.32s var(--spring);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 32px);
}
.push-page.open { transform: none; }
.push-bar {
  position: sticky; top: 0; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr); align-items: center;
  height: calc(44px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 8px 0;
  background: var(--material);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 0.5px 0 var(--sep);
}
.back-btn {
  display: inline-flex; align-items: center; gap: 2px; min-width: 0; justify-self: start;
  border: 0; background: none; color: var(--tint); padding: 0; height: 44px;
}
.back-btn [data-icon] { font-size: 24px; flex: none; margin-left: -4px; }
.back-btn [data-icon] .ico { stroke-width: 2.4; }
.back-btn > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.push-page:not(.scrolled) .back-btn { grid-column: 1 / 3; }
.push-title {
  font-weight: 600; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  opacity: 0; transition: opacity 0.2s;
}
.push-page.scrolled .push-title { opacity: 1; }
.push-page.scrolled .back-btn > span:last-child { opacity: 0; }
.back-btn > span:last-child { transition: opacity 0.2s; }
.push-body { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); }

.detail-head { padding: 18px 4px 4px; display: grid; gap: 4px; }
.detail-eyebrow { font: 600 13px/1.2 var(--font); letter-spacing: 0.02em; text-transform: uppercase; color: var(--label-2); }
.detail-title { font: 700 28px/1.15 var(--font-display); letter-spacing: 0.36px; text-wrap: balance; overflow-wrap: anywhere; }
.detail-sub { color: var(--label-2); font-size: 15px; letter-spacing: -0.24px; }
.detail-ratings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.rating-block { background: var(--card); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 5px; min-width: 0; }
.rating-label { font: 600 11px/1.2 var(--font); letter-spacing: 0.04em; text-transform: uppercase; color: var(--label-2); }
.rating-block .stars { font-size: 16px; }
.rating-value { font-size: 13px; color: var(--label-2); }
.muted { color: var(--label-2); }
.detail-actions { display: flex; gap: 10px; margin-top: 12px; }
.detail-actions:empty { display: none; }

.review-card { padding: 14px 16px; }
.review-summary { font-size: 15px; line-height: 21px; letter-spacing: -0.24px; }
.pros-cons { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 15px; line-height: 20px; letter-spacing: -0.24px; }
.pros-cons li { position: relative; padding-left: 22px; }
.pros-cons li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.pros-cons .pro::before { content: "+"; color: var(--green); }
.pros-cons .con::before { content: "−"; color: var(--red); }

.row-link { color: inherit; text-decoration: none; }
.row-link:active { background: var(--card-pressed); }
.row-link .row-accessory { margin-left: 0; font-size: 15px; }
.row-value.wrap { white-space: normal; overflow-wrap: anywhere; max-width: 62%; }
.group-footer.standalone { margin-top: 26px; }
.group-footer a { color: var(--tint); }
.affiliate-note { margin-top: 4px; }

.comments .row-action { color: inherit; }
.comment { display: grid; gap: 4px; padding-block: 12px; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.comment-date { margin-left: auto; font-size: 13px; color: var(--label-2); }
.comment-text { font-size: 15px; line-height: 20px; letter-spacing: -0.24px; white-space: pre-line; overflow-wrap: anywhere; }
.comment-actions { display: flex; gap: 16px; }
.comment-empty { padding: 14px 16px; color: var(--label-2); font-size: 15px; }
.link { border: 0; background: none; padding: 4px 0; color: var(--tint); }
.link.small { font-size: 13px; }
.link:disabled { color: var(--label-2); }
.link.destructive { color: var(--red); }

/* Sheets (filters, reactie) */
.modal { position: fixed; inset: 0; z-index: 50; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity 0.3s; }
.modal.open .modal-backdrop { opacity: 1; }
.modal-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto;
  height: calc(100% - env(safe-area-inset-top, 0px) - 12px);
  display: flex; flex-direction: column;
  background: var(--bg); border-radius: 12px 12px 0 0;
  transform: translateY(100%); transition: transform 0.35s var(--spring);
}
.modal.open .modal-sheet { transform: none; }
.modal-bar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px;
  height: 56px; padding: 0 16px; flex: none;
  box-shadow: 0 0.5px 0 var(--sep);
}
.modal-title { font-size: 17px; font-weight: 600; text-align: center; }
.bar-btn { border: 0; background: none; padding: 8px 0; color: var(--tint); justify-self: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bar-btn.strong { font-weight: 600; justify-self: end; }
.modal-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px)); }
.modal-body .chip { background: var(--card); }
.modal-body .chip.active { background: var(--label); }
.modal-body .toggle-group { margin-top: 26px; }
.modal-body .toggle-group + .toggle-group { margin-top: 10px; }
.segmented.scroll {
  display: flex; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter)); border-radius: 0; background: none; padding: 2px var(--gutter); gap: 6px;
}
.segmented.scroll::-webkit-scrollbar { display: none; }
.segmented.scroll button { flex: none; padding: 0 12px; background: var(--card); border-radius: 15px; }
.segmented.scroll button::before { display: none; }
.segmented.scroll button[aria-checked="true"] { background: var(--label); color: var(--on-label); box-shadow: none; }

.composer-product { margin: 18px 4px 0; font-weight: 600; text-align: center; overflow-wrap: anywhere; }
.star-input { display: flex; justify-content: center; gap: 6px; margin: 10px 0 18px; }
.star-btn { border: 0; background: none; font-size: 34px; line-height: 1; padding: 2px; color: var(--label-3); transition: transform 0.2s var(--spring), color 0.15s; }
.star-btn.on { color: var(--orange); }
.star-btn:active { transform: scale(0.85); }
.row-text { flex: 1; min-width: 0; border: 0; background: none; outline: none; text-align: right; color: var(--label); padding: 0; }
.row-text::placeholder, .row-area textarea::placeholder { color: var(--label-3); }
.row-area { padding-block: 10px; }
.row-area textarea {
  width: 100%; border: 0; background: none; outline: none; resize: vertical; min-height: 120px;
  font: inherit; color: var(--label); padding: 0;
}
.terms-group { margin-top: 18px; }
.form-error { margin: 12px 16px 0; color: var(--red); font-size: 13px; line-height: 18px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Luxstop Pro ──────────────────────────────────── */
.row-label.destructive { color: var(--red); }
.pro-badge {
  display: inline-block; vertical-align: 0.35em; margin-left: 4px; padding: 3px 7px; border-radius: 6px;
  background: var(--tint); color: var(--on-label);
  font: 700 12px/1 var(--font-rounded); letter-spacing: 0.06em;
}
.btn-filled {
  display: block; width: 100%; height: 52px; border: 0; border-radius: 14px;
  background: var(--tint); color: var(--on-label);
  font: 600 17px/1 var(--font); letter-spacing: -0.41px;
  transition: transform 0.2s var(--spring), opacity 0.2s;
}
.btn-filled:active { transform: scale(0.98); }
.btn-filled:disabled { opacity: 0.45; }
.paywall .modal-sheet { height: calc(100% - env(safe-area-inset-top, 0px) - 8px); }
.paywall-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 30px; height: 30px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--fill); color: var(--label-2); font-size: 16px;
}
.paywall-close .ico { stroke-width: 2.4; }
.paywall-body { padding-top: 8px; }
.paywall-hero { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 28px 8px 6px; }
.paywall-icon { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.paywall-title { font: 700 30px/1.15 var(--font-display); letter-spacing: 0.3px; margin-top: 8px; }
.paywall-sub { color: var(--label-2); font-size: 17px; }
.paywall-features { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 16px; }
.paywall-feature { display: flex; gap: 14px; align-items: flex-start; }
.paywall-feature > span:last-child { display: grid; gap: 2px; font-size: 15px; line-height: 20px; letter-spacing: -0.24px; color: var(--label-2); }
.paywall-feature strong { color: var(--label); font-size: 16px; font-weight: 600; }
.paywall-feature.highlight strong::after { content: "●"; color: var(--tint); font-size: 9px; vertical-align: 0.3em; margin-left: 6px; }
.paywall-plans { display: grid; gap: 10px; margin: 26px 0 14px; }
.paywall-status { text-align: center; color: var(--label-2); padding: 24px 0; }
.plan {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 64px; padding: 12px 16px; border: 0; border-radius: 14px; text-align: left;
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--sep);
  transition: box-shadow 0.2s, transform 0.2s var(--spring);
}
.plan:active { transform: scale(0.99); }
.plan[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--tint); }
.plan-radio { flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--label-3); transition: box-shadow 0.2s; }
.plan[aria-checked="true"] .plan-radio { box-shadow: inset 0 0 0 7px var(--tint); }
.plan-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.plan-body strong { font-weight: 600; }
.plan-note { font-size: 13px; color: var(--label-2); }
.plan-price { flex: none; font-weight: 600; }
.plan-badge {
  position: absolute; top: -9px; right: 14px; padding: 3px 8px; border-radius: 8px;
  background: var(--tint); color: var(--on-label); font: 700 11px/14px var(--font); letter-spacing: 0.02em; text-transform: uppercase;
}
.paywall-message { text-align: center; font-size: 15px; margin-bottom: 12px; color: var(--green); }
.paywall-message.error { color: var(--red); }
.paywall-web { text-align: center; font-size: 13px; color: var(--label-2); margin-top: 10px; }
.paywall-legal { font-size: 12px; line-height: 16px; color: var(--label-2); text-align: center; margin: 14px 4px 0; }
.paywall-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 10px; }
.paywall-links a { text-decoration: none; }

/* False color-legenda */
.fc-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; margin-top: 10px; font-size: 12px; color: var(--label-2); }
.fc-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fc-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--sw); }
.viewfinder.falsecolor #zebra { opacity: 1; image-rendering: auto; }
body:not(.fc-on) .fc-only { display: none; }
.row-input.date { width: auto; color: var(--tint); font-size: 16px; }
.pro-badge.small { font-size: 10px; padding: 3px 6px; vertical-align: 0; margin: 0; }

/* Feedback */
.feedback-intro { margin: 18px 4px 14px; }
.feedback-kind { margin-bottom: 4px; }
.feedback-kind button { font-size: 12px; padding: 0 4px; }
.feedback-group { margin-top: 16px; }
.feedback-mail { text-align: center; line-height: 44px; text-decoration: none; margin-top: 14px; }
.form-error:not(.error) { color: var(--green); }
.suggest-link { display: block; margin: 16px auto 0; font-size: 15px; }

/* ── Tabbalk ───────────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  background: var(--material);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -0.5px 0 var(--sep);
}
.tabbar button {
  flex: 1; max-width: 120px; min-width: 0; border: 0; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 500 10px/1.2 var(--font); letter-spacing: 0.1px; color: var(--gray);
  padding-top: 2px;
}
.tabbar button > span:last-child { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar [data-icon] { font-size: 26px; }
.tabbar [data-icon] .ico { stroke-width: 1.6; }
.tabbar button[aria-current="page"] { color: var(--tint); }
.tabbar button[aria-current="page"] .ico { stroke-width: 2.1; }

/* ── Focus en beweging ─────────────────────────────── */
:focus { outline: none; }
button:focus-visible, summary:focus-visible, .switch:focus-visible, .slider:focus-visible, .row-input:focus-visible {
  outline: 2px solid var(--tint); outline-offset: 2px; border-radius: 8px;
}
.glass:focus-visible, .cam-start:focus-visible, .modes button:focus-visible { outline-color: var(--hud-yellow); }

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