* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(218, 178, 107, 0.22), transparent 34%),
    linear-gradient(145deg, #f4efe4 0%, #e8efe9 100%);
  color: #12393b;
}

button,
select {
  font: inherit;
}

.bt-app {
  width: 100%;
  height: 100svh;
  max-width: 820px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 12px;
}

.bt-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.bt-logo-link {
  display: flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.bt-logo {
  display: block;
  width: 185px;
  max-width: 44vw;
  height: auto;
  object-fit: contain;
}

.bt-lang {
  display: flex;
  align-items: center;
  padding: 5px;
  gap: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(12, 66, 67, 0.08),
    0 12px 32px rgba(20, 52, 50, 0.08);
  backdrop-filter: blur(18px);
}

.bt-lang button {
  border: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  transition:
    transform .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.bt-lang button.is-active {
  background: rgba(8, 114, 111, 0.12);
  box-shadow:
    inset 0 0 0 2px rgba(8, 114, 111, 0.22),
    0 8px 20px rgba(8, 114, 111, 0.12);
  transform: scale(1.06);
}

.bt-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.bt-select-label {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bd7a24;
}

.bt-select {
  width: 100%;
  max-width: 100%;
  height: 50px;

  border: 0;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  border-radius: 18px;

  padding: 0 52px 0 18px;

  background:
    rgba(255, 255, 255, 0.82)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2308726f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E")
    no-repeat right 18px center;

  background-size: 16px;

  color: #12393b;
  font-size: 15px;
  font-weight: 850;

  box-shadow:
    inset 0 0 0 1px rgba(12, 66, 67, 0.08),
    0 12px 30px rgba(20, 52, 50, 0.08);

  backdrop-filter: blur(18px);
}

.bt-map-card {
  position: relative;
  min-height: 0;
  border-radius: 30px;
  overflow: hidden;
  background: #dcecea;
  box-shadow:
    inset 0 0 0 1px rgba(12, 66, 67, 0.08),
    0 18px 48px rgba(20, 52, 50, 0.13);
}

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #eef3ec;
}

.bt-vehicle-icon {
  display: grid;
  place-items: center;
  width: 38px !important;
  height: 38px !important;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 52, 50, 0.2);
  font-size: 21px;
}

.bt-stop-icon {
  width: 18px !important;
  height: 18px !important;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(8, 114, 111, 0.18), 0 8px 20px rgba(20, 52, 50, 0.18);
}

.bt-stop-icon span {
  display: block;
  width: 9px;
  height: 9px;
  margin: 4.5px;
  border-radius: 999px;
  background: #08726f;
}

@media (max-width: 520px) {
  .bt-app {
    padding-left: 12px;
    padding-right: 12px;
    gap: 10px;
  }

  .bt-logo {
    width: 148px;
    max-width: 38vw;
  }

  .bt-lang button {
    min-width: 39px;
    height: 38px;
    font-size: 13px;
  }

  .bt-controls {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bt-select {
    height: 46px;
  }

  .bt-info-panel {
    bottom: 144px;
    max-height: 116px;
  }
}

.bt-vehicle-icon {
  background: transparent !important;
  border: 0 !important;
}

.bt-vehicle-icon .bt-vehicle-glow {
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 14px 28px rgba(18, 57, 59, 0.22),
    0 0 0 7px rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(10px);
}

.bt-vehicle-icon .bt-vehicle-core {
  position: absolute;
  inset: 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(145deg, #ffffff, #f0f7f5);
  box-shadow:
    inset 0 0 0 1px rgba(12, 66, 67, 0.10),
    inset 0 -8px 14px rgba(8, 114, 111, 0.08);
}

.bt-vehicle-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.bt-bus-icon svg {
  fill: #bd7a24;
}

.bt-boat-icon svg {
  fill: #08726f;
}

.bt-svg-window {
  fill: rgba(255, 255, 255, 0.84);
}

.bt-svg-light {
  fill: #12393b;
}

.bt-svg-hull {
  fill: #08726f;
}

.bt-svg-wave {
  fill: none;
  stroke: #08726f;
  stroke-width: 4;
  stroke-linecap: round;
}

.bt-vehicle-icon.is-paused .bt-vehicle-core {
  animation: btPulse 0.7s ease-in-out infinite alternate;
}

@keyframes btPulse {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.08);
  }
}

.bt-stop-icon {
  width: 20px !important;
  height: 20px !important;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 5px rgba(8, 114, 111, 0.16),
    0 9px 22px rgba(20, 52, 50, 0.18);
}

.bt-stop-icon span {
  display: block;
  width: 10px;
  height: 10px;
  margin: 5px;
  border-radius: 999px;
  background: #08726f;
}

.leaflet-tooltip {
  border: 0 !important;
  border-radius: 999px !important;
  padding: 7px 11px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #12393b !important;
  font-weight: 850 !important;
  box-shadow: 0 10px 24px rgba(20, 52, 50, 0.14) !important;
}

.bt-info-panel {
  display: none;
  position: absolute;
  z-index: 36;
  left: 14px;
  right: 14px;
  top: 18px;
  max-height: 150px;
  overflow: auto;
  padding: 16px 44px 16px 17px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.28);
  color: #092f31;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14.5px;
  line-height: 1.48;
  font-weight: 720;
  letter-spacing: -0.01em;
  backdrop-filter: blur(24px) saturate(1.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  box-shadow:
    inset 0 0 0 1px rgba(12, 66, 67, 0.10),
    0 18px 42px rgba(20, 52, 50, 0.16);
}

.bt-info-panel.is-open {
  display: block;
}

.bt-info-panel strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15.5px;
  line-height: 1.2;
  color: #006a67;
  font-weight: 950;
  letter-spacing: -0.02em;
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.55);
}

.bt-info-close {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(8, 114, 111, 0.10);
  color: #08726f;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.bt-map-control-buttons {
  position: absolute;
  z-index: 35;
  left: 16px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bt-repeat-btn,
.bt-toggle-btn {
  position: relative;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  color: #08726f;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow:
    0 14px 30px rgba(20, 52, 50, 0.16),
    inset 0 0 0 1px rgba(12, 66, 67, 0.08);
  backdrop-filter: blur(20px);
}

.bt-repeat-btn:disabled,
.bt-toggle-btn:disabled {
  opacity: 0.34;
  pointer-events: none;
  filter: grayscale(1);
}

.bt-repeat-btn:not(:disabled):active,
.bt-toggle-btn:not(:disabled):active {
  transform: scale(0.96);
}

.bt-tabs-shell {
  position: relative;
  z-index: 30;
  margin-top: -2px;
}

.bt-map-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.bt-map-tabs button{
  border:0;
  height:42px;
  border-radius:18px;
  background:rgba(255,255,255,.90);
  color:#12393b;
  font-size:13px;
  font-weight:950;
  backdrop-filter:blur(16px);
  box-shadow:
    inset 0 0 0 1px rgba(8,114,111,.12),
    0 10px 24px rgba(20,52,50,.10);
}

.bt-map-tabs button.is-active{
  background:#08726f;
  color:#fff;
  box-shadow:
    0 14px 30px rgba(8,114,111,.28),
    inset 0 0 0 1px rgba(255,255,255,.16);
}

.bt-map-wrap,
.map-wrap,
#mapWrap{
  position: relative;
}

.bt-empty-overlay{
  position:absolute;
  inset:0;
  z-index:500;

  display:flex;
  align-items:flex-start;
  justify-content:center;

  padding-top: 60px;
  padding-left:24px;
  padding-right:24px;

  pointer-events:none;
  cursor:default;
}

.bt-empty-overlay.is-hidden{
  display:none;
}

.bt-empty-card{
  width:min(360px, calc(100vw - 56px));
  padding:24px;
  border:1px solid rgba(255,255,255,.55);
  border-radius:28px;
    background:rgba(255,255,255,.10);
  box-shadow:0 24px 70px rgba(15,23,42,.16);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  text-align:center;
  transform:translateZ(0);
  cursor:default;
}

.bt-empty-kicker{
  display:block;
  margin-bottom:8px;
  color:#08726f;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.bt-empty-card h2{
  margin:0;
  font-size:24px;
  line-height:1.05;
}

.bt-empty-card p{
  margin:12px 0 0;
  color:#64748b;
  font-size:13px;
  line-height:1.55;
  font-weight:650;
}

.bt-map-attribution{
  position:absolute;
  right:14px;
  bottom:14px;
  z-index:40;

  color:rgba(18,57,59,0.28);

  font-size:10px;
  font-weight:600;
  letter-spacing:-0.01em;
}

.leaflet-container{
  cursor: grab;
}

.leaflet-container:active{
  cursor: grabbing;
}

.bt-map-card.has-overlay #map{
  filter: saturate(.92);
}

.bt-app:not(.has-route) .bt-map-tabs button{
  cursor:not-allowed;
}

.bt-finish-overlay{
  position:absolute;
  inset:0;
  z-index:520;

  display:flex;
  align-items:flex-start;
  justify-content:center;
padding-top:60px;
  pointer-events:none;
}

.bt-finish-overlay.is-hidden{
  display:none;
}

.bt-finish-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;

  padding:22px 24px;

  border-radius:28px;

  background:rgba(255,255,255,.12);

  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);

  box-shadow:
    0 24px 70px rgba(15,23,42,.16);

  pointer-events:auto;
}

.bt-finish-kicker{
  color:#12393b;
  font-size:13px;
  font-weight:850;
  letter-spacing:.02em;
}

.bt-finish-replay{
  border:0;

  height:52px;
  padding:0 22px;

  border-radius:999px;

  background:rgba(255,255,255,.92);

  color:#08726f;

  font-size:15px;
  font-weight:900;

  box-shadow:
    0 14px 30px rgba(20,52,50,.16),
    inset 0 0 0 1px rgba(12,66,67,.08);

  cursor:pointer;

  transition:
    transform .18s ease,
    opacity .18s ease;
}

.bt-finish-replay:active{
  transform:scale(.96);
}

.bt-app:not(.has-route) .bt-map-tabs,
.bt-app.is-finished .bt-map-tabs{
  opacity:.34;
  filter:grayscale(1);
  pointer-events:none;
}

.bt-app:not(.has-route) .bt-map-tabs button,
.bt-app.is-finished .bt-map-tabs button{
  cursor:not-allowed;
}

.bt-custom-select{
  position:relative;
  z-index:700;
  width:100%;
}

.bt-select-trigger{
  width:100%;
  height:50px;
  border:0;
  border-radius:18px;
  padding:0 16px 0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:rgba(255,255,255,.82);
  color:#12393b;
  font-size:15px;
  font-weight:850;
  box-shadow:
    inset 0 0 0 1px rgba(12,66,67,.08),
    0 12px 30px rgba(20,52,50,.08);
  backdrop-filter:blur(18px);
  cursor:pointer;
}

.bt-select-arrow{
  width:0;
  height:0;

  border-left:6px solid transparent;
  border-right:6px solid transparent;
  border-top:7px solid #08726f;

  flex:0 0 auto;

  transform:translateY(1px);
  transition:transform .18s ease;
}

.bt-custom-select.is-open .bt-select-arrow{
  transform:translateY(1px) rotate(180deg);
}

.bt-select-menu{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 8px);
  z-index:900;
  display:none;
  padding:8px;
  border-radius:22px;
  background:rgba(255,255,255,.92);
  box-shadow:0 22px 60px rgba(20,52,50,.18);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
}

.bt-custom-select.is-open .bt-select-menu{
  display:grid;
  gap:6px;
}

.bt-select-option{
  width:100%;
  min-height:44px;
  border:0;
  border-radius:16px;
  padding:0 14px;
  background:transparent;
  color:#12393b;
  text-align:left;
  font-size:14px;
  font-weight:850;
  cursor:pointer;
}

.bt-select-option:hover,
.bt-select-option.is-active{
  background:rgba(8,114,111,.10);
  color:#08726f;
}