.lf, .lf * { box-sizing: border-box; }
.lf {
  --lf-bg: #f4f4f1; --lf-text: #15171b; --lf-muted: #545a64; --lf-line: rgba(20,22,27,.14); --lf-accent: #00748c; --lf-fill: #00d4ff; --lf-ok: #0a8a55; --lf-bad: #b4323a;
  color-scheme: light;
  position: fixed; inset: 0; z-index: 2147483000; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(700px 480px at 12% -10%, rgba(0,212,255,.12), transparent 65%), var(--lf-bg);
  color: var(--lf-text); font: 16px/1.5 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  opacity: 0; transition: opacity .35s ease; -webkit-font-smoothing: antialiased;
}
.lf.on { opacity: 1; }
.lf :where(button, input, textarea, select) { font: inherit; color: inherit; }
.lf ::selection { background: rgba(0,180,220,.25); }
.lf :focus-visible { outline: 2px solid #00a9cc; outline-offset: 3px; }
body.lf-lock { overflow: hidden; }

.lf-top { position: relative; flex: none; display: flex; align-items: center; gap: 12px; padding: calc(16px + env(safe-area-inset-top)) calc(clamp(16px, 4vw, 40px) + env(safe-area-inset-right)) 16px calc(clamp(16px, 4vw, 40px) + env(safe-area-inset-left)); }
.lf-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; }
.lf-brand img { width: 30px; height: 30px; border-radius: 50%; }
.lf-brand em { font-family: 'Instrument Serif', serif; font-weight: 400; color: var(--lf-accent); }
.lf-tag { padding: 3px 10px; border: 1px solid rgba(10,138,85,.35); border-radius: 999px; color: var(--lf-ok); background: rgba(10,138,85,.08); font-size: 12.5px; font-weight: 500; }
.lf-x { margin-left: auto; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--lf-line); background: #fff; cursor: pointer; font-size: 20px; color: var(--lf-text); transition: border-color .2s; }
.lf-x:hover { border-color: rgba(20,22,27,.32); }
.lf-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(20,22,27,.08); }
.lf-bar i { display: block; height: 100%; width: 0; background: var(--lf-fill); border-radius: 0 3px 3px 0; transition: width .5s cubic-bezier(.2,.8,.2,1); }

.lf-stage { position: relative; flex: 1; min-height: 0; }
.lf-step { position: absolute; inset: 0; display: flex; overflow-y: auto; padding: clamp(18px, 5vh, 56px) clamp(18px, 5vw, 40px) 120px; opacity: 0; transform: translateY(46px); transition: opacity .45s ease, transform .55s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.lf-step.in { opacity: 1; transform: none; pointer-events: auto; }
.lf-step.out-up { opacity: 0; transform: translateY(-46px); }
.lf-step.out-down { opacity: 0; transform: translateY(46px); }
.lf-step.from-up { transform: translateY(-46px); }
.lf-in { width: 100%; max-width: 700px; margin: auto; }
.lf-n { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font: 500 14px 'JetBrains Mono', ui-monospace, monospace; color: var(--lf-accent); }
.lf-n svg { width: 14px; height: 14px; }
.lf-q { margin: 0; font-size: clamp(26px, 4.4vw, 40px); line-height: 1.12; font-weight: 500; letter-spacing: -.035em; text-wrap: balance; }
.lf-q em { font-family: 'Instrument Serif', serif; font-weight: 400; color: var(--lf-accent); }
.lf-q .req { color: var(--lf-accent); }
.lf-help { margin: 12px 0 0; color: var(--lf-muted); font-size: clamp(15.5px, 1.8vw, 18px); }
.lf-help b { color: var(--lf-text); font-weight: 600; }
.lf-help a, .lf-in a { color: var(--lf-accent); }

.lf-field { margin-top: clamp(22px, 4vh, 34px); }
.lf-input { width: 100%; padding: 8px 0 12px; border: 0; border-bottom: 2px solid rgba(20,22,27,.2); background: none; outline: none; font-size: clamp(21px, 3vw, 28px); letter-spacing: -.01em; transition: border-color .2s; border-radius: 0; }
.lf-input::placeholder { color: rgba(84,90,100,.5); }
.lf-input:focus { border-bottom-color: #00a9cc; }
.lf-input:focus-visible { outline: none; }
textarea.lf-input { min-height: 120px; resize: none; line-height: 1.4; }
.lf-input[type=number] { -moz-appearance: textfield; }
.lf-input[type=number]::-webkit-outer-spin-button, .lf-input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.lf-opts { display: grid; gap: 10px; max-width: 520px; }
.lf-opts.wide { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lf-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--lf-line); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; font-size: 17px; transition: background .2s, border-color .2s, transform .15s; }
.lf-opt:hover { border-color: rgba(0,150,180,.55); }
.lf-opt:active { transform: scale(.99); }
.lf-opt kbd { flex: none; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border: 1px solid var(--lf-line); border-radius: 7px; font: 600 12.5px 'JetBrains Mono', monospace; color: var(--lf-muted); background: var(--lf-bg); }
.lf-opt span { flex: 1; }
.lf-opt .ck { flex: none; width: 18px; height: 18px; opacity: 0; color: var(--lf-ok); transition: opacity .2s; }
.lf-opt.sel { background: rgba(0,212,255,.08); border-color: #00a9cc; }
.lf-opt.sel kbd { background: var(--lf-text); color: #fff; border-color: var(--lf-text); }
.lf-opt.sel .ck { opacity: 1; }
.lf-opt.blink { animation: lfBlink .32s ease 2; }
@keyframes lfBlink { 50% { background: rgba(0,212,255,.22); } }

.lf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: clamp(22px, 4vh, 32px); }
.lf-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--lf-fill); color: #021318; font-weight: 600; font-size: 17px; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, opacity .2s; }
.lf-btn:hover { background: #3ddfff; box-shadow: 0 12px 26px -14px rgba(20,22,27,.45); }
.lf-btn:active { transform: scale(.98); }
.lf-btn[disabled] { opacity: .55; cursor: wait; }
.lf-btn.ghost { background: transparent; color: var(--lf-text); border: 1px solid var(--lf-line); }
.lf-btn.ghost:hover { background: rgba(20,22,27,.04); box-shadow: none; }
.lf-btn.big { min-height: 56px; padding: 0 30px; font-size: 18px; }
.lf-btn svg { width: 16px; height: 16px; }
.lf-hint { color: var(--lf-muted); font-size: 13.5px; }
.lf-hint b { font-weight: 600; color: var(--lf-text); }
.lf-skip { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--lf-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14.5px; }
.lf-err { min-height: 22px; margin-top: 12px; color: var(--lf-bad); font-size: 15px; }
.lf-err:empty { margin: 0; min-height: 0; }
.lf-err.shake { animation: lfShake .35s; }
@keyframes lfShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.lf-hero .lf-q { font-size: clamp(34px, 6vw, 60px); line-height: 1.02; letter-spacing: -.045em; }
.lf-list { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.lf-list li { display: flex; gap: 10px; font-size: clamp(15.5px, 1.8vw, 17.5px); color: var(--lf-text); }
.lf-list li::before { content: ''; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: #15171b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300d4ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") no-repeat center / 13px; }
.lf-left { display: inline-flex; margin-top: 18px; padding: 6px 12px; border-radius: 999px; background: rgba(10,138,85,.08); border: 1px solid rgba(10,138,85,.35); color: var(--lf-ok); font-size: 14px; font-weight: 500; }
.lf-time { margin-left: 4px; }
.lf-warn { margin-top: 22px; padding: 16px 18px; border: 1px solid rgba(180,50,58,.3); border-radius: 16px; background: rgba(180,50,58,.05); color: #5a1f24; font-size: 16.5px; }
.lf-consent { display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; padding: 16px; border: 1px solid var(--lf-line); border-radius: 16px; background: #fff; cursor: pointer; font-size: 15.5px; color: var(--lf-text); }
.lf-consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: #15171b; flex: none; }
.lf-done-ic { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 22px; border-radius: 50%; background: #15171b; color: var(--lf-fill); font-size: 28px; animation: lfPop .6s cubic-bezier(.2,1.4,.4,1); }
@keyframes lfPop { from { transform: scale(.4); opacity: 0; } }
.lf-sum { margin-top: 20px; display: grid; gap: 4px; color: var(--lf-muted); font-size: 15px; }

.lf-nav { position: absolute; right: clamp(16px, 4vw, 40px); bottom: 20px; display: flex; z-index: 2; }
.lf-nav button { width: 46px; height: 42px; border: 1px solid var(--lf-line); background: #fff; color: var(--lf-text); cursor: pointer; transition: background .2s; }
.lf-nav button:first-child { border-radius: 999px 0 0 999px; border-right: 0; }
.lf-nav button:last-child { border-radius: 0 999px 999px 0; }
.lf-nav button:hover:not([disabled]) { background: rgba(20,22,27,.05); }
.lf-nav button[disabled] { opacity: .35; cursor: default; }
.lf-nav svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
  .lf-top { padding: calc(12px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 12px calc(16px + env(safe-area-inset-left)); }
  .lf-brand span.lf-tag { display: none; }
  .lf-step { padding: 22px 18px 140px; }
  .lf-in { margin: 0 auto auto; padding-top: 4vh; }
  .lf-opts.wide { grid-template-columns: 1fr; }
  .lf-opt { padding: 14px; font-size: 16.5px; }
  .lf-input { font-size: 22px; }
  .lf-actions { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(244,244,241,0), rgba(244,244,241,.96) 30%); }
  .lf-actions .lf-btn { flex: 1; justify-content: center; }
  .lf-hint.kbd { display: none; }
  .lf-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lf, .lf-step, .lf-bar i { transition: none; }
  .lf-step { transform: none !important; }
  .lf-opt.blink, .lf-err.shake, .lf-done-ic { animation: none; }
}

.lf-login .lf-q { font-size: clamp(30px, 5vw, 48px); line-height: 1.06; letter-spacing: -.04em; }
.lg-alt { margin: 22px 0 0; font-size: 14.5px; color: var(--lf-muted); }
.lg-alt a { color: var(--lf-accent); }
.lf-skip.lg-inline { min-height: 0; padding: 0; font-size: inherit; }
.lg-legal { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--lf-line); font-size: 13.5px; }
.lg-legal a { display: inline-flex; align-items: center; min-height: 40px; color: var(--lf-muted); text-decoration: none; }
.lg-legal a:hover { color: var(--lf-text); }
.lg-legal span { margin-left: auto; display: inline-flex; align-items: center; color: var(--lf-muted); }
.lf-brand .lg-logo { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--lf-line); }
.lf-brand .lg-ini { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--lf-text); color: #fff; font-style: normal; font-weight: 700; }
@media (max-width: 640px) {
  .lf-login .lf-step { padding-bottom: 170px; }
  .lf-login .lf-actions { flex-wrap: wrap; }
  .lf-login .lf-actions .lf-btn.ghost { flex: 1 1 100%; }
  .lg-legal span { margin-left: 0; }
}

.lf h2.lf-q, .lf .lf-q { color: var(--lf-text); font-family: 'Instrument Sans', system-ui, sans-serif; }
.lf .lf-help { color: var(--lf-muted); }
.lf input.lf-input, .lf textarea.lf-input { min-height: 0; padding: 8px 0 12px; border: 0; border-bottom: 2px solid rgba(20,22,27,.2); border-radius: 0; background: none; box-shadow: none; color: var(--lf-text); font-size: clamp(21px, 3vw, 28px); }
.lf input.lf-input:focus { border-bottom-color: #00a9cc; box-shadow: none; }
.lf .lf-btn { font-family: 'Instrument Sans', system-ui, sans-serif; text-transform: none; letter-spacing: 0; }
.lf a { text-decoration: none; }
@media (max-width: 640px) { .lf input.lf-input { font-size: 22px; } }

.lf-login .lg-code { letter-spacing: .35em; font-variant-numeric: tabular-nums; }
.lf-login .lf-err.ok { color: #1f8a5b; }
