/* Contrail interactive demo (home page #demo).
   A working mock of the app inside the iPhone 18 Pro bezel. demo.js builds the app into .demo-screen at a fixed
   402 x 874 pt canvas (.app) and scales it to the screen box, so every size below is in iPhone points.
   The look follows the app's Liquid Glass build (golf-shot App/Sources, October 2026 screenshots). */

/* ---------- Page section ---------- */
.demo-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-2xl); align-items: center; }
.demo-copy { max-width: 520px; }
.demo-tries { list-style: none; margin: var(--space-xl) 0 0; padding: 0; display: grid; gap: var(--space-sm); }
.demo-tries li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.55; color: var(--white-2); }
.demo-tries li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.demo-tries b { color: var(--white); font-weight: 600; }
.demo-note { margin-top: var(--space-lg); font-size: 14px; line-height: 1.55; color: var(--white-3, var(--white-2)); max-width: 46ch; }
.demo-device { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); }
.demo-phone { --demo-w: max(300px, min(380px, calc((100svh - 120px) / 2.0444))); width: var(--demo-w); }
.demo-phone .phone-screen { background: #0b0f0b; }
.demo-restart { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 var(--space-md); border: 0; border-radius: var(--r-capsule); background: none; color: var(--white-2); font: 500 15px/1 var(--font); cursor: pointer; text-decoration: underline; text-decoration-color: oklch(100% 0 0 / 0.3); text-underline-offset: 4px; transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
.demo-restart:hover { color: var(--white); background: oklch(100% 0 0 / 0.06); }
.demo-restart:active { background: oklch(100% 0 0 / 0.1); }
.demo-restart svg { width: 16px; height: 16px; }
@media (max-width: 900px) {
  .demo-wrap { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .demo-phone { --demo-w: max(min(calc(100vw - 40px), 300px), min(calc(100vw - 40px), calc((100svh - 32px) / 2.0444), 380px)); }
}

/* ---------- The app canvas ---------- */
.demo-screen { touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.demo-screen > .demo-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.app {
  --a-bg: #0b0f0b; --a-black: #000; --a-card: #1c1d1c; --a-card-2: #262826;
  --a-lime: #c6f23f; --a-lime-2: #b5e655; --a-lime-deep: #8fbf1f; --a-ink: #10140c;
  --a-text: #f3f3ee; --a-text-2: rgb(235 235 228 / 0.64); --a-text-3: rgb(235 235 228 / 0.42);
  --a-sep: rgb(255 255 255 / 0.1); --a-red: #ff5a4f; --tracer: #c6f23f; --tracer-under: rgb(18 36 8 / 0.55);
  --a-glass: rgb(48 50 48 / 0.5); --a-glass-strong: rgb(36 38 36 / 0.72); --a-glass-border: rgb(255 255 255 / 0.14);
  --a-glass-hi: inset 0 1px 0 rgb(255 255 255 / 0.16), inset 0 -1px 0 rgb(0 0 0 / 0.18);
  --a-blur: saturate(170%) blur(18px);
  --a-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --a-out: cubic-bezier(0.22, 1, 0.36, 1);
  position: absolute; left: 0; top: 0; width: 402px; height: var(--app-h, 874px);
  transform: scale(var(--s, 1)); transform-origin: 0 0;
  overflow: hidden; background: var(--a-bg); color: var(--a-text);
  font-family: var(--font); font-size: 17px; line-height: 1.35; letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none;
  contain: layout paint;
}
.app *, .app *::before, .app *::after { box-sizing: border-box; }
.app button { font: inherit; color: inherit; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.app button:focus-visible, .app [tabindex]:focus-visible { outline: 2.5px solid var(--a-lime); outline-offset: 2px; }
.app svg { display: block; flex: none; }
.app img { display: block; max-width: none; }
.app .ico { width: 22px; height: 22px; }
.app .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pressed feedback, like UIKit buttons */
.app .tap { transition: transform 160ms var(--a-out), opacity 160ms var(--a-out), background-color 160ms var(--a-out); }
.app .tap:active, .app .tap.is-down { transform: scale(0.95); opacity: 0.82; }
@media (hover: hover) { .app .tap:hover { filter: brightness(1.12); } }

/* Glass (floats over content only) */
.app .glass { background: var(--a-glass); -webkit-backdrop-filter: var(--a-blur); backdrop-filter: var(--a-blur); border: 1px solid var(--a-glass-border); box-shadow: var(--a-glass-hi), 0 6px 18px rgb(0 0 0 / 0.28); }
.app .glass-dark { background: var(--a-glass-strong); -webkit-backdrop-filter: var(--a-blur); backdrop-filter: var(--a-blur); border: 1px solid rgb(255 255 255 / 0.1); box-shadow: var(--a-glass-hi), 0 6px 18px rgb(0 0 0 / 0.3); }
@media (prefers-reduced-transparency: reduce) { .app .glass, .app .glass-dark { background: #2a2c2a; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-contrast: more) { .app .glass, .app .glass-dark { background: #111; -webkit-backdrop-filter: none; backdrop-filter: none; border-color: rgb(255 255 255 / 0.6); } .app { --a-text-2: #e6e6e0; --a-text-3: #cfcfc8; } }

.app .round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.app .capsule { height: 44px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.app .btn-lime { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; border-radius: 27px; background: var(--a-lime); color: var(--a-ink); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), 0 8px 24px rgb(198 242 63 / 0.16); }
.app .btn-lime:focus-visible { outline-color: #fff; }
.app .btn-glass { display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; border-radius: 27px; font-size: 17px; font-weight: 600; }

/* ---------- Chrome: status bar + home indicator ---------- */
.app-status { position: absolute; z-index: 60; left: 0; right: 0; top: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 52px; pointer-events: none; color: #fff; transition: opacity 220ms var(--a-out); }
.app-status time { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.app-status .si { display: flex; align-items: center; gap: 6px; }
.app-home-ind { position: absolute; z-index: 61; left: 50%; bottom: 0; width: 180px; height: 26px; translate: -50% 0; display: grid; place-items: end center; padding-bottom: 8px; touch-action: none; cursor: grab; }
.app-home-ind span { display: block; width: 140px; height: 5px; border-radius: 3px; background: rgb(255 255 255 / 0.92); box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.2); transition: transform 200ms var(--a-out); }
.app-home-ind:active span { transform: scaleX(0.94); }

/* ---------- Screens and layers ---------- */
.scr { position: absolute; inset: 0; overflow: hidden; background: var(--a-bg); }
.scr[hidden] { display: none; }
.scr-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; touch-action: pan-y; }
.scr-scroll::-webkit-scrollbar { display: none; }
.layer { position: absolute; inset: 0; }
.layer.is-covered { pointer-events: none; }

/* iOS nav bar that appears once a large title scrolls away */
.navbar { position: absolute; z-index: 20; left: 0; right: 0; top: 0; height: 100px; display: grid; place-items: end center; padding-bottom: 14px; font-size: 17px; font-weight: 600; opacity: 0; pointer-events: none; background: rgb(10 13 10 / 0.72); -webkit-backdrop-filter: saturate(170%) blur(20px); backdrop-filter: saturate(170%) blur(20px); border-bottom: 1px solid var(--a-sep); transition: opacity 180ms var(--a-out); }
.navbar.is-on { opacity: 1; }

/* ---------- Tab bar ---------- */
.tabbar { position: absolute; z-index: 40; left: 65px; width: 272px; bottom: 23px; height: 62px; border-radius: 31px; display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; }
.tabbar .pill { position: absolute; z-index: 0; top: 4px; left: 4px; width: calc((100% - 8px) / 3); height: calc(100% - 8px); border-radius: 27px; background: rgb(0 0 0 / 0.42); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06); transition: transform 460ms var(--a-spring); }
.tabbar button { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 27px; font-size: 12.5px; font-weight: 600; color: rgb(255 255 255 / 0.92); }
.tabbar button svg { width: 28px; height: 28px; }
.tabbar button[aria-selected="true"] { color: #fff; }

/* ---------- Home ---------- */
.home-hero { position: relative; height: 460px; padding-top: 62px; background: var(--a-black); }
.home-hero .media { position: relative; height: 398px; overflow: hidden; }
.home-hero img, .fill-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-hero img { object-position: 50% 100%; }
.trace-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.trace-svg .under { fill: none; stroke: var(--tracer-under); stroke-linecap: round; stroke-linejoin: round; }
.trace-svg .line { fill: none; stroke: var(--tracer); stroke-linecap: round; stroke-linejoin: round; transition: stroke 200ms var(--a-out); }
.trace-svg .land { fill: var(--tracer); stroke: var(--tracer-under); }
.chip { position: absolute; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px; border-radius: 15px; font-size: 13.5px; font-weight: 600; white-space: nowrap; color: #fff; }
.home-hero .chip { left: 16px; bottom: 16px; }
.home-body { padding: 26px 20px 120px; }
.home-body h2 { margin: 0; font-size: 31px; font-weight: 600; line-height: 1.1; letter-spacing: -0.025em; }
.home-body p { margin: 12px 0 0; font-size: 17px; line-height: 1.42; color: var(--a-text-2); }
.home-body .btn-lime { margin-top: 22px; }
.home-row { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; margin-top: 16px; font-size: 18px; font-weight: 600; text-align: left; border-radius: 12px; }
.home-lock { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 15px; color: var(--a-text-2); }
.home-lock svg { width: 16px; height: 16px; opacity: 0.8; }

/* ---------- Record ---------- */
.scr-record { background: var(--a-black); }
.rec-top { position: absolute; z-index: 5; left: 16px; right: 16px; top: 62px; height: 44px; display: flex; align-items: center; gap: 10px; transition: opacity 240ms var(--a-out), transform 360ms var(--a-spring); }
.rec-top .grow { flex: 1; }
.rec-top .fmt { color: #fff; font-size: 15px; }
.rec-top .fmt span { color: var(--a-text-2); font-weight: 500; }
.rec-top .sens { color: var(--a-lime); }
.rec-top .sens[aria-expanded="true"] { background: rgb(198 242 63 / 0.18); }
.rec-timer { position: absolute; z-index: 5; left: 50%; top: 62px; height: 46px; translate: -50% 0; display: flex; align-items: baseline; gap: 10px; padding: 0 20px; border-radius: 23px; opacity: 0; transform: translateY(-8px) scale(0.96); transition: opacity 240ms var(--a-out), transform 420ms var(--a-spring); pointer-events: none; }
.rec-timer .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--a-red); align-self: center; animation: recblink 1.2s steps(2, jump-none) infinite; }
.rec-timer b { font-size: 24px; font-weight: 600; line-height: 46px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rec-timer small { font-size: 13px; color: var(--a-text-2); }
@keyframes recblink { 50% { opacity: 0.25; } }
.rec-status { position: absolute; z-index: 4; left: 18px; right: 16px; top: 120px; display: flex; align-items: center; gap: 10px; font-size: 15.5px; transition: opacity 240ms var(--a-out); }
.rec-status i { width: 9px; height: 9px; border-radius: 50%; background: #fff; flex: none; transition: background-color 240ms var(--a-out); }
.is-locked .rec-status i { background: var(--a-lime); }
.rec-card { position: absolute; z-index: 1; left: 44px; top: 174px; width: 314px; height: 559px; border-radius: 30px; overflow: hidden; background: #0d120d; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06); }
.rec-card .fill-img { object-position: 50% 50%; }
.rec-card video, .rec-card .synth { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 260ms var(--a-out); }
.rec-card video.is-on, .rec-card .synth.is-on { opacity: 1; }
.rec-aim { position: absolute; inset: 0; pointer-events: none; transition: opacity 220ms var(--a-out); }
.rec-aim .target { position: absolute; left: 156px; top: 358px; width: 2px; height: 70px; background: repeating-linear-gradient(to top, rgb(255 255 255 / 0.85) 0 7px, transparent 7px 13px); opacity: 0; transition: opacity 300ms var(--a-out); }
.is-locked .rec-aim .target { opacity: 1; }
.ring { position: absolute; left: 157px; top: 458px; width: 124px; height: 124px; translate: -50% -50%; transition: width 520ms var(--a-spring), height 520ms var(--a-spring); }
.ring .dash { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgb(198 242 63 / 0.85); animation: ringspin 9s linear infinite; transition: opacity 260ms var(--a-out); }
.ring .solid { position: absolute; inset: 0; border-radius: 50%; opacity: 0; transition: opacity 260ms var(--a-out); box-shadow: 0 0 14px rgb(198 242 63 / 0.45), inset 0 0 10px rgb(198 242 63 / 0.25); background: rgb(198 242 63 / 0.07); }
.ring .solid::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 210deg, #ecff9c, #c6f23f 30%, #7fae1c 55%, #c6f23f 78%, #ecff9c); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); }
.ring .badge { position: absolute; right: -4px; top: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--a-lime); color: var(--a-ink); transform: scale(0); transition: transform 420ms var(--a-spring); box-shadow: 0 0 0 2px rgb(0 0 0 / 0.25); }
.ring .badge svg { width: 14px; height: 14px; }
.is-locking .ring, .is-locked .ring { width: 56px; height: 56px; }
.is-locking .ring .dash, .is-locked .ring .dash { opacity: 0; }
.is-locking .ring .solid, .is-locked .ring .solid { opacity: 1; }
.is-locked .ring .badge { transform: scale(1); }
.is-recording .ring .badge { transform: scale(0); }
@keyframes ringspin { to { transform: rotate(360deg); } }
.rec-chip { left: 50%; top: 352px; translate: -50% 0; transition: opacity 220ms var(--a-out), top 520ms var(--a-spring); }
.is-locking .rec-chip, .is-locked .rec-chip { top: 388px; }
.is-recording .rec-chip { opacity: 0; }
.rec-chip svg { width: 14px; height: 14px; color: var(--a-lime); }
.rec-swing { left: 50%; bottom: 16px; translate: -50% 0; opacity: 0; transition: opacity 240ms var(--a-out); }
.rec-swing.is-on { opacity: 1; }
.rec-find { position: absolute; z-index: 5; left: 16px; top: 766px; height: 46px; padding: 0 18px 0 14px; font-weight: 500; font-size: 16px; transition: opacity 240ms var(--a-out); }
.rec-find svg { width: 20px; height: 20px; }
.shutter { position: absolute; z-index: 5; left: 50%; top: 748px; width: 82px; height: 82px; translate: -50% 0; border-radius: 50%; display: grid; place-items: center; background: #111; box-shadow: inset 0 0 0 4px #fff, 0 0 0 2px rgb(255 255 255 / 0.12); transition: transform 160ms var(--a-out); }
.shutter:active { transform: scale(0.94); }
.shutter i { width: 64px; height: 64px; border-radius: 32px; background: radial-gradient(circle at 40% 35%, #d9ff6a, var(--a-lime) 55%, #a9d92c); transition: width 380ms var(--a-spring), height 380ms var(--a-spring), border-radius 380ms var(--a-spring); }
.is-recording .shutter i { width: 32px; height: 32px; border-radius: 9px; }
.is-recording .rec-top, .is-recording .rec-status, .is-recording .rec-find { opacity: 0; pointer-events: none; }
.is-recording .rec-top { transform: translateY(-6px); }
.is-recording .rec-timer { opacity: 1; transform: none; }
.sensors { position: absolute; z-index: 6; left: 16px; right: 16px; top: 114px; padding: 18px 10px 14px; border-radius: 30px; display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 14px; transform-origin: 92% 0; opacity: 0; transform: scale(0.6) translateY(-20px); pointer-events: none; transition: opacity 200ms var(--a-out), transform 460ms var(--a-spring); }
.sensors.is-open { opacity: 1; transform: none; pointer-events: auto; }
.sensors div { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 14px; font-weight: 600; }
.sensors div span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--a-lime); margin-bottom: 4px; }
.sensors div small { font-size: 13px; font-weight: 500; color: var(--a-text-2); }

/* ---------- Synthetic shot (range render + drawn flight) ---------- */
.synth { position: absolute; inset: 0; overflow: hidden; background: #0d120d; }
.synth .fill-img { object-position: 50% 50%; }
.synth svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Finding your shots ---------- */
.proc { padding: 84px 20px 0; }
.proc-head { display: flex; align-items: center; gap: 16px; }
.proc-head .badge { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--a-card-2); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08); }
.proc-head .badge svg { width: 46px; height: 46px; }
.proc-head h2 { margin: 0; font-size: 19px; font-weight: 600; }
.proc-head p { margin: 2px 0 0; font-size: 14px; color: var(--a-text-2); }
.proc-count { display: flex; align-items: baseline; gap: 14px; margin-top: 44px; }
.proc-count b { font-size: 92px; font-weight: 400; line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.proc-count span { font-size: 19px; color: var(--a-text-2); }
.proc-bar { position: relative; height: 12px; margin-top: 34px; border-radius: 6px; background: rgb(255 255 255 / 0.07); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); overflow: hidden; }
.proc-bar i { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--a-lime-deep), var(--a-lime)); transform-origin: 0 50%; transform: scaleX(0); }
.proc-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--a-text-2); }
.proc-meta .on { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: rgb(198 242 63 / 0.08); border: 1px solid rgb(198 242 63 / 0.22); color: var(--a-text); font-weight: 500; white-space: nowrap; }
.proc-meta .on svg { width: 14px; height: 14px; color: var(--a-lime); }
.proc h3 { margin: 30px 0 12px; font-size: 19px; font-weight: 600; }
.proc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.proc-grid .thumb { aspect-ratio: 114 / 168; }
.proc-foot { position: absolute; left: 20px; right: 20px; bottom: 34px; }

/* ---------- Thumbs (library, processing, strip) ---------- */
.thumb { position: relative; display: block; width: 100%; overflow: hidden; border-radius: 15px; background: #18201a; }
.thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .synth { border-radius: inherit; }
.thumb .t-chip { position: absolute; left: 7px; bottom: 7px; height: 25px; padding: 0 9px; border-radius: 13px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.thumb .t-fav { position: absolute; right: 7px; bottom: 7px; width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.thumb .t-fav svg { width: 14px; height: 14px; }
.thumb .tracing { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; background: rgb(10 14 10 / 0.42); font-size: 14px; font-weight: 600; transition: opacity 260ms var(--a-out); }
.thumb .tracing svg { width: 26px; height: 26px; color: var(--a-lime); animation: ringspin 1s steps(8) infinite; }
.thumb.is-new { animation: thumbin 520ms var(--a-spring) both; }
@keyframes thumbin { from { opacity: 0; transform: scale(0.86); } }

/* ---------- Library ---------- */
.lib { padding: 64px 0 120px; }
.lib-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 16px 0 18px; }
.lib-head h2 { margin: 6px 0 0; font-size: 36px; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
.lib-head p { margin: 2px 0 0; font-size: 17px; font-weight: 600; color: var(--a-text-2); }
.lib-head .btns { display: flex; gap: 8px; margin-top: 18px; }
.lib-head .round { background: var(--a-card-2); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08); }
.lib-head .round[aria-pressed="true"] { background: var(--a-lime); color: var(--a-ink); }
.lib-group { margin: 26px 18px 12px; font-size: 17px; font-weight: 600; color: var(--a-text-2); }
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 0 8px; }
.lib-grid .thumb { aspect-ratio: 125 / 175; }
.lib-grid button.thumb { border-radius: 15px; }
.lib-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 70px 34px 0; }
.lib-empty svg.comet { width: 110px; height: 110px; }
.lib-empty h3 { margin: 14px 0 0; font-size: 22px; font-weight: 600; }
.lib-empty p { margin: 8px 0 0; font-size: 16px; line-height: 1.42; color: var(--a-text-2); }
.lib-empty .btn-lime { margin-top: 24px; }

/* ---------- Shot viewer ---------- */
.scr-viewer { background: var(--a-bg); }
.v-stage { position: absolute; left: 0; right: 0; top: 0; height: 600px; overflow: hidden; touch-action: pan-y; cursor: grab; }
.v-stage:active { cursor: grabbing; }
.v-track { position: absolute; inset: 0; display: flex; will-change: transform; }
.v-page { position: relative; flex: 0 0 402px; height: 100%; display: grid; place-items: center; }
.v-media { position: relative; width: 337px; height: 600px; overflow: hidden; background: #0d120d; }
.v-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v-chrome { transition: opacity 240ms var(--a-out); }
.is-bare .v-chrome { opacity: 0; pointer-events: none; }
.is-bare .app-status { opacity: 0; }
.v-top { position: absolute; z-index: 5; left: 16px; right: 16px; top: 62px; display: flex; align-items: center; justify-content: space-between; }
.v-title { position: absolute; left: 50%; translate: -50% 0; height: 38px; padding: 0 16px; border-radius: 19px; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.v-title span { color: var(--a-text-2); }
.v-arrow { position: absolute; z-index: 5; top: 300px; width: 40px; height: 40px; translate: 0 -50%; display: none; }
.v-arrow.prev { left: 10px; }
.v-arrow.next { right: 10px; }
.v-arrow[disabled] { opacity: 0.25; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .v-arrow { display: grid; } }
.v-scrub { position: absolute; z-index: 5; left: 12px; right: 12px; top: 612px; height: 36px; touch-action: none; cursor: pointer; }
.v-scrub .track { position: absolute; left: 6px; right: 6px; top: 16px; height: 4px; border-radius: 2px; background: rgb(255 255 255 / 0.22); }
.v-scrub .fillbar { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 2px; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
.v-scrub .knob { position: absolute; top: 9px; left: 6px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 0.4); transition: width 160ms var(--a-out), height 160ms var(--a-out), top 160ms var(--a-out), margin 160ms var(--a-out); }
.v-scrub.is-drag .knob { width: 26px; height: 26px; top: 5px; margin-left: -13px; }
.v-strip { position: absolute; z-index: 5; left: 16px; right: 16px; top: 656px; height: 110px; border-radius: 24px; padding: 10px 0 0; }
.v-strip .hd { padding: 0 16px; font-size: 13.5px; font-weight: 600; color: var(--a-text-2); }
.v-strip .row { display: flex; gap: 8px; padding: 8px 14px 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-x; }
.v-strip .row::-webkit-scrollbar { display: none; }
.v-strip .thumb { flex: 0 0 52px; height: 66px; border-radius: 11px; box-shadow: 0 0 0 0 var(--a-lime); transition: box-shadow 200ms var(--a-out); }
.v-strip .thumb[aria-current="true"] { box-shadow: inset 0 0 0 3px var(--a-lime); }
.v-strip .thumb[aria-current="true"]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 3px var(--a-lime); }
.v-bar { position: absolute; z-index: 5; left: 16px; right: 16px; top: 780px; display: flex; align-items: center; gap: 10px; }
.v-bar .grow { flex: 1; }
.v-bar .play { position: absolute; left: 50%; translate: -50% 0; }
.v-bar .speed { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.v-bar .fav[aria-pressed="true"] svg { color: var(--a-lime); }
.v-bar .fav.pop svg { animation: favpop 420ms var(--a-spring); }
@keyframes favpop { 40% { transform: scale(1.35); } }
.v-toast { position: absolute; z-index: 6; left: 50%; top: 300px; translate: -50% -50%; height: 40px; padding: 0 18px; border-radius: 20px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 600; opacity: 0; transform: scale(0.9); transition: opacity 180ms var(--a-out), transform 320ms var(--a-spring); pointer-events: none; }
.v-toast.is-on { opacity: 1; transform: none; }

/* ---------- Action sheet ---------- */
.sheet { position: absolute; inset: 0; z-index: 80; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 10px 34px; background: rgb(0 0 0 / 0.42); }
.sheet[hidden] { display: none; }
.sheet .card { border-radius: 22px; overflow: hidden; background: rgb(44 46 44 / 0.86); -webkit-backdrop-filter: saturate(170%) blur(24px); backdrop-filter: saturate(170%) blur(24px); }
.sheet .msg { padding: 16px 20px 14px; text-align: center; font-size: 13.5px; line-height: 1.4; color: var(--a-text-2); border-bottom: 1px solid var(--a-sep); }
.sheet .msg b { display: block; font-size: 14px; color: var(--a-text); font-weight: 600; margin-bottom: 2px; }
.sheet .act { display: block; width: 100%; height: 56px; font-size: 19px; color: var(--a-red); font-weight: 500; }
.sheet .cancel { margin-top: 8px; height: 56px; border-radius: 22px; font-size: 19px; font-weight: 600; background: rgb(44 46 44 / 0.94); }

/* ---------- Settings ---------- */
.scr-settings { background: var(--a-black); }
.set { padding: 96px 0 130px; }
.set h2 { margin: 0 20px 6px; font-size: 36px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.set-h { margin: 22px 36px 8px; font-size: 16px; font-weight: 600; color: var(--a-text-3); }
.set-card { margin: 0 16px; border-radius: 26px; background: var(--a-card); overflow: hidden; }
.set-foot { margin: 8px 36px 0; font-size: 13.5px; line-height: 1.42; color: var(--a-text-2); }
.app .set-row { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 11px 20px; text-align: left; font-size: 17px; }
.set-row + .set-row::before { content: ""; position: absolute; top: 0; left: 20px; right: 0; height: 1px; background: var(--a-sep); }
.set-row.has-ico + .set-row.has-ico::before { left: 58px; }
.set-row .v { margin-left: auto; color: var(--a-text-2); font-variant-numeric: tabular-nums; }
.set-row .ico { width: 24px; height: 24px; color: var(--a-text); opacity: 0.92; }
.set-row .tx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.set-row .tx small { font-size: 13.5px; color: var(--a-text-2); }
.set-row.danger { color: var(--a-red); }
.app button.set-row:active { background: rgb(255 255 255 / 0.06); }
.set-preview { position: relative; height: 132px; overflow: hidden; }
.set-preview img { object-position: 50% 91%; }
.swatches { display: flex; justify-content: space-around; padding: 14px 8px 16px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 62px; font-size: 13.5px; color: var(--a-text-2); }
.swatch i { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 0 #fff; transition: box-shadow 200ms var(--a-out), transform 200ms var(--a-out); }
.swatch[aria-checked="true"] { color: var(--a-text); }
.swatch[aria-checked="true"] i { box-shadow: 0 0 0 3px var(--a-card), 0 0 0 5.5px #fff; }
.swatch:active i { transform: scale(0.9); }
.switch { position: relative; flex: none; width: 52px; height: 32px; margin-left: auto; border-radius: 16px; background: rgb(120 120 128 / 0.36); transition: background-color 220ms var(--a-out); }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 0.25), 0 0 0 0.5px rgb(0 0 0 / 0.05); transition: transform 380ms var(--a-spring), width 160ms var(--a-out); }
.switch[aria-checked="true"] { background: var(--a-lime); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:active::after { width: 32px; }
.switch[aria-checked="true"]:active::after { transform: translateX(16px); }

/* ---------- Tutorial ---------- */
.scr-tut { background: var(--a-bg); }
.tut-top { position: absolute; z-index: 6; right: 18px; top: 62px; display: flex; gap: 10px; }
.tut-top .capsule { font-size: 17px; padding: 0 18px; }
.tut-stage { position: absolute; left: 0; right: 0; top: 118px; height: 210px; }
.tut-comet { position: absolute; top: 0; width: 150px; height: 150px; border-radius: 30px; transition: left 620ms var(--a-spring), transform 620ms var(--a-spring); }
.tut-comet svg { width: 100%; height: 100%; overflow: visible; }
.tut-comet .flip { transition: transform 400ms var(--a-spring); transform-origin: 50% 50%; }
.tut-bubble { position: absolute; top: 14px; width: 196px; padding: 14px 18px 16px; border-radius: 22px; background: #fff; color: #1d1b1c; transition: left 620ms var(--a-spring); }
.tut-bubble::before { content: ""; position: absolute; top: 34px; width: 16px; height: 16px; background: #fff; transform: rotate(45deg); border-radius: 3px; }
.tut-bubble.left::before { right: -6px; }
.tut-bubble.right::before { left: -6px; }
.tut-bubble b { display: block; font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.tut-bubble span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.38; color: #5d5d5a; }
.tut-bubble span[hidden] { display: none; }
.tut-card { position: absolute; left: 83px; top: 336px; width: 236px; height: 382px; border-radius: 26px; overflow: hidden; background: #0d120d; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 20px 50px rgb(0 0 0 / 0.4); }
.tut-art { position: absolute; inset: 0; }
.tut-art .chip { left: 50%; translate: -50% 0; }
.tut-mini-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 74px; background: #000; display: grid; place-items: center; }
.tut-mini-bar .shutter { position: static; translate: none; width: 54px; height: 54px; box-shadow: inset 0 0 0 3px #fff; }
.tut-mini-bar .shutter i { width: 42px; height: 42px; }
.tut-mini-top { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; gap: 6px; align-items: center; }
.tut-mini-top .round { width: 30px; height: 30px; }
.tut-mini-top .round svg { width: 16px; height: 16px; }
.tut-mini-top .capsule { height: 30px; font-size: 12px; padding: 0 10px; margin-left: auto; }
.tut-shots { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; align-content: center; background: #0d120d; }
.tut-shots .thumb { aspect-ratio: 108 / 150; border-radius: 12px; }
.tut-private { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; }
.tut-private .lockbig { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: var(--a-lime); }
.tut-private .lockbig svg { width: 38px; height: 38px; }
.tut-private .chip { position: static; translate: none; }
.tut-dots { position: absolute; left: 0; right: 0; top: 742px; display: flex; justify-content: center; gap: 10px; }
.tut-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / 0.3); transition: background-color 200ms var(--a-out), transform 300ms var(--a-spring); }
.tut-dots i.is-on { background: #fff; transform: scale(1.12); }
.tut-foot { position: absolute; left: 20px; right: 20px; bottom: 40px; }
.glitter { position: absolute; z-index: 7; width: 18px; height: 18px; margin: -9px 0 0 -9px; pointer-events: none; }
.glitter svg { width: 100%; height: 100%; }
.comet-glow { position: absolute; inset: -10px; border-radius: 50%; background: radial-gradient(circle, rgb(198 242 63 / 0.35), transparent 65%); opacity: 0; pointer-events: none; }

/* Reduce Motion: no rotation or bounces; screen changes become quick fades (demo.js) */
@media (prefers-reduced-motion: reduce) {
  .ring .dash, .rec-timer .dot, .thumb .tracing svg { animation: none !important; }
}
