/* ====================================================
   PLANNER — Mobil-önce layout
   Harita her zaman flex:1 ile kalan alanı doldurur.
   Sonuçlar ve detay mobilde fixed bottom sheet olarak
   haritanın üzerine yüzer; masaüstünde sol panele döner.
   ==================================================== */

/* ---------- Body ---------- */
.planner-page-body {
  margin: 0;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
}

.planner-page-body .tab-bar {
  max-width: none;
  z-index: 2000;
  isolation: isolate;
  overflow: visible;
}

/* iOS PWA: 100dvh ≈ ekran − safe-area (WebKit #254868); tarayıcıda doğru, standalone'da kısa kalır */
html.is-standalone-app .planner-page-body {
  height: var(--app-height, 100vh);
  max-height: var(--app-height, 100vh);
}

.planner-toolbar {
  flex-shrink: 0;
}

/* ---------- Ana layout ---------- */
.planner-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Form paneli (üstte, sadece form) ---------- */
.planner-side {
  flex-shrink: 0;
  padding: 6px 10px 0;
}

.planner-form,
.planner-form.card {
  margin-bottom: 6px;
  padding: 10px 12px 10px;
  transition: padding 0.18s ease;
}

/* --- Collapsed form --- */
.planner-form.is-collapsed {
  padding: 8px 12px;
  margin-bottom: 4px;
}

.planner-form.is-collapsed .planner-endpoints,
.planner-form.is-collapsed .planner-filter-row,
.planner-form.is-collapsed #searchBtn,
.planner-form.is-collapsed .planner-form-error {
  display: none;
}

.planner-form.is-collapsed .planner-summary {
  display: flex !important;
}

/* Özet şerit */
.planner-summary {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.planner-form.is-editing .planner-summary {
  display: flex;
  margin-bottom: 10px;
}

.planner-summary-text {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-expand-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.planner-collapse-btn {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.planner-collapse-btn:active {
  transform: translateY(1px);
}

/* Mobilde Ara + Daralt: daha kompakt ve minimal */
@media (max-width: 767px) {
  .planner-form #searchBtn {
    padding: 10px 14px;
    font-size: 0.875rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--primary-weak);
  }

  .planner-collapse-btn {
    display: block;
    width: fit-content;
    margin: 6px auto 0;
    padding: 5px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 600;
  }

  .planner-collapse-btn:active {
    background: var(--surface-2);
    transform: none;
  }
}

/* ---------- Form içeriği (kompakt) ---------- */
.planner-form .field-label {
  margin-bottom: 3px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.planner-endpoints {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 8px;
}

.planner-endpoint-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 22px;
  width: 10px;
  flex-shrink: 0;
}

.planner-rail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--surface);
  flex-shrink: 0;
}

.planner-rail-dot.is-end {
  background: var(--primary);
}

.planner-rail-line {
  flex: 1;
  width: 2px;
  min-height: 18px;
  margin: 2px 0;
  background: var(--border);
}

.planner-endpoint-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.planner-field-wrap {
  position: relative;
}

.planner-input-row {
  display: flex;
  gap: 6px;
}

.planner-input-row input {
  flex: 1;
  min-width: 0;
}

/* Kompakt ikon buton grubu (harita + konum) */
.planner-icon-group {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
}

.planner-form .planner-icon-btn,
.planner-form .planner-swap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 500;
  font-size: inherit;
  line-height: 0;
  box-shadow: none;
  transform: none;
  filter: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.planner-form .planner-icon-btn:hover,
.planner-form .planner-swap-btn:hover,
.planner-form .planner-icon-btn:active,
.planner-form .planner-swap-btn:active {
  transform: none;
  filter: none;
  box-shadow: none;
}

.planner-form .planner-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border-width: 1px;
}

.planner-form .planner-icon-btn:hover {
  background: var(--surface-3);
  border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
  color: var(--primary);
}

.planner-form .planner-icon-btn.is-active {
  background: var(--primary-weak);
  border-color: var(--primary);
  color: var(--primary);
}

.planner-form .planner-icon-btn svg,
.planner-form .planner-swap-btn svg {
  display: block;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.planner-form .planner-swap-btn {
  align-self: center;
  width: 30px;
  height: 30px;
  margin-top: 14px;
  border-radius: 50%;
  background: var(--surface);
  border-width: 1px;
}

.planner-form .planner-swap-btn:hover {
  background: var(--surface-3);
  border-color: var(--primary);
  color: var(--primary);
}

/* Inputs */
.planner-field-wrap input[type="text"],
.planner-field-wrap input[type="date"],
.planner-field-wrap input[type="time"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  font: inherit;
  font-size: 0.875rem;
  color: var(--text);
}

.planner-field-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-weak);
}

.planner-form #searchBtn {
  padding: 10px 14px;
  font-size: 0.875rem;
  border-radius: 10px;
}

.planner-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  min-height: 28px;
  cursor: pointer;
  user-select: none;
}

.planner-filter-label {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.planner-filter-switch {
  position: relative;
  width: 44px;
  height: 26px;
  margin: 0;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  background: color-mix(in srgb, var(--muted) 38%, var(--surface-3));
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--muted) 44%, var(--border));
  box-shadow: inset 0 1px 2px rgba(15, 27, 45, 0.1);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.planner-filter-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-solid);
  border: 1px solid color-mix(in srgb, var(--muted) 36%, var(--border));
  box-shadow:
    0 1px 3px rgba(15, 27, 45, 0.16),
    0 2px 6px rgba(15, 27, 45, 0.1);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.planner-filter-switch:checked {
  background: var(--success, #16a34a);
  border-color: var(--success, #16a34a);
  box-shadow: none;
}

.planner-filter-switch:checked::after {
  transform: translateX(18px);
  background: var(--on-primary, #fff);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .planner-filter-switch {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .planner-filter-switch::after {
  background: color-mix(in srgb, var(--text) 90%, var(--surface-solid));
  border-color: color-mix(in srgb, var(--muted) 30%, var(--border));
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.38);
}

:root[data-theme="dark"] .planner-filter-switch:checked::after {
  background: var(--on-primary, #fff);
  border-color: rgba(255, 255, 255, 0.35);
}

.planner-filter-switch:focus-visible {
  outline: 2px solid var(--primary, #4f46e5);
  outline-offset: 2px;
}

.planner-form-error {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: #b91c1c;
  line-height: 1.45;
  white-space: pre-wrap;
}

/* Suggestions dropdown */
.planner-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 180px;
  overflow-y: auto;
}

.planner-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text);
}

.planner-suggestion-item:last-child {
  border-bottom: none;
}

.planner-suggestion-item:hover,
.planner-suggestion-item:active {
  background: var(--surface-2);
}

.planner-suggestion-badge {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-soft, rgba(59, 130, 246, 0.15));
  color: var(--accent, #2563eb);
}

/* ---------- Harita — her zaman kalan alanı doldurur ---------- */
.planner-map-col {
  position: relative;
  flex: 1;
  min-height: 0;
  /* Leaflet zoom (+/−) sol üst — rehber lejantı bu şeridi kaplamasın */
  --planner-map-zoom-gutter: 52px;
}

.planner-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Başlangıç (A) / Varış (B) harita işaretleri */
.planner-marker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 1px 2px rgba(15, 27, 45, 0.12),
    0 4px 12px rgba(15, 27, 45, 0.16);
}

.planner-marker.is-from {
  background: linear-gradient(145deg, #3b82f6, #2563eb);
}

.planner-marker.is-to {
  background: linear-gradient(145deg, #f43f5e, #e11d48);
}

.planner-map-col.is-picking .planner-map {
  cursor: grab;
}

.planner-map-col.is-picking .leaflet-container {
  cursor: grab !important;
}

.planner-map-col.is-picking.is-dragging .planner-map,
.planner-map-col.is-picking.is-dragging .leaflet-container {
  cursor: grabbing !important;
}

.planner-map-center-pin {
  --pin-head: 24px;
  --pin-stem: 17px;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1050;
  width: 32px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  transform: translate(-50%, -100%);
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.planner-map-center-pin.hidden {
  display: none;
}

.planner-map-center-pin-head {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--pin-head);
  height: var(--pin-head);
  border-radius: 50%;
  background: var(--primary-grad);
  transform: translateX(-50%);
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.5),
    0 0 18px color-mix(in srgb, var(--primary) 45%, transparent),
    0 8px 20px color-mix(in srgb, var(--violet) 28%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -1px 0 rgba(15, 27, 45, 0.14);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
  transform-origin: 50% 100%;
  animation: planner-pin-glow 2.4s ease-in-out infinite;
  overflow: hidden;
}

.planner-map-center-pin-head::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 48%,
    transparent 62%
  );
  animation: planner-pin-sheen 2.8s ease-in-out infinite;
}

.planner-map-center-pin-head::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent),
    0 0 10px rgba(255, 255, 255, 0.7);
  transform: translate(-50%, -50%);
  animation: planner-pin-dot 2.4s ease-in-out infinite;
}

.planner-map-center-pin-stem {
  position: absolute;
  left: 50%;
  top: calc(var(--pin-head) - 1px);
  width: 2.5px;
  height: var(--pin-stem);
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    var(--primary) 0%,
    color-mix(in srgb, var(--violet) 85%, var(--primary)) 100%
  );
  transform: translateX(-50%);
  box-shadow: 0 0 8px color-mix(in srgb, var(--primary) 35%, transparent);
  transition: height 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  opacity: 0.96;
}

.planner-map-center-pin-tip {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-top: 8px solid var(--primary);
  background: none;
  border-radius: 0;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--primary) 50%, transparent));
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.planner-map-center-pin-ring {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--primary) 55%, transparent);
  background: color-mix(in srgb, var(--primary-weak) 55%, transparent);
  transform: translateX(-50%) scale(1);
  opacity: 0.55;
  animation: planner-pin-ring 1.8s ease-out infinite;
}

.planner-map-center-pin-ring.is-delayed {
  animation-delay: 0.9s;
  border-color: color-mix(in srgb, var(--violet) 45%, transparent);
}

.planner-map-center-pin-shadow {
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 14px;
  height: 4px;
  border-radius: 50%;
  background: rgba(15, 27, 45, 0.26);
  transform: translateX(-50%);
  transition: transform 0.28s ease, opacity 0.28s ease, width 0.28s ease;
  animation: planner-pin-shadow-breathe 2.4s ease-in-out infinite;
}

.planner-map-col.is-dragging .planner-map-center-pin {
  transform: translate(-50%, calc(-100% - 16px));
}

.planner-map-col.is-dragging .planner-map-center-pin-head {
  transform: translateX(-50%) scale(1.1);
  animation: none;
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.55),
    0 0 28px color-mix(in srgb, var(--primary) 55%, transparent),
    0 12px 28px color-mix(in srgb, var(--violet) 35%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.planner-map-col.is-dragging .planner-map-center-pin-head::before,
.planner-map-col.is-dragging .planner-map-center-pin-head::after {
  animation: none;
}

.planner-map-col.is-dragging .planner-map-center-pin-stem {
  height: calc(var(--pin-stem) + 4px);
  opacity: 0.85;
}

.planner-map-col.is-dragging .planner-map-center-pin-ring {
  animation: none;
  opacity: 0.22;
  transform: translateX(-50%) scale(1.7);
}

.planner-map-col.is-dragging .planner-map-center-pin-shadow {
  animation: none;
  width: 22px;
  opacity: 0.32;
  transform: translateX(-50%) scale(1.25);
}

.planner-map-col.is-picking:not(.is-dragging) .planner-map-center-pin {
  animation:
    planner-pin-drop-in 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    planner-pin-idle-hop 3.2s cubic-bezier(0.34, 1.56, 0.64, 1) 2.4s infinite;
}

.planner-map-col.is-picking:not(.is-dragging) .planner-map-center-pin-shadow {
  animation:
    planner-pin-shadow-breathe 2.4s ease-in-out infinite,
    planner-pin-shadow-hop 3.2s ease-in-out 2.4s infinite;
}

.planner-map-col.is-picking:not(.is-dragging) .planner-map-center-pin-head {
  animation:
    planner-pin-settle 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    planner-pin-glow 2.4s ease-in-out 0.65s infinite;
}

@keyframes planner-pin-drop-in {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 28px)) scale(0.86);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, calc(-100% + 3px)) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -100%) scale(1);
  }
}

@keyframes planner-pin-settle {
  0% { transform: translateX(-50%) translateY(-12px) scale(1.08); }
  55% { transform: translateX(-50%) translateY(3px) scale(0.96); }
  78% { transform: translateX(-50%) translateY(-1px) scale(1.02); }
  100% { transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes planner-pin-glow {
  0%, 100% {
    box-shadow:
      0 0 0 0.5px rgba(255, 255, 255, 0.5),
      0 0 14px color-mix(in srgb, var(--primary) 38%, transparent),
      0 8px 18px color-mix(in srgb, var(--violet) 24%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.62),
      inset 0 -1px 0 rgba(15, 27, 45, 0.14);
  }
  50% {
    box-shadow:
      0 0 0 0.5px rgba(255, 255, 255, 0.65),
      0 0 26px color-mix(in srgb, var(--primary) 58%, transparent),
      0 10px 24px color-mix(in srgb, var(--violet) 38%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.72),
      inset 0 -1px 0 rgba(15, 27, 45, 0.12);
  }
}

@keyframes planner-pin-sheen {
  0%, 35% { transform: translateX(-60%) rotate(18deg); opacity: 0; }
  50% { opacity: 1; }
  65%, 100% { transform: translateX(60%) rotate(18deg); opacity: 0; }
}

@keyframes planner-pin-dot {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.18); }
}

@keyframes planner-pin-ring {
  0% {
    transform: translateX(-50%) scale(0.55);
    opacity: 0.7;
  }
  75% {
    transform: translateX(-50%) scale(2.35);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) scale(2.35);
    opacity: 0;
  }
}

@keyframes planner-pin-shadow-breathe {
  0%, 100% {
    width: 14px;
    opacity: 0.26;
  }
  50% {
    width: 18px;
    opacity: 0.18;
  }
}

@keyframes planner-pin-idle-hop {
  0%, 32%, 100% {
    transform: translate(-50%, -100%);
  }
  6% {
    transform: translate(-50%, calc(-100% - 18px)) scale(1.04, 0.96);
  }
  13% {
    transform: translate(-50%, -100%) scale(0.96, 1.05);
  }
  19% {
    transform: translate(-50%, calc(-100% - 9px));
  }
  26% {
    transform: translate(-50%, -100%) scale(0.985, 1.02);
  }
}

@keyframes planner-pin-shadow-hop {
  0%, 32%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.26;
  }
  6% {
    transform: translateX(-50%) scale(1.5);
    opacity: 0.12;
  }
  13% {
    transform: translateX(-50%) scale(0.9);
    opacity: 0.3;
  }
  19% {
    transform: translateX(-50%) scale(1.3);
    opacity: 0.16;
  }
  26% {
    transform: translateX(-50%) scale(1);
    opacity: 0.26;
  }
}

@media (prefers-reduced-motion: reduce) {
  .planner-map-center-pin,
  .planner-map-center-pin-head,
  .planner-map-center-pin-head::before,
  .planner-map-center-pin-head::after,
  .planner-map-center-pin-ring,
  .planner-map-center-pin-shadow,
  .planner-map-col.is-picking:not(.is-dragging) .planner-map-center-pin,
  .planner-map-col.is-picking:not(.is-dragging) .planner-map-center-pin-head {
    animation: none !important;
  }
}

.planner-map-pick-confirm {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: var(--primary-grad, linear-gradient(135deg, #4f46e5, #7c3aed));
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.planner-map-pick-confirm svg {
  display: block;
}

.planner-map-pick-confirm:hover {
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45);
}

.planner-map-pick-confirm:active {
  transform: scale(0.95);
}

.planner-map-pick-banner {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tab-bar-offset, 74px) + 8px);
  z-index: 1100;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  padding: 6px 6px 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.18);
  pointer-events: auto;
}

.planner-disabled-screen {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem calc(5rem + env(safe-area-inset-bottom));
}

.planner-disabled-screen.hidden {
  display: none;
}

.planner-disabled-card {
  max-width: 420px;
  width: 100%;
  padding: 1.25rem;
  text-align: center;
}

.planner-disabled-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.planner-disabled-text {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.planner-disabled-cta {
  display: inline-flex;
  text-decoration: none;
}

.planner-map-pick-banner.hidden {
  display: none;
}

.planner-map-pick-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 28%, transparent);
  animation: planner-pick-pulse 1.6s ease-out infinite;
}

@keyframes planner-pick-pulse {
  0% {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent);
  }
  70% {
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--primary) 0%, transparent);
  }
  100% {
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--primary) 0%, transparent);
  }
}

.planner-map-pick-text {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-map-pick-cancel {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--surface-2);
  font: inherit;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
  box-shadow: none;
  transform: none;
  filter: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.planner-map-pick-cancel:hover {
  color: var(--text);
  background: var(--surface-3);
}

.planner-map-legend {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tab-bar-offset) + 8px);
  z-index: 1050;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 8px;
  row-gap: 3px;
  max-width: min(380px, calc(100% - 20px));
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
  line-height: 1.15;
}

.planner-map-legend.hidden {
  display: none;
}

.planner-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.planner-legend-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.planner-legend-line {
  display: inline-block;
  width: 14px;
  height: 3px;
  border: none;
  border-radius: 999px;
  background: currentColor;
}

.planner-legend-item.is-walk {
  color: #5b8a72;
}

.planner-legend-item.is-walk .planner-legend-line {
  background-image: linear-gradient(
    90deg,
    #5b8a72 0 2px,
    transparent 2px 5px,
    #5b8a72 5px 7px,
    transparent 7px 10px,
    #5b8a72 10px 12px,
    transparent 12px 14px
  );
  background-color: transparent;
  height: 3px;
}

.planner-legend-item.is-bus {
  color: #2563eb;
}

.planner-legend-item.is-tram {
  color: #9333ea;
}

.planner-legend-item.is-transit {
  color: #2563eb;
}

.planner-legend-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
}

.planner-map-col.is-picking .planner-map-legend {
  display: none;
}

/* Canlı rehber — lejant rota önizlemesiyle aynı yatay pill (üstte sabit) */
.planner-map-legend.is-guide-legend {
  left: calc(10px + var(--planner-map-zoom-gutter));
  right: 10px;
  bottom: auto;
  top: calc(8px + env(safe-area-inset-top, 0px));
  transform: none;
  max-width: none;
  width: auto;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 0.625rem;
  border-radius: 999px;
  pointer-events: none;
}

/*
 * PWA / dokunmatik: absolute + transform harita kutusuna göre kayar (100dvh hatası).
 * JS --planner-map-legend-* ile viewport'a sabitler (WebKit #254868: fixed tercih).
 */
.planner-map-legend.is-legend-fixed {
  position: fixed;
  z-index: 1100;
  transform: none !important;
}

.planner-map-legend.is-legend-fixed.is-guide-legend {
  top: var(--planner-map-legend-top, calc(env(safe-area-inset-top, 0px) + 52px));
  left: calc(10px + var(--planner-map-zoom-gutter));
  right: 10px;
  bottom: auto;
  width: auto;
  max-width: none;
}

.planner-map-legend.is-legend-fixed:not(.is-guide-legend) {
  top: auto;
  left: 12px;
  right: 12px;
  bottom: var(--planner-map-legend-bottom, calc(12px + env(safe-area-inset-bottom, 0px)));
  width: fit-content;
  max-width: calc(100% - 24px);
  margin-inline: auto;
}

/* Rehber açıkken alt panel */
.planner-results.is-detail.is-guide-mode {
  max-height: min(52vh, calc(100dvh - 72px));
}

html.is-standalone-app .planner-results.is-detail.is-guide-mode {
  max-height: min(52vh, calc(var(--app-height, 100vh) - 72px));
}

.planner-results.is-detail.is-guide-mode .planner-detail-scroll {
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.guide-panel {
  padding: 4px 0 2px;
}

.guide-card.guide-active {
  padding: 10px 12px;
  border-width: 1.5px;
}

.guide-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.guide-topbar .guide-progress {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.guide-topbar .guide-conn {
  flex-shrink: 0;
}

.guide-topbar .guide-cancel-link {
  all: unset;
  box-sizing: border-box;
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.guide-topbar .guide-cancel-link:active {
  color: var(--danger, #dc2626);
}

.guide-step-head + .guide-live {
  margin-top: 6px;
}

.guide-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.guide-link {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  padding: 4px 2px;
  -webkit-tap-highlight-color: transparent;
}

.guide-link:active {
  opacity: 0.75;
}

.guide-next {
  margin-top: 6px;
  border-top: 1px solid var(--border, #e5e7eb);
}

.guide-next summary {
  padding: 8px 2px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.guide-next-list {
  margin: 0 0 4px;
  padding: 0 0 0 1.1rem;
  font-size: 0.75rem;
  line-height: 1.35;
}

.guide-next-list li {
  margin-bottom: 4px;
}

@media (max-width: 767px) {
  .planner-results.is-results-compact {
    max-height: min(22vh, calc(100dvh - 340px));
  }

  html.is-standalone-app .planner-results.is-results-compact {
    max-height: min(22vh, calc(var(--app-height, 100vh) - 340px));
  }

  .planner-results.is-detail.is-guide-mode {
    max-height: min(44vh, calc(100dvh - 100px));
    border-radius: 14px 14px 0 0;
  }

  .planner-results.is-detail.is-guide-mode.is-results-compact {
    max-height: min(22vh, calc(100dvh - 340px));
  }

  .planner-results.is-detail.is-guide-mode .sheet-handle {
    margin: 6px auto 2px;
    width: 32px;
    height: 3px;
  }

  .planner-results.is-detail.is-guide-mode .planner-results-header {
    display: none;
  }

  .planner-results.is-detail.is-guide-mode .planner-detail-scroll {
    padding: 0 10px calc(8px + env(safe-area-inset-bottom));
  }

  .planner-results.is-detail.is-guide-mode .guide-panel {
    padding: 2px 0 0;
  }

  .planner-results.is-detail.is-guide-mode .guide-plan {
    display: none;
  }

  .guide-card.guide-active {
    padding: 8px 10px;
    box-shadow: none;
  }

  .guide-topbar {
    margin-bottom: 6px;
  }

  .guide-step-head {
    gap: 0;
  }

  .guide-step-icon {
    display: none;
  }

  .guide-step-title {
    font-size: 0.875rem;
    line-height: 1.3;
  }

  .guide-step-sub {
    font-size: 0.6875rem;
    margin: 0;
  }

  .guide-step-head + .guide-live {
    margin-top: 4px;
    padding: 5px 8px;
    font-size: 0.6875rem;
    line-height: 1.3;
    border-radius: 6px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .guide-live-buffer {
    display: none;
  }

  .guide-actions {
    margin-top: 8px;
    gap: 6px;
  }

  .guide-primary {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.875rem;
    border-radius: 8px;
    box-shadow: none;
  }

  .guide-actions-row {
    gap: 10px;
  }

  .guide-next summary {
    padding: 6px 0;
    font-size: 0.6875rem;
  }

  .guide-next-list {
    font-size: 0.6875rem;
  }
}

.planner-map-loading {
  position: absolute;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Drag handle (bottom sheet'ler için) ---------- */
.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 6px;
  flex-shrink: 0;
}

/* ---------- Sonuçlar — mobilde fixed bottom sheet ---------- */
.planner-results {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--tab-bar-offset);
  z-index: 700;
  max-height: 42vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 28px rgba(15, 23, 42, 0.13);
  overflow: hidden;
  transition: max-height 0.22s ease;
}

/* Form düzenleme açıkken sonuç paneli küçülür (liste, detay, rehber) */
.planner-results.is-results-compact {
  max-height: min(26vh, calc(100dvh - 300px));
}

html.is-standalone-app .planner-results.is-results-compact {
  max-height: min(26vh, calc(var(--app-height, 100vh) - 300px));
}

.planner-results.hidden {
  display: none;
}

.planner-results-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0 14px 8px;
}

.planner-results-heading {
  flex: 1;
  min-width: 0;
}

.planner-results-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.planner-results.is-detail .planner-results-title {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9375rem;
  color: var(--text);
}

.planner-results.is-detail {
  max-height: 52vh;
}

.planner-results.is-detail.is-results-compact {
  max-height: min(26vh, calc(100dvh - 300px));
}

html.is-standalone-app .planner-results.is-detail.is-results-compact {
  max-height: min(26vh, calc(var(--app-height, 100vh) - 300px));
}

.planner-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  padding: 6px 10px 6px 6px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.planner-back-btn.hidden {
  display: none;
}

.planner-results-view.hidden {
  display: none;
}

.planner-results-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.planner-detail-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 14px calc(12px + env(safe-area-inset-bottom));
}

.planner-detail-meta {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.planner-detail-meta.hidden {
  display: none;
}

.itinerary-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom));
}

/* ---------- Güzergah kartları ---------- */
.itinerary-card {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}

.itinerary-card:active {
  background: var(--surface-2);
}

.itinerary-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-weak);
}

.itinerary-card-left {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 52px;
}

.itinerary-duration {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.itinerary-distance {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 1px;
}

.itinerary-card-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.itinerary-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.itinerary-walk {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #16a34a;
}

.itinerary-route-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.itinerary-tram-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #6d28d9;
  background: #ede9fe;
}

.itinerary-transfer {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.itinerary-times {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.itinerary-time-dep {
  color: #16a34a;
}

/* ---------- Timeline ---------- */
.planner-timeline {
  position: relative;
  padding-left: 26px;
}

.planner-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.tl-item {
  position: relative;
  padding-bottom: 14px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-dot {
  position: absolute;
  left: -26px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--surface);
  box-sizing: border-box;
}

.tl-dot.is-solid {
  background: var(--text);
  border-color: var(--text);
}

.tl-dot.is-walk {
  border-color: #16a34a;
  background: #dcfce7;
}

.tl-dot.is-tram {
  border-color: #9333ea;
  background: #ede9fe;
}

.tl-dot.is-bus {
  border-color: #2563eb;
  background: #dbeafe;
}

.tl-tram-icon,
.tl-bus-icon {
  display: inline-block;
  margin-right: 3px;
}

.tl-time {
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 1px;
  color: var(--muted);
}

.tl-title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.tl-sub {
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 500;
}

.tl-walk-icon {
  display: inline-block;
  margin-right: 3px;
}

.tl-route-badge {
  display: inline-block;
  margin: 4px 0;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
}

.tl-stop-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

/* ====================================================
   MASAÜSTÜ — geniş ekran + fare (telefon PWA / landscape dokunma hariç)
   ==================================================== */
@media (min-width: 768px) and (pointer: fine) {
  /* Masaüstünde lejant haritanın altında kompakt kalır */
  .planner-map-col.is-guide-active .planner-map-legend.is-guide-legend:not(.is-legend-fixed) {
    top: auto;
    left: 50%;
    right: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    max-width: min(520px, calc(100% - 24px));
    width: max-content;
  }

  .planner-results.is-results-compact {
    flex: 0 1 auto;
    max-height: min(220px, 32vh);
  }

  .planner-results.is-detail.is-guide-mode {
    max-height: none;
  }

  .planner-results.is-detail.is-guide-mode.is-results-compact {
    flex: 0 1 auto;
    max-height: min(220px, 32vh);
  }

  .planner-layout {
    flex-direction: row;
  }

  .planner-side {
    width: min(420px, 42vw);
    flex-shrink: 0;
    min-height: 0;
    overflow: hidden;
    border-right: 1px solid var(--border);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .planner-form {
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .planner-map-col {
    flex: 1;
    min-height: 0;
  }

  /* Masaüstünde sonuçlar sol panelde, formun altında sabit yükseklikte kayar */
  .planner-results {
    position: static;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: none;
    background: var(--surface);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .planner-results.hidden {
    display: none;
  }

  .planner-results .sheet-handle {
    display: none;
  }

  .planner-results-header {
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
  }

  .planner-results-view {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .itinerary-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 10px 12px;
  }

  .planner-detail-scroll {
    padding: 0 12px 12px;
  }

  .planner-results.is-detail {
    max-height: none;
  }
}

/* ====================================================
   TRIP GUIDE — Adım adım canlı rehber
   ==================================================== */
.guide-cta {
  padding: 12px 4px 4px;
}
.guide-cta.hidden,
.guide-panel.hidden {
  display: none;
}
.guide-start-btn {
  font-weight: 700;
  font-size: 15px;
}
.guide-cta-hint {
  margin: 8px 2px 0;
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  line-height: 1.4;
}

.guide-panel {
  padding: 10px 2px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-sm, 12px);
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.guide-card.guide-active {
  border-color: #f59e0b;
  border-width: 2px;
}

.guide-progress {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  margin-bottom: 8px;
}

.guide-step-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.guide-step-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.guide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.guide-icon svg {
  display: block;
  width: 1em;
  height: 1em;
}
.guide-icon-arrive {
  color: #0f766e;
}
.guide-icon-arrive svg path {
  fill: currentColor;
}
.guide-step-main {
  flex: 1;
  min-width: 0;
}
.guide-step-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #111827);
}
.guide-step-sub {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text-muted, #6b7280);
}

.guide-plan {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  margin-top: 2px;
}
.guide-plan.is-late {
  color: #b45309;
  font-weight: 600;
}

.guide-schedule-tariff {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.guide-schedule-tariff.is-end {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
  font-weight: 600;
}

.guide-live {
  margin-top: 6px;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface-2, #f3f4f6);
}
.guide-live-active {
  background: #ecfdf5;
  color: #065f46;
}
.guide-live-empty {
  background: #fef2f2;
  color: #991b1b;
}
.guide-live-warn {
  background: #fffbeb;
  color: #92400e;
}
.guide-live-relaxed {
  background: #ecfdf5;
  color: #065f46;
}
.guide-live-hurry {
  background: #fffbeb;
  color: #92400e;
  font-weight: 600;
}
.guide-live-risky {
  background: #fff7ed;
  color: #c2410c;
  font-weight: 700;
}
.guide-live-missed {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
}
.guide-live-buffer {
  font-size: 12px;
  opacity: 0.9;
}
.guide-live-urgent {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
  animation: guidePulse 1.2s ease-in-out infinite;
}
@keyframes guidePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(220, 38, 38, 0); }
}

.guide-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.guide-primary {
  all: unset;
  box-sizing: border-box;
  display: block;
  width: 100%;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.guide-primary:active {
  transform: scale(0.99);
}
.guide-skip,
.guide-secondary {
  background: transparent;
  border: 1px solid var(--border, #e5e7eb);
  color: var(--text-muted, #6b7280);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  cursor: pointer;
}
.guide-secondary {
  font-weight: 600;
  color: var(--text, #111827);
}

.guide-foot {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.guide-conn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: #9ca3af;
}
.guide-conn.is-on {
  background: #22c55e;
}
.guide-conn.is-off {
  background: #f59e0b;
}
.guide-cancel-link {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.guide-next {
  font-size: 13px;
}
.guide-next summary {
  cursor: pointer;
  padding: 8px 4px;
  color: var(--text-muted, #6b7280);
  font-weight: 600;
}
.guide-next-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}
.guide-next-list li {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 4px;
  border-top: 1px solid var(--border, #e5e7eb);
  color: var(--text, #111827);
}

.guide-error {
  background: #fef2f2;
  color: #991b1b;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  margin: 0 0 8px;
}

.guide-done .guide-step-icon {
  font-size: 36px;
}

.guide-popup-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: #16a34a;
  color: #fff;
  margin-bottom: 6px;
}

.guide-popup-badge-alight {
  background: #dc2626;
}

.guide-popup-badge-transfer {
  background: linear-gradient(90deg, #2563eb 0%, #9333ea 100%);
}

/* Eski başlık sınıfı — geriye uyumluluk */
.planner-guide-legend-title {
  flex-basis: 100%;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #6b7280);
  margin-bottom: 2px;
}

.planner-legend-dot.guide-legend-boarding {
  background: #2563eb;
  border-radius: 50%;
}

.planner-legend-dot.guide-legend-alighting {
  background: #dc2626;
  border-radius: 50%;
}

/* Rehber haritası: biniş / iniş noktaları */
.planner-map-dot-icon {
  background: transparent !important;
  border: none !important;
}

.planner-map-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.planner-map-dot--board {
  background: #2563eb;
}

.planner-map-dot--alight {
  background: #dc2626;
}

.planner-map-dot.is-active {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px currentColor;
}

.planner-map-dot--board.is-active {
  color: #2563eb;
}

.planner-map-dot--alight.is-active {
  color: #dc2626;
}

/* Toast (SSE olay mesajları) */
.guide-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  max-width: 90vw;
  text-align: center;
  z-index: 4000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.guide-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Devam eden yolculuk bandı (global button stillerinden bağımsız) */
.guide-resume-banner {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: 12px;
  right: 12px;
  transform: none;
  box-sizing: border-box;
  background: #1e40af;
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 0;
  padding: 10px 10px 10px 12px;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  z-index: 4000;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22);
  max-width: none;
  width: auto;
}

.guide-resume-banner__text {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
  font-weight: inherit;
}

.guide-resume-banner__btn,
.guide-resume-banner__dismiss {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.guide-resume-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 8px;
  background: #fff;
  color: #1e40af;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.guide-resume-banner__btn:active {
  opacity: 0.92;
}

.guide-resume-banner__dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 400;
}

.guide-resume-banner__dismiss:active {
  background: rgba(255, 255, 255, 0.12);
}

@media (min-width: 480px) {
  .guide-resume-banner {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(420px, calc(100% - 24px));
  }
}
