/* ═══════════════════════════════════════════════════════
   TaalFlash 3.0 F7 — разбор текста, тренажёры, тест уровня, сценарии репетитора, гостевой вход и быстрое добавление слов.
   Только переменные main.css (светлая и тёмная тема), без внешних ресурсов. Кнопки и поля — не меньше 44 px.
═══════════════════════════════════════════════════════ */

.f7-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.f7-page { max-width: 880px; margin: 0; }
.f7-page [hidden], .f7-try [hidden] { display: none !important; }
.f7-hide[hidden], [hidden].f7-hide { display: none !important; }

/* ── Подменю между страницами F7 ────────────────────── */
.f7-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.f7-subnav a {
  min-height: 44px; display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 100px;
  border: 2px solid var(--border); background: var(--white); color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none;
}
.f7-subnav a:hover { border-color: var(--orange); color: var(--orange-ink); }
.f7-subnav a.is-active { background: var(--orange-bg); border-color: var(--orange); color: var(--orange-ink); }

/* ── Блоки и подсказки ──────────────────────────────── */
.f7-box { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.f7-box h2 { font-size: 18px; font-weight: 800; margin: 0 0 10px; }
.f7-box h3 { font-size: 15px; font-weight: 800; margin: 0 0 8px; }
.f7-muted { color: var(--text-s); font-size: 14px; }
.f7-note { background: var(--blue-bg); color: var(--blue-ink); border-radius: var(--radius-s); padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.f7-note-guest { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; justify-content: space-between; }
.f7-err { background: var(--red-bg); color: var(--red-ink); border-radius: var(--radius-s); padding: 10px 14px; font-size: 14px; margin: 10px 0; }
.f7-empty { text-align: center; color: var(--text-s); padding: 28px 12px; font-size: 15px; }
.f7-btn { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; font-size: 15px; text-decoration: none; }
.f7-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.f7-actions-end { justify-content: flex-end; }
.f7-grow { flex: 1 1 auto; }
.f7-bar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.f7-bar > span { display: block; height: 100%; background: var(--orange); border-radius: 4px; transition: width .25s; }
.f7-bar-green > span { background: var(--green-l); }
.f7-pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 100px; padding: 3px 10px; font-size: 12px; font-weight: 800; background: var(--bg); color: var(--text-s); border: 1px solid var(--border); }
.f7-pill-ok { background: var(--green-bg); color: var(--green-ink); border-color: transparent; }
.f7-pill-bad { background: var(--red-bg); color: var(--red-ink); border-color: transparent; }
.f7-pill-or { background: var(--orange-bg); color: var(--orange-ink); border-color: transparent; }

/* ── Разбор текста ──────────────────────────────────── */
.f7-ta { width: 100%; min-height: 180px; font-size: 16px; line-height: 1.5; }
.f7-ta-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--text-s); }
.f7-ta-meta .over { color: var(--red-ink); font-weight: 800; }
.f7-text { font-size: 18px; line-height: 2.1; word-break: break-word; }
.f7-sent { display: inline; }
.f7-w {
  display: inline; font: inherit; color: inherit; background: none; border: 0; border-bottom: 2px solid transparent; padding: 2px 1px; margin: 0;
  cursor: pointer; border-radius: 3px; -webkit-tap-highlight-color: transparent;
}
.f7-w:hover { background: var(--orange-bg); }
.f7-w.st-unknown { background: var(--orange-bg); border-bottom-color: var(--orange); color: var(--text); }
.f7-w.st-card { border-bottom-color: var(--green-l); }
.f7-w.st-known, .f7-w.st-easy { color: var(--text-s); }
.f7-w.st-func, .f7-w.st-num, .f7-w.st-name, .f7-w.st-unlisted { cursor: default; color: var(--text); }
.f7-w.is-sel { outline: 3px solid var(--focus); outline-offset: 1px; }
.f7-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-s); margin: 8px 0 0; padding: 0; list-style: none; }
.f7-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.f7-dot-unknown { background: var(--orange-bg); border-bottom: 2px solid var(--orange); }
.f7-dot-card { border-bottom: 2px solid var(--green-l); background: var(--green-bg); }
.f7-dot-easy { background: var(--bg); border: 1px solid var(--border); }
.f7-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.f7-stats li { background: var(--bg); border: 1px solid var(--border); border-radius: 100px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.f7-panel {
  position: sticky; bottom: 76px; z-index: 5; background: var(--white); border: 2px solid var(--orange); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-h); margin-top: 14px;
}
.f7-panel h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.f7-panel .f7-sub { color: var(--text-s); font-size: 14px; margin: 2px 0; }
.f7-panel .f7-ex { font-style: italic; margin: 6px 0; font-size: 15px; }
.f7-list { list-style: none; margin: 0; padding: 0; }
.f7-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--border); min-height: 52px; }
.f7-item:first-child { border-top: 0; }
.f7-item input[type=checkbox] { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--orange); }
.f7-item label { flex: 1 1 auto; min-width: 0; cursor: pointer; }
.f7-item .hw { font-weight: 800; font-size: 16px; }
.f7-item .gl { color: var(--text-s); font-size: 14px; }
.f7-item .ex { color: var(--text-s); font-size: 13px; font-style: italic; margin-top: 2px; overflow-wrap: anywhere; }
.f7-saved { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.f7-saved:first-child { border-top: 0; }
.f7-saved .t { flex: 1 1 160px; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }

/* ── Тренажёры ──────────────────────────────────────── */
.f7-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.f7-tile {
  text-align: left; background: var(--white); border: 2px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-height: 96px;
  cursor: pointer; font: inherit; color: var(--text); display: flex; flex-direction: column; gap: 4px; -webkit-tap-highlight-color: transparent;
}
.f7-tile:hover:not(:disabled) { border-color: var(--orange); }
.f7-tile:disabled { opacity: .55; cursor: default; }
.f7-tile .ic { font-size: 26px; line-height: 1.1; }
.f7-tile .tt { font-weight: 800; font-size: 16px; }
.f7-tile .ds { font-size: 13px; color: var(--text-s); }
.f7-q { text-align: center; }
.f7-q .big { font-size: 34px; font-weight: 800; margin: 6px 0; overflow-wrap: anywhere; }
.f7-q .gl { color: var(--text-s); font-size: 16px; margin-bottom: 10px; }
.f7-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.f7-opt {
  min-height: 52px; font: inherit; font-size: 17px; font-weight: 700; border-radius: var(--radius-s); border: 2px solid var(--border); background: var(--white);
  color: var(--text); cursor: pointer; padding: 10px 12px; text-align: center; overflow-wrap: anywhere;
}
.f7-opt:hover:not(:disabled) { border-color: var(--orange); }
.f7-opt:disabled { cursor: default; }
.f7-opt.ok { background: var(--green-bg); border-color: var(--green-l); color: var(--green-ink); }
.f7-opt.bad { background: var(--red-bg); border-color: var(--red-l); color: var(--red-ink); }
.f7-fb { min-height: 28px; margin: 8px 0; font-weight: 800; font-size: 16px; }
.f7-fb.ok { color: var(--green-ink); }
.f7-fb.bad { color: var(--red-ink); }
.f7-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; text-align: left; margin: 12px 0; }
.f7-fields label { font-size: 13px; font-weight: 700; color: var(--text-s); display: block; margin-bottom: 4px; }
.f7-fields input, .f7-in { width: 100%; min-height: 48px; font: inherit; font-size: 17px; padding: 8px 12px; border: 2px solid var(--border); border-radius: var(--radius-s); background: var(--white); color: var(--text); }
.f7-fields input:focus, .f7-in:focus { border-color: var(--orange); outline: none; }
.f7-fields input.ok { border-color: var(--green-l); background: var(--green-bg); }
.f7-fields input.bad { border-color: var(--red-l); background: var(--red-bg); }
.f7-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 52px; padding: 8px; border: 2px dashed var(--border); border-radius: var(--radius-s); margin: 10px 0; }
.f7-chip {
  min-height: 44px; font: inherit; font-size: 17px; font-weight: 700; padding: 6px 14px; border-radius: 100px; border: 2px solid var(--border-strong);
  background: var(--white); color: var(--text); cursor: pointer;
}
.f7-chip:hover:not(:disabled) { border-color: var(--orange); }
.f7-chip.used { opacity: .35; }
.f7-chips-ans .f7-chip { background: var(--orange-bg); border-color: var(--orange); }
.f7-sum { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 10px 0 14px; }
.f7-sum .n { font-size: 38px; font-weight: 800; line-height: 1; }
.f7-sum .c { font-size: 13px; color: var(--text-s); font-weight: 700; }
.f7-sum > div { text-align: center; min-width: 80px; }
.f7-miss { text-align: left; margin: 10px 0; padding: 0; list-style: none; }
.f7-miss li { padding: 6px 0; border-top: 1px solid var(--border); font-size: 15px; }
.f7-sel { min-height: 44px; font: inherit; padding: 6px 12px; border-radius: var(--radius-s); border: 2px solid var(--border); background: var(--white); color: var(--text); max-width: 100%; }
.f7-tb { width: 100%; border-collapse: collapse; font-size: 14px; }
.f7-tb th, .f7-tb td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--border); }
.f7-tb th { font-size: 12px; color: var(--text-s); text-transform: uppercase; letter-spacing: .03em; border-top: 0; }

/* ── Тест уровня и путь ─────────────────────────────── */
.f7-lt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; font-weight: 800; }
.f7-timer { font-variant-numeric: tabular-nums; font-size: 22px; }
.f7-timer.low { color: var(--red-ink); }
.f7-level { text-align: center; }
.f7-level .lv { font-size: 56px; font-weight: 800; line-height: 1; color: var(--orange-ink); }
.f7-bands { display: grid; gap: 8px; margin: 14px 0; text-align: left; }
.f7-band { display: grid; grid-template-columns: 110px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; }
.f7-stage { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 14px 0; border-top: 1px solid var(--border); }
.f7-stage:first-child { border-top: 0; }
.f7-stage-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 800; }
.f7-stage-h.cur { color: var(--orange-ink); }
.f7-stage-c { font-size: 13px; color: var(--text-s); }

/* ── Сценарии ───────────────────────────────────────── */
.f7-sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.f7-sc {
  text-align: left; background: var(--white); border: 2px solid var(--border); border-radius: var(--radius); padding: 16px; min-height: 130px; cursor: pointer;
  font: inherit; color: var(--text); display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); -webkit-tap-highlight-color: transparent;
}
.f7-sc:hover:not(:disabled) { border-color: var(--orange); }
.f7-sc:disabled { opacity: .6; cursor: default; }
.f7-sc .ic { font-size: 30px; line-height: 1.1; }
.f7-sc .tt { font-weight: 800; font-size: 17px; }
.f7-sc .ds { font-size: 14px; color: var(--text-s); }
.f7-chat { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.f7-msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.f7-msg.bot { align-self: flex-start; background: var(--blue-bg); color: var(--text); border-bottom-left-radius: 4px; }
.f7-msg.me { align-self: flex-end; background: var(--orange-bg); border: 1px solid var(--orange); border-bottom-right-radius: 4px; }
.f7-msg .who { display: block; font-size: 12px; font-weight: 800; color: var(--text-s); margin-bottom: 2px; }
.f7-msg .tr { display: block; margin-top: 6px; font-size: 13px; color: var(--text-s); font-style: italic; white-space: normal; }
.f7-msg.wait { opacity: .75; }
.f7-compose { display: flex; gap: 8px; align-items: stretch; }
.f7-compose textarea { flex: 1 1 auto; min-height: 48px; max-height: 120px; font: inherit; font-size: 16px; padding: 10px 12px; border: 2px solid var(--border); border-radius: var(--radius-s); background: var(--white); color: var(--text); resize: vertical; }
.f7-compose textarea:focus { border-color: var(--orange); outline: none; }
.f7-hint { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.f7-hint button { min-height: 44px; font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 100px; border: 1px dashed var(--border-strong); background: var(--white); color: var(--text); cursor: pointer; text-align: left; }
.f7-hint button:hover { border-color: var(--orange); }
.f7-ph { padding: 8px 4px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-start; }
.f7-ph:first-child { border-top: 0; }
.f7-ph .mk { flex: none; width: 24px; text-align: center; font-weight: 800; }
.f7-ph .mk.ok { color: var(--green-ink); }
.f7-ph .mk.no { color: var(--text-s); }

/* ── Гостевой вход ──────────────────────────────────── */
.f7-try { max-width: 520px; margin: 0 auto; padding: 18px 16px 40px; }
.f7-try-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.f7-try-top .nav-logo { font-size: 22px; }
.f7-try-top > span { display: flex; align-items: center; gap: 8px; }
.f7-fc {
  width: 100%; min-height: 220px; background: var(--white); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 18px; text-align: center; cursor: pointer; font: inherit; color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.f7-fc .w { font-size: 34px; font-weight: 800; overflow-wrap: anywhere; }
.f7-fc .p { color: var(--text-s); font-size: 15px; }
.f7-fc .e { font-style: italic; margin-top: 8px; font-size: 16px; }
.f7-fc .et { color: var(--text-s); font-size: 14px; }
.f7-fc .tap { font-size: 13px; color: var(--text-s); margin-top: 10px; }
.f7-rate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.f7-rate button { min-height: 52px; font: inherit; font-weight: 800; font-size: 14px; border-radius: var(--radius-s); border: 2px solid var(--border); background: var(--white); color: var(--text); cursor: pointer; padding: 6px 4px; }
.f7-rate .r0 { border-color: var(--red-l); }
.f7-rate .r2 { border-color: var(--yellow); }
.f7-rate .r4 { border-color: var(--green-l); }
.f7-rate .r5 { border-color: var(--blue-l); }
.f7-rate button:hover { background: var(--bg); }
.f7-claim label { display: block; font-size: 14px; font-weight: 700; color: var(--text-s); margin: 10px 0 4px; }

/* ── Быстрое добавление (панель слова) ──────────────── */
.f7-inbox-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

@media (max-width: 768px) {
  .f7-text { font-size: 17px; line-height: 2.2; }
  .f7-q .big { font-size: 28px; }
  .f7-band { grid-template-columns: 84px 1fr 48px; }
  .f7-msg { max-width: 94%; }
  .f7-panel { bottom: 70px; }
  .f7-actions .f7-btn { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .f7-bar > span { transition: none; }
}
