:root {
  --bg: #f6f5f1; --surface: #ffffff; --surface-2: #eeede7;
  --ink: #24231f; --ink-2: #56544c; --muted: #6b685d;
  --line: #e7e5dc; --line-strong: #d9d6ca;
  --accent: #5f7c61; --accent-deep: #42584a; --accent-soft: #e6ece1; --ok: #4f9d6b; --danger: #b0594b;
  --shadow-sm: 0 1px 2px rgba(36,35,31,0.05), 0 4px 12px rgba(36,35,31,0.05);
  --shadow-md: 0 2px 6px rgba(36,35,31,0.05), 0 16px 40px rgba(36,35,31,0.1);
  --radius: 18px;
  --font-display: 'Space Grotesk','PingFang SC','Microsoft YaHei',system-ui,sans-serif;
  --font-body: 'Inter','PingFang SC','Microsoft YaHei',system-ui,sans-serif;
  --font-mono: 'IBM Plex Mono','SFMono-Regular',Consolas,monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.04; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.garden { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(1100px 640px at 82% -8%, rgba(95,124,97,0.1), transparent 62%), radial-gradient(820px 560px at 2% 16%, rgba(95,124,97,0.07), transparent 60%), radial-gradient(960px 720px at 92% 104%, rgba(95,124,97,0.09), transparent 66%); }
.shell { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px clamp(20px,5vw,72px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand__mark svg { width: 36px; height: 36px; display: block; }
.brand__word { display: flex; flex-direction: column; line-height: 1.15; }
.brand__word strong { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: 0.02em; }
.brand__word small { margin-top: 4px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.22em; color: var(--muted); }
.topbar__meta { display: flex; align-items: center; gap: 22px; }
.back { font-size: 13px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent-deep); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(79,157,107,0.14); }
.main { flex: 1; width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 40px 0 72px; }
.hero { max-width: 760px; margin-bottom: 36px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
.eyebrow__rule { width: 34px; height: 2px; background: var(--accent); border-radius: 1px; }
.hero__title { margin: 0 0 14px; font-family: var(--font-display); font-size: clamp(25px,5vw,40px); font-weight: 700; letter-spacing: 0; line-height: 1.05; }
.hero__dot { color: var(--accent); }
.hero__lead { margin: 0; font-size: 16px; line-height: 1.7; color: var(--ink-2); max-width: 640px; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 820px) { .tools { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel__title { margin: 0; padding: 14px 20px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink-2); text-transform: uppercase; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.panel__body { padding: 20px; }
.field { display: block; margin-bottom: 18px; }
.field__label { display: block; font-size: 13px; color: var(--ink); margin-bottom: 8px; }
.option { margin-bottom: 18px; }
.option:last-child { margin-bottom: 0; }
.option--half { flex: 1; margin-bottom: 0; }
.option__label { display: block; font-size: 13px; color: var(--ink); margin-bottom: 8px; }
.row { display: flex; gap: 14px; margin-bottom: 18px; }
@media (max-width: 520px) { .row { flex-direction: column; } }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.segmented button { padding: 9px 18px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.segmented button.is-active { background: var(--accent); color: #fff; }
.segmented button:not(.is-active):hover { color: var(--accent-deep); }
.field__control { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.field__control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(95,124,97,0.14); }
.field__control input { flex: 1; min-width: 0; border: none; background: none; padding: 11px 14px; font-family: var(--font-mono); font-size: 14px; color: var(--ink); outline: none; }
.field__unit { padding: 0 14px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); border-left: 1px solid var(--line); }
.hint { font-size: 12px; line-height: 1.7; color: var(--muted); border-left: 3px solid var(--line-strong); padding-left: 10px; margin: 10px 0 0; }
.btn { padding: 11px 22px; border-radius: 10px; font-size: 14px; font-weight: 600; background: var(--accent); color: #fff; }
.btn:hover:not(:disabled) { background: var(--accent-deep); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(20px,5vw,72px); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .footer { flex-direction: column; align-items: flex-start; } }

/* ---- 扫码识别特有 ---- */
.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border: 2px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2); cursor: pointer; text-align: center; transition: border-color 0.18s ease, background 0.18s ease; margin-bottom: 18px; }
.drop:hover, .drop:focus-visible, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop svg { width: 30px; height: 30px; color: var(--accent); }
.drop p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.drop__sub { font-size: 11.5px !important; color: var(--muted) !important; }
.camera { position: relative; width: 100%; min-height: 260px; display: grid; place-items: center; border: 2px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2); overflow: hidden; margin-bottom: 14px; }
.camera.is-live { border-style: solid; background: #101010; }
.camera video { width: 100%; max-height: 380px; display: none; object-fit: cover; }
.camera.is-live video { display: block; }
.camera__idle { margin: 0; padding: 20px; font-size: 13px; color: var(--muted); text-align: center; }
.camera.is-live .camera__idle { display: none; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.btn--ghost { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-strong); text-decoration: none; }
.btn--ghost:hover:not(:disabled) { color: var(--accent-deep); border-color: var(--accent); }
.result__empty { margin: 0; font-size: 13px; color: var(--muted); }
.result__text { margin: 0 0 14px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; word-break: break-all; min-height: 44px; }
