/* ============================================================
   YolRadar — koyu otomotiv teması
   ============================================================ */
:root {
  --bg: #0b1220;
  --bg-2: #101a2e;
  --card: #16233c;
  --card-2: #1c2c4a;
  --line: #263a5e;
  --text: #eaf1ff;
  --muted: #8fa3c8;
  --accent: #38bdf8;
  --accent-2: #0ea5e9;
  --go: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radar: #ef4444;
  --corridor: #f59e0b;
  --custom: #a78bfa;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

/* hidden özniteliği her zaman kazanmalı (display:flex/grid kurallarına karşı) */
[hidden] { display: none !important; }

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1200px 800px at 80% -10%, #14335a 0%, var(--bg) 55%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button { font: inherit; cursor: pointer; }
select, input[type="text"] {
  font: inherit;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 12px;
  width: 100%;
  outline: none;
  appearance: none;
}
select:focus, input[type="text"]:focus { border-color: var(--accent); }
select:disabled { opacity: .45; }

/* ---------------- Üst çubuk ---------------- */
.appbar {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: rgba(11, 18, 32, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  color: #06121f;
  background: linear-gradient(135deg, var(--accent), #7dd3fc);
  box-shadow: 0 4px 14px rgba(56, 189, 248, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; letter-spacing: .4px; }
.brand-text small { color: var(--muted); font-size: 11px; }
.appbar-actions { display: flex; align-items: center; gap: 10px; }

.data-status {
  font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px; white-space: nowrap;
}
.data-status.fresh { color: #86efac; border-color: #14532d; }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text);
}
.icon-btn:active { transform: scale(.96); }

/* ---------------- Ekranlar ---------------- */
.screen { display: none; }
.screen.active { display: block; }

#planScreen {
  display: none; /* .screen kuralını ID özgüllüğüyle ezmemek için burada da gizle */
}
#planScreen.active { display: block; }

.plan-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  max-width: 780px; margin: 0 auto;
  padding: 16px 16px calc(28px + var(--safe-bottom));
}
.route-form { order: 1; } #routeSummary { order: 2; }
#mapCard { order: 3; } #historyCard { order: 4; } .disclaimer { order: 5; }

/* Masaüstü: iki sütun — solda kontroller, sağda büyük yapışkan harita */
@media (min-width: 1000px) {
  .plan-grid {
    grid-template-columns: 440px minmax(0, 1fr);
    max-width: 1500px; align-items: start;
    column-gap: 20px; row-gap: 0; /* satır boşluğu boş track'lere yayılmasın */
  }
  .route-form, #routeSummary, #historyCard, .disclaimer { grid-column: 1; }
  .route-form, #routeSummary, #historyCard { margin-bottom: 16px; } /* boşluğu margin ile ver */
  #mapCard { grid-column: 2; grid-row: 1 / 12; position: sticky; top: 78px; margin-bottom: 0; }
  #map { height: calc(100vh - 210px); min-height: 560px; }
}

.card {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 12px; letter-spacing: .5px; text-transform: uppercase; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px;
  padding: 14px 18px; font-weight: 700; letter-spacing: .4px;
  color: #06121f; background: var(--accent);
  transition: transform .06s ease, filter .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #7dd3fc); }
.btn-go {
  background: linear-gradient(135deg, var(--go), #4ade80);
  font-size: 16px;
  box-shadow: 0 6px 20px rgba(34, 197, 94, .3);
}
.btn-danger { background: linear-gradient(135deg, var(--danger), #f87171); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}
.btn-sm { padding: 9px 14px; font-size: 13px; }

.error-text { color: #fca5a5; font-size: 13.5px; margin-top: 10px; }

/* ---------------- Rota özeti ---------------- */
.route-header {
  font-size: 17px; font-weight: 700; text-align: center;
  margin-bottom: 14px; letter-spacing: .3px;
}
.route-header .arrow { color: var(--accent); margin: 0 8px; }

.summary-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.s-card {
  border-radius: 12px; padding: 12px 8px; text-align: center;
  border: 1px solid var(--line); background: var(--bg-2);
}
.s-count { font-size: 26px; font-weight: 800; }
.s-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.s-radar .s-count { color: var(--radar); }
.s-control .s-count { color: var(--go); }
.s-corridor .s-count { color: var(--corridor); }

.info-note {
  margin-top: 12px; padding: 10px 12px;
  font-size: 12.5px; color: var(--muted); line-height: 1.45;
  background: rgba(56, 189, 248, .07);
  border: 1px solid rgba(56, 189, 248, .25);
  border-radius: 10px;
}

.city-breakdown { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.cb-city {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line);
}
.cb-city .name { font-weight: 700; font-size: 14px; }
.cb-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  font-size: 11px; font-weight: 700; padding: 4px 9px;
  border-radius: 999px; white-space: nowrap;
}
.badge-red { background: rgba(239, 68, 68, .15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, .4); }
.badge-green { background: rgba(34, 197, 94, .15); color: #86efac; border: 1px solid rgba(34, 197, 94, .4); }

.drive-actions { display: flex; flex-direction: column; gap: 10px; }
.drive-actions .btn { width: 100%; white-space: nowrap; }
.drive-actions .btn-go { padding: 16px; }
.drive-actions .btn-ghost { padding: 13px; font-size: 14px; }

/* ---------------- Harita ---------------- */
.map-card { padding: 12px; }
.map-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.map-head .card-title { margin-bottom: 0; }
.map-head-hint { font-size: 11.5px; color: var(--muted); }
#map { height: 400px; border-radius: 10px; z-index: 1; }
.map-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 10px 6px 2px; font-size: 12px; color: var(--muted);
}
.map-legend .lg { display: inline-block; width: 22px; height: 4px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.lg-route { background: var(--accent); }
.lg-corridor { background: repeating-linear-gradient(90deg, var(--corridor) 0 5px, transparent 5px 9px); }
.lg-radar { width: 10px !important; height: 10px !important; border-radius: 50% !important; background: var(--radar); }
.lg-custom { width: 10px !important; height: 10px !important; border-radius: 50% !important; background: var(--custom); }
.map-hint { font-size: 12px; color: var(--muted); padding: 8px 6px 2px; }

.leaflet-container { background: #0e1626; font: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--card-2); color: var(--text);
  box-shadow: var(--shadow);
}
.leaflet-popup-content { font-size: 13px; line-height: 1.4; }

/* SVG pin işaretçileri */
.hz-pin { background: none !important; border: none !important; }
.hz-me { background: none !important; border: none !important; }
.me-dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid #fff;
  display: grid; place-items: center;
  box-shadow: 0 0 0 7px rgba(56, 189, 248, .25), 0 2px 8px rgba(0,0,0,.5);
}
.me-arrow {
  color: #06121f; display: grid; place-items: center;
  transition: transform .3s ease;
  will-change: transform;
}

/* Tehlike kartı / uyarı ikon renkleri */
.hz-ic { display: inline-grid; place-items: center; }
.hz-ic-radar { color: var(--radar); }
.hz-ic-corridor { color: var(--corridor); }
.hz-ic-custom { color: var(--custom); }

/* Özet kart ikonları */
.s-ic { display: grid; place-items: center; margin-bottom: 4px; }
.s-radar .s-ic { color: var(--radar); }
.s-control .s-ic { color: var(--go); }
.s-corridor .s-ic { color: var(--corridor); }

/* Form etiket ikonları */
.lbl-ic { display: inline-grid; place-items: center; vertical-align: -2px; margin-right: 3px; }
.lbl-ic.from { color: var(--accent); }
.lbl-ic.to { color: var(--danger); }
.ok-ic { color: var(--go); display: inline-grid; vertical-align: -2px; margin-right: 4px; }

/* GPS kalite çubukları */
.gps-quality {
  display: flex; gap: 3px; align-items: flex-end; height: 14px; margin-top: 6px;
}
.gps-quality i {
  width: 5px; border-radius: 2px; background: var(--line);
  transition: background .3s;
}
.gps-quality i:nth-child(1) { height: 5px; }
.gps-quality i:nth-child(2) { height: 8px; }
.gps-quality i:nth-child(3) { height: 11px; }
.gps-quality i:nth-child(4) { height: 14px; }
.gps-quality[data-bars="1"] i:nth-child(-n+1),
.gps-quality[data-bars="2"] i:nth-child(-n+2),
.gps-quality[data-bars="3"] i:nth-child(-n+3),
.gps-quality[data-bars="4"] i:nth-child(-n+4) { background: var(--go); }
.gps-quality[data-bars="1"] i:nth-child(1) { background: var(--danger); }
.gps-quality[data-bars="2"] i:nth-child(-n+2) { background: var(--warn); }

/* Güncelleme banner'ı (üstte) */
.update-banner {
  position: fixed; left: 12px; right: 12px;
  top: calc(10px + var(--safe-top));
  z-index: 6500;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--accent), #7dd3fc);
  color: #06121f;
  border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.update-banner .ub-text { flex: 1; line-height: 1.3; }
.update-banner .ub-text b { display: block; font-size: 14px; }
.update-banner .ub-text span { font-size: 11.5px; opacity: .85; }
.update-banner .icon-btn { background: rgba(0,0,0,.15); border: none; color: #06121f; width: 34px; height: 34px; }

/* Açıklayıcı alt yazılar */
.subtitle { font-size: 12px; color: var(--muted); line-height: 1.45; margin: -4px 0 12px; }
.btn-sub { font-size: 11px; color: var(--muted); text-align: center; margin-top: 5px; line-height: 1.35; }
.s-desc { font-size: 10px; color: var(--muted); margin-top: 3px; line-height: 1.3; }
.drive-actions-wrap { margin-top: 16px; }

/* iOS kurulum banner'ı */
.ios-banner {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(14px + var(--safe-bottom));
  z-index: 6000;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--accent);
  border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.iosb-icon img { border-radius: 10px; display: block; }
.iosb-text { flex: 1; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.iosb-text b { color: var(--text); }
.iosb-text > b { display: block; font-size: 14px; margin-bottom: 2px; }
.iosb-share { color: var(--accent); display: inline-grid; vertical-align: -2px; }

.disclaimer {
  font-size: 11.5px; color: var(--muted); line-height: 1.5;
  text-align: center; padding: 4px 10px 10px;
}
.disclaimer a { color: var(--accent); }

/* ---------------- Sürüş HUD ---------------- */
#driveScreen {
  height: calc(100dvh - 61px - var(--safe-top));
  display: none; flex-direction: column;
  padding: 12px 12px calc(12px + var(--safe-bottom));
  gap: 12px; max-width: 760px; margin: 0 auto;
}
#driveScreen.active { display: flex; }

.hud-top { display: flex; gap: 12px; align-items: stretch; }
.speedo {
  min-width: 128px;
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 14px; box-shadow: var(--shadow);
}
.speed-value { font-size: 52px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.speed-unit { font-size: 12px; color: var(--muted); margin-top: 2px; }

.corridor-badge {
  flex: 1;
  border-radius: var(--radius);
  border: 2px solid var(--corridor);
  background: rgba(245, 158, 11, .1);
  padding: 10px 14px;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  animation: pulseBorder 1.6s infinite;
}
.cb-title { font-size: 12px; font-weight: 800; color: var(--corridor); letter-spacing: 1px; }
.cb-row { display: flex; align-items: center; gap: 12px; }
.cb-limit {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: #b91c1c;
  border: 4px solid #dc2626;
  font-weight: 800; font-size: 16px;
}
.cb-avg { font-size: 14px; color: var(--text); }
.cb-avg b { font-size: 20px; }
.cb-avg.over b { color: var(--danger); }
.cb-note { font-size: 11px; color: var(--muted); }

.hud-status {
  flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; box-shadow: var(--shadow);
}
.gps-status { font-size: 12.5px; color: var(--muted); }
.gps-status.ok { color: #86efac; }
.gps-status.bad { color: #fca5a5; }
.route-progress { font-size: 13px; font-weight: 600; }

/* Sıradaki tehlike */
.next-hazard {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.next-hazard.near { border-color: var(--warn); animation: pulseBorder 1.2s infinite; }
.next-hazard.imminent { border-color: var(--danger); animation: pulseBorderRed .8s infinite; }
.nh-icon { font-size: 34px; }
.nh-body { flex: 1; min-width: 0; }
.nh-type { font-size: 11.5px; font-weight: 800; letter-spacing: 1px; color: var(--corridor); text-transform: uppercase; }
.nh-name { font-size: 15px; font-weight: 700; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-extra { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.nh-dist { text-align: right; min-width: 90px; }
.nh-dist-value { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.nh-dist-bar {
  width: 90px; height: 6px; margin-top: 6px;
  background: var(--bg-2); border-radius: 3px; overflow: hidden;
}
#nhDistBar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--go), var(--warn), var(--danger)); transition: width .4s; }

.no-hazard {
  text-align: center; color: var(--muted); font-size: 14px;
  padding: 18px; line-height: 1.5;
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.no-hazard div { font-size: 30px; margin-bottom: 6px; }

.drive-map { flex: 1; min-height: 180px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
#driveMap { height: 100%; }

.hud-bottom { display: flex; gap: 12px; align-items: center; }
.hud-bottom .btn { flex: 1; padding: 15px; font-size: 15px; }
.hud-btn { width: 52px; height: 52px; font-size: 20px; }

/* Uyarı katmanı */
.alert-overlay {
  position: fixed; inset: 0; z-index: 3000;
  display: grid; place-items: center;
  background: rgba(11, 18, 32, .72);
  backdrop-filter: blur(4px);
  animation: alertFlash 1s infinite;
}
.alert-box {
  text-align: center; padding: 34px 42px;
  background: linear-gradient(180deg, #2a1220, #1a0f1a);
  border: 2px solid var(--danger); border-radius: 22px;
  box-shadow: 0 0 60px rgba(239, 68, 68, .45);
  max-width: 88vw;
}
.alert-icon { font-size: 58px; }
.alert-title { font-size: 24px; font-weight: 800; letter-spacing: 2px; color: #fca5a5; margin-top: 6px; }
.alert-msg { font-size: 17px; margin-top: 8px; line-height: 1.45; }

@keyframes alertFlash { 0%, 100% { background: rgba(11,18,32,.72); } 50% { background: rgba(80,15,25,.72); } }
@keyframes pulseBorder { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.4);} 50% { box-shadow: 0 0 0 8px rgba(245,158,11,0);} }
@keyframes pulseBorderRed { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5);} 50% { box-shadow: 0 0 0 10px rgba(239,68,68,0);} }

/* ---------------- Modallar ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 4000;
  display: grid; place-items: end center;
  background: rgba(4, 8, 16, .6); backdrop-filter: blur(3px);
}
.modal-card {
  width: 100%; max-width: 560px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  padding: 18px 18px calc(22px + var(--safe-bottom));
  max-height: 82dvh; overflow-y: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { font-size: 17px; }

.set-group { margin-bottom: 18px; }
.set-group h4 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 4px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.set-hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 8px; }

.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button {
  flex: 1; padding: 10px; background: var(--bg-2); color: var(--muted);
  border: none; font-weight: 700;
}
.seg button.active { background: var(--accent); color: #06121f; }

/* ---------------- Çevrimdışı indirme butonu ---------------- */
.offline-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin: 10px 0 2px;
  padding: 11px; border-radius: 10px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); font-weight: 600; font-size: 13.5px;
}
.offline-btn .ob-ic { display: grid; place-items: center; color: var(--accent); }
.offline-btn.ready { border-color: var(--go); color: #86efac; }
.offline-btn.ready .ob-ic { color: var(--go); }
.offline-btn:disabled { opacity: .8; }

/* ---------------- Sürüş geçmişi ---------------- */
.history-list { display: flex; flex-direction: column; gap: 8px; }
.hist-item {
  text-align: left; width: 100%;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 13px; color: var(--text);
}
.hist-item:active { transform: scale(.99); }
.hi-route { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.hi-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hi-viol { color: #fca5a5; background: rgba(239,68,68,.13); border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.hi-ok { color: #86efac; background: rgba(34,197,94,.13); border-radius: 999px; padding: 1px 8px; font-weight: 700; }

/* ---------------- Sürüş özeti ---------------- */
.sum-head { text-align: center; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.sum-head .arrow { color: var(--accent); margin: 0 6px; }
.sum-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sum-grid > div {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 6px; text-align: center;
}
.sum-grid b { display: block; font-size: 20px; font-weight: 800; }
.sum-grid span { font-size: 11px; color: var(--muted); }
.sum-risk {
  margin-top: 14px; padding: 11px; border-radius: 10px; text-align: center;
  font-size: 13.5px; font-weight: 600;
}
.sum-risk.risk-high { background: rgba(239,68,68,.14); color: #fca5a5; border: 1px solid rgba(239,68,68,.4); }
.sum-risk.risk-ok { background: rgba(34,197,94,.14); color: #86efac; border: 1px solid rgba(34,197,94,.4); }
.sum-risk.risk-none { background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); }
.sum-cor-list { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.sum-cor {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: 9px; background: var(--bg-2);
  border-left: 3px solid var(--go); font-size: 13px;
}
.sum-cor.over { border-left-color: var(--danger); }
.sc-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 10px; }
.sum-cor.over .sc-avg { color: #fca5a5; }
.sum-cor.ok .sc-avg { color: #86efac; }
.sc-avg small { color: var(--muted); font-weight: 400; }
.sum-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 10px; }
.sum-note { margin-top: 14px; text-align: center; font-size: 11.5px; color: var(--muted); }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(26px + var(--safe-bottom));
  transform: translateX(-50%);
  background: var(--card-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 18px; font-size: 14px; z-index: 5000;
  box-shadow: var(--shadow); max-width: 88vw; text-align: center;
}

/* ---------------- Küçük ekran ayarları ---------------- */
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  #map { height: 330px; }
  .speed-value { font-size: 44px; }
  .speedo { min-width: 108px; }
  .nh-icon { font-size: 28px; }
  .nh-dist-value { font-size: 24px; }
}

@media (min-width: 761px) {
  #driveScreen { height: calc(100dvh - 63px); }
}
