/* Помощник авиакассира — мини-приложение Telegram.
   Светлая тема — чистый «Apple»-стиль, тёмная — «Meta»-стиль со свечением.
   Цвета бренда приходят из config.js (переменные --accent, --accent-2, --glow). */

:root {
  --accent: #0A6CFF;
  --accent-2: #7A5CFF;
  --glow: #FFB86B;

  --bg: #F5F5F7;
  --bg-elev: rgba(255, 255, 255, 0.72);
  --ink: #1D1D1F;
  --ink-2: #6E6E73;
  --ink-3: #A1A1A6;
  --line: rgba(0, 0, 0, 0.08);
  --glass-border: rgba(255, 255, 255, 0.7);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 30px rgba(0,0,0,.06);
  --ok: #1DB954; --ok-bg: rgba(29,185,84,.12);
  --check: #E8A200; --check-bg: rgba(255,184,0,.16);
  --bad: #FF3B30; --bad-bg: rgba(255,59,48,.12);
  --muted-bg: rgba(120,120,128,.12);
  --edit: #0A6CFF; --edit-bg: rgba(10,108,255,.12);
  --aurora-opacity: .55;

  --radius: 22px;
  --radius-sm: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
}
:root[data-theme="dark"], :root.auto-dark {
  --bg: #050507;
  --bg-elev: rgba(28, 28, 32, 0.62);
  --ink: #F5F5F7;
  --ink-2: #A1A1A6;
  --ink-3: #6E6E73;
  --line: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.08);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px rgba(0,0,0,.45);
  --muted-bg: rgba(120,120,128,.24);
  --aurora-opacity: .9;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

/* ---------- Фон: мягкая «аврора» ---------- */
.aurora { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; opacity: var(--aurora-opacity); }
.aurora i {
  position: absolute; border-radius: 50%; filter: blur(70px);
  animation: drift 18s var(--ease) infinite alternate;
}
.aurora i:nth-child(1) { width: 420px; height: 420px; left: -140px; top: -120px; background: var(--accent); opacity: .35; }
.aurora i:nth-child(2) { width: 360px; height: 360px; right: -160px; top: 120px; background: var(--accent-2); opacity: .30; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 300px; height: 300px; left: 20%; bottom: -180px; background: var(--glow); opacity: .25; animation-delay: -12s; }
@keyframes drift { to { transform: translate3d(40px, 30px, 0) scale(1.12); } }

/* ---------- Верхняя панель ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 10px;
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; overflow: hidden;
}
.brand-logo svg { width: 18px; height: 18px; fill: #fff; transform: rotate(45deg); }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand-logo.placeholder { background: transparent; border: 1.5px dashed var(--ink-3); }
.brand-logo.placeholder::after { content: "лого"; font-size: 8.5px; color: var(--ink-3); font-weight: 600; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-agency { font-size: 11px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-agency.placeholder { border: 1px dashed var(--ink-3); border-radius: 6px; padding: 0 6px; color: var(--ink-3); width: fit-content; }
.brand-product { font-size: 15px; font-weight: 650; }
.demo-badge { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--check-bg); color: var(--check); letter-spacing: .04em; }

/* ---------- Экраны ---------- */
main { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 4px 20px calc(28px + var(--safe-b)); }
.screen { display: none; }
.screen.active { display: block; animation: enter .55s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.hero { padding: 26px 0 8px; }
.display { font-size: 40px; line-height: 1.04; font-weight: 750; letter-spacing: -0.035em; margin: 0 0 14px; }
.grad {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 55%, var(--glow) 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 17px; line-height: 1.45; color: var(--ink-2); margin: 0; }
.title { font-size: 30px; font-weight: 720; letter-spacing: -0.03em; margin: 6px 0 6px; }
.sub { font-size: 15px; color: var(--ink-2); margin: 0 0 18px; line-height: 1.45; }
.center { text-align: center; }
.fineprint { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; margin: 18px 4px 0; }
code { font-family: var(--mono); font-size: .92em; }

.glass {
  background: var(--bg-elev);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Иллюстрация паспорта ---------- */
.passport-art, .scan-card {
  position: relative; margin: 26px auto 26px; width: 100%; max-width: 340px; aspect-ratio: 1.42;
  border-radius: 20px; padding: 18px;
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 60%),
    radial-gradient(100% 90% at 0% 100%, color-mix(in srgb, var(--glow) 20%, transparent), transparent 60%),
    var(--bg-elev);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), 0 30px 60px -30px color-mix(in srgb, var(--accent) 45%, transparent);
  overflow: hidden;
  transform: perspective(900px) rotateX(8deg) rotateZ(-3deg);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: perspective(900px) rotateX(8deg) rotateZ(-3deg) translateY(-6px); } }
.pa-photo { position: absolute; left: 18px; top: 18px; width: 26%; aspect-ratio: .78; border-radius: 10px;
  background: linear-gradient(160deg, var(--muted-bg), color-mix(in srgb, var(--muted-bg) 40%, transparent)); }
.pa-lines { position: absolute; left: 36%; right: 18px; top: 22px; display: grid; gap: 9px; }
.pa-lines b { display: block; height: 8px; border-radius: 4px; background: var(--muted-bg); }
.pa-lines b:nth-child(2n) { width: 62%; }
.pa-lines b:nth-child(3) { width: 80%; }
.pa-mrz { position: absolute; left: 18px; right: 18px; bottom: 14px; font-family: var(--mono); font-size: 9.5px;
  line-height: 1.5; color: var(--ink-3); white-space: nowrap; overflow: hidden; letter-spacing: .04em; }
.pa-plane { position: absolute; right: 16px; bottom: 44px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px -6px var(--accent); }
.pa-plane svg { width: 18px; fill: #fff; transform: rotate(45deg); }

/* ---------- Кнопки ---------- */
.actions { display: grid; gap: 10px; margin-top: 6px; }
.terms-list { margin: 8px 0 16px; padding-left: 20px; font-size: 15px; line-height: 1.45; color: var(--ink); }
.terms-list li { margin-bottom: 8px; }
.sub a { color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.row2 .btn { font-size: 15px; padding: 0 12px; white-space: nowrap; }
.btn {
  appearance: none; border: 0; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 600 16px/1 var(--font); letter-spacing: -0.01em;
  min-height: 50px; padding: 0 20px; border-radius: 999px; width: 100%;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, opacity .2s;
  color: var(--ink);
}
.btn:active { transform: scale(.97); }
.btn-xl { min-height: 56px; font-size: 17px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-glass { background: var(--bg-elev); border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-small { min-height: 36px; font-size: 14px; padding: 0 16px; width: auto; }
.btn-danger { background: transparent; color: var(--bad); margin-top: 6px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.ic { width: 22px; height: 22px; fill: currentColor; }

/* ---------- Подсказки ---------- */
.tips { display: grid; gap: 8px; margin-top: 22px; }
.tip { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--ink-2); padding: 12px 14px;
  border-radius: var(--radius-sm); background: var(--bg-elev); border: 1px solid var(--glass-border); }
.tip-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--accent); background: var(--edit-bg); }

/* ---------- Сканирование ---------- */
.scan { padding-top: 30px; }
.scan-card { animation: none; transform: perspective(900px) rotateX(10deg); }
.scan-beam {
  position: absolute; left: 0; right: 0; height: 70px; top: -70px;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 35%, transparent) 70%, var(--accent) 98%, transparent);
  animation: beam 1.8s var(--ease) infinite;
  mix-blend-mode: plus-lighter;
}
@keyframes beam { to { top: 100%; } }
.shimmer { background: linear-gradient(90deg, var(--ink-3) 30%, var(--accent) 50%, var(--ink-3) 70%);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.steps { list-style: none; padding: 0; margin: 18px auto 0; max-width: 320px; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; color: var(--ink-3); transition: color .3s; }
.steps li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2px solid var(--muted-bg); transition: all .3s var(--ease); }
.steps li.run { color: var(--ink); }
.steps li.run::before { border-color: var(--accent); border-right-color: transparent; animation: spin .8s linear infinite; }
.steps li.done { color: var(--ink); }
.steps li.done::before { border: 0; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6 11-11-1.4-1.4z'/%3E%3C/svg%3E") center/16px no-repeat; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Черновик ---------- */
.doc-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--accent); background: var(--edit-bg); }
.stat-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat { padding: 14px 16px; }
.stat-k { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.stat-v { font-size: 24px; font-weight: 720; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-v small { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-left: 3px; }
.stat-v.bad { color: var(--bad); }

.warn { padding: 14px 16px; margin-bottom: 12px; font-size: 14px; line-height: 1.45; color: var(--ink);
  border-color: color-mix(in srgb, var(--check) 35%, transparent); background: color-mix(in srgb, var(--check-bg) 70%, var(--bg-elev)); }
.warn p { margin: 0; }
.warn p + p { margin-top: 6px; }

.group { overflow: hidden; }
.field {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 16px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer;
  border-bottom: 1px solid var(--line);
  animation: row .5s var(--ease) both;
}
.field:last-child { border-bottom: 0; }
.field:active { background: var(--muted-bg); }
@keyframes row { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.f-main { flex: 1; min-width: 0; }
.f-label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.f-value { font-size: 17px; font-weight: 600; margin-top: 2px; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.f-value.empty { color: var(--ink-3); font-weight: 500; font-style: italic; }
.f-note { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.35; }
.pill { flex: none; font-size: 11.5px; font-weight: 650; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.check { color: var(--check); background: var(--check-bg); }
.pill.mismatch { color: var(--bad); background: var(--bad-bg); }
.pill.unreadable { color: var(--bad); background: var(--bad-bg); }
.pill.absent { color: var(--ink-2); background: var(--muted-bg); }
.pill.edited { color: var(--edit); background: var(--edit-bg); }
.chev { width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-top: 2px solid var(--ink-3); transform: rotate(45deg); flex: none; margin-left: 2px; }
.legend { font-size: 12.5px; color: var(--ink-3); text-align: center; margin: 12px 0 0; }

.sticky-actions {
  position: sticky; bottom: 0; margin: 16px -20px 0; padding: 14px 20px calc(14px + var(--safe-b));
  background: linear-gradient(180deg, transparent, var(--bg) 30%);
}

/* ---------- Результат ---------- */
.done-badge { width: 72px; height: 72px; margin: 22px auto 6px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ok), #34C759); box-shadow: 0 14px 36px -12px var(--ok);
  animation: pop .6s var(--ease) both; }
.done-badge svg { width: 38px; fill: #fff; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); } to { transform: none; opacity: 1; } }

.segmented { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 12px;
  background: var(--muted-bg); margin: 0 0 14px; }
.segmented button { position: relative; z-index: 1; border: 0; background: transparent; color: var(--ink); font: 600 14px var(--font);
  padding: 9px 6px; border-radius: 9px; cursor: pointer; }
.seg-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 9px;
  background: var(--bg-elev); box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: transform .35s var(--ease); }
:root[data-theme="dark"] .seg-thumb { background: #3A3A3F; }
.segmented.right .seg-thumb { transform: translateX(100%); }

.result-card { padding: 18px; display: grid; gap: 14px; margin-bottom: 12px; }
.result-card pre { margin: 0; font-family: var(--mono); font-size: 15px; line-height: 1.6; white-space: pre-wrap;
  overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.result-card .btn { justify-self: start; }

.trip { padding: 16px; margin: 14px 0 6px; }
.trip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.trip-title { font-weight: 650; font-size: 15.5px; }
.trip-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.trip input[type="date"] { font: 600 15px var(--font); color: var(--ink); background: var(--muted-bg); border: 0;
  border-radius: 10px; padding: 9px 10px; min-width: 140px; }
.trip-out { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--muted-bg); font-size: 14.5px; line-height: 1.5; }
.trip-out b { font-size: 20px; }
.trip-out.bad { background: var(--bad-bg); color: var(--bad); }
.link { display: block; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }

/* ---------- Нет доступа ---------- */
.lock { width: 84px; height: 84px; margin: 70px auto 10px; border-radius: 26px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 20px 50px -18px var(--accent); }
.lock svg { width: 40px; fill: #fff; }
.id-pill { width: fit-content; margin: 8px auto; padding: 12px 20px; font-family: var(--mono); font-size: 18px; font-weight: 600; user-select: all; }

/* ---------- Листы ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.35);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 560px; margin: 0 auto;
  padding: 10px 20px calc(20px + var(--safe-b)); display: grid; gap: 10px;
  background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.25);
  animation: up .45s var(--ease) both;
}
@keyframes up { from { transform: translateY(100%); } }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--ink-3); opacity: .5; margin: 0 auto 8px; }
.sheet-label { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.sheet-title { font-size: 21px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.sheet-current { font-size: 14px; color: var(--ink-2); }
.input { width: 100%; font: 600 19px var(--font); color: var(--ink); padding: 15px 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--bg-elev); outline: none; text-transform: uppercase; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--edit-bg); }
.hint { font-size: 13px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink); font: 600 13.5px var(--font);
  padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.chip span { color: var(--ink-2); font-weight: 500; }
.gds-chips { justify-content: center; margin: 12px 0 0; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.err { color: var(--bad); font-size: 13.5px; font-weight: 600; }
.problem-list { display: grid; gap: 8px; }
.problem { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--line); font-weight: 600; }

/* ---------- Таймер автоудаления ---------- */
.stat-timer { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.btn-extend { border: 0; cursor: pointer; font: 650 13px var(--font); color: var(--accent); background: var(--edit-bg);
  padding: 7px 10px; border-radius: 999px; white-space: nowrap; }
.btn-extend:active { transform: scale(.95); }
.btn-extend[disabled] { opacity: .4; pointer-events: none; }
.timer-line { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 14px;
  font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stat-v.soon, .timer-line.soon b { color: var(--bad); }

/* ---------- Фото документа ---------- */
.photo-thumb { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px; margin-bottom: 12px;
  cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.photo-thumb img { width: 92px; height: 64px; object-fit: cover; border-radius: 12px; flex: none; background: var(--muted-bg); }
.photo-thumb span { font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.photo-thumb b { color: var(--ink); font-size: 15px; }
.viewer { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.92); display: grid; place-items: center;
  padding: 16px; animation: fade .2s both; }
.viewer img { max-width: 100%; max-height: 86vh; border-radius: 10px; touch-action: pinch-zoom; }
.viewer-hint { position: absolute; bottom: calc(18px + var(--safe-b)); color: #fff9; font-size: 13px; }

/* ---------- Шторка приватности ---------- */
.shield { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 12px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(28px) saturate(120%); -webkit-backdrop-filter: blur(28px) saturate(120%);
  color: var(--ink-2); font-weight: 600; }
.shield svg { width: 34px; fill: currentColor; }

/* ---------- Уведомление ---------- */
.toast { position: fixed; left: 50%; bottom: calc(26px + var(--safe-b)); transform: translateX(-50%); z-index: 30;
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14.5px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25); animation: toast .35s var(--ease) both; white-space: nowrap; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 12px); } }

[hidden] { display: none !important; }

/* Режим скриншотов (?demo=1&screen=...) — без анимаций, кадр сразу в финальном виде. */
.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; transition: none !important; }
.no-anim .scan-beam { top: 38%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
@media (min-width: 420px) { .display { font-size: 46px; } }

/* ---------- Сверка с фото: фото крупно и «прилипает» сверху, пока листаете поля ---------- */
.photo-thumb.big { display: block; padding: 6px; position: sticky; top: 6px; z-index: 6; }
.photo-thumb.big img { width: 100%; height: 30vh; object-fit: contain; border-radius: 14px; background: #0b0b0f; }
.photo-thumb.big span { display: block; text-align: center; font-size: 12px; margin-top: 4px; }
/* Исправление поля: вместо размытого фона — фото документа над полем ввода */
.sheet-backdrop.with-photo { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(5,5,7,.92); }
.backdrop-photo { position: fixed; left: 0; right: 0; top: 8px; z-index: 21; display: flex; justify-content: center;
  padding: 0 10px; pointer-events: none; animation: fade .2s both; }
.backdrop-photo img { max-width: 100%; max-height: 44vh; object-fit: contain; border-radius: 12px; }
