/* Pipeline pages: /try, /p/{id}, /c/{token}. Uses the tokens from /css/site.css. */
.app { padding: clamp(36px, 6vw, 72px) 0 72px; }
.app [hidden] { display: none !important; }
.app-wrap { max-width: 720px; }
.app-h { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; }
.app .lede { margin-top: 14px; max-width: 46ch; }
.try { margin-top: 28px; display: grid; gap: 26px; }
.try fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.try legend { font: 700 17px/1.3 var(--f-body); margin-bottom: 12px; padding: 0; }

/* The viewfinder drop zone */
.vf { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); background: #050807; border: 1px dashed rgba(251, 246, 236, 0.28); overflow: hidden; cursor: pointer; transition: border-color .15s ease; }
.vf:hover, .vf:focus-within { border-color: var(--gold); }
.vf input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.vf img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vf.has { border-style: solid; border-color: var(--line); }
.vf-c { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(251, 246, 236, 0.55); z-index: 2; }
.vf-c.c1 { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.vf-c.c2 { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.vf-c.c3 { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.vf-c.c4 { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.vf-hud { position: absolute; top: 18px; left: 44px; z-index: 2; display: flex; align-items: center; gap: 8px; color: #fff; font: 500 12px/1 var(--f-mono); letter-spacing: 0.05em; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.vf-hud b { font-weight: 500; }
.rec { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); display: inline-block; animation: rec 1.4s steps(2, jump-none) infinite; }
.vf-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; color: var(--ink); padding: 0 24px; }
.vf-empty svg { width: 40px; height: 40px; color: var(--gold); }
.vf-empty strong { font: 700 18px/1.2 var(--f-body); }
.vf-empty small { color: var(--muted); font-size: 14px; }
.vf-change { position: absolute; right: 14px; bottom: 14px; z-index: 2; background: rgba(14, 31, 24, 0.82); border: 1px solid rgba(251, 246, 236, 0.3); color: var(--ink); font: 600 14px/1 var(--f-body); padding: 9px 14px; border-radius: 999px; }
.vf.busy::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 210, 122, 0.12), transparent); animation: sweep 1.2s linear infinite; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 500 15px/1 var(--f-body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 700; }

.pick { display: grid; gap: 12px; }
.scene { display: grid; grid-template-columns: 112px 1fr 24px; gap: 16px; align-items: center; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; color: var(--ink); font: inherit; width: 100%; }
.scene img { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.scene b { display: block; font: 700 17px/1.25 var(--f-body); }
.scene span { display: block; color: var(--muted); font-size: 15px; line-height: 1.4; margin-top: 4px; }
.scene i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(251, 246, 236, 0.4); }
.scene[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.scene[aria-pressed="true"] i { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 5px var(--surface); }
.scene.soon { grid-template-columns: 1fr auto; cursor: default; background: transparent; border-style: dashed; opacity: 0.72; }
.scene.soon em { font: 600 12px/1.2 var(--f-body); font-style: normal; color: var(--gold); border: 1px solid rgba(255, 210, 122, 0.45); border-radius: 999px; padding: 6px 10px; max-width: 16ch; text-align: center; }

.ts { min-height: 0; }
.go { width: 100%; }
.go[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.msg { background: rgba(255, 77, 77, 0.1); border: 1px solid rgba(255, 77, 77, 0.45); border-radius: 12px; padding: 14px 16px; margin: 0; color: var(--ink); font-size: 16px; }
.msg.ok { background: rgba(255, 210, 122, 0.1); border-color: rgba(255, 210, 122, 0.45); }

/* Preview and clip frames */
.pv-cam, .c-cam { margin-top: 28px; }
.c-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.wait { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 60%, #12241c, #050807 70%); overflow: hidden; }
.wait .scan { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(255, 210, 122, 0.08), transparent); animation: scan 2.4s ease-in-out infinite; }
.wait .count { font: 500 15px/1 var(--f-mono); color: var(--muted); letter-spacing: 0.08em; }
.wm { position: absolute; inset: 0; pointer-events: none; background: url("/app/wm.png") repeat; background-size: 300px auto; opacity: 0.9; }
.after-note { margin: 22px 0 6px; color: var(--muted); }
.after-note strong { color: var(--ink); }
#pv-checkout { margin-top: 18px; }

.c-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.c-box { margin-top: 28px; padding: 22px; }
.c-h { font-size: 22px; }
.c-rate { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.c-rate .btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.c-redo { color: var(--muted); margin: 16px 0 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn[disabled] { color: var(--muted); cursor: default; text-decoration: none; }
.c-box .msg { margin-top: 14px; }

@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes scan { 0% { top: -30%; } 100% { top: 100%; } }
@media (max-width: 520px) {
  .scene { grid-template-columns: 88px 1fr 22px; gap: 12px; }
  .scene img { width: 88px; }
  .c-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .wait .scan, .vf.busy::after, .rec { animation: none; }
}
/* the share loop (17 Nov): send the watermarked preview, and tell a friend from the clip page */
.pv-share { display: grid; gap: 8px; justify-items: start; margin: 18px 0 6px; }
.c-friend { margin-top: 18px; }
