:root {
  color-scheme: dark;
  --forest-950: #07130f;
  --forest-900: #0c201a;
  --forest-800: #12342a;
  --forest-700: #1c4a3b;
  --charcoal: #111715;
  --panel: #16211d;
  --panel-2: #1b2924;
  --line: rgba(222, 239, 232, .14);
  --cyan: #47f5c6;
  --cyan-soft: #9bffe4;
  --gold: #d9b978;
  --gold-soft: #ead7aa;
  --white: #f6faf8;
  --muted: #aebdb7;
  --danger: #ff8d84;
  --warning: #f0ca78;
  --success: #69e4b3;
  --shadow: 0 18px 44px rgba(0, 0, 0, .28);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--forest-950); }
body { min-height: 100%; margin: 0; background: var(--forest-950); color: var(--white); letter-spacing: 0; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
img { display: block; max-width: 100%; }
a { color: inherit; }

.app-shell { min-height: 100dvh; background: var(--forest-950); }
.page { min-height: 100dvh; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.content { width: min(100% - 32px, 960px); margin: 0 auto; }
.content-narrow { width: min(100% - 32px, 560px); margin: 0 auto; }
.topbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: rgba(7, 19, 15, .94); position: sticky; top: 0; z-index: 20; }
.topbar-title { min-width: 0; }
.topbar-title strong { display: block; font-size: 17px; font-weight: 650; }
.topbar-title span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.icon-button { width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--white); font-size: 22px; display: grid; place-items: center; }
.icon-button:hover { border-color: rgba(71, 245, 198, .45); }
.primary-button, .secondary-button, .danger-button { min-height: 50px; border-radius: 6px; padding: 0 18px; font-weight: 650; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.primary-button { background: var(--cyan); color: #062118; box-shadow: 0 8px 28px rgba(71, 245, 198, .14); }
.primary-button:hover { background: var(--cyan-soft); }
.secondary-button { background: var(--panel-2); color: var(--white); border-color: var(--line); }
.danger-button { background: rgba(255, 141, 132, .1); color: var(--danger); border-color: rgba(255, 141, 132, .35); }
.wide-button { width: 100%; }
.button-row { display: flex; gap: 10px; }
.button-row > * { flex: 1; }
.eyebrow { color: var(--cyan); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.hidden { display: none !important; }

.home-viewport { min-height: 100svh; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: var(--forest-950); }
.hero-carousel { min-height: 520px; position: relative; isolation: isolate; overflow: hidden; background: #171b18; }
.hero-slides, .hero-slide { position: absolute; inset: 0; }
.hero-slide { opacity: 0; transition: opacity 700ms ease; }
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,12,9,.24) 0%, rgba(4,12,9,.42) 42%, rgba(4,12,9,.94) 100%); }
.hero-content { position: relative; z-index: 2; width: min(100% - 32px, 960px); height: 100%; min-height: inherit; margin: 0 auto; padding: 24px 0 28px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; }
.brand-lockup { display: flex; align-items: center; gap: 12px; margin: 0 0 auto; }
.brand-logo { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255,255,255,.28); }
.brand-lockup span { display: block; color: var(--gold-soft); font-size: 13px; margin-top: 3px; }
.hero-copy-block { width: min(100%, 580px); animation: hero-copy-in 420ms ease both; }
.hero-copy-block h1 { margin: 7px 0 0; max-width: 560px; font-size: clamp(30px, 5vw, 46px); line-height: 1.18; font-weight: 700; }
.hero-copy { width: min(100%, 560px); margin: 12px 0 20px; color: #dce7e2; line-height: 1.65; font-size: 15px; }
.hero-carousel .primary-button { width: min(100%, 360px); }
.resume-button { margin-top: 8px; width: min(100%, 360px); }
.hero-dots { position: absolute; z-index: 4; right: 16px; top: 50%; display: grid; gap: 9px; transform: translateY(-50%); }
.hero-dot { width: 8px; height: 24px; padding: 0; border: 0; border-radius: 4px; background: rgba(255,255,255,.38); transition: height 180ms ease, background 180ms ease; }
.hero-dot.active { height: 38px; background: var(--cyan); }
.benefit-band { padding: 10px 0 max(10px, env(safe-area-inset-bottom)); background: var(--forest-900); border-top: 1px solid var(--line); }
.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.benefit { min-height: 76px; background: var(--forest-900); padding: 12px 14px; }
.benefit-index { color: var(--gold); font-size: 12px; }
.benefit strong { display: block; margin-top: 8px; font-size: 14px; }
.product-band { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 420px; background: #f1f0eb; color: #15221e; }
.product-band img { width: 100%; height: 100%; object-fit: cover; }
.product-copy { padding: clamp(30px, 6vw, 72px); display: flex; flex-direction: column; justify-content: center; }
.product-copy h2 { margin: 9px 0 16px; font-size: 30px; }
.product-copy p { color: #4d5b56; line-height: 1.8; margin: 0; max-width: 520px; }
@keyframes hero-copy-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.form-page { background: var(--forest-950); }
.form-section { padding: 28px 0 104px; }
.section-heading { margin: 0 0 8px; font-size: 24px; }
.section-copy { margin: 0 0 26px; color: var(--muted); line-height: 1.65; }
.field { display: grid; gap: 8px; margin-bottom: 24px; }
.field label { font-size: 14px; color: #dce8e3; }
.text-input { width: 100%; height: 52px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line); color: var(--white); background: var(--panel); outline: none; }
.text-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(71,245,198,.1); }
.requirements { margin: 8px 0 24px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.requirements li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); color: #d5e0dc; line-height: 1.55; }
.requirements b { color: var(--gold); font-weight: 650; width: 22px; flex: 0 0 22px; }
.ready-check { display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 22px 0; cursor: pointer; }
.ready-check input { width: 22px; height: 22px; accent-color: var(--cyan); }
.bottom-action { position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; padding: 12px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: rgba(7,19,15,.95); border-top: 1px solid var(--line); }
.bottom-action > .wide-button { display: flex; width: 100%; max-width: 560px; margin: 0 auto; }

.guide-stage { height: min(52dvh, 510px); min-height: 340px; position: relative; overflow: hidden; border: 1px solid var(--line); background: #dce8e0; margin: 18px 0; }
.guide-stage::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(18,52,42,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(18,52,42,.06) 1px, transparent 1px); background-size: 28px 28px; }
.guide-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity 100ms ease; }
.guide-caption { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 12px; min-height: 44px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px 12px; color: var(--white); background: rgba(7,19,15,.86); border: 1px solid rgba(255,255,255,.16); }
.guide-static { display: grid; grid-template-columns: 1fr 1fr; height: 100%; }
.guide-static img { width: 100%; height: 100%; object-fit: contain; }
.guide-steps { display: grid; gap: 10px; margin-bottom: 96px; }
.guide-step { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; min-height: 54px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.guide-step span { width: 30px; height: 30px; display: grid; place-items: center; background: var(--panel); color: var(--gold); border: 1px solid var(--line); }

.camera-page { background: #050a08; }
.camera-stage { height: calc(100dvh - 62px - 126px); min-height: 420px; position: relative; overflow: hidden; background: #020403; }
.camera-video, .camera-photo { width: 100%; height: 100%; object-fit: cover; }
.camera-video.mirrored { transform: scaleX(-1); }
.camera-overlay { position: absolute; inset: 0; pointer-events: none; }
.camera-guide-image { position: absolute; left: 50%; top: 8%; height: 86%; width: auto; max-width: 88%; transform: translateX(-50%); object-fit: contain; opacity: .72; filter: drop-shadow(0 0 8px rgba(71,245,198,.34)); }
.camera-guide-image.side { left: 52%; height: 87%; }
.a4-corner-guide { display: none; }
.camera-tip { position: absolute; top: 14px; left: 14px; right: 14px; min-height: 48px; display: flex; align-items: center; justify-content: center; padding: 9px 12px; text-align: center; background: rgba(7,19,15,.86); border: 1px solid rgba(255,255,255,.18); font-size: 14px; line-height: 1.5; }
.camera-warning { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 10px 12px; color: var(--warning); background: rgba(12,32,26,.92); border: 1px solid rgba(240,202,120,.35); font-size: 13px; }
.camera-controls { height: 126px; display: grid; grid-template-columns: 56px 1fr 56px; gap: 20px; align-items: center; padding: 14px 22px max(14px, env(safe-area-inset-bottom)); background: #07100d; }
.shutter { justify-self: center; width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--white); background: var(--cyan); box-shadow: inset 0 0 0 5px #07100d; }
.capture-fallback { width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--white); font-size: 20px; }
.review-actions { position: absolute; z-index: 3; left: 14px; right: 14px; bottom: 16px; display: flex; gap: 10px; }
.review-actions button { flex: 1; }

.scan-page { min-height: 100dvh; position: relative; overflow: hidden; background: #07130f; }
.scan-grid { position: absolute; inset: 0; opacity: .23; background-image: linear-gradient(rgba(71,245,198,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(71,245,198,.18) 1px, transparent 1px); background-size: 38px 38px; }
.scan-content { position: relative; z-index: 2; width: min(100% - 32px, 620px); margin: 0 auto; padding: 56px 0 40px; text-align: center; }
.scan-kicker { color: var(--cyan); font-size: 13px; }
.scan-title { margin: 8px 0 6px; font-size: 25px; }
.scan-subtitle { color: var(--muted); min-height: 24px; }
.scanner { position: relative; width: min(78vw, 360px); aspect-ratio: 3 / 4; margin: 28px auto; border: 1px solid rgba(71,245,198,.35); overflow: hidden; background: rgba(12,32,26,.65); }
.scanner-person-guide { position: absolute; inset: 3% 10% 0; width: 80%; height: 97%; margin: auto; object-fit: contain; opacity: .7; filter: drop-shadow(0 0 8px rgba(71,245,198,.28)); }
.scanner-line { position: absolute; z-index: 3; left: 0; right: 0; height: 2px; top: 12%; background: var(--cyan); box-shadow: 0 0 14px 4px rgba(71,245,198,.6); animation: scan-line 2.4s ease-in-out infinite alternate; }
.measure-line { position: absolute; height: 1px; background: var(--gold); box-shadow: 0 0 10px rgba(217,185,120,.6); opacity: .9; }
.measure-line.shoulder { left: 18%; right: 18%; top: 33%; }
.measure-line.neck { width: 18%; top: 22%; left: 53%; transform: rotate(76deg); }
.measure-node { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px rgba(217,185,120,.8); animation: pulse 1.4s ease-in-out infinite; }
.node-left { left: 17%; top: calc(33% - 4px); }.node-right { right: 17%; top: calc(33% - 4px); }.node-neck { left: 61%; top: 28%; }
.scan-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.scan-step { padding: 11px 6px; color: #71827b; background: rgba(7,19,15,.9); font-size: 12px; }
.scan-step.active { color: var(--cyan); }
.scan-error { padding: 16px; text-align: left; border: 1px solid rgba(255,141,132,.35); color: #ffd4d0; background: rgba(255,141,132,.08); margin-top: 18px; }
.scan-error strong { display: block; margin-bottom: 7px; }
.scan-error span { display: block; color: #e8c9c6; font-size: 14px; line-height: 1.65; }
@keyframes scan-line { from { top: 13%; } to { top: 83%; } }
@keyframes pulse { 0%,100% { transform: scale(.8); opacity: .55; } 50% { transform: scale(1.25); opacity: 1; } }

.result-page { min-height: 100dvh; background: #07130f; }
.result-hero { position: relative; overflow: hidden; padding: 30px 0 24px; border-bottom: 1px solid var(--line); }
.result-heading { margin: 6px 0 4px; font-size: 25px; }
.result-time { color: var(--muted); font-size: 13px; }
.body-map { width: min(84vw, 420px); height: 400px; margin: 18px auto 0; position: relative; border-left: 1px solid rgba(71,245,198,.15); border-right: 1px solid rgba(71,245,198,.15); background-image: linear-gradient(rgba(71,245,198,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(71,245,198,.08) 1px, transparent 1px); background-size: 34px 34px; }
.body-guide-image { position: absolute; inset: 1% 12% 0; width: 76%; height: 99%; object-fit: contain; opacity: .76; filter: drop-shadow(0 0 8px rgba(71,245,198,.25)); }
.result-line { position: absolute; height: 1px; background: var(--gold); }
.result-line::before,.result-line::after { content:""; position:absolute; top:-4px; width:8px; height:8px; border-radius:50%; background:var(--gold); }
.result-line::before{left:-4px}.result-line::after{right:-4px}
.result-line.outer { top: 34%; left: 12%; width: 76%; }
.result-line.acromion { top: 39%; left: 21%; width: 58%; background: var(--cyan); }
.result-line.acromion::before,.result-line.acromion::after { background: var(--cyan); }
.result-value { position:absolute; padding:5px 8px; background:#102b24; border:1px solid var(--line); color:var(--white); font-size:12px; white-space:nowrap; }
.value-outer { top: 26%; left: 50%; transform: translateX(-50%); }
.value-acromion { top: 41%; left: 50%; transform: translateX(-50%); }
.value-neck { top: 22%; right: 2%; }.value-head { top: 7%; left: 2%; }
.result-band { padding: 26px 0 42px; }
.result-band h2 { margin: 0 0 16px; font-size: 18px; }
.measurement-grid { display:grid; grid-template-columns:repeat(2,1fr); border:1px solid var(--line); background:var(--line); gap:1px; }
.measurement-item { min-height:112px; background:var(--panel); padding:17px; }
.measurement-item span { color:var(--muted); font-size:13px; }
.measurement-item strong { display:block; margin-top:12px; font-size:27px; font-weight:650; color:var(--cyan-soft); }
.measurement-item small { color:var(--gold); }
.quality-list { margin:22px 0 0; padding:0; list-style:none; }
.quality-list li { padding:11px 0; border-bottom:1px solid var(--line); color:var(--muted); font-size:13px; line-height:1.55; }

.admin-page { min-height:100dvh; background:#0b1210; color:var(--white); }
.admin-login { min-height:100dvh; display:grid; place-items:center; padding:24px; }
.login-panel { width:min(100%,400px); border:1px solid var(--line); background:var(--panel); padding:26px; box-shadow:var(--shadow); }
.login-brand { display:flex; align-items:center; gap:12px; margin-bottom:28px; }
.login-brand img { width:54px; height:54px; object-fit:cover; border-radius:7px; }
.login-brand strong { display:block; font-size:19px; }.login-brand span { color:var(--muted); font-size:12px; }
.login-panel .field { margin-bottom:16px; }
.admin-error { min-height:20px; color:var(--danger); font-size:13px; margin:8px 0; }
.admin-shell { width:min(100% - 28px,1180px); margin:0 auto; padding:24px 0 50px; }
.admin-header { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:24px; }
.admin-heading h1 { margin:0; font-size:24px; }.admin-heading p { margin:5px 0 0; color:var(--muted); font-size:13px; }
.admin-actions { display:flex; gap:8px; }
.certificate-warning { margin-bottom:18px; border:1px solid rgba(240,202,120,.4); padding:12px 14px; color:var(--warning); background:rgba(240,202,120,.06); }
.stats-row { display:grid; grid-template-columns:repeat(4,1fr); border:1px solid var(--line); background:var(--line); gap:1px; margin-bottom:20px; }
.stat { background:var(--panel); padding:14px; min-height:78px; }.stat span{color:var(--muted);font-size:12px}.stat strong{display:block;margin-top:7px;font-size:23px}
.admin-toolbar { display:flex; gap:10px; align-items:center; margin-bottom:12px; }
.admin-toolbar .text-input { max-width:360px; }
.records { border-top:1px solid var(--line); }
.record-row { display:grid; grid-template-columns:minmax(120px,1.2fr) 150px 100px repeat(4,minmax(90px,1fr)) 42px; gap:10px; align-items:center; min-height:64px; padding:9px 8px; border-bottom:1px solid var(--line); }
.record-row.header { min-height:42px; color:var(--muted); font-size:12px; }
.record-row:not(.header):hover { background:rgba(71,245,198,.035); }
.record-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.record-time,.record-value { color:var(--muted); font-size:13px; }
.status { display:inline-flex; min-height:26px; align-items:center; padding:0 8px; border:1px solid var(--line); font-size:12px; width:max-content; }
.status-completed{color:var(--success)}.status-failed{color:var(--danger)}.status-processing,.status-queued{color:var(--warning)}
.pagination { display:flex; justify-content:flex-end; align-items:center; gap:10px; padding-top:18px; color:var(--muted); font-size:13px; }
.pagination button { min-height:36px; min-width:40px; border:1px solid var(--line); background:var(--panel); color:var(--white); }
.detail-backdrop { position:fixed; inset:0; z-index:50; background:rgba(0,0,0,.72); display:flex; justify-content:flex-end; }
.detail-panel { width:min(100%,720px); height:100%; overflow:auto; background:#101916; border-left:1px solid var(--line); padding:22px; }
.detail-header { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; padding-bottom:16px; border-bottom:1px solid var(--line); }
.detail-header h2 { margin:0 0 5px; font-size:22px; }.detail-header p{margin:0;color:var(--muted);font-size:13px}
.photo-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:18px 0; }
.photo-item { background:#050806; border:1px solid var(--line); }.photo-item img{width:100%;height:320px;object-fit:contain}.photo-item span{display:block;padding:8px;color:var(--muted);font-size:12px;border-top:1px solid var(--line)}
.detail-values { display:grid; grid-template-columns:repeat(2,1fr); gap:1px; background:var(--line); border:1px solid var(--line); margin-bottom:18px; }
.detail-value { background:var(--panel);padding:14px}.detail-value span{color:var(--muted);font-size:12px}.detail-value strong{display:block;margin-top:7px;font-size:20px;color:var(--cyan-soft)}
.detail-section { border-top:1px solid var(--line); padding:16px 0; }.detail-section h3{margin:0 0 10px;font-size:15px}.detail-section p{margin:0;color:var(--muted);line-height:1.6;font-size:13px}
.empty-state { padding:56px 16px; text-align:center; color:var(--muted); border-bottom:1px solid var(--line); }

.toast { position:fixed; z-index:100; left:50%; bottom:max(24px,env(safe-area-inset-bottom)); transform:translateX(-50%); width:min(calc(100% - 32px),440px); padding:12px 14px; text-align:center; background:#22332d; border:1px solid var(--line); color:var(--white); box-shadow:var(--shadow); }

@media (max-width: 760px) {
  .hero-carousel { min-height:0; }
  .hero-content { width:calc(100% - 28px); padding:18px 0 22px; }
  .brand-logo { width:52px; height:52px; }
  .brand-lockup span { font-size:11px; }
  .hero-copy-block h1 { font-size:31px; max-width:88%; }
  .hero-copy { max-width:88%; font-size:14px; line-height:1.55; margin-bottom:16px; }
  .hero-dots { right:10px; }
  .benefit-grid { grid-template-columns:repeat(3,1fr); }
  .benefit { min-height:72px; padding:10px 8px; }
  .benefit strong { font-size:12px; line-height:1.35; }
  .product-band { grid-template-columns:1fr; }.product-band img{height:280px}.product-copy{padding:28px 20px 34px}
  .stats-row { grid-template-columns:repeat(2,1fr); }
  .record-row { grid-template-columns:minmax(110px,1fr) 92px 34px; min-height:72px; }
  .record-row.header { display:none; }.record-time{display:none}.record-value{display:none}.record-row .status{justify-self:start}.record-row .icon-button{width:34px;height:34px;min-width:34px;font-size:17px}
  .admin-shell{width:min(100% - 20px,1180px)}.admin-header{align-items:flex-start}.admin-heading p{max-width:230px}.admin-actions .secondary-button{padding:0 10px;min-height:42px}
  .detail-panel{padding:16px}.photo-grid{grid-template-columns:1fr}.photo-item img{height:300px}
}

@media (max-width: 430px) {
  .hero-carousel .primary-button,.resume-button { width:calc(100% - 26px); }
  .hero-copy-block h1 { font-size:28px; }
  .benefit-index { font-size:10px; }
  .benefit strong { font-size:11px; }
  .measurement-grid { grid-template-columns:1fr 1fr; }
  .measurement-item { min-height:104px; padding:14px 12px; }.measurement-item strong{font-size:23px}
  .guide-stage{min-height:320px}.camera-controls{gap:12px;padding-left:14px;padding-right:14px}
  .body-map{height:360px}.detail-values{grid-template-columns:1fr 1fr}
}

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