/* Lantaarnpaal Melder: report flow on the web. Looks like the app (android/.../ui/Theme.kt). */

:root {
  --navy: #14336B;
  --navy-ink: #0B1E42;
  --navy-soft: #DCE6FA;
  --amber: #F2A900;
  --paper: #F7F8FA;
  --white: #FFFFFF;
  --ink: #1A1F29;
  --muted: #4A5363;
  --line: #C6CCD6;
  --line-soft: #E3E7ED;
  --field-line: #8A94A6;   /* 3:1 against white, so input edges are visible (WCAG 1.4.11) */
  --red: #E5484D;
  --red-ink: #8E2C2F;
  --orange: #F08A24;
  --orange-ink: #95561A;
  --green: #2EAD5B;
  --error: #C62828;
  /* status colours on the map: 3:1 against the map (WCAG 1.4.11) */
  --map-green: #178A3E;
  --map-red: #D12F35;
  --map-orange: #B45309;
  --font: "Atkinson Hyperlegible", "Segoe UI", Verdana, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
a { color: var(--navy); }
/* Focus ring: dark blue with a white edge, so it shows on white, on the map and on blue buttons (3:1+) */
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; box-shadow: 0 0 0 5px var(--white); }
h1:focus { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: fixed; left: 8px; top: 0; transform: translateY(-120%); z-index: 30; border: 0; cursor: pointer; font-size: 1rem;
  background: var(--white); color: var(--navy); padding: .7rem 1rem; border-radius: 10px; font-weight: 700;
}
.skip:focus { transform: translateY(calc(8px + var(--safe-t))); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: 0 1.2rem;
  border: 0; border-radius: 14px;
  font-weight: 700; font-size: 1.0625rem;
  cursor: pointer; text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn svg { width: 22px; height: 22px; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: #1B418A; }
.btn-outline { background: var(--white); color: var(--navy); border: 1.5px solid var(--line); }
.btn-big { width: 100%; min-height: 56px; border-radius: 16px; font-size: 1.125rem; }
.btn-wide { width: 100%; }
.link-btn {
  background: none; border: 0; padding: .4rem 0; cursor: pointer; min-height: 44px;
  color: var(--navy); font-weight: 700; text-align: left;
}

.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: currentColor;
  animation: spin .8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  .loadbar.on span { animation: none; width: 100%; opacity: .5; }
  .btn, .fault { transition: none; }
}

.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
/* Same shapes as on the map, so status never depends on colour alone:
   working = solid dot, reported = dot with a white centre, work going on = ring. */
.dot-green { background: var(--green); }
.dot-red { background: var(--red); }
.dot-orange { background: var(--orange); }
.dot-grey { background: #9AA3B2; }
:root[data-contrast] .dot-green, :root[data-vormen] .dot-green { background: var(--map-green); }
:root[data-contrast] .dot-red { background: var(--map-red); }
:root[data-contrast] .dot-orange { background: var(--map-orange); }
:root[data-contrast] .dot-grey { background: #5F6878; }
/* "Vormen bij de kleuren": reported = dot with a white centre, work going on = ring */
:root[data-vormen] .dot-red, :root[data-vormen] .chip-red .dot { background: radial-gradient(circle, #fff 0 28%, var(--map-red) 31%); }
:root[data-vormen] .dot-orange, :root[data-vormen] .chip-orange .dot { background: #fff; box-shadow: inset 0 0 0 3.5px var(--map-orange); }

/* ---------------------------------------------------------------- screens */

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--paper); }

/* map */
.map { position: absolute; inset: 0; background: #F6F2EC; }
.map-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  padding: calc(10px + var(--safe-t)) calc(12px + var(--safe-r)) 0 calc(12px + var(--safe-l));
  display: flex; pointer-events: none;
}
.brand {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--white); color: var(--navy-ink); text-decoration: none;
  padding: .45rem .8rem .45rem .55rem; border-radius: 12px;
  font-weight: 700; font-size: .9375rem;
  box-shadow: 0 2px 10px rgba(20,35,60,.16);
}
.brand svg { width: 24px; height: 24px; color: var(--navy); }
.maplibregl-ctrl-top-right, .maplibregl-ctrl-bottom-right { z-index: 1; }
.maplibregl-ctrl-attrib { font-family: var(--font); }
/* the map library switches its own focus ring off; bring ours back */
.maplibregl-ctrl button:focus-visible, .maplibregl-ctrl-attrib-button:focus-visible {
  outline: 3px solid var(--navy) !important; outline-offset: 1px; box-shadow: 0 0 0 5px var(--white) !important;
}
.maplibregl-canvas:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }
.maplibregl-ctrl-top-right { top: var(--safe-t); right: var(--safe-r); }
.maplibregl-ctrl-top-right .maplibregl-ctrl { margin: 14px 12px 0 0; }

.map-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 0 calc(12px + var(--safe-r)) calc(12px + var(--safe-b)) calc(12px + var(--safe-l));
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  pointer-events: none;
  max-width: 560px; margin: 0 auto;
}
.map-bottom > * { pointer-events: auto; }
.fabs { display: flex; flex-direction: column; gap: 12px; align-self: flex-end; }
.fab {
  width: 56px; height: 56px; border-radius: 16px; border: 0;
  background: var(--white); color: var(--navy);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 3px 12px rgba(20,35,60,.2);
}
.fab svg { width: 26px; height: 26px; }

.toast {
  align-self: center;
  background: #2A3140; color: var(--white);
  padding: .7rem 1rem; border-radius: 12px;
  font-size: .9375rem; max-width: 100%;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.loadbar { height: 3px; margin: 0 24px; border-radius: 2px; overflow: hidden; }
.loadbar span { display: block; height: 100%; width: 35%; background: var(--navy); border-radius: 2px; opacity: 0; }
.loadbar.on span { opacity: 1; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }

.card {
  background: var(--white); border-radius: 20px;
  padding: 14px 16px; min-height: 76px;
  box-shadow: 0 6px 24px rgba(20,35,60,.18);
}
.card-title { margin: 0 0 .4rem; font-weight: 700; font-size: 1.0625rem; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; color: var(--muted); font-size: .9375rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.card-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.card-pin svg { width: 24px; height: 32px; }
.card-text { flex: 1 1 9rem; min-width: 0; line-height: 1.3; }
.card-text strong, .card-text span { display: block; overflow-wrap: anywhere; }
.card-text strong { font-size: 1.0625rem; }
.card-text span { color: var(--muted); }
.btn-melden { min-width: 104px; flex: none; }
.chip { flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 48px; padding: .3rem 14px; border-radius: 14px;
  font-weight: 700; font-size: .9375rem; white-space: nowrap;
}
.chip-red { background: rgba(229,72,77,.14); color: var(--red-ink); }
.chip-red .dot { background: var(--red); }
.chip-orange { background: rgba(240,138,36,.16); color: var(--orange-ink); }
.chip-orange .dot { background: var(--orange); }

/* steps */
.step-top {
  display: flex; align-items: center; gap: .6rem;
  padding: calc(8px + var(--safe-t)) calc(16px + var(--safe-r)) 6px calc(8px + var(--safe-l));
}
.back {
  width: 44px; height: 44px; border: 0; border-radius: 12px; background: none;
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.back:hover { background: var(--line-soft); }
.back svg { width: 24px; height: 24px; }
.back.is-busy svg { animation: spin 1s linear infinite; }
.step-count { color: var(--muted); font-size: 1.0625rem; flex: 1; }
.step-post { color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 calc(16px + var(--safe-r)) 0 calc(16px + var(--safe-l)); }
.progress i { height: 5px; border-radius: 3px; background: var(--line-soft); }
.progress i.on { background: var(--navy); }

.step-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 22px calc(16px + var(--safe-r)) 24px calc(16px + var(--safe-l));
  width: 100%; max-width: 640px; margin: 0 auto;
}
.step-body h1 { font-size: 1.75rem; line-height: 1.15; margin: 0 0 .3rem; letter-spacing: -.01em; overflow-wrap: break-word; }
.sub { color: var(--muted); margin: 0 0 1.2rem; font-size: 1.0625rem; }
.step-foot {
  padding: 10px calc(16px + var(--safe-r)) calc(14px + var(--safe-b)) calc(16px + var(--safe-l));
  width: 100%; max-width: 640px; margin: 0 auto;
}

/* step 1 */
.faults { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fault {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  min-height: 150px; padding: 14px 8px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 18px;
  cursor: pointer; text-align: center; line-height: 1.25;
  transition: border-color .12s, background .12s;
}
.fault img { width: 60px; height: 60px; margin-bottom: .4rem; }
.fault strong { font-size: 1.0625rem; }
.fault span { color: var(--muted); font-size: .9375rem; }
.fault:hover { border-color: #93A0B5; }
.fault.is-on { border: 2.5px solid var(--navy); background: var(--navy-soft); }

/* step 2 */
.photo-big {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
  width: 100%; min-height: min(260px, 38vh); border: 0; border-radius: 20px;
  background: var(--navy-soft); color: var(--navy-ink); cursor: pointer;
  margin-bottom: 12px; font-size: 1rem;
}
.photo-big svg { width: 54px; height: 54px; margin-bottom: .6rem; }
.photo-big strong { font-size: 1.375rem; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--line-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
/* 44 px tap area, 30 px visible circle */
.thumb-x {
  position: absolute; top: 0; right: 0; width: 44px; height: 44px; padding: 0;
  border: 0; background: none; cursor: pointer; display: grid; place-items: center;
}
.thumb-x span {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.66); color: #fff; font-size: 1.25rem; line-height: 1;
}
.thumb-busy { display: grid; place-items: center; color: var(--navy); }
.thumb-busy .spinner { border-color: rgba(20,51,107,.2); border-top-color: var(--navy); }
.thumb-add {
  width: 100%; height: 100%; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1.5px dashed var(--field-line); background: var(--white); color: var(--navy); cursor: pointer; font-size: .875rem;
}
.thumb-add strong { font-size: 1.75rem; line-height: 1; }
#gallery-btn { margin-bottom: 18px; }

.field { display: flex; flex-direction: column; gap: .3rem; }
.field > span, .field > label { color: var(--muted); font-size: .9375rem; }
.field-error { margin: 0; color: var(--error); font-size: .9375rem; }
.field input, .field textarea {
  width: 100%; padding: .85rem .9rem; border-radius: 10px;
  border: 1.5px solid var(--field-line); background: var(--white);
  font-size: 1.0625rem;
}
.field textarea { resize: vertical; min-height: 3.4rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20,51,107,.15); }
.is-error, .field input.is-error, .field textarea.is-error { border-color: var(--error); border-width: 2px; }

/* step 3 */
.summary {
  display: flex; flex-direction: column; gap: .1rem;
  background: #EEF1F5; border-radius: 16px; padding: 14px; margin-bottom: 16px;
}
.summary strong { font-size: 1.0625rem; }
.summary span { color: var(--muted); }
.fields { display: flex; flex-direction: column; gap: 12px; }
.errors { margin: 14px 0 0; padding: 0; list-style: none; color: var(--error); display: grid; gap: .3rem; }

/* done */
.done { justify-content: space-between; overflow-y: auto; }
.done-body {
  flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px calc(24px + var(--safe-r)) 24px calc(24px + var(--safe-l));
}
.done-check { width: 96px; height: 96px; margin-bottom: 1.2rem; }
.done-body h1 { font-size: 2.25rem; margin: 0 0 .5rem; }
.done-body p { color: var(--muted); font-size: 1.0625rem; max-width: 26rem; margin: 0; }
.warnings { margin: 1rem 0 0; padding: .8rem 1rem; list-style: none; background: #FFF6DC; border-radius: 12px; text-align: left; }
.done-foot {
  display: grid; gap: 12px;
  padding: 0 calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  width: 100%; max-width: 640px; margin: 0 auto;
}

/* my reports */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 20px;
  padding: 16px 8px 12px; margin: 1rem 0 1.4rem; text-align: center;
}
.stats > div { display: flex; flex-direction: column; }
.stats > div + div { border-left: 1.5px solid var(--line-soft); }
.stats strong { font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); }
.stats-note { grid-column: 1 / -1; margin: .7rem 0 0; color: var(--muted); font-size: .875rem; }
.group { font-size: 1.125rem; margin: 1.2rem 4px .6rem; }
.group span { color: var(--muted); font-weight: 400; margin-left: .2rem; }
.reports {
  list-style: none; margin: 0; padding: 0;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 20px; overflow: hidden;
}
.report { display: flex; gap: 14px; padding: 14px 16px; }
.report + .report { border-top: 1.5px solid var(--line-soft); }
.report > .dot { margin-top: .45rem; }
.report.is-closed { background: #F3F5F8; }
.report.is-closed .dot { opacity: .65; }
.report-main { flex: 1; min-width: 0; }
.report-top { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.report-top strong { font-size: 1.0625rem; }
.report-top time { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.report-sub { margin: .1rem 0 0; color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.report-links { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; margin-top: .35rem; font-size: .9375rem; }
.report-links a { font-weight: 700; padding: .4rem 0; }
.history-note { color: var(--muted); font-size: .875rem; margin: 1.2rem 4px 0; }
.empty { text-align: center; padding: 3rem 1rem; }
.empty-title { font-weight: 700; font-size: 1.25rem; margin: 0 0 .4rem; }
.empty p { color: var(--muted); margin: 0 auto 1.2rem; max-width: 24rem; }

/* install as an app */
.install {
  display: flex; gap: 14px; align-items: flex-start;
  margin: 0 calc(16px + var(--safe-r)) 14px calc(16px + var(--safe-l));
  padding: 16px; border-radius: 18px; background: var(--navy-soft); color: var(--navy-ink);
  max-width: 608px; align-self: center; width: calc(100% - 32px);
}
.install img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.install-text { min-width: 0; }
.install h2 { font-size: 1.0625rem; margin: .1rem 0 .3rem; }
.install p { margin: 0 0 .6rem; }
.install-ios { margin: 0 0 .6rem; padding-left: 1.3rem; display: grid; gap: .3rem; }
.ios-share { display: inline-grid; place-items: center; width: 26px; height: 26px; vertical-align: middle; border-radius: 6px; background: var(--white); color: #0A64D6; }
.ios-share svg { width: 18px; height: 18px; }
.install-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; }
.install-actions .btn { min-height: 44px; font-size: 1rem; }

/* posts as a list */
.nearby .report { padding: 0; }
.nearby-btn {
  display: flex; gap: 14px; width: 100%; min-height: 64px; padding: 14px 16px;
  background: none; border: 0; text-align: left; cursor: pointer;
}
.nearby-btn:hover { background: #F3F5F8; }
.nearby-btn .dot { margin-top: .4rem; }
.nearby-btn .report-main, .nearby-btn .report-top, .nearby-btn .report-sub { display: flex; }
.nearby-btn .report-main { flex-direction: column; }
.nearby-btn .report-sub { display: block; }
.dist { color: var(--muted); font-size: .9375rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Weergave panel */
.fab.is-on { box-shadow: 0 3px 12px rgba(20,35,60,.2), inset 0 0 0 2.5px var(--navy); }
.sheet { max-width: 30rem; max-height: calc(100% - 32px); overflow-y: auto; }
.switches { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 4px; }
.a11y-list-btn { margin-top: .2rem; }
.a11y-list-help { margin: .4rem 0 1.1rem !important; font-size: .9375rem; }
.switch {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 12px 4px; min-height: 56px; background: none; border: 0; border-radius: 12px; cursor: pointer;
}
.switch:hover { background: #F3F5F8; }
.switch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.switch-text strong { font-size: 1.0625rem; color: var(--ink); }
.switch-text span { color: var(--muted); font-size: .9375rem; }
.switch-ui {
  flex: none; position: relative; width: 50px; height: 30px; border-radius: 15px;
  background: #fff; border: 2px solid var(--field-line); transition: background .15s, border-color .15s;
}
.switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--field-line); transition: transform .15s, background .15s;
}
.switch[aria-checked="true"] .switch-ui { background: var(--navy); border-color: var(--navy); }
.switch[aria-checked="true"] .switch-ui::after { transform: translateX(20px); background: #fff; }
.switch[aria-checked="true"] .switch-ui::before {
  content: ""; position: absolute; left: 9px; top: 7px; width: 6px; height: 10px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* Grotere tekst */
:root[data-groot] { font-size: 118.75%; }
/* Meer contrast */
:root[data-contrast] {
  --muted: #2B3240; --line: #5F6878; --line-soft: #8A94A6; --field-line: #4A5363; --ink: #0B0F17;
}
:root[data-contrast] .fault, :root[data-contrast] .stats, :root[data-contrast] .reports,
:root[data-contrast] .btn-outline { border-width: 2px; }
:root[data-contrast] .card, :root[data-contrast] .brand, :root[data-contrast] .fab, :root[data-contrast] .toast { outline: 2px solid var(--navy-ink); }
:root[data-contrast] .summary, :root[data-contrast] .photo-big { outline: 2px solid var(--line); }
/* Minder beweging */
:root[data-rustig] *, :root[data-rustig] *::before, :root[data-rustig] *::after {
  animation-duration: 0s !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important;
}

/* dialog */
.dialog-wrap {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(11,30,66,.45);
  display: grid; place-items: center; padding: 24px;
}
.dialog { background: var(--white); border-radius: 22px; padding: 22px; max-width: 26rem; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.dialog h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
.dialog p { margin: 0 0 1.2rem; color: var(--muted); white-space: pre-line; }
.dialog .btn { width: 100%; }

.noscript {
  position: fixed; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); z-index: 30;
  max-width: 32rem; margin: 0 auto; padding: 1.4rem; border-radius: 18px; background: var(--white);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.noscript h1 { font-size: 1.5rem; margin: 0 0 .6rem; }
.noscript p { margin: 0 0 .8rem; }
.noscript p:last-child { margin: 0; }

/* small phones (iPhone SE, older Androids) */
@media (max-width: 360px) {
  .faults { gap: 8px; }
  .fault { min-height: 128px; padding: 10px 6px; }
  .fault img { width: 48px; height: 48px; }
  .fault strong { font-size: 1rem; }
  .card { padding: 12px; }
  .card-row { gap: 8px; }
  .card-pin { display: none; }
  .btn-melden { min-width: 0; padding: 0 .9rem; }
  .chip { padding: .3rem 10px; font-size: .875rem; }
  .step-body h1 { font-size: 1.5rem; }
}

/* phones held sideways and other short screens */
@media (max-height: 520px) {
  .step-body { padding-top: 12px; }
  .step-body h1 { font-size: 1.375rem; }
  .sub { margin-bottom: .7rem; }
  .fault { min-height: 112px; }
  .fault img { width: 44px; height: 44px; }
  .done-check { width: 64px; height: 64px; margin-bottom: .6rem; }
  .done-body h1 { font-size: 1.75rem; }
  .btn-big { min-height: 48px; }
  .fab { width: 48px; height: 48px; }
  .fabs { gap: 8px; }
  .done-foot { grid-template-columns: 1fr 1fr; }
}
@media (max-height: 520px) and (min-width: 640px) {
  .faults { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Windows high contrast and other forced colours */
@media (forced-colors: active) {
  .dot { forced-color-adjust: none; }
  .fault.is-on { outline: 3px solid Highlight; }
  .card, .fab, .brand, .dialog { border: 1px solid CanvasText; }
  .progress i.on { background: Highlight; }
}

@media (min-width: 720px) {
  .faults { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step-body h1 { font-size: 2rem; }
}

/* ---------------------------------------------------------------- computers and big tablets
   Logo top left, the chosen post in a panel bottom left, the round buttons bottom right,
   and every other screen becomes one centred column instead of a stretched phone. */
@media (min-width: 900px) and (min-height: 560px) {
  .map-top { padding: 16px 0 0 16px; }
  .brand { padding: .6rem 1rem .6rem .8rem; border-radius: 14px; font-size: 1.0625rem; box-shadow: 0 3px 12px rgba(20,35,60,.18); }
  .brand svg { width: 28px; height: 28px; }

  .map-bottom {
    top: auto; left: 16px; right: auto; bottom: 28px;
    width: 400px; max-width: calc(100% - 120px); margin: 0; padding: 0;
    gap: 8px;
  }
  .card {
    border-radius: 18px; padding: 18px 18px 16px; min-height: 0;
    box-shadow: 0 10px 30px rgba(20,35,60,.2);
  }
  .loadbar { margin: 0 18px; }
  .card-title { font-size: 1.125rem; margin-bottom: .6rem; }
  .legend { display: grid; gap: .45rem; }
  .card-row { gap: 14px; }

  .fabs {
    position: fixed; right: 16px; bottom: 28px; z-index: 3;
    gap: 10px;
  }
  .fab { width: 52px; height: 52px; border-radius: 14px; }
  .fab:hover { background: #F0F3F8; }
  .toast {
    position: fixed; left: 50%; top: 20px; transform: translateX(-50%);
    max-width: min(560px, calc(100% - 520px)); z-index: 4;
  }
  .maplibregl-ctrl-top-right .maplibregl-ctrl { margin: 16px 16px 0 0; }
  .maplibregl-ctrl-group { border-radius: 12px !important; box-shadow: 0 3px 12px rgba(20,35,60,.2) !important; }
  .maplibregl-ctrl-group button { width: 40px; height: 40px; }

  /* steps, lists, done: one calm column in the middle */
  .screen.step, .screen.history, .screen.done { align-items: center; }
  /* one width for every step, wide enough for the ten fault types in two rows of five */
  .step-top, .progress { width: 100%; max-width: 820px; }
  .step-top { padding: 20px 20px 10px 8px; }
  .progress { padding: 0 20px; }
  .step-body { max-width: 820px; padding: 28px 20px 32px; }
  .step-foot { max-width: 820px; padding: 12px 20px 28px; }
  .step-foot .btn-big { max-width: 360px; margin-left: auto; display: flex; }
  /* ten fault types: two rows of five */
  .faults { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .fault { min-height: 156px; padding: 14px 6px; }
  .fault strong { font-size: 1rem; }
  .photo-big { min-height: 220px; }
  .thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .thumbs:has(> li:only-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .done { justify-content: center; }
  .done-body { flex: 0 0 auto; padding-bottom: 32px; }
  .done-foot { grid-template-columns: repeat(2, max-content); justify-content: center; max-width: none; }
  .done-foot .btn-big { padding: 0 1.6rem; }
  .install { max-width: 560px; }
}
