/* Nita Edu — обучающая платформа отдела заботы */

:root {
  --bg: #FAF7F5;
  --bg-soft: #FFFFFF;
  --bg-warm: #F4EEFB;

  --ink: #1A1B22;
  --ink-soft: #444751;
  --ink-mute: #80848F;

  --line: rgba(26, 27, 34, 0.08);
  --line-strong: rgba(26, 27, 34, 0.14);

  --primary: #6B4EFF;
  --primary-soft: #EFEBFF;
  --primary-ink: #3E2BB5;
  --accent: #E5689B;
  --accent-soft: #FCE9F1;

  --success: #2EA973;
  --success-soft: #E5F6EE;
  --warn: #D9802B;
  --warn-soft: #FBEFE0;
  --danger: #D8344A;
  --danger-soft: #FBE5E8;

  --shadow-sm: 0 1px 2px rgba(26, 27, 34, 0.04);
  --shadow-md: 0 6px 18px rgba(26, 27, 34, 0.06);
  --shadow-lg: 0 28px 60px -32px rgba(62, 43, 181, 0.25);

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
h1 { font-size: clamp(28px, 3.4vw, 40px); }
h2 { font-size: clamp(22px, 2.4vw, 28px); }
h3 { font-size: 18px; }
h4 { font-size: 15px; }

p { margin: 0 0 12px; color: var(--ink-soft); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}
.container--narrow { max-width: 720px; }

/* ===== Header ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 247, 245, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 20px;
}
.app-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.app-logo:hover { text-decoration: none; }
.app-logo__mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 6px 14px rgba(107, 78, 255, 0.25);
}
.app-logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.app-logo__name { font-size: 16px; }
.app-logo__sub { font-size: 11px; color: var(--ink-mute); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; }
.app-header__user {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 14px;
}
.app-header__hi b { color: var(--ink); font-weight: 600; }
.app-header__logout {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.app-header__logout:hover { background: var(--bg-soft); border-color: var(--ink-mute); }
@media (max-width: 520px) {
  .app-header__hi { display: none; }
  .app-logo__sub { display: none; }
}

/* ===== Page header ===== */
.page-header { padding: 36px 0 16px; }
.page-header__eyebrow {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: 99px;
  font-weight: 700;
  margin-bottom: 14px;
}
.page-header__lead {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 56ch;
}
.page-header__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.page-header__back:hover { color: var(--primary); text-decoration: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.06s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(107, 78, 255, 0.55);
}
.btn--primary:hover { background: var(--primary-ink); text-decoration: none; }
.btn--ghost {
  background: var(--bg-soft);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: #fff; border-color: var(--ink-mute); text-decoration: none; }
.btn--lg { padding: 14px 24px; font-size: 16px; border-radius: 14px; }
.btn--block { width: 100%; }
.btn--success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(46, 169, 115, 0.5);
}
.btn--success:hover { background: #248D5F; text-decoration: none; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ===== Cards ===== */
.card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.card + .card { margin-top: 16px; }

/* ===== Login ===== */
.login-wrap {
  position: relative;
  min-height: calc(100vh - 60px);
  display: grid;
  place-items: center;
  padding: 40px 20px;
  overflow: hidden;
}
.login-wrap::before,
.login-wrap::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}
.login-wrap::before {
  width: 380px; height: 380px;
  background: var(--primary-soft);
  top: -100px; left: -120px;
  opacity: 0.7;
}
.login-wrap::after {
  width: 360px; height: 360px;
  background: var(--accent-soft);
  bottom: -120px; right: -100px;
  opacity: 0.7;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  text-align: center;
}
.login-card__hello {
  font-size: 14px;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.login-card h1 { font-size: 28px; margin-bottom: 10px; line-height: 1.15; }
.login-card p { margin-bottom: 24px; }
.login-form { text-align: left; }
.login-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.login-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.login-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.login-form .field + .field { margin-top: 14px; }
.login-form .btn { margin-top: 22px; }

/* ===== Dashboard: overall progress ===== */
.overall-progress {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.overall-progress__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.overall-progress__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.overall-progress__value {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}
.overall-progress__hint {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink-mute);
}

/* ===== Day cards ===== */
.day-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 4px;
}
@media (max-width: 640px) { .day-grid { grid-template-columns: 1fr; } }

.day-card {
  display: block;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  color: var(--ink);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
  position: relative;
  overflow: hidden;
}
.day-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, var(--primary-soft));
  opacity: 0;
  transition: opacity 0.2s var(--ease);
  pointer-events: none;
}
.day-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.day-card:hover::before { opacity: 0.5; }
.day-card--done { border-color: var(--success-soft); }
.day-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  position: relative;
}
.day-card__num {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: 99px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.day-card__badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
  background: var(--success-soft);
  padding: 4px 10px;
  border-radius: 99px;
}
.day-card__title { font-size: 22px; margin-bottom: 6px; position: relative; }
.day-card__sub { color: var(--ink-mute); font-size: 14px; margin-bottom: 18px; position: relative; }
.day-card__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  position: relative;
}

/* ===== Progress bar ===== */
.bar {
  flex: 1;
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.bar--lg { height: 8px; }
.bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 99px;
  transition: width 0.4s var(--ease);
}
.bar__fill--done { background: var(--success); }

/* ===== Day page ===== */
.day-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  max-width: 460px;
}
.day-progress__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ===== Modules / steps list ===== */
.module {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.18s var(--ease);
}
.module--done { border-color: rgba(46, 169, 115, 0.3); }
.module__header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.5), transparent);
}
.module__title { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -0.005em; }
.module__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 99px;
}

.step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  transition: background 0.15s var(--ease);
}
.step:first-child { border-top: 0; }
.step:hover { background: #FCFBFE; text-decoration: none; }
.step__check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  background: #fff;
  transition: all 0.15s var(--ease);
}
.step--done .step__check {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.step--done .step__check::after {
  content: '';
  width: 10px; height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.step__body { flex: 1; min-width: 0; }
.step__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.step__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}
.step--done .step__title { color: var(--ink-soft); }
.step__summary {
  margin: 0;
  font-size: 14px;
  color: var(--ink-mute);
  line-height: 1.5;
}
.step__type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  white-space: nowrap;
}
.step__type--quiz { background: var(--warn-soft); color: var(--warn); }
.step__type--meeting { background: var(--success-soft); color: var(--success); }
.step__type--practice { background: #E1EEF6; color: #1F6390; }
.step__type--info { background: #EFEFF2; color: var(--ink-soft); }
.step__arrow {
  flex-shrink: 0;
  color: var(--ink-mute);
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.step:hover .step__arrow { opacity: 1; transform: translateX(2px); }

/* ===== Lesson page ===== */
.lesson-meta {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.lesson-summary {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 28px;
}
.lesson-body {
  font-size: 16px;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 22px;
  margin: 16px 0 24px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1A1B22, #2C2A40);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 24px;
}
.video-frame--external { aspect-ratio: auto; padding: 40px 24px; }
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #000;
}
.video-frame__fallback {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-mute);
  text-decoration: underline;
}
.video-frame__fallback:hover { color: var(--ink); }
.video-frame__placeholder {
  display: grid;
  gap: 8px;
  justify-items: center;
}
.video-frame__title { font-size: 16px; font-weight: 600; color: rgba(255,255,255,0.8); }
.video-frame__placeholder svg { opacity: 0.4; }
.video-frame__hint { font-size: 13px; color: rgba(255, 255, 255, 0.45); }

.lesson-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.callout {
  background: var(--primary-soft);
  border: 1px solid rgba(107, 78, 255, 0.16);
  border-radius: var(--r-md);
  padding: 16px 18px;
  color: var(--primary-ink);
  font-size: 14px;
  margin-bottom: 24px;
}
.callout--warn { background: var(--warn-soft); border-color: rgba(217, 128, 43, 0.22); color: #8C5413; }
.callout--success { background: var(--success-soft); border-color: rgba(46, 169, 115, 0.22); color: #1B6A48; }

/* ===== Practice cases ===== */
.practice-block { margin: 16px 0 24px; }
.practice-block__access {
  background: var(--accent-soft);
  border: 1px solid rgba(229, 104, 155, 0.2);
  color: #9A325F;
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 14px;
  font-weight: 500;
  white-space: pre-wrap;
}
.case {
  display: flex;
  gap: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 10px;
}
.case__num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
}
.case__title { font-size: 15px; font-weight: 600; margin: 4px 0 4px; color: var(--ink); }
.case__text { font-size: 14px; margin: 0; color: var(--ink-soft); line-height: 1.6; white-space: pre-wrap; }
.case__link { color: var(--primary-ink); text-decoration: underline; }
.case__link:hover { color: var(--primary); }

.case-submit {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
}
.case-submit__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.case-submit__title { font-size: 13px; color: var(--ink-mute); font-weight: 600; }
.case-submit__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.case-submit__empty { font-size: 13px; color: var(--ink-mute); padding: 4px 0; }
.case-submit__item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.case-submit__item img {
  display: block;
  width: 140px;
  height: 96px;
  object-fit: cover;
}
.case-submit__file {
  display: block;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  max-width: 200px;
  word-break: break-all;
}
.case-submit__del {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.case-submit__del:hover { background: var(--danger); }
.case-submit__status { font-size: 13px; color: var(--ink-mute); margin-top: 6px; min-height: 18px; }
.case-submit__status.is-error { color: var(--danger); }
.case-submit__status.is-ok { color: #2E8B57; }

/* ===== Quiz ===== */
.quiz-empty {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-soft);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  color: var(--ink-mute);
}
.quiz-empty h3 { color: var(--ink); }

.quiz-form { margin-top: 20px; }
.quiz-question {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  margin-bottom: 14px;
}
.quiz-question__num {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.quiz-question__text {
  font-size: 17px;
  margin: 0 0 16px;
  font-weight: 600;
  line-height: 1.4;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
  background: #fff;
  font-size: 15px;
  position: relative;
}
.quiz-option:hover { border-color: var(--primary); background: var(--primary-soft); }
.quiz-option input { position: absolute; opacity: 0; pointer-events: none; }
.quiz-option__radio {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: #fff;
  display: grid;
  place-items: center;
  transition: all 0.15s var(--ease);
}
.quiz-option__radio::after {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
  transform: scale(0);
  transition: transform 0.15s var(--ease);
}
.quiz-option__text { flex: 1; line-height: 1.5; }
.quiz-option__mark {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 18px;
  color: var(--success);
}
.quiz-option__mark--wrong { color: var(--danger); }

.quiz-option--selected { border-color: var(--primary); background: var(--primary-soft); }
.quiz-option--selected .quiz-option__radio { border-color: var(--primary); }
.quiz-option--selected .quiz-option__radio::after { transform: scale(1); }

.quiz-option--correct {
  border-color: var(--success);
  background: var(--success-soft);
  cursor: default;
}
.quiz-option--correct .quiz-option__radio { border-color: var(--success); background: var(--success); }
.quiz-option--correct .quiz-option__radio::after { background: #fff; transform: scale(1); }

.quiz-option--wrong {
  border-color: var(--danger);
  background: var(--danger-soft);
  cursor: default;
}
.quiz-option--wrong .quiz-option__radio { border-color: var(--danger); background: var(--danger); }
.quiz-option--wrong .quiz-option__radio::after { background: #fff; transform: scale(1); }

.quiz-submit {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.quiz-submit__hint {
  color: var(--danger);
  font-size: 14px;
}

.quiz-result {
  margin-top: 24px;
  padding: 28px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.quiz-result--pass { background: linear-gradient(180deg, var(--success-soft), var(--bg-soft)); border-color: rgba(46, 169, 115, 0.25); }
.quiz-result--fail { background: linear-gradient(180deg, var(--warn-soft), var(--bg-soft)); border-color: rgba(217, 128, 43, 0.25); }
.quiz-result__emoji { font-size: 48px; margin-bottom: 8px; }
.quiz-result h2 { margin: 0 0 8px; }
.quiz-result__score { font-size: 16px; margin: 0 0 6px; color: var(--ink); }
.quiz-result__score b { color: var(--primary-ink); }
.quiz-result--pass .quiz-result__score b { color: var(--success); }
.quiz-result--fail .quiz-result__score b { color: var(--warn); }
.quiz-result__hint { font-size: 14px; color: var(--ink-mute); margin: 0 0 18px; max-width: 44ch; margin-inline: auto; }
.quiz-result__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Day completion ===== */
.congrats {
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  border: 1px solid rgba(107, 78, 255, 0.18);
  border-radius: var(--r-lg);
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}
.congrats__emoji { font-size: 48px; margin-bottom: 6px; }
.congrats h2 { margin-bottom: 8px; color: var(--primary-ink); }
.congrats p { font-size: 16px; color: var(--ink-soft); max-width: 56ch; margin-inline: auto; margin-bottom: 18px; }

/* ===== Footer ===== */
.app-footer {
  margin-top: 60px;
  padding: 24px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-mute);
}

/* ===== Utility ===== */
.hidden { display: none !important; }
.spacer-md { height: 24px; }
.spacer-lg { height: 40px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }

/* ===== HUD в шапке ===== */
.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 360px;
  padding: 6px 12px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: 99px;
}
.hud__level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  color: var(--primary-ink);
  white-space: nowrap;
}
.hud__icon { font-size: 16px; line-height: 1; }
.hud__bar {
  flex: 1;
  height: 6px;
  background: rgba(107, 78, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
  min-width: 60px;
}
.hud__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 99px;
  transition: width 0.5s var(--ease);
}
.hud__xp {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-ink);
  white-space: nowrap;
}
.hud__xp span {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-mute);
  margin-left: 2px;
  letter-spacing: 0.05em;
}
@media (max-width: 720px) {
  .hud { display: none; }
}

/* ===== Кнопка с XP-меткой ===== */
.btn__xp {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  font-weight: 700;
}

/* ===== Цель дня ===== */
.daily-card {
  background: linear-gradient(135deg, var(--accent-soft), var(--primary-soft));
  border: 1px solid rgba(107, 78, 255, 0.18);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.daily-card--done {
  background: linear-gradient(135deg, var(--success-soft), var(--bg-soft));
  border-color: rgba(46, 169, 115, 0.25);
}
.daily-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.daily-card__eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-weight: 700;
  margin-bottom: 4px;
}
.daily-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.daily-card__counter {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-ink);
  white-space: nowrap;
}
.daily-card__counter span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
}
.daily-card__hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-mute);
}

/* ===== Полки на дашборде ===== */
.dashboard-extras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
@media (max-width: 760px) {
  .dashboard-extras { grid-template-columns: 1fr; }
}

/* ===== Бейджи ===== */
.badges-card, .leaderboard-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.badges-card__head, .leaderboard-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  gap: 10px;
}
.badges-card__head h3, .leaderboard-card__head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.badges-card__count {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-ink);
  background: var(--primary-soft);
  padding: 3px 10px;
  border-radius: 99px;
}
.leaderboard-card__hint {
  font-size: 12px;
  color: var(--ink-mute);
}
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px;
}
.badges-grid { position: relative; }
.badge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 6px;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--line);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  cursor: help;
  outline: none;
}
.badge:hover, .badge:focus-visible { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.badge:focus-visible { box-shadow: 0 0 0 3px var(--primary-soft); }
.badge--locked { opacity: 0.45; filter: grayscale(0.6); }
.badge--locked:hover, .badge--locked:focus-visible { opacity: 0.85; filter: grayscale(0); }
.badge--got {
  background: linear-gradient(180deg, var(--primary-soft), var(--bg-soft));
  border-color: rgba(107, 78, 255, 0.22);
}
.badge__icon { font-size: 28px; line-height: 1; margin-bottom: 6px; }
.badge__title { font-size: 11px; font-weight: 600; color: var(--ink); line-height: 1.25; }

/* Tooltip "как получить" */
.badge__tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 220px;
  padding: 12px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 28px -10px rgba(26, 27, 34, 0.45);
  text-align: left;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  font-weight: 400;
  filter: none;
}
.badge__tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
}
.badge:hover .badge__tip,
.badge:focus-visible .badge__tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.badge__tip-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.badge__tip-hint { font-size: 12px; line-height: 1.45; color: rgba(255,255,255,0.8); margin-bottom: 6px; }
.badge__tip-status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
}
.badge--got .badge__tip-status { color: #6BE0A4; }

/* Крайние бейджи: смещаем тултип, чтобы не уходил за край контейнера */
.badge:first-child .badge__tip { left: 0; transform: translateX(0) translateY(4px); }
.badge:first-child .badge__tip::after { left: 28px; transform: none; }
.badge:first-child:hover .badge__tip,
.badge:first-child:focus-visible .badge__tip { transform: translateX(0) translateY(0); }
.badge:nth-child(5n) .badge__tip,
.badge:last-child .badge__tip { left: auto; right: 0; transform: translateX(0) translateY(4px); }
.badge:nth-child(5n) .badge__tip::after,
.badge:last-child .badge__tip::after { left: auto; right: 22px; transform: none; }
.badge:nth-child(5n):hover .badge__tip,
.badge:nth-child(5n):focus-visible .badge__tip,
.badge:last-child:hover .badge__tip,
.badge:last-child:focus-visible .badge__tip { transform: translateX(0) translateY(0); }


/* ===== Лидерборд ===== */
.leader-row {
  display: grid;
  grid-template-columns: 28px 28px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.leader-row:last-child { border-bottom: 0; }
.leader-row--me {
  background: linear-gradient(90deg, var(--primary-soft), transparent);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 0 -10px;
}
.leader-row__rank { font-weight: 800; color: var(--ink-mute); font-size: 13px; }
.leader-row__avatar { font-size: 20px; line-height: 1; }
.leader-row__name { font-weight: 600; color: var(--ink); }
.leader-row__me {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.leader-row__level { font-size: 12px; color: var(--ink-mute); }
.leader-row__xp { font-weight: 700; color: var(--primary-ink); font-size: 13px; min-width: 56px; text-align: right; }
.leaderboard-card__empty {
  margin: 0;
  font-size: 13px;
  color: var(--ink-mute);
  text-align: center;
  padding: 12px 0;
}

/* ===== Тосты ===== */
.toast-host {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 320px;
}
.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 18px 40px -16px rgba(26, 27, 34, 0.25);
  pointer-events: auto;
  transform: translateX(120%);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.toast--in { transform: translateX(0); }
.toast--out { transform: translateX(120%); opacity: 0; }
.toast--badge { background: linear-gradient(135deg, var(--primary-soft), var(--bg-soft)); border-color: rgba(107, 78, 255, 0.3); }
.toast--level { background: linear-gradient(135deg, #FFF6D7, var(--bg-soft)); border-color: rgba(217, 128, 43, 0.3); }
.toast__icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.toast__title { font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.toast__hint { font-size: 12px; color: var(--ink-mute); line-height: 1.4; }
@media (max-width: 520px) {
  .toast-host { top: 70px; left: 12px; right: 12px; max-width: none; }
}

/* ===== Конфетти ===== */
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

/* ===== Step: персонажи ===== */
.step__chars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.step__char {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--accent-soft);
  padding: 3px 10px 3px 4px;
  border-radius: 99px;
  border: 1px solid rgba(229, 104, 155, 0.18);
}
.step__char-name { color: #9A325F; }
.step__type--dialog { background: var(--accent-soft); color: #9A325F; }


/* ===== Practice case: персонаж ===== */
.case__char {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}
.case__char-avatar { font-size: 18px; line-height: 1; }
.case__char-name { font-weight: 700; color: var(--ink); }
.case__char-tag {
  font-size: 11px;
  color: var(--ink-mute);
  background: var(--bg);
  padding: 1px 7px;
  border-radius: 99px;
}

/* ===== Quiz: таймер, прогресс, флэш ===== */
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.quiz-progress__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.quiz-progress__bar {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.quiz-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 99px;
  transition: width 0.4s var(--ease);
}
.quiz-feedback {
  margin: 14px 0 0;
  padding: 14px 18px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.55;
  display: none;
}
.quiz-feedback--ok, .quiz-feedback--bad { display: block; }
.quiz-feedback--ok { background: var(--success-soft); border-color: rgba(46,169,115,0.3); color: #1B6A48; }
.quiz-feedback--bad { background: var(--warn-soft); border-color: rgba(217,128,43,0.3); color: #6B3F12; }
.quiz-feedback__head { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.quiz-feedback__text { font-size: 14px; line-height: 1.55; }
.quiz-nav { display: flex; justify-content: flex-end; margin-top: 14px; }

.quiz-options button.quiz-option {
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.quiz-options button.quiz-option:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.quiz-options button.quiz-option:disabled { cursor: default; }


/* ===== XP-разбивка (квиз/диалог) ===== */
.xp-breakdown {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin: 18px 0;
  text-align: left;
  max-width: 360px;
  margin-inline: auto;
}
.xp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  padding: 4px 0;
  color: var(--ink-soft);
}
.xp-row b { color: var(--ink); font-weight: 700; }
.xp-row--bonus { color: var(--warn); }
.xp-row--bonus b { color: var(--warn); }
.xp-row--total {
  border-top: 1px solid var(--line-strong);
  margin-top: 6px;
  padding-top: 8px;
  font-size: 15px;
  font-weight: 700;
}
.xp-row--total b { color: var(--primary-ink); font-size: 17px; }

/* ===== Диалог-симулятор ===== */
.dialog-character {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin: 16px 0;
}
.dialog-character__avatar { font-size: 36px; line-height: 1; }
.dialog-character__name { font-weight: 700; font-size: 16px; }
.dialog-character__tag {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dialog-character__bio {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 2px;
}
.dialog-intro {
  background: var(--warn-soft);
  border-left: 3px solid var(--warn);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: #6B3F12;
  margin-bottom: 18px;
  line-height: 1.55;
}

.dialog-transcript {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}
.bubble {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 88%;
}
.bubble--client { align-self: flex-start; }
.bubble--me { align-self: flex-end; flex-direction: row-reverse; }
.bubble__avatar {
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--bg-warm);
  border-radius: 50%;
  flex-shrink: 0;
}
.bubble__avatar--me { background: var(--primary-soft); }
.bubble__text {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
}
.bubble--client .bubble__text { border-bottom-left-radius: 4px; }
.bubble--me .bubble__text {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  border-bottom-right-radius: 4px;
}

.dialog-pick {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-top: 16px;
}
.dialog-pick__head {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.dialog-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dialog-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.06s var(--ease);
  color: var(--ink);
  width: 100%;
}
.dialog-option:hover { border-color: var(--primary); background: var(--primary-soft); }
.dialog-option:active { transform: translateY(1px); }
.dialog-option__num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.dialog-option__text { flex: 1; line-height: 1.5; }

.dialog-result {
  margin-top: 24px;
  padding: 28px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.dialog-result__emoji { font-size: 48px; margin-bottom: 6px; }
.dialog-result h2 { margin: 0 0 8px; }
.dialog-result__verdict {
  font-size: 14px;
  color: var(--ink-soft);
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin: 12px auto 0;
  max-width: 50ch;
  line-height: 1.55;
}
.dialog-axes {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 18px 0;
  flex-wrap: wrap;
}
.dialog-axis {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dialog-axis__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  font-weight: 700;
}
.dialog-axis__bar { display: flex; gap: 4px; }
.dialog-axis__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--line);
}
.dialog-axis__dot.is-on { background: var(--primary); }
.dialog-axis__val { font-size: 12px; font-weight: 700; color: var(--ink); }
.dialog-result__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
