:root{
  --bg:#fff7ff;
  --card:#ffffffcc;
  --text:#1c1b22;
  --muted:#5a586a;
  --primary:#6a5cff;
  --primary2:#ff4fb6;
  --good:#19b37a;
  --warn:#ffb020;
  --bad:#ff4d4f;
  --shadow: 0 18px 50px rgba(20, 17, 40, .18);
  --shadow2: 0 10px 22px rgba(20, 17, 40, .12);
  --radius: 18px;
  --radius2: 14px;
  --ring: 0 0 0 4px rgba(106,92,255,.18);
  --font: ui-rounded, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background: radial-gradient(1200px 600px at 20% 0%, rgba(106,92,255,.10), transparent 55%),
              radial-gradient(900px 500px at 80% 10%, rgba(255,79,182,.12), transparent 55%),
              linear-gradient(180deg, #fff, var(--bg));
}

a{color:inherit; text-decoration:none}
button, input, select{font:inherit}

.bg{
  position:fixed;
  inset:0;
  overflow:hidden;
  pointer-events:none;
  z-index:-1;
}
.bg__blob{
  position:absolute;
  width:520px;
  height:520px;
  border-radius:999px;
  filter: blur(28px);
  opacity:.65;
  mix-blend-mode:multiply;
  transform: translateZ(0);
}
.bg__blob--1{left:-120px; top:-160px; background: rgba(106,92,255,.32)}
.bg__blob--2{right:-160px; top:-120px; background: rgba(255,79,182,.28)}
.bg__blob--3{left:35%; bottom:-240px; background: rgba(25,179,122,.18)}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.65);
  border-bottom: 1px solid rgba(60,50,90,.10);
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 18px;
}
.brand{display:flex; align-items:center; gap:10px}
.brand__logo{
  width:36px; height:36px; border-radius:12px;
  display:block;
  box-shadow: 0 10px 18px rgba(106,92,255,.25);
}
.brand__name{font-weight:900; letter-spacing:.2px}
.brand__tag{
  font-size:12px;
  color:var(--muted);
  padding:4px 8px;
  border-radius:999px;
  background: rgba(90,88,106,.08);
}
.nav{display:flex; gap:10px; flex-wrap:wrap}
.nav__link{
  padding:10px 12px;
  border-radius:12px;
  color:var(--muted);
}
.nav__link:hover{background: rgba(90,88,106,.08); color: var(--text)}
.topbar__actions{display:flex; gap:10px; align-items:center}

.container{max-width: 1060px; margin: 0 auto; padding: 22px 18px 48px}

.app{min-height: calc(100vh - 180px)}

.grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:16px;
}
@media (max-width: 900px){
  .grid{grid-template-columns: 1fr}
  .nav{display:none}
}

.card{
  background: var(--card);
  border: 1px solid rgba(60,50,90,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  overflow:hidden;
}
.card__pad{padding:18px}
.card__title{margin:0 0 8px; font-size:20px}
.card__sub{margin:0; color:var(--muted); line-height:1.4}

.hero{
  display:grid;
  gap:14px;
  padding: 20px;
  background:
    radial-gradient(700px 320px at 15% 0%, rgba(106,92,255,.16), transparent 55%),
    radial-gradient(550px 300px at 85% 10%, rgba(255,79,182,.14), transparent 55%),
    linear-gradient(135deg, rgba(255,255,255,.65), rgba(255,255,255,.35));
}
.hero__h{
  margin:0;
  font-size:28px;
  line-height:1.15;
}
.site-welcome{
  margin:0 0 16px;
  padding:18px 20px;
  border-radius:var(--radius);
  background:
    linear-gradient(135deg, rgba(106,92,255,.14), rgba(255,79,182,.12)),
    rgba(255,255,255,.72);
  border:1px solid rgba(60,50,90,.10);
  box-shadow:var(--shadow2);
}
.site-welcome__title{
  margin:14px 0 0;
  font-size:clamp(14px, 2.2vw, 17px);
  line-height:1.35;
  text-align:center;
  color:var(--muted);
  font-weight:600;
}
.site-welcome__motto{
  margin:0;
  font-size:clamp(26px, 4.5vw, 40px);
  font-weight:900;
  line-height:1.15;
  text-align:center;
  color:var(--primary);
}
.site-welcome__lead{
  margin:12px auto 0;
  max-width:720px;
  font-size:15px;
  line-height:1.55;
  text-align:center;
  color:var(--muted);
}
.profile-mini{
  display:flex;
  gap:12px;
  align-items:center;
}
.profile-mini__avatar{
  width:56px;
  height:56px;
  border-radius:16px;
  object-fit:cover;
  border:2px solid rgba(106,92,255,.22);
  box-shadow:var(--shadow2);
}
.profile-avatar{
  display:flex;
  gap:16px;
  align-items:center;
  flex-wrap:wrap;
}
.profile-avatar__img{
  width:96px;
  height:96px;
  border-radius:22px;
  object-fit:cover;
  border:3px solid rgba(106,92,255,.22);
  box-shadow:var(--shadow2);
}
.profile-avatar__name{
  margin:0 0 8px;
  font-size:22px;
  font-weight:900;
}
.profile-avatar__btn{
  display:inline-flex;
  cursor:pointer;
}
.checkbox{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:14px;
  line-height:1.4;
  color:var(--muted);
}
.checkbox input{
  margin-top:3px;
  width:18px;
  height:18px;
  accent-color:var(--primary);
  flex-shrink:0;
}
.checkbox a{
  color:var(--primary);
  text-decoration:underline;
}
.policy__body h3{
  margin:16px 0 8px;
  font-size:16px;
}
.policy__body p{
  margin:0 0 10px;
  color:var(--muted);
  line-height:1.55;
}
.hero__p{margin:0; color:var(--muted); font-size:15px; line-height:1.5}
.hero__cta{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:6px}
.hero__visual{
  width:100%;
  max-height:220px;
  object-fit:cover;
  border-radius:16px;
  border:1px solid rgba(60,50,90,.10);
  box-shadow: var(--shadow2);
}

.btn{
  border:0;
  border-radius: 14px;
  padding: 11px 14px;
  cursor:pointer;
  font-weight:800;
  box-shadow: 0 10px 18px rgba(20, 17, 40, .10);
  transition: transform .04s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active{transform: translateY(1px)}
.btn--primary{
  color:white;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
}
.btn--primary:hover{box-shadow: var(--shadow)}
.btn--ghost{
  background: rgba(90,88,106,.08);
  color: var(--text);
  box-shadow:none;
}
.btn--ghost:hover{background: rgba(90,88,106,.12)}
.btn--good{background: rgba(25,179,122,.14); color: #0a3d28; box-shadow:none}
.btn--warn{background: rgba(255,176,32,.18); color: #4b2f00; box-shadow:none}
.btn--bad{background: rgba(255,77,79,.16); color:#4a0c0c; box-shadow:none}
.btn:focus-visible{outline:none; box-shadow: var(--ring)}

.row{display:flex; gap:12px; flex-wrap:wrap; align-items:center}
.sep{height:1px; background: rgba(60,50,90,.10); margin: 14px 0}

.kpi{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}
@media (max-width: 560px){.kpi{grid-template-columns:1fr}}
.kpi__item{
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(60,50,90,.10);
  border-radius: 16px;
  padding: 12px 12px;
}
.kpi__label{font-size:12px; color:var(--muted)}
.kpi__value{font-size:20px; font-weight:900; margin-top:2px}
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border-radius:999px;
  background: rgba(90,88,106,.08);
  color: var(--text);
  border: 1px solid rgba(60,50,90,.08);
}

.form{display:grid; gap:10px}
.field{display:grid; gap:6px}
.label{font-size:12px; color:var(--muted)}
.input{
  width:100%;
  padding:12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(60,50,90,.14);
  background: rgba(255,255,255,.86);
}
.input:focus{outline:none; box-shadow: var(--ring); border-color: rgba(106,92,255,.35)}
.hint{font-size:12px; color: var(--muted); line-height:1.4}

.list{display:grid; gap:10px}
.item{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(60,50,90,.10);
}
.item__icon{
  width:52px; height:52px;
  border-radius: 14px;
  display:grid; place-items:center;
  font-weight:900;
  font-size:22px;
  color:white;
  flex-shrink:0;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  overflow:hidden;
}
.item__icon img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.item__title{margin:0; font-weight:900}
.item__sub{margin:4px 0 0; color:var(--muted); font-size:13px; line-height:1.35}
.item__right{margin-left:auto; display:flex; gap:8px; align-items:center; flex-wrap:wrap}

.chips{display:flex; gap:8px; flex-wrap:wrap}
.chip{
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  color: var(--muted);
  background: rgba(90,88,106,.08);
  border: 1px solid rgba(60,50,90,.08);
}
.chip--good{color:#0a3d28; background: rgba(25,179,122,.14); border-color: rgba(25,179,122,.20)}
.chip--warn{color:#4b2f00; background: rgba(255,176,32,.18); border-color: rgba(255,176,32,.24)}

.quiz{
  display:grid;
  gap:12px;
}
.quiz__q{
  font-size:18px;
  font-weight:900;
}
.quiz__figure{
  margin:0;
  min-height:120px;
}
.quiz__img{
  width:100%;
  max-width:320px;
  height:auto;
  min-height:120px;
  max-height:220px;
  margin:0 auto;
  display:block;
  object-fit:contain;
  background:rgba(255,255,255,.72);
  border-radius:16px;
  border:1px solid rgba(60,50,90,.10);
  box-shadow: var(--shadow2);
}
.lesson-head{
  display:flex;
  gap:14px;
  align-items:center;
}
.lesson-head__cover{
  width:64px;
  height:64px;
  border-radius:16px;
  flex-shrink:0;
  box-shadow: var(--shadow2);
}
.auth-deco{
  width:100%;
  max-width:280px;
  margin:0 auto 12px;
  display:block;
  border-radius:16px;
}
.step-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  object-fit:cover;
  flex-shrink:0;
}
.answers{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:10px;
}
@media (max-width: 520px){.answers{grid-template-columns:1fr}}
.answer{
  padding: 12px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.80);
  border: 1px solid rgba(60,50,90,.12);
  cursor:pointer;
  font-weight:900;
}
.answer:hover{box-shadow: var(--shadow2)}
.answer:focus-visible{outline:none; box-shadow: var(--ring)}

.badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(60,50,90,.10);
}
.badge__icon{
  width:38px; height:38px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(106,92,255,.12);
  border: 1px solid rgba(106,92,255,.18);
}
.badge__name{font-weight:900; margin:0}
.badge__desc{margin:2px 0 0; font-size:12px; color:var(--muted); line-height:1.35}
.badge--locked{opacity:.65; filter: grayscale(.1)}
.badge--unlocked{box-shadow: 0 14px 30px rgba(106,92,255,.18)}

.footer{
  padding: 18px 18px 28px;
  color: var(--muted);
}
.footer__inner{
  max-width:1060px;
  margin:0 auto;
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
}
.footer__link{
  padding:10px 12px;
  border-radius: 12px;
  background: rgba(90,88,106,.08);
  color: var(--text);
}
.footer__link:hover{background: rgba(90,88,106,.12)}

.toast{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(380px, calc(100vw - 32px));
  background: rgba(20, 17, 40, .86);
  color: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.10);
  padding: 12px 12px;
}
.toast__body{font-weight:800; line-height:1.3}
