.guide-trigger {
  min-height: 38px;
  flex-shrink: 0;
}

body:has(.driver-guide-dialog[open]) {
  overflow: hidden;
}

.driver-guide-dialog {
  width: min(calc(100% - 24px), 520px);
  max-height: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #17364b;
}

.driver-guide-dialog[open] {
  display: flex;
  flex-direction: column;
}

.driver-guide-dialog::backdrop {
  background: rgb(7 32 48 / 67%);
}

.driver-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 22px;
  background: #002b45;
  color: #fff;
}

.driver-guide-head h2 {
  margin: 0;
  font-size: clamp(19px, 4.8vw, 24px);
  line-height: 1.2;
}

.driver-guide-head select {
  min-height: 44px;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid #bccfdc;
  border-radius: 6px;
  background: #fff;
  color: #17364b;
  font: inherit;
}

.driver-guide-content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px 22px 16px;
}

.driver-guide-content p {
  margin: 0;
}

.driver-guide-steps {
  margin: 0;
  padding-inline-start: 1.45em;
}

.driver-guide-steps > li {
  padding-inline-start: 5px;
}

.driver-guide-steps > li + li {
  margin-top: 9px;
}

.driver-guide-steps > li::marker {
  color: #00557c;
  font-weight: 700;
}

.guide-colors {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.guide-colors li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px 0;
}

.guide-colors li + li {
  border-top: 1px solid #dce7ee;
}

.guide-light {
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border-radius: 50%;
  border: 1px solid rgb(9 34 49 / 25%);
}

.guide-light.green { background: #198653; }
.guide-light.yellow { background: #f0bc25; }
.guide-light.red { background: #c63e42; }

.guide-colors strong {
  display: block;
  margin-bottom: 2px;
}

.driver-guide-foot {
  margin: 0;
  display: flex;
  justify-content: flex-end;
  padding: 12px 22px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid #dce7ee;
}

.driver-guide-foot button {
  min-height: 44px;
}

@media (max-width: 420px) {
  .driver-guide-head,
  .driver-guide-content,
  .driver-guide-foot {
    padding-inline: 15px;
  }

  .driver-guide-foot button {
    width: 100%;
  }
}
