/* ==========================================================================
   Geogen Scan — design system v2
   Deep-space glass over a living aurora. Springs, not timers.
   ========================================================================== */

:root {
  --font: -apple-system, "SF Pro Text", system-ui, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: -apple-system, "SF Pro Display", system-ui, "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;

  --spring: cubic-bezier(.22, 1.28, .36, 1);
  --spring-soft: cubic-bezier(.25, 1.12, .4, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --r-xl: 32px; --r-lg: 24px; --r-md: 18px; --r-sm: 13px;

  --c1: #7cf7ff; --c2: #8b7bff; --c3: #ff6ad5;
  --brand: linear-gradient(120deg, var(--c1) 0%, var(--c2) 50%, var(--c3) 100%);
  --ok: #34d399; --amber: #fbbf24; --hot: #ff5a6e; --cold: #7dd3fc; --blue: #7c8cff;

  color-scheme: dark;
  --bg: #04040b;
  --ink: #f5f6ff;
  --ink-2: rgba(234, 236, 255, .74);
  --ink-3: rgba(222, 226, 255, .48);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .15);
  --glass: rgba(20, 20, 42, .5);
  --glass-2: rgba(30, 30, 62, .58);
  --glass-solid: rgba(17, 17, 36, .86);
  --glass-edge: rgba(255, 255, 255, .12);
  --glass-hi: rgba(255, 255, 255, .1);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 24px 60px -28px rgba(0, 0, 0, .8);
  --shadow-sm: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px -18px rgba(0, 0, 0, .7);
  --au1: rgba(139, 123, 255, .34); --au2: rgba(124, 247, 255, .2); --au3: rgba(255, 106, 213, .22);
  --stage: radial-gradient(130% 90% at 50% -10%, #23205a 0%, #0c0b26 46%, #05050f 100%);
  --island: #000;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #eceef8;
    --ink: #0a0b1f;
    --ink-2: rgba(14, 16, 46, .72);
    --ink-3: rgba(14, 16, 46, .48);
    --line: rgba(12, 14, 50, .08);
    --line-2: rgba(12, 14, 50, .14);
    --glass: rgba(255, 255, 255, .58);
    --glass-2: rgba(255, 255, 255, .76);
    --glass-solid: rgba(255, 255, 255, .92);
    --glass-edge: rgba(255, 255, 255, .9);
    --glass-hi: rgba(255, 255, 255, .95);
    --shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 22px 50px -28px rgba(40, 40, 110, .38);
    --shadow-sm: inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 26px -18px rgba(40, 40, 110, .32);
    --au1: rgba(139, 123, 255, .3); --au2: rgba(80, 210, 255, .3); --au3: rgba(255, 106, 213, .24);
    --island: #050510;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: transparent; color: var(--ink);
  font: 16px/1.45 var(--font); letter-spacing: -.005em;
  min-height: 100dvh; overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
svg { flex: none; }
::selection { background: rgba(139, 123, 255, .35); }

/* ---------- ambient aurora (stays put during screen transitions) ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); view-transition-name: aurora; }
.aurora i { position: absolute; width: 90vmax; height: 90vmax; border-radius: 50%; will-change: transform; }
.aurora i:nth-child(1) { background: radial-gradient(circle at center, var(--au1), transparent 60%); left: -35vmax; top: -40vmax; animation: au1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: radial-gradient(circle at center, var(--au2), transparent 60%); right: -45vmax; top: 10vmax; animation: au2 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: radial-gradient(circle at center, var(--au3), transparent 60%); left: -20vmax; bottom: -55vmax; animation: au3 38s ease-in-out infinite alternate; }
.aurora::after {
  content: ""; position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes au1 { to { transform: translate3d(18vmax, 22vmax, 0) scale(1.15); } }
@keyframes au2 { to { transform: translate3d(-22vmax, 14vmax, 0) scale(.9); } }
@keyframes au3 { to { transform: translate3d(24vmax, -18vmax, 0) scale(1.1); } }

/* ---------- glass ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow);
}

/* ---------- W mark ---------- */
.wmark { display: block; }
.wmark.sm { width: 36px; height: 36px; filter: drop-shadow(0 6px 14px rgba(139, 123, 255, .45)); }
.wmark.xs { width: 28px; height: 28px; }
.wmark.hero { width: 118px; height: 118px; filter: drop-shadow(0 18px 40px rgba(139, 123, 255, .55)); }
.wmark.hero .wm-w { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 1.5s var(--ease-out) .25s forwards; }
.wmark.hero .wm-hi { opacity: 0; animation: fadein .8s ease 1.3s forwards; }
.wmark.hero .wm-bg { transform-origin: center; animation: pop .9s var(--spring) both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Dynamic-Island toast ---------- */
#toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 10px); z-index: 300;
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(calc(100vw - 32px), 440px);
  padding: 11px 18px 11px 14px; border-radius: 999px;
  background: var(--island); color: #fff; font-weight: 650; font-size: 14.5px; letter-spacing: -.01em;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transform: translate(-50%, -8px) scale(.55, .5); opacity: 0; pointer-events: none;
  transition: transform .5s var(--spring), opacity .25s ease;
  view-transition-name: toast;
}
#toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
.ti-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c2); box-shadow: 0 0 12px currentColor; color: var(--c2); flex: none; }
.ti-dot.ok { background: var(--ok); color: var(--ok); }
.ti-dot.err { background: var(--hot); color: var(--hot); }
.ti-dot.wait { background: var(--amber); color: var(--amber); }
.ti-dot.off { background: #94a3b8; color: #94a3b8; }
.ti-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20; view-transition-name: bar;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 78%, transparent), color-mix(in srgb, var(--bg) 40%, transparent));
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-txt b { font: 700 17px/1.15 var(--font-display); letter-spacing: -.02em; }
.who { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.back { display: flex; align-items: center; gap: 2px; font-weight: 650; font-size: 16.5px; padding: 6px 8px 6px 0; color: var(--ink); }
.back svg { margin-left: -4px; }
.bar-right { display: flex; align-items: center; gap: 8px; }

.pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: 13px; font-weight: 650; padding: 7px 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-edge); color: var(--ink-2);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  transition: transform .3s var(--spring);
}
.pill:active { transform: scale(.94); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); position: relative; }
.pill.ok .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.pill.err .dot { background: var(--hot); box-shadow: 0 0 10px var(--hot); }
.pill.off .dot { background: #94a3b8; }
.pill.wait .dot { background: transparent; border: 2px solid var(--amber); border-right-color: transparent; width: 11px; height: 11px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- layout ---------- */
main { padding: 16px 16px calc(env(safe-area-inset-bottom) + 110px); max-width: 640px; margin: 0 auto; }
.home { padding-bottom: calc(env(safe-area-inset-bottom) + 140px); }
.stack > * + * { margin-top: 16px; }
.muted { color: var(--ink-3); font-size: 13px; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); font-weight: 750; margin: 22px 4px 10px; }
.stack > div > .section-title:first-child { margin-top: 4px; }
.page-title { font: 750 30px/1.1 var(--font-display); letter-spacing: -.03em; margin: 6px 2px 2px; }
.footer { text-align: center; margin-top: 26px; }
.footer a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.stamp { text-align: center; }
.empty { text-align: center; color: var(--ink-3); padding: 40px 12px; }
.shimmer-text { background: linear-gradient(90deg, var(--ink-3), var(--ink), var(--ink-3)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.rise { animation: rise .55s var(--spring-soft) both; }

/* ---------- buttons ---------- */
.ghost {
  display: flex; align-items: center; justify-content: center; gap: 9px; text-align: center; width: 100%;
  padding: 14px 14px; border-radius: var(--r-md); font-weight: 650; font-size: 15px; color: var(--ink);
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  transition: transform .35s var(--spring), background .2s;
}
.ghost:active { transform: scale(.97); }
.ghost input { display: none; }
.ghost svg { width: 18px; height: 18px; opacity: .85; }
.ghost.danger { color: var(--hot); }
.ghost.danger:hover .lid, .ghost.danger:focus-visible .lid { transform: rotate(-14deg) translateY(-1px); }
.ghost:disabled { opacity: .4; pointer-events: none; }
.ico-bin .lid { transform-origin: 18px 6px; transition: transform .35s var(--spring); }
.row-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

.cta-btn {
  position: relative; overflow: hidden; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 60px; padding: 16px 20px; border-radius: 20px;
  font: 750 18px/1 var(--font-display); letter-spacing: -.01em; color: #fff;
  background: var(--brand); background-size: 200% 200%; animation: flowgrad 7s ease infinite;
  box-shadow: 0 16px 36px -14px rgba(139, 123, 255, .75), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .35s var(--spring), box-shadow .3s;
}
.cta-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 48%, transparent 66%); transform: translateX(-120%); animation: sheen 4.2s ease-in-out infinite 1.2s; }
.cta-btn:active { transform: scale(.975); }
.cta-btn svg { width: 22px; height: 22px; position: relative; z-index: 1; }
.cta-btn span { position: relative; z-index: 1; }
.cta-btn.soft { background: var(--glass); animation: none; color: var(--ink-2); border: 1.5px dashed var(--line-2); box-shadow: none; font-size: 16px; min-height: 54px; }
.cta-btn.soft::after { display: none; }
.cta-btn.sending { color: transparent; pointer-events: none; }
.cta-btn.sending::before { content: ""; position: absolute; width: 24px; height: 24px; left: calc(50% - 12px); top: calc(50% - 12px); border: 2.5px solid rgba(255, 255, 255, .9); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; z-index: 2; }
.cta-btn.done { color: #fff; background: linear-gradient(120deg, #10b981, #34d399); animation: donepulse .9s var(--spring) both; }
.cta-btn.done::before { display: none; }
.cta-btn.done .draw { stroke-dasharray: 30; stroke-dashoffset: 30; animation: drawck .45s var(--ease-out) .05s forwards; }
@keyframes drawck { to { stroke-dashoffset: 0; } }
@keyframes donepulse { 0% { transform: scale(.96); box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 60% { transform: scale(1.02); box-shadow: 0 0 0 18px rgba(52, 211, 153, 0); } 100% { transform: none; box-shadow: 0 16px 36px -14px rgba(16, 185, 129, .7); } }
@keyframes flowgrad { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes sheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.cta { display: flex; flex-direction: column; gap: 10px; }

/* ---------- home tabs (glass segmented control) ---------- */
.tabs2 {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 4px; margin-bottom: 14px;
  border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
}
.seg-ind {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: 14px;
  background: var(--glass-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 18px -8px rgba(0, 0, 0, .5);
  transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .5s var(--spring);
}
.seg-ind::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); opacity: .9; }
.tabs2 button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 4px; font-weight: 700; font-size: 15px; color: var(--ink-3); transition: color .25s; }
.tabs2 button[aria-selected="true"] { color: var(--ink); }
.count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font-size: 12px; font-weight: 750; display: inline-grid; place-items: center; }
.count.alert { background: linear-gradient(135deg, #fbbf24, #f97316); color: #1a1205; box-shadow: 0 0 14px rgba(251, 191, 36, .45); }
.count:empty { display: none; }

/* ---------- Cover Flow stage ---------- */
.stage {
  position: relative; border-radius: var(--r-xl); overflow: hidden; padding: 12px 0 18px; color: #fff;
  background: var(--stage); border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 30px 70px -30px rgba(10, 8, 40, .9);
  isolation: isolate;
}
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 40% at 50% 0%, rgba(139, 123, 255, .28), transparent 70%); pointer-events: none; }
.stage-light { position: absolute; left: 50%; top: 48%; width: 80%; height: 40%; transform: translate(-50%, 0); background: radial-gradient(50% 50% at 50% 50%, rgba(124, 247, 255, .16), transparent 70%); pointer-events: none; animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; transform: translate(-50%, 0) scale(1.08); } }
.flow { position: relative; width: 100%; perspective: 1100px; perspective-origin: 50% 36%; touch-action: pan-y; -webkit-user-select: none; user-select: none; outline: none; }
.fcard {
  position: absolute; left: 50%; top: 10px; border-radius: 20px; cursor: pointer; will-change: transform; transform-origin: 50% 50%;
  -webkit-box-reflect: below 8px linear-gradient(transparent, transparent 64%, rgba(255, 255, 255, .2));
}
.fface {
  position: relative; width: 100%; height: 100%; border-radius: 20px; overflow: hidden; background: #171635;
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .1);
  filter: brightness(calc(1 - var(--shade, 0) * .3));
}
.fface::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(125deg, rgba(255, 255, 255, .2) 0%, rgba(255, 255, 255, .04) 30%, transparent 46%); }
.fcard.center .fface { view-transition-name: hero; }
.fface img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.fph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: rgba(255, 255, 255, .8); background: linear-gradient(160deg, #2c2a6a, #12112c); font: 800 42px/1 var(--font-round); }
.fph small { font: 750 12.5px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.fph.loading { background: linear-gradient(110deg, #19183a 30%, #262559 50%, #19183a 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.fqr { width: 100%; height: 100%; background: #fff; color: #0a0b1f; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; text-align: center; font-weight: 800; }
.fqr img, .fqr svg { width: 78%; height: auto; display: block; }
.fbadge {
  position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 5px 10px; border-radius: 999px; color: #fff;
  background: rgba(10, 10, 30, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.fbadge.draft { background: linear-gradient(135deg, rgba(251, 191, 36, .95), rgba(249, 115, 22, .95)); color: #1a1205; }
.fbadge.ready { background: linear-gradient(135deg, rgba(124, 140, 255, .95), rgba(139, 123, 255, .95)); }
.fbadge.fail { background: rgba(255, 90, 110, .92); }
.fbadge.ok { background: linear-gradient(135deg, rgba(16, 185, 129, .95), rgba(52, 211, 153, .95)); color: #04140d; }
.fnotes { position: absolute; bottom: 10px; right: 10px; display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 5px 9px; border-radius: 999px; background: rgba(10, 10, 30, .6); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.fnotes svg { width: 13px; height: 13px; }

.fcap { position: relative; text-align: center; padding: 0 22px; min-height: 100px; }
.fcap.swap > * { animation: rise .45s var(--spring-soft) both; }
.fcap.swap > *:nth-child(2) { animation-delay: .03s; }
.fcap.swap > *:nth-child(3) { animation-delay: .06s; }
.fcap-time { font-size: 12.5px; color: rgba(255, 255, 255, .55); font-weight: 650; }
.fcap-title { font: 750 20px/1.2 var(--font-display); letter-spacing: -.02em; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcap-sub { font-size: 14px; color: rgba(255, 255, 255, .72); margin-top: 1px; }
.fcap-status { display: inline-flex; margin-top: 8px; font-size: 12.5px; font-weight: 800; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.fcap-status.draft { background: linear-gradient(135deg, #fbbf24, #f97316); color: #1a1205; box-shadow: 0 0 20px rgba(251, 191, 36, .35); }
.fcap-status.ready { background: linear-gradient(135deg, #7c8cff, #8b7bff); color: #fff; box-shadow: 0 0 20px rgba(124, 140, 255, .4); }
.fcap-status.fail { background: var(--hot); color: #fff; }
.fcap-status.ok { background: rgba(52, 211, 153, .16); color: #6ee7b7; box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .3); }
.fcap-hint { font-size: 12px; color: rgba(255, 255, 255, .42); margin-top: 7px; }

.scrub { -webkit-appearance: none; appearance: none; display: block; width: calc(100% - 52px); height: 26px; margin: 12px auto 0; background: transparent; --p: 1; }
.scrub::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, rgba(124, 247, 255, .9), rgba(139, 123, 255, .9) calc(var(--p) * 100%), rgba(255, 255, 255, .14) calc(var(--p) * 100%)); }
.scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(139, 123, 255, .35), 0 4px 14px rgba(0, 0, 0, .5); }
.scrub::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); }
.scrub::-moz-range-progress { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.scrub::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(139, 123, 255, .35); }

.empty-stage { position: relative; text-align: center; color: rgba(255, 255, 255, .7); padding: 52px 26px 46px; line-height: 1.6; }
.empty-stage b { color: #fff; }
.es-ico { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 24px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, rgba(124, 247, 255, .25), rgba(139, 123, 255, .35), rgba(255, 106, 213, .25)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 34px -10px rgba(139, 123, 255, .6); animation: float 5s ease-in-out infinite; }
.es-ico svg { width: 32px; height: 32px; }
.es-ico.ok { background: linear-gradient(140deg, rgba(16, 185, 129, .5), rgba(52, 211, 153, .35)); }
@keyframes float { 50% { transform: translateY(-6px); } }

/* ---------- floating scan button ---------- */
.fab { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 18px 16px calc(env(safe-area-inset-bottom) + 14px); background: linear-gradient(to top, var(--bg) 40%, transparent); view-transition-name: fab; pointer-events: none; }
.scan-btn {
  pointer-events: auto; position: relative; overflow: hidden; width: 100%; max-width: 608px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 12px;
  height: 64px; border-radius: 22px; color: #fff; font: 750 19px/1 var(--font-display); letter-spacing: -.015em;
  background: var(--brand); background-size: 220% 220%; animation: flowgrad 8s ease infinite;
  box-shadow: 0 20px 44px -16px rgba(139, 123, 255, .9), 0 0 0 1px rgba(255, 255, 255, .14) inset, inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .4s var(--spring);
}
.scan-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .32) 48%, transparent 66%); transform: translateX(-120%); animation: sheen 5s ease-in-out infinite 2s; }
.scan-btn:active { transform: scale(.97); }
.sb-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.sb-ico svg { width: 22px; height: 22px; }

/* ---------- install banner ---------- */
.banner { display: flex; align-items: center; gap: 12px; padding: 11px 12px 11px 11px; border-radius: var(--r-md); font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.banner > div { flex: 1; }
.banner button { color: var(--ink-3); font-size: 16px; padding: 4px; }
.banner .ghost { width: auto; padding: 8px 14px; font-size: 14px; color: var(--ink); }

/* ---------- detail ---------- */
.status-banner { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-sm); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: rise .5s var(--spring-soft) both; }
.status-banner b { display: block; font: 700 16px/1.25 var(--font-display); letter-spacing: -.01em; }
.status-banner div > span { font-size: 14px; color: var(--ink-2); }
.sb-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--ink-3); }
.status-banner.draft .sb-dot { background: var(--amber); animation: ping 2s ease-out infinite; }
.status-banner.ready .sb-dot { background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.status-banner.wait .sb-dot { background: transparent; border: 2px solid var(--amber); border-right-color: transparent; width: 12px; height: 12px; animation: spin .8s linear infinite; }
.status-banner.fail .sb-dot { background: var(--hot); box-shadow: 0 0 12px var(--hot); }
.status-banner.ok .sb-dot { background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.status-banner.draft { background: linear-gradient(135deg, rgba(251, 191, 36, .14), transparent 60%), var(--glass); border-color: rgba(251, 191, 36, .28); }
.status-banner.ready { background: linear-gradient(135deg, rgba(124, 140, 255, .18), transparent 60%), var(--glass); border-color: rgba(124, 140, 255, .32); }
.status-banner.fail { background: linear-gradient(135deg, rgba(255, 90, 110, .16), transparent 60%), var(--glass); border-color: rgba(255, 90, 110, .32); }
.status-banner.ok { background: linear-gradient(135deg, rgba(52, 211, 153, .15), transparent 60%), var(--glass); border-color: rgba(52, 211, 153, .3); }
/* in-place refreshes of the same lead: only what changed moves */
.detail.same .status-banner:not(.bump), .detail.same .note-item:not(.fresh) { animation: none; }
.status-banner.bump { animation: bump .6s var(--spring) both; }
@keyframes bump { 0% { transform: scale(.965); filter: brightness(1.35); } 100% { transform: none; filter: none; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, .55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); } }

.photo { position: relative; width: 100%; border-radius: var(--r-lg); overflow: hidden; background: #08081a; border: 1px solid var(--glass-edge); box-shadow: var(--shadow); height: 34vh; min-height: 210px; display: grid; place-items: center; color: var(--ink-3); }
.photo.hero { view-transition-name: hero; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.photo img.bgblur { inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; filter: blur(26px) saturate(1.5) brightness(.42); transform: scale(1.05); }
.photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.empty-photo { height: auto; min-height: 120px; font-weight: 600; }
.ph-loading { position: absolute; inset: 0; background: linear-gradient(110deg, #101026 30%, #1b1b40 50%, #101026 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.ph-msg { padding: 20px; text-align: center; }

.person { padding: 16px; border-radius: var(--r-lg); }
.person-head { display: flex; gap: 13px; align-items: center; }
.avatar { width: 52px; height: 52px; border-radius: 18px; flex: none; display: grid; place-items: center; color: #fff; font: 800 19px/1 var(--font-round); background: var(--brand); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 24px -10px rgba(139, 123, 255, .8); }
.person h2 { margin: 0; font: 750 23px/1.15 var(--font-display); letter-spacing: -.025em; }
.person .sub { color: var(--ink-2); margin-top: 2px; font-size: 15px; }
.kv { font-size: 13.5px; color: var(--ink-3); margin-top: 10px; word-break: break-word; }
.kv.loc { display: flex; align-items: center; gap: 5px; }
.li { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 14px 9px 9px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--ink); text-decoration: none; background: var(--glass-2); border: 1px solid var(--glass-edge); }
.li-badge { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: #0a66c2; color: #fff; font: 800 12px/1 var(--font); }
.about { margin: 12px 0 0; color: var(--ink-2); font-size: 14px; }
.jobs { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); display: grid; gap: 3px; }
.jobs div::before { content: "•"; color: var(--c2); margin-right: 7px; }
.from-msg { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
.from-msg b { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 4px; }

/* record orb */
.rec-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px 0 0; }
.orb-stage { position: relative; width: 236px; height: 236px; display: grid; place-items: center; }
#viz { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rec {
  --lvl: 0;
  position: relative; width: 108px; height: 108px; border-radius: 50%; color: #fff; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 28%, #ff9bb3 0%, #ff4d74 38%, #d6164e 72%, #8f0b35 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) inset, inset 0 -10px 24px rgba(80, 0, 30, .55), inset 0 8px 18px rgba(255, 255, 255, .28),
    0 18px 40px -10px rgba(255, 60, 110, .75), 0 0 calc(30px + var(--lvl) * 70px) calc(var(--lvl) * 18px) rgba(255, 80, 130, calc(.25 + var(--lvl) * .5));
  transform: scale(calc(1 + var(--lvl) * .14)); transition: transform .08s linear;
  animation: idle 3.4s ease-in-out infinite;
}
.rec::before, .rec::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1.5px solid rgba(255, 110, 150, .35); opacity: 0; pointer-events: none; }
.rec svg { width: 40px; height: 40px; filter: drop-shadow(0 2px 6px rgba(80, 0, 30, .5)); }
.rec.on { animation: none; }
.rec.on::before { animation: ripple 2s ease-out infinite; }
.rec.on::after { animation: ripple 2s ease-out infinite 1s; }
.rec.on .ico-mic { display: none; }
.rec:not(.on) .ico-stop { display: none; }
.rec:active { transform: scale(.94); }
@keyframes idle { 50% { box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) inset, inset 0 -10px 24px rgba(80, 0, 30, .55), inset 0 8px 18px rgba(255, 255, 255, .28), 0 22px 54px -8px rgba(255, 60, 110, .95), 0 0 46px 6px rgba(255, 80, 130, .3); } }
@keyframes ripple { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.55); } }
.rec-label { font-weight: 700; color: var(--ink-2); font-size: 15px; margin-top: -10px; }
.rec-wrap.on .rec-label { color: var(--ink); }

.notes { display: flex; flex-direction: column; gap: 9px; }
.note-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: var(--r-md); animation: rise .5s var(--spring-soft) both; animation-delay: var(--d, 0ms); }
.play { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: var(--brand); box-shadow: 0 8px 18px -8px rgba(139, 123, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .3s var(--spring); }
.play:active { transform: scale(.9); }
.play.done { background: rgba(52, 211, 153, .18); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .35); font-weight: 800; }
.info { flex: 1; font-size: 14.5px; font-weight: 650; }
.info .dur { color: var(--ink-3); font-weight: 600; margin-left: 4px; }
.info small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 500; margin-top: 1px; }
.wave { display: flex; align-items: center; gap: 2.5px; height: 26px; }
.wave i { width: 3px; border-radius: 3px; background: linear-gradient(to top, var(--c2), var(--c1)); opacity: .55; height: 30%; }
.wave i:nth-child(3n) { height: 70%; } .wave i:nth-child(4n) { height: 48%; } .wave i:nth-child(5n) { height: 90%; } .wave i:nth-child(7n) { height: 40%; }
.note-item:has(.playing) .wave i { opacity: 1; animation: eq .9s ease-in-out infinite; }
.note-item:has(.playing) .wave i:nth-child(2n) { animation-delay: -.3s; }
.note-item:has(.playing) .wave i:nth-child(3n) { animation-delay: -.6s; }
@keyframes eq { 50% { transform: scaleY(.35); } }

.qrbox { display: flex; gap: 14px; align-items: center; padding: 13px; border-radius: var(--r-lg); }
.qrbox .qr { width: 96px; height: 96px; flex: none; background: #fff; border-radius: 16px; padding: 6px; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .55); }
.qrbox .qr svg, .qrbox .qr img { width: 100%; height: 100%; display: block; }
.qr-meta { min-width: 0; }
.qr-meta b { display: block; font-size: 14px; margin-bottom: 3px; }
.qtext { font-size: 13px; color: var(--ink-2); word-break: break-all; display: block; }
.qrbox a.qtext { color: #8fa0ff; text-decoration: none; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.seg button { padding: 13px 6px; border-radius: 15px; font-weight: 700; font-size: 14.5px; color: var(--ink-2); background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-sm); transition: transform .4s var(--spring), background .25s, color .25s, box-shadow .25s; }
.seg button:active { transform: scale(.95); }
.seg button[aria-pressed="true"] { color: #fff; transform: translateY(-1px); }
.seg button[aria-pressed="true"].hot { background: linear-gradient(135deg, #ff5a6e, #ff8a3d); border-color: transparent; box-shadow: 0 12px 26px -10px rgba(255, 90, 110, .8); }
.seg button[aria-pressed="true"].warm { background: linear-gradient(135deg, #fbbf24, #f97316); border-color: transparent; color: #1a1205; box-shadow: 0 12px 26px -10px rgba(251, 191, 36, .7); }
.seg button[aria-pressed="true"].cold { background: linear-gradient(135deg, #38bdf8, #6366f1); border-color: transparent; box-shadow: 0 12px 26px -10px rgba(56, 189, 248, .7); }

textarea { width: 100%; min-height: 92px; resize: vertical; border-radius: var(--r-md); padding: 13px 14px; font-size: 16px; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s; }
textarea:focus { border-color: rgba(139, 123, 255, .6); box-shadow: 0 0 0 4px rgba(139, 123, 255, .18), var(--shadow-sm); }
textarea::placeholder { color: var(--ink-3); }
.transcript { padding: 14px; border-radius: var(--r-md); font-size: 14px; color: var(--ink-2); white-space: pre-wrap; }

.danger-zone { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 10px; display: flex; flex-direction: column; gap: 9px; }
.danger-zone .section-title { margin-top: 0; }
.danger-zone p { margin: 0 0 4px; }

/* storage */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { border-radius: var(--r-md); padding: 12px 13px; }
.stat b { display: block; font: 750 26px/1.1 var(--font-display); letter-spacing: -.03em; }
.stat span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.25; color: var(--ink-3); font-weight: 650; }
.store-num { font-size: 15px; }
.store-num b { font: 750 20px/1 var(--font-display); }
.meter { height: 8px; border-radius: 8px; background: var(--line-2); margin: 12px 0 10px; overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--p); background: var(--brand); border-radius: 8px; animation: grow .9s var(--ease-out) both; }
@keyframes grow { from { width: 0; } }

/* ---------- confirmation sheet ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 24px; background: rgba(2, 2, 10, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s ease; }
.modal-wrap.in { opacity: 1; }
.modal-wrap.out { opacity: 0; }
.modal { width: min(360px, 100%); border-radius: 28px; padding: 24px 20px 18px; text-align: center; background: var(--glass-solid); transform: translateY(18px) scale(.92); transition: transform .5s var(--spring); }
.modal-wrap.in .modal { transform: none; }
.modal-wrap.out .modal { transform: scale(.96); transition-duration: .2s; }
.modal-ico { width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #ff6b81, #e11d48); box-shadow: 0 14px 30px -10px rgba(225, 29, 72, .75), inset 0 1px 0 rgba(255, 255, 255, .35); }
.modal-ico svg { width: 30px; height: 30px; }
.modal-wrap.in .modal-ico .lid { animation: lid 1s var(--spring) .25s both; }
@keyframes lid { 0% { transform: none; } 35% { transform: rotate(-22deg) translateY(-2px); } 70% { transform: rotate(6deg); } 100% { transform: none; } }
.modal h3 { margin: 4px 0 6px; font: 750 20px/1.2 var(--font-display); letter-spacing: -.02em; }
.modal p { margin: 0 0 20px; color: var(--ink-2); font-size: 15px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions button:disabled { opacity: .4; }
.danger-solid { background: linear-gradient(140deg, #ff5a6e, #e11d48) !important; border-color: transparent !important; color: #fff !important; box-shadow: 0 12px 26px -12px rgba(225, 29, 72, .8) !important; }

/* ---------- team ---------- */
.teampanel { animation: rise .45s var(--spring-soft) both; }
.filters { display: flex; gap: 7px; overflow-x: auto; padding: 4px 18px 16px 4px; margin: -4px -16px -4px -4px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink-2); background: var(--glass); border: 1px solid var(--glass-edge); transition: transform .35s var(--spring), background .2s, color .2s; }
.filters button:active { transform: scale(.94); }
.filters button[aria-pressed="true"] { color: #fff; background: var(--brand); border-color: transparent; box-shadow: 0 10px 22px -10px rgba(139, 123, 255, .85); }
.search { width: 100%; padding: 13px 15px; border-radius: var(--r-md); margin-bottom: 10px; font-size: 16px; color: var(--ink); outline: none; }
.search:focus { border-color: rgba(139, 123, 255, .55); box-shadow: 0 0 0 4px rgba(139, 123, 255, .16); }
.team-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 4px 6px; font-size: 13px; }
.link { color: #8fa0ff; font-weight: 750; padding: 4px 2px; font-size: 13.5px; }
.list { display: flex; flex-direction: column; gap: 9px; }
.card {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; padding: 11px; border-radius: var(--r-md);
  background: var(--glass-2); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-sm);
  animation: rise .5s var(--spring-soft) both; animation-delay: var(--d, 0ms); transition: transform .35s var(--spring);
}
.card:active { transform: scale(.98); }
.thumb { width: 58px; height: 58px; border-radius: 15px; flex: none; overflow: hidden; display: grid; place-items: center; color: #fff; font: 800 18px/1 var(--font-round); background: var(--brand); }
.thumb.qr { background: #fff; padding: 5px; }
.thumb img, .thumb svg { width: 100%; height: 100%; display: block; }
.meta { flex: 1; min-width: 0; }
.t1 { font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2 { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chip { font-size: 11.5px; font-weight: 750; padding: 3px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); }
.chip.hot { background: rgba(255, 90, 110, .18); color: #ff8b9a; }
.chip.warm { background: rgba(251, 191, 36, .18); color: #fcd34d; }
.chip.cold { background: rgba(56, 189, 248, .18); color: #7dd3fc; }
.chip.ok { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
.chip.user { background: var(--ink); color: var(--bg); }
.chip.dupe { background: rgba(251, 191, 36, .18); color: #fcd34d; }
.chip.li-chip { background: #0a66c2; color: #fff; }
.footnote { margin-top: 16px; text-align: center; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .chip.hot { color: #d61f3b; }
  :root:not([data-theme="dark"]) .chip.warm, :root:not([data-theme="dark"]) .chip.dupe { color: #b45309; }
  :root:not([data-theme="dark"]) .chip.cold { color: #0369a1; }
  :root:not([data-theme="dark"]) .chip.ok { color: #047857; }
  :root:not([data-theme="dark"]) .qrbox a.qtext, :root:not([data-theme="dark"]) .link { color: #4f46e5; }
}

/* ---------- scanner ---------- */
.scanner { position: fixed; inset: 0; background: #000; z-index: 50; overflow: hidden; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.scanner.live video { opacity: 1; }
.scan-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(75% 60% at 50% 44%, transparent 42%, rgba(0, 0, 0, .62) 100%); }
.frame {
  position: absolute; left: 50%; top: 44%; width: min(68vw, 320px); aspect-ratio: 1; transform: translate(-50%, -50%);
  transition: left .26s var(--spring-soft), top .26s var(--spring-soft), width .26s var(--spring-soft);
}
.frame i { position: absolute; width: 22%; height: 22%; border: 0 solid rgba(255, 255, 255, .95); filter: drop-shadow(0 0 10px rgba(124, 247, 255, .55)); transition: border-color .2s, filter .2s; }
.frame i:nth-child(1) { left: 0; top: 0; border-left-width: 4px; border-top-width: 4px; border-top-left-radius: 22px; }
.frame i:nth-child(2) { right: 0; top: 0; border-right-width: 4px; border-top-width: 4px; border-top-right-radius: 22px; }
.frame i:nth-child(3) { right: 0; bottom: 0; border-right-width: 4px; border-bottom-width: 4px; border-bottom-right-radius: 22px; }
.frame i:nth-child(4) { left: 0; bottom: 0; border-left-width: 4px; border-bottom-width: 4px; border-bottom-left-radius: 22px; }
.scanner.live .frame:not(.hit) { animation: seek 2.4s ease-in-out infinite; }
@keyframes seek { 50% { transform: translate(-50%, -50%) scale(.95); } }
.beam { position: absolute; left: 8%; right: 8%; top: 10%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--c1), var(--c2), transparent); box-shadow: 0 0 18px 2px rgba(124, 247, 255, .55); opacity: 0; }
.scanner.live .frame:not(.hit) .beam { opacity: 1; animation: beam 2.2s ease-in-out infinite; }
@keyframes beam { 0% { top: 10%; } 50% { top: 88%; } 100% { top: 10%; } }
.frame.hit i { border-color: #4ff0b4; filter: drop-shadow(0 0 16px rgba(79, 240, 180, .9)); }
.frame.hit { animation: lock .42s var(--spring) both; }
@keyframes lock { 0% { transform: translate(-50%, -50%) scale(1.12); } 100% { transform: translate(-50%, -50%) scale(1); } }
.hint { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 72px); transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; color: #fff; font-weight: 650; font-size: 14.5px; white-space: nowrap; background: rgba(20, 20, 40, .45); border-color: rgba(255, 255, 255, .16); z-index: 3; }
.close { position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 14px; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-size: 18px; background: rgba(20, 20, 40, .45); border-color: rgba(255, 255, 255, .16); z-index: 3; }
.scanner .bottom { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 28px); display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 3; }
.shutter { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; border: 4px solid rgba(255, 255, 255, .92); background: transparent; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.shutter span { width: 62px; height: 62px; border-radius: 50%; background: #fff; transition: transform .25s var(--spring); }
.shutter:active span { transform: scale(.84); }
.shutter-label { color: rgba(255, 255, 255, .86); font-size: 13px; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.freeze { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; view-transition-name: hero; animation: freeze .32s ease-out both; }
@keyframes freeze { 0% { filter: brightness(2.2) saturate(.4); } 100% { filter: none; } }
.scanner.captured .scan-vignette, .scanner.captured .frame { z-index: 2; }
.scanner.captured .hint, .scanner.captured .bottom { opacity: 0; transition: opacity .2s; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: calc(env(safe-area-inset-top) + 24px) 24px calc(env(safe-area-inset-bottom) + 24px); max-width: 440px; margin: 0 auto; }
.login-mark { margin-bottom: 22px; animation: float 6s ease-in-out infinite 1.6s; }
.login h1 { margin: 0 0 8px; font: 800 38px/1.05 var(--font-display); letter-spacing: -.04em; background: linear-gradient(120deg, var(--ink) 30%, var(--c2) 62%, var(--c3)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise .8s var(--spring-soft) .35s both; }
.login > p { margin: 0 0 26px; color: var(--ink-2); font-size: 16px; animation: rise .8s var(--spring-soft) .45s both; }
.login-card { width: 100%; padding: 18px; border-radius: 26px; text-align: left; animation: rise .8s var(--spring-soft) .55s both; }
.login-card label { display: block; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 2px 4px 9px; }
.login-card input { width: 100%; padding: 17px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg) 40%, transparent); color: var(--ink); outline: none; font: 750 20px/1 var(--font-round); letter-spacing: .14em; text-transform: uppercase; text-align: center; transition: border-color .2s, box-shadow .2s; }
.login-card input:focus { border-color: rgba(139, 123, 255, .65); box-shadow: 0 0 0 4px rgba(139, 123, 255, .2); }
.login-card input::placeholder { color: var(--ink-3); letter-spacing: .1em; }
.login-card .cta-btn { margin-top: 12px; }
.login-card .cta-btn:disabled { opacity: .7; }
.ver { margin-top: 22px; }

/* ---------- screen transitions (View Transitions API) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .42s; animation-timing-function: cubic-bezier(.2, .9, .25, 1); }
html[data-nav="forward"]::view-transition-old(root) { animation-name: vt-push-out; }
html[data-nav="forward"]::view-transition-new(root) { animation-name: vt-push-in; }
html[data-nav="back"]::view-transition-old(root) { animation-name: vt-pop-out; }
html[data-nav="back"]::view-transition-new(root) { animation-name: vt-pop-in; }
@keyframes vt-push-out { to { transform: translateX(-18%) scale(.97); opacity: 0; } }
@keyframes vt-push-in { from { transform: translateX(26%); opacity: 0; } }
@keyframes vt-pop-out { to { transform: translateX(26%); opacity: 0; } }
@keyframes vt-pop-in { from { transform: translateX(-18%) scale(.97); opacity: 0; } }
::view-transition-group(hero) { animation-duration: .55s; animation-timing-function: cubic-bezier(.2, .95, .22, 1); z-index: 5; }
::view-transition-old(hero), ::view-transition-new(hero) { height: 100%; width: 100%; object-fit: cover; overflow: clip; }
::view-transition-group(bar), ::view-transition-group(fab), ::view-transition-group(aurora), ::view-transition-group(toast) { animation-duration: .3s; }

/* ---------- accessibility ---------- */
:focus-visible { outline: 2px solid var(--c2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .aurora i { animation: none !important; }
}
