:root {
  --paper: #f7f1e7;
  --paper-deep: #eee1cc;
  --paper-white: #fffdf7;
  --ink: #261c18;
  --ink-soft: #695d55;
  --red: #c52d22;
  --red-deep: #8e1f19;
  --gold: #e9a91f;
  --green: #179b69;
  --lime: #a8e931;
  --line: rgba(48, 31, 24, .14);
  --shadow: 0 20px 46px rgba(66, 44, 27, .12);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --display: "STKaiti", "KaiTi", "FZKai-Z03", "Noto Serif SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(232, 169, 31, .11), transparent 19rem),
    radial-gradient(circle at 90% 32%, rgba(23, 155, 105, .07), transparent 22rem),
    var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .19;
  background-image: radial-gradient(rgba(93, 59, 41, .28) .55px, transparent .55px);
  background-size: 5px 5px;
}

body.sheet-open,
body.gallery-open {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  min-height: 100vh;
  min-height: 100svh;
}

.home-page {
  width: min(100%, 1180px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding:
    max(12px, env(safe-area-inset-top))
    clamp(18px, 4vw, 50px)
    max(12px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 32px;
}

.home-header p,
.home-header span {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.home-header-mark {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-header-mark i {
  width: 23px;
  height: 1px;
  display: block;
  background: var(--red);
}

.edition-seal {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--red);
  color: var(--red);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 900;
  transform: rotate(4deg);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(197, 45, 34, .18);
}

.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.cover-stage {
  position: relative;
  width: min(70vw, 300px, 34svh);
  margin: clamp(9px, 1.8vh, 18px) auto 0;
  flex: 0 0 auto;
}

.cover-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 76%;
  aspect-ratio: 1;
  left: 12%;
  top: 17%;
  border-radius: 50%;
  background: rgba(168, 233, 49, .2);
  filter: blur(27px);
}

.cover-frame {
  position: relative;
  margin: 0;
  padding: 6px;
  background: rgba(255, 253, 247, .88);
  border: 1px solid rgba(83, 53, 37, .13);
  border-radius: 3px 16px 4px 13px;
  box-shadow: 0 24px 58px rgba(87, 61, 36, .16);
  transform: rotate(-.55deg);
  animation: coverEnter .9s cubic-bezier(.2, .8, .2, 1) both;
}

.cover-frame::before,
.cover-frame::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(255, 253, 247, .8);
}

.cover-frame::before {
  top: 11px;
  left: 11px;
}

.cover-frame::after {
  right: 11px;
  bottom: 11px;
}

.cover-frame img {
  width: 100%;
  height: auto;
  border-radius: 2px 12px 2px 9px;
}

.cover-caption {
  position: absolute;
  right: -17px;
  bottom: 22px;
  width: 66px;
  height: 66px;
  display: grid;
  place-content: center;
  text-align: center;
  color: #fff8e8;
  background: var(--red);
  border: 2px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(117, 39, 31, .23);
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.35;
  transform: rotate(8deg);
}

.home-copy {
  width: min(100%, 560px);
  margin: 12px auto 0;
  text-align: center;
  animation: copyEnter .8s .16s ease both;
}

.kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 9px;
  color: var(--red);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
}

.kicker::before,
.kicker::after {
  content: "";
  width: 25px;
  height: 1px;
  background: currentColor;
  opacity: .45;
}

.home-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .035em;
}

.home-copy h1 em {
  color: var(--red);
  font-style: normal;
}

.home-copy > p:not(.kicker) {
  max-width: 455px;
  margin: 7px auto 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.75;
}

.route-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
}

.route-facts span {
  padding: 6px 10px;
  color: var(--ink-soft);
  background: rgba(255, 253, 247, .65);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.route-facts strong {
  margin-right: 3px;
  color: var(--red);
  font-family: var(--serif);
  font-size: 13px;
}

.home-actions {
  width: min(100%, 420px);
  margin: 12px auto 0;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 13px 22px;
  color: #fff9eb;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  border-radius: 14px;
  box-shadow: 0 7px 0 #711813, 0 18px 30px rgba(143, 43, 31, .2);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .12em;
  transition: transform .18s ease, box-shadow .18s ease;
}

.primary-button svg {
  width: 20px;
  height: 20px;
  transition: transform .18s ease;
}

.primary-button:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #711813, 0 8px 18px rgba(143, 43, 31, .18);
}

.primary-button:active svg {
  transform: translateX(3px);
}

.home-footnote {
  margin: 9px 0 0;
  color: var(--ink-soft);
  text-align: center;
  font-size: 9px;
  letter-spacing: .13em;
  opacity: .7;
}

.screen-page {
  min-height: 100vh;
  min-height: 100svh;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

.screen-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding:
    max(10px, env(safe-area-inset-top))
    clamp(14px, 4vw, 28px)
    10px;
  background: rgba(247, 241, 231, .92);
  border-bottom: 1px solid rgba(48, 31, 24, .08);
  backdrop-filter: blur(16px);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 253, 247, .82);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.screen-title {
  min-width: 0;
}

.screen-title strong {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .05em;
}

.screen-title small {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: .12em;
}

.progress-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: var(--red);
  background: rgba(255, 253, 247, .86);
  border: 1px solid rgba(197, 45, 34, .22);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.progress-pill svg {
  width: 14px;
  height: 14px;
}

.map-page {
  width: min(100%, 980px);
  margin: 0 auto;
}

.map-content {
  padding: 18px clamp(13px, 3.8vw, 28px) 0;
}

.route-intro {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 16px 17px 15px 19px;
  overflow: hidden;
  color: #fff9ec;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .06), transparent 42%),
    var(--red);
  border-radius: 14px 14px 5px 14px;
  box-shadow: 0 12px 26px rgba(116, 40, 30, .14);
}

.route-intro::after {
  content: "寻脉";
  position: absolute;
  right: 12px;
  bottom: -22px;
  color: rgba(255, 249, 236, .08);
  font-family: var(--serif);
  font-size: 88px;
  font-weight: 900;
  line-height: 1;
}

.route-intro p,
.route-intro h1 {
  position: relative;
  z-index: 1;
  margin: 0;
}

.route-intro p {
  color: rgba(255, 249, 236, .7);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.route-intro h1 {
  font-family: var(--serif);
  font-size: clamp(22px, 5.8vw, 31px);
  line-height: 1.35;
}

.route-intro span {
  position: relative;
  z-index: 1;
  max-width: 500px;
  color: rgba(255, 249, 236, .82);
  font-size: 11px;
  line-height: 1.7;
}

.route-intro-link {
  color: inherit;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}

.route-intro-link:active {
  transform: scale(.992);
  box-shadow: 0 7px 17px rgba(116, 40, 30, .12);
}

.route-intro-action {
  position: relative;
  z-index: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: #ffe5a3;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.route-intro-action svg {
  width: 14px;
  height: 14px;
}

.filter-bar {
  position: sticky;
  top: 63px;
  z-index: 18;
  display: flex;
  gap: 7px;
  margin: 0 -1px;
  padding: 11px 1px 10px;
  overflow-x: auto;
  background: linear-gradient(var(--paper) 72%, rgba(247, 241, 231, 0));
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 37px;
  padding: 8px;
  color: var(--ink-soft);
  background: rgba(255, 253, 247, .8);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.filter-chip b {
  color: var(--red);
  font-family: var(--serif);
  font-size: 10.5px;
}

.filter-chip.active {
  color: #fff8e9;
  background: var(--ink);
  border-color: var(--ink);
}

.filter-chip.active b {
  color: var(--lime);
}

.map-card {
  padding: 8px;
  background: var(--paper-white);
  border: 1px solid rgba(80, 53, 34, .11);
  border-radius: 4px 18px 5px 15px;
  box-shadow: var(--shadow);
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 5px 9px;
}

.map-toolbar p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.map-toolbar p strong {
  color: var(--red);
}

.map-tools {
  display: flex;
  gap: 5px;
  flex: 0 0 auto;
}

.map-tools button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--red);
  background: var(--paper);
  border: 1px solid rgba(92, 61, 42, .18);
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.map-viewport {
  position: relative;
  max-height: min(61vh, 570px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(106, 68, 45, .15);
  border-radius: 10px;
  background: #f5e9d7;
  scrollbar-color: rgba(197, 45, 34, .4) transparent;
  scrollbar-width: thin;
}

.map-canvas {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  transition: width .24s ease;
}

.map-media {
  position: relative;
  aspect-ratio: 2048 / 1455;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .4), transparent 60%),
    #f3e6d1;
}

.map-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.map-preview {
  filter: blur(.25px);
}

.map-main {
  opacity: 0;
  transition: opacity .28s ease;
}

.map-canvas.is-loaded .map-main {
  opacity: 1;
}

.map-hotspot {
  position: absolute;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  transform: translate(-50%, -50%);
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.map-hotspot::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(197, 45, 34, .94);
  border-radius: 50%;
  background: rgba(255, 253, 247, .14);
  box-shadow:
    0 0 0 2px rgba(255, 253, 247, .72),
    0 1px 5px rgba(80, 41, 25, .22);
  transition: transform .16s ease, background .16s ease, opacity .18s ease;
}

.map-canvas.is-fit .map-hotspot::before {
  width: 8px;
  height: 8px;
  border-width: 1.2px;
  box-shadow:
    0 0 0 1px rgba(255, 253, 247, .75),
    0 1px 3px rgba(80, 41, 25, .2);
}

.map-hotspot::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--red);
}

.map-hotspot:active::before,
.map-hotspot:focus-visible::before {
  transform: scale(1.35);
  background: rgba(197, 45, 34, .25);
}

.map-hotspot:focus-visible {
  outline: 2px solid rgba(197, 45, 34, .55);
  outline-offset: 2px;
  border-radius: 50%;
}

.map-hotspot.is-visited::before {
  opacity: .35;
  transform: scale(.8);
}

.visited-stamp {
  position: absolute;
  z-index: 2;
  width: 24px;
  height: 24px;
  opacity: 0;
  pointer-events: none;
  background: url("assets/images/map-visited-stamp.webp") center / contain no-repeat;
  filter: drop-shadow(0 3px 4px rgba(20, 89, 56, .26));
  transform: rotate(-12deg) scale(1.45);
  transition: opacity .18s ease, transform .24s cubic-bezier(.2, .9, .25, 1.25);
}

.map-hotspot.is-visited .visited-stamp {
  opacity: 1;
  transform: rotate(-9deg) scale(1);
}

.map-canvas.is-fit .visited-stamp {
  width: 16px;
  height: 16px;
}

.map-hotspot.is-muted {
  opacity: .16;
  pointer-events: none;
}

.map-footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 5px 3px;
}

.map-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.55;
}

.map-legend i {
  flex: 0 0 auto;
  display: inline-block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.legend-marker {
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--red);
  border-radius: 50%;
  background: rgba(197, 45, 34, .12);
  box-shadow: 0 0 0 2px rgba(255, 253, 247, .72);
}

.legend-stamp {
  width: 17px;
  height: 17px;
  background-image: url("assets/images/map-visited-stamp.webp");
}

.text-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
  color: var(--red);
  background: none;
  font-size: 10px;
  font-weight: 900;
}

.map-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin: 23px 2px 10px;
}

.map-section-title p,
.map-section-title h2 {
  margin: 0;
}

.map-section-title p {
  margin-bottom: 3px;
  color: var(--red);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .16em;
}

.map-section-title h2 {
  font-family: var(--serif);
  font-size: 20px;
}

.map-section-title span {
  color: var(--ink-soft);
  font-size: 9px;
}

.point-rail {
  display: grid;
  grid-auto-columns: minmax(250px, 76%);
  grid-auto-flow: column;
  gap: 9px;
  overflow-x: auto;
  padding: 0 1px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.point-rail::-webkit-scrollbar {
  display: none;
}

.mini-point {
  position: relative;
  min-height: 91px;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 9px;
  overflow: hidden;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 253, 247, .82);
  border: 1px solid var(--line);
  border-radius: 9px;
  scroll-snap-align: start;
}

.mini-point img {
  width: 64px;
  height: 70px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--paper-deep);
}

.mini-point-copy {
  min-width: 0;
}

.mini-point-copy small {
  display: block;
  margin-bottom: 3px;
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
}

.mini-point-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mini-point-copy span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-point > svg {
  width: 16px;
  height: 16px;
  color: var(--red);
}

.map-original {
  width: 100%;
  margin: 12px 0 24px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  background: transparent;
  border: 1px dashed rgba(91, 58, 39, .25);
  border-radius: 8px;
  text-align: left;
}

.map-original span {
  color: var(--ink-soft);
  font-size: 9px;
}

.map-original strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--serif);
  font-size: 13px;
}

.map-original svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--red);
}

.street-page {
  width: min(100%, 900px);
  margin: 0 auto;
}

.street-detail-content {
  padding: 20px clamp(14px, 4.5vw, 32px) 10px;
}

.street-detail-header {
  position: relative;
  padding: 8px 2px 20px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.street-order {
  display: block;
  margin-bottom: 7px;
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}

.street-detail-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.3;
}

.street-detail-header > p {
  max-width: 610px;
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.8;
}

.street-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.street-metrics span {
  padding: 6px 9px;
  color: var(--ink-soft);
  background: rgba(255, 253, 247, .72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
}

.street-metrics strong {
  margin-right: 2px;
  color: var(--red);
  font-family: var(--serif);
  font-size: 13px;
}

.street-image-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 18px 0;
  padding: 7px;
  text-align: left;
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: 4px 15px 4px 11px;
  box-shadow: var(--shadow);
}

.street-image-card img {
  width: 100%;
  height: auto;
  border-radius: 2px 9px 2px 6px;
}

.street-image-card > span {
  position: absolute;
  right: 15px;
  bottom: 15px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  color: #fff9ed;
  background: rgba(38, 28, 24, .82);
  border-radius: 3px;
  font-size: 8px;
}

.street-image-card > span svg {
  width: 12px;
  height: 12px;
}

.street-overview-section {
  margin: 22px 0 24px;
}

.street-overview-frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-white);
  border: 1px solid rgba(92, 60, 42, .14);
  border-radius: 4px 14px 4px 10px;
  box-shadow: 0 12px 28px rgba(75, 49, 31, .09);
}

.street-overview-frame > img {
  width: 100%;
  height: auto;
}

.overview-hotspot {
  position: absolute;
  z-index: 2;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  transition: background .15s ease, border-color .15s ease;
}

.overview-hotspot span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 3px 5px;
  color: #fff;
  background: rgba(197, 45, 34, .9);
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(73, 31, 23, .2);
  font-size: 8px;
  font-weight: 900;
}

.overview-hotspot:active,
.overview-hotspot:focus-visible {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .9);
  outline: 0;
}

.overview-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 2px 0;
}

.overview-help > span {
  color: var(--ink-soft);
  font-size: 9px;
}

.overview-help button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 0;
  color: var(--red);
  background: none;
  font-size: 9px;
  font-weight: 900;
}

.overview-help button svg {
  width: 13px;
  height: 13px;
}

.sheet-layer {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.sheet-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(27, 18, 14, .5);
  opacity: 0;
  transition: opacity .24s ease;
}

.point-sheet {
  position: relative;
  width: min(100%, 560px);
  max-height: 83vh;
  max-height: 83svh;
  overflow-y: auto;
  padding: 15px clamp(17px, 5vw, 25px) max(22px, env(safe-area-inset-bottom));
  background: var(--paper-white);
  border-radius: 23px 23px 0 0;
  box-shadow: 0 -20px 55px rgba(42, 26, 18, .22);
  transform: translateY(105%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.sheet-layer.open {
  pointer-events: auto;
}

.sheet-layer.open .sheet-scrim {
  opacity: 1;
}

.sheet-layer.open .point-sheet {
  transform: translateY(0);
}

.sheet-handle {
  display: block;
  width: 42px;
  height: 4px;
  margin: 0 auto 11px;
  background: rgba(67, 45, 33, .19);
  border-radius: 99px;
}

.sheet-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 253, 247, .86);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.sheet-close svg {
  width: 17px;
  height: 17px;
}

.sheet-card {
  display: grid;
  grid-template-columns: 93px 1fr;
  gap: 14px;
  align-items: center;
}

.sheet-photo {
  position: relative;
  width: 93px;
  height: 112px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--paper-deep);
}

.sheet-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sheet-code {
  position: absolute;
  left: 5px;
  bottom: 5px;
  min-width: 34px;
  padding: 4px 6px;
  color: #fff9ec;
  background: var(--red);
  border-radius: 3px;
  text-align: center;
  font-family: var(--serif);
  font-size: 9px;
  font-weight: 900;
}

.sheet-meta {
  margin: 0 0 4px;
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.sheet-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.35;
}

.sheet-copy > p:last-of-type {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.sheet-tags,
.point-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.sheet-tags span,
.point-tags span {
  padding: 4px 7px;
  color: var(--ink-soft);
  background: var(--paper);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 14px;
}

.sheet-actions .primary-button {
  min-height: 48px;
  gap: 10px;
  font-size: 12px;
  letter-spacing: .06em;
}

.visit-chip {
  min-width: 102px;
  min-height: 48px;
  padding: 8px 12px;
  color: var(--red);
  background: var(--paper);
  border: 1px solid rgba(197, 45, 34, .22);
  border-radius: 11px;
  font-size: 10px;
  font-weight: 900;
}

.visit-chip.is-visited {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.detail-page {
  width: min(100%, 780px);
  margin: 0 auto;
}

.detail-content {
  padding: 0 clamp(15px, 5vw, 32px);
}

.detail-hero {
  position: relative;
  padding: 28px 0 20px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.detail-hero::after {
  content: attr(data-code);
  position: absolute;
  z-index: -1;
  top: -15px;
  right: -8px;
  color: rgba(197, 45, 34, .075);
  font-family: var(--serif);
  font-size: 116px;
  font-weight: 900;
  line-height: 1;
}

.detail-route {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .11em;
}

.detail-route i {
  width: 28px;
  height: 1px;
  background: currentColor;
}

.detail-hero h1 {
  max-width: 88%;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(29px, 8.1vw, 45px);
  line-height: 1.3;
  letter-spacing: .025em;
}

.detail-hero > p {
  max-width: 590px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.85;
}

.detail-visual {
  position: relative;
  display: grid;
  grid-template-columns: 108px 1fr;
  align-items: center;
  gap: 16px;
  margin: 19px 0 22px;
  padding: 12px;
  color: #fff9ec;
  background: var(--red);
  border-radius: 5px 17px 5px 13px;
  box-shadow: 0 15px 30px rgba(105, 41, 30, .18);
}

.detail-visual img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border: 3px solid rgba(255, 253, 247, .85);
  border-radius: 3px;
}

.detail-visual small {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 249, 236, .68);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
}

.detail-visual strong {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
}

.detail-reader {
  margin: 19px 0;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 9px;
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(197, 45, 34, .18);
}

.story-text {
  margin: 0;
  color: #40342e;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2;
  letter-spacing: .025em;
}

.look-card {
  position: relative;
  margin: 18px 0 0;
  padding: 15px 17px 15px 20px;
  background: #efe8d8;
  border-left: 3px solid var(--green);
  border-radius: 2px 9px 9px 2px;
}

.look-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--green);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.look-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
}

.group-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin: 15px 0;
  padding: 13px 14px;
  background: rgba(233, 169, 31, .1);
  border: 1px solid rgba(233, 169, 31, .32);
  border-radius: 9px;
}

.group-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 13px;
}

.group-card p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
}

.group-card button {
  padding: 8px 10px;
  color: var(--red);
  background: transparent;
  border: 1px solid rgba(197, 45, 34, .27);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
}

.visit-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 21px 0;
  padding: 15px;
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.visit-section strong {
  display: block;
  font-family: var(--serif);
  font-size: 14px;
}

.visit-section p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.stamp-button {
  flex: 0 0 auto;
  min-width: 86px;
  min-height: 45px;
  color: var(--red);
  background: transparent;
  border: 1px dashed currentColor;
  border-radius: 7px;
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 900;
  transform: rotate(-2deg);
}

.stamp-button.is-visited {
  color: var(--green);
  background: rgba(23, 155, 105, .08);
  border-style: solid;
}

.manual-stack {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.manual-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 7px;
  text-align: left;
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: 4px 12px 4px 9px;
  box-shadow: 0 9px 25px rgba(64, 44, 28, .08);
}

.manual-card img {
  width: 100%;
  height: auto;
  border-radius: 2px 7px 2px 5px;
}

.manual-card span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 5px 8px;
  color: white;
  background: rgba(37, 26, 21, .8);
  border-radius: 3px;
  font-size: 8px;
}

.point-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 24px 0 12px;
}

.point-pager button {
  min-height: 66px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 253, 247, .84);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 10px;
  line-height: 1.45;
  text-align: left;
}

.point-pager button:last-child {
  text-align: right;
}

.point-pager small {
  display: block;
  margin-bottom: 3px;
  color: var(--red);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
}

.point-pager strong {
  font-family: var(--serif);
  font-size: 12px;
}

.point-pager button:disabled {
  opacity: .35;
}

.detail-back-map {
  width: 100%;
  min-height: 48px;
  margin: 4px 0 26px;
  color: var(--red);
  background: transparent;
  border: 1px solid rgba(197, 45, 34, .3);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 900;
}

.gallery {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: none;
  grid-template-rows: auto 1fr auto;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .85), transparent 45%),
    rgba(247, 241, 231, .985);
}

.gallery.open {
  display: grid;
}

.gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding:
    max(14px, env(safe-area-inset-top))
    18px
    10px;
}

.gallery-head > div {
  min-width: 0;
}

.gallery-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.gallery-head strong {
  display: block;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-head button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 253, 247, .9);
  border: 1px solid rgba(62, 40, 29, .16);
  border-radius: 50%;
}

.gallery-head svg {
  width: 20px;
  height: 20px;
}

.gallery-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 0 14px;
}

.gallery-loading {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: min(260px, calc(100% - 56px));
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 22px 18px;
  color: var(--ink);
  background: rgba(255, 253, 247, .92);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 14px 35px rgba(67, 44, 27, .1);
  text-align: center;
  transform: translate(-50%, -50%);
  transition: opacity .16s ease, visibility .16s ease;
}

.gallery-loading.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.gallery-loading strong {
  font-family: var(--serif);
  font-size: 13px;
}

.gallery-loading small {
  color: var(--ink-soft);
  font-size: 9px;
}

.gallery-spinner {
  width: 25px;
  height: 25px;
  border: 2px solid rgba(197, 45, 34, .16);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: gallerySpin .8s linear infinite;
}

.gallery-stage img {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  max-height: calc(100svh - 150px);
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .38);
  opacity: 0;
  transition: opacity .2s ease;
}

.gallery-stage img.is-ready {
  opacity: 1;
}

.gallery-arrow {
  position: fixed;
  z-index: 2;
  top: 50%;
  width: 38px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--red);
  background: rgba(255, 253, 247, .92);
  border: 1px solid var(--line);
  border-radius: 8px;
  transform: translateY(-50%);
}

.gallery-arrow.prev {
  left: 5px;
}

.gallery-arrow.next {
  right: 5px;
}

.gallery-arrow[hidden] {
  display: none;
}

.gallery-arrow svg {
  width: 22px;
  height: 22px;
}

.gallery-foot {
  padding: 9px 18px max(13px, env(safe-area-inset-bottom));
  text-align: center;
}

.gallery-foot span {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.gallery-foot p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 8px;
}

.toast {
  position: fixed;
  z-index: 110;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  max-width: calc(100% - 40px);
  padding: 10px 16px;
  color: #fff;
  background: rgba(38, 28, 24, .92);
  border-radius: 999px;
  box-shadow: 0 9px 24px rgba(0, 0, 0, .2);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes coverEnter {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-2deg) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(-.55deg) scale(1);
  }
}

@keyframes copyEnter {
  from {
    opacity: 0;
    transform: translateY(13px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gallerySpin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 760px) {
  .home-page {
    padding-right: clamp(38px, 6vw, 80px);
    padding-left: clamp(38px, 6vw, 80px);
  }

  .home-main {
    display: grid;
    grid-template-columns: minmax(300px, .84fr) minmax(380px, 1.16fr);
    align-items: center;
    gap: clamp(38px, 7vw, 95px);
    width: min(100%, 1000px);
    margin: 0 auto;
  }

  .cover-stage {
    width: min(100%, 430px);
    margin: 0;
  }

  .home-copy {
    margin: 0;
    text-align: left;
  }

  .home-copy h1 {
    font-size: clamp(37px, 4.3vw, 45px);
  }

  .kicker {
    justify-content: flex-start;
  }

  .home-copy > p:not(.kicker) {
    margin-left: 0;
    font-size: 14px;
  }

  .route-facts {
    justify-content: flex-start;
  }

  .home-actions {
    width: 100%;
    margin-left: 0;
  }

  .home-footnote {
    text-align: left;
  }

  .map-content {
    padding-top: 25px;
  }

  .map-card {
    padding: 12px;
  }

  .map-viewport {
    max-height: 570px;
  }

  .map-canvas {
    width: 100%;
    min-width: 0;
  }

  .map-hotspot {
    width: 44px;
    height: 44px;
  }

  .point-rail {
    grid-auto-columns: minmax(250px, 31%);
  }

  .detail-content {
    padding-top: 8px;
  }

  .detail-hero {
    padding-top: 38px;
  }

  .detail-visual {
    grid-template-columns: 150px 1fr;
    padding: 15px;
  }

  .detail-visual img {
    width: 150px;
    height: 150px;
  }

  .manual-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .manual-card:only-of-type {
    grid-column: 1 / -1;
    max-width: 610px;
    justify-self: center;
  }

  .gallery-stage img {
    max-width: min(88vw, 1100px);
  }

  .gallery-arrow {
    width: 46px;
    height: 58px;
  }

  .gallery-arrow.prev {
    left: 28px;
  }

  .gallery-arrow.next {
    right: 28px;
  }
}

@media (max-width: 390px) {
  .home-page {
    padding-right: 15px;
    padding-left: 15px;
  }

  .cover-stage {
    width: min(68vw, 268px, 34svh);
    margin-top: 8px;
  }

  .cover-caption {
    right: -13px;
    width: 66px;
    height: 66px;
    font-size: 10px;
  }

  .home-copy {
    margin-top: 10px;
  }

  .home-copy h1 {
    font-size: 24px;
  }

  .home-copy > p:not(.kicker) {
    font-size: 11px;
    line-height: 1.65;
  }

  .home-actions {
    margin-top: 10px;
  }

  .map-content {
    padding-right: 10px;
    padding-left: 10px;
  }

  .route-intro {
    padding: 14px 15px;
  }

  .detail-content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .sheet-card {
    grid-template-columns: 82px 1fr;
    gap: 11px;
  }

  .sheet-photo {
    width: 82px;
    height: 102px;
  }
}

@media (max-width: 759px) and (max-height: 760px) {
  .home-page {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .home-header {
    min-height: 28px;
  }

  .edition-seal {
    width: 31px;
    height: 31px;
    font-size: 10px;
  }

  .cover-stage {
    width: min(61vw, 238px, 31svh);
    margin-top: 4px;
  }

  .cover-caption {
    width: 58px;
    height: 58px;
    right: -10px;
    bottom: 16px;
    font-size: 9px;
  }

  .home-copy {
    margin-top: 7px;
  }

  .home-copy .kicker {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .home-copy h1 {
    font-size: 22px;
    line-height: 1.28;
  }

  .home-copy > p:not(.kicker) {
    max-width: 360px;
    margin-top: 5px;
    font-size: 10px;
    line-height: 1.55;
  }

  .route-facts {
    margin-top: 7px;
  }

  .route-facts span {
    padding: 4px 8px;
    font-size: 9px;
  }

  .home-actions {
    margin-top: 8px;
  }

  .home-actions .primary-button {
    min-height: 46px;
  }

  .home-footnote {
    margin-top: 5px;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
