:root {
	--rust: #c13927;
	--rust-light: #ea6940;
	--gray: #605e59;
	--tan: #ded5c6;
	--bg: #f6f3ee;
	--ink: #24221f;
	--good: #1f7a3f;
	--good-bg: #e6f4ea;
	--bad: #b3261e;
	--bad-bg: #fdecea;
	--warn: #8a5a00;
	--warn-bg: #fff4dc;
	--radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
	font-family: Montserrat, system-ui, -apple-system, sans-serif;
	background: var(--bg);
	color: var(--ink);
	font-size: 17px;
	line-height: 1.45;
	-webkit-text-size-adjust: 100%;
}
.top {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 14px 18px; background: #fff; border-bottom: 1px solid #e7e1d6;
	position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 800; letter-spacing: .01em; }
.brand::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--rust); margin-right: 8px; vertical-align: 1px; }
.who { font-size: 14px; color: var(--gray); display: flex; gap: 8px; align-items: center; }
main { max-width: 560px; margin: 0 auto; padding: 18px 16px 48px; }
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 10px; }
.muted { color: var(--gray); }
.small { font-size: 14px; }
.center { text-align: center; }
.card { background: #fff; border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.05); border: 1px solid #ece6db; }
.howto ol, .instructions ol { margin: 0; padding-left: 22px; }
.howto li, .instructions li { margin-bottom: 6px; }
.example { margin-top: 10px; font-size: 15px; }
.example summary { cursor: pointer; color: var(--rust); font-weight: 600; }
.example img { display: block; max-width: 240px; width: 100%; margin: 10px auto 0; border-radius: 12px; border: 1px solid #ddd; }

.big-input, select, .sn-input {
	width: 100%; font: inherit; font-size: 18px; padding: 14px; border-radius: 10px;
	border: 2px solid #d8d0c3; background: #fff; color: var(--ink);
}
.big-input:focus, select:focus, .sn-input:focus { outline: none; border-color: var(--rust-light); }
.sn-input { font-size: 24px; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
#nameForm { display: grid; gap: 12px; margin-top: 14px; }

.btn { display: block; width: 100%; text-align: center; font: inherit; font-weight: 700; border: 0; border-radius: 12px; cursor: pointer; }
.btn.big { font-size: 19px; padding: 17px; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:disabled { background: #b9b3a9; cursor: default; }
.btn.secondary { background: #fff; color: var(--ink); border: 2px dashed #c9bfae; }
.add-btn.disabled { opacity: .45; pointer-events: none; }
.link { background: none; border: 0; color: var(--rust); font: inherit; font-weight: 600; cursor: pointer; padding: 4px; }
#checkBtn { margin-top: 8px; }

.shot-head { display: flex; justify-content: space-between; align-items: center; margin: -6px -6px 8px 0; }
.shot-title { font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray); }
.sensor { border-top: 1px solid #eee7dc; padding-top: 12px; margin-top: 12px; }
.shot-head + .sensor, .shot-head + .note + .sensor { border-top: 0; padding-top: 0; margin-top: 0; }
.sensor-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sensor-num { font-weight: 700; font-size: 15px; }
.add-manual { margin-top: 10px; font-size: 15px; }
.question { border: 2px solid var(--warn); background: var(--warn-bg); }
.question p { margin: 0 0 10px; }
.q + .q { margin-top: 14px; }
.q-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.choice { background: #fff; border: 2px solid #d8c8a4; padding: 12px; font-size: 15px; }
.btn.choice.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.reading { display: flex; align-items: center; gap: 10px; color: var(--gray); font-weight: 600; }
.sensor .reading + .remove { margin-top: 6px; }
.spinner { width: 20px; height: 20px; border: 3px solid #e3dccf; border-top-color: var(--rust); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shot { display: block; width: 100%; border-radius: 10px; border: 1px solid #e3dccf; }
.shot.full { max-height: 340px; object-fit: contain; background: #f2efe9; }
.note { margin: 10px 0; padding: 10px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.note.good { background: var(--good-bg); color: var(--good); }
.note.good::before { content: '✓ '; }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.bad { background: var(--bad-bg); color: var(--bad); }
.fields { display: grid; gap: 10px; }
.field span { display: block; font-size: 13px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.confirm { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-weight: 600; font-size: 15px; }
.confirm input { width: 24px; height: 24px; accent-color: var(--rust); }
.error { background: var(--bad-bg); color: var(--bad); padding: 12px; border-radius: 10px; font-weight: 600; }

.banner { display: flex; gap: 16px; align-items: center; padding: 22px 20px; border-radius: var(--radius); margin-bottom: 14px; color: #fff; }
.banner.good { background: var(--good); }
.banner.bad { background: var(--bad); animation: pulse 1.2s ease-in-out 2; }
@keyframes pulse { 50% { transform: scale(1.015); } }
.banner-icon { font-size: 34px; font-weight: 800; width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; flex: none; }
.banner-title { font-size: 24px; font-weight: 800; }
.banner-sub { font-size: 16px; opacity: .95; }
.result { border-left: 8px solid; }
.result.good { border-left-color: var(--good); }
.result.bad { border-left-color: var(--bad); background: #fffafa; }
.result-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.result-name { font-weight: 700; }
.result-sn { font-size: 22px; font-weight: 800; letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.tag { font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 999px; }
.result.good .tag { background: var(--good-bg); color: var(--good); }
.result.bad .tag { background: var(--bad); color: #fff; }
.result-detail { margin: 8px 0 0; color: var(--gray); font-size: 15px; }
.instructions { border: 2px solid var(--bad); }
.instructions h2 { color: var(--bad); }
