:root {
  color-scheme: light;
  --paper: #f7f5ec;
  --card: #fffdf6;
  --green: #254633;
  --deep: #203b2b;
  --text: #2a392c;
  --muted: #5b6557;
  --line: #e5e3d5;
  --soft-green: #e9efdd;
  --gold: #795521;
  --gold-bg: #f2e8d2;
  --heading: 'Noto Serif SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Songti SC', STSong, SimSun, serif;
  --body: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 92px; }
body { margin: 0; background: var(--paper); color: var(--text); font: 15px/1.65 var(--body); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid #8a612d; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--heading); color: var(--deep); line-height: 1.28; }
h2 { font-size: 25px; }
h3 { font-size: 17px; line-height: 1.4; }
h1[tabindex='-1']:focus, h2[tabindex='-1']:focus { outline: none; }
svg { width: 21px; height: 21px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
[hidden], .sprite { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.frame { width: min(1120px, calc(100% - 56px)); margin-inline: auto; }
.inset { width: min(1010px, calc(100% - 92px)); margin-inline: auto; }
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(247,245,236,.97); border-bottom: 1px solid #e8e7da; }
.topbar-inner { height: 79px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.brand { display: block; width: 133px; flex: none; }
.brand img { width: 100%; height: auto; }
.topbar nav { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 650; }
.topbar nav a { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
.topbar nav .nav-current { color: var(--green); }
.topbar nav .nav-secondary { color: var(--muted); }

.hero { position: relative; isolation: isolate; margin-top: 16px; min-height: 360px; display: flex; align-items: center; border-radius: 24px; overflow: hidden; background: #254032; color: #fcf9ee; }
.hero-picture, .hero-picture img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-picture img { object-fit: cover; object-position: 50% 61%; }
.hero::after { position: absolute; inset: 0; content: ''; z-index: -1; background: linear-gradient(90deg,rgba(16,34,25,.83),rgba(19,40,28,.46) 38%,rgba(21,40,29,.02) 76%),linear-gradient(0deg,rgba(20,36,25,.34),transparent 46%); }
.hero-inner { padding: 38px 62px 74px; }
.hero-location { display: flex; gap: 6px; align-items: center; color: #f2e6c2; font-size: 13px; font-weight: 650; letter-spacing: .18em; }
.hero-location svg { width: 17px; height: 17px; }
.hero h1 { color: inherit; margin: 13px 0 13px; font-size: clamp(51px,6vw,78px); letter-spacing: .09em; line-height: 1.1; font-weight: 760; }
.hero p { color: #f1efde; font-size: clamp(14px,2vw,18px); letter-spacing: .11em; }
.hero-caption { position: absolute; right: 26px; bottom: 55px; font-size: 11px; color: #fff9e9; background: rgba(19,34,25,.69); border-radius: 4px; padding: 2px 6px; }

.query-panel { position: relative; margin-top: -37px; background: var(--card); border: 1px solid #e9e5d4; border-radius: var(--radius); box-shadow: 0 12px 34px #2a3c2210; padding: 24px 28px 18px; }
.section-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tag { display: inline-flex; align-items: center; width: fit-content; flex: none; border-radius: 5px; padding: 3px 8px; color: var(--gold); background: var(--gold-bg); font-size: 12px; font-weight: 650; white-space: nowrap; }
.query-desc { margin: 7px 0 16px; color: var(--muted); font-size: 14px; }
.search-row { display: grid; grid-template-columns: minmax(0,1fr) 111px 98px; gap: 9px; }
.input-shell { display: flex; align-items: center; gap: 10px; min-width: 0; height: 49px; padding: 0 13px; background: #faf9f2; border-radius: 9px; border: 1px solid #d9ddcd; color: var(--muted); }
.input-shell:focus-within { border-color: var(--green); outline: 2px solid #8a612d; outline-offset: 2px; }
.input-shell:has(input[aria-invalid="true"]) { border-color: #a94431; }
.input-shell input { flex: 1; min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; outline: none; color: var(--deep); background: transparent; font-size: 16px; }
.input-shell input::placeholder { color: #626b5d; }
.btn { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid transparent; border-radius: 9px; font-weight: 650; white-space: nowrap; transition: background .16s; }
.primary { color: #fffdf5; background: var(--green); }
.primary:hover { background: #325941; }
.secondary, .scan-button { color: var(--green); background: #eff2e5; border-color: #dce2cd; }
.secondary:hover, .scan-button:hover { background: #e5ebd8; }
.error { font-size: 13px; color: #9c3d2c; margin-top: 7px; }
.example { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 11px; margin-top: 5px; color: var(--muted); font-size: 13px; }
.example-code { border: 0; background: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0; color: var(--green); font-weight: 700; }
.example-code code, .code { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; }
.example-code:hover { text-decoration: underline; text-underline-offset: 4px; }
.example-code svg, .text-link svg { width: 17px; height: 17px; }

.chain { margin-top: 33px; }
.section-note { color: var(--muted); font-size: 13px; }
.stage-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; margin-top: 15px; }
.stage-btn { padding: 13px 4px 12px; min-height: 100px; display: grid; justify-items: center; align-content: center; gap: 5px; color: var(--green); font-weight: 650; background: #fcfbf4; border: 1px solid #e6e6d9; border-radius: 13px; }
.stage-btn:hover, .stage-btn[aria-expanded="true"] { background: #ecf1e1; border-color: #b8c7a7; }
.icon-tile { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 11px; color: var(--green); background: var(--soft-green); }
.icon-tile svg { width: 22px; height: 22px; }
.stage-note { margin-top: 10px; padding: 12px 14px; background: #eef1e3; border-radius: 10px; font-size: 14px; }
.stage-note strong { color: var(--green); margin-right: 8px; }

.sample { margin-top: 31px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.sample-photo { position: relative; min-height: 210px; }
.sample-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.sample-inner { padding: 22px 28px; }
.sample-inner h2 { margin-top: 6px; }
.sample-inner p { margin: 6px 0; color: var(--muted); font-size: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 0; background: transparent; min-height: 44px; color: var(--green); font-weight: 700; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.result { max-width: 1010px; margin-top: 20px; }
.result-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.result-card { overflow: hidden; display: grid; grid-template-columns: 34% minmax(0,1fr); border-radius: var(--radius); background: #e8eddf; border: 1px solid #dce4d4; }
.result-photo { position: relative; min-height: 173px; }
.result-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.result-photo small { position: absolute; bottom: 8px; right: 8px; padding: 1px 5px; border-radius: 4px; background: #242f21d9; color: #fff9ef; }
.result-headline { padding: 23px 28px; }
.result-headline .result-kicker { color: var(--green); font-size: 13px; font-weight: 680; }
.result h1 { font-size: clamp(25px,5vw,40px); margin: 4px 0 10px; }
.result-headline .code { color: #445749; overflow-wrap: anywhere; }
.result-notice { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 11px 13px; border: 1px solid #ebdfc7; background: #f5eddb; border-radius: 9px; color: #614a2a; font-size: 13px; }
.result-notice svg { width: 18px; height: 18px; margin-top: 1px; }
.result-nav { position: sticky; top: 79px; z-index: 3; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; padding: 12px 0; background: var(--paper); }
.result-nav a { padding: 8px 3px; min-height: 44px; display: grid; place-items: center; align-content: center; color: #435444; font-weight: 650; text-align: center; line-height: 1.35; border: 1px solid var(--line); background: var(--card); border-radius: 8px; }
.result-nav a[aria-current="location"] { color: #fffdf4; background: var(--green); border-color: var(--green); }
.result-nav a:not([aria-current]):hover { border-color: #a9ba9d; }
.detail-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 25px; }
.detail-title { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.detail-title h2 { font-size: 24px; }
.detail-subtitle { color: var(--muted); margin: 6px 0 15px; font-size: 14px; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 0; }
.detail-list div { display: grid; grid-template-columns: minmax(82px, 34%) minmax(0,1fr); gap: 8px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 14px; }
.detail-list dd { margin: 0; font-weight: 640; overflow-wrap: anywhere; }
.section-block { margin-top: 25px; }
.section-block h3 { margin-bottom: 10px; }
.detail-list.small { grid-template-columns: 1fr; }
.record { border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; background: #faf9f2; }
.record summary { list-style: none; display: flex; align-items: center; min-height: 48px; gap: 10px; padding: 8px 12px; font-weight: 650; color: var(--deep); }
.record summary::-webkit-details-marker { display: none; }
.record summary .chevron { margin-left: auto; width: 16px; height: 16px; }
.record[open] summary .chevron { transform: rotate(90deg); }
.record summary small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: auto; text-align: right; }
.record summary small + .chevron { margin-left: 0; }
.record-icon { width: 19px; height: 19px; color: var(--green); }
.record-body { padding: 0 14px 13px; color: #495847; font-size: 14px; }
.record-body p { margin: 0 0 6px; }
.record-body .text-link { margin: 3px 0 -7px; }
.record-body .detail-list div { padding: 6px 0; }
.origin-photo { margin: 0 0 16px; background: #e9ecdf; border-radius: 11px; overflow: hidden; }
.origin-photo img { width: 100%; height: clamp(140px,36vw,265px); object-fit: cover; object-position: 50% 62%; }
.origin-photo figcaption { font-size: 12px; padding: 4px 9px; color: var(--muted); }
.missing { color: var(--gold); font-size: 12px; font-weight: 650; background: var(--gold-bg); border-radius: 5px; padding: 3px 7px; width: fit-content; }
.status-grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.status-grid th, .status-grid td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.status-grid th { background: #eef1e6; color: var(--deep); }
.status-grid td:last-child { color: #694c23; }
.end-links { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-top: 18px; }
.footer { margin-top: 34px; border-top: 1px solid #e3e4d7; display: flex; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 19px 0 max(21px,env(safe-area-inset-bottom)); color: #5b6557; font-size: 12px; }

dialog { width: min(460px,calc(100% - 32px)); padding: 20px; border: 1px solid var(--line); border-radius: 18px; color: var(--text); background: var(--card); box-shadow: 0 20px 60px #12271965; }
dialog::backdrop { background: #172b21aa; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dialog-header h2 { font-size: 23px; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 9px; background: #eff2e5; color: var(--green); }
dialog p { margin: 5px 0 12px; font-size: 14px; color: var(--muted); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.scan-view { position: relative; overflow: hidden; background: #182e23; border-radius: 11px; margin-bottom: 12px; }
.scan-view video { display: block; width: 100%; max-height: 245px; }
.scan-view span { position: absolute; inset: 14% 24%; border: 2px solid #fff9e9; border-radius: 12px; pointer-events: none; }
.scan-status:not(:empty) { padding: 8px 10px; background: #eff2e5; border-radius: 7px; }
.demo-qr { border-top: 1px solid var(--line); margin-top: 11px; }
.demo-qr summary { min-height: 44px; padding-top: 11px; color: var(--green); font-weight: 650; }
.demo-qr img { padding: 4px; background: white; border: 1px solid var(--line); border-radius: 9px; }

@media (max-width: 760px) {
  .frame { width: calc(100% - 36px); }
  .inset { width: calc(100% - 46px); }
  .hero-inner { padding-left: 35px; }
  .result-headline { padding-inline: 17px; }
  .detail-card { padding: 17px; }
  .detail-list { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  html { scroll-padding-top: 67px; }
  .frame, .inset { width: calc(100% - 32px); }
  .topbar-inner { height: 66px; }
  .topbar nav { gap: 13px; font-size: 13px; }
  .brand { width: 112px; }
  .hero { width: 100%; margin: 0; border-radius: 0; min-height: 320px; }
  .hero-picture img { object-position: 59% 55%; }
  .hero::after { background: linear-gradient(90deg,rgba(16,34,25,.76),rgba(19,40,28,.34) 52%,rgba(21,40,29,.04) 92%),linear-gradient(0deg,rgba(20,36,25,.30),transparent 46%); }
  .hero-inner { padding: 16px 22px 78px; }
  .hero h1 { font-size: clamp(42px,12vw,58px); }
  .hero-caption { bottom: 45px; right: 12px; }
  .query-panel { margin-top: -32px; padding: 16px 14px 10px; }
  h2 { font-size: 22px; }
  .query-desc { font-size: 13px; margin-bottom: 12px; }
  .search-row { grid-template-columns: minmax(0,1fr) 56px 48px; gap: 6px; }
  .input-shell { gap: 5px; padding-inline: 8px; }
  .input-shell svg { width: 17px; height: 17px; }
  .input-shell input::placeholder { font-size: 13px; }
  .search-row .btn { padding: 0; }
  .scan-button { flex-direction: column; gap: 0; font-size: 10px; }
  .scan-button svg { width: 20px; height: 20px; }
  .chain { margin-top: 25px; }
  .stage-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 11px; }
  .stage-btn { min-height: 82px; padding: 8px 4px; font-size: 14px; }
  .icon-tile { width: 36px; height: 36px; }
  .sample { margin-top: 22px; grid-template-columns: minmax(100px,37%) minmax(0,1fr); }
  .sample-photo { min-height: 0; }
  .sample-inner { padding: 12px 11px 7px; }
  .sample-inner h2 { font-size: 19px; }
  .sample-inner p { font-size: 13px; }
  .result { margin-top: 7px; }
  .result-card { grid-template-columns: minmax(95px,33%) minmax(0,1fr); border-radius: 13px; }
  .result-photo { min-height: 0; }
  .result-headline { padding: 12px 9px 13px 12px; }
  .result h1 { font-size: clamp(19px,5.8vw,27px); }
  .result-headline .code { font-size: 12px; }
  .result-nav { top: 66px; gap: 4px; grid-template-columns: repeat(3,minmax(0,1fr)) minmax(0,1.23fr) minmax(0,1fr); }
  .result-nav a { font-size: 12px; }
  .detail-card { border-radius: 13px; padding: 14px; }
  .detail-title h2 { font-size: 21px; }
  .footer { margin-top: 25px; }
}

@media (max-width: 350px) {
  .frame, .inset { width: calc(100% - 22px); }
  .hero { width: 100%; }
  .input-shell > svg { display: none; }
  .query-panel { padding-inline: 11px; }
  .result-nav { grid-template-columns: repeat(3,minmax(0,1fr)) minmax(0,1.28fr) minmax(0,1fr); }
  .result-nav a { font-size: 11px; padding-inline: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
.admin-entry { text-decoration: underline; text-underline-offset: 4px; }
