#station-map-dialog {
  width: min(1240px, calc(100% - 24px));
  max-width: 1240px;
  padding: 24px;
  background: #f8f1d4;
}
#station-map-dialog h2 {
  margin: 6px 30px 6px 0;
}
#station-map-dialog p {
  margin: 10px 0;
}
.station-map-toolbar,
.station-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.station-map-toolbar select {
  max-width: 100%;
  padding: 8px;
  font: inherit;
  background: #fffbed;
  color: #26374b;
  border: 2px solid #596b85;
}
.station-map-toolbar button {
  min-height: 44px;
  padding: 6px 12px;
}
.station-map-legend {
  font-size: 18px;
  gap: 8px 20px;
}
.station-map-legend span:first-child {
  color: #236b84;
}
.station-map-legend span:nth-child(3) {
  color: #976022;
}
.station-map-legend span:last-child {
  color: #b94420;
}
.station-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  border: 3px solid #5a7775;
  margin: 16px 0;
}
#station-map-viewport {
  height: min(62vh, 610px);
  overflow: auto;
  overscroll-behavior: contain;
  background: #e8ede2;
}
#station-map-size {
  position: relative;
}
#station-map-canvas {
  position: absolute;
  width: 1440px;
  transform-origin: top left;
  background: radial-gradient(#c9d5c9 1px, transparent 1px) 0 0 / 20px 20px;
}
#station-map-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.station-edge {
  fill: none;
  stroke: #236b84;
  stroke-width: 3;
  opacity: 0.4;
}
.station-edge.walk {
  stroke: #976022;
  stroke-dasharray: 8 6;
}
.station-edge.is-selected {
  opacity: 1;
  stroke-width: 5;
}
#station-map-dialog .station-node {
  position: absolute;
  transform: translate(-50%, -14px);
  width: 126px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #26374b;
  font-size: 19px;
  line-height: 1;
}
.station-node span {
  display: block;
  font-size: 27px;
  height: 30px;
  color: #236b84;
}
.station-node b {
  display: inline-block;
  background: #fffbed;
  padding: 3px 5px;
  border-radius: 4px;
}
#station-map-dialog .station-node[aria-pressed='true'] b {
  background: #26374b;
  color: white;
}
.station-node.is-here span {
  color: #b94420;
}
.station-map-detail {
  padding: 16px;
  background: #fffbed;
  min-width: 0;
}
.station-map-detail h3 {
  margin: 0;
  font-size: 28px;
}
.station-map-detail h4 {
  margin-bottom: 8px;
}
.station-map-detail ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.station-map-detail li {
  margin-bottom: 8px;
}
.station-map-detail li button {
  width: 100%;
  text-align: left;
  padding: 9px;
  font-size: 21px;
}
.station-map-detail small {
  display: block;
  font-size: 17px;
  font-weight: normal;
  margin-top: 5px;
}
.station-map-detail > p {
  font-size: 18px;
}
.defeat-rules,
.rules-travel {
  margin: 20px 0;
}
.rules-home {
  padding: 12px;
  background: #e2eddf;
  border-left: 4px solid #387357;
}
.rules-table-wrap {
  overflow-x: auto;
}
.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 20px;
}
.rules-table th,
.rules-table td {
  text-align: left;
  padding: 12px;
  border: 1px solid #b7c2b0;
  vertical-align: top;
}
.rules-table thead {
  background: #e2eddf;
}
.rules-table tbody th {
  width: 28%;
}
.rules-travel li {
  margin-bottom: 8px;
}
@media (max-width: 700px) {
  #station-map-dialog {
    padding: 16px;
  }
  .station-map-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  #station-map-viewport {
    height: 300px;
  }
  .station-map-toolbar select {
    width: 100%;
  }
  .rules-table {
    font-size: 18px;
  }
  .rules-table th,
  .rules-table td {
    padding: 7px;
    overflow-wrap: anywhere;
  }
}
