/* SnapCrea — phone app. Brand colour from the shop (--brand), SnapCrea palette around it. */
:root {
	--brand: #2563EB;
	--night: #0F172A;
	--mist: #F8FAFC;
	--line: #E2E8F0;
	--ink: #0F172A;
	--muted: #64748B;
	--ok: #16A34A;
	--warn: #B91C1C;
	--radius: 18px;
	--safe-top: env(safe-area-inset-top, 0px);
	--safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--mist); color: var(--ink); font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
body { padding-bottom: calc(28px + var(--safe-bottom)); }
[hidden] { display: none !important; }
a { color: var(--brand); }

.snc-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-top)) 16px 10px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.snc-top img { border-radius: 10px; }
.snc-top div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.snc-top b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snc-top span { font-size: 12px; color: var(--muted); }
.snc-link { background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 8px 13px; font: inherit; font-size: 14px; font-weight: 600; }

.snc-demo { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: center; padding: 10px 16px; background: var(--night); color: #fff; font-size: 13px; }
.snc-demo b { color: #67E8F9; }

.snc-view { max-width: 580px; margin: 0 auto; padding: 18px 16px; }
.snc-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.snc-step h2 { margin: 0 0 12px; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.snc-step h2 span { width: 26px; height: 26px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; }
.snc-step h2 small { color: var(--muted); font-weight: 400; font-size: 13px; }
.snc-hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.snc-center { text-align: center; }
.snc-legal { font-size: 12px; }
.snc-title { font-size: 20px; margin: 4px 0 14px; }

.snc-photo { display: flex; align-items: center; justify-content: center; min-height: 200px; border: 2px dashed var(--line); border-radius: 14px; background: var(--mist); cursor: pointer; overflow: hidden; transition: border-color .2s; }
.snc-photo:hover { border-color: var(--brand); }
.snc-photo span { text-align: center; color: var(--brand); font-weight: 700; font-size: 16px; line-height: 1.7; }
.snc-photo img { max-width: 100%; max-height: 340px; display: block; }

.snc-bgs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.snc-bg { flex: 0 0 92px; scroll-snap-align: start; border: 2px solid var(--line); border-radius: 14px; background: var(--mist); padding: 0; overflow: hidden; text-align: center; font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; }
.snc-bg img, .snc-bg i { display: block; width: 100%; height: 76px; object-fit: cover; font-style: normal; line-height: 76px; font-size: 24px; background: #fff; color: var(--muted); }
.snc-bg b { display: block; padding: 5px 2px; font-weight: 600; }
.snc-bg[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }

input[type=text], input[type=email], textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); margin-bottom: 8px; }
input:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; }
.snc-row { display: flex; gap: 8px; }
.snc-row input { margin-bottom: 0; flex: 1; }
.snc-choice { display: grid; gap: 8px; }
.snc-choice label { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; }
.snc-choice input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.snc-choice label:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, #fff); }

.snc-btn { display: inline-block; border: 0; border-radius: 12px; padding: 12px 16px; font: inherit; font-weight: 700; background: var(--night); color: #fff; text-decoration: none; text-align: center; cursor: pointer; }
.snc-btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.snc-btn--main { width: 100%; padding: 16px; font-size: 17px; background: var(--brand); margin-top: 6px; box-shadow: 0 8px 20px -8px var(--brand); }
.snc-btn[disabled] { opacity: .5; }
.snc-btn--block { display: block; width: 100%; margin-top: 10px; }
.snc-error { background: #FEF2F2; color: var(--warn); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.snc-warn { background: #FFFBEB; color: #92400E; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.snc-warn ul { margin: 6px 0 0; padding-left: 18px; }
.snc-cost { text-align: center; font-weight: 600; color: var(--ink); margin: 6px 0 0; min-height: 1.5em; }

/* Progress / result */
.snc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.snc-card h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; }
.snc-steps { list-style: none; padding: 0; margin: 12px 0 0; }
.snc-steps li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--muted); }
.snc-steps li::before { content: ""; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: 0 0 20px; box-sizing: border-box; }
.snc-steps li.done { color: var(--ink); }
.snc-steps li.done::before { background: var(--ok); border-color: var(--ok); }
.snc-steps li.current { color: var(--ink); font-weight: 700; }
.snc-steps li.current::before { border-color: var(--brand); border-top-color: transparent; animation: snc-spin 1s linear infinite; }
.snc-steps li.stopped::before { border-color: var(--warn); }
@keyframes snc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .snc-steps li.current::before { animation: none; } }
.snc-result img { width: 100%; border-radius: 14px; background: var(--mist); }
.snc-result p { margin: 8px 0; }
.snc-resume { font-weight: 600; }
.snc-text { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.snc-text h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.snc-text p { font-size: 15px; }
.snc-note { font-style: italic; border-left: 3px solid var(--brand); padding-left: 10px; }
.snc-attrs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.snc-attrs div { background: var(--mist); border-radius: 10px; padding: 8px 10px; }
.snc-attrs dt { font-size: 12px; color: var(--muted); }
.snc-attrs dd { margin: 0; font-weight: 600; font-size: 14px; }
.snc-mail { margin-top: 14px; display: grid; gap: 8px; }
.snc-mail label { font-size: 14px; font-weight: 600; }
.snc-ok { color: var(--ok); }
.snc-bad { color: var(--warn); }
.snc-muted { color: var(--muted); font-size: 13px; }

.snc-item { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.snc-item img, .snc-item i { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: var(--mist); flex: 0 0 56px; }
.snc-item b { display: block; font-size: 15px; }
.snc-item small { color: var(--muted); }

/* Barcode scanner */
.snc-scanner { position: fixed; inset: 0; z-index: 20; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: calc(30px + var(--safe-bottom)); color: #fff; }
.snc-scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.snc-scanner__frame { position: absolute; left: 10%; right: 10%; top: 38%; height: 22%; border: 3px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
.snc-scanner p, .snc-scanner button { position: relative; }
.snc-scanner p { margin: 0 0 14px; font-weight: 600; }

.snc-denied { max-width: 420px; margin: 80px auto; padding: 24px; text-align: center; }

/* Brand picker */
.snc-maker { position: relative; }
.snc-maker input { margin-bottom: 0; }
.snc-maker input:disabled { opacity: .5; }
.snc-maker__list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 4; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 28px rgba(15,23,42,.14); overflow: hidden; }
.snc-maker__list button { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: #fff; padding: 12px; font: inherit; color: var(--ink); }
.snc-maker__list button:first-child { border-top: 0; }
.snc-maker__list button[data-new] { color: var(--brand); font-weight: 700; }
.snc-maker__list small { color: var(--muted); }
.snc-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-top: 10px; color: var(--ink); font-weight: 400 !important; }
.snc-check input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; accent-color: var(--brand); }
