/* web-ui — mobile-first, центрированная колонка на десктопе. */
@font-face {
  font-family: "Manrope";
  src: url("./fonts/manrope-cyrillic.8fc0aa17e129.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("./fonts/manrope-latin.101877a7a906.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Golos Text";
  src: url("./fonts/golos-text-cyrillic.024646dc00da.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  src: url("./fonts/golos-text-latin.3ba0fde64bcf.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --col: 480px;
  --bg: #0a0a0a;
  --surface: #161616;
  --card: #232323;
  --card-2: #2b2b2b;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f3f3f1;
  --muted: #9d9d99;
  --muted-2: #6f6f6c;
  --accent: #e6f84c;
  --accent-ink: #16190a;
  --danger: #ff6b6b;
  --ok: #71e6a3;
  --radius: 20px;
  --radius-sm: 14px;
  --tabbar-h: calc(86px + env(safe-area-inset-bottom, 0px));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Manrope,
    system-ui, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Центрированная колонка — и на мобильном, и на десктопе. */
.app {
  position: relative;
  max-width: var(--col);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  overflow-x: hidden;
}

.view {
  padding: 22px 18px calc(var(--tabbar-h) + 28px);
  padding-top: max(22px, calc(env(safe-area-inset-top, 0px) + 12px));
  min-height: 100dvh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

/* --- бренд --- */
.brand {
  display: flex;
  align-items: center;
  margin-bottom: 22px;
}

.brand__logo { display: block; width: 130px; height: auto; }
.brand--sub .brand__logo { width: 105px; }

/* --- заголовки --- */
.h1 {
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.h1--sm {
  font-size: 26px;
}

.sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
}

.section-title {
  margin: 22px 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--card);
  flex: none;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.topbar__title {
  font-size: 15px;
  color: var(--muted);
}

.topbar__title b {
  color: var(--text);
}

/* --- карточки/плитки --- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  transition: background 0.15s ease, transform 0.06s ease;
}

.tile:active {
  transform: scale(0.995);
}

.tile--hover:hover {
  background: var(--card-2);
}

.tile__icon {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--accent);
  display: grid;
  place-items: center;
}

.tile__icon svg {
  width: 26px;
  height: 26px;
}

.tile__body {
  flex: 1;
  min-width: 0;
  display: block;
}

.tile__title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.tile__sub {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: var(--muted);
}

.tile__go {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  flex: none;
}

.tile__go svg {
  width: 18px;
  height: 18px;
}

.tile__chev {
  color: var(--muted-2);
  flex: none;
}

.tile__chev svg {
  width: 20px;
  height: 20px;
}

/* --- прогресс --- */
.progress {
  margin: 4px 0 20px;
}

.progress__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 14px;
}

.progress__row b {
  font-size: 15px;
}

.progress__value {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 18px;
}

.bar {
  height: 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 6px;
  transition: width 0.3s ease;
}

.bar--sm {
  height: 4px;
}
.signs-summary { margin: -4px 0 18px; }
.sign-all-link { text-align: left; width: auto; margin: -6px 0 10px; color: var(--accent); }

.bar__fill--muted {
  background: rgba(255, 255, 255, 0.35);
}

/* Главная v2 оформлена отдельно в home-v2/home.css. */

/* --- сегментные табы --- */
.seg {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.seg__btn {
  position: relative;
  padding: 0 0 12px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.seg__btn.is-active {
  color: var(--text);
}

.seg__btn.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.seg--pill {
  gap: 8px;
  border-bottom: 0;
  margin-bottom: 18px;
}

.seg--pill .seg__btn {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  background: var(--card);
  border: 1px solid var(--line);
}

.seg--pill .seg__btn.is-active {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.seg--pill .seg__btn.is-active::after {
  display: none;
}

/* --- сетка плиток (билеты/темы) --- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gtile {
  position: relative;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  transition: background 0.15s ease, transform 0.06s ease;
}

.gtile:hover {
  background: var(--card-2);
}

.gtile:active {
  transform: scale(0.99);
}

.gtile__num {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.gtile__name {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gtile__status {
  margin-top: auto;
  padding-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.gtile__mark {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  color: var(--muted-2);
}

.gtile__mark svg {
  width: 22px;
  height: 22px;
}

.gtile--done .gtile__mark {
  color: var(--accent);
}

.gtile--progress .gtile__mark {
  color: var(--text);
}

.gtile .bar {
  margin-top: 10px;
}

.gtile--done .bar__fill {
  background: var(--accent);
}

/* --- вопрос --- */
.qcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
}

.qcard--image { padding: 0; overflow: hidden; }
.qcard--image .qtext { padding: 14px; }
.qcard--image .media-fallback { min-height: 140px; margin: 0; border-radius: 0; }
.road-image { display: block; width: 100%; padding: 0; text-align: left; }
.qmedia.qmedia--road {
  position: relative;
  width: 100%;
  margin: 0;
  border-radius: 0;
  background: #191919;
}
.qmedia.qmedia--road:not([style]) { min-height: 140px; }
.qmedia.qmedia--road img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  opacity: 0;
}
.qmedia.qmedia--road.is-ready img { opacity: 1; }
.qmedia__loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}
.qmedia--road.is-ready .qmedia__loading { display: none; }

.qmedia {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0d0d0d;
  margin-bottom: 14px;
}

.qmedia img,
.qmedia video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  background: #0d0d0d;
}

.qmedia--empty {
  display: grid;
  place-items: center;
  min-height: 140px;
  color: var(--muted-2);
  font-size: 14px;
  border: 1px dashed var(--line-2);
}

.media-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 140px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-2);
  background: #0d0d0d;
  color: var(--muted-2);
  font-size: 14px;
  padding: 14px;
  gap: 12px;
  text-align: center;
  flex-direction: column;
  align-items: center;
}

.media-fallback .btn { margin-top: 12px; }
.media-wait { min-height: 170px; display: grid; place-items: center; text-align: center; color: var(--muted); margin-bottom: 16px; }

.qtext {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.answer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.3;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.answer[disabled]:not(.answer--static) { cursor: wait; opacity: .7; }

.answer__mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--muted-2);
  flex: none;
  display: grid;
  place-items: center;
  position: relative;
  line-height: 1;
}

.answer__mark svg {
  width: 12px;
  height: 12px;
  opacity: 0;
}

.answer.is-selected {
  border-color: var(--accent);
}

.answer.is-selected .answer__mark {
  border-color: var(--accent);
  background: var(--accent);
}

.answer.is-selected .answer__mark svg {
  opacity: 1;
  color: var(--accent-ink);
}

.answer.is-correct {
  border-color: var(--ok);
  background: rgba(113, 230, 163, 0.12);
}

.answer.is-correct .answer__mark {
  border-color: var(--ok);
  background: var(--ok);
}

.answer.is-correct .answer__mark svg {
  opacity: 1;
  color: var(--accent-ink);
}

.answer.is-wrong {
  border-color: var(--danger);
  background: rgba(255, 107, 107, 0.09);
}

.answer.is-wrong .answer__mark {
  border-color: var(--danger);
  background: var(--danger);
}

.answer--static {
  cursor: default;
}

.answer__note {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  flex: none;
}

.answer__note--wrong { color: var(--danger); }
.answer.is-correct .answer__note { color: var(--ok); }
.answer.is-wrong .answer__mark svg { opacity: 1; color: #fff; width: 14px; height: 14px; }

/* --- кнопки --- */
.btn {
  display: block;
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary[disabled] {
  opacity: 0.4;
  cursor: default;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn--plain {
  color: var(--muted);
  font-weight: 600;
  padding: 12px;
}

.btn--sm {
  width: auto;
  display: inline-block;
  padding: 10px 16px;
  font-size: 14px;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.btn-row--results { flex-wrap: wrap; margin: 20px 0; }
.btn-row--results .btn--primary { width: 100%; }
.btn-row--results .btn--ghost { flex: 1; min-width: 128px; }
.stats--result { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stats--result .stat__value { font-size: 26px; }

.question-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.question-actions .btn { min-height: 44px; }
.question-actions .is-bookmarked { border-color: var(--accent); color: var(--accent); }
.fast-toggle { display: block; margin: 20px 0 0; padding: 12px 0; color: var(--muted); font-size: 14px; text-align: left; }
.fast-toggle b { color: var(--accent); }

.question-index { margin-bottom: 16px; }
.question-index__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.question-index__head span { color: var(--muted); font-size: 12px; }
.question-index__scroll { max-height: 160px; overflow-y: auto; overscroll-behavior: contain; }
.numgrid--session { margin-bottom: 0; grid-template-columns: repeat(10, minmax(0, 1fr)); }
.numgrid--session .numgrid__btn { min-width: 0; aspect-ratio: auto; height: 34px; position: relative; font-size: 12px; }
.numgrid--session .numgrid__btn.is-current { outline: 2px solid var(--accent); outline-offset: 1px; }
.numgrid--session .numgrid__btn.is-answered { background: var(--ok); border-color: var(--ok); color: var(--accent-ink); }
.numgrid--session .numgrid__btn.is-skipped { border-color: var(--line); color: var(--muted); }
.numgrid__btn.is-unavailable { border-style: dashed; color: var(--muted); opacity: .8; cursor: not-allowed; }

/* Полноэкранный маршрут внутри приложения: нижние табы остаются за слоем. */
.viewer { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column; }
.viewer__header { padding: max(12px, env(safe-area-inset-top)) 16px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.viewer__header b { font-size: 15px; min-width: 0; }
.viewer__content { flex: 1; min-height: 0; overflow: auto; padding: 16px; overscroll-behavior: contain; }
.viewer__item { max-width: 800px; margin: 0 auto 20px; }
.viewer__media { display: flex; align-items: center; justify-content: center; min-height: 120px; }
.viewer__media img, .viewer__media video { display: block; max-width: 100%; max-height: calc(100dvh - 180px); width: auto; height: auto; object-fit: contain; margin: auto; }
.viewer__media.viewer__media--image {
  position: relative;
  display: block;
  width: min(100%, calc((100dvh - 180px) * var(--media-scale, 1)));
  min-height: 0;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 12px;
  background: #191919;
}
.viewer__media--image:not([style]) { min-height: 120px; }
.viewer__media.viewer__media--image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  opacity: 0;
}
.viewer__media.viewer__media--image.is-ready img { opacity: 1; }
.viewer__media--image.is-ready .qmedia__loading { display: none; }
.viewer__item.is-zoomed .viewer__media { display: block; overflow: auto; }
.viewer__item.is-zoomed .viewer__media--image { width: 100%; aspect-ratio: auto !important; border-radius: 0; }
.viewer__item.is-zoomed .viewer__media--image img {
  position: static;
  max-width: none;
  max-height: none;
  width: max(150%, 600px);
  height: auto;
}
.viewer__comment { color: var(--muted); font-size: 14px; line-height: 1.5; white-space: pre-line; }
.viewer__zoom { width: auto; margin: 8px 16px max(12px, env(safe-area-inset-bottom)); }

/* --- подсказка / разбор --- */
.hint {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.hint__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.hint__text {
  color: #d9d9d3;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-line;
}

.hint__media {
  margin-bottom: 12px;
}

.hint__media img,
.hint__media video {
  display: block;
  width: 100%;
  border-radius: var(--radius-sm);
  background: #0d0d0d;
  max-height: 320px;
  object-fit: contain;
}

.hint__comment {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

.feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.feedback svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.feedback--ok {
  color: var(--ok);
}

.feedback--bad {
  color: var(--danger);
}

/* --- экзамен --- */
.exam-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.exam-head__q {
  font-size: 16px;
  font-weight: 800;
}

.timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.timer svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.timer.is-low {
  color: var(--danger);
}

.timer.is-low svg {
  color: var(--danger);
}

.numgrid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}

.numgrid__btn {
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  display: grid;
  place-items: center;
}

@media (max-width: 359px) {
  .view { padding-left: 12px; padding-right: 12px; }
  .numgrid { gap: 4px; }
  .numgrid--session .numgrid__btn { font-size: 11px; height: 32px; }
}

.qtext, .answer, .viewer__comment, .hint__text { overflow-wrap: anywhere; }
.view { padding-bottom: calc(var(--tabbar-h) + 36px); }

.numgrid__btn.is-current {
  border-color: var(--accent);
  color: var(--accent);
}

.numgrid__btn.is-answered {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.numgrid__btn.is-wrong {
  background: rgba(255, 107, 107, 0.18);
  border-color: var(--danger);
  color: var(--danger);
}

@media (max-width: 480px) {
  .numgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .numgrid__btn { aspect-ratio: auto; min-height: 42px; }
  .numgrid--session .numgrid__btn { min-height: 44px; height: 44px; }
  .question-index__scroll { max-height: 210px; }
}

/* --- результаты --- */
.verdict {
  border-radius: var(--radius);
  padding: 22px;
  margin: 4px 0 18px;
  border: 1px solid var(--line);
  background: var(--card);
}

.verdict--pass {
  border-color: var(--accent);
  background: rgba(230, 248, 76, 0.08);
}

.verdict--fail {
  border-color: var(--danger);
  background: rgba(255, 107, 107, 0.07);
}

.verdict__label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.verdict__title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.verdict--pass .verdict__title {
  color: var(--accent);
}

.verdict--fail .verdict__title {
  color: var(--danger);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 8px;
}

.stat__value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat__label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.review-item {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.review-item__meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line-2);
  color: var(--muted);
}

.pill--ok {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.pill--bad {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

/* --- список вопросов (ошибки) --- */
.qlist {
  display: flex;
  flex-direction: column;
}

.qitem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
  text-align: left;
}

.qitem__icon {
  width: 24px;
  height: 24px;
  color: var(--muted-2);
  flex: none;
}

.qitem__icon svg {
  width: 22px;
  height: 22px;
}

.qitem__body {
  flex: 1;
  min-width: 0;
  display: block;
}

.qitem__meta {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 2px;
}

.qitem__text {
  display: block;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qitem__act {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}

.qitem__act svg {
  width: 16px;
  height: 16px;
}

.qitem__act.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.empty {
  color: var(--muted);
  font-size: 15px;
  padding: 28px 4px;
  text-align: center;
}

.note {
  margin-top: 24px;
  color: var(--muted-2);
  font-size: 13px;
  text-align: center;
}
.note--left { text-align: left; margin: 10px 0 20px; line-height: 1.5; }

/* --- настройки и обращение (тот же тёмный стиль и акцент) --- */
.feedback-form { display: flex; flex-direction: column; gap: 10px; }
.feedback-form label { font-size: 14px; font-weight: 700; margin-top: 8px; }
.feedback-form label span { color: var(--muted); font-weight: 400; }
.feedback-form input, .feedback-form select, .feedback-form textarea {
  width: 100%; min-width: 0; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px; line-height: 1.45;
}
.feedback-form textarea { resize: vertical; min-height: 125px; }
.feedback-form input:focus-visible, .feedback-form select:focus-visible,
.feedback-form textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.feedback-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.feedback-context { color: var(--accent); font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.feedback-privacy { color: var(--muted); font-size: 13px; line-height: 1.45; }
.feedback-error { color: var(--danger); font-size: 14px; }
.feedback-success h2 { color: var(--accent); font-size: 20px; margin: 0; }
.feedback-success p { line-height: 1.5; }
.feedback-success .btn--plain { width: 100%; margin-top: 10px; }
.stats--result .stat__label { overflow-wrap: anywhere; }
.btn-row--results .btn { min-height: 44px; }

/* --- нижняя навигация --- */
.tabs {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--col);
  height: var(--tabbar-h);
  display: flex;
  align-items: flex-start;
  background: linear-gradient(126deg, #16334f 0%, #112c4c 55%, #0e2746 100%);
  border: 1px solid #37587c;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  padding: 0 8px env(safe-area-inset-bottom, 0px);
  box-shadow: inset 0 1px 0 #abcaf10a;
  z-index: 20;
}

.tabs__btn {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 44px;
  padding: 26px 0 0;
  font: 400 12px/1.5 "MemPDD Golos Text", sans-serif;
  color: #a4c6f7;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tabs__btn.is-active {
  color: #102035;
  font-weight: 700;
}
.tabs__label { position: relative; z-index: 1; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.tabs__btn.is-active .tabs__label { max-width: 60px; }
.tabs__tongue {
  position: absolute;
  z-index: 0;
  left: calc(var(--tongue-center) + var(--tongue-shift));
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  width: 60px;
  height: 84px;
  transform: translateX(-50%);
  border-radius: 6px;
  border: 1px solid #ffd36477;
  background: linear-gradient(130deg, #ffcb43 0%, #ffc13f 42%, #ffb832 100%);
  box-shadow: inset 0 1px 0 #ffe58a88, 0 3px 8px #010b1b2e;
  pointer-events: none;
}
.tabs__btn:focus-visible { outline: 2px solid #feba3e; outline-offset: 4px; }
@media (max-width: 359px) {
  :root { --tabbar-h: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .tabs { padding-left: 4px; padding-right: 4px; }
  .tabs__tongue { width: 54px; height: 78px; }
  .tabs__btn { font-size: 10.5px; padding-top: 25px; }
  .tabs__btn.is-active .tabs__label { max-width: 54px; }
}

/* --- установка PWA --- */
.install-hint {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + 12px);
  width: calc(100% - 32px);
  max-width: calc(var(--col) - 32px);
  background: var(--card-2);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 30;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.install-hint[hidden] {
  display: none;
}

/* Подсказка установки не выбивается из палитры главной и остаётся закрываемой. */
body:has(.view--home) .install-hint {
  background: #1b3659;
  border-color: rgba(143, 186, 245, .36);
  color: #f8f8fa;
  font-family: "Golos Text", sans-serif;
}
body:has(.view--home) .install-hint b { color: #ffc13f; }
body:has(.view--home) .install-hint .btn--primary {
  background: #ffc13f;
  border-color: #ffc13f;
  color: #09182a;
  font-family: "Manrope", sans-serif;
}

/* Подсказка установки не перекрывает просмотр и нижние действия вопроса. */
body:has(.viewer) .install-hint { display: none; }
body:has(.install-hint:not([hidden])) .view { padding-bottom: calc(var(--tabbar-h) + 155px); }

.install-hint b {
  color: var(--accent);
}

.install-hint button {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: 4px;
}

/* --- десктоп: подпись/фон вокруг колонки --- */
@media (min-width: 720px) {
  body {
    background:
      radial-gradient(900px 500px at 20% -10%, rgba(230, 248, 76, 0.06), transparent 60%),
      var(--bg);
  }
  .app {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 30px 80px rgba(0, 0, 0, 0.5);
    border-radius: 0;
  }
}
