:root {
  color-scheme: light;
  font-family: "Atkinson Hyperlegible Next","Apple SD Gothic Neo","Malgun Gothic",sans-serif;
  color: #172e4a;
  background: #eaf0f6;
  line-height: 1.55;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

main {
  max-width: 43rem;
  min-height: 100vh;
  margin: auto;
  padding: 1.35rem clamp(1rem,5vw,3rem) 3rem;
  background: #fff;
}

header {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: #213d63;
  font-weight: 700;
  border-bottom: 2px solid #213d63;
  padding: .25rem 0 1rem;
}

.mark {
  display: flex;
  gap: 3px;
  transform: skewX(-17deg);
}

.mark i {
  width: 5px;
  height: 19px;
  background: #246a8b;
}

.mark i:last-child {
  background: #dc6530;
}

h1 {
  font-size: clamp(2.1rem,7vw,3.1rem);
  line-height: 1.15;
  letter-spacing: -.055em;
  margin: 2rem 0 .45rem;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.35;
  margin: 0;
}

h3 {
  font-size: 1.22rem;
  margin: .3rem 0;
}

p {
  color: #44576a;
  margin: .55rem 0 1rem;
}

.account,small,time,.note,.via {
  font-size: .92rem;
  color: #4e6172;
}

.account {
  overflow-wrap: anywhere;
  margin: 0;
}

section {
  padding: 1.6rem 0;
  border-bottom: 1px solid #d5dee7;
}

.stations {
  display: grid;
  grid-template-columns: minmax(0,1fr) 1.5rem minmax(0,1fr);
  align-items: end;
  gap: .6rem;
}

.departure-time {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.track {
  height: 2px;
  background: #6084a1;
  position: relative;
  margin-bottom: 2.15rem;
}

.track:before,.track:after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border: 2px solid #6084a1;
  border-radius: 50%;
  background: white;
  top: -3px;
}

.track:before {
  left: -2px;
}

.track:after {
  right: -2px;
}

label {
  display: block;
  font-size: 1rem;
  font-weight: 650;
}

small {
  font-weight: 400;
}

input, select {
  margin: .3rem 0 .9rem;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.9rem;
  border: 1px solid #91a4b5;
  border-radius: .4rem;
  padding: .55rem .7rem;
  font: inherit;
  background: #fff;
  color: inherit;
}

select {
  appearance: none;
  padding-right: 1.65rem;
}

.stations label {
  position: relative;
}

.stations label::after {
  content: "";
  position: absolute;
  right: .8rem;
  bottom: 2.25rem;
  width: .46rem;
  height: .46rem;
  border: solid #315774;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  pointer-events: none;
}

button,.official {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  min-height: 2.8rem;
  padding: .5rem 1rem;
  border: 1px solid #213d63;
  border-radius: .4rem;
  text-decoration: none;
  background: #213d63;
  color: white;
}

.official,.secondary {
  background: white;
  color: #213d63;
}

.official {
  margin-top: .65rem;
}

.text {
  background: transparent;
  border: 0;
  color: #315774;
  padding: .3rem;
  text-decoration: underline;
  font-size: .95rem;
}

button:disabled {
  opacity: .5;
}

[hidden] {
  display: none;
}

article {
  border-left: 4px solid #4085a3;
  background: #f1f6f8;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}

.status {
  font-size: .9rem;
  font-weight: 700;
  color: #285773;
}

.via {
  font-weight: 400;
}

.note {
  margin-top: 1rem;
}

p[role=alert] {
  color: #992c20;
}

p:empty {
  display: none;
}

:focus-visible {
  outline: 3px solid #b95215;
  outline-offset: 3px;
}

#manual-invite summary {
  min-height: 2.8rem;
  padding: .55rem 0;
  cursor: pointer;
  color: #315774;
}

.full { width: 100%; }
.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: .65rem;
  color: #315774;
}
.back + h1 { margin-top: .55rem; }
.actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.actions button { flex: 1; }
.friends { padding: 0; list-style: none; }
.friends li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 0;
  border-top: 1px solid #d5dee7;
}
.friends li span,.share-result h2 { overflow-wrap: anywhere; }
.friends form { flex-shrink: 0; }
.connection { display: block; }
@media (max-width: 375px) {
  .departure-time { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
