:root {
  --pine-950: #102c25;
  --pine-900: #173c32;
  --pine-800: #245044;
  --pine-600: #50756a;
  --vermilion: #c64d3f;
  --vermilion-dark: #a83e33;
  --paper: #fbfcf9;
  --mist: #f2f5f1;
  --ink: #1d2925;
  --muted: #76837d;
  --line: #dce4df;
  --shadow: 0 24px 70px rgba(12, 39, 31, .2);
  --display-font: STKaiti, KaiTi, "FZKai-Z03", serif;
  --body-font: "PingFang SC", "Microsoft YaHei", sans-serif;
  --utility-font: Inter, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--pine-950); color: var(--ink); font-family: var(--body-font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(198, 77, 63, .34); outline-offset: 3px; }

.app-shell, .map-canvas { position: relative; width: 100%; height: 100%; }
.map-canvas { position: absolute; inset: 0; background: #dce5df; }
.map-canvas::after { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(16, 44, 37, .22), transparent 18%, transparent 78%, rgba(16, 44, 37, .08)); content: ""; pointer-events: none; }
.amap-logo, .amap-copyright { display: none !important; }

.map-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: 118px; padding: 20px 38px 28px; color: #fff; background: linear-gradient(180deg, rgba(16, 44, 37, .94), rgba(16, 44, 37, .66) 58%, rgba(16, 44, 37, 0)); pointer-events: none; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; pointer-events: auto; }
.brand-seal { display: grid; width: 48px; height: 48px; border-radius: 5px; background: var(--vermilion); color: #fff; font: 30px/1 var(--display-font); place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 8px 20px rgba(91, 26, 21, .2); }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { font: 26px/1.05 var(--display-font); letter-spacing: .16em; }
.brand-copy small { margin-top: 7px; color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .23em; }
.header-note { display: flex; align-items: center; gap: 12px; margin-right: 4px; color: rgba(255,255,255,.72); font-size: 11px; letter-spacing: .18em; }
.header-note i { width: 30px; height: 1px; background: rgba(255,255,255,.4); }

.explore-panel { position: absolute; top: 116px; bottom: 32px; left: 32px; z-index: 8; display: flex; flex-direction: column; width: 342px; padding: 24px 20px 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 15px; background: rgba(251,252,249,.94); box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.panel-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 4px 18px; }
.panel-heading p { margin: 0; color: var(--muted); font: 10px/1 var(--utility-font); letter-spacing: .2em; }
.panel-heading strong { color: var(--pine-900); font: 18px/1.1 var(--display-font); letter-spacing: .06em; }
.search-field { display: flex; align-items: center; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: #f4f6f2; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.search-field:focus-within { border-color: #8ea89e; background: #fff; box-shadow: 0 0 0 3px rgba(36,80,68,.08); }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-field input::placeholder { color: #9aa49f; }
.search-field kbd { display: grid; flex: none; width: 23px; height: 23px; border: 1px solid #d6ddd8; border-radius: 5px; background: #fff; color: #8a9690; font: 11px/1 var(--utility-font); place-items: center; box-shadow: 0 1px 0 #d9dfdb; }
.search-icon { position: relative; flex: none; width: 15px; height: 15px; margin-right: 9px; border: 1.6px solid #64776f; border-radius: 50%; }
.search-icon::after { position: absolute; right: -4px; bottom: -2px; width: 6px; height: 1.5px; background: #64776f; content: ""; transform: rotate(48deg); transform-origin: left center; }
.panel-message { min-height: 16px; margin: 11px 4px 4px; color: #8c9892; font-size: 11px; }
.temple-list { flex: 1; min-height: 0; margin: 0 -6px 0 0; padding: 0 6px 0 0; overflow-x: hidden; overflow-y: auto; list-style: none; scrollbar-color: #c7d1cb transparent; scrollbar-width: thin; }
.temple-list-item { margin-top: 7px; }
.temple-list-button { display: grid; grid-template-columns: 58px minmax(0, 1fr) 18px; align-items: center; width: 100%; min-height: 72px; padding: 7px; border: 0; border-radius: 9px; background: transparent; color: inherit; cursor: pointer; text-align: left; transition: background .2s ease, transform .2s ease; }
.temple-list-button:hover { background: #edf2ee; transform: translateX(2px); }
.temple-list-button.is-active { background: #e7eee9; box-shadow: inset 3px 0 var(--vermilion); }
.list-cover { display: grid; width: 58px; height: 58px; overflow: hidden; border-radius: 7px; background: #dfe7e2; color: var(--pine-600); font: 24px/1 var(--display-font); place-items: center; }
.list-cover img { width: 100%; height: 100%; object-fit: cover; }
.list-copy { min-width: 0; padding: 0 10px 0 12px; }
.list-copy strong { display: block; overflow: hidden; font: 17px/1.25 var(--display-font); letter-spacing: .05em; text-overflow: ellipsis; white-space: nowrap; }
.list-copy small { display: -webkit-box; margin-top: 7px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.list-arrow { color: #a1aca6; font: 18px var(--utility-font); }
.empty-state { margin: auto 0; padding: 30px 10px; color: var(--muted); text-align: center; }
.empty-state > span { display: grid; width: 52px; height: 52px; margin: 0 auto 14px; border: 1px solid #cdd8d1; border-radius: 50%; color: var(--pine-600); font: 26px/1 var(--display-font); place-items: center; }
.empty-state strong { display: block; color: #53625c; font-size: 13px; }
.empty-state p { margin: 8px 0 0; font-size: 11px; }
.panel-foot { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: #9aa59f; font-size: 10px; letter-spacing: .08em; text-align: center; }

.map-actions { position: absolute; right: 30px; bottom: 32px; z-index: 7; display: flex; flex-direction: column; gap: 10px; }
.map-action { display: grid; width: 46px; height: 46px; padding: 0; border: 1px solid rgba(25,61,51,.08); border-radius: 50%; background: rgba(251,252,249,.96); color: var(--pine-900); box-shadow: 0 10px 28px rgba(13,41,33,.16); cursor: pointer; place-items: center; transition: transform .2s ease, background .2s ease; }
.map-action:hover { background: #fff; transform: translateY(-2px); }
.map-action > span:first-child { font: 23px/1 var(--utility-font); }
.fit-icon { position: relative; width: 18px; height: 18px; border: 1.5px solid var(--pine-800); }
.fit-icon::before, .fit-icon::after { position: absolute; background: var(--paper); content: ""; }
.fit-icon::before { top: 4px; right: -3px; bottom: 4px; left: -3px; }
.fit-icon::after { top: -3px; right: 4px; bottom: -3px; left: 4px; }

.loading-toast { position: absolute; bottom: 34px; left: 50%; z-index: 9; display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: 20px; background: rgba(16,44,37,.9); color: #fff; font-size: 11px; letter-spacing: .06em; box-shadow: 0 8px 24px rgba(16,44,37,.18); transform: translateX(-50%); }
.loading-toast span { width: 11px; height: 11px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.temple-pin { position: relative; display: flex; align-items: flex-end; min-height: 42px; padding: 0 0 7px 7px; cursor: pointer; filter: drop-shadow(0 5px 7px rgba(35,47,42,.24)); }
.temple-pin-seal { display: grid; min-width: 42px; max-width: 180px; height: 35px; padding: 0 11px; overflow: hidden; border: 2px solid #fff; border-radius: 10px 10px 10px 0; background: var(--vermilion); color: #fff; font: 14px/1 var(--display-font); letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; place-items: center; transition: transform .18s ease, background .18s ease; }
.temple-pin::after { position: absolute; bottom: -3px; left: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--pine-950); box-shadow: 0 0 0 2px rgba(255,255,255,.92); content: ""; }
.temple-pin:hover .temple-pin-seal, .temple-pin.is-active .temple-pin-seal { background: var(--vermilion-dark); transform: translateY(-3px); }
.temple-cluster { display: grid; width: 43px; height: 43px; border: 3px solid rgba(255,255,255,.9); border-radius: 50%; background: var(--pine-900); color: #fff; font: 600 12px/1 var(--utility-font); box-shadow: 0 6px 18px rgba(13,41,33,.24); place-items: center; }

.drawer-backdrop { position: absolute; inset: 0; z-index: 18; border: 0; background: rgba(9,28,22,.22); cursor: default; opacity: 0; pointer-events: none; transition: opacity .32s ease; }
.detail-drawer { position: absolute; top: 0; right: 0; bottom: 0; z-index: 20; width: min(520px, 92vw); overflow-x: hidden; overflow-y: auto; background: var(--mist); box-shadow: -26px 0 80px rgba(9,30,23,.23); transform: translateX(104%); transition: transform .36s cubic-bezier(.22,.75,.18,1); overscroll-behavior: contain; }
.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-open .detail-drawer { transform: translateX(0); }
.drawer-close { position: fixed; top: 20px; right: 20px; z-index: 24; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: rgba(15,39,32,.7); color: transparent; font-size: 0; cursor: pointer; backdrop-filter: blur(8px); transition: background .2s ease, transform .2s ease; }
.drawer-close::before, .drawer-close::after { position: absolute; top: 50%; left: 50%; width: 17px; height: 2px; border-radius: 1px; background: #fff; content: ""; transform: translate(-50%, -50%) rotate(45deg); }
.drawer-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.drawer-close:hover { background: var(--vermilion); transform: rotate(6deg); }
.gallery-stage { position: relative; height: 390px; overflow: hidden; background: #cbd7d0; }
.gallery-stage > img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s ease; }
.gallery-fallback { position: absolute; inset: 0; display: grid; background: radial-gradient(circle at 70% 20%, #68857b, var(--pine-900)); color: rgba(255,255,255,.7); place-items: center; }
.gallery-fallback span { display: grid; width: 90px; height: 90px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; font: 48px/1 var(--display-font); place-items: center; }
.gallery-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,25,20,.08), transparent 58%, rgba(8,25,20,.5)); pointer-events: none; }
.gallery-counter { position: absolute; right: 28px; bottom: 24px; color: rgba(255,255,255,.9); font: 10px/1 var(--utility-font); letter-spacing: .18em; }
.gallery-controls { position: absolute; bottom: 18px; left: 24px; display: flex; gap: 7px; }
.gallery-controls button { width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(10,30,24,.34); color: #fff; cursor: pointer; backdrop-filter: blur(6px); }
.gallery-controls button:hover { background: rgba(198,77,63,.88); }
.place-identity { position: relative; z-index: 2; margin: -18px 20px 0; padding: 26px 28px 28px; border-radius: 13px; background: var(--paper); box-shadow: 0 16px 48px rgba(28,52,43,.13); }
.place-index { display: flex; justify-content: space-between; color: #98a39e; font: 9px/1 var(--utility-font); letter-spacing: .28em; }
.place-identity h1 { margin: 15px 0 22px; color: var(--ink); font: 600 37px/1.2 var(--display-font); letter-spacing: .1em; }
.navigation-link { display: grid; grid-template-columns: 38px minmax(0,1fr) 18px; align-items: center; min-height: 70px; padding: 13px 16px; border-radius: 9px; background: var(--pine-900); color: #fff; text-decoration: none; transition: background .2s ease, transform .2s ease; }
.navigation-link:hover { background: var(--pine-800); transform: translateY(-1px); }
.navigation-mark { font: 27px/1 var(--utility-font); }
.navigation-link > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.navigation-link strong { font-size: 13px; }
.navigation-link small { margin-top: 5px; overflow: hidden; color: #bfd0c9; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.navigation-link b { font: 16px/1 var(--utility-font); }
.detail-section { margin-top: 14px; padding: 30px 32px; background: var(--paper); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.section-title h2 { margin: 0; font: 600 21px/1 var(--display-font); letter-spacing: .1em; }
.section-title span { color: #9ca7a1; font: 9px/1 var(--utility-font); letter-spacing: .22em; }
.description { margin: 0; color: #3f4c47; font-size: 14px; line-height: 2; white-space: pre-wrap; }
.coordinates { margin: 26px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); }
.coordinates > div { display: flex; justify-content: space-between; gap: 22px; padding-top: 12px; color: #7e8b85; font-size: 10px; }
.coordinates dt { flex: none; }
.coordinates dd { margin: 0; text-align: right; }
.comment-item { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 13px; padding: 18px 0; border-bottom: 1px solid #e6ebe7; }
.comment-avatar { display: grid; width: 38px; height: 38px; overflow: hidden; border-radius: 50%; background: #dfe7e2; color: var(--pine-800); font: 600 13px/1 var(--body-font); place-items: center; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.comment-meta strong { font-size: 12px; }
.comment-meta time { color: #9aa49f; font: 9px/1 var(--utility-font); }
.comment-content { margin: 8px 0 0; color: #4a5751; font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.comment-empty { padding: 28px 0 18px; color: #8b9691; font-size: 12px; text-align: center; }
.load-more { width: 100%; height: 38px; margin-top: 16px; border: 1px solid #d2dbd6; border-radius: 19px; background: transparent; color: var(--pine-800); font-size: 11px; cursor: pointer; }
.load-more:hover { border-color: var(--pine-600); background: #f2f5f1; }
.drawer-loading-copy { padding: 30px; }
.skeleton { overflow: hidden; border-radius: 6px; background: #dfe6e1; }
.skeleton::after { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); content: ""; animation: shimmer 1.35s infinite; transform: translateX(-100%); }
.skeleton-image { height: 390px; border-radius: 0; }
.skeleton-line { height: 13px; margin-top: 16px; }
.skeleton-line.short { width: 26%; height: 8px; }
.skeleton-line.title { width: 58%; height: 30px; margin-top: 20px; }
@keyframes shimmer { to { transform: translateX(100%); } }
.drawer-error { display: grid; min-height: 100%; padding: 70px; color: var(--muted); text-align: center; place-content: center; }
.drawer-error span { display: grid; width: 74px; height: 74px; margin: 0 auto 20px; border: 1px solid #cbd6cf; border-radius: 50%; color: var(--pine-600); font: 37px/1 var(--display-font); place-items: center; }
.drawer-error strong { color: #4d5c56; font-size: 15px; }
.drawer-error p { font-size: 12px; }

@media (max-width: 820px) {
  .map-header { height: 100px; padding: 15px 18px 22px; }
  .brand-seal { width: 43px; height: 43px; }
  .brand-copy strong { font-size: 23px; }
  .header-note { display: none; }
  .explore-panel { top: auto; right: 14px; bottom: 14px; left: 14px; width: auto; height: auto; padding: 16px 18px; }
  .panel-heading { padding: 0; }
  .search-field, .panel-message, .temple-list, .empty-state, .panel-foot { display: none; }
  .map-actions { right: 16px; bottom: 88px; }
  .detail-drawer { width: 100%; }
  .gallery-stage, .skeleton-image { height: 340px; }
}

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