/* XPlearn — палитра: Burgundy, Cherry Blossom Pink, Misty Rose, Silver Lake Blue, Lapis Lazuli */
:root {
  --burgundy: #6C0820; --ink: #2A0610; --wine: #9B1B3A;
  --pink: #F2AEBC; --rose: #F2DCDB; --paper: #FFF8F7; --bg: #F7ECEB;
  --blue: #5A86CB; --lapis: #3D5D91; --muted: #7A5A62; --line: #E3C6C8;
  --ok: #3D5D91;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, sans-serif; font-size: 15px; line-height: 1.5; color: var(--ink);
  background: var(--bg) radial-gradient(var(--line) 1px, transparent 1px) 0 0 / 18px 18px;
  min-height: 100vh;
}
a { color: var(--lapis); }
.serif { font-family: 'Playfair Display', serif; }
main { max-width: 880px; margin: 0 auto; padding: 16px 16px 60px; }

/* шапка */
.top { background: var(--ink); color: var(--rose); }
.top .in { max-width: 880px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 26px; color: #fff; text-decoration: none; letter-spacing: .3px; }
.logo span { color: var(--pink); }
.logo i { color: var(--blue); font-style: normal; }

/* плашки и заголовки */
.pill { display: inline-block; font-family: Unbounded, Inter, sans-serif; font-weight: 600; font-size: 10.5px; letter-spacing: .8px;
  text-transform: uppercase; padding: 5px 11px; border-radius: 99px; background: var(--burgundy); color: #fff; white-space: nowrap; }
.pill.blue { background: var(--lapis); } .pill.pink { background: var(--pink); color: var(--ink); }
h1 { font-family: 'Playfair Display', serif; font-weight: 900; font-size: clamp(34px, 7vw, 58px); line-height: 1.02; margin: 14px 0 10px; }
h1 em { color: var(--wine); font-style: normal; }
h2 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin: 26px 0 12px; flex-wrap: wrap; }
.lead { font-size: 17px; max-width: 640px; }
.muted { color: var(--muted); font-size: 13px; }

/* карточки */
.card { background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; padding: 18px;
  box-shadow: 5px 5px 0 var(--ink); margin: 14px 0; }
.card.dark { background: var(--burgundy); color: var(--rose); } .card.dark h3, .card.dark b { color: #fff; }
.card.blue { background: var(--lapis); color: #fff; }
.card.rose { background: var(--rose); }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid > .card { margin: 0; }

/* формы */
input, textarea, select { width: 100%; padding: 11px 12px; border: 2px solid var(--ink); border-radius: 10px; font: inherit;
  background: #fff; color: var(--ink); margin: 6px 0; }
input:focus, textarea:focus { outline: 3px solid var(--pink); }
input[type=radio] { width: auto; margin: 0; accent-color: var(--wine); }
textarea { resize: vertical; }
.drop { display: block; border: 2px dashed var(--wine); border-radius: 12px; padding: 18px; text-align: center; background: #fff; cursor: pointer; margin: 6px 0; }
.drop.over { background: var(--rose); }
.btn { display: inline-block; background: var(--wine); color: #fff; border: 2px solid var(--ink); border-radius: 12px;
  padding: 11px 20px; font: 600 15px Inter, sans-serif; cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s, box-shadow .08s; text-decoration: none; margin: 4px 6px 4px 0; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.blue { background: var(--lapis); } .btn.light { background: var(--paper); color: var(--ink); }
.btn:disabled { opacity: .5; cursor: wait; }

/* статистика */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.tile { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 12px; box-shadow: 4px 4px 0 var(--ink); }
.tile b { display: block; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 30px; color: var(--burgundy); line-height: 1.1; }
.tile.dark { background: var(--burgundy); color: var(--rose); } .tile.dark b { color: #fff; }
.tile.blue { background: var(--lapis); color: var(--rose); } .tile.blue b { color: #fff; }
.bar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 44px; gap: 10px; align-items: center; margin: 8px 0; font-size: 14px; }
.track { height: 14px; background: var(--rose); border-radius: 7px; overflow: hidden; }
.track i { display: block; height: 100%; background: var(--wine); border-radius: 7px; transition: width .5s; }
.bar b { text-align: right; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--ink); color: var(--rose); text-align: left; padding: 8px; font-weight: 600; }
td { padding: 8px; border-bottom: 1px solid var(--line); }

/* редактор */
.level-edit { border-left: 6px solid var(--wine); }
.level-edit .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.level-edit .row input { flex: 1; min-width: 160px; }
.level-edit .row input.xp { width: 90px; flex: none; min-width: 0; }
.q-edit { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 10px 0; }
.opt { display: flex; gap: 8px; align-items: center; }
.opt input[type=text] { margin: 3px 0; }

/* игра */
.hud { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.xpbadge { background: var(--wine); color: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 6px 12px;
  font-family: 'Playfair Display', serif; font-weight: 900; font-size: 22px; box-shadow: 3px 3px 0 var(--ink); }
.progress { height: 16px; background: var(--rose); border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--wine), var(--blue)); transition: width .6s; }
.map { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.node { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center;
  font-weight: 700; background: var(--paper); color: var(--muted); }
.node.done { background: var(--wine); color: #fff; } .node.now { background: var(--pink); color: var(--ink); box-shadow: 0 0 0 4px var(--rose); }
.question { margin: 16px 0; }
.question b { display: block; margin-bottom: 6px; }
.answer { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px;
  margin: 6px 0; cursor: pointer; background: #fff; }
.answer:hover { border-color: var(--wine); }
.answer.right { border-color: var(--ok); background: #E6EEF9; }
.answer.wrong { border-color: var(--wine); background: var(--rose); }
.result { margin-top: 12px; font-weight: 600; }
.stars { display: flex; gap: 8px; margin: 10px 0; }
.stars button { width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--ink); background: var(--paper);
  font: 900 20px 'Playfair Display', serif; cursor: pointer; }
.stars button.on { background: var(--wine); color: #fff; }
.board li { padding: 6px 0; border-bottom: 1px dashed var(--line); }

/* тост с наградой */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(140%); background: var(--ink); color: #fff;
  border: 2px solid var(--pink); border-radius: 14px; padding: 12px 18px; box-shadow: 4px 4px 0 var(--pink); transition: transform .35s; z-index: 10; max-width: 90vw; }
.toast.show { transform: translateX(-50%) translateY(0); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 3px solid var(--rose); border-top-color: var(--wine); border-radius: 50%;
  animation: spin 0.8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
@media (max-width: 560px) {
  .hud { grid-template-columns: 1fr 1fr; } .hud .progress { grid-column: 1 / -1; order: 3; }
  .bar { grid-template-columns: 1fr 1fr 36px; }
}

/* ===== v2: аккаунты, каталог, уроки ===== */
.nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--rose); text-decoration: none; font-weight: 600; font-size: 14px; }
.nav a:hover { color: #fff; }
.nav .me { display: flex; gap: 8px; align-items: center; }
.nav .me b { color: #fff; }
.streak { background: var(--pink); color: var(--ink); border-radius: 99px; padding: 2px 9px; font-weight: 700; font-size: 13px; }
.xpchip { background: var(--wine); color: #fff; border-radius: 99px; padding: 2px 9px; font-weight: 700; font-size: 13px; }
.btn.small { padding: 6px 14px; font-size: 14px; box-shadow: 2px 2px 0 var(--pink); border-color: var(--pink); color: #fff !important; }
.top .in { flex-wrap: wrap; }

.ccard { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; text-decoration: none; color: inherit; margin: 0; }
.ccard h3 { margin: 0 0 2px; }
.ccover { width: 56px; height: 56px; border-radius: 14px; background: var(--wine); color: #fff; display: grid; place-items: center;
  font: 900 26px 'Playfair Display', serif; border: 2px solid var(--ink); }
.ccard:nth-child(3n+2) .ccover { background: var(--lapis); } .ccard:nth-child(3n) .ccover { background: var(--pink); color: var(--ink); }
.minibar { height: 8px; background: var(--rose); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.minibar i { display: block; height: 100%; background: var(--wine); }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button { flex: 1; padding: 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font: 600 15px Inter; cursor: pointer; }
.tabs button.on { background: var(--ink); color: #fff; }
.auth-wrap { max-width: 420px; margin: 30px auto; }
.err { color: var(--wine); font-weight: 600; min-height: 1.4em; }

/* карта уровней — извилистая тропинка */
.path { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 20px 0 10px; }
.stop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stop .circle { width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center;
  font: 900 26px 'Playfair Display', serif; background: #e8d6d7; color: var(--muted); box-shadow: 0 6px 0 var(--ink); cursor: pointer; transition: transform .1s; }
.stop .circle:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.stop.done .circle { background: var(--wine); color: #fff; }
.stop.now .circle { background: var(--pink); color: var(--ink); animation: pulse 1.6s infinite; }
.stop.lock .circle { cursor: not-allowed; }
.stop .lbl { font-weight: 700; font-size: 13px; text-align: center; max-width: 170px; }
.stop .start { position: absolute; top: -30px; background: var(--ink); color: #fff; font: 700 11px Unbounded, Inter; padding: 5px 10px; border-radius: 8px; letter-spacing: .5px; white-space: nowrap; }
.stop .start::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
@keyframes pulse { 0%,100% { box-shadow: 0 6px 0 var(--ink), 0 0 0 0 rgba(242,174,188,.9); } 50% { box-shadow: 0 6px 0 var(--ink), 0 0 0 14px rgba(242,174,188,0); } }
.chest { font-size: 40px; filter: drop-shadow(2px 3px 0 var(--ink)); }

/* урок — полноэкранный режим */
.lesson { position: fixed; inset: 0; background: var(--bg); z-index: 20; display: flex; flex-direction: column; }
.lesson .lhead { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; max-width: 760px; width: 100%; margin: 0 auto; padding: 16px; }
.lesson .x { border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--muted); }
.lesson .lprog { height: 16px; background: #e8d6d7; border-radius: 10px; overflow: hidden; }
.lesson .lprog i { display: block; height: 100%; width: 0; background: var(--wine); border-radius: 10px; transition: width .4s; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
.hearts { font-size: 18px; font-weight: 700; color: var(--wine); white-space: nowrap; }
.lesson .lbody { flex: 1; overflow-y: auto; max-width: 760px; width: 100%; margin: 0 auto; padding: 6px 16px 20px; }
.lesson .kind { font: 600 11px Unbounded, Inter; letter-spacing: .8px; text-transform: uppercase; color: var(--lapis); margin: 6px 0 8px; }
.lesson .ask { font-family: 'Playfair Display', serif; font-weight: 900; font-size: clamp(22px, 4.5vw, 30px); line-height: 1.2; margin: 0 0 18px; }
.lesson .lfoot { border-top: 2px solid var(--line); background: var(--bg); transition: background .2s; }
.lesson .lfoot .in { max-width: 760px; margin: 0 auto; padding: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.lesson .lfoot.ok { background: #DCE7F7; border-color: var(--blue); }
.lesson .lfoot.no { background: var(--rose); border-color: var(--wine); }
.lesson .verdict { font-weight: 800; font-size: 18px; }
.lesson .lfoot.ok .verdict { color: var(--lapis); } .lesson .lfoot.no .verdict { color: var(--wine); }
.lesson .verdict small { display: block; font-weight: 600; font-size: 14px; color: var(--ink); }
.btn.big { padding: 14px 34px; font-size: 16px; min-width: 170px; text-transform: uppercase; letter-spacing: .5px; }
.btn.big:disabled { background: #d9c3c5; color: #fff; box-shadow: none; cursor: not-allowed; transform: none; }

.flash { background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; padding: 26px; box-shadow: 6px 6px 0 var(--ink);
  font-size: 19px; line-height: 1.5; min-height: 180px; display: flex; align-items: center; animation: pop .25s; }
.flash.dark { background: var(--burgundy); color: #fff; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

.tiles2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile-btn { background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 16px; padding: 16px 14px; font: 600 16px Inter;
  text-align: left; cursor: pointer; color: var(--ink); transition: transform .06s; min-height: 64px; }
.tile-btn:active { transform: translateY(2px); border-bottom-width: 3px; }
.tile-btn.sel { border-color: var(--lapis); background: #E6EEF9; }
.tile-btn.good { border-color: var(--blue); background: #DCE7F7; }
.tile-btn.bad { border-color: var(--wine); background: var(--rose); animation: shake .35s; }
.tile-btn.gone { opacity: .35; pointer-events: none; }
.tile-btn .k { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 7px; font-size: 12px; margin-right: 8px; color: var(--muted); }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
.tf { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.tf .tile-btn { text-align: center; font-size: 18px; min-height: 80px; }
.statement { background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: 20px; font-size: 19px; box-shadow: 4px 4px 0 var(--ink); }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match .col { display: flex; flex-direction: column; gap: 10px; }
.match .tile-btn { text-align: center; min-height: 58px; font-size: 15px; }
.answer-line { min-height: 66px; border-bottom: 2px solid var(--line); border-top: 2px solid var(--line); padding: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { background: #fff; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 12px; padding: 9px 14px; font: 600 15px Inter; cursor: pointer; color: var(--ink); }
.chip.ghost { visibility: hidden; }
.gap-text { font-size: 21px; line-height: 2; margin-bottom: 18px; }
.gap-slot { display: inline-block; min-width: 110px; border-bottom: 3px solid var(--wine); text-align: center; padding: 0 8px; font-weight: 700; color: var(--wine); }

.combo { position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%) scale(.6); opacity: 0; z-index: 30; background: var(--ink); color: #fff;
  padding: 8px 16px; border-radius: 99px; font: 700 15px Unbounded, Inter; border: 2px solid var(--pink); transition: .25s; pointer-events: none; }
.combo.show { opacity: 1; transform: translateX(-50%) scale(1); }
.result-screen { text-align: center; padding-top: 30px; }
.result-screen .big { font: 900 clamp(34px, 8vw, 54px) 'Playfair Display', serif; color: var(--wine); margin: 10px 0; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.result-stats .tile { text-align: center; }
.confetti { position: fixed; top: -10px; width: 9px; height: 14px; z-index: 40; animation: fall linear forwards; pointer-events: none; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

/* редактор заданий */
.task-edit { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; position: relative; }
.task-edit .del { position: absolute; top: 8px; right: 8px; border: 0; background: none; color: var(--wine); font-size: 18px; cursor: pointer; }
.task-edit .tt { font: 600 10.5px Unbounded, Inter; letter-spacing: .6px; color: var(--lapis); text-transform: uppercase; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 560px) { .tiles2 { grid-template-columns: 1fr; } .result-stats { grid-template-columns: 1fr 1fr 1fr; } .nav { gap: 10px; } .nav a { font-size: 13px; } }

/* ===== v3: каталог, цель дня, достижения, лига, материалы, сертификат ===== */
.goalchip { display: inline-flex; }
.ring { display: block; }
.filters { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-bottom: 6px; }
.filters .tabs { margin: 0; } .filters .tabs button { padding: 8px 12px; font-size: 14px; }
@media (max-width: 640px) { .filters { grid-template-columns: 1fr; } }
.ccard { position: relative; }
.ctag { position: absolute; top: -10px; right: 12px; background: var(--lapis); color: #fff; font: 700 11px Unbounded, Inter; padding: 4px 9px; border-radius: 99px; border: 2px solid var(--ink); }
.ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ach .a { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 12px; text-align: center; box-shadow: 3px 3px 0 var(--ink); }
.ach .a .i { font-size: 34px; } .ach .a b { display: block; margin: 4px 0 2px; } .ach .a span { font-size: 12px; color: var(--muted); }
.ach .a.off { opacity: .45; filter: grayscale(1); box-shadow: none; border-style: dashed; }
.goalcard { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.goalcard .ring circle:first-child { stroke: var(--rose); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.toolbar .btn { padding: 8px 14px; font-size: 14px; }
.league tr.me td { background: var(--pink) !important; font-weight: 700; }
.league td.place { font: 900 18px 'Playfair Display', serif; width: 50px; }
.modal { position: fixed; inset: 0; background: rgba(42,6,16,.55); z-index: 25; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 30px 14px; }
.modal .box { background: var(--bg); border: 3px solid var(--ink); border-radius: 18px; max-width: 720px; width: 100%; padding: 20px; box-shadow: 6px 6px 0 var(--pink); position: relative; }
.modal .close { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 24px; cursor: pointer; }
.note-level { border-left: 6px solid var(--wine); padding-left: 12px; margin: 16px 0; }
.note-level ul { margin: 6px 0 0 18px; padding: 0; } .note-level li { margin: 4px 0; }
.locked-note { color: var(--muted); border-left-color: var(--line); }
.danger { background: var(--paper) !important; color: var(--wine) !important; border-color: var(--wine) !important; box-shadow: 3px 3px 0 var(--wine) !important; }

/* ===== v4: лендинг, карточки курсов, рекомендации, сборка по частям ===== */
.cgrid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.ccard2 { display: flex; flex-direction: column; background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; overflow: hidden;
  box-shadow: 5px 5px 0 var(--ink); text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; }
.ccard2:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.ccov { position: relative; height: 128px; display: grid; place-items: center; border-bottom: 2px solid var(--ink); }
.ccov .cicon { font-size: 54px; filter: drop-shadow(3px 4px 0 rgba(42,6,16,.45)); }
.ccov .ccat { position: absolute; left: 10px; top: 10px; background: rgba(255,248,247,.92); color: var(--ink); font: 700 11px Inter; padding: 3px 9px; border-radius: 99px; }
.ccov .cdiff { position: absolute; left: 10px; bottom: 10px; background: var(--ink); color: var(--pink); font: 600 10px Unbounded, Inter; padding: 3px 8px; border-radius: 99px; letter-spacing: .4px; }
.ccov .ctag { top: 10px; right: 10px; }
.cbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cbody h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.cdesc { margin: 2px 0; font-size: 14px; color: #4a2a32; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tagchip { background: var(--rose); border: 1px solid var(--line); border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.cstats { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line); }
.reason { font-size: 12px; font-weight: 700; color: var(--lapis); }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 16px; overflow-x: auto; padding: 4px 6px 14px 2px; scroll-snap-type: x mandatory; }
.hscroll > * { scroll-snap-align: start; }
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.catbtn { border: 2px solid var(--ink); background: var(--paper); border-radius: 99px; padding: 6px 12px; font: 600 13px Inter; cursor: pointer; }
.catbtn.on { background: var(--ink); color: #fff; }
.sortsel { width: auto; margin: 0; }

/* лендинг */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; align-items: center; padding: 26px 0 10px; }
.hero h1 { font-size: clamp(38px, 7vw, 66px); }
.hero .lead { font-size: 18px; }
.phone { background: var(--ink); border-radius: 34px; padding: 14px; box-shadow: 10px 10px 0 var(--pink); max-width: 330px; margin: 0 auto; transform: rotate(2deg); }
.phone .scr { background: var(--bg); border-radius: 24px; padding: 14px; min-height: 420px; }
.phone .lprog { height: 12px; background: #e8d6d7; border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.phone .lprog i { display: block; width: 62%; height: 100%; background: var(--wine); }
.phone .tile-btn { width: 100%; margin: 6px 0; font-size: 14px; padding: 11px; min-height: 0; }
.phone .okbar { background: #DCE7F7; border-radius: 12px; padding: 10px 12px; margin-top: 14px; color: var(--lapis); font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.band { margin: 46px 0 0; }
.band h2 { font-size: clamp(24px, 4vw, 34px); font-family: 'Playfair Display', serif; font-weight: 900; }
.steps3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.steps3 .num { font: 900 46px 'Playfair Display', serif; color: var(--pink); line-height: 1; }
.feat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .feat { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feat { grid-template-columns: 1fr; } }
.feat .card { margin: 0; }
.feat .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--burgundy); color: #fff; border: 2px solid var(--burgundy); box-shadow: 3px 3px 0 var(--ink, #2a0a12); margin-bottom: 12px; }
.feat .ico.pink { background: var(--pink); color: var(--burgundy); }
.feat .ico.blue { background: var(--lapis); border-color: var(--lapis); }
.feat .ico.dark { background: var(--rose); color: var(--burgundy); }
.feat .ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.split ul { padding-left: 18px; margin: 8px 0 14px; } .split li { margin: 5px 0; }
.bigcta { text-align: center; background: var(--burgundy); color: var(--rose); border: 3px solid var(--ink); border-radius: 24px; padding: 34px 20px; box-shadow: 8px 8px 0 var(--pink); }
.bigcta h2 { color: #fff; justify-content: center; }
footer.foot { margin-top: 50px; background: var(--ink); color: var(--rose); }
footer.foot .in { max-width: 880px; margin: 0 auto; padding: 22px 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
footer.foot a { color: var(--pink); }
.wide main, main.wide { max-width: 1080px; }
@media (max-width: 760px) { .hero, .split { grid-template-columns: 1fr; } .phone { transform: none; } }

/* превью курса */
.preview { display: grid; grid-template-columns: 1.3fr .9fr; gap: 20px; align-items: start; }
.preview .ccov { height: 180px; border-radius: 18px; border: 2px solid var(--ink); }
.outcomes { list-style: none; padding: 0; margin: 8px 0; }
.outcomes li { padding: 6px 0 6px 30px; position: relative; } .outcomes li::before { content: "✓"; position: absolute; left: 4px; top: 5px; color: var(--lapis); font-weight: 900; }
.program { counter-reset: lv; list-style: none; padding: 0; margin: 0; }
.program li { padding: 8px 0 8px 40px; position: relative; border-bottom: 1px dashed var(--line); }
.program li::before { counter-increment: lv; content: counter(lv); position: absolute; left: 0; top: 7px; width: 28px; height: 28px; border-radius: 50%; background: var(--wine); color: #fff; display: grid; place-items: center; font: 700 12px Inter; }
.program small { display: block; color: var(--muted); }
@media (max-width: 760px) { .preview { grid-template-columns: 1fr; } }

/* сборка курса по частям */
.buildlog { list-style: none; padding: 0; margin: 10px 0 0; max-height: 260px; overflow-y: auto; }
.buildlog li { padding: 4px 0; font-size: 14px; }
.chipsel { display: flex; flex-wrap: wrap; gap: 8px; }
.chipsel button { border: 2px solid var(--ink); background: var(--paper); border-radius: 99px; padding: 6px 12px; font: 600 13px Inter; cursor: pointer; }
.chipsel button.on { background: var(--lapis); color: #fff; }
.card.dark .tile { color: var(--muted); } .card.dark .tile b { color: var(--burgundy); }

/* ---- v5: логотип и мобильная вёрстка ---- */
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo img { height: 40px; width: 40px; object-fit: contain; display: block; background: var(--rose); border-radius: 10px; padding: 3px; box-sizing: border-box; }
html, body { overflow-x: hidden; }
.hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.preview { grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); }
.hero > *, .split > *, .preview > *, .grid > *, .tiles > * { min-width: 0; }
h1, h2, h3 { overflow-wrap: break-word; }
#cta, #cta2 { display: flex; flex-wrap: wrap; gap: 8px; }
#cta .btn, #cta2 .btn { margin: 0; }
@media (max-width: 760px) {
  .hero, .split, .preview { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 10px; gap: 18px; }
  .phone { max-width: 290px; }
}
@media (max-width: 560px) {
  main { padding: 12px 14px 50px; }
  .top .in { padding: 10px 14px; row-gap: 6px; }
  .logo { font-size: 22px; } .logo img { height: 34px; width: 34px; }
  .nav { width: 100%; justify-content: space-between; gap: 8px; }
  .nav .me { gap: 6px; }
  .hero h1 { font-size: 34px; }
  .hero .lead, .lead { font-size: 16px; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 10px 8px; font-size: 12px; box-shadow: 3px 3px 0 var(--ink); }
  .tile b { font-size: 22px; }
  .btn { padding: 10px 16px; font-size: 14px; }
  .hscroll { grid-auto-columns: minmax(240px, 82vw); }
}
@media (max-width: 560px) {
  .tabs { flex-wrap: wrap; }
  .tabs button { flex: 1 1 40%; padding: 8px 6px; font-size: 13px; }
  .cats { flex-wrap: wrap; }
}
.logo .wm { color: #fff; } .logo .wm span { color: var(--pink); }

/* приватный курс */
.privbox { display: flex; gap: 10px; align-items: flex-start; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 12px; margin: 6px 0 12px; cursor: pointer; }
.privbox input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--wine); }

/* согласия при регистрации */
.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.4; margin: 8px 0; cursor: pointer; }
.checkline input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--wine); }
.checkline a { color: var(--lapis); }

/* команда */
.teamgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.teamgrid .card { margin: 0; text-align: center; padding: 16px 10px; }
.teamgrid h3 { margin: 10px 0 4px; font-size: 15px; } .teamgrid p { margin: 0; font-size: 13px; }
.teamgrid .card.dark h3 { color: #fff; }
.ava { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--pink); color: var(--burgundy);
  font: 900 24px 'Playfair Display', serif; border: 2px solid var(--ink); }
@media (max-width: 900px) { .teamgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .teamgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* текстовые страницы */
.doc h2 { margin-top: 26px; } .doc p, .doc li { line-height: 1.6; } .doc ul { padding-left: 20px; }
.faq details { background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 3px 3px 0 var(--ink); }
.faq summary { font-weight: 700; cursor: pointer; } .faq details p { margin: 8px 0 0; }
.bigcta #cta2 { justify-content: center; }

/* подвал всегда внизу экрана */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
body > header.top, body > footer.foot { flex: none; }
footer.foot { margin-top: 40px; }

/* ---- v7: анкета, группы, обложка, перегенерация ---- */
.btn.mini { padding: 6px 12px; font-size: 13px; }
.finish .q { margin: 16px 0 6px; font-weight: 700; color: #fff; }
.schips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.schip { border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 10px; padding: 7px 12px; font: 600 14px Inter, sans-serif; cursor: pointer; }
.schip.on { background: var(--wine); color: #fff; }
.schips.nps .schip { min-width: 38px; padding: 7px 0; }
#authorSurvey .schips { justify-content: flex-start; } #authorSurvey p { margin: 12px 0 6px; }
.task-edit .regen { position: absolute; top: 8px; right: 38px; border: 0; background: none; font-size: 16px; cursor: pointer; }
.task-edit .regen:disabled { opacity: .6; }
.coverrow { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: center; }
.coverrow .ccov { height: 135px; border: 2px solid var(--ink); border-radius: 14px; }
@media (max-width: 560px) { .coverrow { grid-template-columns: 1fr; } }
.grouprow { display: grid; grid-template-columns: 120px 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.grouprow input { margin: 0; font-size: 13px; }
@media (max-width: 560px) { .grouprow { grid-template-columns: 1fr auto auto; } .grouprow b { grid-column: 1 / -1; } }
.tile small { display: block; font-size: 11px; opacity: .8; margin-top: 2px; }
.ccard2.featured { box-shadow: 5px 5px 0 var(--pink); }
.themebtn { background: none; border: 0; font-size: 18px; cursor: pointer; padding: 2px 4px; line-height: 1; }

/* ---- тёмная тема: см. site.css (внутренние страницы) и home.css (главная) ---- */

.card.dark .schip.on, .card.blue .schip.on { background: var(--pink); color: #2A0610; }
.card.dark .stars button { background: var(--paper); color: var(--ink); }
.card.dark .stars button.on { background: var(--pink); color: #2A0610; }

/* ===== v8: навигация кнопками ===== */
.nav { gap: 8px; }
.navbtn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 2px solid var(--pink); border-radius: 12px;
  background: transparent; color: var(--rose) !important; font: 600 14px Inter, sans-serif; text-decoration: none; cursor: pointer;
  box-shadow: 2px 2px 0 var(--pink); transition: transform .1s, background .15s; line-height: 1.2; }
.navbtn:hover { background: rgba(242,174,188,.15); color: #fff !important; transform: translate(-1px, -1px); }
.navbtn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--pink); }
.navbtn.on { background: var(--pink); color: #2A0610 !important; }
.navbtn.on b { color: #2A0610 !important; }
.navbtn.login { background: var(--wine); color: #fff !important; }
.navbtn.icon { padding: 6px 9px; font-size: 16px; }
.navbtn.me { padding: 4px 10px; }
@media (max-width: 560px) {
  .nav { justify-content: flex-start; gap: 6px; }
  .navbtn { padding: 6px 10px; font-size: 13px; }
  .navbtn.me b { display: none; }
}

/* ===== домашние задания ===== */
.hw.locked { opacity: .6; }
.hw textarea { margin-top: 8px; }
.hw-answer { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; white-space: pre-wrap; max-height: 260px; overflow: auto; }
.hw-edit .row, .hw-row .row, .hw .row { display: flex; gap: 8px; align-items: center; }
.hw-edit .row input:not([type=number]) { flex: 1; }
.hw-grade { margin: 6px 0; }
.hw-grade button { width: 38px; height: 38px; }
.hw-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hw-x { border: 0; background: none; cursor: pointer; color: var(--wine); font-weight: 700; padding: 0 0 0 4px; }
#hwBox h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hw-files-a a { display: inline-block; margin: 2px 8px 2px 0; }
.lvl-fold summary { cursor: pointer; list-style: none; }
.lvl-fold summary::-webkit-details-marker { display: none; }
.lvl-fold summary .row { pointer-events: auto; }
.lvl-fold[open] summary .fold-ico { transform: rotate(180deg); }
.fold-ico { display: inline-block; transition: transform .2s; margin-left: auto; font-weight: 700; }
