@charset "UTF-8";

@font-face {
  font-family: "Taipei Serif TC";
  src: url("./assets/fonts/taipei/noto-serif-tc.woff2?v=2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Taipei Sans TC";
  src: url("./assets/fonts/taipei/noto-sans-tc.woff2?v=2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Taipei Sans KR";
  src: url("./assets/fonts/taipei/noto-sans-kr.woff2?v=2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Taipei Sans JP";
  src: url("./assets/fonts/taipei/noto-sans-jp.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "PP Mori";
  src: url("./assets/fonts/pp-mori/PPMori-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "PP Mori";
  src: url("./assets/fonts/pp-mori/PPMori-SemiBold.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #f6f2e8;
  background: #202a28;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #f6f2e8;
  --muted: rgba(246, 242, 232, .61);
  --line: rgba(246, 242, 232, .22);
  --edge: clamp(24px, 3.35vw, 60px);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { min-width: 280px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
button[hidden], [hidden] { display: none !important; }
button:focus-visible, a:focus-visible { outline: 2px solid #e5c46b; outline-offset: 6px; }

.platform-experience { position: relative; width: 100%; height: 100%; height: 100dvh; isolation: isolate; }
#scene { width: 100%; height: 100%; display: block; touch-action: manipulation; }
.scene-shading {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 26, 25, .5) 0%, transparent 22%);
}

.quickview-fade {
  position: absolute;
  inset: 0;
  z-index: 9;
  background: #131017;
  opacity: 0;
  pointer-events: none;
}

.masthead {
  position: absolute;
  top: max(29px, env(safe-area-inset-top));
  left: max(var(--edge), env(safe-area-inset-left));
  right: max(var(--edge), env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 1s .15s ease, transform 1s .15s ease;
}
.wordmark { display: flex; gap: 13px; align-items: center; }
.route-symbol { display: grid; place-items: center; width: 35px; height: 35px; border: 1.5px solid rgba(246, 242, 232, .84); border-radius: 50%; font-size: 20px; font-weight: 500; line-height: 1; }
.wordmark-title { font-size: 12px; font-weight: 600; letter-spacing: .21em; text-transform: uppercase; }
.masthead, .arrival, #board-train, #quickview, #about-me { font-family: "PP Mori", "Segoe UI", Arial, sans-serif; }
.masthead .route-symbol {
  width: 36px;
  height: 42px;
  border-radius: 8px;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 2px;
  font-size: 16px;
  font-weight: 600;
}
.masthead .route-symbol small { font-size: 10px; }

.scene-controls { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.scene-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 12px 7px 8px;
  border: 1px solid rgba(246, 242, 232, .32);
  border-radius: 7px;
  background: #202b30f2;
  color: #fffaf0;
  box-shadow: 0 3px 14px #151c2480;
  cursor: pointer;
  pointer-events: auto;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease;
}
.scene-marker:hover { background: #344652; border-color: #f6f2e8b8; }
.marker-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  background: #ffffff16;
  font-size: 19px;
  line-height: 1;
}
.nav-arrow {
  position: absolute;
  display: block;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fffef8;
  pointer-events: auto;
  cursor: pointer;
}
.nav-arrow-label {
  position: absolute;
  left: calc(50% + var(--label-shift, 0px));
  bottom: calc(50% + var(--label-lift, 10px));
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: clamp(11px, 1.35vw, 15px);
  font-weight: 700;
  text-shadow: 0 1px 2px #161e22, 0 1px 5px #161e22, 0 1px 9px #161e22;
}
.nav-arrow:hover .nav-arrow-label, .nav-arrow:focus-visible .nav-arrow-label { color: #ffe29d; }
#board-train .nav-arrow-label, #quickview .nav-arrow-label, #about-me .nav-arrow-label { font-weight: 600; }
#quickview { text-decoration: none; }
.wall-navigation-icon { display: none; }
[data-wall-view="true"] .ride-directions {
  position: absolute;
  top: 84%;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 24px);
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
[data-wall-view="true"] .wall-navigation {
  position: static;
  transform: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid #f6f2e85c;
  border-radius: 6px;
  background: #202b30ed;
}
[data-wall-view="true"] .wall-navigation-icon { display: inline; font-size: 17px; }
[data-wall-view="true"] .wall-navigation .nav-arrow-label {
  position: static;
  transform: none;
  font-size: 12px;
  text-shadow: none;
}
@media (max-width: 700px) {
  [data-wall-view="true"] .platform-footer .arrival {
    position: fixed;
    top: max(69px, calc(env(safe-area-inset-top) + 46px));
    left: var(--edge);
    right: var(--edge);
    text-shadow: 0 1px 3px #18252de0, 0 2px 8px #18252d94;
  }
}
.scene-marker-start {
  z-index: 1;
  background: #173b6a;
  border-color: #a9c3e6c4;
  transform: translate(-50%, calc(-50% - 52px));
}
.scene-marker-start:hover { background: #244e83; }
.scene-marker-start .marker-icon { font-size: 14px; }
.poster-link {
  position: absolute;
  pointer-events: auto;
  border-radius: 2px;
  transition: box-shadow .16s ease, background .16s ease;
}
.poster-link:hover { background: #e9f0ff14; box-shadow: 0 0 0 2px #f5d98c; }
.poster-link:focus-visible { outline-offset: 4px; }

.platform-footer {
  position: absolute;
  z-index: 3;
  left: max(var(--edge), env(safe-area-inset-left));
  right: max(var(--edge), env(safe-area-inset-right));
  bottom: max(31px, env(safe-area-inset-bottom));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 1s .2s ease, transform 1s .2s ease;
  pointer-events: none;
}
.arrival { text-shadow: 0 1px 2px #172026, 0 1px 5px #172026; }
.arrival-eyebrow { display: flex; align-items: center; gap: 7px; font-size: 9px; line-height: 1; font-weight: 600; letter-spacing: .19em; text-transform: uppercase; color: #f6f2e8; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #e6bd62; box-shadow: 0 0 7px rgba(230, 189, 98, .25); transition: background .6s; }
.status-dot.arrived { background: #a9c7ab; }
.arrival h1 { margin: 11px 0 7px; font-size: clamp(20px, 1.8vw, 27px); line-height: 1.16; letter-spacing: -.025em; font-weight: 400; }
.arrival p { margin: 0; font-size: 11px; line-height: 1.5; letter-spacing: .015em; color: #f6f2e8; }
.is-ready .masthead, .is-ready .platform-footer { opacity: 1; transform: none; }

.loading-screen { position: absolute; inset: 0; display: grid; place-items: center; background: #202a28; z-index: 10; }
.loading-content { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px; }
.loading-route { display: inline-grid; place-items: center; width: 56px; height: 56px; border: 1.5px solid #d8decf; border-radius: 50%; font-size: 30px; line-height: 1; font-weight: 400; color: #e5e9dd; }
.loading-name { margin: 21px 0 27px; font-size: 13px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; }
.loading-track { position: relative; width: 135px; height: 1px; background: rgba(218, 225, 212, .15); overflow: hidden; }
.loading-track span { position: absolute; inset: 0 auto 0 0; width: 32%; background: #c6b77d; animation: platform-loading 1.7s ease-in-out infinite; }
.loading-caption { margin: 15px 0 0; color: #9ba8a0; font-size: 10px; letter-spacing: .06em; }
.loading-quickview { margin-top: 16px; padding: 10px; color: var(--ink); font-size: 12px; text-underline-offset: 3px; }
.is-ready .loading-screen { visibility: hidden; pointer-events: none; }
@keyframes platform-loading { 0% { transform: translateX(-100%); } 100% { transform: translateX(420%); } }

.fallback { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: #202a28; padding: 28px; }
.fallback-card { max-width: 360px; text-align: center; }
.fallback-card h1 { margin: 26px 0 12px; font-size: 25px; font-weight: 400; line-height: 1.3; letter-spacing: -.025em; }
.fallback-card p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.fallback-retry { display: inline-flex; gap: 32px; margin-top: 16px; padding: 12px 17px; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; text-decoration: none; font-size: 12px; }
.noscript-note { position: absolute; bottom: 15%; left: 20px; right: 20px; z-index: 25; text-align: center; font-size: 13px; color: #e6d6a3; }

@media (max-width: 600px) {
  :root { --edge: 23px; }
  .masthead { top: max(24px, env(safe-area-inset-top)); }
  .route-symbol { width: 31px; height: 31px; font-size: 18px; }
  .masthead .route-symbol { width: 31px; height: 36px; font-size: 14px; }
  .masthead .route-symbol small { font-size: 9px; }
  .wordmark { gap: 10px; }
  .wordmark-title { font-size: 10px; letter-spacing: .18em; }
  .platform-footer { bottom: max(23px, env(safe-area-inset-bottom)); }
  .arrival h1 { margin-top: 10px; font-size: 23px; }
  .arrival p { font-size: 10px; }
  .arrival-eyebrow { font-size: 8px; }
  .scene-marker { gap: 6px; font-size: 11px; }
  .scene-shading { background: linear-gradient(180deg, rgba(15, 26, 25, .5) 0%, transparent 18%); }
}

@media (max-width: 360px) {
  :root { --edge: 18px; }
}

@media (max-height: 480px) and (min-width: 601px) {
  .masthead { top: max(17px, env(safe-area-inset-top)); }
  .platform-footer { bottom: max(17px, env(safe-area-inset-bottom)); }
  .arrival h1 { font-size: 20px; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .loading-track span { width: 100%; opacity: .65; }
}

.project-page {
  overflow: auto;
  min-height: 100%;
  background: #eeeae0;
  color: #1e2b33;
}
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 25px var(--edge);
  border-bottom: 1px solid #c8c6bc;
}
.project-header .wordmark-title { color: #30485c; }
.project-return {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  min-height: 44px;
  color: #1f446b;
  font-size: 14px;
  text-underline-offset: 4px;
}
.project-content {
  width: min(100% - 2 * var(--edge), 760px);
  margin: clamp(78px, 20vh, 195px) auto 55px;
  padding-top: 25px;
  border-top: 4px solid #28528a;
}
.project-content h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 1.03;
  letter-spacing: -.05em;
  font-weight: 600;
}
.project-content p { margin: 20px 0 0; color: #54616a; font-size: 16px; }

.poster-reader {
  position: fixed;
  inset: 0;
  width: min(880px, calc(100% - 36px));
  height: min(880px, calc(100dvh - 36px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 5px solid #9b9d93;
  border-radius: 11px;
  background: #f6f3eb;
  color: #182c3c;
  box-shadow: 0 0 0 1px #393f3f, 0 24px 68px #151b217d;
}
.poster-reader::backdrop { background: #17242755; }
.poster-reader-frame { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.poster-reader-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 0 18px;
  background: #193a60;
  color: #fffaf0;
}
.poster-reader-location { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 650; }
.poster-reader-number {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #dbe9f0;
  border-radius: 50%;
  font-variant-numeric: tabular-nums;
}
.poster-reader-location small { margin-left: 6px; color: #dce6ed; font-size: 11px; font-weight: 500; }
.poster-reader-close {
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.poster-reader-close:hover, .poster-map-toolbar a:hover { text-decoration: underline; text-underline-offset: 3px; }
.poster-reader-close:focus-visible { outline-offset: 0; }
.poster-reader-scroll { overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.poster-reader-scroll:focus-visible { outline: 2px solid #53779d; outline-offset: -3px; }
.poster-reader-article { padding: 25px clamp(16px, 3.1vw, 38px) 42px; }
.poster-reader-heading { margin-bottom: 20px; }
.poster-reader-category {
  margin: 0 0 8px;
  color: #3c5977;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.poster-reader-heading h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 51px);
  line-height: 1.04;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.poster-reader-summary {
  max-width: 65ch;
  margin: 12px 0 16px;
  color: #344858;
  font-size: 15px;
  line-height: 1.55;
}
.poster-reader-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; font-size: 13px; }
.poster-reader-facts div { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.poster-reader-facts dt { color: #3c5977; font-weight: 750; }
.poster-reader-facts dd { margin: 0; }
.poster-map { margin: 0; }
.poster-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
  padding: 9px 12px;
  border-radius: 6px 6px 0 0;
  background: #e4e9e8;
  color: #263b4d;
  font-size: 12px;
  line-height: 1.4;
}
.poster-map-toolbar a { color: #19436b; font-weight: 700; text-decoration: none; }
.poster-map iframe {
  display: block;
  width: 100%;
  height: clamp(300px, 49dvh, 445px);
  border: 1px solid #b4c0c1;
  background: #e7e9e5 url('./assets/accessibility-heatmap/preview.jpg') center / cover no-repeat;
}
.poster-map figcaption { margin-top: 9px; color: #465765; font-size: 13px; line-height: 1.45; }
.poster-game-art { display: block; overflow: hidden; border-radius: 6px; background: #142026; }
.poster-game-art img { display: block; width: 100%; height: clamp(160px, 34dvh, 265px); object-fit: contain; }
.poster-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-top: 18px;
  padding: 0 14px;
  border-radius: 6px;
  background: #193a60;
  color: #fffaf0;
  font-weight: 700;
  text-decoration: none;
}
.poster-action:hover { background: #264f7b; }
.poster-map-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; }
.poster-map-controls button {
  min-width: 36px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid #a7b6bc;
  border-radius: 4px;
  background: #fffdf6;
  color: #263b4d;
  font-weight: 700;
  cursor: pointer;
}
.poster-map-controls button:disabled { opacity: .5; cursor: default; }
.poster-map-controls output { min-width: 4ch; font-variant-numeric: tabular-nums; }
.poster-map-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: clamp(275px, 46dvh, 430px);
  border: 1px solid #b4c0c1;
  background: #eef1eb;
  touch-action: none;
  cursor: grab;
}
.poster-map-viewport.is-dragging { cursor: grabbing; }
.poster-map-viewport img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  user-select: none;
  pointer-events: none;
}
.poster-map-viewport img:not([src]) { visibility: hidden; }
.poster-reader-story { display: grid; gap: 20px; margin-top: 26px; }
.poster-reader-story section { max-width: 76ch; padding-top: 15px; border-top: 1px solid #c3cbd0; }
.poster-reader-story h2 { margin: 0 0 7px; font-size: 21px; letter-spacing: -.02em; }
.poster-reader-story p { margin: 0; color: #344858; font-size: 15px; line-height: 1.65; }

@media (max-width: 600px) {
  .poster-reader { width: calc(100% - 16px); height: calc(100dvh - 20px); border-width: 3px; }
  .poster-reader-rail { padding-inline: 12px; }
  .poster-reader-article { padding: 18px 13px 28px; }
  .poster-reader-location small { display: none; }
  .poster-map iframe { height: clamp(285px, 44dvh, 360px); }
  .poster-map-controls button { min-height: 44px; min-width: 44px; }
  .poster-reader-scroll { scrollbar-gutter: auto; }
}
