:root {
  font-family:
    ui-rounded,
    "SF Pro Rounded",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #263d48;
  background: #f8f9f6;
  --blue: #3974ba;
  --bus: #af7614;
  --green: #3c7959;
  --muted: #78878a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
[role="slider"]:focus-visible {
  outline: 3px solid #6b9ada;
  outline-offset: 5px;
}
button:disabled {
  cursor: default;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
[hidden] {
  display: none !important;
}
#app {
  max-width: 1320px;
  margin: auto;
  min-height: 100svh;
  padding: 46px 42px 35px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 0 54px;
}
.controls button {
  border: 1px solid #dce2dd;
  background: #fff;
  border-radius: 12px;
  height: 49px;
  padding: 0 21px;
  font-size: 16px;
  font-weight: 550;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 2px 3px #263d4803;
  min-width: 112px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.controls button:hover {
  background: #edf2ed;
  border-color: #bfcac2;
}
.controls button svg {
  width: 21px;
  height: 21px;
  stroke: #577281;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.controls .chevron {
  font-size: 18px;
  color: #7b8b8f;
  margin-left: 10px;
}
.controls #now-button {
  min-width: 104px;
  color: #607373;
}
#now-button[aria-pressed="true"] {
  border-color: #b9d2c4;
  color: #347253;
  background: #eff5ee;
}
.now-dot {
  width: 7px;
  height: 7px;
  border-radius: 100%;
  background: currentColor;
}
#direction-arrow {
  font-size: 23px;
  font-weight: 400;
}
.workspace {
  display: grid;
  grid-template-columns: 345px minmax(0, 1fr);
  gap: 58px;
  align-items: center;
}
.clock-area {
  text-align: center;
  align-self: start;
  padding-top: 21px;
}
#clock {
  display: block;
  width: 100%;
  overflow: visible;
  touch-action: none;
  user-select: none;
}
.clock-face {
  fill: #fff;
  stroke: #e2e6df;
  stroke-width: 1.3;
}
.hour-tick {
  stroke: #728381;
  stroke-width: 2;
  stroke-linecap: round;
}
.minute-tick {
  stroke: #bdc8c1;
  stroke-width: 1.1;
}
#hours text {
  fill: #516660;
  font-size: 21px;
  text-anchor: middle;
  dominant-baseline: central;
  font-weight: 500;
}
.hour-line {
  stroke: #344e45;
  stroke-width: 9;
  stroke-linecap: round;
}
.minute-line {
  stroke: #4a85c1;
  stroke-width: 5;
  stroke-linecap: round;
}
.hour-tip {
  fill: #344e45;
  stroke: white;
  stroke-width: 2;
}
.minute-tip {
  fill: #4a85c1;
  stroke: white;
  stroke-width: 3;
}
.clock-center {
  fill: #fff;
  stroke: #344e45;
  stroke-width: 4;
}
.hand-hit {
  stroke: transparent;
  stroke-width: 36;
  stroke-linecap: round;
}
.clock-area [role="slider"] {
  cursor: grab;
  touch-action: none;
}
.clock-area .dragging [role="slider"] {
  cursor: grabbing;
}
.clock-reading {
  margin-top: 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
#digital-time {
  font-size: 48px;
  letter-spacing: -1.5px;
  font-weight: 550;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
#clock-date {
  font-size: 14px;
  color: #6e8179;
}
.journey-area {
  min-width: 0;
}
#journey-caption {
  display: flex;
  justify-content: center;
  gap: 13px;
  align-items: center;
  font-size: 21px;
  font-weight: 550;
  letter-spacing: -0.3px;
  margin: 3px 0 10px;
}
.caption-arrow {
  color: #9baaa1;
  font-weight: 400;
}
#map {
  width: 100%;
  user-select: none;
}
#map svg {
  width: 100%;
  display: block;
  overflow: visible;
}
#map text {
  text-anchor: middle;
  dominant-baseline: central;
}
.rail-base {
  fill: none;
  stroke: #92b5d7;
  stroke-width: 4;
  stroke-linecap: round;
}
.rail-bottom {
  fill: none;
  stroke: #c9d9e8;
  stroke-width: 1.4;
}
.road {
  fill: none;
  stroke: #e9e7de;
  stroke-width: 5;
  stroke-linecap: round;
}
.road.active {
  stroke: #e6bf63;
}
.walk {
  fill: none;
  stroke: #e2e6df;
  stroke-width: 3;
  stroke-dasharray: 1 9;
  stroke-linecap: round;
}
.walk.active {
  stroke: #96b499;
}
.car-muted {
  opacity: 0.3;
}
.car-road {
  stroke: #91aaa3;
  stroke-width: 4;
  fill: none;
}
.rail-node {
  fill: #f8f9f6;
  stroke: #4e83b9;
  stroke-width: 3;
}
.bus-node {
  fill: #f8f9f6;
  stroke: #c49d4e;
  stroke-width: 3;
}
.muted {
  opacity: 0.4;
}
.place-name {
  font-size: 22px;
  font-weight: 600;
  fill: #334e56;
  letter-spacing: -0.3px;
}
.place-name.inactive {
  fill: #98a19a;
  font-weight: 400;
}
.map-time {
  font-size: 25px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  fill: #344f58;
  letter-spacing: -0.6px;
}
.train-time {
  fill: #3974ba;
}
.bus-time {
  fill: #a4751e;
}
.home-time {
  fill: #48795e;
  font-size: 22px;
}
.time-sub {
  font-size: 16px;
  font-weight: 400;
  fill: #7d8b87;
  letter-spacing: 0;
}
.walk-time {
  font-size: 17px;
  font-weight: 400;
  fill: #79907d;
  letter-spacing: 0;
}
.transfer-time {
  font-size: 21px;
}
.wait-badge rect {
  fill: #e8f1e7;
}
.wait-badge text {
  fill: #40704b;
  font-size: 20px;
  font-weight: 600;
}
.wait-badge.long rect,
.wait-badge.tight rect {
  fill: #f9edcf;
}
.wait-badge.long text,
.wait-badge.tight text {
  fill: #957027;
}
.map-empty {
  fill: #a27150;
  font-size: 19px;
}
.delay-time {
  fill: #b24d35;
  font-size: 17px;
}
.flow-arrow {
  fill: none;
  stroke: transparent;
  stroke-width: 1;
}
.departures-wrap {
  margin-top: 15px;
}
#departures {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
  table-layout: fixed;
}
#departures th {
  text-align: left;
  font-size: 12px;
  font-weight: 400;
  color: #87968b;
  padding: 0 14px 10px;
}
#departures th:nth-child(2) {
  text-align: center;
}
#departures th:last-child {
  text-align: right;
}
#departures td {
  padding: 13px 14px;
  border-top: 1px solid #e1e7df;
  font-size: 19px;
  letter-spacing: -0.25px;
  white-space: nowrap;
}
#departures td:first-child {
  color: #4279b2;
  font-weight: 600;
}
#departures td:nth-child(2) {
  text-align: center;
  color: #4d7456;
  font-size: 15px;
}
#departures td:last-child {
  text-align: right;
  color: #517b60;
  font-weight: 500;
}
#departures tr.active {
  background: #e6eee1;
  box-shadow: inset 4px 0 #789476;
}
.journey-row {
  cursor: pointer;
  transition: background 0.15s;
}
#departures .journey-row:hover {
  background: #edf2e9;
}
#departures .journey-row.active:hover {
  background: #e1ebdc;
}
.journey-select {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  white-space: inherit;
  text-align: left;
  cursor: pointer;
}
.journey-row:focus-within {
  outline: 2px solid #789476;
  outline-offset: -2px;
}
.journey-select:focus-visible {
  outline: none;
}
#departures tr.active td:first-child {
  border-radius: 10px 0 0 10px;
}
#departures tr.active td:last-child {
  border-radius: 0 10px 10px 0;
}
#departures .long,
#departures .tight {
  color: #9b742b !important;
}
#departures .none {
  color: #a76e51 !important;
}
#departures .empty-row {
  color: #88958c !important;
  text-align: center !important;
  font-size: 14px;
  font-weight: 400 !important;
}
.mode-icon {
  width: 27px;
  height: 18px;
  vertical-align: middle;
  margin-right: 7px;
}
#last-return {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  color: #849188;
  font-size: 12px;
  margin: 23px 14px 0;
}
#last-return svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #819087;
  stroke-width: 1.5;
}
#last-return strong {
  font-size: 18px;
  color: #62776a;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
#last-past {
  font-size: 11px;
  color: #a69e8e;
}
#notice {
  color: #94643c;
  background: #fbf0d9;
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 15px;
}
dialog {
  border: 0;
  border-radius: 20px;
  width: min(450px, calc(100% - 32px));
  padding: 27px;
  color: #314b48;
  background: #fff;
  max-height: 90svh;
  box-shadow: 0 20px 80px #2a40322e;
}
dialog::backdrop {
  background: #263e392c;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
  font-weight: 600;
  margin: 0;
}
.icon-button {
  border: 0;
  background: #f0f4ee;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 24px;
  color: #768e7b;
}
#station-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#station-options button {
  text-align: left;
  border: 1px solid #e2e7de;
  border-radius: 10px;
  padding: 15px;
  background: white;
  font-size: 17px;
}
#station-options button[aria-pressed="true"] {
  background: #eef4ec;
  border-color: #adc7b3;
  color: #41694b;
}
#date-form {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e5e9e0;
  padding-top: 20px;
  margin-top: 24px;
  font-size: 13px;
}
input[type="date"] {
  min-width: 0;
  width: 140px;
  border: 1px solid #dce4d7;
  border-radius: 7px;
  padding: 8px;
  color: #465f4c;
}
.secondary {
  background: #f0f4ed;
  border: 0;
  border-radius: 7px;
  padding: 10px;
  font-size: 12px;
  white-space: nowrap;
}
.route-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 23px 0 12px;
  font-size: 14px;
}
.text-button {
  border: 0;
  background: none;
  padding: 0;
  color: #4574a2;
}
.source-note {
  font-size: 11px !important;
  line-height: 1.5;
  color: #90a08e !important;
  margin-bottom: 0;
}
fieldset {
  border: 0;
  border-top: 1px solid #e5ecdf;
  padding: 15px 0;
  margin: 17px 0 0;
}
legend {
  font-size: 14px;
  font-weight: 600;
  padding-right: 10px;
}
dialog p {
  font-size: 13px;
  color: #758674;
  line-height: 1.5;
}
dialog label {
  font-size: 14px;
}
input[type="number"] {
  width: 59px;
  border: 1px solid #dbe4d7;
  border-radius: 8px;
  padding: 8px;
  color: #415542;
}
.range-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}
.range-row > span {
  flex: 1;
}
.range-row label {
  display: flex;
  gap: 7px;
  align-items: center;
}
.setting-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.setting-row input {
  margin-left: auto;
}
.check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  line-height: 1.4;
  margin: 10px 0;
}
input[type="checkbox"] {
  accent-color: #49725a;
}
details {
  border-top: 1px solid #e5ecdf;
  padding-top: 15px;
  font-size: 14px;
}
summary {
  cursor: pointer;
}
input[type="password"] {
  width: 100%;
  border: 1px solid #dbe4d7;
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}
.save {
  display: block;
  text-align: center;
  width: 100%;
  border: 0;
  background: #52775b;
  color: #fff;
  font-size: 14px;
  border-radius: 11px;
  padding: 13px;
  margin-top: 15px;
  font-weight: 600;
}
.setting-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  font-size: 12px;
  padding: 17px 0 0;
}
.small {
  font-size: 12px;
}
@media (max-width: 1000px) {
  #app {
    padding: 28px;
  }
  .workspace {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 25px;
  }
  .controls {
    margin-bottom: 36px;
  }
  .place-name {
    font-size: 24px;
  }
  .map-time {
    font-size: 26px;
  }
  .home-time {
    font-size: 23px;
  }
  #journey-caption {
    font-size: 19px;
  }
  #departures td {
    font-size: 17px;
  }
}
@media (max-width: 700px) {
  #app {
    padding: 21px 18px 25px;
    display: block;
  }
  .controls {
    gap: 7px;
    margin-bottom: 22px;
  }
  .controls button {
    height: 44px;
    font-size: 14px;
    gap: 7px;
    padding: 0 12px;
    min-width: 86px;
  }
  .controls #station-button {
    min-width: 142px;
  }
  .controls #now-button {
    min-width: 75px;
  }
  .controls button svg {
    width: 18px;
    height: 18px;
  }
  .controls .chevron {
    margin-left: 1px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .clock-area {
    width: 255px;
    padding: 0;
    margin: auto;
  }
  .clock-reading {
    margin-top: 7px;
    display: flex;
    gap: 8px;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
  }
  #digital-time {
    font-size: 37px;
    letter-spacing: -1px;
  }
  #clock-date {
    font-size: 12px;
    max-width: 110px;
  }
  .journey-area {
    width: 100%;
  }
  #journey-caption {
    font-size: 17px;
    margin-bottom: 4px;
  }
  .place-name {
    font-size: 21px;
  }
  .map-time {
    font-size: 22px;
  }
  .home-time {
    font-size: 19px;
  }
  .transfer-time {
    font-size: 20px;
  }
  .time-sub {
    font-size: 16px;
  }
  .walk-time {
    font-size: 17px;
  }
  .wait-badge text {
    font-size: 18px;
  }
  .departures-wrap {
    margin-top: 2px;
  }
  #departures th {
    font-size: 11px;
    padding: 0 9px 8px;
  }
  #departures td {
    padding: 10px 9px;
    font-size: 16px;
  }
  #departures td:nth-child(2) {
    font-size: 13px;
  }
  .mode-icon {
    width: 24px;
    margin-right: 4px;
  }
  #last-return {
    margin-top: 16px;
    font-size: 11px;
    gap: 7px;
    justify-content: center;
  }
  .range-row {
    font-size: 12px;
    gap: 7px;
  }
  dialog {
    padding: 22px;
  }
  .range-row label {
    font-size: 12px;
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media (max-width: 700px) {
  .clock-area {
    width: 248px;
  }
  .controls {
    margin-bottom: 18px;
  }
  .workspace {
    gap: 16px;
  }
  #departure-rows tr:nth-child(n + 3):not(.active) {
    display: none;
  }
  #departures th:first-child {
    width: 43%;
  }
  #departures th:nth-child(2) {
    width: 25%;
  }
  #departures th:last-child {
    width: 32%;
  }
}
/* Secondary text remains readable at phone sizes. */
#clock-date,
#departures th,
#last-return,
#last-past {
  color: #65766b;
}
#departures td:first-child {
  color: #356ba3;
}
#departures td:last-child {
  color: #446c50;
}
#departures .long,
#departures .tight {
  color: #865f1a !important;
}
#departures .none {
  color: #935936 !important;
}
.place-name.inactive {
  fill: #65766b;
}
.time-sub,
.walk-time {
  fill: #65766b;
}
.source-note {
  color: #65766b !important;
}
@media (max-width: 700px) {
  .controls #station-button {
    flex: 1;
    min-width: 0;
    max-width: 210px;
  }
  .controls #station-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .controls #direction-button,
  .controls #now-button {
    flex-shrink: 0;
  }
}
/* Route endpoints now mirror the actual left-to-right journey. */
#app {
  max-width: 1640px;
  padding: 28px 36px 32px;
  display: grid;
  grid-template-columns: clamp(315px, 28vw, 430px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 4vw, 72px);
  justify-content: normal;
  align-content: stretch;
}
.workspace {
  display: contents;
}
.clock-area {
  grid-column: 1;
  grid-row: 1/3;
  align-self: center;
  padding: 0;
  position: relative;
}
.journey-area {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.controls {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 0 0 14px;
  min-height: 72px;
}
.controls .route-endpoint {
  height: auto;
  min-width: 148px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 550;
}
.route-endpoint small {
  font-size: 11px;
  font-weight: 400;
  color: #526459;
}
.endpoint-value {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  white-space: nowrap;
}
.endpoint-value > svg {
  width: 21px;
  height: 21px;
  stroke: #577281;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.controls #station-button {
  order: 0;
  min-width: 180px;
  max-width: none;
  flex: 0 1 auto;
}
.controls #home-endpoint {
  order: 2;
  min-width: 140px;
}
.controls #direction-button {
  order: 1;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #5c7768;
}
.controls #direction-button:hover {
  background: #eaf0e7;
}
.controls #direction-button svg {
  width: 27px;
  height: 27px;
  stroke: #5c7768;
  stroke-width: 1.6;
}
.controls.is-out #home-endpoint {
  order: 0;
}
.controls.is-out #station-button {
  order: 2;
}
#journey-content {
  transition:
    filter 0.16s ease,
    opacity 0.16s ease;
  min-width: 0;
}
.journey-area.is-loading #journey-content {
  opacity: 0.36;
  filter: blur(2px);
  pointer-events: none;
}
.journey-area.is-loading {
  cursor: progress;
}
#map {
  transform-origin: 50% 50%;
  perspective: 1000px;
}
#map svg {
  max-height: 56svh;
}
.hand-hit {
  stroke-width: 48;
  pointer-events: stroke;
}
.hour-line {
  stroke-width: 10;
}
.minute-line {
  stroke-width: 6;
}
.clock-center {
  fill: #344e45;
  stroke: none;
  r: 6;
}
#hour-hand:hover .hour-line {
  stroke: #52775e;
}
#minute-hand:hover .minute-line {
  stroke: #286cae;
}
.hour-line,
.minute-line {
  transition: stroke 0.1s;
}
.clock-reading {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.time-entry {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
#digital-time {
  font-size: 58px;
  line-height: 1.1;
  width: 5.2ch;
  text-align: center;
  border: 0;
  border-bottom: 1px solid transparent;
  outline-offset: 4px;
  border-radius: 4px;
  padding: 2px 0 4px;
  background: transparent;
  color: #263d48;
  font-weight: 550;
  letter-spacing: -1.8px;
  font-variant-numeric: tabular-nums;
}
#digital-time:hover,
#digital-time:focus {
  border-bottom-color: #b7cbbd;
}
#digital-time[aria-invalid="true"],
#clock-date[aria-invalid="true"] {
  border-color: #ac5b48;
}
#clock-date {
  font-size: 15px;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 4px 3px;
  background: transparent;
  color: #65766b;
  font-family: inherit;
  text-align: center;
  max-width: none;
  border-radius: 4px;
  width: 158px;
  font-variant-numeric: tabular-nums;
}
#clock-date:hover,
#clock-date:focus {
  border-bottom-color: #b7cbbd;
}
#clock-date::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  width: 15px;
  height: 15px;
  padding: 3px;
  cursor: pointer;
}
#date-error {
  font-size: 12px;
  color: #9e543e;
}
#now-button {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  padding: 8px;
  border: 1px solid #d8e2d7;
  border-radius: 50%;
  background: transparent;
  color: #779180;
}
#now-button svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#now-button:hover {
  background: #e9f1e5;
  color: #3e7251;
}
#now-button[aria-pressed="true"] {
  background: #edf4e9;
  color: #4f785b;
  border-color: #d7e3d1;
}
#departures th {
  padding-top: 8px;
}
#departures td {
  padding-top: 17px;
  padding-bottom: 17px;
  font-size: 20px;
}
#night-rows .night-space td {
  border: 0;
  padding: 0;
  height: 25px;
  background: transparent;
}
#night-rows .night-row {
  background: #344850;
}
#night-rows .night-row td {
  border: 0;
  color: #eaf1ed !important;
  font-weight: 500;
}
#night-rows .night-row td:first-child {
  border-radius: 11px 0 0 11px;
}
#night-rows .night-row td:last-child {
  border-radius: 0 11px 11px 0;
}
#night-rows .night-row td:nth-child(2) {
  color: #d6cda7 !important;
}
.moon-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #e6dba9;
  stroke-width: 1.6;
  vertical-align: -4px;
  margin-right: 9px;
}
.night-row.past {
  opacity: 0.65;
}
.night-row small {
  font-size: 10px;
  margin-left: 7px;
  font-weight: 400;
}
.night-row .mode-icon {
  filter: saturate(0.45) brightness(1.3);
}
@media (min-width: 1450px) {
  #app {
    padding-top: 35px;
    padding-bottom: 38px;
  }
  .controls {
    margin-bottom: 25px;
  }
  #departures td {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}
@media (max-width: 1050px) and (min-width: 701px) {
  #app {
    grid-template-columns: 285px minmax(0, 1fr);
    padding: 24px;
    column-gap: 25px;
  }
  .controls {
    gap: 9px;
  }
  .controls .route-endpoint {
    padding: 9px 12px;
  }
  .controls #station-button {
    min-width: 150px;
  }
  .controls #home-endpoint {
    min-width: 95px;
  }
  .endpoint-value {
    font-size: 16px;
    gap: 6px;
  }
  #digital-time {
    font-size: 50px;
  }
  #departures td {
    font-size: 17px;
    padding: 14px 8px;
  }
}
@media (max-width: 700px) {
  #app {
    padding: 15px 18px 25px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .controls {
    order: 0;
    gap: 12px;
    min-height: 62px;
    margin: 0;
  }
  .controls .route-endpoint {
    padding: 8px 11px;
    min-width: 0;
  }
  .controls #station-button {
    min-width: 0;
    max-width: 210px;
    flex: 0 1 auto;
  }
  .controls #home-endpoint {
    min-width: 89px;
  }
  .controls #direction-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 6px;
  }
  .endpoint-value {
    font-size: 16px;
    gap: 7px;
  }
  .route-endpoint small {
    font-size: 10px;
  }
  .endpoint-value > svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
  .controls #station-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .clock-area {
    order: 1;
    align-self: center;
    width: 248px;
    grid-area: auto;
    margin: 0;
  }
  .journey-area {
    order: 2;
    grid-area: auto;
    width: 100%;
  }
  .clock-reading {
    margin-top: 6px;
    gap: 3px;
  }
  #digital-time {
    font-size: 39px;
    letter-spacing: -1px;
  }
  #clock-date {
    font-size: 12px;
    width: 138px;
    padding: 3px;
  }
  #now-button {
    width: 32px;
    height: 32px;
    padding: 6px;
    left: calc(100% + 11px);
  }
  #now-button svg {
    width: 18px;
    height: 18px;
  }
  #map svg {
    max-height: none;
  }
  #departures td {
    padding: 11px 9px;
    font-size: 16px;
  }
  #night-rows .night-space td {
    height: 18px;
  }
  .moon-icon {
    width: 17px;
    height: 17px;
    margin-right: 7px;
  }
  #night-rows .night-row td {
    font-size: 16px;
  }
  #night-rows .night-row td:nth-child(2) {
    font-size: 13px;
  }
  #departures .night-row small {
    display: none;
  }
  #date-error {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #journey-content,
  .hour-line,
  .minute-line {
    transition: none;
  }
}

@media (max-width: 700px) {
  .clock-area {
    width: 236px;
  }
}
.place-name.long-name {
  font-size: 19px;
}

#night-rows .night-row.past {
  opacity: 1;
  background: #4e626a;
}
#night-rows .night-row:hover {
  background: #405961;
}
#night-rows .night-row.active {
  background: #405a50;
  box-shadow: inset 4px 0 #b8cfac;
}
#night-rows .night-row.active:hover {
  background: #496557;
}
#night-rows .night-row:focus-within {
  outline-color: #b8cfac;
}

/* One clock, two meanings: leave after it, or arrive by it. */
.time-mode {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 24px;
  background: #eaf0e8;
  margin-bottom: 2px;
}
.time-mode button {
  border: 0;
  border-radius: 20px;
  background: transparent;
  padding: 8px 19px;
  min-height: 36px;
  color: #536858;
  font-size: 13px;
  font-weight: 500;
  transition:
    background 0.15s,
    color 0.15s,
    box-shadow 0.15s;
}
.time-mode button:hover {
  color: #304e3c;
}
.time-mode button[aria-pressed="true"] {
  background: #fff;
  color: #315e44;
  box-shadow: 0 1px 4px #29463116;
}
.arrival-target rect {
  fill: #e5eee2;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.arrival-target text {
  fill: #3e694a;
  font-size: 16px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.arrival-target.after-deadline rect {
  fill: #f3e9cf;
}
.arrival-target.after-deadline text,
#map .late-time {
  fill: #896626;
}
#departures .day-note {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 5px;
  color: #65766b;
}
.is-arrival #arrival-label {
  color: #3e694a;
  font-weight: 550;
}
@media (max-width: 700px) {
  .clock-area {
    width: 214px;
  }
  .clock-reading {
    margin-top: 2px;
  }
  .time-mode {
    margin-bottom: 0;
  }
  .time-mode button {
    padding: 5px 17px;
    min-height: 32px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .time-mode button {
    transition: none;
  }
}

#night-rows .night-row .deadline-note {
  display: block;
  color: #ded5ad;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  margin: 4px 0 0;
}
#night-rows .night-row .night-caption {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  margin: 5px 0 0;
  color: #d1ded6;
}
@media (min-width: 701px) {
  #map svg {
    max-height: max(230px, min(56svh, calc(100svh - 530px)));
  }
  #night-rows .night-row td {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}
#night-rows .night-row td:nth-child(2) {
  font-size: 18px;
}
#night-rows .night-empty td:last-child {
  font-size: 14px;
}
#night-rows .night-note td {
  padding: 10px 2px 0;
  border: 0;
  color: #6b766e;
  font-size: 12px;
  font-weight: 400;
  white-space: normal;
  text-align: right;
}
.night-note a {
  color: #446455;
  text-underline-offset: 3px;
}
@media (max-width: 700px) {
  #night-rows .night-row td:nth-child(2) {
    font-size: 15px;
  }
  #night-rows .night-row .night-caption {
    font-size: 10px;
  }
  #night-rows .night-note td {
    font-size: 11px;
  }
}

/* Clock times have event captions. Durations use their own pictograms. */
#map .event-label {
  font-size: 14px;
  font-weight: 450;
  fill: #65766b;
  letter-spacing: 0;
}
.timing-icon {
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.duration {
  color: #65766b;
}
.duration text {
  font-size: 16px;
  font-weight: 400;
  fill: currentColor;
  letter-spacing: 0;
}
.duration-walk {
  color: #52785a;
}
.wait-badge {
  color: #40704b;
}
.wait-badge.long,
.wait-badge.tight {
  color: #957027;
}
@media (max-width: 700px) {
  #map .event-label {
    font-size: 15px;
  }
}

.controls {
  position: relative;
  padding-bottom: 48px;
}
.car-options {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
}
.controls .car-toggle {
  min-width: 0;
  height: 35px;
  padding: 5px 12px;
  gap: 7px;
  border-radius: 18px;
  border: 1px solid #dce5d9;
  background: transparent;
  color: #607466;
  font-size: 12px;
  font-weight: 500;
  box-shadow: none;
}
.controls .car-toggle:hover {
  background: #eaf0e7;
}
.controls .car-toggle[aria-pressed="true"] {
  background: #e3eee0;
  color: #325e3e;
  border-color: #abc4a6;
}
.controls .car-toggle svg {
  width: 25px;
  height: 23px;
  overflow: visible;
  stroke: currentColor;
  stroke-width: 1.45;
}
.car-check {
  visibility: hidden;
  font-size: 12px;
  width: 10px;
}
.car-toggle[aria-pressed="true"] .car-check {
  visibility: visible;
}
.car-time {
  fill: #527568;
}
.duration-car {
  color: #527568;
}
@media (max-width: 700px) {
  .controls {
    padding-bottom: 43px;
  }
  .controls .car-toggle {
    height: 33px;
    padding: 4px 9px;
    gap: 5px;
  }
}
@media (max-width: 700px) and (max-height: 880px) {
  #app {
    gap: 8px;
    padding-top: 12px;
  }
  .clock-area {
    width: 190px;
  }
  #departures td {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  #night-rows .night-space td {
    height: 16px;
  }
}
