/* ============================================================
   PHONE MOCKUP + RECREATED "Let's Just Drive" APP UI
   The app UI keeps the product's real system font + exact styling.
   ============================================================ */

.phone {
  --screen-w: 320px;
  --screen-h: 690px;
  position: relative;
  width: var(--screen-w);
  height: var(--screen-h);
  flex-shrink: 0;
  border-radius: 44px;
  background: #0c0f16;
  padding: 13px;
  box-shadow:
    0 0 0 2px #2a2f3a,
    0 2px 0 3px #06080d,
    0 50px 90px -30px rgba(0, 0, 0, 0.75),
    0 30px 60px -40px rgba(37, 99, 235, 0.55);
}

.phone__notch {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: 116px;
  height: 26px;
  background: #0c0f16;
  border-radius: 0 0 16px 16px;
  z-index: 60;
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #111827;
  isolation: isolate;
}

/* status bar */
.ph-status {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 44px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px 0;
  font-size: 13px;
  font-weight: 600;
  color: #0b1220;
  pointer-events: none;
}
.ph-status--light { color: #fff; }
.ph-status__dots { display: flex; align-items: center; gap: 4px; }
.ph-status__dots svg { display: block; }

/* ---- screen stack ---- */
.ph-screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.ph-screen.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ============================================================
   SEARCH SCREEN
   ============================================================ */
.ph-search {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px 30px;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 38%, #eef5f3 100%);
}
.ph-search__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
}
.ph-search__icon img { width: 100%; height: 100%; display: block; }
.ph-card {
  width: 100%;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(15, 30, 60, 0.12);
  padding: 26px 22px 24px;
  margin-bottom: 60px;
}
.ph-brand-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0;
  color: #0b1220;
}
.ph-brand-sub {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  margin: 6px 0 20px;
}
.ph-input {
  position: relative;
  width: 100%;
  height: 50px;
  border: 2px solid #2563eb;
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 16px;
  color: #111827;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.ph-input__text { white-space: nowrap; overflow: hidden; }
.ph-input__placeholder { color: #9ca3af; }
.ph-caret {
  display: inline-block;
  width: 2px;
  height: 22px;
  background: #2563eb;
  margin-left: 1px;
  vertical-align: middle;
  animation: ph-blink 1s steps(2) infinite;
}
@keyframes ph-blink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

/* autocomplete */
.ph-ac {
  margin-top: 8px;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .45s ease, opacity .3s ease;
}
.ph-search.show-ac .ph-ac { max-height: 320px; opacity: 1; }
.ph-ac__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 6px;
  border-bottom: 1px solid #f0f1f3;
  font-size: 15px;
  color: #111827;
  opacity: 0;
  transform: translateY(6px);
}
.ph-search.show-ac .ph-ac__row { animation: ph-rowin .4s ease forwards; }
.ph-search.show-ac .ph-ac__row:nth-child(1) { animation-delay: .05s; }
.ph-search.show-ac .ph-ac__row:nth-child(2) { animation-delay: .12s; }
.ph-search.show-ac .ph-ac__row:nth-child(3) { animation-delay: .19s; }
.ph-search.show-ac .ph-ac__row:nth-child(4) { animation-delay: .26s; }
.ph-search.show-ac .ph-ac__row:nth-child(5) { animation-delay: .33s; }
@keyframes ph-rowin { to { opacity: 1; transform: none; } }
.ph-ac__row b { font-weight: 700; }
.ph-ac__row span { color: #9ca3af; }
.ph-ac__pin { width: 18px; height: 18px; flex-shrink: 0; opacity: .55; }
.ph-ac__credit {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  padding: 8px 6px 2px;
  font-size: 12px;
  color: #9ca3af;
}
.ph-ac__credit b { color: #5f6368; font-weight: 500; }

.ph-go {
  margin-top: 16px;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.96);
  transition: opacity .3s ease, transform .3s ease, background .15s;
}
.ph-search.show-go .ph-go { opacity: 1; transform: none; }
.ph-go.is-tapped { background: #1d4ed8; transform: scale(.97); }

/* ============================================================
   TRIP / LIST SCREEN
   ============================================================ */
.ph-trip {
  height: 100%;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
}
.ph-trip__inner {
  flex: 1;
  overflow: hidden;
  padding: 52px 14px 14px;
}
.ph-trip__scroll {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: transform 3.4s cubic-bezier(.4,0,.2,1);
}
.ph-thead { padding: 0 2px; }
.ph-thead__title {
  font-size: 17px;
  font-weight: 700;
  color: #0b1220;
  margin: 0 0 6px;
  line-height: 1.2;
}
.ph-thead__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}
.ph-thead__meta .sep { color: #d1d5db; }
.ph-thead__meta img { width: 15px; height: 15px; vertical-align: -2px; }
.ph-tctrl { display: flex; gap: 8px; margin-top: 11px; }
.ph-tctrl button {
  flex: 1;
  padding: 8px 0;
  border: 1.5px solid #9ca3af;
  border-radius: 8px;
  background: #fff;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
}

/* station card */
.ph-stn {
  background: #fff;
  border-radius: 9px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  border: 2px solid transparent;
  flex-shrink: 0;
}
.ph-stn.is-sel { border-color: #2563eb; }
.ph-stn__head { display: flex; align-items: flex-start; gap: 8px; }
.ph-stn__logo {
  width: 28px; height: 28px;
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
  line-height: 0;
}
.ph-stn__logo svg { width: 28px; height: 28px; display: block; }
.ph-stn__name { flex: 1; min-width: 0; }
.ph-stn__name b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  line-height: 1.45;
}
.ph-stn__name span {
  font-size: 13px;
  color: #374151;
  line-height: 1.45;
}
.ph-stn__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}
.ph-stn__kw {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  line-height: 1.55;
}
.ph-stn__avail {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.55;
}
.ph-stn__avail img { width: 13px; height: 13px; opacity: .6; }
.av-good { color: #15803d; }
.av-partial { color: #854d0e; }
.av-full { color: #b91c1c; }
.av-none { color: #6b7280; }

/* distance pills */
.ph-dist {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 12.5px;
  color: #374151;
}
.ph-dist__seg { display: flex; align-items: center; gap: 3px; }
.ph-dist__seg img { width: 14px; height: 14px; }
.ph-dist__seg .arr { color: #9ca3af; font-weight: 700; }
.ph-dist__seg .val { font-weight: 600; }
.ph-dist .div { color: #d1d5db; }

/* spark chart */
.ph-spark { margin-top: 7px; }
.ph-spark__plot {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 30px;
  padding-left: 26px;
  border-bottom: 1px solid #d1d5db;
  position: relative;
}
.ph-spark__axis {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 26px;
  border-left: 1px solid #d1d5db;
  font-size: 7px;
  color: #9ca3af;
}
.ph-spark__axis .top { position: absolute; top: 0; left: 3px; }
.ph-spark__axis .bot { position: absolute; bottom: 1px; left: 3px; }
.ph-bar {
  flex: 1;
  height: 0;
  border-radius: .5px;
  transition: height .6s cubic-bezier(.34,1.2,.64,1);
}
.ph-spark.is-on .ph-bar { height: var(--h); }
.ph-spark__times {
  display: flex;
  justify-content: space-between;
  padding: 2px 26px 0;
  font-size: 7px;
  color: #9ca3af;
}

/* amenity pills */
.ph-amen { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ph-amen span {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

/* ============================================================
   MAP SCREEN
   ============================================================ */
.ph-map {
  height: 100%;
  position: relative;
  background: #dCe9d6;
  overflow: hidden;
}
.ph-map__canvas { position: absolute; inset: 0; }
.ph-map__svg { width: 100%; height: 100%; display: block; }
.ph-route-line {
  fill: none;
  stroke: #2563eb;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
}
.ph-map.is-on .ph-route-line { animation: ph-draw 2.4s ease forwards; }
@keyframes ph-draw { to { stroke-dashoffset: 0; } }
.ph-route-glow {
  fill: none;
  stroke: rgba(37,99,235,.28);
  stroke-width: 11;
  stroke-linecap: round;
}
.ph-city { font: 600 9px -apple-system, sans-serif; fill: #4b5563; }
.ph-city-dot { fill: #6b7280; }

.ph-pin {
  position: absolute;
  width: 20px;
  height: 28px;
  transform: translate(-50%, -100%) scale(0);
  transform-origin: 50% 100%;
}
.ph-map.is-on .ph-pin { animation: ph-drop .45s cubic-bezier(.34,1.4,.6,1) forwards; }
@keyframes ph-drop { to { transform: translate(-50%, -100%) scale(1); } }
.ph-pin svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }

.ph-map__toggle {
  position: absolute;
  top: 52px; left: 12px;
  display: flex;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  z-index: 5;
}
.ph-map__toggle span { padding: 8px 16px; color: #5f6368; }
.ph-map__toggle span.on { color: #111827; }
.ph-map__full {
  position: absolute;
  top: 52px; right: 12px;
  width: 38px; height: 38px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
  color: #444;
  z-index: 5;
}

/* floating list thumbnail on map */
.ph-thumb {
  position: absolute;
  bottom: 24px; right: 14px;
  width: 96px; height: 150px;
  border-radius: 13px;
  overflow: hidden;
  background: #f9fafb;
  border: 2.5px solid #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  z-index: 8;
  opacity: 0;
  transform: translateY(10px) scale(.9);
  transition: opacity .5s ease .3s, transform .5s ease .3s;
}
.ph-map.is-on .ph-thumb { opacity: 1; transform: none; }
.ph-thumb__label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 26px;
  background: rgba(0,0,0,.52);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  display: flex; align-items: center; justify-content: center;
}
.ph-thumb__mini { padding: 8px 7px; transform: scale(.92); transform-origin: top left; }
.ph-thumb__mini .mt { font-size: 9px; font-weight: 700; color: #0b1220; line-height: 1.2; }
.ph-thumb__mini .mm { font-size: 7px; color: #6b7280; margin-top: 2px; }
.ph-thumb__row {
  background: #fff;
  border-radius: 5px;
  height: 22px;
  margin-top: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 5px;
}
.ph-thumb__row i { width: 11px; height: 11px; border-radius: 2px; flex-shrink: 0; display: block; }
.ph-thumb__row em { height: 4px; border-radius: 2px; background: #d1d5db; flex: 1; font-style: normal; }

/* loading flash */
.ph-loading {
  position: absolute;
  inset: 0;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.ph-loading.is-on { opacity: 1; }
.ph-spinner {
  width: 34px; height: 34px;
  border: 3px solid #dbe3ef;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: ph-spin .8s linear infinite;
}
@keyframes ph-spin { to { transform: rotate(360deg); } }
.ph-loading p { font-size: 14px; color: #6b7280; margin: 0; }

/* phase progress rail under phone (hero) */
.phone-rail {
  display: flex;
  gap: 7px;
  margin-top: 26px;
  justify-content: center;
}
.phone-rail button {
  border: none;
  background: rgba(255,255,255,.18);
  height: 4px;
  width: 34px;
  border-radius: 2px;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.phone-rail button .fill {
  position: absolute;
  inset: 0;
  background: var(--accent, #2563eb);
  transform: scaleX(0);
  transform-origin: left;
}
.phone-rail button.is-active .fill { animation: rail-fill var(--phase-ms, 5000ms) linear forwards; }
.phone-rail button.is-done .fill { transform: scaleX(1); }
@keyframes rail-fill { to { transform: scaleX(1); } }
