/* Общие стили главной и страницы предмета (шапка, спутник, карточки уроков, альбом). */
body { overflow-y: auto; overflow-x: hidden; }
.home { max-width: 1180px; margin: 0 auto; padding: 0 18px 70px; }
.hand { font-family: var(--hand); font-weight: 700; line-height: 1.1; }

/* шапка */
.home-top { display: flex; align-items: center; gap: 10px; padding: 16px 0 6px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo .mark { width: 44px; height: 44px; border-radius: 13px; background: var(--butter); color: var(--on-pastel); border: 2px solid var(--edge); box-shadow: 3px 3px 0 var(--edge); display: grid; place-items: center; font-family: var(--serif); font-size: 26px; transform: rotate(-6deg); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover .mark { transform: rotate(8deg) scale(1.08); }
.logo b { display: block; font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1; color: var(--ink); }
.logo small { font-family: var(--hand); font-size: 19px; color: var(--accent2); line-height: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--edge); font-weight: 900; font-size: 15px; color: var(--on-pastel); white-space: nowrap; }
.pill.fire { background: var(--peach); } .pill.fire.cold { background: var(--panel); color: var(--muted); }
.pill.xp { background: var(--mint); }
.pill svg { width: 18px; height: 18px; }

/* первый экран */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; padding: 30px 0 14px; }
.hero .hi { font-size: 30px; color: var(--accent2); display: inline-block; transform: rotate(-2deg); margin-bottom: 4px; animation: fadeUp .6s both; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6.2vw, 74px); line-height: 1.02; margin: 0 0 18px; letter-spacing: -.01em; animation: fadeUp .7s .05s both; }
.hero h1 .mk { position: relative; white-space: nowrap; z-index: 0; }
.hero h1 .mk::before { content: ""; position: absolute; left: -3%; right: -3%; bottom: .06em; height: .42em; background: var(--butter); border-radius: 6px; transform: rotate(-1.2deg); z-index: -1; }
:root[data-theme="dark"] .hero h1 .mk::before { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.hero p.sub { color: var(--ink2); font-size: 19px; font-weight: 600; max-width: 560px; margin: 0 0 24px; animation: fadeUp .7s .15s both; }
.hero-acts { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; animation: fadeUp .7s .25s both; }
.hero-acts a, .hero-acts button { text-decoration: none; }
.big-btn { font-size: 19px; padding: 14px 24px; border-radius: 18px; box-shadow: 5px 5px 0 var(--edge); max-width: 100%; }
.big-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-note { position: relative; display: inline-block; margin: 20px 0 0 40px; font-size: 25px; color: var(--ink2); transform: rotate(-3deg); animation: fadeUp .7s .5s both; }
.hero-note svg { position: absolute; left: -44px; top: -30px; width: 42px; height: 44px; color: var(--ink2); }

/* спутник и подсказки */
.buddy { position: relative; background: var(--panel); border: 2px solid var(--edge); border-radius: 26px; box-shadow: 6px 6px 0 var(--edge); padding: 20px 20px 18px; transform: rotate(1deg); animation: fadeUp .7s .2s both; }
.buddy::before { content: ""; position: absolute; left: 50%; top: -14px; width: 120px; height: 28px; transform: translateX(-50%) rotate(-3deg); background: var(--pink); opacity: .9; border-left: 3px dashed rgba(255, 255, 255, .8); border-right: 3px dashed rgba(255, 255, 255, .8); }
.buddy-top { display: flex; gap: 14px; align-items: flex-start; }
.cat-btn { width: 108px; flex: 0 0 108px; background: none; border: 0; padding: 0; animation: catBob 3s ease-in-out infinite; transform-origin: 50% 90%; }
.cat-btn:active { animation: none; transform: scale(.92) rotate(-6deg); }
.cat-btn.boop { animation: boop .5s; }
@keyframes boop { 30% { transform: scale(1.12) rotate(7deg); } 60% { transform: scale(.96) rotate(-5deg); } }
.bubble { position: relative; flex: 1; min-width: 0; min-height: 78px; background: var(--sky); color: var(--on-pastel); border: 2px solid var(--edge); border-radius: 18px 18px 18px 4px; padding: 11px 14px; font-weight: 700; font-size: 15.5px; line-height: 1.4; }
.bubble::before { content: ""; position: absolute; left: -11px; bottom: 10px; width: 16px; height: 16px; background: var(--sky); border-left: 2px solid var(--edge); border-bottom: 2px solid var(--edge); transform: rotate(45deg) skew(10deg, 10deg); }
.bubble .who { display: block; font-family: var(--hand); font-size: 20px; line-height: 1; color: #2a5f8c; margin-bottom: 2px; }
.bubble.swap { animation: fadeUp .35s both; }
.name-form { display: flex; gap: 6px; margin-top: 8px; }
.name-form input { flex: 1; min-width: 0; width: 100%; border: 2px solid var(--edge); border-radius: 10px; padding: 5px 10px; font: inherit; font-weight: 700; background: #fffdf8; color: #2a2233; outline: none; }
.name-form button { border: 2px solid var(--edge); border-radius: 10px; background: var(--butter); color: var(--on-pastel); font-weight: 900; padding: 0 12px; }
.rank { margin-top: 16px; }
.rank-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rank-row b { font-family: var(--serif); font-weight: 400; font-size: 21px; color: var(--ink); }
.rank-row span { font-size: 13.5px; font-weight: 800; color: var(--ink2); }
.rank-next { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 2px dashed var(--line); }
.wd { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); }
.wd i { display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 4px; border-radius: 50%; border: 2px dashed var(--line); font-style: normal; font-size: 0; }
.wd.on i { background: var(--peach); border: 2px solid var(--edge); box-shadow: 2px 2px 0 var(--edge); }
.wd.on i::before { content: ""; width: 60%; height: 60%; background: var(--edge); -webkit-mask: var(--paw) center / contain no-repeat; mask: var(--paw) center / contain no-repeat; }
.wd.now { color: var(--ink); }
.wd.now:not(.on) i { border: 2px solid var(--edge); animation: blink 1.6s infinite; }
.wd:nth-child(odd).on i { transform: rotate(-8deg); } .wd:nth-child(even).on i { transform: rotate(7deg); }
:root { --paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16' rx='6' ry='5'/%3E%3Ccircle cx='4.5' cy='10' r='2.6'/%3E%3Ccircle cx='9' cy='5.5' r='2.6'/%3E%3Ccircle cx='15' cy='5.5' r='2.6'/%3E%3Ccircle cx='19.5' cy='10' r='2.6'/%3E%3C/svg%3E"); }

/* заголовки блоков */
.blk { margin-top: 46px; }
.blk-h { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.blk-h h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.1; margin: 0; }
.blk-h .hand { font-size: 24px; color: var(--accent2); transform: rotate(-2deg); display: inline-block; }

/* сегодня */
.today { display: grid; grid-template-columns: 1.3fr .8fr .8fr .9fr; gap: 20px; align-items: stretch; }
.tcard { position: relative; border: 2px solid var(--edge); border-radius: 22px; box-shadow: var(--shadow); padding: 18px 20px; background: var(--panel); display: flex; flex-direction: column; }
.tcard .lab { font-family: var(--hand); font-weight: 700; font-size: 25px; line-height: 1; color: var(--accent2); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tcard .lab small { font-family: var(--sans); font-size: 12.5px; font-weight: 800; color: var(--on-pastel); background: var(--mint); border: 1.5px solid var(--edge); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.dq-q { font-family: var(--serif); font-size: 21px; line-height: 1.25; margin: 0 0 14px; }
.dq-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.dq-opts button { text-align: left; padding: 9px 12px; border-radius: 13px; border: 2px solid var(--edge); background: var(--panel); font-weight: 700; font-size: 15px; line-height: 1.25; box-shadow: 2px 2px 0 var(--edge); transition: transform .12s, box-shadow .12s, background .2s; }
.dq-opts button:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--edge); background: var(--butter); color: var(--on-pastel); }
.dq-opts button:disabled { cursor: default; box-shadow: none; }
.dq-opts button.right { background: var(--ok-bg); border-color: var(--ok); }
.dq-opts button.wrong { background: var(--bad-bg); border-color: var(--bad); animation: shake .45s; }
.dq-opts button.dim { opacity: .5; }
.dq-res { margin-top: 12px; font-size: 14.5px; font-weight: 600; color: var(--ink2); }
.dq-res a { font-weight: 800; white-space: nowrap; }
.dq-from { margin-top: auto; padding-top: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.goal { background: color-mix(in srgb, var(--mint) 55%, var(--panel)); align-items: center; text-align: center; transform: rotate(-.8deg); }
.goal .lab { align-self: stretch; }
.goal-ring { position: relative; width: 124px; height: 124px; margin: 2px 0 8px; }
.goal-ring svg { transform: rotate(-90deg); display: block; }
.goal-ring .n { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 34px; }
.goal-ring .n small { font-size: 16px; color: var(--ink2); }
.goal p { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--ink2); }
.ticket { background: var(--butter); color: var(--on-pastel); transform: rotate(.9deg); padding: 0; flex-direction: row; overflow: hidden; text-decoration: none; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s; }
.ticket:hover { transform: rotate(-.6deg) translateY(-3px); box-shadow: 7px 8px 0 var(--edge); }
.ticket .stub { flex: 0 0 62px; border-right: 2.5px dashed var(--edge); display: grid; place-items: center; background: var(--peach); }
.ticket .stub span { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 900; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.ticket .tb { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ticket .tb b { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.05; color: var(--on-pastel); }
.ticket .tb p { margin: 4px 0 0; font-size: 14px; font-weight: 700; }
.ticket .tb .go { margin-top: auto; padding-top: 10px; font-family: var(--hand); font-weight: 700; font-size: 24px; color: #a8331c; }
.ticket .best { font-size: 12.5px; font-weight: 800; opacity: .75; }

/* путь сквозь эпохи */
.path-scroll { overflow-x: auto; margin: 0 -18px; padding: 16px 18px 12px; scrollbar-width: thin; }
.path { position: relative; display: flex; gap: 6px; min-width: 980px; }
.path::before { content: ""; position: absolute; left: 40px; right: 40px; top: 31px; border-top: 3px dashed var(--muted); opacity: .6; }
.stn { position: relative; flex: 1; background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.stn .c { position: relative; width: 62px; height: 62px; border-radius: 50%; border: 2px solid var(--edge); box-shadow: 3px 3px 0 var(--edge); display: grid; place-items: center; font-family: var(--serif); font-size: 24px; color: var(--on-pastel); background: var(--panel); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.stn:nth-child(odd) .c { transform: translateY(-5px) rotate(-5deg); } .stn:nth-child(even) .c { transform: translateY(6px) rotate(4deg); }
.stn:hover .c { transform: scale(1.12) rotate(0); }
.stn .t { font-size: 12.5px; font-weight: 800; line-height: 1.2; max-width: 104px; color: var(--ink2); }
.stn .p { font-size: 12px; font-weight: 700; color: var(--muted); }
.stn.full .c::after { content: "✓"; position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; border: 2px solid var(--edge); font: 900 12px var(--sans); display: grid; place-items: center; }
.stn.here .c::before { content: ""; position: absolute; left: 50%; top: -34px; width: 36px; height: 34px; transform: translateX(-50%); background: var(--cat) center / contain no-repeat; animation: catBob 2.4s ease-in-out infinite; }
.col-0 { background: var(--peach) !important; } .col-1 { background: var(--mint) !important; } .col-2 { background: var(--lilac) !important; }
.col-3 { background: var(--butter) !important; } .col-4 { background: var(--sky) !important; } .col-5 { background: var(--pink) !important; }

/* альбом */
.album { background: var(--panel); border: 2px solid var(--edge); border-radius: 24px; box-shadow: var(--shadow); padding: 22px 16px 14px; background-image: linear-gradient(var(--line) 1.5px, transparent 1.5px); background-size: 100% 34px; background-position: 0 12px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 16px 6px; }

/* каталог */
.tools { display: flex; gap: 10px; margin: 0 0 6px; flex-wrap: wrap; align-items: center; }
.search { flex: 1; min-width: 220px; height: 46px; background: var(--panel); border: 2px solid var(--edge); border-radius: 14px; padding: 0 16px; color: var(--ink); font: inherit; font-weight: 600; outline: none; box-shadow: var(--shadow-sm); }
.search:focus { background: var(--accent-wash); }
.search::placeholder { color: var(--muted); }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { height: 38px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--edge); background: var(--panel); font-weight: 800; font-size: 14px; }
.fchip.on { background: var(--edge); color: var(--bg); }
.sec { margin-top: 26px; scroll-margin-top: 14px; }
.sec-h { display: flex; align-items: center; gap: 16px; width: 100%; background: none; border: none; padding: 8px 0; text-align: left; }
.sec-h .n { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%; border: 2px solid var(--edge); box-shadow: 3px 3px 0 var(--edge); display: grid; place-items: center; font-family: var(--serif); font-size: 24px; color: var(--on-pastel); transform: rotate(-5deg); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.sec-h:hover .n { transform: rotate(6deg) scale(1.06); }
.sec-h .t { font-family: var(--serif); font-size: clamp(21px, 2.6vw, 28px); line-height: 1.12; flex: 1; }
.sec-h .p { font-size: 13.5px; font-weight: 800; color: var(--ink2); white-space: nowrap; }
.sec-h .chev { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; border: 2px solid var(--edge); display: grid; place-items: center; transition: transform .3s; background: var(--panel); font-size: 13px; }
.sec.closed .chev { transform: rotate(-90deg); }
.sec.closed .sec-body { display: none; }
.sec-bar { height: 10px; background: var(--panel); border: 2px solid var(--edge); border-radius: 999px; overflow: hidden; margin: 6px 0 20px; }
.sec-bar i { display: block; height: 100%; border-right: 2px solid var(--edge); }
.sec-bar i[style*="width:0%"] { border: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px 22px; padding-bottom: 6px; }
.lcard { position: relative; background: var(--panel); border: 2px solid var(--edge); border-radius: 20px; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .28s cubic-bezier(.3, 1.5, .5, 1), box-shadow .2s; animation: fadeUp .5s both; }
.lcard:hover { transform: translate(-3px, -5px) rotate(-.7deg); box-shadow: 8px 9px 0 var(--edge); }
.lcard:nth-child(even):hover { transform: translate(-3px, -5px) rotate(.7deg); }
.lcard .cov { height: 150px; background-size: cover; background-position: center 25%; position: relative; border-bottom: 2px solid var(--edge); border-radius: 18px 18px 0 0; }
.lcard .num { position: absolute; left: 14px; bottom: -19px; z-index: 1; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--edge); box-shadow: 2px 2px 0 var(--edge); display: grid; place-items: center; font-family: var(--serif); font-size: 19px; color: var(--on-pastel); transform: rotate(-8deg); }
.lcard .done-badge { position: absolute; right: 10px; top: 12px; z-index: 1; background: #fffdf8; color: var(--ok); border: 2.5px solid currentColor; font-family: var(--hand); font-size: 22px; font-weight: 700; line-height: 1; padding: 2px 12px 4px; border-radius: 8px; transform: rotate(7deg); box-shadow: 2px 2px 0 rgba(0, 0, 0, .25); }
:root[data-theme="dark"] .lcard .done-badge { color: #24935a; }
.lcard .body { padding: 26px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.lcard .era { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.lcard h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 0; line-height: 1.15; }
.lcard p { margin: 0; color: var(--ink2); font-size: 14.5px; flex: 1; }
.bar { height: 9px; background: var(--bg); border: 1.5px solid var(--edge); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent-soft); }
.lcard .row { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--muted); gap: 8px; }
.lcard .acts { display: flex; gap: 10px; margin-top: 8px; }
.lcard .acts a { text-decoration: none; justify-content: center; padding: 8px 12px; font-size: 15px; border-radius: 12px; }
.lcard .acts a:first-child { flex: 1; }
.soon { border-style: dashed; opacity: .6; padding: 14px 16px; box-shadow: none; }
.soon:hover { transform: none; box-shadow: none; }
.soon h3 { font-size: 17px; }
.empty { display: none; text-align: center; padding: 30px 0; font-family: var(--hand); font-size: 28px; color: var(--muted); }
.empty .cat { width: 90px; margin: 0 auto 6px; }
.foot { margin-top: 60px; text-align: center; font-family: var(--hand); font-size: 24px; color: var(--muted); }

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .buddy { max-width: 520px; }
  .today { grid-template-columns: 1fr 1fr; }
  .today .dq { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .home { padding: 0 14px 60px; }
  .logo small, .pill.xp b, .pill .pw { display: none; }   /* на телефоне шапка — только значки, иначе она шире экрана */
  .pill { padding: 0 11px; }
  .home-top { gap: 8px; }
  .today { grid-template-columns: 1fr; }
  .dq-opts { grid-template-columns: 1fr; }
  .cat-btn { width: 84px; flex-basis: 84px; }
  .sec-h { gap: 10px; flex-wrap: wrap; }
  .sec-h .p { order: 5; flex-basis: 100%; padding-left: 66px; margin-top: -8px; }
  .hero-note { display: none; }
  .big-btn { font-size: 17px; padding: 13px 18px; }
}

/* ===== выбор предмета ===== */
.subjects { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.subj { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 190px; padding: 18px 18px 16px; border: 2px solid var(--edge); border-radius: 24px; box-shadow: 5px 5px 0 var(--edge); color: var(--on-pastel); text-decoration: none; text-align: left; transition: transform .28s cubic-bezier(.3, 1.5, .5, 1), box-shadow .2s; animation: fadeUp .6s both; }
.subj:nth-child(1) { transform: rotate(-.8deg); } .subj:nth-child(2) { transform: rotate(.7deg); animation-delay: .08s; }
.subj:nth-child(3) { transform: rotate(.5deg); animation-delay: .16s; } .subj:nth-child(4) { transform: rotate(-.6deg); animation-delay: .24s; }
a.subj:hover { transform: translate(-3px, -5px) rotate(0); box-shadow: 9px 10px 0 var(--edge); }
.subj .ic { width: 62px; height: 62px; border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%; background: #fffdf8; border: 2px solid var(--edge); display: grid; place-items: center; margin-bottom: 4px; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
a.subj:hover .ic { transform: rotate(-8deg) scale(1.08); }
.subj .ic svg { width: 38px; height: 38px; }
.subj h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(21px, 2.2vw, 26px); line-height: 1.08; margin: 0; padding-right: 8px; }
.subj .nt { font-family: var(--hand); font-weight: 700; font-size: 21px; line-height: 1.05; opacity: .8; }
.subj .pr { margin-top: auto; padding-top: 10px; font-size: 13px; font-weight: 800; display: flex; justify-content: space-between; gap: 8px; }
.subj .bar { background: #fffdf8; margin-top: 5px; }
.subj .bar i { background: #2a2233; opacity: .8; }
.subj .go { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 50%; background: #fffdf8; border: 2px solid var(--edge); display: grid; place-items: center; font-weight: 900; font-size: 18px; transition: transform .25s, background .2s; }
a.subj:hover .go { transform: translateX(4px) rotate(-8deg); background: #2a2233; color: #fffdf8; }
.subj.soon { background: var(--panel) !important; color: var(--muted); border-style: dashed; box-shadow: none; cursor: pointer; font: inherit; }
.subj.soon .ic { background: transparent; border-style: dashed; border-color: var(--muted); opacity: .75; }
.subj.soon h3 { color: var(--ink2); }
.subj .stamp { position: absolute; right: 14px; top: 18px; font-family: var(--hand); font-weight: 700; font-size: 22px; line-height: 1; color: var(--accent2); border: 2.5px solid currentColor; border-radius: 8px; padding: 2px 12px 4px; transform: rotate(8deg); }
.bg-peach { background: var(--peach); } .bg-sky { background: var(--sky); } .bg-lilac { background: var(--lilac); } .bg-mint { background: var(--mint); } .bg-butter { background: var(--butter); } .bg-pink { background: var(--pink); }

/* ===== главная: предметы слева, подсказки справа ===== */
.hub { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 40px; align-items: start; padding: 22px 0 6px; }
.hub .hi { font-size: 28px; color: var(--accent2); display: inline-block; transform: rotate(-2deg); }
.hub h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.05; margin: 0 0 22px; }
.hub h1 .mk, .ov h1 .mk { position: relative; white-space: nowrap; z-index: 0; }
.hub h1 .mk::before, .ov h1 .mk::before { content: ""; position: absolute; left: -3%; right: -3%; bottom: .06em; height: .42em; background: var(--butter); border-radius: 6px; transform: rotate(-1.2deg); z-index: -1; }
:root[data-theme="dark"] .hub h1 .mk::before, :root[data-theme="dark"] .ov h1 .mk::before { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.hub .buddy { margin-top: 34px; }

/* ===== вкладки предмета ===== */
.crumb { display: inline-flex; align-items: center; gap: 6px; font-family: var(--hand); font-weight: 700; font-size: 23px; color: var(--accent2); text-decoration: none; margin-top: 12px; }
.crumb:hover { text-decoration: underline wavy; text-underline-offset: 4px; }
.subj-title { display: flex; align-items: center; gap: 14px; margin: 2px 0 0; }
.subj-title .ic { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%; border: 2px solid var(--edge); box-shadow: 3px 3px 0 var(--edge); display: grid; place-items: center; transform: rotate(-5deg); }
.subj-title .ic svg { width: 34px; height: 34px; }
.subj-title h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.05; margin: 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 0; padding-bottom: 14px; border-bottom: 2.5px dashed var(--line); }
.tab { height: 44px; padding: 0 20px; border-radius: 14px 14px 14px 4px; border: 2px solid var(--edge); background: var(--panel); color: var(--ink); font-weight: 800; font-size: 16px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: transform .12s, box-shadow .12s; }
.tab:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--edge); }
.tab.on { background: var(--butter); color: var(--on-pastel); box-shadow: 3px 3px 0 var(--edge); transform: rotate(-1deg); }
.tab small { font-size: 12.5px; font-weight: 800; opacity: .7; }
.view { display: none; padding-top: 26px; }
.view.on { display: block; animation: fadeUp .35s both; }

/* ===== все уроки: разделы слева, уроки справа ===== */
.lv { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 30px; align-items: start; }
.secnav { position: sticky; top: 14px; display: grid; gap: 7px; max-height: calc(calc(100vh / var(--z, 1)) - 28px); overflow-y: auto; padding: 2px 6px 8px 2px; scrollbar-width: thin; }
.secnav .hand { font-size: 23px; color: var(--accent2); padding: 0 8px 2px; }
.sn { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 7px 10px 7px 7px; border-radius: 16px; border: 2px solid transparent; background: none; transition: background .2s, transform .12s; }
.sn:hover { background: var(--panel); }
.sn .n { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; border: 2px solid var(--edge); display: grid; place-items: center; font-family: var(--serif); font-size: 17px; color: var(--on-pastel); }
.sn .t { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 800; line-height: 1.2; color: var(--ink2); }
.sn .t small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 1px; }
.sn.full .t small { color: var(--ok); }
.sn.on { background: var(--panel); border-color: var(--edge); box-shadow: 3px 3px 0 var(--edge); transform: rotate(-.6deg); }
.sn.on .t { color: var(--ink); }
.lv-head { display: flex; align-items: center; gap: 16px; margin: 20px 0 18px; }
.lv-head .n { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%; border: 2px solid var(--edge); box-shadow: 3px 3px 0 var(--edge); display: grid; place-items: center; font-family: var(--serif); font-size: 24px; color: var(--on-pastel); transform: rotate(-5deg); }
.lv-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.8vw, 30px); line-height: 1.1; margin: 0; flex: 1; }
.lv-head .p { font-size: 13.5px; font-weight: 800; color: var(--ink2); white-space: nowrap; }
.lv-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

/* ===== обзор предмета ===== */
.ov { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 36px; align-items: center; }
.ov h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.05; margin: 0 0 14px; }
.ov .hi { font-size: 28px; color: var(--accent2); display: inline-block; transform: rotate(-2deg); }
.ov p.sub { color: var(--ink2); font-size: 18px; font-weight: 600; max-width: 560px; margin: 0 0 22px; }
.ov-side { display: grid; gap: 22px; }
.prog-card { display: flex; align-items: center; gap: 18px; background: var(--panel); border: 2px solid var(--edge); border-radius: 22px; box-shadow: var(--shadow); padding: 16px 20px; transform: rotate(.8deg); }
.prog-card .goal-ring { flex: 0 0 124px; margin: 0; }
.prog-card b { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.15; color: var(--ink); }
.prog-card span { font-size: 14px; font-weight: 700; color: var(--ink2); }
.ov-side .ticket { min-height: 150px; }

/* ===== альбом в окне ===== */
dialog.dlg { border: 2px solid var(--edge); border-radius: 26px; box-shadow: 8px 8px 0 var(--edge); background: var(--bg); color: var(--ink); padding: 22px; width: min(880px, 94vw); max-height: calc(88vh / var(--z, 1)); }
dialog.dlg::backdrop { background: rgba(42, 34, 51, .5); }
.dlg-h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.dlg-h h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0; }
.dlg-h .hand { font-size: 23px; color: var(--accent2); flex: 1; }
.mini-album { background: color-mix(in srgb, var(--lilac) 50%, var(--panel)); transform: rotate(.7deg); }
.mini-row { display: flex; justify-content: space-around; gap: 4px; margin: 4px 0 12px; }
.mini-row .sticker .s-ico { width: 54px; height: 54px; font-size: 25px; }
.mini-row .sticker .s-name { font-size: 11.5px; max-width: 84px; }
.mini-album .nav-btn { margin-top: auto; justify-content: center; }

@media (max-width: 980px) {
  .hub, .ov { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .hub .buddy { margin-top: 0; }
  .lv { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .secnav { position: static; display: flex; overflow-x: auto; max-height: none; margin: 0 -18px; padding: 4px 18px 10px; gap: 8px; }
  .secnav .hand { display: none; }
  .sn { flex: 0 0 auto; width: auto; max-width: 230px; border-color: var(--line); background: var(--panel); }
  .sn.on { transform: none; }
}
@media (max-width: 600px) {
  .subjects { grid-template-columns: 1fr; }
  .subj { min-height: 0; }
  .tab { padding: 0 14px; font-size: 15px; }
  .lv-head .p { display: none; }
}

/* ===== подписка: замки на карточках и баннер ===== */
.lcard .lock-badge, .lcard .free-badge { position: absolute; right: 10px; top: 12px; z-index: 1; font-family: var(--hand); font-size: 21px; font-weight: 700; line-height: 1; padding: 2px 12px 4px; border-radius: 8px; border: 2px solid #2a2233; color: #2a2233; transform: rotate(5deg); box-shadow: 2px 2px 0 rgba(0, 0, 0, .25); }
.lcard .lock-badge { background: #fffdf8; }
.lcard .free-badge { background: var(--mint); }
.lcard.locked .cov { filter: grayscale(.75) brightness(.92); }
.lcard.locked h3, .lcard.locked p { opacity: .75; }
.lcard .acts[hidden] { display: none; }
.lcard.locked .acts a { flex: 1; }
.pay-banner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 34px; padding: 16px 20px; background: var(--butter); color: var(--on-pastel); border: 2px solid var(--edge); border-radius: 20px; box-shadow: var(--shadow); transform: rotate(-.4deg); }
.pay-banner div { flex: 1; min-width: 240px; }
.pay-banner b { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.15; color: var(--on-pastel); }
.pay-banner span { font-size: 14.5px; font-weight: 700; }
.pay-banner a { text-decoration: none; }

/* ===== страницы аккаунта и админки ===== */
.acc { max-width: 560px; margin: 26px auto 0; }
.acc.wide { max-width: 980px; }
.acc h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.05; margin: 0 0 18px; }
.acc .card { margin-bottom: 22px; }
.acc h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0 0 12px; line-height: 1.15; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: 14px; font-weight: 800; color: var(--ink2); }
.form input { height: 46px; border: 2px solid var(--edge); border-radius: 13px; padding: 0 14px; font: inherit; font-weight: 600; background: var(--bg); color: var(--ink); outline: none; }
.form input:focus { background: var(--accent-wash); }
.form .nav-btn { justify-content: center; height: 48px; }
.form-err { color: var(--bad); font-weight: 800; font-size: 14.5px; min-height: 1.3em; }
.form-ok { color: var(--ok); font-weight: 800; font-size: 14.5px; }
.seg { display: flex; gap: 8px; margin-bottom: 16px; }
.plan { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; background: var(--butter); color: var(--on-pastel); border: 2px solid var(--edge); border-radius: 18px; box-shadow: var(--shadow-sm); transform: rotate(-.5deg); margin: 6px 0 14px; }
.plan .pr { font-family: var(--serif); font-size: 38px; line-height: 1; }
.plan .pr small { font-family: var(--sans); font-size: 14px; font-weight: 800; }
.plan div { flex: 1; min-width: 180px; font-weight: 700; font-size: 14.5px; }
.paybox { border: 2px dashed var(--edge); border-radius: 16px; padding: 14px 16px; background: var(--panel2); margin-top: 6px; }
.paybox .code { display: inline-block; font-family: var(--serif); font-size: 26px; letter-spacing: .06em; background: var(--panel); border: 2px solid var(--edge); border-radius: 10px; padding: 2px 12px; margin: 2px 0; user-select: all; }
.status { display: inline-block; font-size: 12.5px; font-weight: 900; padding: 2px 10px; border-radius: 999px; border: 1.5px solid var(--edge); color: var(--on-pastel); white-space: nowrap; }
.status.paid { background: var(--mint); } .status.claimed { background: var(--butter); } .status.new { background: var(--sky); } .status.canceled { background: var(--pink); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 8px; }
.tbl td { padding: 9px 8px; border-top: 1.5px dashed var(--line); vertical-align: middle; }
.tbl .nav-btn { padding: 5px 11px; font-size: 13.5px; border-radius: 10px; box-shadow: 2px 2px 0 var(--edge); }
.tbl-scroll { overflow-x: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--panel); border: 2px solid var(--edge); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow-sm); }
.kpi b { display: block; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; color: var(--ink); }
.kpi span { font-size: 13px; font-weight: 700; color: var(--muted); }
.legal { max-width: 760px; margin: 26px auto 0; }
.legal h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.legal h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 26px 0 8px; }
.legal .todo { background: var(--butter); color: var(--on-pastel); border: 2px dashed var(--edge); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.foot-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 10px; font-family: var(--sans); font-size: 14px; font-weight: 700; }
.foot-links a { color: var(--muted); }

/* ---------- обзор предмета: спокойная версия (одна главная кнопка, разделы списком) ---------- */
.ov2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: stretch; animation: fadeUp .5s both; }
.ov-card { background: var(--panel); border: 2px solid var(--line); padding: 20px 22px; display: flex; flex-direction: column; min-width: 0; }
.ov-card .lab { font-size: 14px; font-weight: 700; color: var(--muted); }
.ov-card .ct { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.1; margin: 6px 0 8px; color: var(--ink); }
.ov-card .sub { color: var(--ink2); font-size: 15px; margin: 0 0 12px; max-width: 560px; }
.cbar { height: 8px; background: var(--bg2); margin: 4px 0 16px; overflow: hidden; }
.cbar i { display: block; height: 100%; width: 0; background: var(--accent); }
.ov2 .hero-acts { margin-top: auto; gap: 18px; }
.linkish { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 15px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.linkish:hover { color: var(--ink); }
.linkish:disabled { cursor: default; }
.prog2 .pn { font-family: var(--serif); font-size: 40px; line-height: 1; margin: 8px 0 4px; color: var(--ink); }
.prog2 .pn small { font-size: 20px; color: var(--muted); }
.prog2 .ps { font-size: 14px; color: var(--ink2); margin-bottom: 10px; }
.exam-row { margin-top: auto; padding-top: 12px; border-top: 2px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink2); font-size: 14px; }
.exam-row b { color: var(--ink); }
.exam-row .best { color: var(--muted); }
.exam-row .go { color: var(--accent2); font-weight: 800; white-space: nowrap; }
.exam-row:hover .go { text-decoration: underline; }
.slist { background: var(--panel); border: 2px solid var(--line); }
.srow { display: grid; grid-template-columns: 34px minmax(0, 1fr) 140px 70px; align-items: center; gap: 14px; padding: 11px 16px; text-decoration: none; color: var(--ink); }
.srow + .srow { border-top: 2px solid var(--bg2); }
.srow:hover { background: var(--accent-wash); }
.srow .sn2 { font-family: var(--serif); font-size: 20px; color: var(--muted); text-align: center; }
.srow .st { font-size: 15.5px; font-weight: 700; min-width: 0; }
.srow .st em { font-style: normal; font-size: 13px; font-weight: 800; color: var(--accent2); margin-left: 8px; white-space: nowrap; }
.srow .st em.muted { color: var(--muted); }
.srow .sb { height: 6px; background: var(--bg2); overflow: hidden; }
.srow .sb i { display: block; height: 100%; background: var(--accent); }
.srow .sp { font-size: 13.5px; font-weight: 700; color: var(--muted); text-align: right; white-space: nowrap; }
.srow.here { background: var(--accent-wash); }
.srow.here .sn2 { color: var(--accent2); }
.srow.full .sn2 { color: var(--ok, var(--accent2)); }
.srow.soon .st { color: var(--muted); }
@media (max-width: 860px) { .ov2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .srow { grid-template-columns: 26px minmax(0, 1fr) auto; row-gap: 6px; padding: 10px 12px; }
  .srow .sb { grid-column: 2 / 4; grid-row: 2; }
  .srow .sp { grid-column: 3; grid-row: 1; }
}

@media (max-width: 440px) { .logo > span:last-child { display: none; } }   /* узкий телефон: от логотипа остаётся значок «Г» */
@media (max-width: 360px) { .wd i { width: 30px; height: 30px; } }   /* 7 кружков дней влезают и в экран 320 px */

/* ---------- до ЕНТ: отсчёт, план на день, прогноз и следующий вариант ---------- */

.ent-card { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: center; background: var(--panel); border: 2px solid var(--edge); border-radius: 22px; box-shadow: 5px 5px 0 var(--edge); padding: 18px 22px; }
.ent-count { text-align: center; background: var(--lilac); color: var(--on-pastel); border: 2px solid var(--edge); border-radius: 16px; padding: 14px 10px 12px; }
.ent-count b { display: block; font-family: var(--serif); font-weight: 400; font-size: 64px; line-height: 1; }
.ent-count span { display: block; font-weight: 800; font-size: 16px; margin-top: 2px; }
.ent-change { margin-top: 6px; font-size: 13px; color: rgba(42, 34, 51, .7); }
.ent-ask { display: flex; flex-direction: column; gap: 8px; background: var(--lilac); color: var(--on-pastel); border: 2px solid var(--edge); border-radius: 16px; padding: 14px; }
.ent-ask b { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.1; }
.ent-ask small { font-size: 13px; font-weight: 700; line-height: 1.35; opacity: .8; }
.ent-date input { width: 100%; box-sizing: border-box; font: inherit; font-weight: 800; padding: 7px 10px; border: 2px solid var(--edge); border-radius: 10px; background: #fffdf8; color: #2a2233; }
.ent-count .ent-date { display: block; margin-top: 8px; }
.ent-rows { display: flex; flex-direction: column; gap: 10px; }
.ent-plan { margin: 0 0 2px; font-size: 15.5px; line-height: 1.45; }
.ent-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px auto; gap: 12px; align-items: center; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); }
.ent-row .ic { width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--edge); border-radius: 10px; color: #234b57; }
.ent-row .ic svg { width: 30px; height: auto; }
.ent-sub b { display: block; font-size: 16px; }
.ent-sub small, .ent-fc small { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ent-fc b { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1; }
.ent-fc b small { display: inline; font-family: var(--sans); font-size: 14px; color: var(--ink2); }
.ent-fc em { font-style: normal; } .ent-fc .up { color: var(--ok); } .ent-fc .down { color: var(--bad); }
.ent-go { white-space: nowrap; padding: 9px 14px; font-size: 14.5px; text-decoration: none; }
@media (max-width: 860px) {
  .ent-card { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .ent-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .ent-go { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 420px) { .ent-row { grid-template-columns: 40px minmax(0, 1fr); } .ent-fc { grid-column: 2; } .ent-count b { font-size: 52px; } }

/* ---------- «Продолжить»: последний начатый урок — главное действие страницы ---------- */
.resume-card { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: center; margin: 0 0 20px; padding: 12px 16px 12px 12px; background: var(--panel); color: var(--ink); text-decoration: none; border: 2px solid var(--edge); border-radius: 20px; box-shadow: 5px 5px 0 var(--edge); transition: transform .15s, box-shadow .15s; animation: fadeUp .5s both; }
.resume-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--edge); }
.rc-cov { width: 92px; height: 70px; border-radius: 12px; border: 2px solid var(--edge); background: var(--bg2) center / cover no-repeat; }
.rc-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rc-txt small { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.rc-txt b { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-bar { height: 8px; border-radius: 99px; background: var(--bg2); border: 1.5px solid var(--edge); overflow: hidden; margin-top: 4px; max-width: 320px; }
.rc-bar i { display: block; height: 100%; background: var(--accent-soft); }
.rc-go { white-space: nowrap; }
.resume-card[hidden] { display: none; }

/* предметы, которые ещё пишутся, — одной строкой под карточками */
.soon-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; font-weight: 800; color: var(--muted); }
.soon-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 5px; background: none; color: var(--ink2); font: inherit; font-weight: 800; border: 2px dashed var(--line); border-radius: 999px; cursor: pointer; }
.soon-chip:hover { border-color: var(--edge); }
.soon-chip .ic { width: 26px; height: 26px; display: grid; place-items: center; }
.soon-chip .ic svg { width: 22px; height: 22px; }
.soon-chip.shake { animation: shake .4s; }

/* оформление: курсоры и арты во вкладках одного блока */
.style-tabs { display: flex; gap: 8px; margin: 0 0 6px; }
.style-tabs .chip { font: inherit; font-size: 15px; font-weight: 800; padding: 7px 16px; background: var(--panel); color: var(--ink); cursor: pointer; }
.style-tabs .chip.on { background: var(--accent-soft); color: var(--accent-ink); }
.style-note { margin: 4px 0 12px; font-size: 14px; font-weight: 700; color: var(--muted); }
.style-pane[hidden] { display: none; }

@media (max-width: 600px) {
  .resume-card { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .rc-cov { width: 64px; height: 56px; }
  .rc-txt b { font-size: 18px; white-space: normal; }
  .rc-go { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 600px) {   /* карточки предметов на телефоне компактнее — первый экран вмещает «Продолжить» и оба предмета */
  .subjects { gap: 14px; }
  .subj { padding: 14px 14px 12px; gap: 4px; }
  .subj .ic { width: 46px; height: 46px; margin-bottom: 2px; }
  .subj .ic svg { width: 28px; height: 28px; }
  .subj .go { width: 34px; height: 34px; right: 12px; top: 12px; font-size: 16px; }
  .subj .nt { font-size: 18px; }
  .subj .pr { padding-top: 6px; }
}

/* ---------- ЕНТ — первый блок главной ---------- */
.ent-hero { padding: 22px 0 8px; }
.ent-hero .hi { font-size: 28px; color: var(--accent2); display: inline-block; transform: rotate(-2deg); }
.ent-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.05; margin: 0 0 18px; }
.ent-hero h1 .mk { position: relative; white-space: nowrap; z-index: 0; }
.ent-hero h1 .mk::before { content: ""; position: absolute; left: -3%; right: -3%; bottom: .06em; height: .42em; background: var(--accent-soft); border-radius: 6px; transform: rotate(-1.2deg); z-index: -1; }
.ent-subjs { justify-self: start; align-self: flex-start; font-size: 13px; color: var(--muted); }
.hub .blk-h { margin-top: 0; }
.hub .buddy { margin-top: 56px; }

/* старт по шагам */
.onb-card { position: relative; background: var(--panel); border: 2px solid var(--edge); border-radius: 22px; box-shadow: 5px 5px 0 var(--edge); padding: 22px 26px 20px; animation: fadeUp .4s both; }
.onb-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; border-radius: 20px 0 0 20px; background: var(--accent-soft); border-right: 2px solid var(--edge); }
.onb-card > * { margin-left: 8px; }
.onb-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.onb-top small { font-size: 13px; font-weight: 800; color: var(--muted); }
.onb-dots { display: inline-flex; gap: 6px; }
.onb-dots i { width: 30px; height: 8px; border-radius: 99px; background: var(--line); }
.onb-dots i.ok { background: var(--accent); } .onb-dots i.cur { background: var(--accent2); }
.onb-card h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.8vw, 32px); line-height: 1.1; margin: 0 0 6px; }
.onb-card p { margin: 0 0 14px; font-size: 16px; line-height: 1.45; color: var(--ink2); max-width: 600px; }
.onb-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.onb-form input { font: inherit; font-size: 17px; font-weight: 700; padding: 10px 14px; border: 2px solid var(--edge); border-radius: 12px; background: #fffdf8; color: #2a2233; min-width: 0; flex: 0 1 300px; }
.onb-form .ent-date { flex: 0 1 260px; } .onb-form .ent-date input { height: 100%; font-size: 17px; }
.onb-form input:focus { outline: 3px solid var(--accent-soft); }
.onb-skip { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--muted); }
.onb-subjs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.onb-subj { display: flex; gap: 12px; align-items: center; padding: 12px 14px; color: var(--on-pastel); border: 2px solid var(--edge); border-radius: 16px; cursor: pointer; transition: transform .12s, box-shadow .12s, opacity .2s; }
.onb-subj:has(input:not(:checked)) { opacity: .55; filter: grayscale(.4); }
.onb-subj:has(input:checked) { box-shadow: 3px 3px 0 var(--edge); }
.onb-subj input { width: 20px; height: 20px; accent-color: var(--accent2); flex: 0 0 auto; }
.onb-subj .ic { width: 40px; height: 40px; display: grid; place-items: center; background: #fffdf8; border: 2px solid var(--edge); border-radius: 10px; }
.onb-subj .ic svg { width: 28px; height: 28px; }
.onb-subj b { display: block; font-size: 16px; } .onb-subj small { font-size: 12.5px; font-weight: 700; opacity: .75; }
.onb-subjs.shake { animation: shake .4s; }
.onb-go { display: flex; flex-wrap: wrap; gap: 10px; }
.onb-go .nav-btn { text-decoration: none; } .onb-go svg { width: 22px; height: 22px; }
@media (max-width: 600px) {
  .onb-card { padding: 18px 16px 16px 20px; }
  .onb-form input, .onb-form .ent-date { flex: 1 1 100%; }
  .onb-form .nav-btn, .onb-go .nav-btn { flex: 1 1 100%; justify-content: center; }
  .hub .buddy { margin-top: 0; }
}

/* шаг 5 мастера: стартовый балл, слабые темы, распорядок */
.onb-score { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; align-items: start; margin: 6px 0 16px; }
.onb-big { text-align: center; background: var(--lilac); color: var(--on-pastel); border: 2px solid var(--edge); border-radius: 16px; padding: 14px 10px 12px; }
.onb-big b { display: block; font-family: var(--serif); font-weight: 400; font-size: 60px; line-height: 1; }
.onb-big span { display: block; font-weight: 800; font-size: 16px; }
.onb-big small { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 700; opacity: .75; }
.onb-res p { margin: 0 0 10px; }
.onb-weak { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.onb-weak small, .onb-plan small { font-size: 13px; font-weight: 800; color: var(--muted); }
.onb-weak a { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 8px 12px; background: var(--bg); border: 2px solid var(--line); border-left: 5px solid var(--bad); border-radius: 12px; color: var(--ink); text-decoration: none; }
.onb-weak a:hover { border-color: var(--edge); border-left-color: var(--bad); }
.onb-weak b { font-size: 15px; } .onb-weak em { font-style: normal; font-weight: 800; font-size: 13.5px; color: var(--bad); white-space: nowrap; }
.onb-plan { margin: 0 0 16px; padding: 12px 16px; background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border: 2px dashed var(--accent2); border-radius: 14px; }
.onb-plan ol { margin: 6px 0 0; padding-left: 22px; line-height: 1.6; }
@media (max-width: 600px) { .onb-score { grid-template-columns: minmax(0, 1fr); } }

.ent-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.ent-plan-go { text-decoration: none; padding: 9px 16px; font-size: 15px; }
.onb-main { font-size: 17px; padding: 12px 22px; }
@media (max-width: 600px) { .ent-foot .nav-btn { flex: 1 1 100%; justify-content: center; } }

/* ---------- мои предметы ЕНТ: переключатели «сдаю / + добавить» (Forecast.picker) ---------- */
#entPick .subj-pick { margin-top: 14px; }
.subj-pick { padding: 12px 14px; background: var(--panel); border: 2px dashed var(--line); border-radius: 16px; }
.sp-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sp-head b { font-size: 15.5px; } .sp-head small { font-size: 13px; font-weight: 700; color: var(--muted); }
.sp-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.sp-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font: inherit; text-align: left; color: var(--ink); background: var(--bg); border: 2px dashed var(--muted); border-radius: 14px; cursor: pointer; transition: transform .12s, box-shadow .12s, background .2s; }
.sp-chip .ic { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 2px solid var(--edge); border-radius: 10px; filter: grayscale(.8); opacity: .6; }
.sp-chip .ic svg { width: 26px; height: auto; }
.sp-t { flex: 1; min-width: 0; } .sp-t b { display: block; font-size: 15px; } .sp-t small { font-size: 12px; font-weight: 700; color: var(--muted); }
.sp-st { font-size: 13px; font-weight: 900; white-space: nowrap; padding: 4px 10px; border-radius: 99px; border: 2px solid var(--muted); color: var(--muted); }
.sp-chip:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--edge); }
.sp-chip.on { border-style: solid; border-color: var(--edge); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); box-shadow: 3px 3px 0 var(--edge); }
.sp-chip.on .ic { filter: none; opacity: 1; }
.sp-chip.on .sp-st { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--edge); }
.sp-hint { margin: 8px 0 0; font-size: 13.5px; font-weight: 700; color: var(--ink2); }
.sp-list.shake { animation: shake .4s; }

/* ---------- логотип ENT140: значок «ЕНТ / 140» (140 — максимальный балл ЕНТ) ---------- */
.logo .mark.m140 { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 48px; padding-top: 1px; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--serif); font-size: 22px; line-height: .9; letter-spacing: -.02em; }
.logo .mark.m140 i { font-style: normal; font-family: var(--sans); font-weight: 900; font-size: 9.5px; letter-spacing: .14em; line-height: 1.1; opacity: .8; }
.logo b em { font-style: normal; color: var(--accent2); }

/* «Скоро»: остальные предметы ЕНТ по группам */
.soon-row { display: block; margin-top: 18px; padding: 12px 14px; border: 2px dashed var(--line); border-radius: 16px; }
.soon-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.soon-h b { font-size: 15.5px; color: var(--ink); } .soon-h span { font-size: 13px; font-weight: 700; color: var(--muted); }
.soon-g { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.soon-g small { min-width: 96px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.soon-chip { font-size: 13.5px; }
.logo:has(.m140) b { font-size: 25px; }

/* ===== визуальная доводка главной ===== */
/* шапка страницы: подзаголовок слева, штамп «цель — 140» справа */
.eh-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.ent-hero h1 { margin-bottom: 8px; }
.eh-sub { margin: 0; max-width: 620px; font-size: 17px; font-weight: 600; line-height: 1.45; color: var(--ink2); }
.eh-stamp { flex: 0 0 auto; width: 128px; height: 128px; margin-right: 12px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--accent2); border: 3px dashed var(--accent2); outline: 3px solid var(--accent-soft); outline-offset: 5px; rotate: -8deg; animation: fadeUp .6s .2s both; }
.eh-stamp b { font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: .95; }
.eh-stamp small { font-family: var(--hand); font-size: 20px; line-height: 1; }

/* мастер: справа — что даст сайт */
.onb-card.has-get { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
.onb-get { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; background: color-mix(in srgb, var(--accent) 10%, var(--panel)); border: 2px dashed var(--accent2); border-radius: 16px; }
.onb-get > b { font-family: var(--hand); font-size: 23px; color: var(--accent2); line-height: 1; }
.onb-get div { display: flex; gap: 10px; align-items: flex-start; }
.onb-get span { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; background: var(--panel); border: 2px solid var(--edge); border-radius: 10px; }
.onb-get span svg { width: 20px; height: 20px; }
.onb-get p { margin: 0; font-size: 13px; line-height: 1.35; color: var(--muted); font-weight: 600; }
.onb-get p b { display: block; font-size: 14.5px; color: var(--ink); }

/* «На сегодня»: кнопки — по низу карточки, на одной линии */
.tcard > .nav-btn:last-child, .tcard > a.nav-btn { margin-top: auto; justify-content: center; text-align: center; text-decoration: none; }
.tcard > p { margin-top: 0; }
.tcard .srs-num { font-family: var(--serif); font-size: 46px; line-height: 1; color: var(--accent2); }

/* блоки разделяются тонкой линией с отступом — страница читается как набор глав */
.hub, .blk { position: relative; }
.blk::before, .hub::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; border-top: 2px dashed var(--line); }
.hub { margin-top: 44px; }

/* подвал: логотип, девиз и ссылки */
.site-foot { margin-top: 64px; padding-top: 24px; border-top: 2px dashed var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; text-align: left; }
.sf-brand { display: flex; align-items: center; gap: 12px; }
.sf-mark { width: 46px; height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-ink); border: 2px solid var(--edge); border-radius: 10px; font-family: var(--serif); font-size: 18px; line-height: .9; }
.sf-mark i { font-style: normal; font-family: var(--sans); font-weight: 900; font-size: 8.5px; letter-spacing: .14em; opacity: .8; }
.sf-brand b { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1; color: var(--ink); }
.sf-brand b em { font-style: normal; color: var(--accent2); }
.sf-brand small { display: block; font-family: var(--hand); font-size: 20px; color: var(--muted); }
.site-foot .foot-links { margin-top: 0; justify-content: flex-end; }

@media (max-width: 900px) {
  .onb-card.has-get { grid-template-columns: minmax(0, 1fr); }
  .onb-get { display: none; }
}
@media (max-width: 700px) {
  .eh-stamp { display: none; }
  .eh-sub { font-size: 15.5px; }
  .site-foot { flex-direction: column; align-items: flex-start; }
  .site-foot .foot-links { justify-content: flex-start; }
}
.site-foot::after { flex-basis: 100%; order: 5; margin-top: 8px !important; }   /* кайма-кружево — отдельной строкой внизу */
.site-foot .foot-links { margin-left: auto; }
@media (max-width: 700px) { .site-foot .foot-links { margin-left: 0; } }
.site-foot .foot-links { gap: 14px; font-size: 13px; }

/* мастер первого входа: страница сосредоточена на нём, остальное появится после завершения */
body.onb-mode .hub, body.onb-mode .blk { display: none; }
body.onb-mode .site-foot { margin-top: 40px; }

/* блок ЕНТ: слева отсчёт и кнопка плана под ним, справа — крупнее */
.ent-card { grid-template-columns: 260px minmax(0, 1fr); gap: 26px; padding: 22px 26px; align-items: stretch; }
.ent-left { display: flex; flex-direction: column; gap: 14px; }
.ent-left .ent-count, .ent-left .ent-ask { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ent-left .ent-plan-go { justify-content: center; width: 100%; box-sizing: border-box; font-size: 15.5px; padding: 11px 14px; }
.ent-count b { font-size: 76px; }
.ent-count span { font-size: 17px; }
.ent-rows { justify-content: center; gap: 12px; }
.ent-plan { font-size: 17.5px; line-height: 1.5; margin-bottom: 4px; }
.ent-row { grid-template-columns: 56px minmax(0, 1fr) 170px auto; gap: 16px; padding: 14px 18px; border-radius: 16px; }
.ent-row .ic { width: 56px; height: 56px; border-radius: 12px; }
.ent-row .ic svg { width: 38px; }
.ent-sub b { font-size: 19px; }
.ent-sub small, .ent-fc small { font-size: 13.5px; }
.ent-fc b { font-size: 32px; }
.ent-fc b small { font-size: 15px; }
.ent-go { font-size: 15.5px; padding: 12px 18px; }
@media (max-width: 860px) {
  .ent-card { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .ent-row { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 12px; }
  .ent-row .ic { width: 48px; height: 48px; }
}
@media (max-width: 420px) { .ent-row { grid-template-columns: 44px minmax(0, 1fr); } .ent-count b { font-size: 58px; } }
.ent-left .ent-count { align-items: center; }

/* «С чего начать / Продолжить» на странице предмета: обложка урока справа, текст слева */
.ov-card.cont { position: relative; overflow: hidden; }
.ov-card.cont > :not(.ov-cov) { position: relative; z-index: 1; }
.ov-cov { position: absolute; top: 0; right: 0; bottom: 0; width: 46%; background: var(--bg2) center / cover no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%); mask-image: linear-gradient(90deg, transparent 0, #000 38%); display: none; }
.ov-card.cont.has-cov .ov-cov { display: block; }
.ov-card.cont.has-cov .ct, .ov-card.cont.has-cov .sub, .ov-card.cont.has-cov .lab, .ov-card.cont.has-cov .cbar { max-width: 58%; }
@media (max-width: 700px) {
  .ov-cov { position: relative; width: auto; height: 130px; margin: -20px -22px 14px; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
  .ov-card.cont.has-cov .ct, .ov-card.cont.has-cov .sub, .ov-card.cont.has-cov .lab, .ov-card.cont.has-cov .cbar { max-width: none; }
}

/* оплата через Kaspi: QR для компьютера, кнопка для телефона, имя плательщика */
.pay-kaspi { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 12px 0; }
.pay-qr { margin: 0; text-align: center; }
.pay-qr img { display: block; width: 190px; height: 190px; object-fit: contain; background: #fff; padding: 8px; border: 2px solid var(--edge); border-radius: 14px; box-shadow: 3px 3px 0 var(--edge); }
.pay-qr figcaption { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); max-width: 200px; }
.pay-link { text-decoration: none; }
.pay-payer { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 12px; font-size: 14px; font-weight: 700; color: var(--ink2); }
.pay-payer input { font: inherit; font-size: 16px; padding: 9px 12px; border: 2px solid var(--edge); border-radius: 12px; background: var(--panel); color: var(--ink); max-width: 340px; }
@media (hover: none) and (pointer: coarse) { .pay-qr figcaption::after { content: " — или нажми кнопку «Оплатить в Kaspi»"; } }

/* сессии ЕНТ: январское / мартовское / основное — быстрый выбор даты */
.ent-sess { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 2px; text-align: left; }
.ent-sess .ent-sess-b { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 8px 12px; font: inherit; color: #2a2233; background: #fffdf8; border: 2px solid var(--edge); border-radius: 12px; cursor: pointer; text-align: left; box-shadow: 0 2px 0 var(--edge); transition: transform .12s, background .12s; }
.ent-sess .ent-sess-b:hover { transform: translateY(-1px); background: #fff; }
.ent-sess .ent-sess-b:active { transform: translateY(1px); box-shadow: none; }
.ent-sess .ent-sess-b.on { background: var(--mint, #d8efe4); }
.ent-sess .ent-sess-b b { font-family: inherit; font-size: 15px; font-weight: 800; line-height: 1.2; }
.ent-sess .ent-sess-b small { font-size: 12.5px; font-weight: 600; opacity: .72; line-height: 1.3; }
.ent-or { display: block; margin: 8px 0 4px; font-size: 12.5px; font-weight: 700; opacity: .7; }
.onb-card .ent-sess { flex-direction: row; flex-wrap: wrap; max-width: 640px; }
.onb-card .ent-sess .ent-sess-b { flex: 1 1 180px; width: auto; }

/* тарифы в аккаунте: карточки-переключатели */
.plans-what { font-weight: 600; font-size: 14.5px; margin: 4px 0 12px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 14px; }
.plan-opt { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 14px 12px; background: var(--panel, #fffdf8); color: #2a2233; border: 2px solid var(--edge); border-radius: 16px; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; box-shadow: 0 2px 0 var(--edge); }
.plan-opt:hover { transform: translateY(-2px); }
.plan-opt input { position: absolute; opacity: 0; pointer-events: none; }
.plan-opt.on { background: color-mix(in srgb, var(--mint) 45%, #fff); box-shadow: 0 4px 0 var(--edge); }
.plan-opt.on::after { content: "✓"; position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--edge); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.plan-opt:has(input:focus-visible) { outline: 3px solid var(--edge); outline-offset: 2px; }
.plan-opt:has(input:disabled) { cursor: default; opacity: .6; }
.plan-t { font-weight: 800; font-size: 15px; padding-right: 26px; }
.plan-pr { font-family: var(--serif); font-size: 32px; line-height: 1.1; margin: 4px 0 2px; }
.plan-opt small { font-size: 12.5px; font-weight: 600; opacity: .75; }
.plan-opt .plan-pm { opacity: 1; font-weight: 700; }
.plan-pm em { font-style: normal; background: var(--edge); color: #fff; border-radius: 6px; padding: 0 5px; margin-left: 2px; }
.plan-badge { position: absolute; top: -11px; left: 12px; background: var(--edge); color: #fff; font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 99px; letter-spacing: .02em; }
.plan-opt.best { border-width: 3px; }
