/* Markings Web App v11 — быстрый обход с inline-камерой + review-стоп */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  font-size: 15px;
  background: var(--tg-theme-bg-color, #0b0b0b);
  color: var(--tg-theme-text-color, #f0f0f0);
  min-height: 100vh;
  overscroll-behavior: none;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Header ---------- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: var(--tg-theme-bg-color, #0b0b0b);
  z-index: 20;
}

.app-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.counters {
  display: flex;
  gap: 12px;
}

.counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}
.counter b {
  font-size: 20px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #f0f0f0);
}
.counter small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tg-theme-hint-color, #888);
}

/* ---------- Main ---------- */
.main {
  flex: 1;
  padding: 16px 12px 140px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px 20px;
  max-width: 480px;
  margin: 0 auto;
}
.empty-icon {
  font-size: 52px;
  margin-bottom: 12px;
}
.empty-state h2 {
  margin: 0 0 8px;
  font-size: 20px;
}
.empty-state p {
  margin: 0 0 12px;
  color: var(--tg-theme-hint-color, #999);
  line-height: 1.5;
}
.hints {
  text-align: left;
  padding: 0 0 0 20px;
  margin: 12px 0 0;
  color: var(--tg-theme-hint-color, #999);
  font-size: 13px;
  line-height: 1.6;
}
.hints li { margin-bottom: 4px; }

/* Preview */
.preview {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 10px;
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 6px 8px;
  font-size: 14px;
}
.preview-header span:first-child {
  font-weight: 600;
}
.preview-count {
  color: #00e676;
  font-weight: 700;
}
.preview-canvas-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  min-height: 200px;
}
#preview-canvas {
  max-width: 100%;
  height: auto;
  display: block;
}
.preview-spinner {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}
.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.preview-note {
  padding: 8px 4px 0;
  font-size: 13px;
  color: var(--tg-theme-hint-color, #888);
}
.preview-note.ok { color: #00e676; }
.preview-note.warn { color: #ffb74d; }
.preview-note.err { color: #ff5252; }

/* History */
.history {
  padding: 0 2px;
}
.history-title {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #888);
  margin-bottom: 8px;
  padding-left: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.history-list::-webkit-scrollbar { display: none; }
.history-item {
  position: relative;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.history-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hist-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 230, 118, 0.95);
  color: #000;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1.2;
}
.hist-badge.err {
  background: #ff5252;
  color: #fff;
}

/* ---------- Footer ---------- */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px calc(env(safe-area-inset-bottom, 12px) + 12px);
  background: var(--tg-theme-bg-color, #0b0b0b);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 10;
}

.btn-shoot {
  background: #00b894;
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 184, 148, 0.35);
  transition: transform 0.1s, background 0.2s;
}
.btn-shoot:active { transform: scale(0.98); }
.btn-shoot:disabled {
  background: #555;
  box-shadow: none;
  cursor: not-allowed;
}
.btn-shoot-icon { font-size: 22px; }

/* Second button: batch upload from gallery */
.btn-batch {
  background: rgba(255, 255, 255, 0.06);
  color: var(--tg-theme-text-color, #f0f0f0);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-batch:hover { background: rgba(255, 255, 255, 0.1); }
.btn-batch:active { transform: scale(0.98); }
.btn-batch:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-batch-icon { font-size: 16px; }

/* Batch panel — overlay card with progress */
.batch-panel {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.94);
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow-y: auto;
}
.batch-panel.hidden { display: none; }

.batch-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 17px;
  font-weight: 700;
  color: #f0f0f0;
}
.batch-cancel {
  background: transparent;
  color: #aaa;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.batch-cancel:hover { color: #fff; }

.batch-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 8px;
}
.batch-progress-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.batch-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00b894 0%, #00e676 100%);
  width: 0%;
  transition: width 0.3s ease;
}
.batch-progress-text {
  font-size: 13px;
  color: #aaa;
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  text-align: right;
}
.batch-current {
  font-size: 13px;
  color: #888;
  padding-bottom: 8px;
}

.batch-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  min-height: 0;
}
.batch-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: #ccc;
}
.batch-list-item .badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.batch-list-item .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge-queued   { background: rgba(255,255,255,0.08); color: #aaa; }
.badge-sending  { background: rgba(0,122,255,0.25); color: #5cb3ff; }
.badge-ok       { background: rgba(0,230,118,0.25); color: #00e676; }
.badge-empty    { background: rgba(255,204,0,0.25); color: #ffcc00; }
.badge-blur     { background: rgba(255,149,0,0.25); color: #ff9500; }
.badge-err      { background: rgba(255,59,48,0.25); color: #ff6b6b; }
.batch-list-item .detail {
  color: #888;
  font-size: 12px;
  flex-shrink: 0;
}

.batch-summary {
  margin-top: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  font-size: 14px;
  color: #ccc;
  line-height: 1.5;
}
.batch-summary.hidden { display: none; }
.batch-summary b { color: #fff; }

.btn-next {
  background: rgba(255, 255, 255, 0.08);
  color: var(--tg-theme-text-color, #f0f0f0);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-next:active { transform: scale(0.98); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 160px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}

.hidden { display: none !important; }

/* ---------- Fullscreen Camera ---------- */
.camera-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.camera-review-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 2;
}

/* Сетка третей */
.camera-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.camera-grid-v,
.camera-grid-h {
  position: absolute;
  background: rgba(255, 255, 255, 0.22);
}
.camera-grid-v {
  top: 0;
  bottom: 0;
  width: 1px;
}
.camera-grid-v:nth-of-type(1) { left: 33.333%; }
.camera-grid-v:nth-of-type(2) { left: 66.666%; }
.camera-grid-h {
  left: 0;
  right: 0;
  height: 1px;
}
.camera-grid-h:nth-of-type(3) { top: 33.333%; }
.camera-grid-h:nth-of-type(4) { top: 66.666%; }
/* В режиме review сетку скрываем */
.camera-overlay.review .camera-grid { display: none; }
.camera-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  pointer-events: none;
  opacity: 0.85;
  animation: flash 0.18s ease-out;
}
@keyframes flash {
  from { opacity: 0.85; }
  to   { opacity: 0; }
}
.camera-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: calc(env(safe-area-inset-top, 12px) + 12px) 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0));
}
.camera-btn-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.camera-status {
  flex: 1;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* Кнопка фонарика / вспышки */
.camera-btn-torch {
  flex: 0 0 auto;
  min-width: 56px;
  height: 40px;
  padding: 0 10px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.18s, border-color 0.18s, transform 0.08s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.camera-btn-torch:active { transform: scale(0.95); }
.camera-btn-torch.hidden { display: none; }
.camera-btn-torch .camera-torch-icon {
  font-size: 16px;
  line-height: 1;
  filter: grayscale(0.4) brightness(1.1);
  transition: filter 0.18s;
}
.camera-btn-torch .camera-torch-label {
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
/* Режимы — визуальное отличие */
.camera-btn-torch[data-mode="off"]  .camera-torch-icon { filter: grayscale(1) opacity(0.7); }
.camera-btn-torch[data-mode="auto"] {
  background: rgba(255, 183, 77, 0.22);
  border-color: rgba(255, 183, 77, 0.55);
}
.camera-btn-torch[data-mode="auto"] .camera-torch-icon { filter: none; }
.camera-btn-torch[data-mode="on"] {
  background: rgba(255, 214, 0, 0.35);
  border-color: rgba(255, 214, 0, 0.85);
  box-shadow: 0 0 14px rgba(255, 214, 0, 0.45);
}
.camera-btn-torch[data-mode="on"] .camera-torch-icon { filter: none; }
.camera-status.ok    { color: #00e676; }
.camera-status.warn  { color: #ffb74d; }
.camera-status.err   { color: #ff5252; }
.camera-status.busy  { color: #fff; }

/* Баннер со сводкой вердиктов поверх review — выше camera-top */
.camera-banner {
  position: absolute;
  top: calc(env(safe-area-inset-top, 12px) + 68px);
  left: 12px;
  right: 12px;
  z-index: 15;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.camera-banner.hidden { display: none; }
.camera-banner.red {
  background: linear-gradient(180deg, #ff3b30, #c62828);
  color: #fff;
  box-shadow: 0 6px 24px rgba(255,59,48,0.5);
  animation: camera-banner-pulse 1.1s ease-in-out infinite;
}
.camera-banner.yellow {
  background: linear-gradient(180deg, #ffcc00, #f9a825);
  color: #111;
}
.camera-banner.green {
  background: linear-gradient(180deg, #00e676, #2e7d32);
  color: #071b10;
}
@keyframes camera-banner-pulse {
  0%   { transform: scale(1);    box-shadow: 0 6px 24px rgba(255,59,48,0.5); }
  50%  { transform: scale(1.03); box-shadow: 0 8px 32px rgba(255,59,48,0.75); }
  100% { transform: scale(1);    box-shadow: 0 6px 24px rgba(255,59,48,0.5); }
}

.camera-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px calc(env(safe-area-inset-bottom, 12px) + 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0));
}
.camera-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #222 center/cover no-repeat;
  border: 2px solid rgba(255,255,255,0.6);
  position: relative;
  overflow: hidden;
}
.camera-thumb::after {
  content: attr(data-count);
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #00e676;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camera-shutter {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: transparent;
  border: 4px solid rgba(255,255,255,0.9);
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease-out;
}
.camera-shutter:active { transform: scale(0.93); }
.camera-shutter:disabled { opacity: 0.5; cursor: not-allowed; }
.camera-shutter-inner {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #fff;
  transition: background 0.2s, transform 0.2s;
}
.camera-shutter.busy .camera-shutter-inner {
  background: #ff9800;
}
.camera-shutter-next-icon {
  position: absolute;
  font-size: 34px;
  font-weight: 700;
  color: #000;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
/* Режим «следующий» — зелёный круг со стрелкой */
.camera-shutter.next {
  border-color: #00e676;
  box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.25);
}
.camera-shutter.next .camera-shutter-inner {
  background: #00e676;
}
.camera-shutter.next .camera-shutter-next-icon {
  opacity: 1;
}
/* Режим «burst» — красный пульсирующий круг пока держишь */
.camera-shutter.burst {
  border-color: #ff5252;
  box-shadow: 0 0 0 4px rgba(255, 82, 82, 0.3);
  animation: burst-pulse 0.9s ease-in-out infinite;
}
.camera-shutter.burst .camera-shutter-inner {
  background: #ff5252;
}
@keyframes burst-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(0.93); }
}
.camera-counter {
  flex: 0 0 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.camera-counter b { font-size: 18px; font-weight: 700; }
.camera-counter small { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; opacity: 0.75; }

/* ---------- No access overlay ---------- */
.no-access-overlay {
  position: fixed;
  inset: 0;
  background: var(--tg-theme-bg-color, #0b0b0b);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.no-access-overlay.hidden { display: none; }
.no-access-card {
  max-width: 360px;
  width: 100%;
  text-align: center;
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}
.no-access-icon {
  font-size: 56px;
  margin-bottom: 12px;
  line-height: 1;
}
.no-access-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #f0f0f0);
}
.no-access-card p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}
.no-access-user {
  color: rgba(255, 255, 255, 0.55);
  margin: 14px 0 22px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}
.btn-request-access {
  background: var(--tg-theme-button-color, #2481cc);
  color: var(--tg-theme-button-text-color, #fff);
  border: 0;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  width: 100%;
  cursor: pointer;
  transition: transform 0.08s, opacity 0.2s;
}
.btn-request-access:active { transform: scale(0.98); }
.btn-request-access:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.no-access-msg {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
  min-height: 18px;
}
.no-access-msg.ok  { color: #00e676; }
.no-access-msg.err { color: #ff5252; }


/* =========================================================================
   Standalone auth screen (PIN из бота)
   ========================================================================= */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(135deg, #0b0b0b 0%, #1a1a1a 100%);
  overflow-y: auto;
}
.auth-screen.hidden { display: none; }
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #1c1c1e;
  border-radius: 18px;
  padding: 28px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  color: #fff;
}
.auth-logo { font-size: 44px; text-align: center; margin-bottom: 8px; }
.auth-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}
.auth-subtitle {
  margin: 0 0 20px;
  font-size: 14px;
  text-align: center;
  color: rgba(255,255,255,0.6);
}
.auth-steps {
  margin: 0 0 22px;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.85);
}
.auth-steps li { margin-bottom: 6px; }
.auth-steps a { color: #4aa8ff; text-decoration: none; }
.auth-steps a:hover { text-decoration: underline; }

.auth-field {
  display: block;
  margin-bottom: 14px;
}
.auth-field span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-field input {
  width: 100%;
  padding: 13px 14px;
  font-size: 17px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #2c2c2e;
  border: 1.5px solid #3a3a3c;
  border-radius: 10px;
  color: #fff;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.auth-field input:focus { border-color: #4aa8ff; }

#auth-pin {
  letter-spacing: 0.4em;
  text-align: center;
}

.auth-btn {
  width: 100%;
  padding: 14px;
  margin-top: 6px;
  background: #c8102e;
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.08s, opacity 0.2s, background 0.2s;
}
.auth-btn:active { transform: scale(0.98); }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; background: #555; }

.auth-msg {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  min-height: 18px;
  color: rgba(255,255,255,0.7);
}
.auth-msg.err { color: #ff5252; }
.auth-msg.ok  { color: #00e676; }

.auth-help {
  margin-top: 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.auth-help summary { cursor: pointer; padding: 4px 0; }
.auth-help p { margin: 8px 0 0; line-height: 1.5; }

/* =========================================================================
   Камера: пилюли зума 1×/2×/3×
   ========================================================================= */
.camera-zoom {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0) + 130px);
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  z-index: 4;
  pointer-events: auto;
}
.camera-zoom.hidden { display: none; }

.camera-zoom-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 0;
  min-width: 42px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.08s;
}
.camera-zoom-btn:active { transform: scale(0.94); }
.camera-zoom-btn.active {
  background: #ffd60a;
  color: #000;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 214, 10, 0.35);
}

/* CSS-fallback зум: масштабируем картинку трансформом, центр сохраняем.
   Реально применяется только когда трек не поддерживает MediaTrackConstraints.zoom. */
.camera-video.css-zoom {
  transform-origin: center center;
  transition: transform 0.18s ease-out;
}
