/* Look Lab (6.0.0): the darkroom. Ink ground, Cream type, one Flash accent. Builds on app.css tokens. Mobile-first. */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body.lab {
  --c: var(--cream); --c7: rgba(255, 246, 236, .72); --c5: rgba(255, 246, 236, .5); --c2: rgba(255, 246, 236, .16); --c1: rgba(255, 246, 236, .08);
  --tray: #0c0a0b; --safelight: rgba(242, 73, 43, .22);
  min-height: 100%; height: auto; background: radial-gradient(90% 50% at 50% -10%, rgba(242, 73, 43, .14), transparent 60%), var(--ink); color: var(--c);
  overflow-x: hidden; padding-bottom: calc(176px + env(safe-area-inset-bottom));
}
body.lab :focus-visible { outline: 2px solid var(--flash); outline-offset: 3px; }
body.lab .ll-step h1:focus, body.lab .ll-step h1:focus-visible { outline: none; }
body.lab ::selection { background: var(--flash); color: var(--ink); }
body.lab .eyebrow { color: var(--flash); }
body.lab .btn { color: var(--c); border-color: var(--c2); }
body.lab .btn:hover { background: var(--c1); border-color: var(--c5); }
body.lab .btn-primary { color: var(--ink); border-color: var(--flash); background: var(--flash); }
body.lab .btn-primary:hover { background: var(--flash); filter: brightness(1.06); }
body.lab .btn-quiet { border-color: transparent; color: var(--c7); }
body.lab .btn[disabled] { opacity: .35; }

/* ---------- top bar + progress ---------- */
.ll-top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: linear-gradient(var(--ink) 70%, rgba(26, 20, 24, 0)); }
.ll-back { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--c); }
.ll-back:hover { background: var(--c1); }
.ll-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ll-title { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 24px; line-height: 1; letter-spacing: -.01em; }
.ll-title img { border-radius: 22%; }
.ll-title b { font-weight: 700; } .ll-title i { font-weight: 300; }
.ll-quota { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--c5); text-align: right; }
.ll-progress { position: sticky; top: calc(60px + env(safe-area-inset-top)); z-index: 19; height: 3px; margin: 0 16px; background: var(--c1); border-radius: 3px; overflow: hidden; }
.ll-progress span { display: block; height: 100%; background: var(--flash); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }

/* ---------- steps ---------- */
.ll { width: 100%; max-width: 760px; margin: 0 auto; padding: 22px 16px 24px; }
.ll-step { display: none; }
.ll-step.on { display: block; animation: lbIn .5s var(--ease) both; }
@keyframes lbIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ll-step h1, .ll-gate h1 { margin: 8px 0 10px; font-family: var(--display); font-weight: 700; font-size: clamp(38px, 10vw, 64px); line-height: .98; letter-spacing: -.025em; outline: none; }
.ll-step h1 em, .ll-gate h1 em { font-weight: 300; font-style: italic; }
.ll-step h2 { margin: 26px 0 12px; font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.05; }
.ll-lead { margin: 0 0 18px; font-size: 16px; color: var(--c7); max-width: 34em; }
.ll-fine { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--c5); }
.ll-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ll-row .btn { flex: 1 1 180px; }
.ll-err { margin: 14px 0 0; padding: 12px 16px; border-radius: 14px; background: rgba(242, 73, 43, .14); border: 1px solid rgba(242, 73, 43, .45); color: var(--c); font-size: 14.5px; }
.ll-gate { padding: 12vh 0; text-align: left; } .ll-gate p { color: var(--c7); }

/* ---------- selfie ---------- */
.ll-cam { position: relative; width: min(100%, 420px); aspect-ratio: 4 / 5; margin: 6px auto 0; border-radius: var(--r-card-lg); overflow: hidden; background: var(--tray); border: 1px solid var(--c2); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.ll-cam video, .ll-cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ll-cam video { transform: scaleX(-1); }
.ll-cam-ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; color: var(--c5); font-size: 14px; }
.ll-cam-ph svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.ll-oval { position: absolute; left: 50%; top: 46%; width: 56%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border: 1.5px dashed rgba(255, 246, 236, .35); border-radius: 50%; pointer-events: none; }
.ll-upload { position: relative; cursor: pointer; }

/* ---------- who ---------- */
.ll-big { display: block; margin: 8px 0 18px; }
.ll-big input { width: 100%; min-height: 64px; padding: 6px 2px 10px; border: 0; border-bottom: 2px solid var(--c2); background: transparent; color: var(--c); font-family: var(--display); font-style: italic; font-weight: 600; font-size: clamp(30px, 8vw, 46px); line-height: 1.1; transition: border-color .2s; }
.ll-big input:focus { outline: none; border-color: var(--flash); }
.ll-big input::placeholder { color: rgba(255, 246, 236, .25); }
.ll-field { display: grid; gap: 8px; margin-top: 18px; font-size: 14px; color: var(--c7); }
.ll-field small { color: var(--c5); }
.ll-field input, .ll-field textarea { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 16px; border: 1.5px solid var(--c2); background: var(--c1); color: var(--c); font-size: 16px; resize: vertical; }
.ll-field input:focus, .ll-field textarea:focus { outline: none; border-color: var(--flash); }

/* ---------- chips ---------- */
.ll-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ll-chip { min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); border: 1.5px solid var(--c2); background: transparent; color: var(--c); font-size: 15px; font-weight: 500; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .12s; touch-action: manipulation; }
.ll-chip:hover { border-color: var(--c5); background: var(--c1); }
.ll-chip:active { transform: scale(.97); }
.ll-chip[aria-pressed=true] { background: var(--flash); border-color: var(--flash); color: var(--ink); font-weight: 600; }

/* ---------- choice cards ---------- */
.ll-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ll-opt { all: unset; box-sizing: border-box; position: relative; display: grid; gap: 10px; align-content: start; min-height: 44px; padding: 6px; border-radius: 22px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .25s var(--ease), background-color .2s; }
.ll-opt:hover { background: var(--c1); }
.ll-opt:active { transform: scale(.98); }
.ll-opt:focus-visible { outline: 2px solid var(--flash); outline-offset: 2px; }
.ll-art { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; border: 1px solid var(--c2); box-shadow: 0 18px 30px -22px rgba(0, 0, 0, .9); transition: box-shadow .25s var(--ease); }
.ll-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12, 10, 11, .55), transparent 55%); }
.ll-opt[aria-checked=true] .ll-art { box-shadow: 0 0 0 3px var(--flash), 0 18px 30px -18px rgba(242, 73, 43, .6); }
.ll-opt[aria-checked=true]::after { content: ""; position: absolute; right: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--flash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231A1418' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; animation: pop .3s var(--ease) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.ll-opt-label { display: grid; gap: 2px; padding: 0 4px 4px; }
.ll-opt-label b { font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.1; }
.ll-opt-label small { font-size: 12.5px; color: var(--c5); line-height: 1.35; }
.ll-cards-sm .ll-art { aspect-ratio: 16 / 9; }
.ll-swatch { display: flex; }
.ll-swatch i { flex: 1; }
.ll-swatch::after { display: none; }
/* style ladder: smooth (photo) -> brushed (painterly) -> flat bands (illustrated) */
.ll-art[data-style] { background: linear-gradient(160deg, #2a1a20, #0c0a0b) !important; }
.ll-art[data-style]::before { content: ""; position: absolute; inset: 0; }
.ll-art[data-style=photo]::before { background: radial-gradient(60% 70% at 50% 45%, #e8b79a, #8a5a4a 55%, #1a1012 100%); }
.ll-art[data-style=cinematic]::before { background: linear-gradient(transparent 14%, rgba(0, 0, 0, 0) 14%, transparent 86%), radial-gradient(70% 60% at 35% 50%, #f2a33b, #5c2a0e 60%, #05060f); box-shadow: inset 0 18px 0 #000, inset 0 -18px 0 #000; }
.ll-art[data-style=painterly]::before { background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .06) 0 6px, transparent 6px 14px), radial-gradient(60% 70% at 50% 45%, #d9a36b, #6b3a2a 60%, #1f140f); }
.ll-art[data-style=storybook]::before { background: radial-gradient(40% 40% at 30% 35%, rgba(244, 198, 207, .9), transparent 70%), radial-gradient(45% 45% at 70% 60%, rgba(191, 230, 211, .85), transparent 70%), #f5ecdc; }
.ll-art[data-style=animated]::before { background: linear-gradient(180deg, #5ad1ff 0 40%, #ffd18a 40% 62%, #f27a5e 62% 78%, #2e5bff 78%); }
.ll-art[data-style=comic]::before { background: radial-gradient(circle at 2px 2px, rgba(26, 20, 24, .5) 1.2px, transparent 1.6px) 0 0 / 7px 7px, linear-gradient(135deg, #ffcf3b, #f2492b); }
.ll-scale { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--c5); }
.ll-scale i { flex: 1; height: 1px; background: var(--c2); }

/* ---------- variants: the darkroom trays ---------- */
.ll-variants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.ll-tile { all: unset; box-sizing: border-box; display: grid; gap: 8px; padding: 5px; border-radius: 22px; cursor: pointer; animation: lbIn .5s var(--ease) both; }
.ll-tile[disabled] { cursor: progress; }
.ll-tile:focus-visible { outline: 2px solid var(--flash); outline-offset: 2px; }
.ll-tray { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--tray); border: 1px solid var(--c2); }
.ll-tray img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ll-tray.pending { background: radial-gradient(80% 60% at 50% 40%, var(--safelight), transparent 70%), var(--tray); }
.ll-tray.pending::before { content: ""; position: absolute; inset: -40%; background: linear-gradient(100deg, transparent 40%, rgba(255, 246, 236, .07) 50%, transparent 60%); animation: shimmer 2.4s linear infinite; }
@keyframes shimmer { from { transform: translateX(-40%); } to { transform: translateX(40%); } }
.ll-tray-msg { position: absolute; left: 0; right: 0; bottom: 12px; padding: 0 10px; text-align: center; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--c7); }
/* develop from dark: the print surfaces out of the tray */
img.develop { animation: develop 2.8s cubic-bezier(.3, .1, .2, 1) both; }
@keyframes develop {
  0% { opacity: .15; filter: brightness(0) sepia(1) contrast(2) blur(8px); transform: scale(1.04); }
  35% { opacity: 1; filter: brightness(.42) sepia(.85) contrast(1.6) blur(3px); }
  70% { filter: brightness(.85) sepia(.25) contrast(1.15) blur(.5px); }
  100% { opacity: 1; filter: none; transform: none; }
}
.ll-tile[aria-checked=true] .ll-tray { box-shadow: 0 0 0 3px var(--flash), 0 24px 40px -22px rgba(242, 73, 43, .7); }
.ll-tile-label { padding: 0 4px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--c5); }
.ll-tile[aria-checked=true] .ll-tile-label { color: var(--c); }

/* before / after */
.ll-ba { margin-top: 18px; }
.ll-ba-frame { position: relative; width: min(100%, 440px); aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; background: var(--tray); border: 1px solid var(--c2); }
.ll-ba-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ll-ba-before { position: absolute; inset: 0; border-right: 2px solid var(--cream); }
.ll-ba-tag { position: absolute; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(12, 10, 11, .6); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.ll-ba-tag-l { left: 12px; } .ll-ba-tag-r { right: 12px; }
.ll-ba-range { display: block; width: min(100%, 440px); margin-top: 10px; }
.ll-ba-range input { width: 100%; min-height: 44px; accent-color: var(--flash); }
.ll-save { margin-top: 10px; }
.ll-saved { margin-top: 16px; padding: 18px; border-radius: 20px; background: var(--c1); border: 1px solid var(--c2); }
.ll-saved p { margin: 0; }
.ll-again { justify-content: center; }

/* ---------- the live prompt card + step nav ---------- */
.ll-card { position: fixed; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 15; padding: 0 12px; pointer-events: none; }
.ll-card-in { max-width: 760px; margin: 0 auto; padding: 12px 16px; border-radius: 18px; background: rgba(255, 246, 236, .96); color: var(--ink); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8); pointer-events: auto; }
.ll-card-eyebrow { margin: 0 0 2px; font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--flash); }
.ll-card-text { margin: 0; font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ll-card-items { display: none; }
.ll-card.pulse .ll-card-in { animation: cardPulse .6s var(--ease); }
@keyframes cardPulse { 0% { transform: translateY(2px); box-shadow: 0 0 0 0 rgba(242, 73, 43, .6), 0 18px 40px -18px rgba(0, 0, 0, .8); } 100% { transform: none; box-shadow: 0 0 0 10px rgba(242, 73, 43, 0), 0 18px 40px -18px rgba(0, 0, 0, .8); } }
.ll-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 16; display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(26, 20, 24, 0), var(--ink) 30%); }
.ll-nav .btn { min-height: 52px; }
.ll-nav .btn-primary { flex: 1; max-width: 420px; margin-left: auto; }
body[data-step=selfie] .ll-card, body[data-step=gate] .ll-card { display: none; }

@media (min-width: 600px) {
  .ll-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ll-variants { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1040px) {
  body.lab { padding-bottom: 110px; }
  .ll { max-width: 1180px; padding-right: 380px; }
  .ll-card { left: auto; right: max(24px, calc((100vw - 1180px) / 2 + 24px)); top: 120px; bottom: auto; width: 320px; padding: 0; }
  .ll-card-in { padding: 22px 22px 18px; border-radius: 22px; }
  .ll-card-text { font-size: 22px; -webkit-line-clamp: unset; display: block; }
  .ll-card-items { display: grid; gap: 8px; margin: 16px 0 0; padding: 14px 0 0; list-style: none; border-top: 1px solid var(--border); }
  .ll-card-items li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
  .ll-card-items span { color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-size: 11px; padding-top: 2px; }
  .ll-card-items b { font-weight: 600; text-align: right; }
  .ll-nav { left: 50%; right: auto; width: min(1180px, 100vw); transform: translateX(-50%); padding-right: 380px; }
  body[data-step=selfie] .ll-card { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .ll-step.on, .ll-tile, img.develop, .ll-card.pulse .ll-card-in, .ll-opt[aria-checked=true]::after { animation: none !important; }
  .ll-tray.pending::before { animation: none; }
  .ll-progress span { transition: none; }
}
