:root {
  --ink: #22231f;
  --muted: #777970;
  --paper: #f1f0ea;
  --white: #faf9f5;
  --line: #d9d7cd;
  --rust: #9a4934;
  --sage: #667563;
  --dark: #252822;
  --shadow: 0 28px 80px rgba(35, 36, 31, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, "Microsoft YaHei", system-ui, sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header { position: relative; z-index: 2; height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 5vw, 76px); border-bottom: 1px solid rgba(255,255,255,.12); color: #f4f2eb; background: var(--dark); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, "STSong", serif; font-size: 18px; font-weight: 400; letter-spacing: .12em; }
.brand small { margin-top: 2px; color: #989d91; font-size: 7px; letter-spacing: .18em; }
.brand-mark { position: relative; width: 31px; height: 31px; display: block; }
.brand-mark i { position: absolute; width: 17px; height: 23px; border: 1px solid rgba(238,235,225,.62); transform: rotate(10deg); }
.brand-mark i:nth-child(2) { left: 7px; top: 3px; transform: rotate(-5deg); }
.brand-mark i:nth-child(3) { left: 13px; top: 6px; border-color: var(--rust); transform: rotate(9deg); }
.header-note { display: flex; align-items: center; gap: 8px; color: #aeb2a7; font-size: 9px; letter-spacing: .08em; }
.header-note span { width: 6px; height: 6px; border-radius: 50%; background: #9caf96; box-shadow: 0 0 0 4px rgba(156,175,150,.1); }

main { width: min(1320px, calc(100% - 44px)); margin: 0 auto; }
.hero { min-height: 470px; display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 8vw; align-items: center; padding: 72px 2vw 64px; }
.eyebrow, .finder > div > p, .local-guide > div > p { margin: 0 0 17px; color: var(--rust); font-size: 9px; letter-spacing: .17em; }
.hero h1 { margin: 0; font-family: Georgia, "STSong", serif; font-size: clamp(52px, 7vw, 94px); font-weight: 400; line-height: .98; letter-spacing: -.045em; }
.hero h1 em { color: var(--rust); font-weight: 400; }
.lede { max-width: 610px; margin: 28px 0 0; color: #65675f; font-family: Georgia, "STSong", serif; font-size: 15px; line-height: 1.9; }
.boundary-card { align-self: end; padding: 23px 25px; color: #dedfd8; background: var(--dark); box-shadow: var(--shadow); }
.boundary-card > p { margin: 0 0 18px; color: #9fa496; font-size: 8px; letter-spacing: .2em; }
.boundary-card dl { margin: 0; }
.boundary-card dl div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 10px; }
.boundary-card dt { color: #858a7f; }
.boundary-card dd { margin: 0; }

.finder { display: grid; grid-template-columns: 240px minmax(300px, 1fr); gap: 16px 38px; align-items: end; padding: 31px 35px 27px; color: #ecebe4; background: var(--dark); }
.finder h2 { margin: 0; font-family: Georgia, "STSong", serif; font-size: 25px; font-weight: 400; }
.finder form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 10px; }
.handle-input { height: 48px; display: grid; grid-template-columns: 43px 1fr; border: 1px solid rgba(255,255,255,.19); background: rgba(255,255,255,.06); }
.handle-input span { display: grid; place-items: center; color: #aeb2a8; border-right: 1px solid rgba(255,255,255,.14); }
.handle-input input { min-width: 0; padding: 0 14px; border: 0; outline: 0; color: #fff; background: transparent; font-size: 13px; }
.source-disclosure { grid-column: 2; margin: 0; color: #91968b; font-size: 9px; line-height: 1.65; }
.primary-button, .secondary-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 0 17px; border: 0; cursor: pointer; text-decoration: none; transition: transform .18s, opacity .18s, background .18s; }
.primary-button { color: #fff; background: var(--rust); }
.secondary-button { border: 1px solid #c7c4ba; color: #55574f; background: transparent; }
.primary-button:hover, .secondary-button:hover { transform: translateY(-1px); }
.primary-button:disabled, .secondary-button:disabled { opacity: .48; cursor: wait; transform: none; }
.full { width: 100%; margin-top: 9px; }

.result-head { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 48px 4px 25px; border-bottom: 1px solid var(--line); }
.result-author { display: flex; align-items: center; gap: 13px; }
.avatar { width: 45px; height: 45px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: white; background: var(--sage); font-size: 11px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.result-author p, .result-author h2 { margin: 0; }
.result-author p { color: #76786f; font-size: 10px; }
.result-author h2 { margin-top: 3px; font-family: Georgia, serif; font-size: 20px; font-weight: 400; }
.result-meta { display: flex; }
.result-meta div { min-width: 93px; padding: 2px 20px; border-left: 1px solid var(--line); text-align: center; }
.result-meta strong, .result-meta small { display: block; }
.result-meta strong { font-family: Georgia, serif; font-size: 24px; font-weight: 400; }
.result-meta small { margin-top: 2px; color: #85877e; font-size: 8px; }

.tag-panel { display: flex; align-items: flex-start; gap: 7px; padding: 14px 3px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tag-panel > div { display: flex; gap: 7px; }
.tag { flex: 0 0 auto; padding: 6px 10px; border: 1px solid #d3d1c7; border-radius: 20px; color: #6a6c64; background: var(--white); cursor: pointer; font-size: 9px; }
.tag.active { border-color: var(--sage); color: #fff; background: var(--sage); }
.tag span { margin-left: 4px; opacity: .6; font-family: Georgia, serif; }

.status-panel { min-height: 360px; display: grid; justify-items: center; align-content: center; padding: 60px 20px; text-align: center; }
.status-panel[hidden] { display: none; }
.status-art { position: relative; width: 86px; height: 73px; margin-bottom: 23px; }
.status-art span { position: absolute; display: block; border: 1px solid #aaa79d; background: var(--paper); }
.status-art span:nth-child(1) { inset: 12px 22px 4px 4px; transform: rotate(-8deg); }
.status-art span:nth-child(2) { inset: 4px 7px 11px 19px; transform: rotate(7deg); }
.status-art span:nth-child(3) { width: 10px; height: 10px; left: 37px; top: 28px; border-radius: 50%; border-color: var(--rust); background: var(--rust); }
.status-panel.loading .status-art { animation: breathe 1.2s ease-in-out infinite alternate; }
@keyframes breathe { to { transform: translateY(-6px); opacity: .55; } }
.status-panel h2 { margin: 0; font-family: Georgia, "STSong", serif; font-size: 23px; font-weight: 400; }
.status-panel p { max-width: 470px; margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }

.gallery { display: grid; grid-template-columns: repeat(var(--gallery-columns, 4), minmax(0, 1fr)); gap: 15px; align-items: start; padding: 23px 0 0; }
.gallery[hidden] { display: none; }
.gallery-column { min-width: 0; display: flex; flex-direction: column; gap: 15px; }
.media-card { position: relative; margin: 0; overflow: hidden; background: #ddd9cf; cursor: zoom-in; animation: reveal .35s both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
.media-card > img { display: block; width: 100%; height: auto; min-height: 120px; object-fit: cover; transition: transform .4s, filter .25s; }
.media-card:hover > img { transform: scale(1.025); filter: brightness(.72); }
.card-overlay { position: absolute; inset: auto 0 0; padding: 60px 13px 12px; opacity: 0; color: white; background: linear-gradient(transparent, rgba(20,21,18,.82)); transform: translateY(5px); transition: .2s; }
.media-card:hover .card-overlay { opacity: 1; transform: none; }
.card-overlay strong, .card-overlay small { display: block; }
.card-overlay strong { font-size: 10px; font-weight: 500; }
.card-overlay small { margin-top: 3px; color: rgba(255,255,255,.68); font-size: 8px; }
.sensitive-mask { position: absolute; inset: 0; display: grid; place-items: center; border: 0; color: #fff; background: rgba(33,35,30,.76); backdrop-filter: blur(16px); cursor: pointer; font-size: 10px; }
.download-card { position: absolute; top: 9px; right: 9px; width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-radius: 50%; opacity: 0; color: white; background: rgba(30,31,27,.7); cursor: pointer; }
.media-card:hover .download-card { opacity: 1; }
.more-row { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 25px 0 45px; }
.more-row small { color: var(--muted); font-size: 9px; }

.local-guide { display: grid; grid-template-columns: minmax(270px, .8fr) minmax(320px, 1fr); gap: 9vw; margin: 55px 0 70px; padding: 55px clamp(28px, 6vw, 74px); color: #e9e8e0; background: var(--dark); }
.local-guide h2 { margin: 0; font-family: Georgia, "STSong", serif; font-size: clamp(28px, 4vw, 45px); font-weight: 400; line-height: 1.2; }
.guide-copy > p { margin: 0 0 22px; color: #a8aca1; font-size: 11px; line-height: 1.8; }
.guide-copy pre { margin: 0; padding: 17px 19px; overflow-x: auto; color: #d5d8ce; background: #1b1d19; font-size: 10px; line-height: 1.7; }

.preview-dialog { width: min(1120px, calc(100vw - 36px)); height: min(790px, calc(100vh - 36px)); padding: 0; border: 0; overflow: hidden; color: var(--ink); background: #171914; box-shadow: var(--shadow); }
.preview-dialog::backdrop { background: rgba(22,23,20,.73); backdrop-filter: blur(3px); }
.preview-dialog[open] { display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.preview-stage { min-width: 0; display: grid; place-items: center; padding: 25px; }
.preview-stage img { max-width: 100%; max-height: calc(100vh - 86px); object-fit: contain; }
.preview-dialog aside { padding: 38px 29px; overflow-y: auto; background: var(--white); }
.preview-close { position: fixed; z-index: 2; width: 34px; height: 34px; margin: 12px; border: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.34); cursor: pointer; font-size: 21px; }
.preview-kicker { margin: 0 0 8px; color: var(--rust); font-size: 9px; letter-spacing: .08em; }
.preview-dialog aside h2 { margin: 0; font-family: Georgia, "STSong", serif; font-size: 24px; font-weight: 400; }
.preview-text { min-height: 115px; margin: 26px 0; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #5f6159; font-family: Georgia, "Microsoft YaHei", serif; font-size: 11px; line-height: 1.75; white-space: pre-wrap; }
.preview-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.preview-tags span { padding: 5px 8px; border: 1px solid #d8d5cb; border-radius: 16px; color: #74766e; font-size: 8px; }

.toast { position: fixed; z-index: 10; right: 22px; bottom: 22px; width: min(370px, calc(100vw - 32px)); padding: 14px 17px; color: #efeee8; background: #2b2e28; box-shadow: 0 14px 40px rgba(0,0,0,.2); font-size: 10px; line-height: 1.55; }
.toast.error { border-left: 4px solid var(--rust); }
footer { display: flex; justify-content: space-between; padding: 25px clamp(22px, 5vw, 76px); color: #999b93; border-top: 1px solid var(--line); font-size: 8px; letter-spacing: .08em; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .boundary-card { width: min(100%, 390px); justify-self: end; }
  .finder { grid-template-columns: 1fr; }
  .source-disclosure { grid-column: 1; }
  .local-guide { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  main { width: min(100% - 26px, 1320px); }
  .header-note { font-size: 0; }
  .header-note::after { content: "展示版"; font-size: 8px; }
  .hero { min-height: auto; padding: 55px 1vw; }
  .hero h1 { font-size: 51px; }
  .finder { padding: 25px 20px; }
  .finder form { grid-template-columns: 1fr; }
  .result-head { align-items: flex-start; flex-direction: column; }
  .result-meta { width: 100%; }
  .result-meta div { flex: 1; min-width: 0; padding-inline: 8px; }
  .gallery { gap: 8px; }
  .gallery-column { gap: 8px; }
  .download-card { opacity: 1; }
  .local-guide { padding: 40px 22px; }
  .preview-dialog { width: calc(100vw - 18px); height: calc(100vh - 18px); overflow-y: auto; }
  .preview-dialog[open] { grid-template-columns: 1fr; grid-template-rows: minmax(280px, 58vh) auto; }
  .preview-stage img { max-height: 54vh; }
  .preview-dialog aside { overflow: visible; }
}
