* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0c0c0d; color: #f4f4f4; font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
.screen { min-height: 100%; display: flex; flex-direction: column; }
.screen[hidden], .result[hidden] { display: none; }
.panel { width: 100%; max-width: 420px; margin: auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 12px; }
.panel.wide { margin: 0 auto; }
.logo { font-size: 48px; color: #d4af37; text-align: center; }
h1 { text-align: center; margin: 0 0 8px; font-size: 24px; }
form { display: flex; flex-direction: column; gap: 10px; }
input { font: inherit; padding: 14px; border-radius: 12px; border: 1px solid #333; background: #1a1a1c; color: #fff; width: 100%; }
button { font: inherit; font-weight: 600; padding: 14px; border: 0; border-radius: 12px; background: #d4af37; color: #111; cursor: pointer; }
button.ghost { background: transparent; color: #d4af37; }
button.small { padding: 8px 12px; font-size: 15px; }
.error { color: #ff6b6b; text-align: center; min-height: 1.4em; margin: 0; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list button { background: #1a1a1c; color: #fff; text-align: left; font-weight: 500; display: flex; justify-content: space-between; gap: 8px; }
.list button small { color: #999; font-weight: 400; display: block; }
.list .tag { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #333; align-self: center; white-space: nowrap; }
.list .tag.bad { background: #6b1d1d; } .list .tag.warn { background: #6b4a00; }
.bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 8px) 8px 8px; background: #111; }
.bar .title { text-align: center; display: flex; flex-direction: column; line-height: 1.2; overflow: hidden; }
.bar .title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .title span { font-size: 13px; color: #aaa; }
.camera { position: relative; flex: 1; overflow: hidden; background: #000; }
video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame { position: absolute; top: 50%; left: 50%; width: min(70vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid rgba(212,175,55,.9); border-radius: 24px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
.camera-hint { position: absolute; bottom: 16px; width: 100%; text-align: center; margin: 0; color: #ddd; text-shadow: 0 1px 3px #000; }
.manual { flex-direction: row; padding: 10px 10px calc(env(safe-area-inset-bottom) + 10px); background: #111; }
.manual input { padding: 10px; }
.result { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; z-index: 10; }
.result.ok { background: #138a36; } .result.warn { background: #c77700; } .result.bad { background: #c0262d; }
.result-icon { font-size: 110px; line-height: 1; font-weight: 800; }
.result-title { font-size: 34px; font-weight: 800; margin-top: 8px; text-transform: uppercase; letter-spacing: .03em; }
.result-name { font-size: 28px; font-weight: 600; margin-top: 18px; }
.result-meta { font-size: 18px; margin-top: 6px; opacity: .92; white-space: pre-line; }
.result-note { margin-top: 16px; font-size: 18px; background: rgba(0,0,0,.2); border-radius: 12px; padding: 10px 14px; }
.result-note:empty { display: none; }
.result-tap { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 24px); opacity: .75; font-size: 14px; }
.leer { text-align: center; color: #999; }
.sub-title { text-align: center; color: #d4af37; margin: -4px 0 8px; }
