/* [snap] Snap & Send — mobile-first (ARCHITECTURE §14): 360/390 phones first, then up. */
.snap-body { background: var(--bg); }
.snap-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 60px;
  border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.snap-top .brand { display: inline-flex; align-items: center; gap: 8px; font: 700 18px/1 var(--font-display); color: var(--text); min-height: 44px; }
.snap-top .brand-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: #fff; font: 700 16px/1 var(--font); }
.snap-top .spacer { flex: 1; }
.snap-top .btn { min-height: 44px; }

.snap { max-width: 980px; margin: 0 auto; padding: 16px 16px 120px; }
.snap h1 { font: 650 clamp(28px, 7vw, 40px)/1.1 var(--font-display); margin: 0 0 8px; letter-spacing: -.01em; }
.snap h2 { font: 650 clamp(22px, 5vw, 28px)/1.2 var(--font-display); margin: 0 0 12px; }
.snap .lede { font-size: 17px; color: var(--text-2); margin: 0; max-width: 60ch; }
.snap .help { font-size: 14px; color: var(--muted); }
.snap input[type=text], .snap input[type=email], .snap input[type=password], .snap input[type=tel],
.snap select, .snap textarea { font-size: 16px; min-height: 48px; width: 100%; }

.snap-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 18px; overflow-x: auto; }
.snap-steps li { flex: 1 0 auto; text-align: center; font: 600 12px/1 var(--font); padding: 8px 10px; border-radius: 999px;
  background: var(--bg-2); color: var(--muted); white-space: nowrap; }
.snap-steps li.on { background: var(--accent-soft); color: var(--accent-ink); }
.snap-steps li.done { background: var(--sage-soft); color: var(--sage-ink); }

.snap-intro { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.snap-chip { flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 28px;
  background: var(--accent-soft); }
.snap-pick { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 8px 0 6px; }
.snap-pick .btn { min-height: 56px; font-size: 17px; width: 100%; }
.snap-camera { background: var(--surface); }
/* [snaplp] the no-pictures path, under the photo buttons */
.snap-nopics { margin: 4px 0 14px; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface);
  font-size: 16px; color: var(--text-2); overflow-wrap: anywhere; }
.snap-nopics a { font-weight: 650; display: inline-flex; align-items: center; min-height: 44px; }
.snap-nopics a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.snap-human { margin: 12px 0; min-height: 0; }
.snap-error { background: var(--danger-soft); color: var(--danger-ink); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }

.snap-grid { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.snap-tile { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-xs); }
.snap-tile .ph { position: relative; aspect-ratio: 1; background: var(--bg-2); }
.snap-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.snap-tile .meta { padding: 8px 10px 10px; display: grid; gap: 6px; font-size: 13px; }
.snap-tile .role { font-size: 14px; min-height: 44px; padding: 6px 8px; }
.snap-tile .badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 600 11px/1.6 var(--font);
  background: var(--bg-2); color: var(--text-2); margin-right: 4px; }
.snap-tile .badge.warn { background: var(--warn-soft); color: var(--warn); }
.snap-tile .badge.hold { background: var(--sky-soft); color: var(--sky); }
.snap-tile .badge.bad { background: var(--danger-soft); color: var(--danger); }
.snap-tile .bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.75); overflow: hidden; }
.snap-tile .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.snap-tile .x { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(var(--text-rgb), .72); color: #fff; font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.snap-tile .retry { width: 100%; min-height: 44px; }
.snap-tile.failed .ph::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center;
  font: 700 34px/1 var(--font); color: var(--danger); background: rgba(var(--danger-soft-rgb), .7); }
.snap-tile.excluded { opacity: .55; }

.snap-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgba(var(--text-rgb), .08); }
.snap-bar .snap-count { flex: 1; font-weight: 600; font-size: 14px; }
.snap-bar .btn { min-height: 52px; }

.snap-qr { display: none; }

.snap-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px 16px; box-shadow: var(--shadow); }
.snap-sorting { display: flex; gap: 10px; align-items: center; font-weight: 600; margin-bottom: 12px; color: var(--text-2); }
.snap-q .qn { font: 600 13px/1 var(--font); color: var(--muted); margin-bottom: 8px; }
.snap-q h2 { margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chip { min-height: 44px; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--border-strong); background: var(--surface);
  font: 600 15px/1.2 var(--font); color: var(--text); cursor: pointer; }
.chip[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.big { padding: 14px 18px; font-size: 16px; border-radius: 14px; }
.snap-q .field { margin-bottom: 14px; }
.snap-q .nav { display: flex; gap: 10px; margin-top: 18px; }
.snap-q .nav .btn { min-height: 52px; flex: 1; }
.snap-q .nav .back { flex: 0 0 auto; }
.snap-q .err { color: var(--danger); font-weight: 600; margin: 8px 0 0; }

.snap-build { text-align: center; padding: 32px 16px; }
.snap-stages { list-style: none; padding: 0; margin: 18px auto 0; display: grid; gap: 8px; max-width: 360px; text-align: left; }
.snap-stages li { padding: 10px 12px; border-radius: 12px; background: var(--bg-2); color: var(--muted); font-weight: 600; }
.snap-stages li.now { background: var(--accent-soft); color: var(--accent-ink); }
.snap-stages li.done { background: var(--sage-soft); color: var(--sage-ink); }
.snap-stages li.done::before { content: "✓ "; }
/* [build-status] the active step's live line: one line, ellipsis, never wider than the box */
.snap-stages li.now { display: flex; gap: 6px; align-items: baseline; min-width: 0; overflow: hidden; }
.snap-stages .st-label { flex: none; }
.snap-stages .st-sub { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 400; opacity: .85; }
.snap-stages .st-sub::before { content: "· "; }
#snap-elapsed { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.spin { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: snapspin .8s linear infinite; vertical-align: middle; }
.spin-lg { width: 44px; height: 44px; border-width: 4px; margin-bottom: 14px; }
@keyframes snapspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

.snap-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; }
.seg-btn { min-height: 44px; padding: 0 16px; border: 0; background: var(--surface); font: 600 14px/1 var(--font); cursor: pointer; color: var(--text-2); }
.seg-btn.on { background: var(--text); color: #fff; }
.snap-frame-wrap { position: relative; background: var(--bg-2); border-radius: 18px; padding: 10px; border: 1px solid var(--border); overflow: hidden; }
.snap-frame-wrap iframe { display: block; width: 100%; height: 70vh; min-height: 480px; border: 0; border-radius: 12px; background: #fff; }
.snap-frame-wrap[data-size=phone] iframe { max-width: 390px; margin: 0 auto; }
.snap-frame-wrap[data-size=tablet] iframe, .snap-frame-wrap[data-size=laptop] iframe { transform-origin: 0 0; max-width: none; }
.snap-pv-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.snap-full-btn { min-height: 44px; gap: 8px; }

/* View full screen (snap.js + preview_full.js): the same frame, lifted into a full-viewport layer. */
.pv-full-bar { display: none; }
.snap-frame-wrap.is-full { --pv-bar: 60px; position: fixed; inset: 0; z-index: 1000; margin: 0; padding: 0; border: 0; border-radius: 0;
  height: auto !important; overflow: hidden; animation: pv-full-in .18s ease-out;
  background: radial-gradient(circle at 1px 1px, rgba(255,255,255,.06) 1px, transparent 0) 0 0/18px 18px, var(--stage); }
.snap-frame-wrap.is-full:focus { outline: none; }
@keyframes pv-full-in { from { opacity: 0; } }
.snap-frame-wrap.is-full .pv-full-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 10px;
  height: calc(var(--pv-bar) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) 0 max(18px, env(safe-area-inset-left, 0px));
  background: rgba(var(--overlay-rgb), .88); color: var(--bg); border-bottom: 1px solid rgba(255,255,255,.08); }
.pv-full-title { font-size: 15px; font-weight: 650; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pv-full-seg.seg { border-color: rgba(255,255,255,.22); }
.pv-full-seg .seg-btn { background: transparent; color: rgba(var(--bg-rgb), .8); padding: 0 12px; }
.pv-full-seg .seg-btn.on { background: var(--bg); color: var(--text); }
.pv-full-close { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff; }
.pv-full-close:hover { background: rgba(255,255,255,.14); }
.pv-full-bar :focus-visible { box-shadow: 0 0 0 3px rgba(var(--bg-rgb), .7); }
.snap-frame-wrap.is-full iframe { position: absolute; top: calc(var(--pv-bar) + env(safe-area-inset-top, 0px)); left: 0; min-height: 0; max-width: none; margin: 0;
  border-radius: 0; transform-origin: 0 0; }
.snap-frame-wrap.is-full[data-size=phone] iframe, .snap-frame-wrap.is-full[data-size=tablet] iframe {
  top: calc(var(--pv-bar) + env(safe-area-inset-top, 0px) + (100% - var(--pv-bar) - env(safe-area-inset-top, 0px)) / 2); left: 50%;
  transform-origin: 50% 50%; border: 12px solid var(--stage-bezel); border-radius: 50px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 0 0 4px var(--stage-rim), 0 30px 80px rgba(0,0,0,.55); }
.snap-frame-wrap.is-full[data-size=tablet] iframe { border-radius: 38px; }
.snap-frame-wrap.is-full.is-edge { --pv-bar: 56px; }
.snap-frame-wrap.is-full.is-edge .pv-full-seg { display: none; }
.snap-frame-wrap.is-full.is-edge iframe, .snap-frame-wrap.is-full.is-edge[data-size] iframe {
  top: calc(var(--pv-bar) + env(safe-area-inset-top, 0px)); left: 0; width: 100%; height: calc(100% - var(--pv-bar) - env(safe-area-inset-top, 0px));
  transform: none; border: 0; border-radius: 0; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .snap-frame-wrap.is-full { animation: none; } }
.snap-wait { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 16px; }
.snap-wait[hidden] { display: none; }
.snap-actions { display: grid; gap: 10px; margin: 14px 0; }
.snap-actions .btn { min-height: 56px; font-size: 17px; width: 100%; }
.snap-claim { margin-top: 10px; }
.snap-expiry { margin-top: 8px; }

@media (min-width: 560px) {
  .snap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .snap-pick { grid-template-columns: 1fr 1fr; }
  .snap-actions { grid-template-columns: 1fr 1fr; }
  .snap-card { padding: 28px; }
}
@media (min-width: 900px) {
  .snap { padding-top: 28px; }
  .snap-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .snap-bar { position: static; box-shadow: none; border: 1px solid var(--border); border-radius: 16px; margin-top: 8px; }
  .snap-qr { display: flex; gap: 16px; align-items: center; margin-top: 22px; padding: 16px; border-radius: 16px;
    background: var(--surface); border: 1px dashed var(--border-strong); }
  .snap-qr img { flex: none; }
  .snap-qr p { margin: 4px 0 0; color: var(--muted); }
  .snap-q { max-width: 680px; margin: 0 auto; }
}
.snap [hidden] { display: none !important; }

/* [snapimport] "Do you have a website?" + "Is this your logo?" + "Use these from your site?" */
.snap-site-field input { font-size: 16px; }
.snap-from-site { margin: 0 0 6px; color: var(--accent); font-weight: 600; }
.snap-logo-big { display: grid; place-items: center; min-height: 160px; padding: 18px; margin: 10px 0;
  border-radius: 16px; border: 1px solid var(--border);
  background: repeating-conic-gradient(rgba(127,127,127,.18) 0 25%, transparent 0 50%) 50% / 20px 20px; }
.snap-logo-big img { max-width: 100%; max-height: 180px; object-fit: contain; }
.snap-logo-alts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.snap-logo-alt { width: 76px; height: 56px; padding: 4px; border-radius: 10px; border: 2px solid var(--border);
  background: repeating-conic-gradient(rgba(127,127,127,.18) 0 25%, transparent 0 50%) 50% / 12px 12px; cursor: pointer; }
.snap-logo-alt.on { border-color: var(--accent); }
.snap-logo-alt img { width: 100%; height: 100%; object-fit: contain; }
.snap-q .snap-confirm-nav { flex-direction: column; }
.snap-q .snap-confirm-nav .btn { flex: 1 1 auto; }
.snap-import-grid { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr)); }
.snap-import-photo { position: relative; display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  border: 3px solid transparent; cursor: pointer; background: var(--surface); }
.snap-import-photo img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .55; }
.snap-import-photo input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.snap-import-photo .tick { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-weight: 700; }
.snap-import-photo:has(input:checked) { border-color: var(--accent); }
.snap-import-photo:has(input:checked) img { opacity: 1; }
.snap-import-photo:has(input:checked) .tick { background: var(--accent); }
.snap-import-photo:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.snap-import-reviews { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.snap-import-reviews label { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); line-height: 1.45; min-height: 44px; }
.snap-import-reviews input { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.snap-import-reviews .stars { color: var(--star); letter-spacing: 1px; }
.linkish { background: none; border: 0; padding: 6px 2px; color: var(--accent); text-decoration: underline; cursor: pointer;
  font: inherit; min-height: 32px; }
@media (min-width: 640px) {
  .snap-import-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .snap-q .snap-confirm-nav { flex-direction: row; }
}

/* [snapchange] "Change something" panel + the claim form's close, toggled by snap.js */
.snap-change, .snap-claim { position: relative; margin-top: 10px; }
.snap-panel-head { display: flex; align-items: flex-start; gap: 10px; }
.snap-panel-head h2 { flex: 1; margin: 0 0 12px; }
.snap-panel-close { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--text); }
.snap-panel-close:hover { background: var(--bg-2); }
.snap-panel-close .icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.snap-claim-close { position: absolute; top: 14px; right: 14px; }
.snap-claim h2 { padding-right: 52px; }
.snap-change textarea { min-height: 96px; resize: vertical; }
.snap-change .field label { font-weight: 600; display: block; margin-bottom: 6px; }
.snap-change .btn-block { min-height: 52px; }
.snap-or { margin: 14px 0 8px; }
.snap-change .chips { margin-bottom: 6px; }
.snap-change-err { color: var(--danger); font-weight: 600; margin: 8px 0 0; }
.snap-change-more { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.snap-change-more .btn { min-height: 48px; width: 100%; }
.snap-full-editor { margin: 12px 0 0; }
.snap-last { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft, var(--bg-2)); font-weight: 600; }
.snap-last .linkish { font-weight: 600; }
.snap-back-preview { margin: 0 0 10px; }
@media (min-width: 560px) { .snap-change-more { grid-template-columns: 1fr 1fr; } }

/* [snapchange] "Save your place" */
.snap-place { margin-top: 18px; }
.snap-place h2 { margin: 0 0 4px; }
.snap-place-row { display: flex; gap: 8px; margin-top: 10px; }
.snap-place-row input { flex: 1; min-width: 0; min-height: 48px; font-size: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.snap-place-row .btn { flex: none; min-height: 48px; }
.snap-place-code { margin: 12px 0 0; font-size: 15px; }
.snap-place-code strong { display: inline-block; font: 700 26px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em;
  padding: 4px 10px; border-radius: 10px; background: var(--bg-2); color: var(--text); word-break: break-all; }
.snap-place-msg:empty { display: none; }
.snap-claim-code strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.snap-place-row input { font-family: inherit; }
@media (max-width: 479px) {
  .snap-place-row { flex-direction: column; }
  .snap-place-row input { font-size: 15px; text-overflow: ellipsis; }
  .snap-place-row .btn { width: 100%; }
}
