/*
 * style.css -- ChargePick Rota gorunumu (masaustu + ortak kurallar).
 *
 * TASARIM KAYNAGI: chargetrip-tasar-m-referans/project/
 * "Rota Planlayici.dc.html" (Claude Design teslimi). Renkler, olculer,
 * yaricaplar, golgeler ve yazi olcegi ORADAN alinir; bu dosyadaki her
 * sayi o dosyadaki bir satira karsilik gelir. Goz karariyla deger yok.
 *
 * Cerceve (framework) kullanilmaz; duzen icin yalnizca flex ve grid.
 * Telefon (< 720 px, referanstaki isMobile esigi) kurallari mobile.css'te.
 */

/* --- Tema: referans paleti (S nesnesi, satir 439-442) ----------------- */
:root {
  color-scheme: dark;

  --bg: #161617;                            /* S.bg */
  --surface: rgba(22, 22, 23, 0.92);        /* dock / bilgi paneli cami */
  --surface-chip: rgba(22, 22, 23, 0.9);    /* yuvarlak araclar, piller */
  --surface-strip: rgba(22, 22, 23, 0.94);  /* telefon yolculuk seridi */
  --surface-attrib: rgba(22, 22, 23, 0.7);  /* harita atfi */
  --surface-2: #232326;                     /* S.s2: kart, girdi, rozet */
  --surface-3: #2c2c30;                     /* S.s3: hover, cubuk zemini */
  --surface-4: #4a4a50;                     /* kesikli hat, cubuk tabani, AC noktasi */
  --border: rgba(255, 255, 255, 0.09);      /* S.border: TEK kenarlik rengi */
  --text: #e6e4e1;                          /* S.text */
  --text-strong: #ffffff;                   /* S.strong */
  --text-muted: #a8a5a0;                    /* S.muted */
  --text-dim: #75726d;                      /* S.dim */

  --accent: #f0b346;                        /* S.accent (kehribar) */
  --accent-text: #161617;                   /* S.accentTx */
  --accent-soft: rgba(240, 179, 70, 0.12);  /* secili segment, grafik alani */
  --accent-faint: rgba(240, 179, 70, 0.08); /* durak karti zemini */
  --accent-border: rgba(240, 179, 70, 0.35);/* durak karti kenari */
  --accent-hover: #f6c86a;                  /* yalnizca baglantilar */
  --ok: #43b883;                            /* S.ok: "yer secildi" noktasi */
  /* Iklim raporu karisim cubugu (bizim; referansta yok). */
  --mix-nuclear: #6c8cd5;
  --mix-fossil: #b0674f;

  /* Uyari/hata tokenlari referansta yok; hata metni #e5655a'dan turetilir. */
  --danger-text: #e5655a;
  --danger-border: rgba(229, 101, 90, 0.5);
  --danger-bg: rgba(229, 101, 90, 0.10);
  --focus: #f0b346;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --scrim: rgba(0, 0, 0, 0.6);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --shadow-modal: 0 30px 80px rgba(0, 0, 0, 0.6);
  --blur-panel: blur(16px);
  --blur-chip: blur(12px);

  --dock-w: 380px;
  --gap: 16px;

  --font: 'DM Sans', system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; min-height: 480px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  /* Sayfa kaydirilmaz: kaydirma dock'larin ICINDE olur. */
  overflow: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
input, button, select, textarea { font-family: inherit; }
input[type="range"] { accent-color: var(--accent); }
input[type="checkbox"] { accent-color: var(--accent); }
::placeholder { color: var(--text-dim); }
code, pre { font-family: var(--mono); font-size: 12px; }

/* [hidden] her zaman kazanir: display veren siniflar onu ezmesin. */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Yalnizca telefonda gorunen ogeler (mobile.css acar). */
.m-only { display: none !important; }

/* --- Ortak deyimler (referansin tekrar eden inline stilleri) ---------- */
/* 11 px buyuk harfli bolum etiketi (satir 58, 197, 207, 286, ...). */
.sec-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.sec-label.accent { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }
.note, .hint { margin: 0; font-size: 12px; color: var(--text-dim); }
.muted { color: var(--text-muted); }

/* Segment dugmesi: segStyle(on) (satir 453-455). */
.seg-row { display: flex; gap: 6px; }
.seg-row.cols-2 { display: grid; grid-template-columns: 1fr 1fr; }
.seg-row.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.seg-row.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.seg-row.wrap { flex-wrap: wrap; }
.seg {
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}
.seg, .adv-row, .step-btn, .check-row, .modal-row {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.seg[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* 36 px yuvarlak simge dugmesi (× / ‹, satir 53, 176, 255, 308, 362). */
.icon-btn {
  width: 36px; height: 36px;
  flex: none;
  padding: 0;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-strong);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
/* Koyu pill (‹ Düzenle, ‹ Haritaya dön; satir 178, 386). */
.pill-dark {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-strong);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}
/* Saydam kucuk pill (Bitir; satir 180). */
.pill-ghost-sm {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.pill-ghost-sm:hover { color: var(--text-strong); }
/* Saydam pill (↕ Yer değiştir, Varsayılana dön; satir 137-139, 342). */
.pill-ghost {
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.pill-ghost:hover { background: var(--surface-2); color: var(--text-strong); }
.pill-ghost:disabled { color: var(--text-dim); background: transparent; cursor: default; }
/* "Varsayılana dön" referansta 44 px'tir (satir 342); yer degistir /
   konumum pilleri 40 (satir 137-139). */
.pill-ghost.h44 { min-height: 44px; }
/* Beyaz metinli cerceveli pill, 48 px (Google Maps'te aç, Buradan yola çık). */
.pill-outline {
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-strong);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  text-decoration: none;
}
.pill-outline:hover { background: var(--surface-2); color: var(--text-strong); }
/* Kehribar dolu pill, 48 px (Yolculuk özeti, Yolculuk; satir 80, 245). */
.btn-accent, .btn-accent-sm {
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.h40 { min-height: 40px; height: 40px; padding: 0 16px; font-size: 13px; }

/* Girdi kutusu (datetime, arama; satir 334, 359). */
.field-input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-strong);
  font: inherit;
  font-size: 15px;
  color-scheme: dark;
}
.field-input:focus { outline: none; border-color: var(--accent); }
.field-wrap { position: relative; }
.field-wrap .field-input { padding-right: 48px; }
.field-unit {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--text-dim);
  pointer-events: none;
}
/* Onay kutusu satiri (satir 339). */
.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-strong);
}
.check-row > input[type="checkbox"] { width: 20px; height: 20px; margin: 0; flex: none; }
/* Sag oku olan gecis satiri (İleri ayarlar; satir 158-161). */
.adv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-strong);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
.adv-row:hover { background: var(--surface-2); }
.adv-row > span:first-child { flex: none; white-space: nowrap; }
.adv-right { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; }
.adv-sum {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chev { color: var(--text-dim); transition: transform 120ms ease; }

/* Katlanir bolum: baslik satiri .adv-row'dur, ok acikken doner. */
details.sec { display: grid; gap: 10px; }
/* Kapali bolumde gizli icerik de bir izgara ogesidir ve araligi alir:
   bolum 48 px'lik basligindan 10 px uzun kaliyordu (olculdu: 58 px) ve katli
   satirlarin arasi "İleri ayarlar" satirininkinin iki kati gorunuyordu. */
details.sec:not([open]) { gap: 0; }
details.sec > summary { list-style: none; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec[open] > summary .chev { transform: rotate(90deg); }
details.sec.sec-closing > summary .chev { transform: none; }
details.sec > .sec-body { display: grid; gap: 12px; }

/* --- Harita kabugu -------------------------------------------------- */
#map-shell { position: fixed; inset: 0; z-index: 0; }
#map-shell #map { width: 100%; height: 100%; }
.map-fallback { padding: 20px; min-height: 220px; color: var(--text-muted); font-size: 13px; }
.map-fallback p { margin: 0 0 8px; max-width: 62ch; }

/* app.js yuklenemediginde gorunen kutu: her seyin UZERINDE. */
.boot-banner {
  position: fixed;
  top: var(--gap); left: var(--gap); right: var(--gap);
  z-index: 900;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  font-size: 13px;
  /* GECIKMELI GORUNUR. Kutu HTML'de vardir ve app.js ilk isi olarak
     gizler; ama app.js "defer" ile MapLibre'den (CDN, ~800 KB) SONRA
     calisir, yani her acilista betik gelene kadar kirmizi bir uyari
     yanip sonuyordu (olculdu: ilk karede gorunur). Uc saniye gecikme
     normal acilisi kapsar; betik hic gelmezse uyari yine gorunur. */
  visibility: hidden;
  animation: boot-reveal 0s linear 3s forwards;
}
@keyframes boot-reveal { to { visibility: visible; } }


/* ====================================================================== *
 * MAPLIBRE: kure zemini, gunes sistemi (degismedi; performans sozu
 * assets_lib_test.go TestSolarSystemIsCompositorOnly ile kilitli)
 * ====================================================================== */

/* YILDIZLI ZEMIN: kure projeksiyonunda kurenin disi seffaftir, kabin
   arka plani gorunur. Referans arayuzdeki gorunum icin koyu radyal
   gradyan + kucuk yildiz noktalari (saf CSS, dis kaynak yok). */
#map-shell {
  /* Zemin gradyani SABITTIR ve burada kalir: hic oynamadigi icin bir kez
     raster edilir. Yildiz kubbesi #star-field icindeki canvas'tadir --
     gerekcesi asagida. */
  background-image:
    radial-gradient(ellipse at 50% 48%, #14171d 0%, #0b0d12 55%, #06070a 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: 50% 48%;
}

/* YILDIZ KUBBESI -- tek canvas, yalnizca hareket sirasinda cizim.
 *
 * TARIHCE, KISACA. Yildizlar once #map-shell'in background-position'i ile
 * suruldu (her karede tam ekran raster + backdrop-filter yeniden hesabi;
 * arayuz takiliyordu), sonra transform ile kaydirilan uc dosemeli katmana
 * tasindi (compositor'a indi, ama katmanlar 3000x1983 CSS px'e cikinca
 * rasterlenemeyip yatay bantlara bolundu ve surekli animasyon panelleri
 * geri donuse dusurdu -- kartin ici bombos kaliyordu).
 *
 * SIMDIKI TASARIM referansla (go.chargetrip.com) olculerek hizalandi:
 * orada ayri katman yok, gokyuzu 3B bir kubbe ve kamera kurenin cevresinde
 * yorungede; bosta gokyuzu bayt-bayt sabit. Burada da yildizlar sabit 3B
 * yonlerdir, kameranin enlem/boylam/donus/egiminden turetilen tabana
 * projekte edilip TEK bir canvas'a cizilir (app.js drawSky). Cizim YALNIZCA
 * harita "move" olayinda olur: bosta hic bir zamanlayici yoktur, dolayisiyla
 * backdrop-filter panelleriyle catisma da yoktur. Surukleme sirasindaki
 * gecici yeniden boyama, onceki paralaks tasariminda da vardi.
 *
 * Canvas gorunumle ayni boydadir (DPR ile carpilmis piksel yuzeyi); ne
 * transform ne animasyon tasir. */
#star-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
#star-sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  /* Sehir olceginde kubbe soner: kure tum gorunumu kaplar, yildiz
     gorunmez. */
  opacity: var(--space-depth, 1);
}

/* ---------------------------------------------------------------------- *
 * SAHNE: yalnizca yildizlar
 *
 * Gezegenler (#solar .orb) ve gunes ogesi (#solar .sun) KALDIRILDI.
 * Ikisi de kare basina DOM'a paralaks kaymasi yaziyordu; gunes ayrica
 * gorunumden tasan 700x700'luk, neredeyse tamamen SAYDAM bir compositor
 * katmaniydi ve halesi duz bir cizgiyle kirpiliyordu.
 *
 * Sahnede kalan: yildiz kubbesi (#star-field icindeki #star-sky tuvali;
 * gunes, ay ve gezegenler onun icinde cizilir). Kurenin gunese bakan
 * kenarindaki hilal (#globe-lit) urun sahibinin istegiyle KALDIRILDI:
 * kurenin USTUNDE isik yok, cevresinde de (bkz. app.js GLOBE_SKY). Geri
 * eklenmemeli.
 *
 * Katman sirasi: yildizlar (#star-field) < harita tuvali.
 * ---------------------------------------------------------------------- */

/* --- "Buradasin" noktasi --------------------------------------------- */
/* Rota pinlerinden KASITLI OLARAK farkli: damla degil daire, ve mavi.
   Baslangic/hedef pini bir ROTA UCUDUR, bu ise OLCULMUS bir konumdur;
   ikisi ayni gorunurse kullanici konumu rotanin parcasi sanir.
   Halka, olcumun kesin olmadigini sezdirir. */
.gps-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #2f7ef5;
  border: 3px solid #fff;
  box-shadow: 0 0 0 5px rgba(47,126,245,0.28), 0 1px 5px rgba(0,0,0,0.5);
}
/* Nabiz YALNIZCA transform/opacity kullanir: derleyici katmaninda
   calisir, her karede duzen hesabi tetiklemez. */
.gps-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(47,126,245,0.9);
  animation: gps-pulse 2s ease-out infinite;
}
@keyframes gps-pulse {
  0%   { transform: scale(1);   opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gps-dot::after { animation: none; opacity: 0.5; }
}



#map-shell #map, .maplibregl-map { width: 100%; height: 100%; background: transparent; }
/* ILK YUKLEMEDE TEK GECIS: tuval "load"a kadar saydamdir, arkada yildiz
   kubbesi durur; harita hazir olunca uzerinde soluklasarak acilir (app.js
   setupMap, map-ready). Aksi halde yildiz -> kapkara -> haritasiz
   noktalar -> harita diye dort kare titriyordu (olculdu). */
#map-shell #map { opacity: 0; transition: opacity 450ms ease; }
#map-shell.map-ready #map { opacity: 1; }
@media (prefers-reduced-motion: reduce) { #map-shell #map { transition: none; } }
.maplibregl-canvas { outline: none; }
/* HTML isaretcileri: MapLibre sarmalayicisi boyutsuzdur; icerik kendi
   boyutunu tasir. */
.maplibregl-marker { cursor: pointer; }

/* Harita balonlari (app.js mapCard): koyu tema, tek iskelet. Basta
   haritadaki isaretcinin rozeti tekrar eder (bacak, feribot, ucretli
   gecis, baslangic, varis, ara nokta, konum, menzil); sonra anahtar-deger
   satirlari, sarj cubugu, uyari, not ve eylemler. */
.maplibregl-popup-content {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font: inherit;
  font-size: 13px;
}
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--surface-2); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--surface-2); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface-2); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface-2); }
.maplibregl-popup-close-button {
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  padding: 0;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 18px; line-height: 1;
}
.maplibregl-popup-close-button:hover { color: var(--text-strong); background: var(--surface-3); }
/* Balon kucuk bir kalkisla gelir; konum MapLibre'nin satir ici
   transform'udur, bu yuzden hareket ICTEKI kutudadir. */
.rps-pop .maplibregl-popup-content { animation: mcIn .18s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes mcIn { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rps-pop .maplibregl-popup-content { animation: none; } }

.mc { display: grid; gap: 10px; min-width: 224px; }
/* Sag ustteki kapatma dugmesine yer: baslik onun altina kaymaz. */
.mc-head { display: flex; align-items: center; gap: 10px; padding-right: 26px; }
.mc-ico {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-3);
  color: var(--text-strong);
  font-size: 14px; font-weight: 700; line-height: 1;
}
.mc-ico .ui-ico { width: 16px; height: 16px; }
.mc-ico.leg { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-border); }
.mc-ico.ferry { background: rgba(120, 180, 255, 0.14); color: #a9cdff; box-shadow: inset 0 0 0 1px rgba(120, 180, 255, 0.45); font-size: 15px; }
.mc-ico.toll { background: #ff5d8f; color: #fff; font-size: 13px; }
/* Uc noktalar haritadaki isaretcilerin kucuk kopyasidir (.pt-org,
   .pt-dst, .pt-wp, .gps-dot). */
.mc-ico.org::before, .mc-ico.dst::before, .mc-ico.gps::before {
  content: "";
  width: 12px; height: 12px;
  border-radius: 50%;
}
.mc-ico.org::before { background: var(--bg); box-shadow: 0 0 0 3px var(--text-strong); }
.mc-ico.dst::before { background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
.mc-ico.gps::before { background: #2f7ef5; box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(47, 126, 245, 0.28); }
.mc-ico.wp { background: var(--bg); box-shadow: inset 0 0 0 2px var(--text-muted); font-size: 12px; }
.mc-ico.wp.charge { color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.mc-ico.band { background: var(--accent-soft); color: var(--accent); }
.mc-title { display: grid; gap: 1px; min-width: 0; }
.mc-title strong { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--text-strong); overflow-wrap: anywhere; }
.mc-title small { font-size: 12px; color: var(--text-muted); }
.mc-rows {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 16px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.mc-rows dt { color: var(--text-muted); white-space: nowrap; }
.mc-rows dd { margin: 0; text-align: right; color: var(--text-strong); font-weight: 500; font-variant-numeric: tabular-nums; }
.mc-rows dd.toll { color: #ff8db0; }
.mc-rows dd.dim { color: var(--text-dim); font-weight: 400; }
.mc-soc { display: grid; gap: 6px; }
.mc-soc-top { display: flex; justify-content: space-between; font-size: 13px; }
.mc-soc-top span { color: var(--text-muted); }
.mc-soc-top strong { font-weight: 500; color: var(--text-strong); font-variant-numeric: tabular-nums; }
/* Dolu kisim bitiste kalan sarj, soluk kisim bacakta harcanan pay. */
.mc-soc-bar { display: flex; height: 6px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.mc-soc-left { background: var(--accent); }
.mc-soc-used { background: var(--accent-border); }
.mc-warn {
  margin: 0;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  font-size: 12px;
  line-height: 1.4;
}
.mc-note { margin: 0; font-size: 12px; line-height: 1.4; color: var(--text-dim); }
.mc-acts { display: flex; flex-wrap: wrap; gap: 8px; }
/* Nokta menusu (app.js openPointMenu): eylemler alt alta, tam genislikte. */
.mc-acts.mc-menu { flex-direction: column; gap: 6px; }
.mc-menu .mc-btn { width: 100%; text-align: left; border-radius: var(--radius-sm); }
.mc-ico.pick::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.mc-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text-strong);
  font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.mc-btn:hover { border-color: var(--text-dim); }
.mc-btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-text); font-weight: 600; }
.mc-btn.primary:hover { background: var(--accent-hover); }
.mc-btn.danger { background: transparent; border-color: var(--danger-border); color: var(--danger-text); }
.mc-btn.danger:hover { background: var(--danger-bg); }

/* Atif: ODbL sarti, KALDIRILAMAZ. Sag alttaki 44 px araclarin solunda. */
.maplibregl-ctrl-bottom-right { right: 68px; }
.maplibregl-ctrl-attrib {
  background: var(--surface-attrib) !important;
  color: var(--text-dim) !important;
  font-size: 10px;
}
.maplibregl-ctrl-attrib a { color: var(--text-muted) !important; }

/* --- Harita araclari: 44 px yuvarlak (satir 35-45) ------------------ */
.map-tools {
  position: fixed;
  right: var(--gap);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-tools-top { top: var(--gap); }
.map-tools-bottom { bottom: var(--gap); }
.tool {
  width: 44px; height: 44px;
  padding: 0;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-chip);
  -webkit-backdrop-filter: var(--blur-chip);
  backdrop-filter: var(--blur-chip);
  color: var(--text-strong);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.map-tools-top .tool { font-size: 17px; }
.tool:hover, .tool[aria-expanded="true"] { background: var(--surface-3); }
.tool-group {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-chip);
  -webkit-backdrop-filter: var(--blur-chip);
  backdrop-filter: var(--blur-chip);
  overflow: hidden;
}
.tool-group .tool { border: 0; border-radius: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; font-size: 20px; }
.tool-group .tool + .tool { border-top: 1px solid var(--border); }
.tool-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }

/* Harita gorunumu menusu: arac sutununun SOLUNDA, sutunun altina hizali
   (yukari dogru acilir, ekranin altina tasmaz). Isaretcinin konumu
   .map-tools'tur (position: fixed). */
.style-menu {
  position: absolute;
  right: calc(100% + 10px);
  bottom: 0;
  width: min(272px, calc(100vw - 96px));
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur-panel);
  backdrop-filter: var(--blur-panel);
  transform-origin: right bottom;
}
@keyframes styleMenuIn { from { opacity: 0; transform: translateX(8px) scale(.96); } to { opacity: 1; transform: none; } }
.style-menu:not([hidden]) { animation: styleMenuIn .18s cubic-bezier(.2, .8, .2, 1) both; }
.style-menu-title { margin: 0 2px 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
.style-opt {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.style-swatch {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
  transition: box-shadow .15s ease, transform .15s ease;
}
.style-swatch svg { display: block; width: 100%; height: 100%; }
.style-opt:hover .style-swatch { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--text-dim); }
.style-opt[aria-checked="true"] .style-swatch { box-shadow: 0 0 0 2px var(--accent); }
.style-opt[aria-checked="true"] .style-name { color: var(--accent); }
.style-opt:focus-visible { outline: none; }
.style-opt:focus-visible .style-swatch { box-shadow: 0 0 0 2px var(--focus), 0 0 0 5px var(--accent-soft); }
@media (prefers-reduced-motion: reduce) {
  .style-menu:not([hidden]) { animation: none; }
  .style-swatch { transition: none; }
}
.tool-group .tool:hover { background: var(--surface-3); }

/* --- Bilgi paneli (☰): 320 px, araclarin solunda (satir 665) -------- */
.float-panel {
  position: fixed;
  top: var(--gap);
  right: 72px;
  z-index: 500;
  width: 320px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  /* Cam efekti. NOT: bu yuzeyin altinda SUREKLI hareket eden bir katman
   * OLMAMALI. Denendi ve olculdu: yildiz zemini surekli akarken
   * bulaniklik her karede yeniden hesaplaniyor, birlestirici paneli geri
   * donuse dusuruyor ve kartin ici hic boyanmiyordu. Yildizlar yalnizca
   * harita hareket edince kayar (paralaks); o gecici ve kabul edilebilir. */
  -webkit-backdrop-filter: var(--blur-panel);
  backdrop-filter: var(--blur-panel);
  overflow: hidden;
}
.fp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.fp-title { font-size: 15px; font-weight: 700; color: var(--text-strong); }
.fp-body {
  padding: 14px 16px;
  display: grid;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
  overflow-y: auto;
}
.fp-body p { margin: 0; }
.legend-group { display: grid; gap: 8px; }
.legend-items { display: grid; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); min-width: 0; }
.legend-item .label { min-width: 0; }
.swatch-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.swatch-line { width: 22px; height: 4px; border-radius: 2px; background: var(--accent); flex: none; }

/* --- Yuzen katman ve dock (satir 662) ------------------------------- */
.app {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  grid-template-columns: var(--dock-w) 1fr;
  /* Satir yuksekligi SINIRLI: dock max-height = 100% - 32 px olur. */
  grid-template-rows: minmax(0, 1fr);
  gap: var(--gap);
  padding: var(--gap);
  /* Katman tiklamalari GECIRIR; yalnizca paneller yakalar. */
  pointer-events: none;
}
.app > * { pointer-events: auto; }
.dock {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  width: var(--dock-w);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur-panel);
  backdrop-filter: var(--blur-panel);
  overflow: hidden;
}
/* Ayni hucrede duran gorunumler: tek seferde YALNIZCA BIRI gorunur
   (referans: sc-if showForm / showResults / showStation / showAdv).
   Alttaki gorunum display:none olur ki kisa bir panelin altindan
   "Planla" sizmasin. Oge DOM'da kalir; alanlari okunmaya devam eder. */
.dock-result { z-index: 2; grid-column: 1; }
.dock-place { z-index: 3; }
.dock-station { z-index: 3; }
.dock-adv { z-index: 4; }
body.plan-open .dock-left,
body.place-open .dock-left,
body.station-open .dock-left,
body.station-open .dock-result,
body.station-open .dock-place,
body.adv-open .dock-left,
body.adv-open .dock-result,
body.adv-open .dock-place,
body.adv-open .dock-station { display: none; }
/* GORUNUM GECISLERI (bizim). Her panel gorunur olunca yumusakca girer:
   display:none'dan cikan ogede CSS animasyonu yeniden baslar, yani
   formun geri donusu da (Ileri ayarlardan, sonuctan) ayni girisi yapar.
   Ayni panelin icerigi degistiginde (kip sekmeleri) panelin boyu eski
   boyundan yenisine akar ve icerik solarak gelir (app.js panelTransition).
   View Transitions KULLANILMAZ: gecis bitince bu giris animasyonu yeniden
   basliyor ve panel bir an KAYBOLUYORDU (olculdu: gecisin hemen ardindan
   opaklik 0, 250 ms'de geri) -- sekmelere her basista "zip zip zip". */
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dock:not([hidden]) { animation: panelIn .3s cubic-bezier(.2, .8, .2, 1) both; }

.dock > form.panel { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.dock-body {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dock-body::-webkit-scrollbar { width: 10px; }
.dock-body::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: var(--radius-pill);
  border: 3px solid transparent;
  background-clip: content-box;
}
/* Gorunum basligi (satir 177, 255, 299): 64 px, ‹ + baslik. */
.view-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  min-height: 64px;
}
.view-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--text-strong); text-align: center; }
.view-title.left { text-align: left; }

/* --- Form gorunumu (satir 89-171) ----------------------------------- */
.ghost-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.veh-row { flex: 0 0 auto; display: flex; align-items: center; border-bottom: 1px solid var(--border); }
.veh-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.veh-main:hover { background: rgba(255, 255, 255, 0.03); }
.veh-badge {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  flex: none;
}
.veh-text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.veh-text strong { font-size: 15px; font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.veh-text small { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Sehirler arasi rota icin cok kucuk batarya: uyari tonu = accent. */
.veh-text small.warn-text { color: var(--accent); }
.veh-cta {
  padding: 0 14px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-strong);
  flex: none;
}
.form-body { padding: 12px 16px 10px; display: grid; gap: 10px; align-content: start; }

/* Nereden / ara noktalar / Nereye: kesikli hat (satir 104-136). */
.stops { position: relative; display: grid; gap: 8px; }
.stops-line {
  position: absolute;
  left: 19px; top: 30px; bottom: 30px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--surface-4) 0 3px, transparent 3px 7px);
}
.wp-list { display: grid; gap: 8px; }
.wp-list:empty { display: none; }
.place-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 12px 0 10px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.place-row:focus-within { border-color: var(--accent); }
.place-icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.icon-origin { border: 2px solid var(--text-strong); }
.icon-origin > span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-strong); }
.icon-dest { background: var(--accent); }
.icon-dest > span { width: 6px; height: 6px; border-radius: 50%; background: var(--bg); }
/* Ara nokta (bizim): kesikli hattin renginde halka, icinde sira numarasi. */
.icon-wp { background: var(--bg); border: 2px solid var(--text-muted); color: var(--text-strong); font-size: 10px; font-weight: 700; }
.place-field { display: grid; flex: 1; min-width: 0; }
.place-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.place-head label { font-size: 11px; color: var(--text-dim); letter-spacing: .04em; }
.head-btns { display: flex; gap: 10px; }
/* Koordinat "düzenle" ve ara nokta "sil": yalnizca satira gelince gorunur. */
.edit-link {
  font: inherit;
  font-size: 11px;
  color: var(--text-dim);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease;
}
.place-row:hover .edit-link, .place-row:focus-within .edit-link,
.edit-link[aria-expanded="true"], .edit-link:focus-visible { opacity: 1; }
.edit-link:hover { color: var(--text-strong); }
.place-input {
  border: 0;
  background: transparent;
  color: var(--text-strong);
  font: inherit;
  font-size: 15px;
  padding: 0;
  outline: none;
  min-height: 24px;
  width: 100%;
}
.place-input[aria-invalid="true"] { color: var(--danger-text); }
/* Uzun yer adi satiri gorunmez (referansta yok); app.js durum icin yazar. */
.point-value { display: none !important; }
.place-set { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.coord-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-left: 42px; }
.coord-edit > label { display: grid; gap: 2px; font-size: 11px; color: var(--text-dim); letter-spacing: .04em; }
.coord-edit input {
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-strong);
  font: inherit;
  font-size: 13px;
  width: 100%;
}
.coord-edit input:focus { outline: none; border-color: var(--accent); }

/* Oneri listesi: kartin ALTINDA, akista (satir 115-119). Acilirken
   yumusakca girer; boyu satir sayisiyla akar (app.js fillSuggestList),
   tasma o sirada gizlenir. */
.ac-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  gap: 2px;
  position: relative;
  z-index: 2;
  overflow: hidden;
  animation: listIn .16s ease both;
}
.ac-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  min-width: 0;
}
.ac-item:hover, .ac-item.active { background: var(--surface-3); }
/* Ad onceliklidir: aciklama (tur · il · ulke) sagdan kirpilir. */
.ac-name { flex: 1 0 auto; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-detail { color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.ac-item.ac-status { color: var(--text-dim); font-size: 13px; cursor: default; }
/* Yeni sorgunun yaniti beklenirken eski oneriler soluklasir (Enter onlari
   secmez; app.js acEnterRow). */
.ac-list.stale .ac-item:not(.ac-status) { opacity: .55; transition: opacity .2s ease .15s; }
.ac-item.ac-status:hover, .ac-item.ac-status.active { background: transparent; }

.row-pills { display: flex; gap: 8px; }
.row-pills > * { flex: 1; min-width: 0; }

/* Kalkis sarji karti (satir 142-156). */
.soc-card { display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); }
.soc-head { display: flex; justify-content: space-between; align-items: baseline; }
.soc-head label, .soc-foot label { font-size: 13px; color: var(--text-muted); }
.soc-head strong { font-size: 17px; color: var(--text-strong); font-weight: 600; }
.soc-card input[type="range"] { width: 100%; height: 24px; margin: 0; }
.soc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.soc-foot .seg { min-height: 36px; }

/* Arac / Rota ayarlari (bizim; Chargetrip'in "Vehicle settings" / "Route
   settings" listesi). Katli bolumdur: kapaliyken Ileri ayarlar satiri gibi
   tek satir ve ozet, acilinca altinda kart. Etiket solda, kontrol sagda,
   satir 42 px. Kart icinde satirlar sik durur (katli govdenin 12 px'i
   degil). */
details.sec > .sec-body.opt-card { gap: 2px; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; }
.opt-label { font-size: 13.5px; color: var(--text); min-width: 0; }
.opt-row .seg-row.cols-2 { width: 176px; flex: none; }
.opt-row .seg { min-height: 32px; font-size: 12.5px; padding: 0 8px; }
.opt-field { width: 112px; flex: none; }
.opt-field .field-input { min-height: 36px; font-size: 14px; text-align: right; padding: 0 34px 0 10px; }
.opt-field .field-unit { right: 12px; font-size: 12px; }
.opt-sub { display: flex; align-items: center; gap: 12px; padding: 0 0 6px; }
.opt-sub input[type="range"] { flex: 1; min-width: 0; }
.opt-sub strong { font-size: 13px; color: var(--text-strong); font-weight: 600; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.opt-card #dep-time { min-height: 40px; font-size: 14px; margin-bottom: 6px; }
.opt-card .note { padding-top: 4px; }
/* Anahtar: gizli select'in iki secenegi arasinda gecer (app.js buildSwitches). */
.switch {
  position: relative;
  width: 42px; height: 24px;
  flex: none;
  padding: 0;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-3);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform .2s, background .2s;
}
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--accent-text); }
/* Yolcu sayaci. */
.stepper { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.step-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-strong);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.step-btn:hover:not(:disabled) { background: var(--surface-3); }
.step-btn:disabled { color: var(--text-dim); cursor: default; opacity: .6; }
.step-val { min-width: 22px; text-align: center; font-size: 15px; font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums; }

/* Ayak: hata + Planla (satir 164-169). */
.dock-foot { flex: 0 0 auto; padding: 10px 16px 14px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.form-errors { margin: 0; font-size: 13px; color: var(--danger-text); display: grid; gap: 4px; }
.form-errors ul { margin: 0; padding-left: 18px; }
.form-errors code { font-size: 12px; opacity: .85; }
.form-errors details { display: grid; gap: 4px; }
.form-errors summary { cursor: pointer; font-size: 12px; color: var(--text-dim); list-style: none; }
.form-errors summary::-webkit-details-marker { display: none; }
.form-errors .err-body { font-size: 12px; color: var(--text-muted); display: grid; gap: 4px; }
.form-errors .err-body dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; }
.form-errors .err-body dt { color: var(--text-dim); }
.form-errors .err-body dd { margin: 0; color: var(--text); }
/* .err-note, hata basliginin altindaki TURKCE aciklamadir (uygulanamazlik
   tanisi, ag hatasi notu). Sunucunun Ingilizce metni buraya GIRMEZ;
   arayuz cumleyi kararli koddan kendisi kurar. */
.form-errors .err-note { font-size: 12px; color: var(--text-muted); }
/* .raw, sunucunun KENDI (Ingilizce ya da makine) degeridir. Arayuzun
   Turkce satirlarindan ayrilsin diye tek aralikli ve soluk yazilir. */
.form-errors .err-body dd.raw {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
.btn-plan {
  min-height: 52px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .2s;
}
.btn-plan:disabled { background: var(--surface-3); color: var(--text-dim); cursor: default; }
/* BILINCLI SAPMA: referans (satir 166) koyu halka + #161617 ust kenar
   yazar; ama planlama sirasinda dugme zemini #2c2c30'a duser (satir 726)
   ve koyu dondurucu gorunmez olur. Halka beyazin %18'i, ust kenar metin
   rengidir -- olcu ve sure referansla ayni. */
.spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: currentColor;
  animation: spin .8s linear infinite;
  display: inline-block;
}
.model-state { margin: 0; font-size: 12px; color: var(--text-dim); }
.model-state.ok { color: var(--ok); }
.model-state.bad { color: var(--danger-text); }

/* --- Ileri ayarlar (satir 297-345) ---------------------------------- */
.adv-body { padding: 8px 16px 24px; display: grid; gap: 22px; align-content: start; }
.adv-group { display: grid; gap: 10px; }
.adv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.adv-head strong { color: var(--text-strong); font-size: 13px; font-weight: 700; white-space: nowrap; }
.adv-body input[type="range"] { width: 100%; height: 32px; margin: 0; }
.adv-body select.field-input { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat; }
.cols-2.gap6 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
/* Arac ayrintilari: etiket solda soluk, kontrol sagda dar. */
.kv-fields { display: grid; gap: 6px; }
.kv-fields > label { display: grid; grid-template-columns: minmax(0, 1fr) 128px; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.kv-fields input, .kv-fields select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-strong);
  font: inherit;
  font-size: 14px;
  text-align: right;
  color-scheme: dark;
}
.kv-fields select { text-align: left; }
.kv-fields input:focus, .kv-fields select:focus { outline: none; border-color: var(--accent); }
.kv-fields input[aria-invalid="true"] { border-color: var(--danger-border); }
.adv-body .seg-row.wrap .seg { min-height: 36px; }

/* --- Rota (plan sonucu; satir 175-250) ------------------------------ */
.results-body { padding: 16px; }
#res-body { display: grid; gap: 18px; align-content: start; }
.res-head { display: grid; gap: 4px; }
.res-route { font-size: 13px; color: var(--text-muted); }
.res-total-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.res-total { font-size: 32px; font-weight: 600; color: var(--text-strong); letter-spacing: -.02em; line-height: 1.1; }
.res-sub { font-size: 15px; color: var(--text-muted); }
.res-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.res-stat { padding: 12px; border-radius: var(--radius); background: var(--surface-2); display: grid; gap: 2px; min-width: 0; }
.res-stat .k { font-size: 11px; color: var(--text-dim); }
.res-stat .v { font-size: 19px; color: var(--text-strong); font-weight: 600; overflow-wrap: anywhere; }
.res-stat.unknown .v { color: var(--text-dim); }
/* Ikinci sira (tuketim / ucret / CO2): ayni kart, alt satirda ipucu. Ust
   siraya #res-body'nin 18 px araligi yerine kart araligiyla (8 px) baglanir. */
#res-summary-2 { margin-top: -10px; }
.res-stats-2 .res-stat .v { font-size: 17px; }
.res-stat .h { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-stat.emph .v { color: var(--accent); }
/* Guzergah profili (bizim). */
.prof-tabs .seg { min-height: 28px; font-size: 12px; padding: 0 10px; }
.prof-tabs .seg:disabled { opacity: .45; cursor: default; }
.prof-chart { display: grid; gap: 6px; }
.prof-plot { position: relative; cursor: crosshair; touch-action: pan-y; border-radius: 6px; }
.prof-plot svg { display: block; width: 100%; height: 110px; overflow: visible; }
.prof-plot:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.prof-dot {
  position: absolute;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  pointer-events: none;
}
.prof-y { position: absolute; left: 0; font-size: 10.5px; color: var(--text-dim); pointer-events: none; background: rgba(22, 22, 23, 0.6); padding: 0 3px; border-radius: 3px; }
.prof-ymax { top: 0; }
.prof-ymin { bottom: 0; }
/* Okuma satiri: her deger kendi genisliginde (esit sutun "-142 Wh/km"yi
   kesiyordu); sigmazsa alt satira kayar. */
.prof-read { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 10px; margin: 0; min-height: 34px; }
.prof-read > div { display: grid; gap: 1px; }
.prof-read dt { font-size: 10.5px; color: var(--text-dim); white-space: nowrap; }
.prof-read dd { margin: 0; font-size: 12.5px; color: var(--text-strong); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Haritadaki gezinme isareti: profilin uzerindeki nokta. */
.prof-marker {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--text-strong);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
/* Iklim raporu (bizim). */
.climate { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.cl-verdict { display: grid; gap: 2px; padding: 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.cl-verdict.good { border-color: rgba(67, 184, 131, 0.35); background: rgba(67, 184, 131, 0.08); }
.cl-verdict.bad { border-color: var(--accent-border); background: var(--accent-faint); }
.cl-verdict strong { font-size: 14px; color: var(--text-strong); font-weight: 600; }
.cl-verdict p { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.cl-bars, .cl-block, .cl-bar-row { display: grid; gap: 6px; }
.cl-bars { gap: 10px; }
.cl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; color: var(--text-muted); }
.cl-head strong { color: var(--text-strong); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cl-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.cl-bar > i, .cl-mix-bar > i { display: block; height: 100%; }
.cl-bar > i { border-radius: 4px; }
.cl-ev, .cl-ren { background: var(--ok); }
.cl-ice { background: var(--text-dim); }
.cl-nuc { background: var(--mix-nuclear); }
.cl-fos { background: var(--mix-fossil); }
.cl-mix-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-3); }
.cl-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-muted); }
.cl-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.cl-sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.cl-scale { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--ok), var(--accent) 50%, var(--danger-text)); }
.cl-scale > i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--text-strong); box-shadow: 0 0 0 2px var(--bg); }
.res-sec { display: grid; gap: 8px; }
/* TEK SUTUNLU IZGARALAR KABI ASAMAZ. Izgara ogeleri varsayilan olarak
   icerik kadar genis olmak ister (min-width:auto); kirpilmamasi gereken
   nowrap bir metin (uyari ozeti, uzun istasyon adi) sutunu 380 px'lik
   dock'un disina buyutuyordu -- olculdu: sonuc govdesi 412 px. */
#res-body, .form-body, .adv-body, .ds-body, .fp-body, .summary-inner,
.res-sec, .ds-group, .adv-group, .trip, .stops, .wp-list, .legend-group,
details.sec, details.sec > .sec-body, .soc-chart, .soc-card, .res-head, .place-field { grid-template-columns: minmax(0, 1fr); }
/* Uyarilar (bizim): kehribar tonlu satir, acilinca maddeler. */
details.warnings.has-warn > summary { border-color: var(--accent-border); background: var(--accent-faint); }
details.warnings > .sec-body { gap: 0; padding: 0 2px; }
.warn-item { display: grid; gap: 3px; padding: 8px 0; border-top: 1px solid var(--border); }
.warn-item:first-child { border-top: 0; padding-top: 0; }
.warn-item strong { font-size: 13px; font-weight: 500; color: var(--text-strong); }
.warn-item p { margin: 0; font-size: 12.5px; color: var(--text-muted); }
/* SoC grafigi (satir 196-204). */
.soc-chart { display: grid; gap: 8px; }
.soc-chart svg { display: block; width: 100%; height: 90px; overflow: visible; }
.soc-axis-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); }
/* Yolculuk zaman cizelgesi (satir 206-242, renderVals 676-690). */
.trip { display: grid; }
.tr {
  display: flex;
  gap: 12px;
  align-items: stretch;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}
.tr.is-stop { cursor: pointer; }
.tr-rail { display: flex; flex-direction: column; align-items: center; align-self: stretch; width: 20px; flex: none; }
.tr-line { flex: 1; width: 2px; background: var(--surface-3); min-height: 10px; }
.tr-dot { width: 20px; height: 20px; border-radius: 50%; flex: none; }
.tr-dot.origin { background: var(--bg); border: 3px solid var(--text-strong); }
.tr-dot.stop { background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.tr-dot.dest { background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--accent); }
.tr-dot.wp { background: var(--bg); border: 3px solid var(--text-muted); }
.tr-dot.drive { width: 2px; height: 0; }
.tr-drive { flex: 1; font-size: 12px; color: var(--text-dim); padding: 2px 0 10px; }
/* Planlayicinin kurdugu vapur gecisi (app.js tripFerry): haritadaki
   kesikli cizgi ve ⛴ isaretcisiyle ayni mavi. */
.tr-drive.tr-ferry { display: flex; align-items: center; gap: 6px; color: #a9cdff; }
.tr-ferry-ico { flex: none; font-size: 13px; line-height: 1; }
.tr-body { display: grid; gap: 8px; flex: 1; min-width: 0; padding: 0 0 14px; }
.tr-head { display: flex; justify-content: space-between; gap: 10px; }
.tr-text { display: grid; gap: 1px; min-width: 0; }
.tr-title { font-size: 14px; color: var(--text-strong); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-sub { font-size: 12.5px; color: var(--text-muted); }
.tr-right { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.tr-right.accent { color: var(--accent); font-weight: 600; }
.tr-soc { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tr-soc .to { color: var(--text-strong); }
.tr-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); position: relative; overflow: hidden; }
.tr-bar-base { position: absolute; top: 0; bottom: 0; left: 0; background: var(--surface-4); border-radius: 3px; }
.tr-bar-fill { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; }
.tr-wait { font-size: 12px; color: var(--accent); }
/* Ozet sayfasindaki buyuk varyant (satir 407-427). */
.trip-lg .tr { gap: 14px; }
.trip-lg .tr-line { min-height: 14px; }
.trip-lg .tr-drive { font-size: 13px; padding: 2px 0 14px; }
.trip-lg .tr-body { gap: 8px; padding-bottom: 18px; }
.trip-lg .tr-head { gap: 12px; }
.trip-lg .tr-text { gap: 2px; }
.trip-lg .tr-title { font-size: 15px; white-space: normal; }
.trip-lg .tr-sub { font-size: 13px; }
.res-actions { display: grid; gap: 8px; }
.btn-gmaps { width: 100%; }
/* Denetim tablolari (bizim). */
.tablewrap { overflow-x: auto; background: var(--surface-2); border-radius: var(--radius); }
table.data { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 12px; }
table.data caption { text-align: left; padding: 8px 10px; color: var(--text-dim); font-size: 12px; }
table.data th, table.data td { border-bottom: 1px solid var(--border); padding: 6px 8px; text-align: right; white-space: nowrap; vertical-align: top; }
table.data th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); font-weight: 500; }
table.data th:first-child, table.data td:first-child, table.data th.left, table.data td.left { text-align: left; white-space: normal; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.warnish { color: var(--accent); font-weight: 600; }
.splitbar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; min-width: 90px; margin-top: 3px; background: var(--surface-3); }
.splitbar i { display: block; height: 100%; }
.splitbar .s-traction { background: var(--accent); }
.splitbar .s-aux { background: var(--text-muted); }
.splitbar .s-regen { background: var(--ok); }
#res-stops-box, #res-diag-box { display: grid; gap: 8px; }
#res-stops-box > summary, #res-diag-box > summary { cursor: pointer; font-size: 13px; color: var(--text-muted); list-style: none; }
#res-stops-box > summary::-webkit-details-marker, #res-diag-box > summary::-webkit-details-marker { display: none; }
#res-stops-box > summary::before, #res-diag-box > summary::before { content: "› "; color: var(--text-dim); }
#res-stops-box[open] > summary::before, #res-diag-box[open] > summary::before { content: "⌄ "; }
pre.code { background: var(--surface-2); border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; margin: 0; max-height: 320px; font-size: 12px; }

/* --- Istasyon / durak ayrintisi (satir 253-293) --------------------- */
.ds-head .chip-text { display: grid; min-width: 0; flex: 1; }
.ds-head .chip-text strong { font-weight: 700; }
.ds-head .chip-text small { white-space: normal; overflow: visible; }
.chip-text strong { font-size: 15px; font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-text small { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-own { color: var(--accent); }
.ds-body { padding: 16px; display: grid; gap: 16px; align-content: start; }
.ds-group { display: grid; gap: 8px; }
.ds-val { font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ds-stop { display: grid; gap: 12px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--accent-border); background: var(--accent-faint); }
.ds-stop-soc { display: flex; align-items: center; gap: 12px; }
.ds-stop-soc strong { font-size: 28px; color: var(--text-strong); font-weight: 600; letter-spacing: -.02em; }
.ds-stop-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); position: relative; overflow: hidden; }
.ds-stop-bar span { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 13px; color: var(--text-muted); }
.kv-grid strong { color: var(--text-strong); text-align: right; font-weight: 500; }
.kv-grid strong.accent { color: var(--accent); }
.ds-conn { padding: 12px; border-radius: var(--radius); background: var(--surface-2); display: grid; gap: 2px; }
.ds-conn-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ds-conn-top strong { font-size: 13px; font-weight: 500; color: var(--text-strong); }
.ds-conn-count { font-size: 11px; color: var(--text-muted); background: var(--surface-3); border-radius: var(--radius-pill); padding: 1px 8px; }
.ds-conn-kw { font-size: 13px; color: var(--text-muted); }
.ds-conn .st-Available { color: var(--ok); }
.ds-conn .st-Occupied, .ds-conn .st-Reserved { color: var(--accent); }
.ds-conn .st-Unknown { color: var(--text-dim); }
.ds-conn .st-Faulted, .ds-conn .st-Unavailable { color: var(--danger-text); }
.ds-actions { display: grid; gap: 8px; }

/* --- Arac secici (satir 350-378, renderVals 666-667) ---------------- */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--scrim);
}
.modal {
  width: 440px;
  max-width: 100%;
  height: min(640px, 100%);
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-modal);
}
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); min-height: 60px; }
.modal-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-search-wrap { padding: 12px 16px 0; }
.modal-search { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.modal-search:focus-within { border-color: var(--accent); }
.search-icon { color: var(--text-dim); }
.modal-search input { flex: 1; border: 0; background: transparent; color: var(--text-strong); font: inherit; font-size: 15px; outline: none; min-height: 24px; min-width: 0; }
.modal-market { margin: 10px 16px 0; min-height: 44px; }
.modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px 12px; display: grid; gap: 2px; align-content: start; }
/* Satirlar bir kapsayicinin icinde durur (liste yenilenirken tek dugum
   degisir); bosluk kapsayicida olmali, yoksa satirlar birbirine deger. */
.modal-rows { display: grid; gap: 2px; }
.modal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-strong);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.modal-row:hover { background: var(--surface-2); }
.mr-badge { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--accent); flex: none; }
.mr-name { display: grid; flex: 1; min-width: 0; gap: 1px; }
.mr-name strong { font-size: 15px; font-weight: 400; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-name small { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-chev { color: var(--text-dim); flex: none; }
.mr-warn { font-size: 11px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--accent-faint); color: var(--accent); border: 1px solid var(--accent-border); flex: none; }
.modal-body .hint, .modal-body .note { padding: 10px 12px; }
.modal-foot { margin: 0; padding: 10px 16px 14px; font-size: 12px; color: var(--text-dim); border-top: 1px solid var(--border); }

/* --- Harita isaretcileri (renderVals pin(), satir 528-533) ---------- */
.pt-org, .pt-dst {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--text-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: grab;
}
.pt-dst { background: var(--accent); border-color: var(--bg); }
.pt-wp {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text-muted);
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: grab;
}
.pt-org:active, .pt-dst:active, .pt-wp:active { cursor: grabbing; }
/* Feribot isaretcisi: durak pill'inin kucuk kardesi; ucretli ve sefer
   saatine bagli gecisi haritada gosterir. */
.ferry-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 5px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid rgba(120, 180, 255, 0.45);
  color: var(--text-strong);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: border-color .15s ease, background-color .15s ease;
}
.ferry-pill .ico { font-size: 13px; line-height: 1; }
.ferry-pill:hover { border-color: rgba(120, 180, 255, 0.9); background: #1d2430; }
/* Ucretli gecis isaretcisi (bizim): otoyoldan ayri ucretli kopru ve
   tuneller (Osmangazi, Avrasya). Ucretli kesimlerin pembe cizgisiyle ayni
   ton (app.js TOLL_COLOR). Rota kendini cizerken bekler; gizleme
   .stop-pill.wait gibi filter iledir (MapLibre satir ici opacity yazar). */
.toll-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 4px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid rgba(255, 93, 143, 0.6);
  color: var(--text-strong);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: filter .3s cubic-bezier(.2, .8, .2, 1), border-color .15s ease, background-color .15s ease;
}
.toll-pill:hover { border-color: #ff5d8f; background: #2a1820; }
.toll-pill .ico {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #ff5d8f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.toll-pill.wait { filter: opacity(0); pointer-events: none; }

.stop-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 3px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-strong);
  font: 600 12px var(--font);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  white-space: nowrap;
}
.stop-pill:hover { border-color: var(--accent-border); }
.stop-pill .n {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  font-weight: 700;
}
body.map-light .stop-pill { border-color: rgba(0, 0, 0, 0.25); }
/* Rota kendini cizerken durak pili bekler (app.js animateRouteDraw) ve
   cizgi ona ulasinca yerine oturur: pil solarak gelir, numarali disk
   kucukten buyur.
   Pil isaretcinin ogesidir ve MapLibre ona SATIR ICI transform (konum) ve
   opacity (kure arkasinda kalma) yazar; ikisi de sinif kuralini ezer.
   Olculdu: bekleyen pil satir ici "opacity: 1" ile gorunur kaliyordu, pile
   konan transform gecisi ise konumlamaya uygulaniyor ve harita kayarken
   duraklar rotanin 0,26 sn gerisinden geliyordu (240 px kaydirmadan 60 ms
   sonra pil hic kimildamamisti). Bu yuzden gizleme filter ile, buyume
   icteki diskte yapilir. */
.stop-pill { transition: filter .26s cubic-bezier(.2, .8, .2, 1); }
.stop-pill .n { transition: transform .34s cubic-bezier(.2, .8, .2, 1); }
.stop-pill.wait { filter: opacity(0); pointer-events: none; }
.stop-pill.wait .n { transform: scale(.4); }
/* KISA hal (app.js declutterStopPills): birbirine binen piller yalnizca
   numara diskini gosterir; sure panelde ve zaman cizelgesinde okunur. */
.stop-pill.compact { gap: 0; padding: 3px; }
.stop-pill.compact > span:not(.n) { display: none; }
.ferry-pill.compact, .toll-pill.compact { gap: 0; padding: 3px 5px; }
.toll-pill.compact { padding: 3px; }
.ferry-pill.compact > span:not(.ico), .toll-pill.compact > span:not(.ico) { display: none; }
/* Fareyle uzerine gelinen ya da klavyeyle odaklanilan isaretci one cikar:
   ust uste binen iki pilden alttakine de ulasilir. Balon her zaman en
   ustte kalir. */
.maplibregl-marker:hover, .maplibregl-marker:focus-visible { z-index: 2; }
.maplibregl-popup { z-index: 3; }
/* Alternatif guzergah etiketleri secili rota cizilene kadar gizlidir.
   Etiket isaretcinin (.alt-pin) ICINDEDIR: MapLibre isaretci ogesine
   satir ici transform ve opacity yazar (bkz. .stop-pill), ictekine
   dokunmaz. Arkadan gelen secenekler kendini cizerken (app.js
   animateAltsEnter) etiket, cizgi ona ulasinca asagidan kalkip yerine
   oturur. */
.alt-label {
  transform-origin: 50% 100%;
  transition: opacity .32s ease, transform .42s cubic-bezier(.2, .8, .2, 1);
}
body.alts-hidden .alt-pin, .alt-pin.wait { pointer-events: none; }
body.alts-hidden .alt-label { opacity: 0; }
.alt-pin.wait .alt-label { opacity: 0; transform: translateY(8px) scale(.82); }
@media (prefers-reduced-motion: reduce) { .stop-pill, .stop-pill .n, .alt-label { transition: none; } }

/* --- Guzergah secenekleri (alternatif planlar) ---------------------- */
/* Panelde satir basina bir plan: solda tur ve ozet, sagda sure ve en
   hizliya gore fark. Secili satir durak karti gibi kehribar zeminlidir. */
.res-alts { display: grid; gap: 6px; }
.res-alt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-strong);
  font: inherit; text-align: left; cursor: pointer;
}
.res-alt:hover { border-color: var(--text-dim); }
.res-alt[aria-pressed="true"] { border-color: var(--accent-border); background: var(--accent-faint); }
.res-alt-main { display: grid; gap: 2px; min-width: 0; }
.res-alt-main strong { font-size: 14px; font-weight: 600; }
.res-alt-main small, .res-alt-time small { font-size: 12px; color: var(--text-muted); }
.res-alt-time { display: grid; gap: 2px; text-align: right; flex: none; }
.res-alt-time strong { font-size: 15px; font-weight: 600; }
/* Harita etiketi: guzergahin uzerinde sure + tur; dokununca o plan
   secilir. Secili olanin suresi kehribar, digerleri gri. */
.alt-label {
  display: grid; gap: 0;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-strong);
  font: 600 12px var(--font);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}
.alt-label span { font-size: 10px; font-weight: 500; color: var(--text-muted); }
.alt-label.is-sel { border-color: var(--accent); }
.alt-label.is-sel strong { color: var(--accent); }
/* Fareyle uzerine gelinen secenek (app.js setAltHover): etiketi ve
   cizgisi birlikte belirginlesir. */
.alt-pin.is-hover .alt-label { border-color: #dedbd5; background: #202022; }
.alt-pin.is-hover .alt-label.is-sel { border-color: var(--accent); }
body.map-light .alt-label { border-color: rgba(0, 0, 0, 0.25); }
/* KISA hal (app.js placeAltLabels): kalabalik gorunumde etikete yer
   kalmazsa yalnizca sure gorunur; tur listede ve renkte okunur. */
.alt-pin.compact .alt-label { padding: 3px 8px; }
.alt-pin.compact .alt-label span { display: none; }

/* --- Harita bildirimleri ------------------------------------------- */
/* GOVDE SEVIYESINDE ve .app'in (400) USTUNDE. */
.map-notices {
  position: fixed;
  left: calc(var(--dock-w) + var(--gap) * 2);
  bottom: var(--gap);
  right: 76px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.map-notice {
  align-self: flex-start;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-chip);
  color: var(--text);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: var(--blur-chip);
  backdrop-filter: var(--blur-chip);
  pointer-events: auto;
}
.map-notice.info { color: var(--text-muted); }
.map-notice-action {
  margin-left: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-strong);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 1px 9px;
  cursor: pointer;
}
.map-notice-action:hover { background: var(--surface-3); }

/* --- Yolculuk ozeti sayfasi (satir 382-433) ------------------------- */
.summary-page {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: var(--bg);
  overflow-y: auto;
  animation: rise .25s ease;
}
.summary-inner { max-width: 720px; margin: 0 auto; padding: 24px 20px 48px; display: grid; gap: 28px; }
.summary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-actions { display: flex; gap: 8px; }
.summary-title { display: grid; gap: 6px; }
/* Paylasim satiri: durum metni ve kopyalanabilir baglanti (app.js
   shareNote). Ikisi de gizliyken satir yer kaplamaz. */
.share-row { display: grid; gap: 8px; }
.share-row:not(:has(:not([hidden]))) { display: none; }
.share-note { margin: 0; }
.share-link {
  width: 100%; min-width: 0; height: 40px; padding: 0 12px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-strong);
  font: 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.share-link:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.summary-title h1 { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -.02em; color: var(--text-strong); line-height: 1.15; text-wrap: pretty; }
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.summary-card { padding: 14px; border-radius: var(--radius-md); background: var(--surface-2); display: grid; gap: 2px; }
.summary-card .k { font-size: 11px; color: var(--text-dim); }
.summary-card .v { font-size: 22px; color: var(--text-strong); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  .dock:not([hidden]), .summary-page, .explore-list { animation: none; }
  .mode-row > .mode-ind { transition: none; }
}

/* --- Yazdirma: yalnizca yolculuk ozeti, acik zemin ------------------ */
@media print {
  :root {
    --bg: #ffffff; --surface-2: #f3f3f2; --surface-3: #e6e6e4; --surface-4: #c9c9c6;
    --text: #1a1a1a; --text-strong: #000; --text-muted: #444; --text-dim: #666;
    --accent: #b9820f; --accent-text: #fff; --border: rgba(0, 0, 0, 0.14);
  }
  body { overflow: visible; }
  #map-shell, main.app, .map-tools, #info-panel, #veh-modal, #m-trip, #m-route-pill, #m-map-back, #map-notices, #boot-error { display: none !important; }
  .summary-page { position: static; overflow: visible; animation: none; }
  .summary-head, .share-row { display: none; }
}

/* --- Segment gorunumlu onay kutusu (konektor tipleri) ---------------- *
 * Kutu gorunmez ama DOM'da ve odaklanabilir kalir; etiket segStyle
 * bicimini tasir, secili hali :has(:checked) ile boyanir.             */
.seg-check { position: relative; display: inline-grid; place-items: center; min-height: 36px; }
.seg-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.seg:has(> .seg-input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.seg:has(> .seg-input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------------------------------------------------------------------- *
 * MENZIL ALANI (Range)
 *
 * Ayni form iki soruyu cevaplar. Kip degisimi YENI BIR SAYFA ACMAZ,
 * yalnizca gereksiz alanlari kaldirir: menzilin hedefi ve ara noktasi
 * yoktur, ama araci ve kalkis sarji rotayla AYNIDIR. Iki ayri form
 * yapilsaydi kullanici araci iki kez secerdi.
 * ---------------------------------------------------------------------- */
/* Ust bosluk formun ritmiyle AYNI (12px): arac satirinin alt kenarligina
   yapisik durmasin. Alt bosluk yok -- form-body'nin kendi 12px ust
   boslugu var; ikisi toplansa pill'lerin alti ustunden iki kat acilirdi. */
.mode-row { padding: 12px 16px 0; }
/* KAYAN SECIM GOSTERGESI (bizim): secili sekmenin kehribar zemini
   sekmeden sekmeye KAYAR (Chargetrip'teki gibi); sekmenin kendi zemini
   saydamdir. Gosterge ilk sekmenin hucresinde durur ve kipe gore
   (govde sinifi) kaydirilir: 100% kendi genisligi, 6 px izgara araligi.
   Gecis ilk kip yazildiktan SONRA acilir (.ready): acilista kayma olmaz. */
.mode-row { position: relative; }
.mode-row > .mode-ind {
  grid-row: 1;
  grid-column: 1;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  pointer-events: none;
  transform: translateX(calc(100% + 6px));
}
.mode-row.ready > .mode-ind { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
body.mode-stations .mode-row > .mode-ind { transform: none; }
body.mode-range .mode-row > .mode-ind { transform: translateX(calc(200% + 12px)); }
.mode-row > .seg { grid-row: 1; position: relative; z-index: 1; }
.mode-row > .seg[aria-pressed="true"] { background: transparent; border-color: transparent; }
.mode-row > #mode-stations { grid-column: 1; }
.mode-row > #mode-route { grid-column: 2; }
.mode-row > #mode-range { grid-column: 3; }

/* ISTASYONLAR KIPI (bizim): formda yalnizca konum arama durur; rota ve
   menzil alanlari, Ileri ayarlar ve Planla gizlenir. Telefondaki
   "Haritaya bak" satiri kalir: istasyonlara bakmanin yolu haritadir. */
.stations-only { display: none; }
body.mode-stations .stations-only { display: grid; }
body.mode-stations .form-body > :not(.stations-only):not(.m-only),
body.mode-stations #plan-form > .dock-foot { display: none; }
.explore {
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color .15s ease;
}
.explore:focus-within { border-color: var(--accent-border); }
.explore-box { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; }
.explore-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round; transition: stroke .15s ease; }
.explore:focus-within .explore-ico { stroke: var(--accent); }
/* Arama surerken ikon nabiz atar; onceki sonuclar yerinde kalir. */
@keyframes exBusy { 50% { opacity: .3; } }
.explore.busy .explore-ico { animation: exBusy .9s ease-in-out infinite; }
.explore-input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text-strong); font: inherit; font-size: 15px; outline: none; }
@keyframes listIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* Liste boyu app.js exploreShow'da eski boyundan yenisine akar; tasma
   o sirada gizlenir. */
.explore-list { list-style: none; margin: 0; padding: 4px 0 6px; border-top: 1px solid var(--border); display: grid; overflow: hidden; animation: listIn .16s ease both; }
.ex-item { display: flex; align-items: center; gap: 12px; padding: 9px 14px; cursor: pointer; transition: background-color .12s ease; }
.ex-item:hover, .ex-item.active { background: var(--surface-3); }
.ex-ico { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; flex: none; color: var(--text); }
.ex-item:hover .ex-ico, .ex-item.active .ex-ico { background: var(--surface-4); }
.ex-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ex-text { display: grid; gap: 1px; min-width: 0; }
.ex-title { font-size: 14px; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-locate .ex-title { color: var(--accent); }
.ex-sub { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-status { padding: 10px 14px; font-size: 13px; color: var(--text-dim); }
.ex-head { padding: 10px 14px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.ex-head:first-child { padding-top: 6px; }
/* Yeni sorgunun yaniti beklenirken eski oneriler soluklasir; gecikme
   yuzunden hizli yanitta hic gorunmez. */
.explore.busy .ex-item:not(.ex-locate) { opacity: .55; transition: opacity .2s ease .15s; }
/* Yeni gelen oneri satiri (rota formu ve Istasyonlar kipi; app.js
   fillSuggestList) sirayla (--i) kayarak girer. Dolgu "backwards": giris
   bitince satirin kendi opakligi gecerli kalir (soluklasma calissin). */
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.row-in { animation: rowIn .26s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 30ms); }
/* Hareket azaltma: kurallar yukaridakilerden SONRA gelmeli (medya sorgusu
   ozgulluk eklemez; once gelen kural sonrakine yenilir). */
@media (prefers-reduced-motion: reduce) {
  .explore-list, .ac-list, .row-in, .explore.busy .explore-ico { animation: none; }
}
.ex-sep { height: 1px; background: var(--border); margin: 4px 14px; }
/* Yer karti (dock-place): formun yerine gecen kucuk kart. */
.pc-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 0 16px; }
.pc-ico { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--text); flex: none; }
.pc-ico svg, .pc-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pc-gap { flex: 1; }
.pc-btn {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit; font-size: 18px; line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease;
}
.pc-btn:hover { background: var(--surface-3); }
.pc-body { display: grid; gap: 8px; padding: 12px 16px 16px; }
.pc-name { font-size: 19px; font-weight: 600; color: var(--text-strong); line-height: 1.25; overflow-wrap: anywhere; }
.pc-sub { font-size: 13px; color: var(--text-muted); margin-top: -4px; overflow-wrap: anywhere; }
.pc-primary, .pc-secondary {
  min-height: 44px;
  border-radius: var(--radius);
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}
.pc-primary { margin-top: 6px; border: 0; background: var(--text-strong); color: var(--bg); }
.pc-primary:hover { background: var(--text); }
.pc-secondary { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-strong); }
.pc-secondary:hover { background: var(--surface-3); }
.pc-primary:active, .pc-secondary:active { transform: scale(.985); }
.pc-note { overflow-wrap: anywhere; }
/* Haritadaki secilen yer isareti (damla); ucu konumdur. */
/* Ucus bitince duser (app.js exploreFly), hafifce seker; ucundan yere
   dogru uc kez halka yayilir. Isaretci ogesi MapLibre'de zaten mutlak
   konumludur, halka ona gore yerlesir. */
.place-pin { width: 30px; height: 40px; pointer-events: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45)); }
.place-pin svg { display: block; width: 30px; height: 40px; }
@keyframes pinDrop {
  0% { opacity: 0; transform: translateY(-18px); }
  60% { opacity: 1; transform: translateY(1.5px); }
  100% { opacity: 1; transform: none; }
}
.place-pin svg { animation: pinDrop .42s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pinPulse {
  0% { opacity: .9; transform: scale(.25); }
  100% { opacity: 0; transform: scale(1.7); }
}
.place-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 36px;
  height: 14px;
  margin-left: -18px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-sizing: border-box;
  opacity: 0;
  z-index: -1;
  animation: pinPulse 1.5s cubic-bezier(.2, .8, .2, 1) .3s 3;
}
@media (prefers-reduced-motion: reduce) { .place-pin svg, .place-pin::after { animation: none; } }

/* Kipe gore gorunurluk. Kural TEK YERDE durur: bir alanin hangi kipte
   goruneceği sinifiyla belirlenir, JS her alani tek tek gizlemez. */
.range-only { display: none; }
body.mode-range .range-only { display: grid; }
body.mode-range .place-dest,
body.mode-range #dst-edit,
body.mode-range #dst-ac,
body.mode-range #wp-list,
body.mode-range #btn-add-wp,
body.mode-range #btn-swap,
/* "Varista en az" ROTAYA aittir: hedefe KACLA varmak istedigini soyler.
   Menzil "nereye kadar giderim" sorusudur ve tabani YOKTUR (bataryayi
   bitirene kadar hesaplanir, sunucu bu alani menzilde yok sayar). Satir
   kalsa etkisiz bir ayar gibi durur ve kullaniciyi yaniltirdi. */
body.mode-range #sec-charge .soc-foot,
/* Ileri ayarlar ROTAYA aittir (durak hedefi, amac, konektor gucu, en fazla
   durak): menzilde karsiliklari yoktur, satir kaldirilir. Dis sicaklik,
   kalkis, yuk ve yol secimleri ana formdaki iki kartta durur ve menzilde de
   gecerlidir. */
body.mode-range #btn-adv-open { display: none; }
/* Hedef kalkinca kesikli hat tek noktaya iner; cizgi de gitmeli. */
body.mode-range .stops-line { display: none; }

/* --- Menzil sonucu --- */
.rng-hero { display: grid; gap: 4px; }
.rng-hero strong {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.rng-legend { display: grid; gap: 6px; }
/* Satir DUGMEDIR: gostergeden bir banda dokunmak haritada o halkayi
   isaretler. Dugme gorunumu SADE tutulur -- gosterge once okunacak,
   sonra tiklanacak bir seydir. */
.rng-legend-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 32px;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.rng-legend-row:hover { background: var(--surface-2); }
.rng-legend-row.is-sel {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-strong);
}
.rng-legend-row:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Haritadaki balon: kisa ve tek amacli. */
.rng-pop { display: grid; gap: 6px; }
.rng-pop strong { font-size: 15px; color: var(--text-strong); }
.rng-pop .note { margin: 0; }
.rng-swatch {
  width: 14px; height: 14px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.rng-legend-row strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.rng-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.rng-note { display: grid; gap: 6px; }

/* --- Karsilastirma ---
   Formdaki liste (secilen araclar) ve sonuc panelindeki satirlar. Ana
   arac kehribar bantlarla cizilir; karsilastirma araclari ondan ayrisan
   SOGUK tonlardadir (app.js RANGE_COMPARE_COLORS) ve yalnizca DIS
   sinirlariyla gosterilir -- ic bantlari da cizilseydi uc aracin on bes
   halkasi birbirine karisirdi. */
.cmp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cmp-list:empty { display: none; }
.cmp-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 2px 6px 2px 8px;
  border-radius: var(--radius-sm, 8px);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text);
}
.cmp-row .cmp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rng-cmp-group { display: grid; gap: 6px; }
.rng-cmp-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  padding: 2px 6px;
  font-size: 13px;
  color: var(--text);
}
.rng-cmp-row .cmp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rng-cmp-row strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.rng-cmp-row .cmp-fail { color: var(--text-muted); font-weight: 400; }

/* =====================================================================
 * ISTASYON SECIMI: plan bulunduktan sonra rotanin yakinindaki bir
 * istasyon "Rotaya ekle" ile istenen durak, bir durak "Bu durağı kullanma"
 * ile dislanir (app.js stationPlanActions, adjustStations).
 * ===================================================================== */

/* Formda istenen durak satiri: simge simsek, halka kehribar. */
.icon-wp.icon-charge { border-color: var(--accent); color: var(--accent); }
.icon-wp.icon-charge .ui-ico { width: 12px; height: 12px; }
/* Haritada istenen durak (plan gelmeden once): ara nokta ailesinden,
   kehribar halka ve simsek. Plan gelince yerini numarali durak pili alir. */
.pt-wp.pt-charge { border-color: var(--accent); color: var(--accent); }
.pt-wp.pt-charge .ui-ico { width: 11px; height: 11px; }

/* Kullanilmayacak istasyonlar: formda, noktalarin altinda. */
.avoid-list { display: grid; gap: 8px; }
.avoid-label { font-size: 11px; color: var(--text-muted); letter-spacing: .04em; }
.avoid-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.avoid-chip {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%; min-height: 32px; padding: 0 10px 0 12px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: transparent; color: var(--text-strong);
  font: inherit; font-size: 12.5px; cursor: pointer;
}
.avoid-chip:hover { background: var(--surface-2); }
.avoid-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: line-through; text-decoration-color: var(--text-dim); }
.avoid-x { color: var(--text-muted); font-size: 15px; line-height: 1; }

/* Istasyon panelindeki eylem karti. */
.ds-plan-btns { display: grid; gap: 8px; }
.ds-plan-btns > button:disabled { background: var(--surface-3); color: var(--text-dim); cursor: default; }

/* Sonuc panelinde yeniden hesaplama satiri ve secimler. */
.res-replan {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
  padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 13px; color: var(--text-strong);
}
.res-replan.is-error { display: grid; gap: 4px; border-color: rgba(229, 115, 115, 0.45); }
/* Paylasilan yolculuk seridi (app.js renderSharedBanner). */
.res-shared {
  display: grid; gap: 10px; margin-bottom: 12px;
  padding: 12px; border-radius: var(--radius);
  border: 1px solid rgba(240, 178, 62, 0.35); background: var(--surface-2);
}
.res-shared[hidden] { display: none; }
.res-shared .rs-text { display: grid; gap: 2px; font-size: 13px; color: var(--text-strong); }
.res-shared .rs-text span { color: var(--text-muted); font-size: 12.5px; line-height: 1.45; }
.res-shared .rs-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* Kendi aracinla planla: formdaki arac karti ve kalkis sarji, serit icinde
   (app.js renderSharedOwn). */
.res-shared .rs-own { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.res-shared .rs-own-label { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }
.res-shared .rs-veh {
  min-height: 60px; padding: 10px 12px; gap: 10px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-3);
}
.res-shared .rs-veh:hover { background: #333338; }
.res-shared .rs-veh .veh-badge { width: 34px; height: 34px; background: var(--surface-2); }
.res-shared .rs-veh .veh-text strong { font-size: 14px; }
.res-shared .rs-veh .veh-cta { height: 32px; padding: 0 12px; }
.res-shared .rs-soc { display: grid; gap: 4px; }
.res-shared .rs-soc .soc-head strong { font-size: 15px; }
.res-shared .rs-soc input[type="range"] { width: 100%; height: 24px; margin: 0; }
.res-replan.is-error strong { font-weight: 600; }
.res-replan.is-error p { margin: 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.45; }
.rp-spin {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
/* Yeniden hesaplanirken eski plan geride kalir ve dokunulmaz: yeni plan
   gelince yerine yazilir. */
#res-body > * { transition: opacity .2s ease; }
body.replanning #res-body > :not(#res-replan) { opacity: .45; pointer-events: none; }
/* Iki asamali plan: alternatifler arkadan gelirken liste yerini tutar. */
.alts-loading { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-size: 13px; color: var(--text-muted); }
.alts-note { margin: 8px 0 0; }
/* Gelen secenekler (app.js renderAlternatives): liste boyu yukleme
   satirindan yenisine akarken satirlar sirayla (--i) asagidan kayarak ve
   solarak girer; not en son. Dolgu "backwards": giris bitince satirin
   kendi durumu (secili, uzerine gelme) gecerlidir. */
@keyframes altIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.alt-in { animation: altIn .44s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(40ms + var(--i, 0) * 70ms); }

/* Metin baglantisi: her zaman gorunur (.edit-link yalnizca form satirinin
   ustune gelince belirir). */
.text-link {
  padding: 2px 0; border: 0; background: none;
  color: var(--accent); font: inherit; font-size: 12.5px; cursor: pointer;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
}
.text-link:hover { text-decoration-color: currentColor; }
.res-replan.is-error .text-link { justify-self: start; }
.res-choices { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--text-muted); }
.res-choices.is-hint { color: var(--text-dim); }
.res-choices .rc-text { color: var(--text-strong); }
@media (prefers-reduced-motion: reduce) {
  .rp-spin { animation-duration: 2.4s; }
  #res-body > * { transition: none; }
  .alt-in { animation: none; }
}

/* =====================================================================
 * CILA KATMANI (panelin gorsel dili)
 *
 * Yukaridaki kurallar YERLESIMI ve davranisi tasir; bu katman yalnizca
 * yuzeyi inceltir ve BILINCLI OLARAK SESSIZDIR: mat yuzeyler (tek duz
 * ton, tek ince kenarlik), hicbir yerde parlama, degrade ya da hale yok;
 * kehribar yalnizca uc bicimde ve hep duz kullanilir -- ana dugme, durak
 * diski ve cubuk dolgusu icin dolu; secili ya da sarj eden kaplar icin
 * cizgi + hafif ton; vurgulu sayi ve secili sekme etiketi icin metin.
 * Hiyerarsiyi tipografi tasir (app.js numUnit: beyaz tabular sayilar,
 * soluk 500 agirlikli birimler; 700 yalnizca 46 px baslik sayisinda).
 * Yol dugumleri tek sozluktur: numarali durak dolu kehribar disk, kalkis
 * ici bos beyaz halka, varis ici bos kehribar halka. Hareket bir olguyu
 * anlatir ve durur: kisa siralı giris, cubuklarin degerine buyumesi,
 * grafigin cizilmesi (app.js revealIn); hover/basis donusumu yoktur.
 *
 * Bir onceki surum cam panel, degrade dugme, parlayan dugum ve cizgiler
 * tasiyordu; urun sahibi "isiltili" buldu ("havasi saglam, kaliteli ve
 * vizyoner olsun"). Buraya parlama geri EKLENMEMELI.
 *
 * Katman EKRAN icindir (yazdirma kendi kurallarini korur) ve telefonda da
 * gecerlidir; telefonun duz zeminli tam ekran sayfalari mobile.css'te
 * kalir (o dosya sonra yuklenir). Hareket azaltma tum girisleri kapatir.
 * ===================================================================== */
@media screen {
  :root {
    --hair: rgba(255, 255, 255, 0.08);            /* her ayirici ve kart kenari */
    --hair-2: rgba(255, 255, 255, 0.12);          /* hover / vurgulu kenar */
    --card: rgba(255, 255, 255, 0.04);            /* kart ve satirin duran dolgusu */
    --card-hover: rgba(255, 255, 255, 0.06);      /* ayni kartin hover dolgusu */
    --card-edge: transparent;                     /* kart kenari: dolgu yeter, cizgi yalnizca hover/odakta */
    --raised: rgba(255, 255, 255, 0.06);          /* kucuk kontrol ve karolar */
    --accent-tint: rgba(240, 179, 70, 0.10);      /* secili kontrol dolgusu, cip */
    --accent-wash: rgba(240, 179, 70, 0.06);      /* buyuk kehribar tonlu kaplar */
    --accent-line: rgba(240, 179, 70, 0.5);       /* secili kontrol / odak kenari */
    --accent-line-soft: rgba(240, 179, 70, 0.28); /* tonlu kaplarin kenari */
    --accent-raised: #f4bc57;                     /* dolu kehribarin hover tonu */
    --text-soft: #928f89;                         /* dipnot govdesi: dim'den okunur (4,8:1), muted'dan sessiz */
    --ease-out: cubic-bezier(.2, .8, .2, 1);
  }
  /* Dipnotlar, eksen ve okuma basliklari VERIDIR, susleme degil: --text-dim
     kart zemininde 3,5:1 kaliyordu (olculdu), okunur bir kademe yukari. */
  .note, .hint, #rng-sub, .res-stat .h, .strip-times, .soc-axis-row, .prof-y, .prof-read dt { color: var(--text-soft); }
  .tr-drive { color: var(--text-muted); }
  .place-head label, .coord-edit > label, .edit-link { color: var(--text-muted); }
  .adv-head strong { font-weight: 600; font-variant-numeric: tabular-nums; }

  /* --- Panel: tek mat yuzey, tek kenar, tek golge ------------------- */
  .dock {
    background: rgba(20, 20, 22, 0.94);
    border-color: var(--hair);
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.7);
  }
  .view-head { border-bottom-color: var(--hair); }
  .view-title { letter-spacing: -.01em; }
  .dock-foot { border-top-color: var(--hair); }
  .veh-row { border-bottom-color: var(--hair); }

  /* Kayan govdenin kenarlari soner (app.js wireScrollFades). */
  .dock-body.fade-top { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px); mask-image: linear-gradient(to bottom, transparent 0, #000 22px); }
  .dock-body.fade-bottom { -webkit-mask-image: linear-gradient(to top, transparent 0, #000 22px); mask-image: linear-gradient(to top, transparent 0, #000 22px); }
  .dock-body.fade-top.fade-bottom {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
  }

  /* --- Simge ---------------------------------------------------------- */
  .ui-ico { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; color: currentColor; }
  .ui-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

  /* --- Dugmeler: renk degisir, hicbir sey kimildamaz ------------------- */
  .btn-accent, .btn-accent-sm, .btn-plan:not(:disabled) { background: var(--accent); box-shadow: none; transition: background-color .15s ease; }
  .btn-accent:hover, .btn-accent-sm:hover, .btn-plan:not(:disabled):hover { background: var(--accent-raised); }
  .btn-accent:active, .btn-accent-sm:active, .btn-plan:not(:disabled):active { background: var(--accent); }
  .btn-plan:disabled { background: var(--raised); box-shadow: none; }
  .pill-outline { border-color: var(--hair-2); background: rgba(255, 255, 255, 0.02); transition: background-color .15s ease, border-color .15s ease; }
  .pill-outline:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.2); }
  .pill-dark, .veh-cta { background: var(--raised); border-color: var(--hair); transition: background-color .15s ease; }
  .pill-dark:hover, .veh-main:hover .veh-cta { background: rgba(255, 255, 255, 0.09); }

  /* Segmentler ve kip gostergesi: secim bir ton ve bir cizgidir. */
  .seg { border-color: var(--hair); }
  .seg:hover:not([aria-pressed="true"]):not(:disabled) { background: rgba(255, 255, 255, 0.04); }
  .seg[aria-pressed="true"], .mode-row > .mode-ind { border-color: var(--accent-line); background: var(--accent-tint); box-shadow: none; }

  /* Katli bolum satirlari (Arac / Rota / Ileri ayarlar, Ayrintilar). */
  .adv-row { background: var(--card); border-color: var(--card-edge); transition: background-color .15s ease, border-color .15s ease; }
  .adv-row:hover { background: var(--card-hover); border-color: var(--hair-2); }
  .adv-row .chev { color: var(--text-dim); transition: transform .2s var(--ease-out), color .15s ease; }
  .adv-row:hover .chev { color: var(--text-muted); }
  #sec-load > summary > span:first-child::before, #sec-road > summary > span:first-child::before,
  #btn-adv-open > span:first-child::before, .more-info > summary > span:first-child::before,
  #m-map-open > span:first-child::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 10px;
    vertical-align: -3px;
    background: var(--text-muted);
    -webkit-mask: var(--row-ico) center / contain no-repeat;
    mask: var(--row-ico) center / contain no-repeat;
  }
  #sec-load > summary { --row-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15.5 5.6 10a2 2 0 0 1 1.9-1.5h9a2 2 0 0 1 1.9 1.5l1.6 5.5v2a1 1 0 0 1-1 1h-1.2a1 1 0 0 1-1-1v-.8H7.2v.8a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1z'/%3E%3Cpath d='M4.5 13.5h15'/%3E%3C/svg%3E"); }
  #sec-road > summary { --row-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM18 3a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5z'/%3E%3Cpath d='M8.5 18.5h7a3.5 3.5 0 0 0 0-7h-7a3.5 3.5 0 0 1 0-7h7'/%3E%3C/svg%3E"); }
  #btn-adv-open { --row-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h4M12 17h8'/%3E%3Ccircle cx='16' cy='7' r='2'/%3E%3Ccircle cx='10' cy='17' r='2'/%3E%3C/svg%3E"); }
  /* "İlgilisine": bilgi simgesi (daire icinde i). */
  .more-info > summary { --row-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5v.01'/%3E%3C/svg%3E"); }
  #m-map-open { --row-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4 3.5 6.2v13.6L9 17.6l6 2.4 5.5-2.2V4.2L15 6.4z'/%3E%3Cpath d='M9 4v13.6M15 6.4V20'/%3E%3C/svg%3E"); }

  /* --- Form ------------------------------------------------------------ */
  .veh-badge { background: var(--accent-tint); border: 1px solid var(--accent-line-soft); box-shadow: none; letter-spacing: .02em; }
  /* Form dugumleri zaman cizelgesiyle AYNI sozluk: kalkis ici bos beyaz
     halka, varis ici bos kehribar halka (dolgu zemin: kesikli hat altindan
     gecer). */
  .icon-origin { background: var(--bg); border-width: 3px; }
  .icon-origin > span { display: none; }
  .icon-dest { background: var(--bg); border: 3px solid var(--accent); }
  .icon-dest > span { display: none; }
  .veh-text strong { letter-spacing: -.01em; }
  .place-row, .soc-card, .explore { background: var(--card); border-color: var(--card-edge); transition: border-color .15s ease; }
  .place-row:focus-within, .explore:focus-within { border-color: var(--accent-line); box-shadow: none; }
  .soc-head strong { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .ac-list { background: rgba(28, 28, 31, 0.98); border-color: var(--hair-2); box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6); }

  /* --- Sonuc basligi: bir sayi, altinda sessiz bir bilgi satiri ------ */
  #res-body { gap: 24px; }
  .res-head { gap: 12px; }
  .results-body { padding: 20px 16px 16px; }
  .form-body { gap: 12px; padding-top: 14px; }
  .res-route { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; font-size: 12.5px; line-height: 1.5; }
  .rt-pt { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
  .rt-pt > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rt-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
  .rt-dot.origin { box-shadow: inset 0 0 0 2px var(--text-strong); }
  .rt-dot.wp { box-shadow: inset 0 0 0 2px var(--text-muted); }
  .rt-dot.dest { box-shadow: inset 0 0 0 2px var(--accent); }
  .rt-arrow { color: var(--text-dim); white-space: pre; }
  .res-total-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .res-total { font-size: 46px; font-weight: 700; letter-spacing: -.03em; line-height: .95; color: var(--text-strong); font-variant-numeric: tabular-nums; }
  .res-total .u { font-size: 21px; font-weight: 500; letter-spacing: -.01em; color: var(--text-muted); white-space: pre; }
  /* Mesafe ve varis: kenarliksiz, simgeli bir ust bilgi satiri. Panelde
     kenarlik "dokunulabilir" demektir; bu ikisi dokunulmaz. */
  .res-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 0; }
  .res-chip { display: inline-flex; align-items: center; gap: 6px; height: 20px; color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .res-chip .ui-ico { width: 14px; height: 14px; color: var(--text-dim); }

  /* --- Yolculuk seridi ----------------------------------------------- */
  /* Serit ciplaktir: kutu yok, yalnizca hat ve dugumler. */
  .res-strip { display: grid; gap: 8px; padding: 6px 6px 0; }
  .res-strip[hidden] { display: none; }
  .strip-bar { position: relative; height: 22px; }
  .strip-track { position: absolute; left: 6px; right: 6px; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); }
  .strip-end { position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--bg); }
  .strip-end.start { left: 0; box-shadow: inset 0 0 0 2.5px var(--text-strong); }
  .strip-end.dest { right: 0; box-shadow: inset 0 0 0 2.5px var(--accent); }
  .strip-marks { position: absolute; left: 6px; right: 6px; top: 0; bottom: 0; }
  .strip-stop {
    position: absolute;
    top: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-text);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 0 0 3px var(--bg);
    transition: background-color .12s ease;
  }
  .strip-stop:hover { background: var(--accent-raised); }
  .strip-stop:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
  /* Gorunmez 44 px dokunma hedefi (telefonda tek parmakla). */
  .strip-stop::after { content: ""; position: absolute; inset: -11px; border-radius: 50%; }
  .strip-wp {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 2px;
    transform: rotate(45deg);
    background: var(--bg);
    box-shadow: inset 0 0 0 2px var(--text-muted), 0 0 0 3px var(--bg);
  }
  .strip-times { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

  /* --- Ozet kartlari: notr karo, etiket, sayi -------------------------- */
  .res-stats { gap: 8px; }
  .res-stat { gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-edge); align-content: start; }
  .res-stat .k { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .res-stat > .ui-ico { width: 26px; height: 26px; padding: 5.5px; border-radius: 8px; background: var(--raised); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--hair); }
  .res-stat.unknown > .ui-ico { opacity: .5; }
  .res-stat .v { font-size: 23px; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
  .res-stats-2 .res-stat .v { font-size: 19px; }
  .res-stat .v .u { font-size: .62em; font-weight: 500; letter-spacing: 0; color: var(--text-muted); white-space: pre; }
  /* Yalnizca metin olan deger ("Müsait", "Hizmet dışı"): biraz kucuk, tek
     satira sigsin. */
  .res-stat .v .u:only-child { font-size: .78em; color: inherit; letter-spacing: -.01em; }
  .res-stat.unknown .v, .res-stat.unknown .v .u { color: var(--text-dim); }
  .res-stat.emph .v .n { color: var(--accent); }
  .res-stat .gauge { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
  .res-stat .gauge > i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }

  /* --- Guzergah secenekleri ------------------------------------------- */
  .res-alt { border-radius: var(--radius); border-color: var(--card-edge); background: var(--card); box-shadow: none; transition: border-color .15s ease, background-color .15s ease; }
  .res-alt:hover { border-color: var(--hair-2); background: var(--card-hover); }
  .res-alt[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-wash); box-shadow: none; }
  .res-alt-time strong { font-variant-numeric: tabular-nums; }

  /* --- Menzil sonucu --------------------------------------------------- */
  .rng-hero strong { font-size: 46px; letter-spacing: -.03em; line-height: 1; color: var(--text-strong); }
  .rng-hero strong .u { font-size: .46em; font-weight: 500; letter-spacing: 0; color: var(--text-muted); white-space: pre; }
  .rng-legend { padding: 6px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-edge); }
  .rng-swatch { border-radius: 50%; }

  /* --- Uyari satiri ---------------------------------------------------- */
  details.sec.warnings > summary.adv-row { justify-content: flex-start; background: var(--accent-wash); border-color: var(--accent-line-soft); }
  details.sec.warnings > summary.adv-row .adv-right { margin-left: auto; }
  details.sec.warnings > summary.adv-row::before {
    content: "";
    flex: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.6'/%3E%3Cpath d='M12 11v5.2M12 7.6v.2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.6'/%3E%3Cpath d='M12 11v5.2M12 7.6v.2'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  details.sec.warnings > summary.adv-row:hover { background: var(--accent-tint); }

  /* --- Bolum basliklari: ince bir cizgiyle biter --------------------- */
  /* Kural yalnizca SONUC kaydirmalarindaki bolum basliklarindadir; formun
     ve Ileri ayarlarin alan etiketleri, buyuk sayinin uzerindeki kas
     etiketi (ŞARJ DURAĞI 1, YAKLAŞIK GERÇEK MENZİL) cizgisizdir. */
  .res-sec > .sec-label, .ds-group > .sec-label, .ds-stop > .sec-label,
  .res-alts > .sec-label, .rng-legend-group > .sec-label, .rng-cmp-group > .sec-label, .rng-note > .sec-label { display: flex; align-items: center; gap: 10px; }
  .res-sec > .sec-label::after, .ds-group > .sec-label::after,
  .res-alts > .sec-label::after, .rng-legend-group > .sec-label::after, .rng-cmp-group > .sec-label::after, .rng-note > .sec-label::after { content: ""; flex: 1; height: 1px; background: var(--hair); }

  /* --- Grafikler: duz cizgi, duz kart ------------------------------------ */
  .soc-chart, .prof-chart { padding: 14px 12px 10px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-edge); }
  .soc-chart svg { height: 100px; }
  .soc-axis-row { font-variant-numeric: tabular-nums; }
  .prof-y { background: rgba(22, 22, 24, 0.75); }

  /* --- Zaman cizelgesi: tek dugum sozlugu ------------------------------- */
  .tr-line { background: rgba(255, 255, 255, 0.10); border-radius: 1px; }
  .tr-dot.origin { background: var(--bg); box-shadow: 0 0 0 3px var(--bg); }
  .tr-dot.stop { background: var(--accent); font-weight: 600; box-shadow: 0 0 0 3px var(--bg); }
  .tr-dot.dest { background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
  .tr-dot.wp { box-shadow: 0 0 0 3px var(--bg); }
  .tr-drive { display: flex; align-items: center; gap: 7px; }
  .tr-drive .ui-ico { width: 14px; height: 14px; color: var(--text-dim); }
  .tr-title { font-weight: 600; letter-spacing: -.005em; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; }
  .tr-head > .tr-right { flex: none; }
  .tr-static .tr-right { font-variant-numeric: tabular-nums; color: var(--text); }
  /* Durak satiri bir karttir; dugum kartin basligiyla hizalanir. */
  .tr.is-stop .tr-body { gap: 10px; margin-bottom: 12px; padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-edge); transition: background-color .15s ease, border-color .15s ease; }
  .tr.is-stop .tr-rail::before { content: ""; width: 2px; height: 12px; flex: none; background: rgba(255, 255, 255, 0.10); }
  .tr.is-stop:hover .tr-body { background: var(--card-hover); border-color: var(--hair-2); }
  .tr.is-stop:focus-visible { outline: none; }
  .tr.is-stop:focus-visible .tr-body { border-color: var(--accent); }
  .tr-right.accent {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 9px 0 7px;
    border-radius: var(--radius-pill);
    background: var(--accent-tint);
    font-size: 12.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .tr-right.accent::before {
    content: "";
    width: 12px;
    height: 12px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2.5 5 13.5h6l-1 8 8-11h-6z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2.5 5 13.5h6l-1 8 8-11h-6z'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .tr-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
  .tr-bar-base { background: rgba(255, 255, 255, 0.16); border-radius: 3px; }
  .tr-bar-fill { background: var(--accent); border-radius: 3px; }
  .tr-soc { font-size: 12.5px; }

  /* --- Iklim raporu: yesil semantik, ama duz ---------------------------- */
  .cl-bar, .cl-mix-bar { background: rgba(255, 255, 255, 0.07); }
  .cl-ev, .cl-ren { background: var(--ok); }

  /* --- Istasyon paneli ------------------------------------------------ */
  .ds-stop { border-radius: var(--radius); border-color: var(--accent-line-soft); background: var(--accent-wash); box-shadow: none; }
  .ds-stop-soc strong { font-variant-numeric: tabular-nums; }
  .ds-stop-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
  .ds-stop-bar span { background: var(--accent); border-radius: 3px; }
  /* Satir ayiricisi iki sutunda KESINTISIZ: sutun araligi yerine sag
     hucrenin ic boslugu. */
  .kv-grid { gap: 0; }
  .kv-grid > * { padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.05); }
  .kv-grid > strong { padding-left: 16px; }
  .kv-grid > :nth-child(-n+2) { border-top: 0; }
  .kv-grid strong { font-variant-numeric: tabular-nums; }
  .ds-conn { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius); }
  .ds-conn-kw [class^="st-"]::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
  .ds-conn-count { background: var(--raised); }
  .ds-val { font-family: var(--mono); font-size: 12.5px; }

  /* --- Girisler (app.js revealIn): kisa, sonra durur --------------------- */
  @keyframes cilaIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes cilaGrow { from { transform: scaleX(0); } to { transform: none; } }
  @keyframes cilaReveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  .reveal > * { animation: cilaIn .32s var(--ease-out) backwards; animation-delay: calc(var(--d, 0) * 35ms); }
  .reveal .tr-bar-fill, .reveal .res-stat .gauge > i, .reveal .ds-stop-bar span { transform-origin: left center; animation: cilaGrow .5s var(--ease-out) .15s backwards; }
  .reveal .soc-chart svg, .reveal .prof-plot svg { animation: cilaReveal .6s cubic-bezier(.45, 0, .2, 1) .1s backwards; }
}

@media screen and (prefers-reduced-motion: reduce) {
  .reveal > *, .reveal .tr-bar-fill, .reveal .res-stat .gauge > i, .reveal .ds-stop-bar span,
  .reveal .soc-chart svg, .reveal .prof-plot svg { animation: none; }
  .tr.is-stop .tr-body, .strip-stop, .btn-accent, .btn-plan, .pill-outline, .adv-row .chev { transition: none; }
}

/* fps gostergesi (yalnizca ?debug=1; app.js startFpsMeter kurar). Haritanin
   ust ortasinda, dokunmayi engellemez. */
#fps-meter {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(10, 10, 12, 0.72);
  color: #e8e6e1;
  font: 500 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}

/* --- Yolculuk tarzi: 3+ yolcuda Aile notu, durak yeri rozeti --------- */
.occ-auto {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 6px; padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-border);
  background: var(--accent-faint);
  color: var(--text-muted);
}
.occ-auto[hidden] { display: none; }
.occ-auto span { flex: 1; min-width: 0; }
.place-badge {
  display: inline-block;
  margin-right: 2px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px; line-height: 18px; font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  vertical-align: 1px;
  white-space: nowrap;
}
.place-badge.place-mall, .place-badge.place-rest_area {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-faint);
}

/* --- İlgilisine: teknik bilgiler katli durur ------------------------- */
.more-info { margin-top: 4px; }
.more-info > .sec-body { display: grid; gap: 14px; }
.adv-sum.changed { color: var(--accent); }
.adv-sum.bad { color: var(--danger-text); }
