* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --brand: #c0006a; --brand-soft: #f9c0df; --line: #e8c4d6; --ink: #222; --muted: #777; --bg: #f5f5f5; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); min-height: 100vh; }
[hidden] { display: none !important; }

.header { background: var(--brand); padding: 14px 16px; text-align: center; position: sticky; top: 0; z-index: 10; }
.header h1 { color: #fff; font-size: 18px; font-weight: 600; }
.header p { color: var(--brand-soft); font-size: 12px; margin-top: 2px; }

.body { padding: 14px 16px 40px; max-width: 520px; margin: 0 auto; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.card.center { text-align: center; padding: 28px 18px; }
.card-label { font-size: 11px; color: var(--brand); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; margin-bottom: 10px; }

.btn-main, .btn-light, .btn-outline { display: block; width: 100%; border-radius: 8px; padding: 13px; font-size: 15px; text-align: center; cursor: pointer; -webkit-appearance: none; font-family: inherit; }
.btn-main { background: var(--brand); color: #fff; border: none; }
.btn-main:active { opacity: .85; }
.btn-main:disabled { opacity: .7; }
.btn-light { background: #fff; color: var(--brand); border: 1px solid var(--brand); margin-top: 10px; font-size: 14px; padding: 11px; }
.btn-outline { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn-outline:active { background: #fff0f7; }
.link-photo { display: block; text-align: center; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; margin-top: 12px; padding: 4px; cursor: pointer; }
.input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 16px; background: #fafafa; margin-bottom: 10px; -webkit-appearance: none; }
.input:focus { outline: none; border-color: var(--brand); background: #fff; }

#scanner-wrap { position: relative; margin-top: 12px; border-radius: 8px; overflow: hidden; background: #000; }
#video { display: block; width: 100%; max-height: 62vh; object-fit: cover; }
.reticle { position: absolute; left: 8%; right: 8%; top: 30%; bottom: 30%; border: 2px solid rgba(255,255,255,.85); border-radius: 8px; box-shadow: 0 0 0 9999px rgba(0,0,0,.25); pointer-events: none; }
.scanner-hint { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; color: #fff; font-size: 12px; background: rgba(0,0,0,.45); padding: 4px; }
.note { margin-top: 10px; font-size: 13px; color: var(--brand); background: #fff5f9; border: 1px solid var(--line); border-radius: 8px; padding: 10px; line-height: 1.5; }

.status { text-align: center; font-size: 14px; color: var(--muted); padding: 14px 6px; line-height: 1.45; }
.status.err { color: var(--brand); font-weight: 600; }
.status .hint { display: block; margin-top: 6px; font-size: 13px; font-weight: 400; color: var(--muted); }

.item { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.thumb { width: 84px; height: 84px; flex: none; border-radius: 8px; background: #f0f0f0; object-fit: cover; }
.info { flex: 1; min-width: 0; }
.price { font-size: 34px; font-weight: 700; color: var(--brand); line-height: 1.05; }
.price.na { font-size: 18px; font-weight: 600; color: var(--muted); }
.style { font-size: 16px; font-weight: 600; margin-top: 4px; word-break: break-all; }
.descr { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; margin-top: 2px; }
.title { font-size: 13px; color: #444; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.colors { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 12px; padding: 3px 8px; border-radius: 12px; background: #f3f3f3; color: #444; border: 1px solid transparent; }
.chip.scanned { background: #fff0f7; color: var(--brand); border-color: var(--brand); font-weight: 600; }
.chip-label { font-size: 11px; color: var(--muted); margin-top: 8px; }

.session { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }

.big-icon { font-size: 34px; color: var(--brand); margin-bottom: 8px; }
.msg-title { font-size: 17px; font-weight: 600; color: var(--brand); margin-bottom: 6px; }
.msg-sub { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* "or" divider + item-number row (input and a compact button side by side) */
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 6px 20px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.row { display: flex; gap: 8px; align-items: stretch; }
.row .input { flex: 1; min-width: 0; margin-bottom: 0; }
.btn-go { flex: none; padding: 0 18px; border-radius: 8px; border: 1px solid var(--brand); background: #fff; color: var(--brand); font-size: 14px; font-family: inherit; cursor: pointer; -webkit-appearance: none; }
.btn-go:active { background: #fff0f7; }

.torch { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(0,0,0,.5); color: #fff; border: 1px solid rgba(255,255,255,.7); border-radius: 16px; padding: 6px 14px; font-size: 13px; font-family: inherit; cursor: pointer; }
.torch.on { background: #fff; color: var(--brand); border-color: #fff; }
