/* =========================================================
   马克村 · 山水行旅图
   Oriental landscape × miniature diorama
   ========================================================= */

:root {
  --paper: #f1e9d8;
  --paper-deep: #e6dbc5;
  --ink: #292d27;
  --ink-soft: #4f554b;
  --ink-faint: #7b7d6f;
  --pine: #3d5548;
  --pine-light: #748c78;
  --water: #6d8d85;
  --cinnabar: #a4432f;
  --gold: #b08a4d;
  --line: rgba(58, 59, 48, 0.17);
  --panel: rgba(247, 240, 226, 0.992);
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", Georgia, serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "FangSong", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #e9dfcd;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body { overscroll-behavior: none; }

button { font: inherit; color: inherit; }

#app {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 244, 217, 0.95) 0, rgba(255, 244, 217, 0) 38%),
    radial-gradient(circle at 12% 88%, rgba(177, 195, 174, 0.32) 0, rgba(177, 195, 174, 0) 44%),
    linear-gradient(134deg, #f3ecdd 0%, #ece4d2 48%, #dfe4d6 100%);
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  outline: none;
}
#scene.is-dragging { cursor: grabbing; }
#scene.is-pointing { cursor: pointer; }



.ui {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.ui > * { pointer-events: auto; }

/* ---------------- masthead ---------------- */
.masthead {
  position: absolute;
  top: 32px;
  left: 38px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: 620px;
  animation: rise-in 1.1s var(--ease) 0.2s both;
}

.seal {
  width: 54px;
  height: 62px;
  margin-top: 4px;
  border: 1px solid rgba(164, 72, 52, 0.78);
  border-radius: 3px;
  color: var(--cinnabar);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: 0.08em;
  background: rgba(247, 238, 220, 0.34);
  box-shadow: inset 0 0 0 3px rgba(241, 233, 216, 0.7), inset 0 0 0 4px rgba(164, 72, 52, 0.4);
  transform: rotate(-1.4deg);
  flex: none;
}
.seal span { display: block; }

.kicker {
  margin: 0;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.24em;
  color: var(--ink-faint);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.kicker-place { display: inline-flex; align-items: center; }
.kicker i {
  display: inline-block;
  width: 28px;
  height: 1px;
  margin: 0 9px;
  background: rgba(75, 80, 68, 0.4);
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border: 1px solid var(--cinnabar);
  transform: rotate(45deg);
}

.masthead h1 {
  margin: 8px 0 6px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(33px, 3.1vw, 48px);
  line-height: 1.05;
  letter-spacing: 0.11em;
  color: #252a24;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.38);
  white-space: nowrap;
}
.masthead h1 span {
  position: relative;
  margin-left: 14px;
  font-size: 0.74em;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.masthead h1 span::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 20%;
  width: 1px;
  height: 62%;
  background: rgba(74, 78, 66, 0.35);
}
.masthead .sub {
  margin: 0;
  font-family: var(--kai);
  font-size: 13px;
  letter-spacing: 0.09em;
  color: #66705e;
}

/* ---------------- toolbar ---------------- */
.toolbar {
  position: absolute;
  top: 32px;
  right: 34px;
  display: flex;
  align-items: stretch;
  gap: 7px;
  padding: 5px;
  border: 1px solid rgba(91, 85, 68, 0.16);
  border-radius: 9px;
  background: rgba(243, 235, 219, 0.88);
  box-shadow: 0 7px 25px rgba(74, 59, 36, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  animation: rise-in 1.1s var(--ease) 0.4s both;
}
.tool {
  appearance: none;
  border: 0;
  background: transparent;
  height: 34px;
  padding: 0 11px 0 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #5b6157;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
  white-space: nowrap;
}
.tool svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}
.tool:hover { background: rgba(255, 251, 240, 0.68); color: #2d332c; }
.tool.is-on {
  background: #35473b;
  color: #f4ecdb;
  box-shadow: 0 2px 7px rgba(44, 58, 47, 0.26);
}
.tool.is-on svg { opacity: 0.95; }
.tool-icon { padding: 0; width: 34px; justify-content: center; }
.pixel-tool {
  position: relative;
  text-decoration: none;
  color: #fff7e8;
  background: #a44834;
  border: 1px solid #7e3427;
  font-weight: 600;
  box-shadow: 0 2px 0 rgba(86, 43, 31, 0.28), 0 0 0 0 rgba(201, 151, 79, 0);
  animation: pixel-call 2.8s ease-in-out infinite;
}
.pixel-tool svg { opacity: 1; stroke-width: 1.7; }
.pixel-tool:hover {
  background: #b85942;
  color: #fffdf6;
  border-color: #8f3f2e;
  box-shadow: 0 2px 0 rgba(86, 43, 31, 0.24), 0 0 0 5px rgba(201, 151, 79, 0.16);
}
.pixel-tool:focus-visible { outline: 2px solid rgba(201, 151, 79, 0.85); outline-offset: 2px; }

@keyframes pixel-call {
  0%, 100% { box-shadow: 0 2px 0 rgba(86, 43, 31, 0.28), 0 0 0 0 rgba(201, 151, 79, 0.28); }
  50% { box-shadow: 0 2px 0 rgba(86, 43, 31, 0.28), 0 0 0 5px rgba(201, 151, 79, 0); }
}

/* ---------------- scenic rail ---------------- */
.scenic-rail {
  position: absolute;
  top: 178px;
  left: 40px;
  width: 178px;
  padding: 8px 14px 10px 2px;
  isolation: isolate;
  animation: rise-in 1.2s var(--ease) 0.6s both;
}
.scenic-rail::before {
  content: "";
  position: absolute;
  inset: -10px -28px -10px -18px;
  z-index: -1;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(243, 235, 218, 0.5), rgba(243, 235, 218, 0.16) 62%, rgba(243, 235, 218, 0));
  filter: blur(5px);
  pointer-events: none;
}
body.mode-dusk .scenic-rail::before {
  background: linear-gradient(90deg, rgba(33, 42, 38, 0.48), rgba(33, 42, 38, 0.12) 62%, rgba(33, 42, 38, 0));
}
.rail-title {
  margin: 0 0 12px 1px;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: #8a8979;
  display: flex;
  align-items: center;
  gap: 9px;
}
.rail-title::after {
  content: "";
  height: 1px;
  width: 38px;
  background: rgba(91, 93, 76, 0.28);
}
.scenic-rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.scenic-rail ol::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: linear-gradient(180deg, rgba(63, 90, 71, 0.32), rgba(63, 90, 71, 0.07));
}
.scenic-rail li { position: relative; }
.rail-item {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 7px 2px;
  text-align: left;
  color: #5c6258;
  transition: color 0.25s;
}
.rail-num {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid rgba(61, 83, 67, 0.35);
  background: #eee6d5;
  color: #6f7466;
  font-family: var(--serif);
  font-size: 8.5px;
  line-height: 15px;
  text-align: center;
  flex: none;
  transition: all 0.25s var(--ease);
}
.rail-name {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.rail-en {
  display: block;
  margin-top: 2px;
  font-family: Georgia, serif;
  font-size: 7.5px;
  letter-spacing: 0.13em;
  color: #969584;
  text-transform: uppercase;
}
.rail-item:hover { color: var(--cinnabar); }
.rail-item.is-active { color: #2f3c32; }
.rail-item.is-active .rail-num {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: #f7eddc;
  box-shadow: 0 0 0 4px rgba(164, 72, 52, 0.09);
}
.rail-item.is-active .rail-name { font-weight: 600; }

/* ---------------- markers ---------------- */
.markers {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
}
.marker {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.35s;
  will-change: transform;
  transform-origin: 50% 100%;
}
.marker .m-tag {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 11px 6px;
  border: 1px solid rgba(74, 70, 54, 0.18);
  border-radius: 2px;
  background: rgba(247, 240, 226, 0.97);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 3px 9px rgba(61, 48, 31, 0.08);
  transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s, opacity 0.18s;
}
.marker .m-tag b {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #30362e;
  white-space: nowrap;
}
.marker .m-tag small {
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  color: #8b8a78;
  margin-top: 2px;
  white-space: nowrap;
}
.marker .m-stem {
  width: 1px;
  height: 20px;
  background: linear-gradient(180deg, rgba(74, 69, 53, 0.45), rgba(74, 69, 53, 0.1));
}
.marker .m-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(247, 239, 224, 0.9);
  background: #35473b;
  color: #f5ecd9;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0;
  box-shadow: 0 0 0 4px rgba(53, 71, 59, 0.16), 0 4px 9px rgba(53, 44, 29, 0.24);
  transition: transform 0.3s var(--ease), background 0.3s, box-shadow 0.3s;
}
.marker .m-dot::after {
  content: "";
  position: absolute;
  bottom: -7px;
  width: 1px;
  height: 7px;
  background: rgba(53, 71, 59, 0.45);
}
.marker:hover .m-tag,
.marker.is-active .m-tag {
  transform: translateY(-3px);
  border-color: rgba(164, 72, 52, 0.38);
  background: rgba(250, 243, 229, 0.98);
}
.marker:hover .m-dot,
.marker.is-active .m-dot {
  background: var(--cinnabar);
  transform: scale(1.08);
  box-shadow: 0 0 0 6px rgba(164, 72, 52, 0.12), 0 4px 9px rgba(53, 44, 29, 0.24);
}
.marker.label-down {
  flex-direction: column-reverse;
  transform-origin: 50% 0;
}
.marker.label-down .m-dot::after {
  bottom: auto;
  top: -7px;
}
.map-dragging .marker .m-tag { opacity: 0; }
.marker.is-hidden { opacity: 0; pointer-events: none; }
.marker.is-active .m-tag b { color: var(--cinnabar); }

/* ---------------- compass & scale ---------------- */
.compass {
  position: absolute;
  right: 48px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0.86;
  animation: fade-in 1.4s 1s both;
}
.compass-ring {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1px solid rgba(66, 70, 58, 0.2);
  box-shadow: inset 0 0 0 5px rgba(240, 232, 215, 0.3);
}
.compass-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px dashed rgba(66, 70, 58, 0.18);
  border-radius: 50%;
}
.compass-ring b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cinnabar);
  transform: translate(-50%, -50%);
}
.needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 27px;
  background: linear-gradient(180deg, var(--cinnabar) 0 50%, rgba(65, 70, 58, 0.3) 50% 100%);
  transform-origin: 50% 0;
  transform: translate(-50%, 0) rotate(0deg);
}
.needle::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 5px;
  height: 5px;
  background: var(--cinnabar);
  transform: rotate(45deg);
}
.compass-ring span {
  position: absolute;
  font-family: var(--serif);
  font-size: 7px;
  color: #797b6b;
}
.compass-ring .n { top: 5px; left: 50%; transform: translateX(-50%); }
.compass-ring .s { bottom: 5px; left: 50%; transform: translateX(-50%); }
.compass-ring .e { right: 6px; top: 50%; transform: translateY(-50%); }
.compass-ring .w { left: 6px; top: 50%; transform: translateY(-50%); }
.compass p {
  margin: 0;
  font-family: var(--kai);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #7d7d6c;
}

.scalebar {
  position: absolute;
  left: 42px;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #838371;
  animation: fade-in 1.4s 1.1s both;
}
.scalebar span {
  width: 74px;
  height: 6px;
  border-left: 1px solid rgba(74, 74, 59, 0.45);
  border-right: 1px solid rgba(74, 74, 59, 0.45);
  border-bottom: 1px solid rgba(74, 74, 59, 0.45);
}
.scalebar p {
  margin: 0;
  font-family: var(--kai);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.hint {
  position: absolute;
  bottom: 37px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--kai);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: #737867;
  white-space: nowrap;
  transition: opacity 0.8s;
  animation: fade-in 1.4s 1.2s both;
}
.hint.is-gone { opacity: 0; }
.hint-mobile { display: none; }
.hint-line {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76, 80, 66, 0.33));
}
.hint-line:last-child { transform: rotate(180deg); }

.season-stamp {
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-55%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: rgba(74, 80, 67, 0.55);
  font-family: var(--kai);
  font-size: 10px;
  letter-spacing: 0.06em;
  transition: opacity 0.5s;
  animation: fade-in 1.5s 1.3s both;
}
.season-stamp span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73, 79, 66, 0.2);
  border-radius: 50%;
  font-size: 8px;
}
.season-stamp span:nth-child(1),
.season-stamp span:nth-child(2) { color: var(--cinnabar); border-color: rgba(164, 72, 52, 0.28); }

/* ---------------- detail panel ---------------- */
.detail-panel {
  position: absolute;
  z-index: 40;
  top: 0;
  right: 0;
  height: 100%;
  width: min(424px, 92vw);
  background: var(--panel);
  border-left: 1px solid rgba(87, 80, 63, 0.18);
  box-shadow: -22px 0 55px rgba(57, 49, 33, 0.18);
  transform: translateX(104%);
  transition: transform 0.72s var(--ease);
  display: flex;
  flex-direction: column;
}
.detail-panel.is-open { transform: translateX(0); }
.panel-grab { display: none; }
.panel-art {
  position: relative;
  height: 192px;
  flex: none;
  overflow: hidden;
  background: linear-gradient(168deg, #d9dfcf 0%, #e8ddc5 56%, #d2c8ad 100%);
  border-bottom: 1px solid rgba(82, 76, 59, 0.16);
}
.panel-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(238, 228, 209, 0.88) 100%);
  pointer-events: none;
}
.art-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 28%, rgba(255, 239, 196, 0.9) 0 11%, transparent 33%),
    radial-gradient(circle at 18% 22%, rgba(255, 255, 244, 0.35), transparent 40%);
}
.art-sun {
  position: absolute;
  right: 54px;
  top: 37px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(181, 137, 76, 0.34);
  box-shadow: 0 0 0 12px rgba(181, 137, 76, 0.06), 0 0 55px rgba(240, 201, 133, 0.5);
}
.art-ridge {
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 34px;
  height: 92px;
  background: rgba(77, 94, 78, 0.25);
  clip-path: polygon(0 86%, 7% 70%, 14% 76%, 25% 40%, 34% 58%, 43% 28%, 53% 61%, 63% 43%, 74% 67%, 84% 35%, 93% 58%, 100% 48%, 100% 100%, 0 100%);
}
.art-ridge.r1 { background: rgba(75, 93, 78, 0.19); bottom: 56px; height: 62px; transform: scaleX(1.07); }
.art-ridge.r2 { background: rgba(68, 86, 72, 0.31); bottom: 29px; height: 80px; transform: scaleX(0.92) translateX(5%); }
.art-ridge.r3 { background: rgba(58, 74, 61, 0.43); bottom: 0; height: 64px; clip-path: polygon(0 66%, 10% 56%, 23% 72%, 38% 44%, 52% 63%, 68% 50%, 82% 70%, 100% 55%, 100% 100%, 0 100%); }
.art-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  background: linear-gradient(180deg, rgba(225, 210, 181, 0.2), rgba(162, 143, 105, 0.2));
}
.art-stamp {
  position: absolute;
  left: 29px;
  top: 28px;
  width: 34px;
  height: 47px;
  padding: 5px;
  border: 1px solid rgba(164, 72, 52, 0.66);
  color: var(--cinnabar);
  font-family: var(--serif);
  font-size: 9px;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-align: center;
  z-index: 2;
  transform: rotate(-2deg);
}
.art-index {
  position: absolute;
  right: 24px;
  bottom: 18px;
  z-index: 2;
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: rgba(49, 57, 48, 0.64);
}
.panel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 33px;
  height: 33px;
  border: 1px solid rgba(68, 68, 54, 0.18);
  border-radius: 50%;
  background: rgba(247, 240, 226, 0.78);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}
.panel-close:hover { background: #faf3e4; transform: rotate(90deg); }
.panel-close svg, .guide-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #455044;
  stroke-width: 1.3;
  stroke-linecap: round;
}
.panel-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 27px 30px 32px;
  scrollbar-width: thin;
  scrollbar-color: rgba(84, 82, 64, 0.28) transparent;
}
.panel-scroll::-webkit-scrollbar { width: 5px; }
.panel-scroll::-webkit-scrollbar-thumb { background: rgba(84, 82, 64, 0.25); border-radius: 4px; }
.panel-kicker {
  margin: 0 0 9px;
  font-size: 8.5px;
  letter-spacing: 0.23em;
  color: var(--cinnabar);
  font-weight: 600;
}
.panel-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: #242a24;
}
.panel-en {
  margin: 7px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: #858674;
}
.panel-lead {
  margin: 18px 0 14px;
  font-family: var(--kai);
  font-size: 14px;
  line-height: 1.95;
  letter-spacing: 0.035em;
  color: #51594e;
  border-left: 2px solid rgba(164, 72, 52, 0.5);
  padding-left: 12px;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 9px;
  border: 1px solid rgba(83, 88, 70, 0.19);
  border-radius: 2px;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: #61705e;
  background: rgba(255, 250, 239, 0.35);
}
.facts {
  margin: 22px 0 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.fact {
  padding: 11px 12px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact span {
  display: block;
  font-size: 7.5px;
  letter-spacing: 0.16em;
  color: #979584;
  margin-bottom: 5px;
}
.fact b {
  display: block;
  font-family: var(--serif);
  font-size: 11.5px;
  line-height: 1.45;
  font-weight: 500;
  color: #3f483e;
  letter-spacing: 0.04em;
}
.panel-section { margin-top: 25px; }
.panel-section h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #30382e;
}
.panel-section h3 span {
  font-family: Georgia, serif;
  font-size: 8px;
  color: var(--gold);
  letter-spacing: 0.08em;
}
.panel-section h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.highlight-list, .tips-list { list-style: none; margin: 0; padding: 0; }
.highlight-list li {
  position: relative;
  padding: 0 0 12px 18px;
  font-size: 12px;
  line-height: 1.75;
  color: #50594d;
}
.highlight-list li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 1px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--cinnabar);
  transform: rotate(45deg);
}
.highlight-list li b {
  display: block;
  font-family: var(--serif);
  font-size: 12.5px;
  color: #333b32;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.tips-list li {
  position: relative;
  margin-bottom: 8px;
  padding: 10px 12px 10px 29px;
  border: 1px solid rgba(92, 90, 69, 0.12);
  background: rgba(255, 251, 240, 0.38);
  border-radius: 2px;
  font-size: 11.5px;
  line-height: 1.65;
  color: #596151;
}
.tips-list li::before {
  content: "宜";
  position: absolute;
  left: 9px;
  top: 10px;
  font-family: var(--kai);
  font-size: 10px;
  color: var(--cinnabar);
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  border: 1px solid rgba(164, 72, 52, 0.38);
}
.panel-foot {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}
.focus-btn, .next-btn {
  height: 42px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: all 0.25s;
}
.focus-btn {
  flex: 1.25;
  border: 1px solid rgba(53, 71, 59, 0.25);
  background: rgba(255, 251, 241, 0.38);
  color: #3f5042;
}
.focus-btn:hover { background: #f8f1e1; border-color: rgba(53, 71, 59, 0.45); }
.focus-btn svg, .next-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}
.next-btn {
  flex: 1;
  border: 1px solid #35473b;
  background: #35473b;
  color: #f3ebd9;
}
.next-btn:hover { background: #28392e; }
.panel-note {
  margin: 17px 0 0;
  font-size: 8.5px;
  line-height: 1.55;
  color: #9a9885;
  letter-spacing: 0.03em;
}

/* ---------------- guide modal ---------------- */
.guide-modal {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  pointer-events: none;
  visibility: hidden;
}
.guide-modal.is-open { pointer-events: auto; visibility: visible; }
.guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 46, 34, 0.58);
  opacity: 0;
  transition: opacity 0.5s;
}
.guide-modal.is-open .guide-backdrop { opacity: 1; }
.guide-sheet {
  position: relative;
  width: min(1060px, calc(100vw - 54px));
  height: min(720px, calc(100vh - 54px));
  background: #f3ead8;
  border: 1px solid rgba(64, 59, 44, 0.28);
  box-shadow: 0 36px 90px rgba(39, 34, 22, 0.3);
  display: grid;
  grid-template-columns: 33% 67%;
  transform: translateY(22px) scale(0.985);
  opacity: 0;
  transition: transform 0.65s var(--ease), opacity 0.45s;
  overflow: hidden;
}
.guide-modal.is-open .guide-sheet { transform: none; opacity: 1; }
.guide-sheet::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(102, 92, 69, 0.13);
  pointer-events: none;
  z-index: 2;
}
.guide-left {
  position: relative;
  padding: 56px 42px 38px;
  color: #e8e0cb;
  background:
    radial-gradient(circle at 25% 12%, rgba(152, 171, 142, 0.2), transparent 46%),
    linear-gradient(154deg, #35493e 0%, #25372e 52%, #1e2e26 100%);
  overflow: hidden;
}
.guide-left::after {
  content: "";
  position: absolute;
  left: -20%;
  right: -35%;
  bottom: -20px;
  height: 180px;
  background: rgba(10, 24, 17, 0.3);
  clip-path: polygon(0 88%, 10% 69%, 20% 79%, 33% 48%, 46% 67%, 56% 43%, 69% 72%, 82% 50%, 92% 70%, 100% 59%, 100% 100%, 0 100%);
}
.guide-left .kicker { color: rgba(238, 231, 208, 0.55); }
.guide-left .kicker i { background: rgba(238, 231, 208, 0.28); }
.guide-left .kicker::before { border-color: #c99f6e; }
.guide-left h2 {
  position: relative;
  margin: 16px 0 20px;
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1.22;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #f1e8d5;
}
.guide-intro {
  position: relative;
  max-width: 290px;
  margin: 0 0 30px;
  font-family: var(--kai);
  font-size: 12.5px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: rgba(235, 228, 207, 0.76);
}
.guide-meta {
  position: relative;
  display: flex;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(232, 224, 202, 0.17);
}
.guide-meta div { display: flex; flex-direction: column; gap: 2px; }
.guide-meta b {
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  color: #e5d6b8;
  letter-spacing: 0.02em;
}
.guide-meta span { font-size: 8px; letter-spacing: 0.13em; color: rgba(235, 228, 207, 0.46); }
.guide-quote {
  position: absolute;
  left: 42px;
  bottom: 48px;
  font-family: var(--kai);
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0.12em;
  color: rgba(235, 226, 201, 0.67);
}
.guide-seal {
  position: absolute;
  right: 34px;
  bottom: 40px;
  width: 38px;
  height: 52px;
  border: 1px solid rgba(197, 151, 102, 0.55);
  color: #c39b6d;
  font-family: var(--serif);
  font-size: 9px;
  line-height: 1.25;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 7px 4px;
  transform: rotate(-2deg);
}
.guide-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 42px 46px 34px;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 250, 234, 0.85), transparent 32%),
    #f3ead8;
}
.guide-mobile-close { display: none; }
.guide-close {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(61, 61, 47, 0.2);
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.25s, background 0.25s;
}
.guide-close:hover { transform: rotate(90deg); background: rgba(255, 251, 241, 0.6); }
.guide-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid rgba(81, 78, 60, 0.2);
  flex: none;
  padding-right: 40px;
}
.guide-tabs button {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0 0 12px;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #8c8b77;
  transition: color 0.25s;
}
.guide-tabs button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -1px;
  height: 2px;
  background: var(--cinnabar);
  transition: right 0.35s var(--ease);
}
.guide-tabs button.is-active { color: #323b31; }
.guide-tabs button.is-active::after { right: 0; }
.guide-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 8px 10px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(84, 82, 64, 0.26) transparent;
}
.guide-body::-webkit-scrollbar { width: 5px; }
.guide-body::-webkit-scrollbar-thumb { background: rgba(84, 82, 64, 0.22); border-radius: 3px; }
.guide-tab { display: none; animation: fade-up 0.45s var(--ease); }
.guide-tab.is-active { display: block; }
.guide-tab h3 {
  margin: 0 0 9px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: #30382e;
}
.guide-tab > p {
  margin: 0 0 18px;
  font-size: 11.5px;
  line-height: 1.85;
  color: #62695d;
}
.timeline { list-style: none; margin: 4px 0 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 13px;
  position: relative;
  padding-bottom: 16px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 60px;
  top: 17px;
  bottom: -1px;
  width: 1px;
  background: rgba(86, 95, 77, 0.16);
}
.timeline li:last-child::before { display: none; }
.timeline li > span {
  font-family: Georgia, serif;
  font-size: 10px;
  color: var(--cinnabar);
  letter-spacing: 0.06em;
  padding-top: 2px;
  text-align: right;
  position: relative;
}
.timeline li > span::after {
  content: "";
  position: absolute;
  right: -17px;
  top: 5px;
  width: 5px;
  height: 5px;
  background: #f3ead8;
  border: 1px solid rgba(164, 72, 52, 0.6);
  border-radius: 50%;
}
.timeline li > div { padding-left: 14px; }
.timeline b {
  display: block;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
  color: #394137;
  letter-spacing: 0.04em;
}
.timeline p {
  margin: 3px 0 0;
  font-size: 10.5px;
  line-height: 1.65;
  color: #707666;
}
.small-note {
  margin-top: 10px !important;
  padding-top: 12px;
  border-top: 1px dashed rgba(86, 83, 65, 0.2);
  font-family: var(--kai);
  font-size: 10.5px !important;
  color: #8d8b77 !important;
}
.season-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.season-card {
  padding: 14px 14px 12px;
  border: 1px solid rgba(82, 82, 64, 0.14);
  background: rgba(255, 251, 240, 0.38);
  position: relative;
  overflow: hidden;
}
.season-card::before {
  content: "";
  position: absolute;
  right: -10px;
  top: -20px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  opacity: 0.18;
}
.season-card.spring::before { background: #d8b23e; }
.season-card.summer::before { background: #7c9b63; }
.season-card.autumn::before { background: #ae7e43; }
.season-card.winter::before { background: #c46c68; }
.season-card b {
  font-family: var(--serif);
  font-size: 13px;
  color: #343e32;
  letter-spacing: 0.06em;
}
.season-card p {
  margin: 7px 0 10px;
  font-size: 10.5px;
  line-height: 1.7;
  color: #697061;
}
.season-card em {
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.09em;
  color: var(--cinnabar);
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
  margin-top: 10px;
}
.info-grid > div {
  padding: 12px 0;
  border-top: 1px solid rgba(85, 82, 64, 0.16);
}
.info-grid span {
  display: block;
  font-family: var(--serif);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 5px;
}
.info-grid p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.7;
  color: #656c5e;
}
.travel-note {
  display: flex;
  gap: 12px;
  margin-top: 19px;
  padding: 12px 14px;
  border-left: 2px solid rgba(164, 72, 52, 0.55);
  background: rgba(255, 251, 240, 0.4);
}
.travel-note b {
  flex: none;
  font-family: var(--serif);
  font-size: 10.5px;
  color: var(--cinnabar);
  letter-spacing: 0.08em;
}
.travel-note p { margin: 0; font-size: 10.5px; line-height: 1.65; color: #687061; }
.notes-list { list-style: none; margin: 0; padding: 0; }
.notes-list li {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(85, 82, 64, 0.18);
  font-size: 10.5px;
  line-height: 1.65;
  color: #6b7163;
}
.notes-list b {
  font-family: var(--serif);
  font-size: 10.5px;
  color: #3e473b;
  letter-spacing: 0.04em;
}
.source-title {
  margin: 20px 0 8px;
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: #6b6e5e;
}
.sources { display: flex; flex-direction: column; gap: 6px; }
.sources a {
  font-size: 9.5px;
  line-height: 1.5;
  color: #7f806d;
  text-decoration: none;
  padding-left: 11px;
  position: relative;
  transition: color 0.2s;
}
.sources a::before {
  content: "↗";
  position: absolute;
  left: 0;
  color: var(--cinnabar);
  font-size: 8px;
}
.sources a:hover { color: var(--cinnabar); }

/* ---------------- loading + toast ---------------- */
.loading {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(249, 242, 225, 0.96) 0, rgba(236, 227, 208, 0.98) 62%, #e5dcc8 100%);
  transition: opacity 1.1s var(--ease), visibility 1.1s;
}
.loading.is-done { opacity: 0; visibility: hidden; }
.loading-ink {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}
.loading-copy { position: relative; text-align: center; }
.loading-copy p {
  margin: 0 0 14px;
  font-size: 8.5px;
  letter-spacing: 0.34em;
  color: #868472;
}
.loading-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #2b332b;
}
.loading-copy h2 span { display: block; font-size: 0.5em; letter-spacing: 0.4em; color: #666c5d; margin-top: 9px; }
.loading-copy i {
  display: block;
  width: 120px;
  height: 1px;
  margin: 28px auto 17px;
  background: linear-gradient(90deg, transparent, rgba(84, 81, 62, 0.5), transparent);
  position: relative;
  overflow: hidden;
}
.loading-copy i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--cinnabar);
  animation: load-line 1.8s ease-in-out infinite;
}
.loading-copy small {
  font-family: var(--kai);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: #8e8d79;
}
.mobile-spots { display: none; }

.toast {
  position: absolute;
  left: 50%;
  bottom: 74px;
  z-index: 70;
  transform: translate(-50%, 11px);
  padding: 9px 17px;
  border: 1px solid rgba(88, 83, 64, 0.2);
  background: rgba(247, 240, 226, 0.94);
  box-shadow: 0 9px 25px rgba(64, 52, 33, 0.13);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  color: #5a6154;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s, transform 0.45s var(--ease);
  white-space: nowrap;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

body.panel-open .season-stamp { opacity: 0; pointer-events: none; }
body.panel-open .masthead { opacity: 0.18; }
body.panel-open .scenic-rail { opacity: 0; pointer-events: none; }
body.panel-open .season-stamp { opacity: 0; }
.masthead, .scenic-rail { transition: opacity 0.5s; }

/* ---------------- dusk skin ---------------- */
body.mode-dusk .masthead h1 { color: #f4e8d2; text-shadow: 0 1px 12px rgba(44, 33, 25, 0.22); }
body.mode-dusk .masthead h1 span { color: #d7c6ab; }
body.mode-dusk .masthead h1 span::before { background: rgba(238, 223, 198, 0.28); }
body.mode-dusk .masthead .sub { color: rgba(239, 226, 203, 0.7); }
body.mode-dusk .kicker { color: rgba(239, 224, 200, 0.58); }
body.mode-dusk .kicker i { background: rgba(239, 224, 200, 0.3); }
body.mode-dusk .seal { color: #e0b585; border-color: rgba(224, 181, 133, 0.65); background: rgba(56, 49, 39, 0.18); box-shadow: inset 0 0 0 3px rgba(40, 43, 36, 0.18), inset 0 0 0 4px rgba(224, 181, 133, 0.3); }
body.mode-dusk .toolbar { background: rgba(37, 46, 42, 0.62); border-color: rgba(240, 225, 201, 0.16); box-shadow: 0 9px 26px rgba(22, 18, 14, 0.2); }
body.mode-dusk .tool { color: rgba(239, 227, 207, 0.75); }
body.mode-dusk .tool:hover { background: rgba(242, 228, 205, 0.12); color: #fbf1df; }
body.mode-dusk .tool.is-on { background: #eadcc2; color: #354038; }
body.mode-dusk .pixel-tool {
  color: #2f382f;
  background: #d8b878;
  border-color: #f1ddb6;
  box-shadow: 0 2px 0 rgba(43, 34, 24, 0.3), 0 0 0 0 rgba(246, 222, 174, 0.32);
}
body.mode-dusk .pixel-tool:hover {
  color: #263026;
  background: #e6c98f;
  border-color: #fff0cf;
  box-shadow: 0 2px 0 rgba(43, 34, 24, 0.24), 0 0 0 5px rgba(246, 222, 174, 0.18);
}
body.mode-dusk .rail-title { color: rgba(239, 226, 203, 0.5); }
body.mode-dusk .scenic-rail ol::before { background: linear-gradient(180deg, rgba(238, 222, 195, 0.3), rgba(238, 222, 195, 0.05)); }
body.mode-dusk .rail-item { color: rgba(239, 227, 207, 0.6); }
body.mode-dusk .rail-en { color: rgba(239, 227, 207, 0.32); }
body.mode-dusk .rail-num { background: #35453f; border-color: rgba(240, 225, 200, 0.3); color: rgba(245, 233, 213, 0.8); }
body.mode-dusk .rail-item.is-active { color: #f8edd9; }
body.mode-dusk .rail-item.is-active .rail-num { background: #c18c58; border-color: #c18c58; color: #2d352f; }
body.mode-dusk .marker .m-tag { background: rgba(47, 52, 44, 0.9); border-color: rgba(242, 223, 193, 0.24); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
body.mode-dusk .marker .m-tag b { color: #f7ead4; }
body.mode-dusk .marker .m-tag small { color: rgba(239, 223, 197, 0.58); }
body.mode-dusk .marker .m-stem { background: linear-gradient(180deg, rgba(238, 222, 195, 0.45), rgba(238, 222, 195, 0.08)); }
body.mode-dusk .marker .m-dot { background: #d9b27b; color: #2e372f; border-color: rgba(43, 48, 39, 0.85); box-shadow: 0 0 0 4px rgba(217, 178, 123, 0.16), 0 4px 9px rgba(20, 17, 13, 0.32); }
body.mode-dusk .marker:hover .m-dot, body.mode-dusk .marker.is-active .m-dot { background: #e4b87a; }
body.mode-dusk .marker.is-active .m-tag b { color: #edbd83; }
body.mode-dusk .hint, body.mode-dusk .scalebar, body.mode-dusk .compass p { color: rgba(239, 226, 203, 0.55); }
body.mode-dusk .hint-line { background: linear-gradient(90deg, transparent, rgba(240, 226, 201, 0.3)); }
body.mode-dusk .scalebar span { border-color: rgba(240, 226, 201, 0.38); }
body.mode-dusk .compass-ring { border-color: rgba(240, 225, 200, 0.25); box-shadow: inset 0 0 0 5px rgba(50, 56, 49, 0.18); }
body.mode-dusk .compass-ring span { color: rgba(240, 226, 201, 0.55); }
body.mode-dusk .season-stamp span { color: rgba(239, 226, 203, 0.45); border-color: rgba(239, 226, 203, 0.18); }
body.mode-dusk .season-stamp span:nth-child(1), body.mode-dusk .season-stamp span:nth-child(2) { color: #d6a978; border-color: rgba(214, 169, 120, 0.3); }

/* ---------------- animations ---------------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(13px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes load-line {
  0% { transform: translateX(-120%); }
  55%, 100% { transform: translateX(360%); }
}

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  .scenic-rail { display: none; }
  .season-stamp { right: 35px; }
  .masthead { top: 26px; left: 28px; }
  .toolbar { top: 26px; right: 24px; }
}

@media (max-width: 820px) {
  .masthead { top: 20px; left: 19px; gap: 11px; max-width: calc(100vw - 150px); }
  .seal { width: 41px; height: 49px; font-size: 11px; }
  .masthead h1 { font-size: 26px; letter-spacing: 0.07em; white-space: normal; }
  .masthead h1 span { display: block; margin: 5px 0 0; font-size: 0.62em; letter-spacing: 0.16em; }
  .masthead h1 span::before { display: none; }
  .masthead .sub { display: none; }
  .kicker { font-size: 6.5px; letter-spacing: 0.1em; white-space: nowrap; }
  .kicker-place { display: none; }
  .hint-desktop { display: none; }
  .hint-mobile { display: inline; }
  .toolbar {
    top: auto;
    right: 14px;
    bottom: 17px;
    padding: 4px;
    background: rgba(243, 235, 219, 0.82);
  }
  .tool { height: 34px; width: 34px; padding: 0; justify-content: center; flex: none; }
  .tool span { display: none; }
  .tool svg { width: 14px; height: 14px; }
  .toolbar { gap: 4px; }
  .tool-icon { width: 34px; padding: 0; }
  .compass, .season-stamp, .scalebar { display: none; }
  .marker .m-tag { display: none; }
  .marker.is-active .m-tag { display: flex; padding: 4px 7px; }
  .marker .m-tag b { font-size: 10px; letter-spacing: 0.08em; }
  .marker .m-tag small { display: none; }
  .marker .m-stem { height: 13px; }
  .marker .m-dot { width: 21px; height: 21px; font-size: 8px; }
  .toolbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    animation: none;
  }
  .mobile-spots {
    display: flex;
    gap: 6px;
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 61px;
    overflow-x: auto;
    padding: 3px 2px 5px;
    scrollbar-width: none;
    pointer-events: auto;
    mask-image: linear-gradient(90deg, transparent 0, #000 13px, #000 calc(100% - 13px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 13px, #000 calc(100% - 13px), transparent 100%);
  }
  .mobile-spots::-webkit-scrollbar { display: none; }
  .mobile-spot {
    flex: none;
    appearance: none;
    border: 1px solid rgba(73, 74, 57, 0.18);
    background: rgba(247, 240, 226, 0.82);
    border-radius: 20px;
    height: 30px;
    padding: 0 11px 0 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--serif);
    font-size: 9.5px;
    letter-spacing: 0.05em;
    color: #4b5348;
    white-space: nowrap;
  }
  .mobile-spot em {
    font-style: normal;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #35473b;
    color: #f2e7d2;
    font-size: 7px;
  }
  .mobile-spot.is-active { border-color: rgba(164, 72, 52, 0.5); color: var(--cinnabar); }
  .mobile-spot.is-active em { background: var(--cinnabar); }
  body.mode-dusk .mobile-spot { background: rgba(47, 52, 45, 0.84); border-color: rgba(240, 225, 200, 0.2); color: rgba(244, 232, 211, 0.8); }
  body.mode-dusk .mobile-spot em { background: #d1a76e; color: #2e372f; }
  .hint { bottom: 102px; font-size: 8.5px; gap: 8px; }
  .hint-line { width: 16px; }
  .detail-panel {
    top: auto;
    bottom: 0;
    height: min(78vh, 680px);
    width: 100%;
    border-left: 0;
    border-top: 1px solid rgba(87, 80, 63, 0.2);
    transform: translateY(104%);
    border-radius: 15px 15px 0 0;
  }
  .detail-panel.is-open { transform: translateY(0); }
  .panel-grab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    height: 24px;
    padding: 0 11px;
    border: 1px solid rgba(75, 75, 58, 0.18);
    border-radius: 12px;
    background: rgba(247, 240, 226, 0.88);
    color: #62695b;
    font-size: 8.5px;
    letter-spacing: 0.08em;
    cursor: pointer;
  }
  .panel-grab span {
    width: 13px;
    height: 1px;
    background: rgba(74, 80, 66, 0.55);
    position: relative;
  }
  .panel-grab span::before,
  .panel-grab span::after {
    content: "";
    position: absolute;
    top: -2.5px;
    width: 1px;
    height: 5px;
    background: rgba(74, 80, 66, 0.55);
  }
  .panel-grab span::before { left: 3px; transform: rotate(35deg); }
  .panel-grab span::after { right: 3px; transform: rotate(-35deg); }
  .panel-art { height: 130px; border-radius: 15px 15px 0 0; }
  .panel-scroll { padding: 22px 21px 26px; }
  .panel-head h2 { font-size: 27px; }
  .panel-close { top: 12px; right: 12px; }
  .guide-modal { place-items: stretch; }
  .guide-sheet {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    grid-template-columns: 1fr;
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .guide-left { width: 100%; min-width: 0; padding: 34px 24px 26px; min-height: 250px; }
  .guide-left h2 { font-size: 34px; margin: 10px 0 12px; }
  .guide-intro { margin-bottom: 18px; max-width: 100%; overflow-wrap: anywhere; }
  .guide-meta { gap: 20px; }
  .guide-meta b { font-size: 21px; }
  .guide-quote, .guide-seal { display: none; }
  .guide-right { width: 100%; min-width: 0; padding: 22px 20px 34px; overflow: visible; }
  .guide-tabs { width: 100%; gap: 15px; overflow-x: auto; padding-right: 44px; }
  .guide-tabs button { font-size: 10.5px; white-space: nowrap; }
  .guide-body { width: 100%; min-width: 0; overflow-x: hidden; padding-right: 0; }
  .guide-tab, .guide-tab p, .timeline p, .notes-list, .info-grid { overflow-wrap: anywhere; }
  .season-grid, .info-grid { grid-template-columns: 1fr; }
  .guide-close { position: fixed; top: 12px; right: 14px; z-index: 90; background: rgba(247, 240, 226, 0.9); }
  .guide-mobile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 6;
    height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(235, 222, 198, 0.35);
    border-radius: 15px;
    background: rgba(247, 240, 226, 0.1);
    color: rgba(240, 228, 207, 0.85);
    font-size: 9px;
    letter-spacing: 0.12em;
    cursor: pointer;
  }
  .toast { bottom: 68px; font-size: 9.5px; }
}

@media (max-height: 720px) and (min-width: 821px) {
  .scenic-rail { top: 160px; }
  .rail-item { padding: 4px 2px; }
  .compass { display: none; }
  .panel-art { height: 156px; }
}

body.instant *,
body.instant *::before,
body.instant *::after {
  animation-duration: 0.001ms !important;
  animation-delay: 0ms !important;
  transition-duration: 0.001ms !important;
}
body.instant .loading { display: none !important; }

@media (max-width: 1180px) and (min-width: 821px) {
  .pixel-tool {
    width: 34px;
    padding: 0;
    justify-content: center;
  }
  .pixel-tool span { display: none; }
}

@media (max-width: 820px) {
  #btnPixel {
    width: auto;
    padding: 0 11px;
    gap: 6px;
  }
  #btnPixel span {
    display: inline;
    font-size: 10px;
    letter-spacing: 0.06em;
  }
}

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

/* hosting overlay: keep the host's chat bubble off the garden controls */
#__bp_comments_btn { display: none !important; }


/* mobile hosting chrome: lift the bottom toolbar above the host's floating button */
@media (max-width: 820px) {
  body.bp-host .toolbar { bottom: 78px; }
  body.bp-host .mobile-spots { bottom: 122px; }
  body.bp-host .hint { bottom: 162px; }
}

@media (max-width: 820px) {
  .guide-mobile-close { display: none !important; }
}
