* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #30363a;
  --soft-gray: #f0f0f0;
  --brand-green: #56c1a2;
  --warning-red: #a63232;
  --text-caption: 9px;
  --text-small: 11px;
  --text-control: 12px;
  --text-body: 14px;
  --text-input: 16px;
  --icon-detail: 14px;
  --icon-search: 16px;
  --icon-phone: 13px;
}
html, body { width: 100%; min-height: 100%; margin: 0; background: var(--soft-gray); color: var(--ink); font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif; }
body { min-height: 100svh; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.page-shell { position: relative; display: flex; width: 100%; min-height: 100svh; flex-direction: column; overflow: hidden; background: var(--soft-gray); }
.page-shell [data-module-key][hidden] { display: none !important; }
.hero { position: relative; flex: 0 0 154px; height: 154px; overflow: hidden; background: #191512 url("assets/header-background.jpg") center 43% / cover no-repeat; color: var(--paper); }
.hero::after { position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgb(0 0 0 / 49%), transparent 72%); content: ""; pointer-events: none; }
.hero-copy, .brand-logo, .hero-caption, .demo-badge { position: absolute; z-index: 1; }
.hero-copy { top: 30px; left: 17px; }
.system-name { margin: 0 0 5px; color: rgb(255 255 255 / 88%); font-size: 11px; font-weight: 600; letter-spacing: .2px; }
.system-name[hidden] { display: none; }
.hero-tagline, .hero-subtitle { margin: 0; font-size: var(--text-body); line-height: 1.45; }
.hero-tagline { font-weight: 700; }
.hero-subtitle { margin-top: 1px; font-size: 11px; letter-spacing: .25px; }
.brand-logo { bottom: 11px; left: 18px; width: 122px; height: auto; object-fit: contain; }
.hero-caption { right: 18px; bottom: 17px; margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .6px; }
.demo-badge { position: fixed; top: calc(8px + env(safe-area-inset-top)); right: 9px; z-index: 5; padding: 5px 8px; border: 1px solid rgb(255 255 255 / 75%); border-radius: 4px; background: var(--warning-red); color: var(--paper); font-size: 10px; font-weight: 700; letter-spacing: .3px; box-shadow: 0 1px 5px rgb(0 0 0 / 28%); }
.demo-badge[hidden] { display: none; }
.verification-area { position: relative; z-index: 1; flex: 0 0 auto; margin-top: 9px; background: var(--paper); }
.search-box { display: flex; height: 45px; align-items: center; gap: 8px; margin: 18px 14px 0; padding: 0 6px 0 12px; border-radius: 7px; background: #f1f1f1; }
.search-box input { min-width: 0; height: 100%; flex: 1; border: 0; outline: 0; background: transparent; color: #555; font-size: var(--text-input); }
.search-box input::placeholder { color: #b8b8b8; font-size: 13px; }
.search-button { display: grid; width: 37px; height: 37px; flex: 0 0 37px; place-items: center; border: 0; border-radius: 50%; background: var(--brand-green); color: var(--paper); cursor: pointer; }
.search-button svg { width: var(--icon-search); height: var(--icon-search); fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
.scan-button { position: relative; display: flex; width: 100%; height: 176px; align-items: center; justify-content: center; margin-top: 0; padding: 0; border: 0; background: var(--paper); cursor: pointer; }
.page-shell.has-result .scan-button { display: none; }
.scan-button img { display: block; width: min(210px, 100%); height: 161px; object-fit: contain; }
.scan-label { position: absolute; top: 128px; left: 50%; width: 126px; height: 35px; transform: translateX(-50%); border: 1px solid #78cdb3; border-radius: 5px; background: linear-gradient(180deg, #effbf7, #b9eadb); color: #276c58; font-size: 11px; font-weight: 700; letter-spacing: 4px; line-height: 33px; text-align: center; }
.result-panel { display: flex; min-height: 171px; flex-direction: column; align-items: center; padding: 8px 14px 4px; background: #f7f7f7; text-align: center; }
.result-mark { display: block; width: 84px; height: 84px; object-fit: contain; }
.result-title { margin: 3px 0 0; color: #123f40; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 14px; line-height: 1.5; font-weight: 700; letter-spacing: .1px; }
.result-disclaimer { font-size: 11px; }
.result-meta { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; text-align: left; }
.result-code { min-width: 0; margin: 0; color: #222; font-size: var(--text-body); line-height: 1.5; overflow-wrap: anywhere; }
.result-disclaimer { margin: 1px 0 0; color: #8a302f; font-size: 10px; line-height: 1.3; }
.product-details { display: block; width: 100%; padding: 0 20px; background: var(--paper); }
.product-details[hidden] { display: none; }
.detail-row { display: flex; min-width: 0; height: 48px; align-items: center; gap: 9px; border-bottom: 1px solid #ededed; white-space: nowrap; }
.detail-row:last-child { border-bottom: 0; }
.detail-icon { display: grid; width: var(--icon-detail); height: var(--icon-detail); flex: 0 0 var(--icon-detail); place-items: center; border-radius: 50%; color: white; font-size: var(--text-caption); line-height: 1; }
.detail-icon-name { background: #87dd88; }
.detail-icon-code { background: #a892e9; }
.detail-label, .detail-value { flex: 0 0 auto; margin: 0; color: #242424; font-size: var(--text-body); line-height: 1.5; }
.detail-value { color: #252525; overflow: hidden; text-overflow: clip; }
.continue-button { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #19b97d; border-radius: 18px; background: transparent; color: #00a96f; font-size: var(--text-control); line-height: 1.2; cursor: pointer; }
.result-panel[hidden] { display: none; }
.empty-region { min-height: 90px; flex: 1 0 0; background: var(--soft-gray); }
.service-button { position: fixed; right: 12px; bottom: calc(55px + env(safe-area-inset-bottom)); z-index: 3; display: flex; width: 56px; flex-direction: column; align-items: center; padding: 0; border: 0; background: transparent; pointer-events: none; user-select: none; }
.service-button img { display: block; width: 47px; height: 47px; object-fit: contain; }
.service-button span { margin-top: -2px; color: #75817c; font-size: var(--text-caption); }
.page-footer { display: flex; min-height: calc(49px + env(safe-area-inset-bottom)); flex: 0 0 auto; align-items: center; justify-content: center; gap: 4px; padding: 7px 10px env(safe-area-inset-bottom); border-top: 1px solid #e7eaeb; border-radius: 0 0 7px 7px; background: #f8f9fa; color: #15374d; font-size: var(--text-body); white-space: nowrap; }
.page-footer a { color: inherit; text-decoration: none; }
.page-footer svg { width: var(--icon-phone); height: var(--icon-phone); flex: 0 0 var(--icon-phone); fill: currentColor; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.scan-dialog { width: min(340px, calc(100vw - 36px)); padding: 18px; border: 0; border-radius: 8px; background: var(--paper); color: var(--ink); box-shadow: 0 14px 44px rgb(0 0 0 / 24%); }
.scan-dialog::backdrop { background: rgb(0 0 0 / 48%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-head h2 { margin: 0; font-size: 17px; }
.dialog-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--soft-gray); color: var(--ink); font-size: 22px; cursor: pointer; }
.dialog-notice, .scan-status { font-size: 13px; line-height: 1.6; }
.dialog-notice { color: var(--warning-red); }
#camera-preview { width: 100%; max-height: 280px; border-radius: 6px; background: #222; object-fit: cover; }
.scan-status { min-height: 42px; color: #646c70; }
.dialog-actions { display: flex; gap: 9px; }
.dialog-primary, .dialog-secondary { flex: 1; min-height: 40px; border: 0; border-radius: 5px; cursor: pointer; }
.dialog-primary { background: var(--brand-green); color: var(--paper); }
.dialog-secondary { background: var(--soft-gray); color: var(--ink); }
@media (min-width: 600px) {
  body { display: flex; justify-content: center; background: #e9e9e9; }
  .page-shell { width: min(100%, 430px); min-height: 100svh; box-shadow: 0 0 24px rgb(0 0 0 / 8%); }
}
@media (max-height: 700px) {
  .hero { flex-basis: 138px; height: 138px; }
  .hero-copy { top: 38px; }
  .scan-button { height: 154px; }
  .scan-label { top: 110px; }
  .result-panel { min-height: 165px; padding-top: 15px; }
}
@media (max-width: 360px) {
  .detail-row { gap: 6px; }
  .detail-label, .detail-value { font-size: 11px; }
  .page-footer { font-size: 11px; }
}
