:root {
  color-scheme: dark;
  --bg: #070a0d; --panel: #0d1216; --panel-2: #11181d; --line: #273139;
  --text: #f5f7f6; --muted: #8f9da5; --accent: #baff63; --cyan: #70e1d3;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 76% 8%, rgba(67, 114, 98, .16), transparent 26rem), var(--bg); color: var(--text); min-height: 100vh; }
button, select, input { font: inherit; }
button, .file-button, select { -webkit-tap-highlight-color: transparent; }
.topbar { height: 70px; padding: 0 max(24px, calc((100vw - 1240px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { color: inherit; text-decoration: none; display: flex; gap: 12px; align-items: center; }
.brand-logo { width: 106px; height: 40px; object-fit: contain; }
.brand-name { border-left: 1px solid var(--line); padding-left: 12px; }
.brand strong { display: block; font-size: 16px; letter-spacing: .08em; }
.brand small { display: block; color: var(--muted); font-size: 8px; letter-spacing: .16em; margin-top: 2px; }
.api-state { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.api-state i, .live-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #e5aa55; margin-right: 7px; }
.api-state.ready i, .live-dot { background: var(--accent); box-shadow: 0 0 10px rgba(186,255,99,.7); }
main { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.intro { display: grid; grid-template-columns: 1.25fr .75fr; align-items: end; padding: 38px 0 32px; }
.eyebrow { color: var(--accent); font: 700 10px/1.2 ui-monospace, monospace; letter-spacing: .19em; margin: 0 0 14px; }
.intro .eyebrow { grid-column: 1 / -1; }
.intro h1 { font-size: clamp(46px, 6vw, 78px); line-height: .98; letter-spacing: -.06em; margin: 0; font-weight: 650; }
.intro h1 em { color: var(--accent); font-style: normal; }
.intro > p:last-child { color: #a9b2b7; line-height: 1.8; max-width: 420px; margin: 0 0 6px 40px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(360px, .7fr); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--panel); box-shadow: 0 30px 100px rgba(0,0,0,.3); }
.viewer-card { padding: 18px; border-right: 1px solid var(--line); }
.viewer-head, .result-head { min-height: 50px; display: flex; justify-content: space-between; align-items: flex-start; font-size: 12px; color: #b8c2c7; }
.select-wrap select { color: #dfe5e7; background: #151c21; border: 1px solid var(--line); border-radius: 999px; padding: 7px 30px 7px 12px; }
.camera-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 14px; background: radial-gradient(circle, #1c272d, #090c0f 65%); cursor: crosshair; touch-action: none; }
.camera-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px); background-size: 100% 4px; opacity: .3; }
.camera-stage video { width: 100%; height: 100%; object-fit: cover; display: none; }
.camera-stage.active video { display: block; }
.camera-stage.photo-mode video { background: center / cover no-repeat var(--photo); }
.camera-empty { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 9px; color: var(--muted); text-align: center; }
.camera-empty strong { color: #e9edef; font-size: 17px; margin-top: 10px; }
.camera-empty span:last-child { font-size: 12px; }
.lens-icon { width: 74px; height: 74px; border: 1px solid #4a5961; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 18px #10171b, inset 0 0 0 20px #263238; }
.lens-icon::after { content: ""; position: absolute; width: 12px; height: 12px; background: var(--accent); border-radius: 50%; right: 7px; top: 8px; box-shadow: 0 0 14px var(--accent); }
.scan-frame { position: absolute; inset: 10%; pointer-events: none; }
.scan-frame i { position: absolute; width: 28px; height: 28px; border-color: rgba(186,255,99,.85); border-style: solid; }
.scan-frame i:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; }.scan-frame i:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; }.scan-frame i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 2px 2px; }.scan-frame i:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; }
.scan-line { position: absolute; left: 10%; right: 10%; top: 10%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; box-shadow: 0 0 14px var(--accent); }
.scan-line.running { opacity: 1; animation: scan 2s ease-in-out infinite; }
@keyframes scan { 50% { top: 90%; } }
.sample-marker { position: absolute; width: 26px; height: 26px; border: 2px solid white; border-radius: 50%; transform: translate(-50%,-50%) scale(.7); opacity: 0; box-shadow: 0 0 0 2px #0008; pointer-events: none; z-index: 2; }.sample-marker.visible { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.color-readout { position: absolute; left: 16px; bottom: 16px; z-index: 3; display: grid; grid-template-columns: 30px auto; gap: 1px 9px; align-items: center; background: rgba(5,8,10,.86); border: 1px solid #ffffff26; border-radius: 10px; padding: 9px 12px; opacity: 0; transform: translateY(8px); backdrop-filter: blur(10px); pointer-events: none; }.color-readout.visible { opacity: 1; transform: none; }.color-readout i { grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 7px; border: 1px solid #fff5; }.color-readout strong { font-size: 13px; }.color-readout span { color: #9ea9af; font: 10px ui-monospace, monospace; }
.freeze-badge { position: absolute; right: 16px; top: 16px; z-index: 4; color: #07110c; background: var(--accent); border-radius: 999px; padding: 6px 10px; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.button { min-height: 48px; border-radius: 10px; border: 1px solid var(--line); color: #e7ebed; background: #151b20; display: grid; place-items: center; cursor: pointer; font-weight: 650; font-size: 13px; }
.button:hover { border-color: #53626a; }.button.action { grid-column: 1 / -1; min-height: 62px; background: var(--accent); border-color: var(--accent); color: #0a1209; font-size: 16px; box-shadow: 0 8px 28px rgba(186,255,99,.16); }.button:disabled { opacity: .4; cursor: not-allowed; }.file-button input { display: none; }
.button.cancel { grid-column: 1 / -1; min-height: 50px; color: #ffaaa0; border-color: #713b38; background: #281817; }
.button.cancel:hover { border-color: #c65e55; background: #351b19; }
.viewer-tip { margin: 12px 2px 0; color: #77858d; font-size: 11px; }
.result-card { padding: 24px; position: relative; min-height: 570px; }
.result-head h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }.confidence { color: #0a1209; background: var(--accent); border-radius: 999px; padding: 6px 9px; font-size: 10px; font-weight: 700; }
.ask-panel { display: grid; grid-template-columns: 42px 1fr auto; gap: 8px; margin: 16px 0 6px; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: #090e11; }
.mic-button, .ask-button { border: 0; border-radius: 9px; cursor: pointer; }
.mic-button { width: 42px; height: 42px; display: grid; place-items: center; background: #172027; }
.mic-button span { width: 12px; height: 18px; border: 2px solid #dfe7e9; border-radius: 8px; position: relative; }
.mic-button span::after { content: ""; position: absolute; width: 18px; height: 10px; border: 2px solid #dfe7e9; border-top: 0; border-radius: 0 0 10px 10px; left: 50%; bottom: -7px; transform: translateX(-50%); }
.mic-button.listening { background: #d94b48; animation: mic-pulse 1.2s ease-in-out infinite; }
.mic-button.unavailable { opacity: .4; cursor: not-allowed; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 7px rgba(217,75,72,.16); } }
.question-field input { width: 100%; height: 42px; padding: 0 4px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.question-field input::placeholder { color: #66747b; }
.ask-button { min-width: 54px; padding: 0 12px; background: var(--accent); color: #091108; font-size: 12px; font-weight: 750; }
.ask-button:disabled, .mic-button:disabled { opacity: .4; cursor: not-allowed; }
.ask-hint { grid-column: 2 / -1; color: #68767d; font-size: 9px; margin: -3px 3px 2px; }
.wake-label { grid-column: 2 / -1; display: flex; align-items: center; gap: 5px; color: #9aa7ad; font-size: 10px; cursor: pointer; }
.wake-label small { margin-left: auto; color: #607078; font-size: 9px; }
.wake-label input { accent-color: var(--accent); }
.analysis-preview { margin: 12px 0 4px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #080c0f; }
.analysis-preview img { display: block; width: 100%; max-height: 180px; object-fit: cover; background: #050709; }
.analysis-preview figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 11px; }
.analysis-preview figcaption span { color: #dfe6e8; font-size: 11px; font-weight: 700; }
.analysis-preview figcaption small { color: #68767d; font-size: 9px; text-align: right; }
.result-empty { margin-top: 30px; }.result-empty > span { font: 700 54px/1 ui-monospace, monospace; color: #253139; }.result-empty h3 { font-size: 24px; margin: 16px 0 9px; }.result-empty > p { color: var(--muted); font-size: 13px; line-height: 1.7; }.result-empty ul { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }.result-empty li { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; }.result-empty li small { color: #74828a; }
.summary { font-size: 19px; line-height: 1.5; margin: 18px 0 20px; }.result-item { display: grid; grid-template-columns: 28px 1fr; gap: 9px; padding: 15px 0; border-top: 1px solid var(--line); }.item-number { color: #55646c; font: 11px ui-monospace, monospace; margin-top: 4px; }.item-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }.item-title strong { font-size: 14px; }.item-title span { color: #07110c; background: var(--cyan); border-radius: 4px; padding: 2px 6px; font-size: 10px; font-weight: 800; }.item-title i { color: #8f9da5; font-size: 9px; font-style: normal; margin-left: auto; }.item-title i[data-risk="高"] { color: #ff897a; }.result-item p { color: #a4afb4; font-size: 12px; line-height: 1.55; margin: 7px 0; }.action-text { font-size: 12px; color: #e6ece8; }.warning { color: #ffd18a; background: #2a2115; border: 1px solid #59452b; border-radius: 9px; padding: 10px; font-size: 11px; line-height: 1.5; }.result-actions { display: flex; align-items: center; gap: 15px; margin-top: 18px; }.speak-button { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; color: var(--text); background: #182026; cursor: pointer; }.auto-label { color: var(--muted); font-size: 11px; }
.loading { position: absolute; inset: 100px 24px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }.loading[hidden] { display: none; }.loading span { color: var(--muted); font-size: 12px; }.loader { width: 54px; height: 54px; border: 2px solid #2c393f; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }@keyframes spin { to { transform: rotate(360deg); } }
.safety-note { margin: 22px 0 50px; padding: 18px 22px; border: 1px solid #343b2c; border-radius: 14px; background: linear-gradient(90deg, rgba(186,255,99,.07), transparent); display: flex; align-items: center; gap: 30px; }.safety-note strong { color: var(--accent); white-space: nowrap; }.safety-note p { color: #8f9b9f; font-size: 12px; line-height: 1.6; margin: 0; }
footer { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 20px 0 35px; border-top: 1px solid #1c2429; display: flex; justify-content: space-between; color: #526068; font-size: 10px; letter-spacing: .08em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 900px) { .intro { grid-template-columns: 1fr; gap: 18px; padding-top: 30px; }.intro > p:last-child { margin: 0; }.workspace { grid-template-columns: 1fr; }.viewer-card { border-right: 0; border-bottom: 1px solid var(--line); }.result-card { min-height: 500px; } }
@media (max-width: 560px) { .topbar { height: 62px; padding: 0 12px; }.api-state { padding: 7px 8px; font-size: 9px; }.brand { gap: 8px; }.brand-logo { width: 76px; height: 30px; }.brand-name { padding-left: 8px; }.brand strong { font-size: 12px; }.brand small { font-size: 6px; } main { width: calc(100% - 24px); }.intro { padding: 24px 4px 25px; }.intro h1 { font-size: 42px; }.workspace { border-radius: 17px; }.viewer-card { padding: 10px; }.camera-stage { aspect-ratio: 3 / 4; }.controls { grid-template-columns: 1fr 1fr; }.controls .file-button { grid-column: 1 / -1; }.button.action { grid-column: 1 / -1; min-height: 68px; }.result-card { padding: 20px 16px; }.ask-panel { grid-template-columns: 42px 1fr 50px; }.safety-note { align-items: flex-start; flex-direction: column; gap: 7px; margin-bottom: 30px; } footer { width: calc(100% - 24px); } }
