/* ════════════════════════════════════════════
   Разбор · Telegram Mini App · app.css
   Дизайн-система: токены из «Рядом»
════════════════════════════════════════════ */

/* ─── Токены ─── */
:root {
  --bg:         #FBF9F6;
  --card:       #F2ECE4;
  --card-deep:  #EBE3D8;
  --ink:        #2B2A28;
  --muted:      #6E655C;
  --terra:      #8A6F5C;
  --terra-deep: #755C4B;
  --terra-soft: #EDE4DB;
  --teal:       #7A9B94;
  --teal-soft:  #E3ECE9;
  --green:      #7FA98C;
  --green-soft: #E4EEE7;
  --amber:      #D9A441;
  --amber-soft: #F6ECD6;
  --red:        #C9603F;
  --red-soft:   #F3E2DA;
  --line:       #E2D9CE;
  /* K046 UX-7/UX-9: text colour of links and small teal texts (--teal stays for accents); focus ring */
  --link:       #4A6A63;
  --focus-ring: #755C4B;

  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;

  --font-display: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-body:    system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;

  /* TG theme fallbacks */
  --tg-bg: var(--bg);
  --tg-text: var(--ink);
}

/* ─── Telegram тема ─── */
body.tg-light { color-scheme: light; --tg-bg: #FBF9F6; --tg-text: #2B2A28; }
body.tg-dark  { color-scheme: dark; --tg-bg: #1C1B18; --tg-text: #F0EDE8; --bg: #1C1B18; --card: #2A2924; --line: #3A3830; --muted: #9E9487; --ink: #F0EDE8; }
/* K046 UX-7/UX-9: the light-theme link and ring colours are too dark on the dark background */
body.tg-dark, body.vk-dark { --link: #8FB3AB; --focus-ring: #7A9B94; }

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: var(--font-body);
  background: var(--tg-bg, var(--bg));
  color: var(--tg-text, var(--ink));
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
/* K046 UX-7: links inside running text are underlined, so they differ from it in both themes (WCAG 1.4.1) */
.consent-row a, .payment-note a { text-decoration: underline; }
:focus-visible { outline: 2.5px solid var(--focus-ring); outline-offset: 3px; border-radius: 6px; }

/* ─── Экраны ─── */
#app { min-height: 100dvh; display: flex; flex-direction: column; }
.screen { display: none; flex-direction: column; min-height: 100dvh; }
.screen.active { display: flex; }

/* ─── Общие утилиты ─── */
.muted { color: var(--muted); font-size: 14px; line-height: 1.6; }
.hidden { display: none !important; }
.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ─── Page layout ─── */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
  flex: 1;
}
.page-body {
  flex: 1;
  padding: 20px 18px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.page-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 24px;
  text-align: center;
}

/* ─── Лого ─── */
.logo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.02em;
  color: var(--ink);
}

/* ─── Кнопки ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--terra);
  color: #fff;
  box-shadow: 0 5px 16px rgba(138,111,92,.28);
}
.btn-primary:hover { background: var(--terra-deep); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }
.btn-block { width: 100%; }
.back-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
  transition: background .15s;
}
.back-btn:hover { background: var(--card-deep); }

/* ─── Loading / Spinner ─── */
.loading-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.logo-duo { margin-bottom: 4px; }
.logo-text {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--terra);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-top: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-hint { color: var(--muted); font-size: 14px; }

/* ─── Error card ─── */
.err-ico {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--amber-soft);
  color: #B9862B;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

/* ─── Онбординг ─── */
.ob-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.skip-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 0;
}
.skip-btn:hover { color: var(--ink); }
.ob-body {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.ob-slide { display: none; padding: 28px 22px 0; animation: fadeUp .4s ease; }
.ob-slide.active { display: flex; flex-direction: column; align-items: center; text-align: center; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ob-art { width: 180px; height: 138px; margin-bottom: 22px; }
.ob-step {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}
.ob-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
  margin-bottom: 12px;
}
.ob-desc { color: var(--muted); font-size: 15px; max-width: 300px; margin: 0 auto; }
.ob-points {
  list-style: none;
  text-align: left;
  margin: 16px auto 0;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ob-points li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  color: var(--ink);
}
.ob-points svg { flex: none; margin-top: 3px; color: var(--green); }
.ob-footer {
  padding: 20px 22px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
}
.ob-dots { display: flex; gap: 7px; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: all .3s ease;
}
.dot.on { background: var(--terra); width: 20px; border-radius: 99px; }
.ob-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; }
.ob-actions .btn { flex: 1; min-width: 120px; }
.ob-micro {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* ─── Опросник ─── */
.quiz-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.quiz-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: var(--terra);
  border-radius: 99px;
  transition: width .3s ease;
  width: 20%;
}
.quiz-body { flex: 1; overflow: hidden; }
.quiz-slide { display: none; padding: 28px 20px; }
.quiz-slide.active { display: flex; flex-direction: column; }
.quiz-q-num { font-size: 12px; font-weight: 600; color: var(--link); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.quiz-q-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.015em;
  margin-bottom: 8px;
  line-height: 1.25;
}
.quiz-q-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.safety-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-soft);
  color: var(--link);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.qopt {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  background: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.qopt:hover { border-color: var(--terra); background: var(--terra-soft); }
.qopt.selected { border-color: var(--terra); background: var(--terra-soft); color: var(--terra-deep); }
.qopt-safe { border-color: var(--teal); }
.qopt-warn { border-color: var(--red); }
.qopt-warn:hover { background: var(--red-soft); border-color: var(--red); }
/* Existing light-state colors stay readable on the dark questionnaire. */
body.tg-dark .qopt, body.vk-dark .qopt { background: var(--card); }
body.tg-dark .qopt:hover, body.vk-dark .qopt:hover { background: var(--terra-soft); color: #2B2A28; }
body.tg-dark .qopt.selected, body.vk-dark .qopt.selected { background: var(--terra-soft); color: var(--terra-deep); }
body.tg-dark .qopt-warn:hover, body.vk-dark .qopt-warn:hover { background: var(--red-soft); }
/* Q4 «Да, было»: the help contacts inside the slide (in the flow, wrapping at any width); dark theme: dark card. */
.safety-help { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; padding: 14px 16px; border: 1.5px solid var(--red); border-radius: var(--r-md); background: var(--red-soft); color: var(--ink); }
.safety-help-title { font-size: 16px; font-weight: 700; line-height: 1.4; }
.safety-help-line { font-size: 15px; line-height: 1.5; }
.safety-help a { color: inherit; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.safety-help :focus-visible { outline-color: var(--ink); }
body.tg-dark .safety-help, body.vk-dark .safety-help { background: var(--card); }
.quiz-done-ico {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--teal-soft);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

/* ─── Upload ─── */
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: left;
  font-family: var(--font-body);
}
.mode-card:hover { border-color: var(--terra); }
.mode-card.selected { border-color: var(--terra); background: var(--terra-soft); }
/* Dark cards use the existing palette; the selected light tile keeps readable ink. */
body.tg-dark .mode-card, body.vk-dark .mode-card { background: var(--card); }
body.tg-dark .mode-card.selected, body.vk-dark .mode-card.selected {
  background: var(--terra-soft); --ink: #2B2A28; --muted: #6E655C;
}
.mode-ico { font-size: 22px; flex-shrink: 0; }
.mode-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.mode-desc { font-size: 12px; color: var(--muted); margin-top: 1px; }

.upload-zone {
  border: 2px dashed var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone.drag-over { border-color: var(--terra); background: var(--terra-soft); }
/* K046 UX-5: hover only where the pointer can hover (no sticky hover after a tap); the light hover/drop tile keeps
   readable ink in the dark themes, as .mode-card.selected does. */
@media (hover: hover) {
  .upload-zone:hover { border-color: var(--terra); background: var(--terra-soft); }
  body.tg-dark .upload-zone:hover, body.vk-dark .upload-zone:hover { --ink: #2B2A28; --muted: #6E655C; }
}
body.tg-dark .upload-zone.drag-over, body.vk-dark .upload-zone.drag-over { --ink: #2B2A28; --muted: #6E655C; }
.upload-icon { margin-bottom: 10px; }
.upload-hint { font-size: 15px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.upload-sub { font-size: 12.5px; color: var(--muted); }

.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card);
  border-radius: var(--r-sm);
  font-size: 13.5px;
}
.file-item .fi-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .fi-size { color: var(--muted); font-size: 12px; flex-shrink: 0; }
.file-item .fi-del { color: var(--muted); cursor: pointer; padding: 0 4px; flex-shrink: 0; border: 0; background: transparent; font: inherit; line-height: inherit; min-width: 24px; min-height: 24px; }
.file-item .fi-del:disabled { cursor: default; opacity: .6; }
.file-item .fi-del:hover { color: var(--red); }
/* K023: preview of the processed screenshot (top panel and round photos removed by the server) */
.file-item.file-item-preview { flex-wrap: wrap; }
.file-item .fi-preview { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.file-item .fi-preview-img { display: block; max-width: 100%; max-height: 320px; width: auto; object-fit: contain; align-self: flex-start; border-radius: var(--r-sm); border: 1px solid rgba(0,0,0,.08); }
.file-item .fi-preview-note { margin: 0; font-size: 12.5px; color: var(--muted); white-space: normal; }
.file-item .fi-preview-review .fi-preview-note { color: var(--text, inherit); font-weight: 500; }
.file-item .fi-preview-review .fi-preview-img { outline: 2px solid #D9A441; outline-offset: 1px; }
.file-item .fi-preview-retry { align-self: flex-start; padding: 6px 12px; font-size: 13px; }
.upload-text-hint { margin-top: 8px; }
.screenshot-preview-panel { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.screenshot-preview-panel[hidden] { display: none; }

.upload-privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: var(--teal-soft);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--link);
  line-height: 1.5;
}
.upload-privacy svg { flex-shrink: 0; margin-top: 2px; }
/* K046 UX-7: --teal-soft stays a light tint in the dark themes; these teal notes sit on the dark card there. */
body.tg-dark .upload-privacy, body.vk-dark .upload-privacy, body.tg-dark .safety-banner, body.vk-dark .safety-banner { background: var(--card); }

.consent-block { display: flex; flex-direction: column; gap: 10px; }
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  cursor: pointer;
}
.consent-chk { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--terra); cursor: pointer; }

/* ─── Оплата ─── */
body.tg-dark .payment-card, body.tg-dark .status-card {
  background: var(--card); color: var(--ink);
}
body.tg-dark .status-tip { background: var(--bg); color: var(--muted); }
.payment-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(43,42,40,.07);
}
.payment-ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--terra-soft);
  color: var(--terra-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.payment-plan { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.payment-amount { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.payment-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.payment-note { font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.5; }
/* K046 UX-6: the personal pilot code field (app.js mountPilotCodeForm) has the size and palette of the receipt contact field. */
.personal-pilot-form label { display: block; margin-bottom: 6px; }
.personal-pilot-form input {
  display: block; box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
}
.personal-pilot-form .btn { margin-top: 12px; }

.plan-list { display: flex; flex-direction: column; gap: 8px; }
.plan-item {
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.plan-item:hover { border-color: var(--terra); }
.plan-item.plan-active { border-color: var(--terra); background: var(--terra-soft); }
.plan-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.plan-price { font-size: 14px; color: var(--terra); font-weight: 600; margin: 2px 0; }
.plan-desc { font-size: 13px; color: var(--muted); }

/* ─── Статус ─── */
.status-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 22px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(43,42,40,.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.status-anim {
  width: 64px;
  height: 64px;
  position: relative;
}
.status-pulse {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--terra-soft);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(.9); opacity: .7; }
  50% { transform: scale(1.05); opacity: 1; }
}
.status-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.015em;
}
.status-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sbadge {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.sbadge-green { background: var(--green-soft); color: #4A8A5A; }
.sbadge-amber { background: var(--amber-soft); color: #8A6A20; }
.sbadge-teal  { background: var(--teal-soft);  color: var(--teal); }
.status-tip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--teal-soft);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  width: 100%;
  text-align: left;
}
.status-tip svg { flex-shrink: 0; }

/* ─── Разбор (report) ─── */
.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 20;
}
.rcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 44px rgba(43,42,40,.09);
  overflow: hidden;
}
.rcard-inner { padding: 24px 20px 20px; }
.rcard-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.meta-tag {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.rcard-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.rcard-ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--amber-soft);
  color: #B9862B;
}
.rcard-ico.green { background: var(--green-soft); color: #4A8A5A; }
.rcard-ico.red   { background: var(--red-soft);   color: var(--red); }
.rcard-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.3;
}
.rcard-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.rcard-summary { font-size: 14.5px; line-height: 1.65; margin-bottom: 14px; }

/* Аккордеон секций */
.rsec {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  background: #fff;
  overflow: hidden;
}
.rsec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14.5px;
  user-select: none;
  -webkit-user-select: none;
}
.rsec-head svg { color: var(--muted); transition: transform .3s ease; flex-shrink: 0; }
.rsec.open .rsec-head svg { transform: rotate(180deg); }
.rsec-head:hover { background: var(--bg); }
.rsec-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.rsec.open .rsec-body { max-height: 400px; }
.rsec-body p { padding: 0 16px 14px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.rsec-good .rsec-head::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 8px;
  flex-shrink: 0;
}

/* Рекомендации */
.reco {
  background: var(--teal-soft);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-top: 14px;
}
.reco-title {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}
.reco ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.reco li {
  font-size: 13.5px;
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}
.reco li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 9px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}
.rcard-disclaimer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

/* Фидбек */
.feedback-block {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 18px 18px;
  text-align: center;
}
.feedback-q { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.feedback-btns { display: flex; gap: 10px; justify-content: center; }
.fb-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.fb-btn:hover { border-color: var(--terra); background: var(--terra-soft); }
.fb-btn.sent { border-color: var(--teal); background: var(--teal-soft); color: var(--teal); }

/* ─── Главная ─── */
.home-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 0;
}
.home-art { width: 140px; height: 108px; margin-bottom: 18px; }
.home-empty-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.015em;
  margin-bottom: 8px;
}

.orders-list { display: flex; flex-direction: column; gap: 10px; }
.order-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.order-card:hover { border-color: var(--terra); transform: translateY(-1px); }
.order-ico {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.order-ico.green { background: var(--green-soft); color: #4A8A5A; }
.order-ico.amber { background: var(--amber-soft); color: #8A6A20; }
.order-ico.red   { background: var(--red-soft);   color: var(--red); }
.order-ico.orange { background: #fff0df; color: #a34e00; }
.order-ico.black  { background: #eeeaf4; color: #392c52; }
.order-ico.muted { background: var(--card);        color: var(--muted); }
/* K054: in the dark themes the card follows the theme surface (on #fff the light --ink title was 1.17:1, the date
   2.98:1); the neutral icon tile keeps a distinct tone on it. */
body.tg-dark .order-card, body.vk-dark .order-card { background: var(--card); }
body.tg-dark .order-ico.muted, body.vk-dark .order-ico.muted { background: var(--bg); }
.order-info { flex: 1; min-width: 0; }
/* K054: the status is the whole message of the card — a long one («Нужна дополнительная проверка») wraps, not cut */
.order-title { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 3px; overflow-wrap: anywhere; }
.order-meta { font-size: 12.5px; color: var(--muted); }
.order-arrow { color: var(--muted); }

/* ─── Быстрый выход ─── */
.quick-exit {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(251,249,246,.92);
  backdrop-filter: blur(12px);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(43,42,40,.12);
  transition: color .15s, border-color .15s;
}
.quick-exit:hover { color: var(--ink); border-color: var(--muted); }
/* K054: the light pill kept the dark-theme --muted text at 2.42:1; in the dark themes it takes the dark card tone (5.5:1).
   The order list ends above the fixed pill (bottom 22px + ~38px), so it never covers the last control there. */
body.tg-dark .quick-exit, body.vk-dark .quick-exit { background: rgba(42,41,36,.92); }
#screen-home .page-body { padding-bottom: 88px; }

/* ─── K040: вопрос об уведомлении от бота ─── */
/* K046: a card in the flow of the screen where it is asked, after its last control (app.js moves it there): it never
   lies over a button of that screen and leaves with it. */
.notify-offer {
  box-sizing: border-box;
  width: 100%;
  padding: 14px 16px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
}
#screen-policy > .notify-offer { width: calc(100% - 2.5rem); max-width: 33.5rem; margin: 0 auto 1.5rem; }
.notify-offer[hidden] { display: none; }
.notify-offer-text { margin: 0 0 12px; font-size: 14.5px; line-height: 1.4; }
.notify-offer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notify-offer-actions .btn { flex: 1 1 auto; }
.notify-offer-actions .btn[aria-disabled="true"] { opacity: .6; cursor: progress; }

/* ─── Toast ─── */
/* K046: the text wraps inside the viewport and keeps one readable colour pair in every theme (#FFF on #2B2A28,
   14.3:1); var(--ink) turns light in the dark themes and must not be the background of white text. */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #2B2A28;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  padding: 10px 18px;
  border-radius: 16px;
  z-index: 200;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  white-space: normal;
  overflow-wrap: break-word;
  width: max-content;
  max-width: calc(100% - 32px);
  text-align: center;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Анимации переходов ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.rcard-ico.orange { background: #fff0df; color: #a34e00; }
.rcard-ico.black { background: #eeeaf4; color: #392c52; }

/* Account actions reuse the selected palette and wrap on narrow screens. */
#screen-email-account .email-account-actions { flex-wrap: wrap; justify-content: flex-start; }
#screen-email-account .email-account-actions .btn { min-width: 0; max-width: 100%; white-space: normal; }

/* Native order confirmations use the existing palette and full-width controls. */
.email-order-confirmations { min-width: 0; border: 1px solid var(--line, #E2D9CE); border-radius: 12px; padding: 4px 14px 14px; }
.email-order-confirmations legend { padding: 0 6px; font-weight: 600; }
/* K028: the pre-payment block reason is an answer to the client, not a faint hint */
#email-package-eligibility-note { margin: 12px 0 0; text-align: left; color: var(--ink, #2B2A28); font-weight: 500; }
/* K051: the optional «Для кого разбор» radios keep the consent-row layout inside the bordered block */
/* K054: no own bottom margin — .page-body already spaces its blocks by 16px (the margin doubled it to 32px) */
.email-package-reader { margin-bottom: 0; }
.email-package-reader .consent-row { display: flex; margin: 10px 0 0; }
.email-package-reader .consent-row input { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--terra); cursor: pointer; }
#email-package-reader-hint { margin: 6px 0 0; text-align: left; }
/* K028 v2 (S3): on wide screens the screens keep a readable column instead of the full window width */
@media (min-width: 720px) {
  .screen > .page-header, .screen > .page-body, .screen > .page-center, .screen > .quiz-header, .screen > .quiz-body,
  .screen > .report-header, .screen > .ob-header, .screen > .ob-body, .screen > .ob-footer { width: 100%; max-width: 640px; margin-inline: auto; }
}
.email-order-confirmations label { display: block; margin: 12px 0 6px; }
.email-order-confirmations select { display: block; box-sizing: border-box; width: 100%; max-width: 100%; padding: 10px; font: inherit; color: var(--ink, #2B2A28); background: var(--bg, #FBF9F6); border: 1px solid var(--line, #E2D9CE); border-radius: 8px; }

.email-order-resume-note { display: none; }
#screen-upload[data-email-recovery] .email-order-resume-note { display: block; }
#screen-upload[data-email-recovery] .mode-cards,
#screen-upload[data-email-recovery="true"] .upload-zone,
#screen-upload[data-email-recovery="true"] #file-list,
#screen-upload[data-email-recovery] .section-label,
#screen-upload[data-email-recovery] .consent-block:not(.email-order-confirmations) { display: none !important; }

/* Package controls retain the existing source palette and platform theme. */
.email-package-card { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.email-package-card label { display: block; margin: 16px 0 6px; }
.email-package-card select { display: block; box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: var(--bg); }
#screen-email-package .btn { margin-top: 12px; white-space: normal; }
#screen-email-package [hidden] { display: none !important; }
#screen-upload .mode-cards[data-paid-mode] button { cursor: default; }
#screen-upload .mode-cards[hidden], #screen-upload .section-label[hidden] { display: none !important; }  /* K069 Д-1 */
#screen-upload .upload-zone[hidden] { display: none !important; }

#email-order-text[hidden], #email-order-subject-label[hidden] { display: none !important; }
#email-order-description { display: block; box-sizing: border-box; width: 100%; max-width: 100%; resize: vertical; padding: 12px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }

/* Original ReportV2: existing warm palette/cards, full-length native accordions. */
.report-v2 { --rv-surface:#fff; --rv-ink:var(--cb-ink,var(--ink,#2B2A28)); --rv-muted:var(--cb-muted,var(--muted,#6E655C)); --rv-line:var(--cb-line,var(--line,#E2D9CE)); background:var(--rv-surface); color:var(--rv-ink); border-color:var(--rv-line); width:100%; min-width:0; overflow-wrap:anywhere; font-family:var(--font-body,"Onest",system-ui,sans-serif); }
body.tg-dark .report-v2, body.vk-dark .report-v2, [data-theme="dark"] .report-v2 { --rv-surface:#2A2924; }
[data-theme="light"] .report-v2 { --rv-surface:#fff; }
@media(prefers-color-scheme:dark) { body:not(.tg-light):not(.tg-dark):not(.vk-dark) .report-v2 { --rv-surface:#2A2924; --rv-ink:#F0EDE8; --rv-muted:#A69C8F; --rv-line:#3A3830; } [data-theme="light"] .report-v2 { --rv-surface:#fff; --rv-ink:#2B2A28; --rv-muted:#6E655C; --rv-line:#E2D9CE; } }
/* K046 UX-9: the dark report card (also under an OS dark theme on the site) keeps the dark-theme focus ring colour. */
[data-theme="dark"] .report-v2 { --focus-ring: #7A9B94; }
@media (prefers-color-scheme: dark) { body:not(.tg-light):not(.tg-dark):not(.vk-dark) .report-v2 { --focus-ring: #7A9B94; } }
.report-v2 .rsec { background:var(--rv-surface); border-color:var(--rv-line); }
.report-v2 .rsec-head { list-style:none; color:var(--rv-ink); gap:10px; }
.report-v2 .rsec-head::-webkit-details-marker { display:none; }
.report-v2 .rsec-head h3, .report-v2 .rsec-head h4, .report-v2 .rsec-head h5, .report-v2 .rsec-head h6 { font:inherit; margin:0; min-width:0; }
.report-v2 .rsec-body { max-height:none; overflow:visible; transition:none; padding:0 16px 14px; }
.report-v2 .rsec-body p { padding:0; color:var(--rv-muted); margin:0 0 12px; }
.report-v2 .report-v2-text, .report-v2 .report-v2-quote { white-space:pre-wrap; overflow-wrap:anywhere; }
.report-v2 .report-v2-chevron { flex:none; }
.report-v2 .rsec[open] .report-v2-chevron { transform:rotate(180deg); }
.report-v2 .report-v2-strengths { background:var(--green-soft,#E4EEE7); color:#2B2A28; border-radius:var(--r-sm,12px); padding:14px; margin-top:12px; }
.report-v2 .report-v2-strengths ul { margin:8px 0 0; padding-left:20px; }
.report-v2 .report-v2-strengths li { white-space:pre-wrap; margin:5px 0; }
/* Lead 27.10 (review): the help/pause notes (.reco: «Куда обратиться», pause block) keep a light teal tint in every theme, so their text is dark in every theme too. */
.report-v2 .reco, .report-v2 .reco strong, .report-v2 .reco p, .report-v2 .reco li { color:#2B2A28; }
.report-v2 .report-v2-pause p { margin:0; font-size:14px; line-height:1.55; }
.report-v2 .report-v2-marker, .report-v2 .report-v2-differential { border-top:1px solid var(--rv-line); padding:14px 0; }
.report-v2 .report-v2-marker:first-child, .report-v2 .report-v2-differential:first-child { border-top:0; }
.report-v2 .report-v2-quote { margin:10px 0; padding:10px 12px; border-left:3px solid var(--teal,#7A9B94); color:var(--rv-ink); background:var(--cb-card,var(--card,#F2ECE4)); border-radius:0 8px 8px 0; }
.report-v2 .report-v2-label { font-size:12px; color:var(--rv-muted); }
.report-v2 progress { width:100%; max-width:100%; height:8px; accent-color:var(--teal,#7A9B94); }
.report-v2 .rcard-ico.orange { background:var(--red-soft,#F3E2DA); color:var(--red,#C9603F); }
.report-v2 .rcard-ico.black { background:var(--rv-ink); color:var(--rv-surface); }
.report-v2 .report-v2-disclaimer { margin-top:18px; color:var(--rv-muted); font-size:12px; white-space:pre-wrap; }
.report-v2 .rcard-status { border-color:var(--rv-line); align-items:flex-start; }

/* Nonvisual status text for assistive technology; layout and palette unchanged. */
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; border:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

/* Original report narrative: safe structural formatting, existing palette. */
.report-v2 .report-v2-narrative { color:var(--rv-muted); overflow-wrap:anywhere; }
.report-v2 .report-v2-narrative p { white-space:pre-wrap; }
.report-v2 .report-v2-narrative ul, .report-v2 .report-v2-narrative ol { margin:0 0 12px; padding-left:22px; }
.report-v2 .report-v2-narrative li { margin:5px 0; white-space:pre-wrap; }
.report-v2 .report-v2-narrative strong, .report-v2 .report-v2-narrative h3, .report-v2 .report-v2-narrative h4, .report-v2 .report-v2-narrative h5, .report-v2 .report-v2-narrative h6 { color:var(--rv-ink); }
.report-v2 .report-v2-narrative code { white-space:pre-wrap; font-family:monospace; }
.report-v2 .report-v2-narrative blockquote { margin:10px 0; padding-left:12px; border-left:3px solid var(--teal,#7A9B94); white-space:pre-wrap; }

/* K006 26.10.2026: «Получить отчёт» — the order is confirmed on the site; no price inside the Mini App. */
.get-report-lead { font-size: 17px; line-height: 1.45; margin: 8px 0 20px; }
#screen-get-report .payment-note { margin-top: 12px; }
.get-report-message { margin: 12px 0 0; line-height: 1.4; }
.get-report-message:empty { display: none; }
#get-report-extra:not(:empty) { margin-top: 20px; }
#get-report-check { margin-top: 16px; }

/* K100 D04: цена и состав каждого пакета до вопросов 18+ и подтверждений */
.package-list { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; gap: 10px; }
.package-list li { background: var(--card, #fff); border: 1px solid var(--line, #E8E0D5); border-radius: 14px; padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; column-gap: 12px; }
.package-name { font-weight: 600; }
.package-price { font-weight: 700; white-space: nowrap; }
.package-desc { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
