/* Zo dicht mogelijk bij de iOS-app: zwart als grond, opgetilde vlakken erop,
   één helder accent, en grote zelfverzekerde cijfers. Hoog contrast, want
   dit wordt buiten gelezen — dat was de eis die de bureaubladtaal van
   shadcn niet haalde. */
:root {
  color-scheme: dark light;
  --ground: #000;
  --card: #1c1c1e;
  --card-2: #2c2c2e;
  --ink: #fff;
  --ink-2: #98989f;
  --ink-3: #636366;
  --accent: #3b86ff;
  --hairline: #38383a;
  --on-accent: #fff;

  /* Neerslagschaal. In het donker loopt hij naar licht toe: op zwart zou de
     hoosbui anders juist het minst opvallen. */
  --rain-0: #3c3c42;
  --rain-1: #4c86b4;
  --rain-2: #6fb6ee;
  --rain-3: #a9d8ff;
  --rain-line: #6fb6ee;
  --safe: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: light) {
  :root {
    /* Gegroepeerde iOS-stijl: grijze ondergrond, witte kaarten. */
    --ground: #f2f2f7; --card: #fff; --card-2: #eeeef0;
    --ink: #000; --ink-2: #6c6c70; --ink-3: #aeaeb2;
    --accent: #0a6cff; --hairline: #dcdce1;
    --rain-0: #d5d6dc; --rain-1: #a8c6de; --rain-2: #5a8fbe; --rain-3: #24567f;
    --rain-line: #5a8fbe;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0 auto; max-width: 520px; min-height: 100dvh; box-sizing: border-box;
  display: flex; flex-direction: column;
  /* De statusbalk hoort bij de pagina (black-translucent), zodat een sheet
     ook dáár de achtergrond dimt; de inhoud begint eronder. */
  padding: calc(44px + env(safe-area-inset-top, 0px)) 20px calc(16px + var(--safe));
  background: var(--ground); color: var(--ink);
  font: 400 17px/1.4 -apple-system, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; text-align: left; }

/* Navigatiebalk zoals iOS: vast bovenaan, tot onder de statusbalk (de body
   heeft er ruimte voor). Vast in plaats van sticky: sticky in een flex-kolom
   gedraagt zich in iOS Safari niet betrouwbaar. De kleine titel is
   onzichtbaar tot de grote titel eronder weggescrold is. */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  padding: env(safe-area-inset-top, 0px) 0 0; height: 44px; box-sizing: content-box;
  transition: background .2s, box-shadow .2s;
}
.navbar-inner {
  max-width: 520px; margin: 0 auto; height: 44px; padding: 0 8px; box-sizing: border-box;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.navbar.scrolled {
  background: color-mix(in srgb, var(--ground) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 .5px 0 var(--hairline);
}
.nav-center { grid-column: 2; text-align: center; max-width: 60vw; opacity: 0; transition: opacity .2s; line-height: 1.2; }
.navbar.scrolled .nav-center, .navbar.inline .nav-center { opacity: 1; }
.nav-title { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sub { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sub:empty { display: none; }
/* Ronde glazen knoppen, zoals de terug- en actieknoppen in iOS 26 */
.nav-btn { width: 38px; height: 38px; border-radius: 19px; background: var(--card); color: var(--ink);
           display: grid; place-items: center; box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.navbar.scrolled .nav-btn { background: color-mix(in srgb, var(--card) 85%, transparent); }
#nav-back { grid-column: 1; justify-self: start; }
#nav-back .glyph { margin-left: -2px; }
#gear { grid-column: 3; justify-self: end; }
.large-title { font-size: 34px; font-weight: 700; letter-spacing: -0.6px; margin: 4px 0 12px; line-height: 1.15; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 19px; background: var(--card);
  display: grid; place-items: center; color: var(--ink);
}

.card { background: var(--card); border-radius: 16px; overflow: hidden; }
.card + .card, .row, .swipe + .card { margin-top: 10px; }

/* Weer nu */
.now { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.now .temp { font-size: 44px; font-weight: 300; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.now .headline { font-size: 16px; font-weight: 600; }
.range { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.range .bar { flex: 1; height: 6px; border-radius: 3px; position: relative; background: var(--card-2); }
.range .fill { position: absolute; inset: 0; border-radius: 3px; }
.range .knob {
  position: absolute; top: -4.5px; width: 15px; height: 15px; border-radius: 50%;
  border: 2.5px solid var(--card); transform: translateX(-50%);
  background: var(--ink);
}

/* Ik ga weg om */
.depart { display: flex; align-items: center; gap: 12px; padding: 11px 16px; }
.depart .label { flex: 1; min-width: 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Chrome zet er een eigen klokje bij dat de tijd wegdrukt; Safari op iOS
   doet dat niet en opent de picker gewoon op een tik op het veld. */
.depart .go {
  background: var(--accent); color: var(--on-accent); border-radius: 10px;
  padding: 10px 16px; font-size: 16px; font-weight: 600;
}

/* Actieve bestemming — de blauwe kop is tegelijk de startknop. */
.dest { display: block; width: 100%; }
.dest .head {
  display: flex; align-items: center; gap: 12px; padding: 0 12px 0 16px;
  height: 84px; background: var(--accent); color: var(--on-accent);
}
.dest .head .name { font-size: 24px; font-weight: 600; letter-spacing: -0.3px; }
.dest .head .sub { font-size: 13px; opacity: .85; }
.dest .head .mins { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.dest .head .mins small { font-size: 15px; font-weight: 400; }
.dest .body { padding: 16px; }
.dest .verdict { font-size: 22px; font-weight: 600; letter-spacing: -0.3px; }
.dest .detail { font-size: 15px; font-weight: 600; color: var(--accent); margin-top: 11px; }
.dest .alt { font-size: 13px; color: var(--ink-2); margin-top: 3px; }

.row {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 0 18px; height: 64px; background: var(--card); border-radius: 16px;
}
.row .name { font-size: 20px; font-weight: 600; }
.row .sub { font-size: 14px; color: var(--ink-2); }
.row .mins { margin-left: auto; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.row .mins small { font-size: 14px; font-weight: 400; color: var(--ink-2); }
.row .glyph, .dest .head .glyph { flex: none; opacity: .9; }
.row .glyph { color: var(--ink-2); }

.chart { width: 100%; height: auto; margin-top: 12px; display: block; }
.c-time { fill: var(--ink-2); font: 600 12px -apple-system, system-ui, sans-serif; }
.c-note { fill: var(--ink-3); font: 500 10px -apple-system, system-ui, sans-serif; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
footer { margin-top: auto; padding-top: 30px; text-align: center; font-size: 12px; color: var(--ink-3); }
footer a { color: inherit; text-decoration-color: var(--hairline); }

/* Ritsamenvatting */
body.in-ride h1.large-title, body.in-ride #gear, body.in-ride footer { display: none; }
body.in-ride #app { padding-top: 10px; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 6px 8px; row-gap: 4px; }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 4px 10px; min-width: 0; }
.stat:nth-child(-n+3) { border-bottom: 1px solid var(--hairline); }
.stat .glyph { color: var(--accent); margin-bottom: 6px; }
.stat .v { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.4px; line-height: 1.15;
           max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat .v small { font-size: 13px; font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.stat .k { font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.stat .s { font-size: 13px; color: var(--ink-2); margin-top: 3px; max-width: 100%; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ride-body { padding: 18px 16px 16px; margin-top: 10px; }
.ride-body .verdict { text-align: center; }
.ride-body .detail { font-size: 15px; font-weight: 600; color: var(--accent); margin-top: 6px; text-align: center; }

.ride-map { margin-top: 10px; position: relative; }
.route-map { height: 230px; background: var(--card-2); }
.route-map canvas { outline: 0; }
.map-attr { position: absolute; right: 8px; bottom: 6px; font-size: 10px; color: var(--ink-2);
            background: color-mix(in srgb, var(--card) 80%, transparent); padding: 2px 6px; border-radius: 6px; }
.map-attr a { color: inherit; text-decoration: none; }

/* De rail: links, met de tijd ervoor en ruim baan voor de tekst erachter.
   Gecentreerd zag mooier uit, maar een pontnaam met vaartijd paste er niet. */
.rail-wrap { position: relative; margin: 26px 0 10px; --track: 82px; }
.rail-track {
  position: absolute; left: calc(var(--track) - 8px); top: 0; bottom: 0; width: 16px; border-radius: 8px;
  overflow: hidden; display: flex; flex-direction: column; background: var(--rain-0);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .04);
}
.seg { width: 100%; }
.seg.r0 { background: var(--rain-0); } .seg.r1 { background: var(--rain-1); }
.seg.r2 { background: var(--rain-2); } .seg.r3 { background: var(--rain-3); }
.seg.unknown { background: repeating-linear-gradient(135deg, var(--card-2) 0 5px, var(--card) 5px 10px); }

.tick { position: absolute; left: var(--track); height: 0; display: flex; align-items: center; }
.tick::before { content: ''; position: absolute; left: -14px; width: 28px; height: 1px; background: var(--ink-3); opacity: .55; }
.tick span { position: absolute; right: 26px; font-size: 12px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.marker { position: absolute; left: 0; right: 0; height: 0; }
.marker .when { position: absolute; right: calc(100% - var(--track) + 26px); top: 0; transform: translateY(-50%);
                font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.marker .dot {
  position: absolute; left: var(--track); top: 0; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card-2); color: var(--ink);
  border: 3px solid var(--card); box-shadow: 0 2px 6px rgb(0 0 0 / .35);
}
.marker.start .dot { background: var(--accent); }
.marker.start .dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.marker.finish .dot { background: var(--ink); color: var(--ground); }
.marker.ferry .dot { background: #e8891c; color: #fff; }
.marker.closed .dot { background: #ff3b30; }
.marker.works .dot { background: #ffcc00; color: #000; }
.stat.warn .v, .stat.warn .s { color: #ff9f0a; }
.marker.rain .dot { color: #fff; }
.marker.r1 .dot { background: var(--rain-1); } .marker.r2 .dot { background: var(--rain-2); }
.marker.r3 .dot { background: var(--rain-3); color: #000; }
.marker .text { position: absolute; left: calc(var(--track) + 26px); right: 0; top: 0; transform: translateY(-50%);
                display: flex; flex-direction: column; line-height: 1.2; }
.marker .label { font-size: 16px; font-weight: 600; }
.marker .sub { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Instellingen */
.settings h2 { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
               color: var(--ink-2); margin: 22px 4px 8px; }
.list .cell { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px;
              border-bottom: 1px solid var(--hairline); width: 100%; }
.list .cell:last-child { border-bottom: 0; }
.list .cell .sub { font-size: 13px; color: var(--ink-2); }
.list .cell .glyph { color: var(--ink-2); flex: none; }
.mini { width: 34px; height: 34px; border-radius: 10px; background: var(--card-2); display: grid; place-items: center; flex: none; }
.mini:disabled { opacity: .3; }
.mini.danger { color: #ff6b6b; }
.pad { padding: 16px; }
.hint { padding: 16px; margin-top: 8px; }
.foot { font-size: 13px; color: var(--ink-2); margin: 8px 6px 0; }

[hidden] { display: none !important; }
.foot + .card, .foot + form.card { margin-top: 14px; }

/* Locatie zoeken: één veld, resultaten eronder, één tik voegt toe */
.searchbox { padding: 8px; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 44px; border-radius: 10px; background: var(--card-2); color: var(--ink-3); }
.search .field { flex: 1; height: 44px; padding: 0; background: transparent; border-radius: 0; }
.search .field::-webkit-search-cancel-button, .search .field::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.search .field:focus-visible { outline: 0; }
.search .clear { width: 22px; height: 22px; border-radius: 50%; background: var(--ink-3); color: var(--card); display: grid; place-items: center; flex: none; }
#results { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.hit { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.hit:active { background: var(--card-2); }
.hit .glyph { color: var(--ink-2); flex: none; } .hit .glyph:last-child { color: var(--accent); }
.hit .grow { min-width: 0; }
.name-btn { display: block; max-width: 100%; text-align: left; font: inherit; color: inherit; padding: 0; }
.field.rename { height: 34px; padding: 0 8px; margin: -6px 0; font-size: 17px; }
#results .sub { padding: 8px 4px; font-size: 14px; color: var(--ink-2); }

.speedhead { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; margin-bottom: 12px; }
.speedhead b { font-size: 28px; font-variant-numeric: tabular-nums; }
.speedhead small { font-size: 15px; color: var(--ink-2); font-weight: 400; }
.segmented { display: flex; background: var(--card-2); border-radius: 9px; padding: 2px; }
.segmented button { flex: 1; padding: 9px 4px; text-align: center; font-size: 13px; font-weight: 500; border-radius: 7px; color: var(--ink); }
.segmented button.on { background: var(--ink); color: var(--ground); }
.segmented.compact { flex: none; } .segmented.compact button { padding: 7px 10px; }
input[type=range] { width: 100%; margin: 14px 0 4px; accent-color: var(--accent); }
input[type=checkbox][switch] { accent-color: var(--accent); width: 51px; height: 31px; }

/* Velden — één stijl, zo dicht bij iOS als CSS toelaat */
.field {
  height: 44px; width: 100%; border: 0; border-radius: 10px; padding: 0 12px;
  background: var(--card-2); color: var(--ink); font: 400 17px -apple-system, system-ui, sans-serif;
  -webkit-appearance: none; appearance: none;
}
.field::placeholder { color: var(--ink-3); }
.field.time { width: auto; min-width: 5.4em; text-align: center; font-weight: 600; font-size: 19px; }
.go.secondary { background: var(--card-2); color: var(--ink); }
.go.primary { background: var(--accent); color: var(--on-accent); border-radius: 12px; height: 48px; font-size: 17px; font-weight: 600; width: 100%; text-align: center; }

/* Vertrektijd: een select in de huisstijl, met eigen pijltje */
.select { position: relative; display: inline-flex; align-items: center; }
.select select.field { padding: 0 28px 0 12px; width: auto; min-width: 5.4em; font-weight: 600; font-size: 17px;
                       font-variant-numeric: tabular-nums; text-align: left; cursor: pointer; }
.select .glyph { position: absolute; right: 10px; pointer-events: none; color: var(--ink-2); }
.depart .go.secondary { padding: 10px 12px; flex: none; }
/* Alleen invoervelden krijgen een focusring; knoppen niet, net als op iOS.
   showModal() zet de focus anders op de eerste knop in de sheet, met ring. */
input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
button:focus-visible { outline: none; }

/* iOS-schakelaar, overal hetzelfde */
.toggle {
  -webkit-appearance: none; appearance: none; margin: 0; flex: none;
  width: 51px; height: 31px; border-radius: 16px; background: var(--card-2);
  position: relative; transition: background .2s ease;
}
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px rgb(0 0 0 / .3); transition: transform .2s ease;
}
.toggle:checked { background: #34c759; }
.toggle:checked::after { transform: translateX(20px); }

/* Schermovergangen */
/* Schermovergangen zoals iOS ze doet. Push/pop: het nieuwe scherm schuift
   van rechts over het oude, dat een derde naar links wijkt en donkerder wordt;
   terug is precies het omgekeerde. Instellingen zijn een sheet van onderen. */
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: .38s; animation-timing-function: cubic-bezier(.32, .72, 0, 1);
  animation-fill-mode: both; mix-blend-mode: normal;
}
::view-transition-group(root) { animation-duration: .38s; }

html[data-nav=push]::view-transition-old(root) { animation-name: vt-park; }
html[data-nav=push]::view-transition-new(root) { animation-name: vt-push-in; box-shadow: -8px 0 24px rgb(0 0 0 / .35); }
html[data-nav=pop]::view-transition-old(root) { animation-name: vt-pop-out; z-index: 2; box-shadow: -8px 0 24px rgb(0 0 0 / .35); }
html[data-nav=pop]::view-transition-new(root) { animation-name: vt-unpark; }

html[data-nav=sheet]::view-transition-old(root) { animation-name: vt-dim; }
html[data-nav=sheet]::view-transition-new(root) { animation-name: vt-sheet-in; }
html[data-nav=unsheet]::view-transition-old(root) { animation-name: vt-sheet-out; z-index: 2; }
html[data-nav=unsheet]::view-transition-new(root) { animation-name: vt-undim; }

@keyframes vt-push-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes vt-pop-out { from { transform: none; } to { transform: translateX(100%); } }
@keyframes vt-park { from { transform: none; filter: brightness(1); } to { transform: translateX(-30%); filter: brightness(.7); } }
@keyframes vt-unpark { from { transform: translateX(-30%); filter: brightness(.7); } to { transform: none; filter: brightness(1); } }
@keyframes vt-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes vt-sheet-out { from { transform: none; } to { transform: translateY(100%); } }
@keyframes vt-dim { from { filter: brightness(1); } to { filter: brightness(.75); } }
@keyframes vt-undim { from { filter: brightness(.75); } to { filter: brightness(1); } }

/* Bestemming wisselen: geen schermwissel, maar de rij groeit tot kaart en de
   kaart krimpt tot rij; wat eronder staat schuift mee. Elke bestemming heeft
   daarvoor een eigen view-transition-name. */
html[data-nav=morph]::view-transition-old(root), html[data-nav=morph]::view-transition-new(root) { animation: none; }
::view-transition-group(*) { animation-duration: .38s; animation-timing-function: cubic-bezier(.32, .72, 0, 1); }
::view-transition-old(*), ::view-transition-new(*) { animation-duration: .38s; animation-timing-function: cubic-bezier(.32, .72, 0, 1); }
::view-transition-old(*):only-child, ::view-transition-new(*):only-child { animation-duration: .25s; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(*), ::view-transition-new(*), ::view-transition-group(*) { animation-duration: .15s; animation-name: none; }
}

.version { text-align: center; font-size: 12px; color: var(--ink-3); margin: 34px 0 10px; }

/* De poort */
body.gated .navbar, body.gated h1.large-title, body.gated footer { display: none; }
.gate { text-align: center; padding: 48px 8px 0; }
.gate-icon { border-radius: 22px; box-shadow: 0 8px 30px rgb(0 0 0 / .35); }
.gate h1 { font-size: 26px; margin: 22px 0 10px; letter-spacing: -0.4px; }
.gate p { color: var(--ink-2); font-size: 16px; line-height: 1.45; margin: 0 0 22px; }
.steps { list-style: none; padding: 0; margin: 0 0 22px; text-align: left; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--card);
            border-radius: 14px; margin-bottom: 8px; font-size: 17px; }
.steps li .glyph { vertical-align: -3px; margin-left: 2px; color: var(--accent); }
.step { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
        display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.gate-note { color: var(--ink); background: var(--card); border-radius: 14px; padding: 12px 16px; font-size: 15px; }
.gate-fine { font-size: 13px; color: var(--ink-3); }

/* Blank slate: nog geen locaties */
.blank { padding: 28px 22px 22px; text-align: center; }
.blank-icon { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px; display: grid; place-items: center;
              background: var(--accent); color: #fff; }
.blank-title { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.blank-text { font-size: 15px; color: var(--ink-2); margin: 8px 0 16px; line-height: 1.4; }
.blank-list { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.blank-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-2); line-height: 1.35; }
.blank-list li b { color: var(--ink); font-weight: 600; }
.blank-list .glyph { color: var(--accent); flex: none; }
.blank .go { display: inline-flex; align-items: center; gap: 8px; width: auto; padding: 0 22px; height: 46px;
             background: var(--accent); color: var(--on-accent); border-radius: 12px; font-size: 16px; font-weight: 600; }

/* Locatie toevoegen op het dashboard */
.add-row { gap: 14px; height: 56px; }
.add-row .name { font-size: 17px; font-weight: 400; color: var(--accent); }
.plus-badge { width: 22px; height: 22px; border-radius: 50%; background: #34c759; color: #fff; display: grid; place-items: center; flex: none; }
.plus-badge .glyph { color: #fff; stroke-width: 3.2; opacity: 1; }
.row.nearby { opacity: .6; } .row.nearby .glyph:last-child { color: var(--ink-2); }

/* Wegvegen */
.swipe { position: relative; margin-top: 10px; border-radius: 16px; overflow: hidden; }
.swipe .row, .swipe .card { margin-top: 0; }
.swipe-content { position: relative; z-index: 1; touch-action: pan-y; transition: transform .28s cubic-bezier(.32,.72,0,1); background: var(--ground); border-radius: 16px; }
.swipe-actions { position: absolute; inset: 0 0 0 auto; width: 150px; display: flex; }
.swipe-actions button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
                        color: #fff; font-size: 12px; font-weight: 600; }
.swipe-rename { background: #8e8e93; } .swipe-remove { background: #ff3b30; }
.swipe.will-delete .swipe-actions { background: #ff3b30; }
.swipe.will-delete .swipe-rename { opacity: 0; }
.swipe.removing { transition: opacity .18s, transform .18s; opacity: 0; transform: translateX(-40px); }

/* Sheet */
dialog.sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 520px; border: 0; padding: 0 0 var(--safe);
               background: var(--card); color: var(--ink); border-radius: 18px 18px 0 0; max-height: 88dvh; overflow: auto;
               animation: sheet-up .32s cubic-bezier(.32,.72,0,1); box-shadow: 0 -8px 40px rgb(0 0 0 / .35); }
dialog.sheet::backdrop { background: rgb(0 0 0 / .45); animation: fade .25s; }
dialog.sheet.closing { animation: sheet-down .22s ease-in forwards; }
dialog.sheet.closing::backdrop { animation: fade .22s reverse forwards; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 16px 6px; }
.sheet-title { font-size: 17px; font-weight: 600; text-align: center; }
.sheet-cancel { color: var(--accent); font-size: 17px; text-align: left; display: inline-flex; align-items: center; gap: 2px; }
span.sheet-cancel:last-child { visibility: hidden; }
.sheet-cancel.right { justify-content: flex-end; }
.sheet-body { padding: 8px 16px 20px; display: flex; flex-direction: column; gap: 12px; min-height: 260px; }
.sheet-hint { font-size: 13px; color: var(--ink-2); padding: 0 2px; }
.hits { display: flex; flex-direction: column; }
.hits .hit { border-radius: 0; padding: 12px 4px; border-bottom: 1px solid var(--hairline); }
.hits .hit:last-child { border-bottom: 0; }
.hits .hit .glyph:last-child { color: var(--ink-3); }
.hit-dist { font-size: 13px; color: var(--ink-2); flex: none; font-variant-numeric: tabular-nums; }
.sheet-address { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); }
.sheet-address .glyph { color: var(--ink-2); flex: none; } .sheet-address .sub { font-size: 13px; color: var(--ink-2); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--card-2); color: var(--ink); font-size: 15px; font-weight: 500; }
.chip.on { background: var(--accent); color: var(--on-accent); }

/* Pull-to-refresh */
.pull { height: 0; overflow: visible; position: relative; transition: height .3s cubic-bezier(.32,.72,0,1); }
#app { transition: transform .3s cubic-bezier(.32,.72,0,1); }
.pull-dot { position: absolute; left: 50%; bottom: 10px; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%;
            background: var(--card); color: var(--ink-2); display: grid; place-items: center; box-shadow: 0 2px 8px rgb(0 0 0 / .3);
            opacity: var(--progress, 0); transform: rotate(calc(var(--progress, 0) * 270deg)) scale(calc(.6 + .4 * var(--progress, 0))); }
.pull.busy .pull-dot { opacity: 1; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.version .build { color: var(--ink-3); opacity: .8; margin-left: 4px; }
