:root {
  --ink: #140e0b;
  --paper: #f4ead8;
  --cream: #f7f1e6;
  --muted: rgba(247, 241, 230, 0.62);
  --line: rgba(247, 241, 230, 0.16);
  --day: #c4372c;
  --accent: #ffb1a8;
  --cinnabar: #c4372c;
  --display: "Black Han Sans", "Apple SD Gothic Neo", sans-serif;
  --sans: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --paper-muted: #6d5848;
  --paper-soft: #4e3d31;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(196, 55, 44, 0.16), transparent 220px),
    var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

::selection {
  color: var(--ink);
  background: #f3e2b8;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.mast,
.stage,
.practical,
.colophon {
  width: min(1180px, calc(100% - 28px));
  margin-inline: auto;
}

.mast {
  padding: 8px 0 0;
}

.mast-bar,
.colophon {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.mast-bar p,
.home-link,
.colophon a {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.mast-bar p {
  color: var(--muted);
  text-align: right;
}

.home-link,
.colophon a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.home-link:hover,
.colophon a:hover {
  border-bottom-color: var(--accent);
}

h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
  margin: 4px 0 0;
  font-weight: 400;
}

h1 .ko {
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 48px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

h1 .en {
  font-family: var(--sans);
  font-size: clamp(19px, 2.6vw, 25px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.deck {
  max-width: 46rem;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dancheong {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.55fr 1fr 0.35fr;
  height: 6px;
  margin-top: 8px;
}

.dancheong i:nth-child(1) { background: #c4372c; }
.dancheong i:nth-child(2) { background: #1a4f8b; }
.dancheong i:nth-child(3) { background: #e2b13c; }
.dancheong i:nth-child(4) { background: #0e7a62; }
.dancheong i:nth-child(5) { background: var(--paper); }

.stage {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.days {
  position: sticky;
  top: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(1180px, calc(100% - 28px));
  margin: 8px auto 0;
  padding: 8px 0;
  background: var(--ink);
  box-shadow: 0 12px 20px rgba(20, 14, 11, 0.45);
}

.day-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 58px;
  padding: 8px 10px;
  color: var(--cream);
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.day-tab:hover {
  background: rgba(247, 241, 230, 0.06);
  border-color: rgba(247, 241, 230, 0.35);
}

.day-tab[aria-selected="true"]:hover {
  background: var(--day);
  border-color: transparent;
}

.day-tab[data-day="mon"][aria-selected="true"]:hover {
  background: var(--paper);
}

.day-tab .glyph {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.day-tab span,
.day-tab small {
  display: block;
}

.day-tab span {
  font-size: 12px;
  font-weight: 700;
}

.day-tab small {
  color: var(--muted);
  font-size: 12px;
}

.day-tab[aria-selected="true"] {
  color: #fff8ee;
  border-color: transparent;
}

.day-tab[aria-selected="true"] small {
  color: inherit;
  opacity: 0.8;
}

.day-tab[data-day="fri"][aria-selected="true"] { background: #c4372c; }
.day-tab[data-day="sat"][aria-selected="true"] { background: #1a4f8b; }
.day-tab[data-day="sun"][aria-selected="true"] { background: #0e7a62; }
.day-tab[data-day="mon"][aria-selected="true"] {
  color: var(--ink);
  background: var(--paper);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: 104px;
}

.mount {
  padding: 16px 16px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--day);
  box-shadow: 7px 7px 0 var(--day);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.mount :focus-visible {
  outline-color: var(--ink);
}

.map-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.map-toolbar p,
#map-count {
  margin: 0;
  color: var(--paper-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-toolbar h2 {
  margin: 2px 0 0;
  font-family: var(--sans);
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.map-frame {
  position: relative;
  aspect-ratio: 680 / 500;
  overflow: hidden;
  background: #c5ddd4;
  box-shadow: inset 0 0 0 1px rgba(20, 14, 11, 0.35);
}

#map {
  display: block;
  width: 100%;
  height: 100%;
}

.compass,
.ghost {
  position: absolute;
  z-index: 1;
  margin: 0;
  color: rgba(47, 78, 70, 0.72);
  pointer-events: none;
}

.compass {
  top: 10px;
  left: 12px;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 3px 7px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(247, 241, 230, 0.85);
}

.compass-arrow {
  color: var(--day);
  font-size: 13px;
  line-height: 1;
}

.compass-n {
  color: var(--paper-muted);
}

.ghost {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
  transform: translate(-50%, -50%);
}

.ghost b {
  display: block;
  color: rgba(28, 20, 15, 0.55);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.1;
}

#pin-layer {
  position: absolute;
  inset: 0;
}

.pin,
.leg-label {
  position: absolute;
  z-index: 2;
}

.pin {
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.pin-mark {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  margin: 2px auto;
  place-items: center;
  color: var(--day);
  background: var(--cream);
  border: 2px solid var(--day);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--day);
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.pin:hover .pin-mark,
.pin:focus-visible .pin-mark {
  transform: scale(1.07);
}

.route-arrow {
  position: absolute;
  z-index: 2;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 9px solid var(--day);
  filter: drop-shadow(0 0 3px var(--cream)) drop-shadow(0 0 3px var(--cream));
  pointer-events: none;
}

.pin.home .pin-mark {
  border-radius: 4px;
}

.pin.airport .pin-mark {
  box-shadow:
    0 0 0 3px #c5ddd4,
    0 0 0 5px var(--day);
}

.pin-icon,
.num-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.pin-num {
  position: absolute;
  top: -6px;
  left: -6px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  background: var(--day);
}

.pin[aria-current="true"] {
  z-index: 4;
}

.pin[aria-current="true"] .pin-mark {
  width: 46px;
  height: 46px;
  margin: -1px auto;
  color: var(--cream);
  background: var(--day);
  box-shadow: 3px 3px 0 rgba(20, 14, 11, 0.35);
}

.pin.airport[aria-current="true"] .pin-mark {
  box-shadow:
    0 0 0 3px #c5ddd4,
    0 0 0 5px var(--day);
}

.pin[aria-current="true"] .pin-icon {
  width: 24px;
  height: 24px;
}

.pin[aria-current="true"] .pin-num {
  color: var(--day);
  background: var(--cream);
}

.pin-name,
.leg-label {
  padding: 1px 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  background: var(--cream);
  box-shadow: 2px 2px 0 var(--day);
}

.pin-name {
  position: absolute;
  pointer-events: none;
}

.pin.anchor-e .pin-name {
  top: 50%;
  left: calc(100% + 6px);
  transform: translateY(-50%);
}

.pin.anchor-w .pin-name {
  top: 50%;
  right: calc(100% + 6px);
  transform: translateY(-50%);
}

.pin.anchor-n .pin-name {
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
}

.pin.anchor-s .pin-name {
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
}

.leg-label {
  z-index: 3;
  color: var(--day);
  background: var(--cream);
  transform: translate(-50%, -50%);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin: 12px 2px 2px;
  color: var(--paper-muted);
  font-size: 12px;
}

.legend-note {
  margin-left: auto;
  font-style: italic;
}

.legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.legend i {
  display: inline-block;
  width: 18px;
  height: 8px;
  background: var(--day);
}

.legend i.legend-home {
  height: 10px;
  border: 2px solid var(--day);
  background: var(--cream);
}

.legend-dash {
  height: 0;
  background: transparent;
  border-top: 2px dashed var(--day);
}

.panel {
  min-width: 0;
  font-family: var(--sans);
}

.panel .eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.panel h2 {
  margin: 2px 0 0;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.panel .deck {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.pane-bar {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin: 14px 0 8px;
}

.jumps,
.list-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0;
}

.jumps a,
.list-tools button {
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--line);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.return-note a {
  color: var(--accent);
  font-weight: 700;
}

.list-tools button {
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.jumps a:hover,
.list-tools button:hover {
  color: var(--cream);
  border-color: var(--accent);
  background: rgba(247, 241, 230, 0.06);
}

.stops {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stops > li:not(.is-open) {
  border-bottom: 1px solid var(--line);
}

.stop {
  width: 100%;
  padding: 10px 12px;
  color: var(--cream);
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.stops > li:not(.is-open) .stop:hover {
  background: rgba(247, 241, 230, 0.05);
}

.stops > li.is-open .stop:hover {
  background: rgba(20, 14, 11, 0.04);
}

.stop-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: start;
}

.stop-row .num {
  margin-top: 2px;
}

.stop-row .chev {
  padding-top: 6px;
}

.chev {
  display: grid;
  color: var(--muted);
  place-items: center;
}

.chev svg {
  width: 14px;
  height: 14px;
}

.stops > li.is-open .chev {
  color: var(--paper-soft);
}

.stops > li.is-open .chev svg {
  transform: rotate(180deg);
}

.stops > li.is-open {
  color: var(--ink);
  background: var(--paper);
}

.stops > li.is-open .stop {
  color: var(--ink);
}

.detail {
  padding: 0 12px 16px 50px;
}

.note {
  margin: 0;
  color: var(--paper-soft);
  font-size: 14px;
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}

.tags span {
  padding: 3px 8px;
  color: var(--paper-soft);
  font-size: 11px;
  font-weight: 700;
  background: rgba(20, 14, 11, 0.06);
}

.where {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin: 12px 0 0;
  color: var(--paper-muted);
  font-size: 13px;
  line-height: 1.4;
}

.where a {
  padding: 6px 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(20, 14, 11, 0.28);
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.where a:hover {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.num {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.stops > li.is-current:not(.is-open) .num,
.stops > li.is-open .num {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.num-icon {
  width: 16px;
  height: 16px;
}

.stop strong,
.meta,
.return-note,
.cluster li span {
  display: block;
}

.stop strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.stops > li.is-open .stop strong {
  font-size: 18px;
}

.brief {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.stops > li.is-open .brief {
  color: var(--paper-soft);
}

.place-line {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.stops > li.is-open .place-line {
  color: #8a6848;
}

.stop .tags {
  margin-top: 8px;
}

.stops > li:not(.is-open) .tags span {
  color: var(--cream);
  background: rgba(247, 241, 230, 0.08);
}

.meta {
  margin-bottom: 1px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stops > li.is-open .meta {
  color: #8a6848;
}

.cluster {
  display: grid;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.cluster li {
  padding: 12px 0;
  border-top: 1px solid rgba(20, 14, 11, 0.12);
}

.cluster li strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cluster li span {
  margin-top: 3px;
  color: #5c4a3a;
  font-size: 13px;
  line-height: 1.45;
}

.cluster .where {
  margin-top: 8px;
}

.return-note {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.transport-note {
  margin: 0 0 10px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  border-left: 2px solid var(--accent);
  background: rgba(247, 241, 230, 0.04);
}

.stops > li.leg {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 3px 12px 3px 12px;
  color: var(--muted);
  background: transparent;
  border-bottom: 0;
}

.leg-arrow {
  display: grid;
  place-items: center;
  padding-top: 2px;
  color: var(--accent);
}

.leg-arrow svg {
  width: 13px;
  height: 13px;
}

.leg-copy {
  font-size: 12.5px;
  line-height: 1.45;
}

.leg-copy b {
  color: var(--cream);
  font-weight: 700;
}

.within {
  margin: 12px 0 0;
  padding: 8px 10px;
  color: var(--paper-soft);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  background: rgba(20, 14, 11, 0.06);
}

.practical {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.practical .eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.practical h2 {
  margin: 2px 0 8px;
  font-family: var(--sans);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.practical dl {
  display: grid;
  gap: 0;
  margin: 8px 0 0;
}

.practical div {
  padding: 16px 18px 16px 0;
  border-top: 1px solid var(--line);
}

.practical dt {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.practical dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.colophon {
  padding: 18px 0 40px;
  color: var(--muted);
}

.colophon p {
  max-width: 40rem;
  margin: 0;
  font-size: 14px;
}

@media (min-width: 980px) {
  .stage {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
    align-items: start;
  }

  .days {
    margin-top: 8px;
  }

  .practical dl {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .ghost b {
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  .day-tab {
    min-height: 70px;
    padding: 8px 6px;
  }

  .day-tab .glyph {
    font-size: 22px;
  }

  .day-tab small {
    display: none;
  }

  .pin-name,
  .leg-label {
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .mount {
    padding: 12px 12px 10px;
  }

  .detail {
    padding-left: 44px;
  }

  .legend-note {
    width: 100%;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
