/* ===== Библейский квиз — основа дизайна «вариант 10» (холст, 23.10.2026) =====
   Бумага, чернила, плоские цветные плашки. Узкий шрифт Sofia Sans Extra Condensed — заголовки и цифры,
   Sofia Sans — текст, Lora — текст Библии. Размеры — как на холсте (экран 390×844). */
:root {
  --paper: #F4F0E6;
  --card: #FBF9F4;
  --card2: #F0EBDF;
  --mute: #E9E2D2;
  --track: #E9E3D6;
  --line: #E0D9C9;
  --ink: #253238;
  --ink2: #3B474D;
  --muted: #5E6A6E;
  --dim: #9EA39B;
  --onink: #AFB8B5;
  --rankink: #7F8B8B;
  --coral: #E2785C;
  --coral-t: #F2C3B3;
  --teal: #2C7873;
  --teal-t: #BBD8D4;
  --teal-l: #CFE4E1;
  --must: #E7B549;
  --must-t: #F1DDA6;
  --viol: #5B5F97;
  --viol-t: #CDCFE6;
  --warn: #C2452D;
  --white: #FFFFFF;
  --cond: 'Sofia Sans Extra Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --sans: 'Sofia Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Lora', Georgia, serif;
  --display: var(--cond);
  --ease: cubic-bezier(.2, .9, .2, 1);
  --spring: cubic-bezier(.3, 1.3, .5, 1);
  --gut: 20px;
  --safe-top: max(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px), env(safe-area-inset-top, 0px));
  --safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  --nav-h: 74px;
  --tab-h: var(--nav-h);
  --muted2: var(--dim);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-weight: 500; font-size: 16px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none; overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
a { color: var(--teal); }
h1, h2, h3, h4 { font-family: var(--cond); font-weight: 800; margin: 0; color: inherit; line-height: 1.04; }
p { margin: 0; }
::selection { background: var(--must-t); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- анимации холста ---------- */
@keyframes up { from { transform: translateY(105%); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.6); } 100% { opacity: 1; transform: none; } }
@keyframes beat { 0% { transform: scale(1); } 30% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes beat2 { 0% { transform: scale(1); } 30% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes stampin { 0% { opacity: 0; transform: rotate(-8deg) scale(1.6); } 70% { opacity: 1; transform: rotate(-8deg) scale(.96); } 100% { opacity: 1; transform: rotate(-8deg) scale(1); } }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes inA { 0% { opacity: 0; transform: translateY(24px); } 100% { opacity: 1; transform: none; } }
@keyframes inL { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes tagin { 0% { opacity: 0; transform: translateY(12px) scale(.9); } 100% { opacity: 1; transform: none; } }
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes growy { from { transform: scaleY(0); } to { transform: none; } }
@keyframes bandin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes viewIn { from { opacity: 0; transform: translateX(16px); } }
@keyframes viewBack { from { opacity: 0; transform: translateX(-16px); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- каркас: экраны и нижнее меню ---------- */
/* приложение и полноэкранные слои — по видимой части экрана (над клавиатурой), см. core/kbd.js */
#app { position: fixed; left: 0; right: 0; top: var(--vt, 0px); height: var(--vh, 100%); display: flex; }
.sidebar { display: none; }
.main { position: relative; flex: 1; min-width: 0; height: 100%; }
.view {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding-top: var(--safe-top); scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.view::after { content: ""; display: block; height: calc(var(--nav-h) + var(--safe-bottom) + 16px); }
/* открыта клавиатура: нижнее меню и закреплённые кнопки внизу прячем, чтобы не закрывали поле ввода */
body.kb .tabbar, body.kb .qe-foot, body.kb .s-foot { display: none; }
body.kb .view::after, body.kb.no-nav .view::after { height: calc(var(--vh, 100vh) * .3); } /* запас снизу: нижнее поле можно поднять от края клавиатуры */
.view.enter { animation: viewIn .28s var(--ease) both; }
.view.enter-back { animation: viewBack .28s var(--ease) both; }

/* страница: поля 20 px, как на холсте */
.page { position: relative; padding: 16px var(--gut) 8px; max-width: 760px; margin: 0 auto; }
.page.wide-page { max-width: 1180px; }

/* нижнее меню — три слова, у активного коралловая черта (холст: nav) */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--nav-h) + var(--safe-bottom)); padding: 0 22px calc(12px + var(--safe-bottom));
  display: flex; align-items: center; gap: 28px; background: var(--paper); box-shadow: 0 -1px 0 var(--line);
  transition: transform .3s var(--ease);
}
.tabbar a {
  position: relative; height: 46px; display: flex; align-items: center; text-decoration: none;
  color: var(--dim); font-family: var(--cond); font-weight: 800; font-size: 21px; line-height: 1; transition: color .2s;
}
.tabbar a svg { display: none; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 3px; border-radius: 2px; background: var(--coral); }
.tabbar a:active { opacity: .7; }

/* ---------- мелкие подписи и заголовки ---------- */
.kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; line-height: 1.2; }
.kicker.sm { font-size: 11.5px; letter-spacing: .16em; }
/* крупный заголовок: строки «выезжают» снизу (холст: title()) */
.disp { margin: 0; display: flex; flex-direction: column; font-family: var(--cond); font-weight: 800; letter-spacing: -.005em; }
.disp > .ln { display: block; overflow: hidden; }
.disp > .ln > span { display: block; animation: up .75s var(--ease) both; }
.h2 { font-family: var(--cond); font-weight: 800; font-size: 28px; line-height: 1.05; }

/* шапка страницы: круглая кнопка «назад», подпись; справа — своё */
.ptop { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.ptop .kicker { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptop .right { margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px; }

/* круглая кнопка 42 px с рамкой 2 px (холст: circle) */
.cbtn {
  width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--ink); color: var(--ink); background: transparent; transition: transform .15s;
}
.cbtn svg { width: 20px; height: 20px; }
.cbtn.x svg { width: 18px; height: 18px; }
.cbtn.dark { border-color: rgba(255, 255, 255, .6); color: var(--white); }
.cbtn:active { transform: scale(.92); }

/* большие кнопки 62 px: надпись слева, значок справа (холст: btn) */
.mbtn {
  position: relative; height: 62px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 18px; border-radius: 8px; border: 0; text-decoration: none; user-select: none;
  font-family: var(--cond); font-weight: 800; font-size: 27px; line-height: 1; text-align: left;
  transition: transform .12s var(--ease), opacity .2s, background .2s;
}
.mbtn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbtn svg { width: 24px; height: 24px; stroke-width: 2.4; flex: none; }
.mbtn.center { justify-content: center; text-align: center; }
.mbtn:active { transform: scale(.98); }
.mbtn[disabled] { opacity: .5; pointer-events: none; }
.mbtn.k-dark { background: var(--ink); color: var(--paper); }
.mbtn.k-coral { background: var(--coral); color: var(--ink); }
.mbtn.k-teal { background: var(--teal); color: var(--white); }
.mbtn.k-paper { background: var(--paper); color: var(--ink); }
.mbtn.k-mute { background: var(--mute); color: var(--dim); }
.mbtn.k-outline { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); color: var(--white); background: transparent; }
.mbtn.k-outline_ink { box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); background: transparent; }
.mbtn.k-outline_grey { box-shadow: inset 0 0 0 2px var(--onink); color: var(--paper); background: transparent; }
.mbtn.sm { height: 54px; font-size: 24px; }
.mrow { display: flex; gap: 8px; }
.mrow > .mbtn { flex: 1; min-width: 0; }

/* прежние кнопки (старые экраны и шторки) — в том же стиле */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 20px; border-radius: 8px;
  font-family: var(--cond); font-size: 22px; font-weight: 800; line-height: 1; transition: transform .12s var(--ease), opacity .2s; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 22px; height: 22px; stroke-width: 2.4; flex: none; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--coral); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-ghost { color: var(--teal); min-height: 40px; padding: 0 6px; gap: 6px; font-family: var(--sans); font-size: 15px; font-weight: 700; }
.btn-ghost svg { width: 18px; height: 18px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 18px; gap: 6px; }
.btn-sm svg { width: 18px; height: 18px; }
.btn-icon {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: var(--ink); box-shadow: inset 0 0 0 2px currentColor; transition: transform .15s;
}
.btn-icon svg { width: 20px; height: 20px; }
.btn-icon.plain { box-shadow: none; }
.btn-icon:active { transform: scale(.92); }

/* плашки-переключатели 38 px (холст: chip) */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut); }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 38px; padding: 0 13px; border: 0; border-radius: 6px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line);
  font-family: var(--sans); font-size: 14px; font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  transition: background .15s, color .15s;
}
.chip.on { background: var(--ink); color: var(--paper); box-shadow: none; }
.chip.sm { height: 34px; }
.chip svg { width: 16px; height: 16px; flex: none; }

/* сегменты на сером (холст: язык в профиле, «Аа») */
.seg { display: flex; padding: 3px; gap: 0; border-radius: 8px; background: var(--mute); }
.seg button {
  flex: 1; min-width: 0; height: 40px; padding: 0 8px; border-radius: 6px; color: var(--ink);
  font-family: var(--sans); font-size: 14px; font-weight: 800; white-space: nowrap; transition: background .15s, color .15s;
}
.seg button.on { background: var(--ink); color: var(--paper); }
.seg.sm { border-radius: 7px; }
.seg.sm button { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 5px; }

/* переключатель 46×28 (холст: профиль) */
.switch { position: relative; width: 46px; height: 28px; flex: none; border-radius: 14px; background: var(--line); transition: background .25s ease; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--white);
  transition: transform .3s cubic-bezier(.3, 1.4, .5, 1);
}
.switch.on { background: var(--teal); }
.switch.on::after { transform: translateX(18px); }
.switch.dark { background: rgba(255, 255, 255, .25); }
.switch.dark.on { background: var(--white); }
.switch.dark.on::after { background: var(--teal); }

/* карточки и строки */
.card { position: relative; background: var(--card); border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--line); }
.card.pad { padding: 14px 16px; }
.tap { cursor: pointer; transition: transform .15s var(--ease); }
.tap:active { transform: scale(.98); }
.list { display: flex; flex-direction: column; }
.list > .row + .row { box-shadow: 0 -1px 0 var(--line); }
.row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; font-size: 15px; font-weight: 700; }
.row .ic { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--mute); color: var(--ink); }
.row .ic svg { width: 18px; height: 18px; }
.row .t { flex: 1; min-width: 0; }
.row .t b { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; }
.row .t small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.3; margin-top: 1px; }
.row .v { color: var(--teal); font-weight: 800; }
.chev { color: var(--dim); width: 20px; height: 20px; flex: none; }
.row.tap:active { transform: none; background: var(--card2); }

/* значки-бейджи */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px 3px; border-radius: 4px;
  background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 11px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge.coral { background: var(--coral); color: var(--ink); }
.badge.teal { background: var(--teal); color: var(--white); }
.badge.must { background: var(--must-t); color: var(--ink); }
.badge.paper { background: var(--paper); color: var(--ink); }

/* буква на цветной плашке (холст: sq) */
.sq {
  width: 46px; height: 46px; flex: none; border-radius: 6px; display: grid; place-items: center;
  font-family: var(--cond); font-weight: 800; font-size: 30px; line-height: 1;
}
/* цвета вариантов ответа: А — коралл, Б — бирюза, В — горчица, Г — фиолет */
.c0 { --c: var(--coral); --cf: var(--ink); --ct: var(--coral-t); }
.c1 { --c: var(--teal); --cf: var(--white); --ct: var(--teal-t); }
.c2 { --c: var(--must); --cf: var(--ink); --ct: var(--must-t); }
.c3 { --c: var(--viol); --cf: var(--white); --ct: var(--viol-t); }

/* аватар: рисованный, фото из Telegram или буква */
.ava {
  position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--mute);
  font-family: var(--cond); font-weight: 800; font-size: 17px; line-height: 1; color: var(--ink);
}
.ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.ava.has-img img { opacity: 1; }
.ava.has-img .ava-l { visibility: hidden; }
.ava.drawn .ava-l { visibility: hidden; }
.ava.xs { width: 28px; height: 28px; font-size: 13px; }
.ava.sm { width: 34px; height: 34px; font-size: 16px; }
.ava.md { width: 46px; height: 46px; font-size: 21px; }
.ava.lg { width: 64px; height: 64px; font-size: 30px; }
.ava.xl { width: 84px; height: 84px; font-size: 44px; }

/* поля ввода */
.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 8px; border: 0; outline: none;
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; transition: box-shadow .15s;
}
textarea.input { min-height: 90px; resize: vertical; line-height: 1.4; }
.input:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.input::placeholder { color: var(--dim); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .kicker { margin-left: 1px; }

/* бегущая строка (холст: marquee) */
.mq { position: relative; height: 42px; overflow: hidden; background: var(--teal); color: var(--white); animation: bandin .8s var(--ease) .45s both; }
.mq-t { display: flex; width: max-content; height: 100%; align-items: center; animation: marquee 44s linear infinite; }
.mq-t > span {
  display: flex; align-items: center; gap: 14px; padding-right: 14px; white-space: nowrap;
  font-family: var(--cond); font-weight: 700; font-size: 22px;
}
.mq-t > span::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mq-dot, var(--coral-t)); flex: none; }
.mq.must { background: var(--must); color: var(--ink); --mq-dot: var(--ink); }
.mq.ink { background: var(--ink); color: var(--paper); }
.mq.full { margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); }

/* «ОТВЕТИЛИ 2 из 12» и полоска из делений (холст: answered) */
.answered { display: flex; flex-direction: column; gap: 8px; }
.answered .top { display: flex; align-items: baseline; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.answered .top b { margin-left: auto; font-family: var(--cond); font-size: 22px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.answered .segs { display: flex; gap: 3px; }
.answered .segs i { flex: 1; height: 8px; border-radius: 4px; background: var(--mute); transition: background .3s; }
.answered .segs i.on { background: var(--ink); }

/* цифры-показатели (холст: stat) */
.stat {
  flex: 1; min-width: 0; min-height: 98px; padding: 12px 14px; border-radius: 8px; animation: rise .6s ease both;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px; overflow: hidden;
}
.stat > span { font-size: 12px; font-weight: 800; letter-spacing: .12em; line-height: 1.2; text-transform: uppercase; }
.stat > b { display: block; font-family: var(--cond); font-weight: 800; font-size: 46px; line-height: 1.1; white-space: nowrap; }
.stat > b small { font-size: .55em; }
.stats { display: flex; gap: 8px; }

/* кнопка «место в Библии» (холст: ref_btn) */
.refbtn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 10px; border-radius: 6px; max-width: 100%;
  background: var(--teal); color: var(--white); text-decoration: none; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  transition: transform .12s var(--ease);
}
.refbtn > span { overflow: hidden; text-overflow: ellipsis; }
.refbtn svg { width: 18px; height: 18px; stroke-width: 2; flex: none; }
.refbtn svg:last-child { width: 16px; height: 16px; stroke-width: 2.4; }
.refbtn:active { transform: scale(.96); }
.refbtn.k-ink { background: var(--ink); color: var(--paper); }
.refbtn.k-paper { background: var(--paper); color: var(--ink); }
.refbtn.k-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.refbtn.sm { height: 34px; font-size: 12px; padding: 0 9px 0 8px; gap: 6px; }
.refbtn.sm svg { width: 16px; height: 16px; }
.reftxt { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

/* точки ожидания «•••» */
.wdots { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.wdots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: dot 1.4s ease infinite; }
.wdots i:nth-child(2) { animation-delay: .2s; }
.wdots i:nth-child(3) { animation-delay: .4s; }

/* шторка снизу (холст: sheet) */
.backdrop {
  position: fixed; left: 0; right: 0; top: var(--vt, 0px); height: var(--vh, 100%); z-index: 100; background: rgba(37, 50, 56, .55);
  display: flex; align-items: flex-end; justify-content: center; animation: fadein .3s ease both;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 90%; overflow: auto; background: var(--paper); color: var(--ink);
  border-radius: 16px 16px 0 0; padding: 10px 20px calc(24px + var(--safe-bottom));
  animation: slideup .45s var(--ease) both;
}
.sheet::before { content: ""; display: block; width: 44px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: var(--line); }
.sheet h3 { font-size: 34px; line-height: 1.02; margin: 0 0 12px; }
.sheet.tall { height: 88%; }
@media (min-width: 700px) {
  .backdrop { align-items: center; }
  .sheet { border-radius: 14px; padding-bottom: 22px; }
}

/* всплывающая подсказка */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--vb, 0px) + var(--nav-h) + var(--safe-bottom) + 18px); z-index: 300;
  transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 8px;
  font-weight: 700; font-size: 15px; animation: toastIn .25s var(--ease) both; max-width: calc(100% - 32px); text-align: center;
}
body.kb .toast { bottom: calc(var(--vb, 0px) + 16px); }

/* пусто / загрузка */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); font-weight: 600; }
.empty svg { width: 40px; height: 40px; color: var(--dim); margin: 0 auto 10px; display: block; }
.loader { display: grid; place-items: center; padding: 60px 0; }
.loader i { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--mute); border-top-color: var(--coral); animation: spin .8s linear infinite; }

.progress { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--teal); transition: width .5s var(--ease); }

/* широкий экран (ПК, проектор): то же, но по центру */
@media (min-width: 900px) {
  :root { --gut: 28px; }
}

/* ---------- подтверждение (своё окно вместо системного) ---------- */
.cfm {
  position: fixed; left: 0; right: 0; top: var(--vt, 0px); height: var(--vh, 100%); z-index: 400; background: rgba(37, 50, 56, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadein .2s ease both;
}
.cfm.out { animation: fadeout .16s ease both; }
.cfm-box { width: 100%; max-width: 380px; background: var(--paper); color: var(--ink); border-radius: 12px; padding: 20px 18px 16px; animation: popin .25s var(--ease) both; }
.cfm-box p { margin: 0 0 18px; font-size: 17px; font-weight: 700; line-height: 1.35; }
.cfm-row { display: flex; gap: 10px; }
.cfm-row button { flex: 1; min-height: 50px; border: 0; border-radius: 8px; font-family: var(--cond); font-weight: 800; font-size: 22px; cursor: pointer; }
.cfm-no { background: var(--mute); color: var(--ink); }
.cfm-yes { background: var(--ink); color: var(--paper); }
.cfm-yes.danger { background: var(--warn); color: var(--white); }
@keyframes fadeout { to { opacity: 0; } }
@keyframes popin { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
