    html, body, #map {
      height: 100%;
      margin: 0;
    }
    
    body {
        background-color: #222222;
    }
    
    @font-face {
      font-family: 'RobotoFlex';
      src: url('https://cdn.kiy.li/fonts/kiyantk/fun/Roboto-Flex.ttf') format('truetype');
      font-weight: 100 1000;   /* <-- declare full range */
      font-stretch: 25% 151%;  /* optional: set full width axis */
      font-style: normal;
    }


    .car-icon {
      transform-origin: center;
    }

    #controls {
      background: rgba(255, 255, 255, 0.54);
      box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(18.5px);
      border: 1px solid rgba(255, 255, 255, 0.64);
      padding: 20px 20px 15px 20px;
      display: none;
      flex-direction: column;
      gap: 6px;
      font-family: "RobotoFlex", sans-serif;
      z-index: 10000;
      font-weight: 420;
      min-width: 250px;
    }
    
    #controls img, .start-menu-banner {
        pointer-events: none;
        user-select: none;
    }

    #toggle-menu {
      position: fixed;
      bottom: 10px;
      left: 10px;
      color: black;
      border: none;
      width: 40px;
      height: 40px;
      font-size: 24px;
      cursor: pointer;
      z-index: 91001;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.54);
      box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(18.5px);
      border: 1px solid rgba(255, 255, 255, 0.64);
    }
    
    #toggle-menu i {
        margin-bottom: 3px;
    }

    label {
      font-size: 14px;
    }

    input[type="number"] {
      width: 80px;
    }
    
    #settingsOdometer {
        font-family: monospace;
        font-size: 16px;
        border: 1px solid black;
        padding: 0px 10px;
        background-color: #fafafa;
    }
    
    .driverBtn {
        background-color: #009847;
        color: white;
        font-size: 20px;
        padding: 10px;
        border-radius: 10px;
        border: none;
        outline: 2px solid white;
        outline-offset: -5px;
        line-height: 1.5;
        cursor: pointer;
    }
    
    .driverBtn:hover {
        background-color: #00aa50;
    }
    
    .driverBtn:disabled {
        cursor: not-allowed;
        background-color: #5b8870;
        color: #d0d0d0;
    }
    
    hr {
        border: 1px solid #d0d0d0;
        width: 100%;
    }
    
    .kiyanfun-btn {
        background-color: white; 
        border: 2px solid black; 
        padding: 5px; 
        border-radius: 10px; 
        width: 142px;
        margin: 0 auto;
        text-align: center;
        cursor: pointer;
    }
    
    .kiyanfun-btn:hover {
        transform: scale(1.05);
    }
    
    .inputs-sidebyside-compact {
        display: grid;
        grid-template-columns: 50% 50%;
        text-align: center;
    }
    
    .inputs-sidebyside-compact label {
        display: inline-grid;
        justify-items: center;
    }
    
    .collapsible {
      background-color: #009847;
      color: white;
      cursor: pointer;
      padding: 6px;
      width: 100%;
      border: none;
      outline: none;
      font-size: 15px;
      text-align: center;
    }
    
    .active, .collapsible:hover {
      background-color: #00aa50;
    }
    
    .content {
      padding: 0 6px;
      display: none;
      overflow: hidden;
      text-align: center;
      margin-bottom: 15px;
      border-left: 1px solid #b9b9b9;
    }
    
    .maplibregl-ctrl-attrib {
        display: none;
    }
    
    #stationName {
        font-family: monospace;
        color: #0fa;
        font-size: 16px;
        font-weight: 700;
        text-shadow: 0 0 5px rgba(0, 255, 170, .7);
    }
    
    #radioToggle, #radioSeek {
        align-items: center;
        background: linear-gradient(180deg, #444, #222);
        border: none;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, .5), inset 0 1px 1px hsla(0, 0%, 100%, .2);
        color: #d3d3d3;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        padding: 8px 12px;
        -webkit-tap-highlight-color: transparent;
        width: 40px;
    }
    
    #radioToggle:active, #radioSeek:active {
        background: linear-gradient(180deg, #333, #111);
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5), 0 1px 1px hsla(0, 0%, 100%, .1);
        transform: translateY(1px);
    }
    
    #radioUI {
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 9999;
        color: white;
        padding: 6px 10px;
        border-radius: 8px;
        display: none;
        background: linear-gradient(180deg, #3e3e3e, #111);
        box-shadow: 0 0 0 1px #333, 0 5px 15px rgba(0, 0, 0, .7), inset 0 1px 1px hsla(0, 0%, 100%, .2);
        min-width: 200px;
        max-width: 200px;
    }
    
    .bottom-bar {
        position: absolute;
        bottom: 10px;
        left: 65px;
        z-index: 91001;
        display: flex;
        gap: 15px;
        user-select: none;
    }
    
    #etaContainer {
        display: none;
        height: 36px;
        padding: 6px 12px;
        min-width: 110px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.54);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(18.5px);
        border: 1px solid rgba(255, 255, 255, 0.64);
        justify-content: center; /* horizontal centering */
        align-items: center;     /* vertical centering */
    }
    
    #etaContainer i {
        font-size: 20px;
    }
    
    #localTimeContainer {
        display: none; 
        height: 36px;
        padding: 5px 12px;
        min-width: 85px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.54);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(18.5px);
        border: 1px solid rgba(255, 255, 255, 0.64);
        align-items: center;
    }
    
    #localTimeContainer span {
        font-family: "RobotoFlex", sans-serif;
        font-size: 20px;
        margin: 0 auto;
        text-align: center;
    }
    
    .controls-container {
        max-height: 80%;
        position: fixed;
        bottom: 60px;
        left: 10px;
        z-index: 100000;
        overflow-y: auto;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    
    #streetViewEmbed1, #streetViewEmbed2 {
        pointer-events: none;
        user-select: none;
    }
    
    #streetViewNoImg {
        display: none;
        width: 100%;
        height: 100%;
        position: absolute;
        object-fit: cover;
        background-color: #0f0f0f;
    }
    
    #streetView {
        background-color: black;
    }
    
    .street-frame {
  position: absolute;
  top: 0;
  left: 0;
  border: none;
}

#streetView iframe {
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.7s linear;
  opacity: 0;
  pointer-events: none;
}
#streetView iframe.visible {
  opacity: 1;
}

#map>a {
    display: none;
}

#collapseMinimap {
    display: none;
    width: 20px;
    height: 20px;
    background-color: white;
    z-index: 9999;
    position: absolute;
    bottom: 294px;
    left: 350px;
    text-align: center;
    border-radius: 20px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    cursor: pointer;
    align-content: center;
}

#collapseMinimap:hover {
    background-color: #e1e1e1;
}

#collapseMinimap i {
    font-size: 14px;
    color: #2f2f2f;
}

#odometerContainer {
    display: none;
    position: absolute;
    background-color: #272727;
    z-index: 91001;
    height: 25px;
}

.odometerDigit, .odometerDigitStatic {
    background: #f0f0f0;
    border-radius: 4px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, .6);
    margin: 0 1px;
    overflow: hidden;
    position: relative;
    width: 25px;
    height: 25px;
    font-family: "RobotoFlex", sans-serif;
    text-align: center;
    color: #1f1f1f;
    font-size: 16px;
    font-weight: 700;
    align-content: center;
}

.digitInner {
    transition: transform 0.5s ease-in-out;
    will-change: transform;
      transform-origin: top left;
}

.digitInner span {
    display: block;
    height: 25px;
    line-height: 25px;
}

#plannerModeMenu {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(18.5px);
    border: 1px solid rgba(255, 255, 255, 0.64);
    z-index: 91001;
    width: 400px;
    justify-content: center;
    justify-items: center;
    padding: 15px 20px;
    font-family: "RobotoFlex", sans-serif;
}

.planner-marker {
    background-color: white;
    border-radius: 20px;
    box-shadow: rgba(14, 30, 37, 0.12) 0px 2px 4px 0px, rgba(14, 30, 37, 0.32) 0px 2px 16px 0px;
    font-size: 14px;
    align-content: center;
    text-align: center;
}

#plannerList {
    /*margin-bottom: 20px;*/
    border: 1px solid gray;
    padding: 10px;
    width: 80%;
    max-height: 150px;
    overflow-y: auto;
    margin: 0 auto;
}

.planner-entry {
    margin-bottom: 5px;
}

.planner-entry button {
    background: none;
    border: none;
    border-radius: 20px;
    margin-left: 10px;
    cursor: pointer;
    color: dimgray;
    float: right;
}

#customRouteIndicator {
    display: none;
    background-color: #ffe3e3;
    padding: 10px 10px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
}

#routePresetsPopupContent {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 30px;
    overflow-y: auto;
    height: 70%;
    justify-items: center;
}

.ts-control {
    padding: 5px !important;
    height: 36px !important;
    flex-wrap: nowrap !important; 
}

.ts-control .item {
    min-width: fit-content;
}

.routePresetsPopupFilter {
  overflow: visible; /* allow dropdowns to escape if needed */
}

.ts-dropdown {
    z-index: 99999 !important;
}

#streetViewCapExplaining {
    font-size: 14px;
    color: gray;
    width: 300px;
    margin-bottom: 5px;
}

#speedIndicatorContainer {
  display: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(18.5px);
  border: 1px solid rgba(255, 255, 255, 0.64);
  width: 40px;
  height: 36px;
  padding: 5px 12px;
  min-width: 40px;
  text-align: center;
  align-content: center;
}

#speedIndicatorValue {
  font-size: 24px;
  color: black;
  font-family: monospace;
  line-height: 0.8;
  text-align: center;
}

#speedIndicatorLabel {
  font-size: 16px;
  color: #626262;
  font-family: monospace;
}

#splash {
    z-index: 99999999999999999999;
}

#start-menu, #pipWindowOpenIndicator {
    z-index: 999999;
    box-shadow: 0 0 25px rgba(0,0,0,0.3) inset;
}

#splash, #start-menu, #pipWindowOpenIndicator {
  position: fixed;
  inset: 0;
  /*background: #009847;*/
  background: #ebebeb;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: opacity 0.5s ease;
}
#splash.hidden, #start-menu.hidden {
  opacity: 0;
  pointer-events: none;
}

#pipWindowOpenIndicator {
    display: none;
    font-family: "RobotoFlex", sans-serif;
    text-align: center;
    align-content: center;
    font-weight: 600;
    user-select: none;
    cursor: pointer;
}

.pip-indicator-title {
    margin-bottom: 5px;
}

.pip-indicator-subtitle {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 300;
}

  #splash-logo {
    width: 220px;
    height: 220px;
    border-radius: 20px; /* circle */
    background: #ebebeb url(https://cdn.kiy.li/img/kiyantk/fun/driver-logo-2-3-compressed.webp) no-repeat center;
    background-size: 220px;
    background-size: cover;  /* fills the circle nicely */
    box-shadow: rgba(0, 0, 0, 0.2) 0px 12px 28px 0px, rgba(0, 0, 0, 0.1) 0px 2px 4px 0px, rgba(255, 255, 255, 0.05) 0px 0px 0px 1px inset;
  }

  .eta-wide-grid {
    display: grid;
    grid-template-columns: 70px 50px 50px;
  }
  
  .eta-no-br {
      display: none;
  }
  
  .trip-info {
  position: absolute;
  bottom: 10px;
  left: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(18.5px);
  border: 1px solid rgba(255, 255, 255, 0.64);
  color: black;
  padding: 10px 20px;
  font-size: 14px;
  z-index: 1000;
  grid-template-columns: auto auto auto auto;
  gap: 35px;
  font-family: "RobotoFlex", sans-serif;
  display: none;
}

.trip-info div {
  display: grid;
  text-align: center;
}

.trip-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(18.5px);
  border: 1px solid rgba(255, 255, 255, 0.64);
  color: white;
  padding: 10px;
  z-index: 1000;
  display: none;
  font-weight: 450;
  text-align: center;
}

.trip-btn {
  width: 100px !important;
  padding: 4px !important;
}

.hidden {
  display: none;
}

#guidance-container {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #00654f;
  color: white;
  width: 300px;
  padding: 10px 20px;
  font-family: "RobotoFlex", sans-serif;
  font-weight: 500;
  border-radius: 10px;
  display: none;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  overflow: hidden;
  user-select: none;
}

.guidance-black-glass {
    background: rgba(0, 0, 0, 0.7) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(7.1px) !important;
    -webkit-backdrop-filter: blur(7.1px) !important;
}

#guidance-distance {
  font-size: 32px;
  padding-left: 10px;
  align-content: center;
  font-weight: 650;
}

#guidance-icon {
  text-align: center;
  pointer-events: none;
}

#guidance-icon img {
    width: 100%;
}

.guidance-top {
  display: grid;
  grid-template-columns: 60px auto auto;
}

.guidance-bottom {
  font-size: 22px;
}

#guidance-text {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  padding-left: 5px;
}

#guidance-ref {
  text-align: center;
  /*padding-top: 10px;*/
  /*grid-template-columns: auto auto;*/
  height: fit-content;
  gap: 5px;
  margin-right: -10px;
  justify-content: end;
  max-width: 135px;
  right: 20px;
  display: flex;
  position: absolute;
  flex-wrap: wrap;
  font-weight: 600;
}

.guidance-ref-item {
    padding: 0px 8px;
    background-color: #f7f7f7;
    color: black;
    border-radius: 6px;
    font-size: 20px;
    align-content: center;
    height: 34px;
    border: 2px solid black;
    
}

@media (max-width: 575px) {
  /* CSS inside here only applies when window.innerWidth < 575px */
  #guidance-container {
    width: calc(100% - 60px) !important;
  }
  
  #trip-end, #trip-settings-menu {
    width: calc(100% - 60px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
    padding: 0px 10px;
  }
  
  #guidance-ref {
    max-width: 35% !important;
  }
  
  #etaContainer {
      width: calc(100% - 83px);
      min-width: 160px;
  }
  
  .eta-trip-immersive-container {
      width: 100% !important;
  }
  
  .eta-wide-grid {
      grid-template-columns: 33.33% 33.33% 33.33%;
  }
  
  #etaContent {
      width: 100%;
  }
  
  #tripOverviewButton:not(.trip-button-integrated-overview) {
      bottom: 60px;
      right: 0px !important;
  }
  
  #tripViewButton {
      bottom: 120px;
      right: 0px !important;
  }
  
  #tripSettingsButton {
      bottom: 180px;
      right: 0px !important;
  }
  
  #start-menu, #pipWindowOpenIndicator {
      box-shadow: 0 0 5px rgba(0,0,0,0.3) inset !important;
  }
  
  .driver-watermark {
    bottom: 78px !important;
    left: 20px !important;
  }
}

#devOverlay {
    display: none;
    position: absolute;
    width: fit-content;
    top: 5px;
    right: 5px;
    background-color: #000000b5;
    padding: 5px 10px;
    border-radius: 10px;
    color: white;
    font-family: monospace;
}

.menu-buttons-big {
    display: grid;
    grid-template-columns: auto auto;
    gap: 100px;
}

.menu-button-big {
  font-size: 270px;
  padding: 30px 40px;
  background-color: #f0f0f0;
  box-shadow: rgba(14, 30, 37, 0.12) 0px 2px 4px 0px, rgba(14, 30, 37, 0.32) 0px 2px 16px 0px;
  border-radius: 20px;
  line-height: 1;
  width: 380px;
  height: 390px;
  text-align: center;
  display: flex;
  flex-flow: column;
  font-family: 'RobotoFlex';
  font-weight: 600;
  cursor: pointer;
  justify-content: center;
  user-select: none;
  color: #2bb72b;
}

.menu-button-big:hover {
   transform: scale(1.05);
   /*background-color: #189f56;*/
   color: #27ca27;
}

.menu-button-big span {
    font-size: 92px;
    margin-top: 25px;
    letter-spacing: 4px;
    text-shadow: 2px 2px 2px rgb(15, 134, 26);
    user-select: none;
}

.menu-button-big i {
    color: #1EB82D;
    text-shadow: 4px 4px 0px rgb(15, 134, 26);
}

.start-menu-banner {
    border: 1px solid silver;
    border-radius: 7px;
    position: absolute;
    top: 40px;
}

@media (max-height: 495px) {
    .menu-button-big {
        font-size: 197px;
        height: 296px;
    }
    
    .menu-button-big span {
        font-size: 75px;
    }
}

@media (max-width: 1090px) {
    .menu-button-big {
        width: 294px;
    }
}

@media (max-width: 175px) {
    .guidance-top {
        grid-template-columns: auto !important;
    }
    
    #guidance-icon {
        display: none !important;
    }
}

@media (max-width: 280px) {
    #guidance-ref {
        display: none !important;
    }
}

@media (max-width: 680px) {
    .bottom-bar:not(.trip-bottom-bar) {
        flex-wrap: wrap;
        gap: 10px !important;
        margin: 0px 10px;
        justify-content: center;
        left: unset !important;
    }
}

@media (max-width: 320px) {
    .plannerModeMenu-exportimport {
        flex-wrap: wrap;
    }
}

@media (max-width: 360px) {
    #builder-eta-arrival {
        display: none;
    }
    
    .trip-info {
        grid-template-columns: auto auto auto !important;
    }
}

@media (max-width: 890px) {
    .trip-info {
        bottom: unset !important;
        top: 10px;
        flex-wrap: wrap;
        right: 10px;
        justify-content: center;
        gap: 15px 35px !important;
    }
    
    .trip-info.tripInfoActive {
        display: flex !important;
    }
    
    .trip-controls {
        margin-left: 10px;
    }
    
    .trip-controls .driverBtn {
        margin-top: 3px;
        margin-bottom: 3px;
    }
    
    #plannerModeMenu:not(.plannerModeMenu-noinfo) {
        top: 80px !important;
    }
    
}

@media (max-width: 470px) {
    #plannerModeMenu {
        right: 10px;
        width: unset !important;
    }
    
    #plannerList {
        max-height: 65px !important;
    }
    
    .trip-controls {
        left: 0px;
    }
}

@media (max-width: 935px) {
    .menu-button-big {
        font-size: 205px;
        height: 300px;
        width: 260px;
    }
    
    .menu-button-big span {
        font-size: 67px;
    }
}

@media (max-width: 845px) {
    .menu-buttons-big {
        grid-template-columns: none;
        grid-template-rows: auto auto;
        gap: 10vh;
    }
    
    .menu-button-big {
        font-size: clamp(2vh, 15vh + 13vw, 12rem);
        height: 30vh;
        width: 60vw;
        align-items: center;
        justify-content: center;
        gap: clamp(1rem, 5vh + 0vw, 13rem);
    }
    
    .menu-button-big span {
        font-size: clamp(0.5rem, 4vh + 4vw, 8rem);
        margin-top: 0;
    }
    
    .start-menu-banner {
        display: none;
    }
}

#trip-start {
    display: none;
    position: fixed;
    justify-self: center;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 999997;
    pointer-events: none;
}

.trip-route {
    width: 500px;
    background-color: white;
    max-height: 300px;
    margin: 0 auto;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    border-radius: 20px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.79);
    backdrop-filter: blur(12.3px);
    -webkit-backdrop-filter: blur(12.3px);
    padding: 20px;
    /*overflow-y: auto;*/
    overflow: hidden;
    pointer-events: all;
}

.trip-control {
    width: 500px;
    background-color: white;
    height: 50px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    border-radius: 20px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.79);
    backdrop-filter: blur(12.3px);
    -webkit-backdrop-filter: blur(12.3px);
    display: grid;
    grid-template-columns: auto auto auto auto;
    font-family: "RobotoFlex", sans-serif;
    pointer-events: all;
}

@media (max-width: 680px) {
    .trip-control , .trip-route {
        width: 85vw;   
    }
}

@media (max-width: 470px) {
    .trip-eta-p {
        display: none;
    }
    
    .trip-control {
        grid-template-columns: auto auto auto;
    }
}

.trip-control p {
    text-align: center;
}

/*#get-route {*/
/*    float: right;*/
/*}*/

  ul#stops { list-style: none; padding: 0; margin: 0;width: 100%;user-select: none; margin-bottom: 15px;max-height: 200px; overflow-y: auto; padding: 3px}
  ul#stops li { position: relative; margin-bottom: 8px;display: grid ; grid-template-columns: 90% 10%; }
  ul#stops li input {
    width: 98%; padding: 6px;
    border-radius: 9px;
    background: white;
    border: 1px solid gray;
    font-size: 16px;
    z-index: 99;
  }
  ul#stops li ul.suggestions {
    position: relative;
    left: 0;
    right: 0;
    z-index: 10;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 150px;
    overflow-y: auto;
    list-style: none;
    width: 72%;
    margin-left: 8px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    border-radius: 0px 0px 10px 10px;
  }
  ul#stops li ul.suggestions li {
    padding: 4px 0px;
    margin-left: -15px;
    cursor: pointer;
    font-family: "RobotoFlex", sans-serif;
  }
  ul#stops li ul.suggestions li:hover {
    background: #eee;
  }
  
  .driverBtnSimple {
    background-color: #fff;
    border: 1px solid darkgray;
    padding: 5px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    color: black;
    font-family: "RobotoFlex", sans-serif;
  }
  
  .remove-stop {
      background: none;
      border: none;
      cursor: pointer;
      color: gray;
  }
  
  .trip-bottom-bar {
    left: 10px !important;
    width: calc(100% - 20px);
  }
  
  #endTripButton {
    background: rgba(255, 171, 171, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(18.5px);
    border: 1px solid rgba(255, 186, 186, 0.64);
    width: 50px;
    border-radius: 16px;
    text-align: center;
    align-content: center;
    font-size: 24px;
    color: #d10000;
    position: absolute;
    right: 0;
    height: 50px;
    cursor: pointer;
    display: none;
  }
  
  #tripOverviewButton {
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(18.5px);
    border: 1px solid rgba(255, 255, 255, 0.64);
    width: 50px;
    border-radius: 16px;
    text-align: center;
    align-content: center;
    position: absolute;
    right: 60px;
    height: 50px;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    display: none;
  }
  
  #tripViewButton {
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(18.5px);
    border: 1px solid rgba(255, 255, 255, 0.64);
    width: 50px;
    border-radius: 16px;
    text-align: center;
    align-content: center;
    position: absolute;
    font-size: 24px;
    right: 120px;
    height: 50px;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    display: none;
  }
  
  #tripSettingsButton {
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(18.5px);
    border: 1px solid rgba(255, 255, 255, 0.64);
    width: 50px;
    border-radius: 16px;
    text-align: center;
    align-content: center;
    position: absolute;
    font-size: 24px;
    right: 180px;
    height: 50px;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    display: none;
  }
  
  #trip-settings, #trip-copy {
      float: right;
      margin-left: 8px;
  }
  
  #guidance-slide-wrapper {
  transition: transform 0.15s ease;
}

.slide-out-left {
  transform: translateX(-120%);
}

.slide-in-right {
  transform: translateX(120%);
}

#trip-end {
  position: absolute;
  width: 500px;
  height: fit-content;
  bottom: 0;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(18.5px);
  border: 1px solid rgba(255, 255, 255, 0.64);
  left: 0;
  margin-bottom: 20px;
  border-radius: 20px;
  text-align: center;
  margin-left: 20px;
  display: none;
}

#trip-settings-menu {
  position: absolute;
  width: 500px;
  height: fit-content;
  bottom: 0;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(18.5px);
  border: 1px solid rgba(255, 255, 255, 0.64);
  left: 0;
  margin-bottom: 20px;
  border-radius: 20px;
  text-align: center;
  margin-left: 20px;
  display: none;
  z-index: 999999;
  height: 200px;
}

.trip-settings-button {
  background: none;
  color: black;
  width: 100%;
  outline: none;
  border: none;
  border-bottom: 1px solid #cbcbcb;
  border-radius: 0;
  font-size: 24px;
  padding: 8px 0px;
}

.trip-settings-button:hover {
    color: #4a4a4a;
}

.trip-end-title {
  font-size: 30px;
  font-family: "RobotoFlex", sans-serif;
  margin-bottom: 5px;
  font-weight: 500;
}

#trip-end .driverBtn {
  margin-bottom: 30px;
  padding: 10px 30px;
}

#trip-end-address {
    margin-top: 0px;
    margin-bottom: 30px;
    font-family: Verdana;
    color: #6e6e6e;
}

#stops li input:focus {
    outline: 2px solid black;
}

.eta-trip-container {
  display: none;
  height: 60px !important;
  padding: 6px 12px !important;
  min-width: 140px !important;
  border-radius: 16px 16px 0px 0px !important;
  background: rgba(255, 255, 255, 0.54) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(18.5px) !important;
  border: 1px solid rgba(255, 255, 255, 0.64) !important;
  align-items: center !important;
  margin-bottom: -10px !important;
}

.eta-trip-container #etaContent {
  margin: 0 !important;
  text-align: left !important;
  display: grid !important;
  width: 100% !important;
}

.eta-trip-bold {
    font-weight: 600;
}

.eta-trip-container #etaCounter {
    font-size: 22px !important;
    margin-bottom: 1px !important;
}

.eta-trip-container #etaTime {
    color: #575757;
}

.trip-button-integrated-end {
    right: 10px !important;
    margin-top: 12px;
    border: 1px solid rgb(249, 147, 147) !important;
}

.trip-button-integrated-overview {
    right: 70px !important;
    bottom: 0 !important;
    border: 1px solid #c8c8c8 !important;
}

#fuelContainer {
    position: relative;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(18.5px);
    border: 1px solid rgba(255, 255, 255, 0.64);
    overflow: hidden;
    cursor: pointer;
    width: 150px;
    height: 36px;
    padding: 6px 12px;
    font-family: "RobotoFlex", sans-serif;
    display: none;
}

.fuelBarContainer {
    position: absolute;
    left: 50%;
    top: 50%;
    height: 50%;
    width: 88%;
    transform: translateY(-50%) translateX(-50%);
    background-color: #454545;
    border-radius: 10px;
    overflow: hidden;
}

#fuelBar {
    height: 100%;
    width: 100%;
    background-color: #3b779b;
    transition: width 0.2s;
}

#fuelLeft {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: white;
}

#fuelRight {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: white;
}

#fuelCenter {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #fff;
    pointer-events: none;
}

#alternativeRouteCount {
    color: gray;
}

#limitRoutePathTrailMessageContainer {
    display: none;
    color: gray;font-size: 12px;margin-left:4px
}

.eta-green { color: #30ae26; }
.eta-orange { color: #f68a00; }
.eta-red { color: #df2512; }
.eta-black { color: #000; }

#checkNewAlternativesTime {
    width: 55px;
}

#trip-settings-before {
    font-family: "RobotoFlex", sans-serif;
    margin-bottom: 15px;
    text-align: center;
    display: none;
}

#routeBuilder-route {
    display: grid;
}

#routeBuilder-traffic {
    display: none;
}

.routeBuilder-tabs {
  display: grid;
  grid-template-columns: auto auto;
  gap: 20px;
}

.routeBuilder-tab-active {
  outline: 2px solid #fff !important;
}

.routeBuilder-tab {
  background-color: #009847;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 5px;
  line-height: 1;
  font-size: 16px;
  outline: 2px solid #ffffffa6;
  outline-offset: -4px;
}


.tb-instructions {
    font-size: 12px;
    color: #888;
    margin: 8px 4px 10px;
    line-height: 1.5;
    text-align: center;
}

.tb-window-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 7px;
    padding: 7px 9px;
    margin-bottom: 6px;
    position: relative;
}
.tb-window-entry:hover { background: #ededed; }

.tb-window-number {
    font-size: 11px;
    font-weight: 700;
    color: #555;
    min-width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.tb-intensity-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.2);
    position: relative;
    transition: transform 0.1s;
    z-index: 9;
    transform: scale(1.2);
}

.tb-intensity-popup {
    display: none;
    flex-direction: column;
    position: absolute;
    left: 24px;
    top: -6px;
    background: #f1f1f1;
    border: 1px solid #cbcbcb;
    border-radius: 8px;
    padding: 5px 8px;
    z-index: 9999;
    white-space: nowrap;
}

.tb-intensity-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 5px;
    cursor: pointer;
    border-radius: 5px;
}
.tb-intensity-option:hover { background: #dedede; }

.tb-intensity-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.tb-intensity-label {
    font-size: 12px;
    color: #000;
}

.tb-window-info {
    flex: 1;
    min-width: 0;
}
.tb-window-title {
    font-size: 12px;
    font-weight: 600;
    color: #000;
}
.tb-window-meta {
    font-size: 11px;
    color: #888;
}

.tb-remove-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
}
.tb-remove-btn:hover { color: #000; }

.tb-snap-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.25);
    pointer-events: none;
    transition: background 0.1s, border-color 0.1s, opacity 0.1s;
}

#plannerETA-smooth {
    margin: 0 auto;
}

#tb-window-list {
    max-height: 200px;
    min-height: 200px;
    overflow-y: auto;
}

/* ============================================================
   ROUTE PRESETS POPUP — Improved styling + mobile support
   Drop-in replacement for the existing #routePresetsPopup rules
   ============================================================ */

/* ── Backdrop overlay ── */
#popupOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99997;
  transition: opacity 0.2s ease;
}

/* ── Main popup shell ── */
#routePresetsPopup {
  display: none;
  position: fixed;
  inset: 0;
  margin: auto;

  /* sizing — desktop */
  width: min(820px, 92vw);
  height: min(680px, 90vh);

  z-index: 99999;
  border-radius: 20px;

  /* match app glassmorphism */
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255,255,255,0.9) inset;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.70);

  padding: 0;
  font-family: "RobotoFlex", sans-serif;
  overflow: hidden;

  /* animate in */
  animation: presetsPopIn 0.22s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

@keyframes presetsPopIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* ── Header strip ── */
#routePresetsHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px 22px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
  background: rgba(255,255,255,0.4);
}

#routePresetsHeader h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 680;
  color: #111;
  letter-spacing: -0.3px;
}

#routePresetsHeader p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #666;
  padding-right: 10px;
}

.routePresetsPopupClose {
  position: static; /* override old absolute positioning */
  width: 34px;
  height: 34px;
  background: rgba(0,0,0,0.07);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #333;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.routePresetsPopupClose:hover {
  background: rgba(0,0,0,0.14);
  transform: scale(1.08);
}

/* ── Filter bar ── */
.routePresetsPopupFilter {
  padding: 12px 22px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  flex-shrink: 0;
  background: rgba(255,255,255,0.25);
}

.scrollableFilterRow {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.2) transparent;
  -webkit-overflow-scrolling: touch;
}

.scrollableFilterRow::-webkit-scrollbar {
  height: 4px;
}
.scrollableFilterRow::-webkit-scrollbar-track { background: transparent; }
.scrollableFilterRow::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 4px; }

.scrollableFilterRow input[type="text"],
.scrollableFilterRow select,
.ts-wrapper {
  flex-shrink: 0;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.16);
  background: rgba(255,255,255,0.75);
  font-family: "RobotoFlex", sans-serif;
  font-size: 13px;
  color: #222;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 150px;
}

.scrollableFilterRow input[type="text"]:focus,
.scrollableFilterRow select:focus {
  border-color: gray;
}

/* tom-select overrides to match */
.ts-wrapper {
  padding: 0 !important;
  min-width: 160px;
}
.ts-control {
  height: 36px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(0,0,0,0.16) !important;
  background: rgba(255,255,255,0.75) !important;
  flex-wrap: nowrap !important;
  box-shadow: none !important;
  font-size: 13px !important;
  gap: 4px;
  align-items: center;
}
.ts-control:focus-within {
  border-color: gray !important;
}
.ts-control .item {
  background: rgba(0,152,71,0.12) !important;
  border: 1px solid rgba(0,152,71,0.25) !important;
  border-radius: 6px !important;
  color: #007a3a !important;
  font-size: 12px !important;
  padding: 0px 7px !important;
  height: 20px;
}
.ts-dropdown {
  z-index: 99999 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(0,0,0,0.12) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
  font-size: 13px !important;
}

/* ── Scrollable content grid ── */
#routePresetsInner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#routePresetsPopupContent {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 18px 22px 22px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.2) transparent;
  align-content: start;
}

#routePresetsPopupContent::-webkit-scrollbar { width: 6px; }
#routePresetsPopupContent::-webkit-scrollbar-track { background: transparent; }
#routePresetsPopupContent::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 6px; }

/* ── Route preset cards ── */
.route-preset {
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);

  /* Proper normal-flow flex column */
  display: grid;

  transition: transform 0.17s ease, box-shadow 0.17s ease, border-color 0.17s;
  cursor: pointer;
  width: auto !important;   /* kill old fixed 240px */
  height: auto !important;  /* kill old fixed 320px */
  box-sizing: border-box;
}

.route-preset:hover {
  transform: translateY(-3px);
  border-color: rgba(89, 89, 89, 0.35);
}

/* Image wrapper: the JS renders a div with height:183px around the img */
.route-preset > div:first-child {
  width: 100% !important;
  height: auto !important;
  align-content: unset !important;
  margin-bottom: 10px;
  flex-shrink: 0;
}

/* Image itself fills card width */
.route-preset img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px !important;
  display: block;
  margin-bottom: 0 !important;
}

/* Card title */
.route-preset h4 {
  margin: 0 0 6px !important;
  font-size: 15px;
  font-weight: 660;
  color: #111;
  line-height: 1.3;
  text-align: center;
}

/* Description paragraph */
.route-preset > p {
  margin: 0 0 10px !important;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  text-align: center;
}

/* Bottom meta div — was position:absolute, now normal flow */
.route-preset > div:last-child {
  width: 100% !important;
  margin-top: auto;
  padding-top: 6px;
}

.route-preset > div:last-child p {
  margin: 3px 0 0 !important;
  font-size: 12px;
  color: #999;
  text-align: center;
}

/* Drive / load button */
.route-preset .driverBtn {
  padding: 7px 22px;
  font-size: 15px;
  border-radius: 10px;
  width: 100%;
  margin-top: 10px;
}

/* ── Empty / loading state ── */
#routePresetsEmpty {
  grid-column: 1 / -1;
  text-align: center;
  color: #aaa;
  padding: 48px 20px;
  font-size: 15px;
}

/* ============================================================
   MOBILE — full-screen sheet, single-column landscape cards
   ============================================================ */
@media (max-width: 600px) {
  #routePresetsPopup {
    width: 100vw;
    height: 100dvh;
    inset: 0;
    margin: 0;
    border-radius: 0;
    border: none;
    animation: presetsSlideUp 0.28s cubic-bezier(0.34, 1.1, 0.64, 1) both;
  }

  @keyframes presetsSlideUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  #routePresetsHeader {
    padding: 14px 16px 10px;
  }

  #routePresetsHeader h3 { font-size: 17px; }
  #routePresetsHeader p  { font-size: 12px; }

  .routePresetsPopupFilter {
    padding: 8px 14px;
  }

  /* Force single column — no horizontal overflow */
  #routePresetsPopupContent {
    grid-template-columns: 1fr !important;
    gap: 10px;
    padding: 12px 14px 28px;
  }

  /* Landscape card: thumbnail left, text right */
  .route-preset {
    flex-direction: row !important;
    align-items: flex-start !important;
    border-radius: 12px;
    padding: 12px;
    gap: 12px !important;
    text-align: left !important;
    max-width: 85%;
  }

  /* Thumbnail: fixed width column */
  .route-preset > div:first-child {
    width: 128px !important;
    flex-shrink: 0 !important;
    margin: 0 auto;
  }

  .route-preset img {
    width: 128px !important;
    height: 128px !important;
    aspect-ratio: unset !important;
  }

  /* Text column fills the rest */
  .route-preset > div:last-child,
  .route-preset h4,
  .route-preset > p {
    text-align: center !important;
  }

  .route-preset h4 { font-size: 18px; }

  .route-preset > p {
    font-size: 12px;
    /* clamp to 3 lines */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin-bottom: 6px !important;
  }

  .route-preset > div:last-child {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    padding-top: 0;
  }

  .route-preset .driverBtn {
    padding: 5px 12px;
    font-size: 13px;
    margin-top: 8px;
  }
}

.driver-watermark {
  display: none;
  position: absolute;
  bottom: 8px;
  left: 186px;
  opacity: 0.7;
  user-select: none;
  pointer-events: none;
}

.driver-watermark-wrapper {
  display: flex;
  gap: 6px;
}

.driver-watermark-wrapper span {
  color: gray;
  font-family: "RobotoFlex", sans-serif;
  text-shadow: rgb(255, 255, 255) 2px 0px 0px, rgb(255, 255, 255) 1.75517px 0.958851px 0px, rgb(255, 255, 255) 1.0806px 1.68294px 0px, rgb(255, 255, 255) 0.141474px 1.99499px 0px, rgb(255, 255, 255) -0.832294px 1.81859px 0px, rgb(255, 255, 255) -1.60229px 1.19694px 0px, rgb(255, 255, 255) -1.97999px 0.28224px 0px, rgb(255, 255, 255) -1.87291px -0.701566px 0px, rgb(255, 255, 255) -1.30729px -1.51361px 0px, rgb(255, 255, 255) -0.421592px -1.95506px 0px, rgb(255, 255, 255) 0.567324px -1.91785px 0px, rgb(255, 255, 255) 1.41734px -1.41108px 0px, rgb(255, 255, 255) 1.92034px -0.558831px 0px;
}