.trip-header { -webkit-text-size-adjust: 100%; }
.trip-main { max-width: 1190px; }
.trip-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: clamp(18px, 4vw, 38px);
  border-radius: var(--brand-radius-panel);
  background: var(--brand-evergreen);
  color: var(--brand-cream);
}
.trip-hero h1 {
  margin: 0;
  font: 400 clamp(2.2rem, 6vw, 4rem)/1.08 var(--brand-display);
}
.trip-hero p {
  margin: 8px 0 0;
  font-size: 1.1rem;
  color: var(--brand-on-dark-muted);
}
.trip-highway {
  flex: none;
  align-self: center;
  display: grid;
  place-items: center;
  width: 70px;
  height: 65px;
  border: 2px solid #e6bd68;
  border-radius: 12px 12px 29px 29px;
  color: #ffdc88;
  font: 400 1.65rem/1 var(--brand-display);
}
.trip-layout, .trip-side { display: grid; align-items: start; align-content: start; gap: 16px; }
.trip-card {
  min-width: 0;
  padding: clamp(14px, 3vw, 24px);
  border: 1px solid #cbd8cd;
  border-radius: var(--brand-radius-card);
  background: #fffefa;
}
.trip-card h2 {
  margin: 0 0 14px;
  color: var(--brand-evergreen);
  font: 400 clamp(1.43rem, 3vw, 1.8rem)/1.15 var(--brand-display);
}
.trip-itinerary-head, .trip-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.trip-itinerary-head h2 { margin-bottom: 0; }
.trip-count { color: #315748; font-size: .88rem; font-weight: 700; }
.trip-fields, .trip-stop-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
  margin-top: 12px;
}
.trip-wide, .trip-stop-fields label:last-child { grid-column: 1 / -1; }
.trip-card label {
  display: block;
  min-width: 0;
  font-size: .9rem;
  font-weight: 700;
  color: var(--brand-evergreen);
}
.trip-card label span { font-weight: 400; }
.trip-card :is(input, select) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin-top: 4px;
  padding: 6px 9px;
  border: 1px solid #9cad9e;
  border-radius: var(--brand-radius-sm);
  background-color: #fff;
  color: var(--brand-asphalt);
  font: 400 1rem var(--brand-body);
}
.trip-card select {
  appearance: none;
  padding-right: 25px;
  background:
    linear-gradient(45deg, transparent 50%, #416554 50%) right 14px center / 5px 5px no-repeat,
    linear-gradient(135deg, #416554 50%, transparent 50%) right 9px center / 5px 5px no-repeat, white;
}
.trip-muted, .trip-status {
  margin: 7px 0 0;
  color: var(--brand-on-light-muted);
  font-size: .94rem;
  line-height: 1.42;
  overflow-wrap: anywhere;
}
.trip-status { color: var(--brand-evergreen); font-weight: 700; }
.trip-status:empty { display: none; }
.trip-card button { cursor: pointer; }
.trip-card button:disabled { opacity: .54; cursor: default; }
.trip-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.trip-sharing { margin-top: 15px; }
.trip-link-box { margin-top: 10px; }
.trip-alert, .trip-empty {
  padding: 12px 14px;
  border: 1px solid #cbd8cd;
  border-radius: 8px;
  background: #edf2e9;
  line-height: 1.45;
  color: #315748;
}
.trip-alert { border-color: #e0bb82; background: #fff1d7; color: #684013; }
.trip-empty { margin: 18px 0 0; }
.trip-empty p { margin: 0; }
.trip-day { margin-top: 18px; }
.trip-day-head {
  padding-block: 0 7px;
  border-bottom: 1px solid #d7e1d5;
}
.trip-day-head h3 { margin: 0; font-size: 1.1rem; color: var(--brand-evergreen); }
.trip-day-time { font-size: .89rem; color: var(--brand-on-light-muted); }
.trip-day ol { display: grid; gap: 9px; margin: 9px 0 0; padding: 0; list-style: none; }
.trip-stop { padding: 11px; border: 1px solid #d6e1d5; border-radius: 9px; background: white; }
.trip-stop-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.trip-stop-head h4 { margin: 0; color: var(--brand-evergreen); font-size: 1.12rem; line-height: 1.17; overflow-wrap: anywhere; }
.trip-stop-head small { display: block; color: var(--brand-on-light-muted); font-size: .875rem; line-height: 1.2; }
.trip-marker {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 3px;
  border-radius: 50%;
  background: var(--brand-evergreen);
  color: white;
  font-weight: 700;
}
.trip-place-guide, .trip-drive-leg, .trip-conditions {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand-evergreen);
  font-size: .9rem;
  font-weight: 700;
}
.trip-place-guide { align-self: center; margin-block: -7px; }
.trip-address { margin-left: 38px; }
.trip-stop-fields { margin-top: 9px; }
.trip-stop-controls { display: flex; flex-wrap: wrap; gap: 0 9px; margin-top: 3px; }
.trip-text-button { min-height: 44px; padding: 0 3px; border: 0; background: none; color: var(--brand-evergreen); text-decoration: underline; font-size: .9rem; }
.trip-text-button:disabled { text-decoration: none; }
.trip-drive-leg { margin-inline-start: auto; }
#trip-google:not(:empty) { margin-top: 14px; padding-top: 12px; border-top: 1px solid #d7e1d5; }
#trip-google h3 { margin: 0 0 7px; color: var(--brand-evergreen); font-size: 1.08rem; }
.trip-google-parts { margin-top: 6px; }
.trip-google-parts a { margin: 4px 5px 0 0; }
.trip-card summary {
  min-height: 44px;
  padding-block: 10px;
  color: var(--brand-evergreen);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
}
.trip-add > label + label { margin-top: 10px; }
.trip-results { margin-top: 8px; }
.trip-result-summary { margin-bottom: 5px; }
.trip-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid #e2e9e0;
}
.trip-result strong { display: block; line-height: 1.2; }
.trip-result small, .trip-template small { display: block; color: var(--brand-on-light-muted); font-size: .875rem; }
.trip-result button { flex: none; min-width: 48px; }
.trip-custom { margin-top: 7px; }
.trip-custom form { display: grid; gap: 8px; }
.trip-custom button { justify-self: start; }
#trip-map { display: block; width: 100%; height: clamp(190px, 29vw, 276px); border: 1px solid #cbd8cd; border-radius: 9px; }
.trip-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 7px; font-size: .88rem; color: var(--brand-on-light-muted); }
.trip-key span { display: inline-flex; gap: 5px; align-items: center; }
.trip-key span::before { content: ''; width: 20px; border-top: 2px solid #6b8f76; }
.trip-key span + span::before { border-top: 2px dashed #a9532d; }
#trip-templates { display: grid; gap: 7px; }
.trip-template { padding: 8px 10px; text-align: start; border: 1px solid #c5d7c8; border-radius: 8px; background: #edf2e9; color: var(--brand-evergreen); font: inherit; }
.trip-template:hover { border-color: var(--brand-evergreen); }
@media (min-width: 800px) {
  .trip-layout { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
  .trip-stop-fields { grid-template-columns: minmax(78px, .6fr) minmax(78px, .65fr) minmax(0, 1.4fr); }
  .trip-stop-fields label:last-child { grid-column: auto; }
}
@media (max-width: 480px) {
  .trip-header .brand span, .trip-highway { display: none; }
  .trip-header .brand img { width: 48px; }
  .trip-header { gap: 3px; }
  .trip-header nav { min-width: 0; flex-wrap: wrap; justify-content: flex-end; gap: 0 clamp(3px, 1.6vw, 8px); }
  .trip-stop-controls { column-gap: 5px; }
}
