:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #253431;
  background: #f8f7f4;
  font-synthesis: none;
  --ink: #24322f;
  --muted: #64706a;
  --line: #e9e8e1;
  --paper: #fffefa;
  --accent: #b94433;
  --accent-rich: #a83e30;
  --accent-fill: #da624c;
  --accent-soft: #fbede7;
  --accent-line: #f3d5ca;
  --green: #4c665d;
  --green-soft: #edf2ec;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
p, h1, h2, h3, h4 { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #356b59; outline-offset: 3px; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

.site-shell { width: min(1320px, calc(100% - 88px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid #eae8e1; background: #fcfbf8; }
.header-inner { min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 1.16rem; font-weight: 770; line-height: 1.1; letter-spacing: .06em; }
.brand img { display: block; }
.brand small { display: block; font: 650 .59rem/1.1 system-ui, sans-serif; letter-spacing: .17em; margin-top: 5px; color: #68716b; }
.header-actions { display: flex; gap: 13px; align-items: center; }
.mode-pill { display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; border: 1px solid #eadfd1; background: #f8f1e8; color: #715640; border-radius: 50px; padding: 5px 10px; font-size: .78rem; line-height: 1.4; }
.mode-dot, .source-tag > span:first-child { width: 6px; height: 6px; border-radius: 50%; background: #b58a58; }
.mode-pill[data-live="true"] { color: #405f4f; background: var(--green-soft); border-color: #dbe7dc; }
.mode-pill[data-live="true"] .mode-dot { background: #5d8a6d; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #e8e6df; border-radius: 9px; padding: 8px 12px; color: var(--ink); background: var(--paper); font-size: .84rem; font-weight: 660; line-height: 1.35; white-space: nowrap; transition: background .18s, border-color .18s; }
.button:hover { background: #f5f3ed; border-color: #d9d9d0; }
.button .icon { width: 17px; height: 17px; }

.page-intro { padding: 41px 0 29px; }
.intro-tag { display: flex; align-items: center; gap: 7px; text-transform: uppercase; color: var(--accent); font-size: .81rem; font-weight: 720; letter-spacing: .13em; }
.intro-tag .icon { width: 16px; height: 16px; }
.page-intro h1 { font-family: "Songti SC", "Noto Serif CJK SC", STSong, SimSun, serif; font-size: clamp(2.4rem, 4.05vw, 3.9rem); line-height: 1.22; font-weight: 800; letter-spacing: -.045em; margin: 9px 0 10px; }
.page-intro h1 span { color: var(--accent); }
.page-intro > p:last-child { color: #596761; font-size: 1rem; line-height: 1.55; letter-spacing: .015em; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.33fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.panel { border-radius: 17px; border: 1px solid #e8e6de; background: var(--paper); box-shadow: 0 3px 6px #24322f06, 0 12px 35px #49433007; min-width: 0; overflow: hidden; }
.map-panel { display: flex; flex-direction: column; }
.guide-panel { position: static; width: auto; max-width: none; margin: 0; padding: 0; color: var(--ink); }
.guide-heading-actions { display: flex; align-items: center; gap: 8px; }
.mobile-guide-bar, .mobile-guide-close.icon-button { display: none; }
.panel-header { min-height: 73px; padding: 13px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel-heading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.section-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; flex: 0 0 auto; }
.section-icon .icon { width: 19px; height: 19px; }
.map-icon { background: var(--green-soft); color: var(--green); }
.guide-icon { background: var(--accent-soft); color: var(--accent); }
.panel-heading h2 { font-size: 1.06rem; font-weight: 750; line-height: 1.38; letter-spacing: .03em; }
.panel-heading p { color: var(--muted); font-size: .78rem; line-height: 1.25; margin-top: 4px; }
.locate-button { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); padding: 8px 12px; }
.locate-button:hover { color: var(--accent-rich); background: #f8e1d8; border-color: #edcab9; }

.map-frame { position: relative; overflow: hidden; isolation: isolate; background: #eae7dc; margin: 0 12px; min-height: 466px; border-radius: 10px; flex: 1; }
.demo-stage, .live-map { position: absolute; inset: 0; overflow: hidden; }
.demo-stage { cursor: grab; touch-action: pan-y; }
.demo-stage.is-dragging { cursor: grabbing; }
.map-plane { position: absolute; width: var(--plane-w, 100%); height: var(--plane-h, 100%); left: var(--plane-x, 0); top: var(--plane-y, 0); transform-origin: 0 0; transform: translate3d(var(--drag-x, 0), var(--drag-y, 0), 0) scale(var(--map-scale, 1)); }
.demo-map { width: 100%; height: 100%; display: block; user-select: none; }
.map-pin { position: absolute; transform: translate(-50%, -50%) scale(var(--pin-scale, 1)); border: 2px solid white; border-radius: 50%; background: #4d695c; color: white; display: grid; place-items: center; width: 31px; height: 31px; padding: 0; box-shadow: 0 1px 5px #26392f60; z-index: 2; }
.map-pin svg { width: 15px; height: 15px; }
.map-pin > span { position: absolute; right: -8px; transform: translateX(100%); width: max-content; color: #3a4d45; text-shadow: 0 1px 2px white, 1px 0 2px white, 0 -1px 2px white, -1px 0 2px white; font-size: .78rem; line-height: 1.4; font-weight: 750; pointer-events: none; }
.map-pin:hover, .map-pin:focus-visible { background: #345042; z-index: 4; }
.map-pin.is-selected { width: 38px; height: 38px; background: var(--accent-fill); border-width: 2.5px; z-index: 3; box-shadow: 0 2px 8px #9c473a88, 0 0 0 7px #da624c29; }
.map-pin.is-selected > span { color: #9d3929; background: #fff9f6; border: 1px solid #f0d7ce; padding: 4px 7px; text-shadow: none; border-radius: 5px; right: -9px; }
.map-pin.is-selected svg { width: 20px; height: 20px; stroke-width: 2; }
.map-controls { position: absolute; top: 14px; right: 13px; z-index: 180; display: grid; align-content: start; background: #fffefa; border: 1px solid #e7e4da; overflow: hidden; border-radius: 8px; box-shadow: 0 2px 7px #26322f16; }
.map-controls button { background: transparent; border: 0; color: #344740; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; }
.map-controls button:hover { background: #f3f2ea; }
.map-controls button:focus-visible { outline-offset: -3px; border-radius: 3px; }
.map-controls button + button { border-top: 1px solid #eeece5; }
.map-controls .icon { width: 17px; height: 17px; }
.map-hint { position: absolute; bottom: 16px; left: 13px; z-index: 180; display: flex; align-items: center; gap: 6px; background: #fffefa; border: 1px solid #e9e5da; border-radius: 7px; padding: 7px 9px; box-shadow: 0 2px 7px #26322f12; font-size: .75rem; line-height: 1.3; color: #48554f; pointer-events: none; }
.map-hint .icon { width: 14px; height: 14px; color: var(--accent); }
.map-frame[data-live="true"] .map-hint { bottom: 32px; }
.map-credit { position: absolute; z-index: 2; bottom: 7px; right: 9px; font-size: .69rem; line-height: 1.2; color: #5f6258; text-shadow: 0 0 4px #fffefa; pointer-events: none; }
.map-footer { display: flex; align-items: center; gap: 10px; padding: 12px 15px; min-height: 62px; }
.footer-label { color: var(--muted); font-size: .77rem; white-space: nowrap; }
.place-chips { display: flex; gap: 5px 6px; flex-wrap: wrap; }
.place-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; line-height: 1.3; font-weight: 580; border: 1px solid #e8e8df; color: #47554d; border-radius: 40px; padding: 5px 8px; background: #f9f9f4; white-space: nowrap; }
.place-chip:hover { background: #eff2eb; }
.place-chip[aria-pressed="true"] { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.place-chip .icon { width: 12px; height: 12px; stroke-width: 1.9; }

.source-tag { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; background: var(--green-soft); color: #466454; font-size: .74rem; padding: 5px 9px; border-radius: 30px; }
.source-tag > span:first-child { background: #71917d; }
.source-tag[data-kind="ai"] { background: #f2edf8; color: #694b88; }
.source-tag[data-kind="ai"] > span:first-child { background: #8e70aa; }
.guide-hero { margin: 0 12px; position: relative; isolation: isolate; overflow: hidden; min-height: 211px; border-radius: 10px; color: white; background-color: #6b8377; background-image: radial-gradient(ellipse at 78% 25%, #9aa597, transparent 52%), linear-gradient(140deg, #b7b6a0, #5b7569 53%, #3f6055); background-position: center 52%; background-size: cover; }
.guide-hero.has-photo { background-image: url("./west-lake.jpg"), linear-gradient(140deg, #a9a98f, #678074); }
.guide-hero.has-hangzhou-map::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .48; background: center right -45px / auto 118% no-repeat url("./hangzhou-map.svg"); mask-image: linear-gradient(90deg, transparent 29%, #000 78%); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(0deg, #142720e3 0%, #172a1f8c 31%, #192e2400 75%); z-index: -1; }
.hero-region { position: absolute; left: 16px; top: 15px; display: inline-flex; align-items: center; gap: 5px; background: #fffaf0e8; border: 1px solid #ffffff80; border-radius: 30px; padding: 5px 8px; color: #37433b; font-size: .74rem; font-weight: 680; max-width: calc(100% - 32px); }
.hero-region .icon { height: 13px; width: 13px; }
.hero-details { padding: 0 18px; position: absolute; inset: auto 0 15px; }
.hero-details h3 { font-family: "Songti SC", "Noto Serif CJK SC", STSong, SimSun, serif; font-size: clamp(1.9rem, 3vw, 2.73rem); line-height: 1.1; letter-spacing: .03em; font-weight: 820; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-details p { margin-top: 8px; color: #f0eee4; font-family: system-ui, sans-serif; font-size: .78rem; font-weight: 560; font-variant-numeric: tabular-nums; letter-spacing: .035em; }
.image-credit { position: absolute; right: 9px; bottom: 9px; font-size: .65rem; color: #f5f2e8; padding: 3px 5px; border-radius: 3px; background: #2436309c; }
.guide-tabs { display: flex; gap: 22px; margin: 0 17px; border-bottom: 1px solid var(--line); }
.guide-tabs button { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 14px 5px 13px; border: 0; color: #5b6961; background: transparent; white-space: nowrap; font-size: .87rem; font-weight: 680; }
.guide-tabs button .icon { width: 16px; height: 16px; }
.guide-tabs button:hover, .guide-tabs button[aria-selected="true"] { color: var(--accent); }
.guide-tabs button[aria-selected="true"]::after { position: absolute; content: ""; height: 2px; border-radius: 2px 2px 0 0; inset: auto 0 -1px; background: var(--accent-fill); }
.guide-body { padding: 16px 18px 17px; }
.guide-status { border-radius: 7px; background: #f7f1e9; color: #71533a; padding: 8px 10px; font-size: .84rem; line-height: 1.5; margin-bottom: 11px; }
.place-description { font-size: .97rem; line-height: 1.72; color: #38463d; }
.highlights { margin-top: 12px; }
.highlights h4 { display: flex; align-items: center; gap: 7px; font-size: .94rem; font-weight: 760; color: var(--ink); }
.highlights h4 .icon { width: 15px; height: 15px; color: var(--accent); }
.highlight-list { display: flex; gap: 5px; flex-wrap: wrap; list-style: none; padding: 0; margin: 8px 0 0; }
.highlight-list li { border-radius: 5px; padding: 4px 8px; line-height: 1.35; font-size: .81rem; font-weight: 560; background: #eef2eb; color: #415b4e; }
.place-tip { display: flex; gap: 8px; align-items: flex-start; margin-top: 13px; background: #faf3e9; padding: 8px 10px; line-height: 1.49; border-radius: 8px; color: #66543e; }
.place-tip svg { width: 15px; height: 15px; margin-top: 2px; color: #9b7445; }
.place-tip strong { display: block; font-size: .82rem; }
.place-tip p { font-size: .81rem; margin-top: 2px; }
.prompt-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: .88rem; }
.copy-button .icon { width: 14px; height: 14px; }
.prompt-output { margin: 0; border: 1px solid #e8e9df; border-radius: 8px; padding: 12px; background: #f7f8f2; color: #364840; font: .82rem/1.7 ui-monospace, Monaco, "PingFang SC", monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }

.site-footer { padding: 16px 1px 20px; display: flex; justify-content: space-between; gap: 12px; color: #6a746d; font-size: .78rem; line-height: 1.45; }
.site-footer span { color: var(--accent); padding: 0 2px; }
.settings-dialog { width: min(454px, calc(100% - 28px)); max-height: calc(100% - 28px); background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 15px; padding: 0; box-shadow: 0 16px 85px #1d2c2860; }
.settings-dialog::backdrop { background: #23342c68; }
.settings-header, .settings-footer { padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.settings-header { border-bottom: 1px solid var(--line); }
.settings-footer { border-top: 1px solid var(--line); justify-content: flex-end; }
.settings-fields { display: grid; gap: 12px; padding: 15px 17px; }
.settings-fields label { display: block; font-size: .91rem; font-weight: 650; }
.settings-fields input { width: 100%; display: block; margin-top: 5px; border: 1px solid #dcded4; border-radius: 7px; padding: 8px 9px; background: #fdfdfa; color: var(--ink); font-size: .94rem; }
.settings-fields small { color: var(--muted); font-size: .74rem; font-weight: 500; margin-inline-start: 4px; }
.settings-note, .settings-error { color: var(--muted); font-size: .84rem; line-height: 1.5; }
.settings-error { color: var(--accent-rich); }
.primary-button { color: white; background: var(--accent); border-color: var(--accent); }
.primary-button:hover { color: white; background: var(--accent-rich); border-color: var(--accent-rich); }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; color: var(--muted); border: 0; border-radius: 7px; background: transparent; }
.icon-button:hover { background: #f3f2eb; }
.toast { position: fixed; z-index: 1000; inset: auto 16px 18px auto; max-width: min(380px, calc(100% - 32px)); padding: 10px 14px; border-radius: 8px; color: white; background: #2f4238; font-size: .89rem; line-height: 1.5; box-shadow: 0 5px 18px #24322f35; }

@media (max-width: 1040px) {
  .site-shell { width: calc(100% - 44px); }
  .workspace { grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr); gap: 15px; }
  .map-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
}
@media (max-width: 720px) {
  .site-shell { width: auto; margin-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); }
  .site-header { padding-top: env(safe-area-inset-top); }
  .header-inner { min-height: 60px; }
  .header-actions { gap: 6px; }
  .brand { font-size: 1rem; gap: 6px; }
  .brand img { width: 34px; height: 34px; }
  .brand small { font-size: .51rem; }
  .header-button { gap: 4px; font-size: .79rem; padding-inline: 7px; min-height: 44px; }
  .mode-pill { padding-inline: 7px; font-size: .71rem; gap: 4px; }
  .page-intro { padding: 16px 1px 15px; }
  .intro-tag { display: none; }
  .page-intro h1 { margin: 0 0 5px; font-size: clamp(1.66rem, 7.25vw, 2.7rem); }
  .page-intro > p:last-child { font-size: .86rem; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .panel-header { min-height: 60px; padding: 8px 11px; }
  .map-frame { min-height: clamp(250px, 68vw, 440px); min-height: clamp(245px, calc(100svh - 350px), 530px); margin-inline: 7px; }
  .demo-stage { touch-action: none; }
  .map-controls { top: auto; right: 9px; bottom: 41px; }
  .map-controls button { width: 44px; height: 44px; }
  .map-hint { max-width: calc(100% - 83px); }
  .locate-button, .copy-button, .mobile-guide-open { min-height: 44px; }
  .map-footer { display: block; padding: 6px 0 4px; min-height: 54px; }
  .footer-label { display: none; }
  .place-chips { overflow-x: auto; overscroll-behavior-inline: contain; flex-wrap: nowrap; padding: 2px 10px 4px; scrollbar-width: none; }
  .place-chips::-webkit-scrollbar { display: none; }
  .place-chip { min-height: 44px; flex: 0 0 auto; padding-inline: 10px; font-size: .83rem; }
  .mobile-guide-bar { display: flex; align-items: center; justify-content: space-between; gap: 9px; border-top: 1px solid var(--line); padding: 8px 10px; }
  .mobile-selection { display: grid; gap: 2px; min-width: 0; }
  .mobile-selection span { color: var(--muted); font-size: .74rem; }
  .mobile-selection strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
  .mobile-guide-open { flex-shrink: 0; }
  .guide-panel { position: fixed; inset: auto 0 0; width: 100%; max-height: 86vh; max-height: min(86dvh, 720px); border-radius: 17px 17px 0 0; border-bottom: 0; padding-bottom: max(6px, env(safe-area-inset-bottom)); overflow: auto; overscroll-behavior: contain; }
  .guide-panel[open]:not(:modal) { display: none; }
  .guide-panel::backdrop { background: #22332b70; }
  body:has(.guide-panel:modal) { overflow: hidden; }
  .guide-panel .panel-header { position: sticky; top: 0; z-index: 3; background: var(--paper); }
  .mobile-guide-close.icon-button { display: grid; width: 44px; height: 44px; }
  .guide-hero { margin-inline: 8px; min-height: 179px; }
  .guide-tabs { gap: 14px; margin-inline: 12px; }
  .guide-tabs button { min-height: 48px; }
  .guide-body { padding-inline: 13px; }
  .site-footer { font-size: .73rem; padding-block-end: max(13px, env(safe-area-inset-bottom)); }
  .site-footer p:first-child { display: none; }
  .settings-dialog { max-height: calc(100dvh - 28px); }
  .settings-fields input { font-size: 1rem; }
  .settings-header button, .settings-footer button { min-height: 44px; }
  .settings-header .icon-button { min-width: 44px; }
  .map-pin::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
  .map-pin > span { display: none; }
  .map-pin.is-selected > span { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
