.trip-panel--live {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
  min-height: calc(100vh - 160px);
}

.trip-live-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: min(48vh, 420px);
  background: #e8eef5;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border, #e5e2dc);
}

.trip-nav-map {
  width: 100%;
  height: 100%;
  min-height: min(48vh, 420px);
  background: #e8eef5;
}

.trip-nav-map .delivery-map-frame,
.trip-nav-map .gm-style {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
}

.trip-guidance-float {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 3;
  pointer-events: none;
}

.trip-guidance-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border, #e5e2dc);
  box-shadow: 0 10px 28px rgba(28, 25, 23, 0.12);
  pointer-events: none;
}

.trip-turn-glyph {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--mist, #f3f1ed);
  font-size: 1.2rem;
  color: var(--ink, #1c1917);
}

.trip-guidance-copy {
  min-width: 0;
  flex: 1;
}

.trip-guidance-eyebrow {
  margin: 0 0 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #6b6560);
}

.trip-nav-instruction {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text, #1c1917);
}

.trip-guidance-meta {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--muted, #6b6560);
}

.trip-map-controls {
  position: absolute;
  z-index: 8;
  left: 10px;
  right: 10px;
  bottom: calc(var(--trip-sheet-h, 132px) + 10px);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.trip-map-controls > * {
  pointer-events: auto;
}

.trip-recenter-btn {
  appearance: none;
  position: static;
  z-index: 5;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.18);
  color: #1a73e8;
  cursor: pointer;
}

.trip-recenter-btn svg {
  display: block;
  margin: 0 auto;
}

.trip-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  margin: 0;
  padding: 0 16px 12px;
  border-radius: 18px 18px 0 0;
  background: var(--panel, #fff);
  border: 1px solid var(--border, #e5e2dc);
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: 0 -8px 28px rgba(28, 25, 23, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.trip-sheet-handle {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 22px;
  margin: 0;
  padding: 6px 0 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.trip-sheet-handle-bar {
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: #dadce0;
}

.trip-sheet-peek {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trip-sheet-peek-copy {
  min-width: 0;
  flex: 1;
}

.trip-sheet-eta {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text, #1c1917);
}

.trip-sheet-dest {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--muted, #6b6560);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trip-sheet-peek-actions {
  flex: 0 0 auto;
}

.trip-sheet-primary {
  min-height: 40px;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.trip-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.trip-sheet-body[hidden] {
  display: none !important;
}

.trip-nav-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trip-nav-status {
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: var(--muted, #6b6560);
}

.trip-nav-error {
  padding: 16px;
  color: var(--danger, #b42318);
  font-size: 0.92rem;
  line-height: 1.45;
}

.trip-nav-error ul {
  margin: 8px 0;
  padding-left: 18px;
}

.trip-nav-error code {
  font-family: Consolas, monospace;
  font-size: 0.88rem;
}

body.driver-trip-active .topbar {
  margin-bottom: 10px;
}

body.driver-trip-active #trip-view {
  margin: 0;
}

body.driver-trip-active .driver-portal-banner,
body.driver-trip-active .topbar {
  display: none !important;
}

body.driver-trip-active #driver-tab-ask,
body.driver-trip-active .driver-tab-ask {
  display: none !important;
}

body.driver-trip-active #trip-view {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

body.driver-trip-active .main {
  padding: 0 !important;
  overflow: hidden;
}

body.driver-trip-active .app {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.trip-panel--live {
  position: absolute;
  inset: 0;
  min-height: 0;
  height: 100%;
}

.trip-live-stage,
.trip-nav-map,
.trip-nav-map .delivery-map-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 0;
  height: 100% !important;
  border: 0;
  border-radius: 0;
  pointer-events: auto;
  touch-action: manipulation;
}

.trip-guidance-float {
  z-index: 8;
  top: max(8px, env(safe-area-inset-top, 0px));
  left: 10px;
  right: 10px;
}

.trip-maps-icon {
  appearance: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.18);
  color: #1a73e8;
  cursor: pointer;
}

.trip-maps-icon svg {
  display: block;
  margin: 0 auto;
}

.trip-order-icon {
  appearance: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.18);
  color: #1a73e8;
  cursor: pointer;
}

.trip-order-icon svg {
  display: block;
  margin: 0 auto;
}

.trip-order-icon.is-open {
  background: #e8f0fe;
}

.trip-order-panel {
  position: absolute;
  z-index: 9;
  left: 10px;
  width: min(360px, calc(100% - 20px));
  bottom: calc(var(--trip-sheet-h, 132px) + 62px);
  max-height: min(42vh, 320px);
  overflow: auto;
  margin: 0;
  padding: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.22);
}

.trip-order-panel[hidden] {
  display: none !important;
}

.trip-order-panel .shop-order {
  margin: 0;
  border: 0;
  background: transparent;
}

.trip-guidance-card {
  padding: 8px 10px;
  gap: 8px;
}

.trip-turn-glyph {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.trip-nav-instruction {
  font-size: 0.88rem;
}

.trip-sheet.is-collapsed {
  overflow: hidden;
}

.trip-sheet.is-expanded .trip-sheet-body {
  max-height: min(42dvh, 320px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 4px;
}

.trip-nav-controls {
  gap: 6px;
}

.trip-voice-toggle {
  appearance: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.18);
  color: #1a73e8;
  cursor: pointer;
}

.trip-voice-toggle .trip-voice-icon {
  display: block;
  margin: 0 auto;
}

.trip-voice-toggle .trip-voice-icon--off,
.trip-voice-toggle.is-muted .trip-voice-icon--on {
  display: none;
}

.trip-voice-toggle.is-muted .trip-voice-icon--off {
  display: block;
}

.trip-job-title {
  font-size: 0.92rem;
}

.trip-destination-card {
  padding: 6px 8px;
}

.trip-nav-status,
.trip-quiet-hint {
  font-size: 0.74rem;
}

@media (max-width: 1024px) and (orientation: portrait), (max-width: 700px) {
  body.driver-trip-active .app,
  body.driver-portal-shell.driver-drawer-nav.driver-trip-active .app {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.driver-trip-active #trip-view {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}
