/* «Сөз әлемі» — ортақ стиль */
:root {
  --green: #178a57;
  --bg: #b2d8c8; /* 67% ақ + 33% жасыл (#178a57) */
  --bg-2: #c4e1d4;
  --surface: #ffffff;
  --surface-2: #eef6f1;
  --text: #10231a;
  --muted: #3f5249;
  --muted-card: #5b6b63;
  --line: #d3e6dc;
  --primary: #178a57;
  --primary-2: #0f6e45;
  --primary-soft: #dcf1e6;
  --on-primary: #ffffff;
  --forest: #0f3d2e;
  --orange: #e8710f;
  --orange-2: #cc5f06;
  --orange-soft: #fdebd9;
  --teal: #1f8f84;
  --teal-soft: #dcf2ef;
  --gold: #f0a92e;
  --gold-soft: #fdf1d8;
  --ok: #178a57;
  --ok-soft: #dcf1e6;
  --err: #d6393b;
  --err-soft: #fce4e4;
  --warn: #b45f06;
  --warn-soft: #fdebd9;
  --shadow: 0 1px 2px rgba(15, 61, 46, 0.06), 0 8px 24px rgba(15, 61, 46, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green: #3cc486;
    --on-primary: #0b2a20;
    --bg: #0e1a15;
    --bg-2: #12221b;
    --surface: #15241d;
    --surface-2: #1c2f26;
    --text: #e9f2ed;
    --muted: #9fb5aa;
    --muted-card: #9fb5aa;
    --line: #284036;
    --primary: #3cc486;
    --primary-2: #5cd49c;
    --primary-soft: #183a2b;
    --forest: #0b2a20;
    --orange: #ff9440;
    --orange-2: #ffa95f;
    --orange-soft: #3a2614;
    --teal: #4cc3b6;
    --teal-soft: #163532;
    --gold: #ffc35c;
    --gold-soft: #3a2f17;
    --ok: #3cc486;
    --ok-soft: #183a2b;
    --err: #ff6b6b;
    --err-soft: #3d1d20;
    --warn: #ffb15c;
    --warn-soft: #3a2614;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --green: #3cc486;
  --on-primary: #0b2a20;
  --bg: #0e1a15;
  --bg-2: #12221b;
  --surface: #15241d;
  --surface-2: #1c2f26;
  --text: #e9f2ed;
  --muted: #9fb5aa;
  --muted-card: #9fb5aa;
  --line: #284036;
  --primary: #3cc486;
  --primary-2: #5cd49c;
  --primary-soft: #183a2b;
  --forest: #0b2a20;
  --orange: #ff9440;
  --orange-2: #ffa95f;
  --orange-soft: #3a2614;
  --teal: #4cc3b6;
  --teal-soft: #163532;
  --gold: #ffc35c;
  --gold-soft: #3a2f17;
  --ok: #3cc486;
  --ok-soft: #183a2b;
  --err: #ff6b6b;
  --err-soft: #3d1d20;
  --warn: #ffb15c;
  --warn-soft: #3a2614;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.section { padding: 32px 0; }
.container.section { padding: 32px 16px; }
.muted { color: var(--muted); }
.card .muted, .card .stat-label, .card .hint { color: var(--muted-card); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.hidden { display: none !important; }

/* ---------- шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: 2px; margin-left: 8px; flex: 1; }
.nav a {
  color: var(--text); padding: 8px 10px; border-radius: 8px; font-size: 0.93rem; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { color: var(--primary-2); background: var(--primary-soft); font-weight: 600; }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.lang-select {
  min-width: 68px;
  min-height: 40px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 8px; padding: 0 8px; font: inherit; font-size: 0.9rem;
}
.header .burger { display: none; }
@media (max-width: 1240px) {
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; margin: 0; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .header .burger { display: inline-flex; }
}
@media (max-width: 560px) {
  .header-in { gap: 8px; }
  .header-tools { gap: 6px; }
  .brand { font-size: 1.05rem; }
  .brand svg { width: 30px; height: 30px; }
  .lang-select { min-width: 0; width: 64px; padding: 0 4px; }
  .header #theme { display: none; }
  .header .user-btn span { display: none; }
  .header .user-btn { width: 44px; padding: 0; }
}
.nav .theme-mobile { display: none; }
@media (max-width: 560px) { .nav .theme-mobile { display: block; } }
html, body { overflow-x: clip; }
.example { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }

/* ---------- батырмалар ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.97rem; cursor: pointer; text-decoration: none !important;
  background: var(--primary); color: var(--on-primary); transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { background: var(--primary-2); transform: translateY(-1px); box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn.accent { background: var(--orange); color: var(--on-primary); }
.btn.accent:hover { background: var(--orange-2); box-shadow: 0 6px 16px color-mix(in srgb, var(--orange) 35%, transparent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.secondary:hover { background: var(--surface-2); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--primary-soft); box-shadow: none; }
.btn.danger { background: var(--err); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 0.88rem; }
.btn.icon { width: 44px; padding: 0; }
.btn svg { width: 18px; height: 18px; }

/* ---------- карточкалар ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.card.flat { box-shadow: none; }
.card h3 { margin-bottom: 6px; }
.card-link { display: block; color: inherit; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; }
.card-link:hover { text-decoration: none; transform: translateY(-4px); box-shadow: 0 16px 36px rgba(15, 61, 46, 0.16); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.icon-tile {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); margin-bottom: 12px;
}
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile.gold { background: var(--gold-soft); color: var(--gold); }
.icon-tile.ok { background: var(--ok-soft); color: var(--ok); }
.icon-tile.err { background: var(--err-soft); color: var(--err); }
.icon-tile.orange { background: var(--orange-soft); color: var(--orange); }
.icon-tile.teal { background: var(--teal-soft); color: var(--teal); }
.icon-tile.forest { background: var(--forest); color: #fff; }
.card-link .icon-tile { transition: transform 0.3s; }
.card-link:hover .icon-tile { transform: scale(1.08) rotate(-4deg); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.badge.blue { background: var(--primary-soft); color: var(--primary-2); }
.badge.orange { background: var(--orange-soft); color: var(--orange-2); }
.badge.pill { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.badge.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.badge.gold { background: var(--gold-soft); color: var(--warn); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.err { background: var(--err-soft); color: var(--err); }

/* ---------- формалар ---------- */
label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.hint { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.error-text { color: var(--err); font-size: 0.9rem; margin-top: 6px; }

/* ---------- қазақ әріптері пернетақтасы ---------- */
.kk-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kk-keys button {
  min-width: 44px; min-height: 44px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 1.05rem; cursor: pointer;
}
.kk-keys button:hover { background: var(--primary-soft); color: var(--primary); }

/* ---------- хабарламалар ---------- */
.alert { border-radius: var(--radius-sm); padding: 12px 14px; border: 1px solid; margin: 12px 0; }
.alert.info { background: var(--primary-soft); border-color: transparent; color: var(--text); }
.alert.ok { background: var(--ok-soft); border-color: transparent; }
.alert.err { background: var(--err-soft); border-color: transparent; color: var(--text); }
.alert.warn { background: var(--warn-soft); border-color: transparent; }
.ai-note { font-size: 0.82rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.ai-note svg { width: 14px; height: 14px; flex: none; }
.toast-wrap { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 0.95rem; }

/* ---------- жүктелу / бос күй ---------- */
.spinner { width: 22px; height: 22px; border: 3px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; gap: 12px; align-items: center; color: var(--muted); padding: 24px 0; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 48px; height: 48px; opacity: 0.5; margin-bottom: 8px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; min-height: 16px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- басты бет ---------- */
.hero { padding: 56px 0 32px; position: relative; overflow: hidden; }

.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 span { color: var(--primary-2); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 5px; text-underline-offset: 8px; text-decoration-skip-ink: none; }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
.hero-art .float-a { animation: floaty 6s ease-in-out infinite; }
.hero-art .float-b { animation: floaty 6s ease-in-out -2s infinite; }
.hero-art .float-c { animation: floaty 6s ease-in-out -4s infinite; }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.hero-art { aspect-ratio: 1; max-width: 420px; justify-self: center; width: 100%; }
.steps { counter-reset: s; }
.step { position: relative; padding-left: 56px; }
.step::before {
  counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 40px; height: 40px;
  border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.step:nth-child(2)::before { background: var(--orange); }
.step:nth-child(3)::before { background: var(--forest); }

/* ---------- сабақ карточкалары (tilqural үлгісі) ---------- */
.lesson-card { display: flex; gap: 14px; align-items: center; }
.lesson-art { width: 76px; height: 76px; border-radius: 14px; flex: none; display: grid; place-items: center; color: #fff; }
.lesson-art svg { width: 38px; height: 38px; }
.lesson-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.lesson-meta span { display: inline-flex; align-items: center; gap: 4px; }
.lesson-meta svg { width: 15px; height: 15px; }
.progress-line { height: 4px; background: var(--surface-2); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.progress-line > i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tabs button {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 0.93rem;
  color: var(--text); cursor: pointer; white-space: nowrap; min-height: 42px; transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.tabs button:hover { border-color: var(--primary); }
.tabs button.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }
@media (max-width: 640px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .tabs::-webkit-scrollbar { display: none; }
}

/* ---------- сөз тізімі ---------- */
.word-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.word-row:last-child { border-bottom: 0; }
.word-kk { font-weight: 700; font-size: 1.05rem; }
.speak-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--primary); cursor: pointer; display: grid; place-items: center; }
.speak-btn svg { width: 18px; height: 18px; }

/* ---------- диагностика / жаттығу ---------- */
.quiz { max-width: 720px; margin: 0 auto; }
.bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); transition: width 0.6s; }
.question-text { font-size: 1.2rem; font-weight: 600; white-space: pre-line; margin: 16px 0; }
.options { display: grid; gap: 10px; }
.option {
  text-align: left; min-height: 52px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 1rem; cursor: pointer;
}
.option:hover { border-color: var(--primary); }
.option.selected { border-color: var(--primary); background: var(--primary-soft); }
.option.correct { border-color: var(--ok); background: var(--ok-soft); }
.option.wrong { border-color: var(--err); background: var(--err-soft); }
.feedback { border-radius: 12px; padding: 14px 16px; margin-top: 14px; }
.feedback.ok { background: var(--ok-soft); }
.feedback.err { background: var(--err-soft); }
.ex-item { border-top: 1px solid var(--line); padding: 18px 0; }
.ex-item:first-child { border-top: 0; }

/* ---------- репетитор чаты ---------- */
.chat-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; }
@media (max-width: 860px) { .chat-layout { grid-template-columns: 1fr; } .chat-side { display: none; } .chat-side.open { display: block; } }
.chat-box { display: flex; flex-direction: column; height: calc(100vh - 180px); min-height: 520px; }
.chat-log { flex: 1; overflow-y: auto; padding: 8px 4px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 86%; padding: 12px 16px; border-radius: 16px; }
.msg.user { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .rule { background: var(--orange-soft); border-left: 4px solid var(--orange); border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: 0.93rem; }
.msg ul { padding-left: 20px; margin: 6px 0; }
.msg .tr { color: var(--muted); font-size: 0.9rem; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; padding-top: 10px; border-top: 1px solid var(--line); }
.chat-input textarea { min-height: 52px; max-height: 160px; }
.chat-list button { width: 100%; text-align: left; background: none; border: 0; padding: 10px; border-radius: 8px; color: var(--text); font: inherit; cursor: pointer; }
.chat-list button:hover, .chat-list button.active { background: var(--surface-2); }

/* ---------- мәтін талдау ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }
.text-view { white-space: pre-wrap; line-height: 1.8; }
mark.err { background: var(--err-soft); color: var(--err); border-bottom: 2px solid var(--err); padding: 0 2px; border-radius: 3px; }
mark.sugg { background: var(--warn-soft); color: var(--warn); border-bottom: 2px dashed var(--warn); padding: 0 2px; border-radius: 3px; }
mark.fix { background: var(--ok-soft); color: var(--ok); padding: 0 2px; border-radius: 3px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }

/* ---------- прогресс ---------- */
.stat { font-size: 1.9rem; font-weight: 800; line-height: 1.1; color: var(--primary); }
.grid-4 > :nth-child(4n+2) .stat { color: var(--orange); } .grid-4 > :nth-child(4n+3) .stat { color: var(--teal); }
.grid-4 > :nth-child(4n+4) .stat { color: var(--forest); }
:root[data-theme="dark"] .grid-4 > :nth-child(4n+4) .stat { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grid-4 > :nth-child(4n+4) .stat { color: var(--text); } }
.stat-label { color: var(--muted); font-size: 0.88rem; }
.hbar { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; margin: 8px 0; font-size: 0.92rem; }
@media (max-width: 520px) { .hbar { grid-template-columns: 110px 1fr 40px; } }
.hbar .track { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 6px; background: var(--primary); }
.calendar { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; }
.calendar i { aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); }
.calendar i.l1 { background: color-mix(in srgb, var(--primary) 30%, var(--surface-2)); }
.calendar i.l2 { background: color-mix(in srgb, var(--primary) 60%, var(--surface-2)); }
.calendar i.l3 { background: var(--primary); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badge-card { text-align: center; padding: 14px 8px; border-radius: 12px; border: 1px solid var(--line); font-size: 0.85rem; }
.badge-card svg { width: 34px; height: 34px; color: var(--orange); }
.badge-card.off { opacity: 0.4; filter: grayscale(1); }
.level-chart { display: flex; gap: 10px; align-items: flex-end; height: 160px; padding-top: 10px; }
.level-chart div { flex: 1; background: var(--primary); border-radius: 6px 6px 0 0; position: relative; min-width: 18px; max-width: 60px; }
.level-chart div:nth-child(even) { background: var(--orange); }
.level-chart div span { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 0.8rem; font-weight: 700; }

/* ---------- қою жасыл блок ---------- */
.band { position: relative; overflow: hidden; border: 0; color: #fff; background: linear-gradient(120deg, var(--forest), var(--primary-2)); }
.band::after { content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%;
  border: 36px solid color-mix(in srgb, var(--orange) 70%, transparent); }
.band > * { position: relative; z-index: 1; }
.band h2 { color: #fff; }

/* ---------- төмен сырғығанда біртіндеп ашылу ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-art .float-a, .hero-art .float-b, .hero-art .float-c { animation: none; }
}

/* ---------- футер ---------- */
.footer { padding: 32px 0; margin-top: 40px; color: rgba(255, 255, 255, 0.78); font-size: 0.9rem; background: var(--forest); }
.footer a { color: rgba(255, 255, 255, 0.9); }
.footer a:hover { color: #fff; }

/* ---------- басып шығару (PDF есеп) ---------- */
@media print {
  .header, .footer, .no-print, .toast-wrap { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}

/* ---------- дизайн ауыстырғыш (клиент нұсқа таңдағанша) ---------- */
.design-switch {
  position: fixed; left: 12px; bottom: 12px; z-index: 90; display: flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 12px;
  box-shadow: var(--shadow); font-size: 0.82rem; color: var(--muted);
}
.design-switch button {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--text);
  font: inherit; font-weight: 700; cursor: pointer;
}
.design-switch button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
@media print { .design-switch { display: none; } }

/* ---------- Google / Telegram арқылы кіру ---------- */
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.85rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn.social { width: 100%; gap: 10px; }
.btn.social svg { width: 20px; height: 20px; }

/* ---------- қазақ әріптері: жиып қоятын батырма; «Enter — жіберу» тек нақты пернетақтада ---------- */
.kk-wrap { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin-top: 8px; }
.kk-wrap .kk-keys { margin-top: 0; }
.kk-keys[hidden] { display: none; }
.kk-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 8px;
  border: 1px dashed var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 0.95rem; cursor: pointer;
}
.kk-toggle:hover { color: var(--primary); border-color: var(--primary); }
.kk-toggle i { font-style: normal; transition: transform 0.2s; }
.kk-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
@media (pointer: coarse) { .kbd-hint { display: none; } }

/* ---------- сабақ суреттері ---------- */
.lesson-art { background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #000)); }

.art-v1 { display: none; }
.art-chat { --c: #178a57; } .art-home { --c: #e8710f; } .art-heart { --c: #d6393b; } .art-globe { --c: #1f8f84; }
.art-sun { --c: #f0a92e; } .art-layers { --c: #0f3d2e; } .art-shield { --c: #1f8f84; } .art-star { --c: #e8710f; }

.v4-only { display: none !important; }
