/* Winter stamp notebook. Solid = decided; dotted = not yet. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
}
:lang(ko) { font-family: system-ui, sans-serif; word-break: keep-all; overflow-wrap: break-word; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 8px 16px;
  color: var(--indigo);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
}
a { color: var(--indigo); text-underline-offset: 4px; }
button:disabled { opacity: .5; cursor: default; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--indigo); outline-offset: 4px; }
button:hover:not(:disabled), .button:hover { border-color: var(--indigo); }
svg { display: block; }
img, svg { max-width: 100%; }
h1, h2, h3, p, ol, ul, blockquote { margin: 0; }
h1 { font-size: 32px; line-height: 1.25; font-weight: 700; }
h2 { font-size: 28px; line-height: 1.3; }
h3 { font-size: 20px; line-height: 1.4; }
#app {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 28px var(--gutter) calc(104px + env(safe-area-inset-bottom));
}
#app > * + * { margin-top: 24px; }
.tabs {
  position: fixed;
  z-index: 20;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: calc(var(--tabs-height) + env(safe-area-inset-bottom));
  padding: 0 max(0px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(0px, env(safe-area-inset-left));
  border-top: 1px solid var(--rule);
  background: var(--sheet);
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current='page'] { color: var(--indigo); }
.tab[aria-current='page']::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--indigo); }
.band {
  padding: 8px var(--gutter);
  border-bottom: 1px solid var(--rule);
  background: var(--sheet);
  color: var(--ink-2);
  font-size: 14px;
  text-align: center;
}
.band button { min-height: 48px; margin: 0 4px; border: 0; padding: 8px; text-decoration: underline; text-underline-offset: 4px; }
.kicker { color: var(--ink-2); font-size: 15px; }
.kicker + h1 { margin-top: 8px; }
.letter { padding: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-family: var(--font-letter); font-size: 18px; line-height: 1.8; }
.letter p + p { margin-top: 16px; }
.letter .sig { margin-top: 16px; text-align: right; font-style: italic; }
.next { padding: 20px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--sheet); }
.next > * + * { margin-top: 12px; }
.next .label, .next-label { font-size: 15px; color: var(--ink-2); }
.next h2, .next .place-name { font-size: 20px; font-weight: 700; line-height: 1.4; }
.ko { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 0; border: 0; color: var(--indigo); text-decoration: underline; text-underline-offset: 4px; font-size: 17px; }
.maps { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.maps a { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; }
.maps .primary, .maps .button:first-child { padding: 8px 16px; background: var(--indigo); color: var(--sheet); border: 1px solid var(--indigo); border-radius: var(--radius); text-decoration: none; font-weight: 700; }
.bring { display: block; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 15px; }
.timeline { list-style: none; padding: 0; }
.timeline .row { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-top: 1px solid var(--rule); }
.timeline .row:last-child { border-bottom: 1px solid var(--rule); }
.timeline time, .timeline .time { font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.timeline time { white-space: nowrap; }
.timeline .row h3 { font-size: 18px; }
.timeline .row p { margin-top: 4px; font-size: 15px; color: var(--ink-2); }
.timeline .row.past { color: var(--ink-2); }
.timeline .now .time { position: relative; padding-left: 20px; }
.now-dot { position: absolute; width: 10px; height: 10px; top: 8px; left: 0; background: var(--seal); border-radius: 50%; }
.timeline .now .now-label { color: var(--ink); font-size: 14px; }
.tbd { display: inline-block; padding: 0 8px; border: 1px dotted var(--ink-2); border-radius: 3px; font-size: 14px; font-weight: 400; color: var(--ink-2); vertical-align: middle; }
.stop { scroll-margin-top: 16px; }
.stop-link { display: flex; align-items: center; min-height: 48px; font-family: var(--font-body); font-size: 15px; text-decoration: underline; }
.stop-time { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.stop-now { position: relative; padding-left: 20px; color: var(--ink); font-size: 14px; }
.stop-next { color: var(--ink-2); }
.stop > * + * { margin-top: 12px; }
.layer { padding: 16px; border-left: 1px solid var(--rule); }
.layer > * + * { margin-top: 8px; }
.layer h3 { font-size: 17px; }
.layer p { font-size: 15px; }
.layer a { display: inline-flex; align-items: center; min-height: 48px; }
.layer--notice { padding-left: 16px; background: transparent; }
.layer--deeper { background: var(--tint-deep); }
.layer--find { background: var(--tint-find); }
.find-row + .find-row { margin-top: 16px; }
.find-seal { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.stamp {
  position: relative;
  flex: 0 0 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  padding: 4px;
  border: 2px dotted var(--rule);
  border-radius: 50%;
  background: var(--sheet);
  color: var(--ink-2);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
.stamp svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.stamp.stamped, .stamp[aria-pressed='true'], .stamp[data-stamped='true'] { color: var(--seal); border: 2px solid var(--seal); }
.stamp.stamped::after, .stamp[aria-pressed='true']::after, .stamp[data-stamped='true']::after { content: ''; position: absolute; inset: 4px; border: 1px solid currentColor; border-radius: 50%; }
.stamp.stamped > *, .stamp[aria-pressed='true'] > *, .stamp[data-stamped='true'] > * { transform: rotate(var(--tilt, -4deg)); }
@media (prefers-reduced-motion: no-preference) {
  .stamp.is-stamping > * { animation: stamp-in 180ms ease-out both; }
  @keyframes stamp-in { from { opacity: 0; transform: scale(1.2) rotate(var(--tilt, -4deg)); } to { opacity: 1; transform: scale(1) rotate(var(--tilt, -4deg)); } }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.daynav { display: flex; gap: 12px; justify-content: space-between; margin-top: 32px; padding: 16px 0; border-top: 1px solid var(--rule); }
.daynav > * { display: inline-flex; align-items: center; justify-content: center; flex: 1; min-height: 48px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; }
.overlay { position: fixed; z-index: 40; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.overlay .close { position: sticky; top: 0; z-index: 1; display: inline-flex; min-width: 48px; min-height: 48px; margin-bottom: 24px; background: var(--sheet); }
.essay { max-width: 34em; margin: 0 auto; font-family: var(--font-letter); font-size: 18px; line-height: 1.85; }
.essay h1, .essay h2 { font-size: 28px; font-weight: 400; line-height: 1.4; }
.essay > * + * { margin-top: 24px; }
.essay .citation-word { white-space: nowrap; }
.essay sup { font-family: var(--font-body); font-size: 14px; line-height: 0; vertical-align: baseline; position: relative; top: -0.5em; }
.essay sup a { position: relative; display: inline; }
.essay sup a::after { content: ""; position: absolute; width: 44px; height: 44px; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.sources { padding-top: 20px; border-top: 1px solid var(--rule); font-family: var(--font-body); font-size: 15px; }
.sources ol, ol.sources { padding-left: 24px; }
.sources a { display: inline-flex; min-height: 48px; align-items: center; }
.hangul { width: min(100%, 34em); margin: 24px auto; padding: 24px 0; text-align: center; }
.hangul h1, .hangul h2, .hangul .name { font-size: 32px; line-height: 1.5; }
.hangul > * + * { margin-top: 24px; }
.hangul .address { font-size: 20px; }
.hangul .host-line { border-top: 1px solid var(--rule); padding-top: 24px; font-size: 18px; line-height: 1.8; }
.journey { padding: 16px; border: 1px solid var(--rule); background: var(--sheet); }
.journey > svg { display: block; width: 100%; height: auto; color: var(--ink-2); }
.journey svg text { fill: var(--ink); font-family: var(--font-body); font-size: 15px; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.journey .label-leader { stroke: var(--ink-2); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.route-past, .route-future { fill: none; stroke: var(--indigo); stroke-width: 2; stroke-linecap: round; }
.route-future { stroke-dasharray: 1 7; }
.journey .current-position { fill: var(--seal); }
.stamp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 8px; padding: 16px 0; }
.stamp-grid > * { min-width: 0; justify-self: center; }
.photo-slot { display: grid; place-items: center; min-height: 160px; padding: 20px; border: 1px dotted var(--ink-2); color: var(--ink-2); font-size: 15px; }
.info { padding: 0; list-style: none; }
.info > li, .info > .info-row { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.info .stop + .stop { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--rule); }
.info h2, .info h3 { margin-bottom: 8px; font-size: 18px; }
.info a { display: inline-flex; min-height: 48px; align-items: center; }
.theme-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.theme-switch button { min-width: 0; border: 0; border-radius: 0; padding: 8px; }
.theme-switch button + button { border-left: 1px solid var(--rule); }
.theme-switch [aria-pressed='true'] { background: var(--indigo); color: var(--paper); font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 359px) {
  .stamp-grid { column-gap: 0; }
  .next { padding: 16px; }
  .timeline .row { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
}
