:root {
  --tw-ink: #f7faf8;
  --tw-muted: #b6c0bb;
  --tw-bg: #101412;
  --tw-panel: #1b2420;
  --tw-panel-strong: #222d28;
  --tw-line: #435049;
  --tw-green: #20b486;
  --tw-yellow: #ffd23f;
  --tw-coral: #ff7466;
  --tw-blue: #66b9f2;
}

body.tw-is-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.tw-overlay,
.tw-overlay * {
  box-sizing: border-box;
}

.tw-overlay {
  position: fixed;
  inset: 0;
  z-index: 100020;
  overflow: hidden;
  color: var(--tw-ink);
  background: #080b0a;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.tw-overlay[hidden],
.tw-overlay [hidden],
.tw-photo[hidden],
.tw-sheet[hidden],
.tw-planner[hidden],
.tw-shell[hidden],
.tw-plan-result[hidden] {
  display: none !important;
}

.tw-planner,
.tw-shell {
  width: min(100%, 760px);
  height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--tw-bg);
}

.tw-planner {
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #101412;
}

.tw-topbar {
  position: relative;
  z-index: 3;
  min-height: 68px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--tw-line);
  background: #151b18;
}

.tw-icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  color: var(--tw-ink);
  background: transparent;
  font: 600 28px/1 system-ui, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

.tw-icon-btn:hover,
.tw-icon-btn:active {
  background: #2a3530;
}

.tw-icon-btn:focus-visible,
.tw-button:focus-visible,
.tw-link-btn:focus-visible,
.tw-location-button:focus-visible,
.tw-plan-field input:focus-visible,
.tw-plan-foot a:focus-visible,
.tw-credit-btn:focus-visible,
.tw-credit-copy a:focus-visible,
.tw-scroll:focus-visible,
.tw-stops:focus-visible {
  outline: 3px solid var(--tw-yellow);
  outline-offset: 2px;
}

.tw-plan-city {
  width: 44px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #597066;
  border-radius: 4px;
  color: var(--tw-green);
  font-size: 11px;
  font-weight: 900;
}

.tw-plan-scroll {
  min-height: 0;
  padding: 0 18px max(28px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #52605a transparent;
}

.tw-plan-intro {
  padding: 28px 0 22px;
  border-bottom: 1px solid var(--tw-line);
}

.tw-plan-intro h2,
.tw-plan-result h2 {
  margin: 6px 0 9px;
  color: var(--tw-ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: 0;
}

.tw-plan-intro p,
.tw-plan-result > p {
  margin: 0;
  color: #d9e1dd;
  font-size: 15px;
  line-height: 1.5;
}

.tw-plan-form {
  padding: 20px 0;
  display: grid;
  gap: 14px;
  border-bottom: 1px solid var(--tw-line);
}

.tw-plan-field {
  display: grid;
  gap: 7px;
}

.tw-plan-field > span {
  color: #eef3f0;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.tw-plan-field input {
  width: 100%;
  min-height: 54px;
  padding: 11px 13px;
  border: 1px solid #6e7c75;
  border-radius: 4px;
  color: #111914;
  background: #f4f7f5;
  font: 700 16px/1.25 inherit;
  letter-spacing: 0;
}

.tw-plan-field input::placeholder {
  color: #66716b;
  opacity: 1;
}

.tw-location-button {
  min-height: 46px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #4c7867;
  border-radius: 4px;
  color: #b9f1d8;
  background: #15241e;
  font: 800 14px/1.2 inherit;
  letter-spacing: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.tw-location-button span {
  color: var(--tw-green);
  font-size: 20px;
  line-height: 1;
}

.tw-location-button:disabled {
  opacity: 0.66;
  cursor: wait;
}

.tw-plan-submit {
  width: 100%;
  margin-top: 2px;
}

.tw-plan-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--tw-muted);
  font-size: 13px;
  line-height: 1.4;
}

.tw-plan-status[data-state="error"] {
  color: #ffb3a9;
}

.tw-plan-status[data-state="success"] {
  color: #9ce5c7;
}

.tw-plan-result {
  margin-top: 14px;
  padding: 20px 0 22px;
  border-top: 4px solid var(--tw-blue);
  border-bottom: 1px solid var(--tw-line);
}

.tw-plan-result.is-match {
  border-top-color: var(--tw-green);
}

.tw-plan-result.is-unmatched {
  border-top-color: var(--tw-coral);
}

.tw-plan-result h2 {
  font-size: 26px;
}

.tw-plan-result-meta {
  margin-top: 12px !important;
  color: var(--tw-muted) !important;
  font-size: 12px !important;
  font-weight: 750;
}

.tw-plan-result-actions {
  margin-top: 18px;
  display: grid;
  gap: 9px;
}

.tw-plan-result-actions .tw-button {
  width: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  text-decoration: none;
}

.tw-plan-result-actions .tw-button.is-secondary {
  color: var(--tw-ink);
  border: 1px solid #68766f;
  background: transparent;
}

.tw-plan-foot {
  padding: 20px 0 4px;
}

.tw-plan-foot a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #8bc9f2;
  font-size: 14px;
  font-weight: 800;
  text-underline-offset: 3px;
}

.tw-plan-foot p {
  margin: 8px 0 0;
  color: var(--tw-muted);
  font-size: 12px;
  line-height: 1.45;
}

.tw-topcopy {
  min-width: 0;
}

.tw-kicker,
.tw-phase,
.tw-look-label,
.tw-source-badge,
.tw-route-mode {
  display: block;
  color: var(--tw-yellow);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
  text-transform: uppercase;
}

.tw-topcopy strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--tw-ink);
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tw-stepcount {
  color: var(--tw-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.tw-progress {
  grid-column: 2;
  height: 4px;
  margin-top: 1px;
  overflow: hidden;
  border-radius: 2px;
  background: #46524c;
}

.tw-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--tw-yellow);
  transition: width 220ms ease;
}

.tw-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #52605a transparent;
}

.tw-photo {
  position: relative;
  width: 100%;
  height: clamp(185px, 29vh, 300px);
  overflow: hidden;
  background: #2b3530;
}

.tw-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tw-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(5, 8, 7, 0.82));
}

.tw-look-label {
  position: absolute;
  z-index: 1;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 82px);
  padding: 7px 9px;
  border-radius: 4px;
  color: #101412;
  background: var(--tw-yellow);
}

.tw-credit-btn {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  color: #fff;
  background: rgba(5, 8, 7, 0.8);
  font: 800 17px/1 Georgia, serif;
  cursor: pointer;
  touch-action: manipulation;
}

.tw-route-visual {
  padding: 13px 14px 10px;
  border-bottom: 1px solid var(--tw-line);
  background: #151b18;
}

.tw-route-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 4px;
}

.tw-route-heading > div {
  min-width: 0;
}

.tw-route-heading strong {
  display: block;
  margin-top: 3px;
  color: var(--tw-ink);
  font-size: 14px;
  line-height: 1.3;
}

.tw-route-heading > span {
  flex: 0 0 auto;
  max-width: 120px;
  color: var(--tw-muted);
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}

.tw-route-mode {
  color: var(--tw-blue);
  font-size: 10px;
}

.tw-route-svg {
  width: 100%;
  height: 96px;
  display: block;
}

.tw-route-base {
  fill: none;
  stroke: #4e5b55;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tw-route-done {
  fill: none;
  stroke: var(--tw-route-color, var(--tw-yellow));
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tw-route-marker {
  fill: var(--tw-bg);
  stroke: var(--tw-accent-color, var(--tw-green));
  stroke-width: 5;
}

.tw-geometry-note {
  margin: 1px 0 0;
  color: var(--tw-muted);
  font-size: 11px;
  line-height: 1.4;
}

.tw-attribution {
  display: block;
  margin-top: 3px;
  color: #c7d0cc;
  font-size: 10px;
}

.tw-stops {
  position: relative;
  margin: 0;
  padding: 10px 0 3px;
  display: flex;
  overflow-x: auto;
  list-style: none;
  scroll-behavior: auto;
  scrollbar-width: none;
}

.tw-stops::-webkit-scrollbar {
  display: none;
}

.tw-stops::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 26px;
  right: 26px;
  height: 2px;
  background: #53605a;
}

.tw-stops li {
  position: relative;
  z-index: 1;
  flex: 0 0 92px;
  min-width: 0;
  padding: 0 4px;
  color: var(--tw-muted);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 650;
  text-align: center;
}

.tw-stops i {
  width: 16px;
  height: 16px;
  margin: 0 auto 6px;
  display: block;
  border: 3px solid #151b18;
  border-radius: 50%;
  background: #64716b;
  box-shadow: 0 0 0 1px #849089;
}

.tw-stops .is-done i {
  background: var(--tw-route-color, var(--tw-yellow));
}

.tw-stops .is-current {
  color: var(--tw-ink);
  font-weight: 800;
}

.tw-stops .is-current i {
  background: var(--tw-accent-color, var(--tw-green));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.tw-action {
  padding: 18px 16px 24px;
}

.tw-action h2 {
  margin: 5px 0 10px;
  color: var(--tw-ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.tw-instruction {
  margin: 0;
  color: #edf2ef;
  font-size: 16px;
  line-height: 1.5;
}

.tw-sign {
  margin: 16px 0 0;
  padding: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 12px;
  align-items: center;
  border-left: 4px solid var(--tw-yellow);
  background: var(--tw-panel-strong);
}

.tw-sign > span {
  color: var(--tw-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.tw-sign strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--tw-ink);
  font-size: 16px;
  line-height: 1.3;
}

.tw-sign small {
  grid-column: 2;
  color: #c4cec9;
  font-size: 12px;
  line-height: 1.35;
}

.tw-safety {
  margin: 14px 0 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #dce4e0;
  font-size: 13px;
  line-height: 1.45;
}

.tw-safety i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--tw-coral);
}

.tw-source-badge {
  margin-top: 14px;
  color: var(--tw-green);
}

.tw-source-badge.is-field-check {
  color: #ffab9f;
}

.tw-source-badge.is-check-now {
  color: var(--tw-yellow);
}

.tw-mobility {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--tw-line);
  color: var(--tw-muted);
  font-size: 12px;
  line-height: 1.45;
}

.tw-dock {
  position: relative;
  z-index: 5;
  padding: 10px 16px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid #56635d;
  background: #151b18;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.34);
}

.tw-actions {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
}

.tw-button {
  min-width: 44px;
  min-height: 52px;
  padding: 10px 14px;
  border: 0;
  border-radius: 4px;
  color: #06110d;
  background: var(--tw-green);
  font: 800 15px/1.25 inherit;
  letter-spacing: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.tw-button:hover,
.tw-button:active {
  filter: brightness(1.08);
}

.tw-back {
  padding: 0;
  color: var(--tw-ink);
  border: 1px solid #68766f;
  background: transparent;
  font-size: 25px;
}

.tw-back:disabled {
  opacity: 0.38;
  cursor: default;
  filter: none;
}

.tw-link-btn {
  width: 100%;
  min-height: 44px;
  margin: 3px 0 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 4px;
  color: #e2e9e5;
  background: transparent;
  font: 750 13px/1.3 inherit;
  letter-spacing: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  touch-action: manipulation;
}

.tw-link-btn:hover,
.tw-link-btn:active {
  background: #28322e;
}

.tw-sheet {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  align-items: end;
  background: rgba(0, 0, 0, 0.76);
}

.tw-sheet__panel {
  max-height: 84dvh;
  padding: 20px 18px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  border-top: 4px solid var(--tw-yellow);
  background: #f5f7f5;
  color: #17201c;
}

.tw-sheet__panel h2 {
  margin: 0 0 10px;
  color: #15201b;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0;
}

.tw-sheet__panel p,
.tw-sheet__panel li {
  font-size: 15px;
  line-height: 1.48;
}

.tw-sheet__panel ol {
  padding-left: 22px;
}

.tw-phrase {
  margin: 12px 0;
  padding: 12px;
  border-left: 4px solid #18845f;
  background: #e4ebe7;
}

.tw-phrase strong,
.tw-phrase span {
  display: block;
}

.tw-phrase span {
  margin-top: 4px;
  color: #44534c;
  font-size: 13px;
}

.tw-sheet__actions {
  display: grid;
  gap: 8px;
}

.tw-sheet__actions .tw-button {
  color: #fff;
  background: #176347;
}

.tw-sheet__actions .tw-button.is-secondary {
  color: #17201c;
  border: 1px solid #87958e;
  background: transparent;
}

.tw-credit-copy a {
  color: #075e47;
  overflow-wrap: anywhere;
}

.tw-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (min-width: 761px) {
  .tw-planner,
  .tw-shell {
    border-left: 1px solid #2d3732;
    border-right: 1px solid #2d3732;
  }
}

@media (max-width: 420px) {
  .tw-photo {
    height: clamp(175px, 24vh, 240px);
  }

  .tw-route-visual {
    padding: 10px 12px 8px;
  }

  .tw-route-svg {
    height: 72px;
  }

  .tw-stops {
    padding-top: 7px;
  }

  .tw-stops::before {
    top: 15px;
  }

  .tw-route-heading > span {
    max-width: 96px;
  }

  .tw-action h2 {
    font-size: 26px;
  }

  .tw-stops li {
    flex-basis: 84px;
  }
}

@media (max-width: 340px) {
  .tw-photo {
    height: 175px;
  }

  .tw-route-visual {
    padding: 8px 10px 6px;
  }

  .tw-route-svg {
    height: 54px;
  }

  .tw-geometry-note {
    font-size: 10px;
    line-height: 1.3;
  }

  .tw-stops {
    padding-top: 5px;
  }

  .tw-stops::before {
    top: 13px;
  }

  .tw-stops li {
    flex-basis: 76px;
    font-size: 9px;
  }

  .tw-stops i {
    width: 14px;
    height: 14px;
    margin-bottom: 4px;
  }

  .tw-action {
    padding: 12px 12px 18px;
  }

  .tw-action h2 {
    margin-bottom: 8px;
    font-size: 23px;
  }

  .tw-instruction {
    font-size: 15px;
    line-height: 1.4;
  }

  .tw-sign {
    margin-top: 12px;
    padding: 10px;
  }

  .tw-safety {
    margin-top: 10px;
  }
}

@media (max-height: 620px) {
  .tw-photo {
    height: 160px;
  }

  .tw-route-svg {
    height: 72px;
  }

  .tw-action {
    padding-top: 14px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .tw-topbar {
    min-height: 58px;
    padding-top: max(5px, env(safe-area-inset-top));
    padding-bottom: 5px;
  }

  .tw-photo {
    height: 145px;
  }

  .tw-dock {
    padding-top: 7px;
  }

  .tw-button {
    min-height: 46px;
  }

  .tw-link-btn {
    min-height: 44px;
    padding-block: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw-progress i {
    transition: none;
  }
}
