/* LangType - dark practice UI (YouType-like look) */
:root {
  --bg: #14151a;
  --side: #1b1d25;
  --card: #24262c;
  --card-2: #2b2e36;
  --modal: #272a32;
  --nav-on: #353942;
  --line: #434b5a;
  --line-soft: #2f333d;
  --text: #f4f5f7;
  --text-2: #e0e2e7;
  --soft: #c5cbd5;
  --muted: #a6afbd;
  --dim: #7b899e;
  --accent: #a88af4;
  --primary: #ad92fa;
  --primary-ink: #241638;
  --pill-bg: #33294d;
  --pill-ink: #d5c5ff;
  --score: #b59aff;
  --bad: #f69aac;
  --good: #49c88b;
  --warn: #edac54;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body {
  color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { flex: none; }
.muted { color: var(--muted); }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  background: var(--side); padding: 32px 22px 22px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 30px; font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.brand b { color: var(--accent); font-weight: 700; }
.nav-label { font-size: 11px; font-weight: 600; color: #b5b8c2; padding: 18px 14px 8px; }
.nav {
  display: flex; align-items: center; gap: 14px; width: 100%; height: 47px; padding: 12px 14px;
  border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--text-2); text-align: left;
  transition: background 0.16s ease-out, color 0.16s ease-out;
}
.nav:hover { background: rgba(53, 57, 66, 0.55); }
.nav.on { background: var(--nav-on); color: #fff; font-weight: 700; }
.nav svg { color: var(--soft); }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--nav-on); border-radius: 6px; padding: 2px 7px; color: var(--soft); }
.nav.on .count { background: #454a55; }
.side-foot { margin-top: auto; padding-top: 18px; }
.who { display: flex; align-items: center; gap: 9px; padding: 8px 0 10px; font-size: 13px; color: var(--soft); min-width: 0; }
.who-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--pill-bg); color: var(--pill-ink); font-weight: 700; font-size: 12px; flex: none; }
.who-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.who-out { color: var(--dim); font-size: 12px; flex: none; }
.who-out:hover { color: #fff; }
.lang-select { position: relative; display: inline-flex; align-items: center; color: var(--muted); }
.lang-select select { appearance: none; -webkit-appearance: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--text); background: var(--card); border: 1px solid var(--line-soft); border-radius: 12px; padding: 9px 34px 9px 14px; cursor: pointer; transition: border-color 0.15s ease-out; }
.lang-select select:hover, .lang-select select:focus-visible { border-color: var(--accent); outline: none; }
.lang-select select option { background: var(--modal); color: var(--text); }
.lang-select svg { position: absolute; right: 12px; pointer-events: none; }
.lang-pick { margin: -14px 0 4px; }
.lang-pick .nav-label { padding-top: 0; }
.lang-pick .lang-select { display: flex; width: 100%; }
.lang-pick .lang-select select { width: 100%; padding-left: 38px; }
.lang-pick .lang-select svg:first-child { left: 13px; right: auto; }
.lang-pick .lang-select svg:last-child { transform: rotate(-90deg); }
.ai-state { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); padding: 12px 6px 0; }
.ai-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.ai-state.on i { background: var(--good); }

.main { padding: 34px 44px 70px; min-width: 0; animation: home-enter 0.34s var(--ease-out); }
@keyframes home-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hello { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.hello h1 { margin: 0; font-size: 30px; font-weight: 650; letter-spacing: -0.4px; }
.hello p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.date { display: flex; align-items: center; gap: 8px; color: var(--soft); font-size: 13px; padding-top: 10px; }

.card { background: var(--card); border-radius: 22px; padding: 26px 28px; }
.home-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; margin-top: 28px; }
.card-h { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 600; color: var(--text-2); }
.card-h small { font-size: 12px; color: var(--muted); font-weight: 500; }

.continue { display: grid; grid-template-columns: 340px 1fr; gap: 28px; margin-top: 22px; align-items: center; }
.cover {
  border-radius: 14px; aspect-ratio: 16 / 9.4; padding: 18px 20px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; background: #2e3140;
}
.cover .ct { font-size: 22px; font-weight: 800; line-height: 1.1; letter-spacing: -0.3px; color: #fff; max-width: 70%; }
.cover .ct span { color: var(--c, var(--warn)); }
.cover .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cover .chips i { font-style: normal; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.1); color: #fff; }
.cover .big { position: absolute; right: 14px; top: 8px; font-size: 64px; font-weight: 800; color: rgba(255, 255, 255, 0.08); letter-spacing: -2px; }
.continue h2 { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.35; letter-spacing: -0.3px; }
.continue .sub { color: var(--soft); font-size: 14px; margin-top: 10px; }
.mini-prog { margin-top: 28px; }
.mini-prog .lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.mini-prog .lbl b { color: var(--text-2); font-weight: 600; }
.mini-bar { height: 6px; border-radius: 99px; background: #3a3d48; margin-top: 10px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.5s var(--ease-out); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px; background: var(--primary); color: var(--primary-ink);
  border-radius: 9999px; padding: 13px 22px; font-size: 14px; font-weight: 600; transition: background 0.16s ease-out, transform 0.16s ease-out;
}
.btn-primary:hover { background: #bba4ff; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); font-size: 13px; padding: 6px 0; transition: color 0.16s ease-out; }
.btn-ghost:hover { color: #fff; }
.btn-line { display: inline-flex; align-items: center; gap: 8px; border: 0.8px solid var(--line); border-radius: 9999px; padding: 11px 18px; font-size: 13px; font-weight: 600; color: var(--soft); transition: 0.16s ease-out; }
.btn-line:hover { border-color: var(--accent); color: #fff; }
.btn-line[disabled] { opacity: 0.45; cursor: not-allowed; }

/* week ring */
.ring { width: 124px; height: 124px; margin: 22px auto 0; position: relative; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring .in { text-align: center; }
.ring .fire { font-size: 24px; line-height: 1; }
.ring .num { font-size: 28px; font-weight: 700; margin-top: 4px; }
.ring .num small { font-size: 14px; color: var(--muted); font-weight: 600; }
.ring .cap { font-size: 11px; color: var(--muted); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 18px; text-align: center; }
.week .dn { font-size: 11px; color: var(--muted); }
.week .dd { width: 30px; height: 30px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #30333c; color: var(--soft); }
.week .dd.on { background: var(--pill-bg); color: var(--pill-ink); }
.week .dd.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.week-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 14px; line-height: 1.5; }

.review { display: flex; gap: 22px; align-items: center; margin-top: 24px; }
.review .ico { width: 48px; height: 48px; border-radius: 12px; background: #2f323b; display: grid; place-items: center; color: var(--accent); }
.review .k { font-size: 12px; color: var(--muted); display: flex; gap: 12px; }
.review .k b { color: var(--pill-ink); font-weight: 600; }
.review h3 { margin: 6px 0 4px; font-size: 19px; font-weight: 700; }
.review p { margin: 0; color: var(--soft); font-size: 14px; }
.review .go { margin-left: auto; }
.course-meta { flex-wrap: wrap; }
.next-up { margin-top: 14px; font-size: 13px; color: var(--pill-ink); }

/* personal learning style */
.style-card { margin-top: 24px; }
.style-body { display: flex; gap: 24px; align-items: center; justify-content: space-between; margin-top: 14px; flex-wrap: wrap; }
.style-now { flex: 1 1 320px; min-width: 0; }
.style-now b { font-size: 19px; font-weight: 700; }
.style-now p { margin: 6px 0 0; color: var(--soft); font-size: 14px; }
.style-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.style-facts span { font-size: 12px; color: var(--pill-ink); background: var(--pill-bg); border-radius: 99px; padding: 5px 10px; }
.style-opts { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; }
.style-opts button { padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); transition: background-color 0.16s ease-out, color 0.16s ease-out; }
.style-opts button:hover { color: #fff; }
.style-opts button.on { background: var(--primary); color: var(--primary-ink); }

/* screen words already turned Slovak: hover shows the English */
.tl { text-decoration: underline dotted rgba(168, 138, 244, 0.55); text-underline-offset: 4px; text-decoration-thickness: 1.5px; cursor: help; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 34px; padding-bottom: 30px; border-bottom: 1px solid var(--line-soft); }
.stat { padding: 0 24px; border-left: 1px solid var(--line-soft); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat .l { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
.stat .n { font-size: 24px; font-weight: 650; margin-top: 14px; }
.stat .s { font-size: 11px; color: var(--muted); margin-top: 6px; }

.sec-h { display: flex; justify-content: space-between; align-items: center; margin: 34px 0 18px; }
.sec-h h2 { margin: 0; font-size: 18px; font-weight: 650; }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.tcard { background: var(--card); border-radius: 18px; overflow: hidden; text-align: left; transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease-out; display: block; width: 100%; }
.tcard:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
.tcard .cover { border-radius: 0; }
.tcard .tb { padding: 16px 18px 18px; }
.tcard .tt { font-size: 15px; font-weight: 700; }
.tcard .tm { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }
.tag-lvl { font-size: 11px; font-weight: 700; color: var(--pill-ink); background: var(--pill-bg); border-radius: 6px; padding: 2px 8px; }

/* course / topic page */
.course-head { display: grid; grid-template-columns: 360px 1fr; gap: 30px; align-items: center; }
.course-head h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.3; }
.course-head p { color: var(--soft); font-size: 14px; line-height: 1.6; margin: 12px 0 0; }
.course-meta { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 16px; }
.chapters { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.chapter {
  display: grid; grid-template-columns: 56px 1fr 120px 150px; align-items: center; gap: 16px;
  background: var(--card); border-radius: 16px; padding: 16px 22px; transition: background 0.16s ease-out;
}
.chapter:hover { background: var(--card-2); }
.chapter .no { font-size: 20px; font-weight: 700; color: var(--dim); }
.chapter .nm { font-size: 15px; font-weight: 650; }
.chapter .ds { font-size: 12px; color: var(--muted); margin-top: 4px; }
.chapter .pc { font-size: 13px; color: var(--soft); text-align: right; }
.chapter .act { justify-self: end; }
.chapter.locked { opacity: 0.55; }
.chapter.locked .act { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chapter.dialog .no { color: var(--accent); }
.back-link { display: inline-flex; align-items: center; gap: 10px; color: var(--soft); font-size: 15px; margin-bottom: 24px; }
.back-link:hover { color: #fff; }

.list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.li { display: flex; align-items: center; gap: 16px; background: var(--card); border-radius: 14px; padding: 16px 20px; font-size: 14px; }
.li .s { margin-left: auto; color: var(--bad); font-size: 13px; font-weight: 700; }
.ptag { font-size: 12px; font-weight: 700; color: var(--pill-ink); background: var(--pill-bg); border-radius: 6px; padding: 3px 9px; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { background: var(--card); border-radius: 10px; padding: 7px 12px; font-size: 14px; }
.chip b { color: var(--accent); font-weight: 700; }
.chip .x { color: var(--dim); margin: 0 6px; }
.empty { color: var(--muted); padding: 34px; text-align: center; background: var(--card); border-radius: 16px; font-size: 14px; }

/* ---------- practice ---------- */
.prac { height: 100vh; display: flex; flex-direction: column; animation: practice-entry-in 0.28s var(--ease-out); }
@keyframes practice-entry-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; padding: 10px 43px; }
.p-back { justify-self: start; display: inline-flex; align-items: center; gap: 12px; color: var(--soft); font-size: 15px; transition: color 0.16s ease-out; }
.p-back:hover { color: #fff; }
.p-title { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--soft); }
.count-pill { font-size: 12px; color: var(--pill-ink); background: var(--pill-bg); border-radius: 9999px; padding: 5px 10px; font-variant-numeric: tabular-nums; }
.p-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--soft); transition: background 0.16s ease-out, color 0.16s ease-out; }
.icon-btn:hover { background: #262932; color: #fff; }
.icon-btn.ring-b { border: 0.8px solid var(--line); }
.lang-pill { font-size: 11px; font-weight: 650; color: var(--pill-ink); background: var(--pill-bg); border: 0.8px solid var(--accent); border-radius: 999px; padding: 9px 13px; display: inline-flex; align-items: center; gap: 7px; }

.progress { margin: 0 43px; height: 18px; border-radius: 999px; padding: 2px; background: linear-gradient(#232430, #353443); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.33); }
.progress-well { height: 14px; border-radius: 999px; position: relative; overflow: hidden; }
.progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; min-width: 14px; overflow: hidden;
  background: linear-gradient(90deg, #9478ec, #c5a6f4); box-shadow: inset 0 1px 0 #c5afff;
  transition: width 0.55s var(--ease-out);
}
.sparks { position: absolute; inset: -2px -14px; background-repeat: repeat-x; background-size: 120px 14px; }
.sparks.a {
  background-image:
    radial-gradient(circle at 18px 6px, rgba(255, 246, 255, 0.92) 0, rgba(255, 246, 255, 0.92) 1.5px, transparent 2px),
    radial-gradient(circle at 77px 11px, rgba(255, 246, 255, 0.8) 0, rgba(255, 246, 255, 0.8) 1.2px, transparent 1.7px),
    radial-gradient(circle at 101px 4px, rgba(255, 246, 255, 0.7) 0, rgba(255, 246, 255, 0.7) 1px, transparent 1.5px);
  animation: progress-drift 4.8s ease-in-out infinite alternate;
}
.sparks.b {
  background-size: 160px 14px;
  background-image:
    radial-gradient(circle at 40px 9px, rgba(255, 246, 255, 0.85) 0, rgba(255, 246, 255, 0.85) 1.3px, transparent 1.8px),
    radial-gradient(circle at 128px 5px, rgba(255, 246, 255, 0.75) 0, rgba(255, 246, 255, 0.75) 1px, transparent 1.5px);
  animation: progress-drift-back 6.4s ease-in-out infinite alternate;
}
@keyframes progress-drift { from { opacity: 0.55; transform: translate(-12px, -1px); } to { opacity: 0.85; transform: translate(12px, 1px); } }
@keyframes progress-drift-back { from { opacity: 0.4; transform: translate(12px, 1px); } to { opacity: 0.75; transform: translate(-12px, -1px); } }

.p-meta { display: flex; align-items: center; justify-content: space-between; padding: 12px 43px 0; }
.toolbar { display: flex; gap: 2px; background: #25272f; border-radius: 14px; padding: 3px; }
.toolbar button { width: 34px; height: 32px; border-radius: 11px; display: grid; place-items: center; color: var(--soft); transition: 0.16s ease-out; }
.toolbar button:hover { background: #32353f; color: #fff; }
.toolbar button.on { color: var(--accent); }
.session { display: flex; align-items: center; gap: 30px; font-size: 12px; color: var(--muted); }
.session span { display: inline-flex; align-items: center; gap: 7px; }
.session b { font-size: 17px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; display: inline-block; }
.session .score b { color: var(--score); }
.session .lvl { color: var(--pill-ink); }
.tick { animation: score-tick 0.32s var(--ease-out); }
.impact { animation: combo-impact 0.42s var(--ease-out); }
.combo-hot b { color: var(--warn); }
@keyframes score-tick { from { opacity: 0.5; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes combo-impact { 0% { opacity: 0.4; transform: scale(0.85); } 60% { opacity: 1; transform: scale(1.025); } 100% { transform: scale(1); } }

.stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 43px; min-height: 0; }
.question { animation: practice-entry-in 0.3s var(--ease-out); }
.q-text { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.35; max-width: 980px; }
.q-inst { font-size: 13px; font-weight: 450; color: var(--muted); margin-top: 14px; }
.why { display: inline-block; font-size: 11px; font-weight: 700; color: var(--warn); background: rgba(237, 172, 84, 0.12); border-radius: 999px; padding: 3px 10px; margin-bottom: 14px; }
.hints { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; min-height: 30px; }
.hint { font-size: 13px; color: var(--soft); background: #22242c; border: 0.8px solid #353945; border-radius: 9px; padding: 5px 11px; animation: select-arrive 0.3s var(--ease-out) backwards; }
.hint b { color: var(--pill-ink); font-weight: 700; }
.hint .eq { color: var(--dim); margin: 0 6px; }
@keyframes select-arrive { from { opacity: 0.6; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.explain {
  margin: 14px auto 0; max-width: 680px; background: #1d1f26; border: 0.8px solid #30343f; border-radius: 16px;
  padding: 14px 18px; text-align: left; font-size: 14px; line-height: 1.6; color: var(--soft); animation: answer-arrive2 0.3s var(--ease-out);
}
.explain .ans { font-size: 20px; font-weight: 650; color: #fff; margin-bottom: 4px; }
.explain .ans .x { color: var(--bad); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.explain .note + .note { margin-top: 6px; }
@keyframes answer-arrive2 { from { opacity: 0.75; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* sentence breakdown after a correct answer */
.answer-vocabulary { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 20px; padding: 16px 8px 12px; margin-top: 30px; }
.syntax-group {
  position: relative; border: 1.6px solid var(--gb, #6b7384); border-radius: 28px; padding: 24px 16px 14px;
  animation: review-words 0.34s var(--ease-out) backwards;
}
.syntax-group.plain { border-color: transparent; padding-top: 14px; }
.syntax-label {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 11px; font-weight: 600; color: #fff; background: var(--gl, #4a5160); border-radius: 9999px; padding: 1px 9px; line-height: 18px;
}
.syntax-words { display: flex; gap: 22px; align-items: flex-end; }
.pw { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pw small { font-size: 13px; font-weight: 400; color: #b4bdcb; min-height: 19px; }
.pw strong { font-size: 36px; font-weight: 600; line-height: 1.3; padding: 0 3px 10px; border-bottom: 2.4px solid var(--pc, #a0adbf); }
.pw .pos { font-size: 11px; font-weight: 400; color: #b4bdcb; }
.pw .az { font-size: 12px; color: var(--pill-ink); }
@keyframes review-words { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
.vocab-actions { display: flex; justify-content: center; gap: 22px; margin-top: 18px; }
.vocab-actions button { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--text); }
.vocab-actions button:hover { color: var(--accent); }

.keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; }
.keys button { min-width: 34px; height: 34px; border-radius: 8px; background: #22242c; border: 0.8px solid #353945; font-size: 15px; color: var(--soft); transition: 0.14s ease-out; }
.keys button:hover { border-color: var(--accent); color: #fff; }

.kbds { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
kbd {
  font-family: inherit; font-size: 10px; height: 22px; min-width: 22px; padding: 0 4px; display: inline-grid; place-items: center;
  background: #343b48; border: 0.8px solid #687588; border-radius: 6px; color: #c4cedd; box-shadow: 0 1px 0 #101218;
}
.prac-hint { font-size: 13px; color: var(--muted); text-align: center; padding-bottom: 6px; }

/* ---------- dialog ---------- */
.chat { width: 100%; max-width: 780px; margin: 0 auto; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 24px 6px; }
.msg { max-width: 78%; padding: 16px 20px; border-radius: 22px; font-size: 21px; font-weight: 600; line-height: 1.4; animation: answer-arrive2 0.3s var(--ease-out); }
.msg.bot { background: var(--card); align-self: flex-start; border-top-left-radius: 8px; }
.msg.me { background: var(--pill-bg); color: #fff; align-self: flex-end; border-top-right-radius: 8px; }
.msg.me.bad { background: rgba(246, 154, 172, 0.14); }
.msg .az { font-size: 14px; font-weight: 500; color: var(--muted); margin-top: 8px; }
.msg .row { display: flex; gap: 16px; margin-top: 10px; }
.msg .row button { font-size: 12px; font-weight: 600; color: var(--dim); display: inline-flex; align-items: center; gap: 5px; }
.msg .row button:hover { color: var(--accent); }
.msg .fix { font-size: 14px; font-weight: 500; margin-top: 8px; color: var(--soft); }
.msg .fix b { color: var(--pill-ink); }
.typing-dots { display: inline-flex; gap: 5px; }
.typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: skeleton-breathe 1s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes skeleton-breathe { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.chat-input { width: 100%; max-width: 780px; margin: 0 auto; display: flex; gap: 14px; align-items: center; padding: 6px 6px 0; }
.chat-input input { flex: 1; background: transparent; border: 0; border-bottom: 1.6px solid var(--dim); font-size: 26px; font-weight: 500; padding: 8px 6px; outline: none; transition: border-color 0.14s ease-out; }
.chat-input input:focus { border-bottom: 2.4px solid var(--accent); }

/* ---------- summary ---------- */
.summary { max-width: 640px; text-align: center; animation: summary-arrive 0.4s var(--ease-out); }
@keyframes summary-arrive { from { opacity: 0.5; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
.summary h2 { font-size: 30px; font-weight: 700; margin: 0 0 8px; }
.sum-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.sum-grid .card { padding: 20px; }
.sum-grid .n { font-size: 28px; font-weight: 700; }
.sum-grid .l { font-size: 12px; color: var(--muted); margin-top: 6px; }
.level-up { display: inline-block; margin-top: 12px; color: var(--pill-ink); background: var(--pill-bg); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; animation: reward-level-up 0.6s var(--ease-out); }
@keyframes reward-level-up { 0% { transform: scale(0.94); } 45% { transform: scale(1.04); } 72% { transform: scale(0.995); } 100% { transform: scale(1); } }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(8, 9, 12, 0.62); display: grid; place-items: center; z-index: 20; animation: fade 0.18s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 540px; max-width: calc(100vw - 32px); background: var(--modal); border: 0.8px solid var(--line); border-radius: 28px; overflow: hidden; animation: modal-in 0.26s var(--ease-out); }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 26px 28px 8px; }
.modal-h h2 { margin: 0; font-size: 22px; font-weight: 600; }
.modal-b { padding: 14px 28px 24px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.modal-b .with-ico { display: flex; gap: 14px; }
.modal-b .with-ico svg { color: var(--accent); margin-top: 4px; }
.modal-f { display: flex; align-items: center; gap: 20px; padding: 22px 28px; border-top: 0.8px solid var(--line); }
.set-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 0.8px solid #363a45; font-size: 14px; }
.set-row:last-child { border-bottom: 0; }
.switch { width: 44px; height: 26px; border-radius: 99px; background: #4a5060; position: relative; transition: background 0.18s ease-out; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #1d1f26; transition: transform 0.2s var(--ease-out); }
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(18px); }

.toast {
  position: fixed; left: 50%; top: 22px; transform: translate(-50%, -10px); z-index: 30;
  background: var(--modal); border: 0.8px solid var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  padding: 12px 20px; border-radius: 999px; opacity: 0; transition: 0.28s var(--ease-out); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }



/* fixes after review */
body:has(.prac) { overflow: hidden; }
.shortcut-button:focus-visible, .sentence-nav:focus-visible { outline: none; box-shadow: inset 0 0 0 1px #4a4f5d; }
.syntax-words { align-items: flex-start; }
.pw .pos, .pw .az { min-height: 16px; }
.brand-logo { width: 32px; height: 32px; display: block; }

.brand { gap: 0; cursor: pointer; text-align: left; transition: opacity 0.16s ease-out; }
.brand:hover { opacity: 0.85; }

/* ---------- Easy Vocabulary-style practice ---------- */
.prac .stage { justify-content: flex-start; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px 28px; }
.q-wrap { width: 100%; max-width: 820px; margin: auto 0; padding-top: 18px; display: flex; flex-direction: column; align-items: center; }
.ev-top { display: flex; align-items: center; gap: 16px; width: 100%; max-width: 980px; margin: 0 auto; padding: 16px 24px 0; }
.ev-top .progress { flex: 1; margin: 0; }
.round-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--soft); background: var(--card); border: 1px solid var(--line-soft); transition: background 0.16s ease-out, color 0.16s ease-out; }
.round-btn:hover { background: var(--card-2); color: #fff; }
.prac .p-meta { width: 100%; max-width: 980px; margin: 0 auto; padding: 12px 24px 0; gap: 12px; }
.p-topic { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; color: var(--soft); }
.p-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-topic .lang-pill { padding: 4px 10px; }
.prac .session { gap: 22px; }

.q-top { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.q-top .why { margin: 0; }
.q-kind { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.question.is-word .q-kind { color: var(--accent); }
.step-dots { display: inline-flex; gap: 5px; }
.step-dots i { width: 16px; height: 5px; border-radius: 9px; background: #3a3e4a; transition: background 0.2s ease-out, width 0.2s ease-out; }
.step-dots i.done { background: var(--good); }
.step-dots i.on { background: var(--accent); width: 26px; }
.question .q-text { font-size: clamp(24px, 4.2vw, 34px); font-weight: 700; }
.question.is-word .q-text { font-size: clamp(28px, 5vw, 40px); }
.learned { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 12px; }
.learned b { font-size: clamp(22px, 3.4vw, 28px); font-weight: 700; color: var(--good); }
.learned span { color: var(--dim); }
.question .hints { min-height: 0; margin-top: 12px; }
.question .hints:empty { display: none; }
.question .q-inst { margin-top: 12px; }

/* answer field: a card with one dash per letter */
.field {
  --cell: 34px; position: relative; width: 100%; margin-top: 26px; min-height: 84px; padding: 16px 18px;
  display: flex; align-items: center; justify-content: center; cursor: text;
  background: var(--card); border: 2px solid var(--line-soft); border-radius: 18px;
  transition: border-color 0.15s ease-out, background-color 0.15s ease-out;
}
.field.big { max-width: 560px; min-height: 96px; }
.field:focus-within { border-color: var(--accent); }
.field.solved { border-color: rgba(73, 200, 139, 0.75); background: rgba(73, 200, 139, 0.08); }
.field.revealed { border-color: rgba(246, 154, 172, 0.6); background: rgba(246, 154, 172, 0.06); }
.field.shake { animation: field-shake 0.32s ease-out; }
@keyframes field-shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.field .ghost {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0;
  font-size: 16px; color: transparent; background: transparent; caret-color: transparent; cursor: text; outline: none;
}
.letters { display: flex; flex-wrap: wrap; justify-content: center; row-gap: calc(var(--cell) * 0.32); pointer-events: none; user-select: none; }
.grp { display: flex; }
.cl {
  position: relative; width: calc(var(--cell) * 0.74); height: calc(var(--cell) * 1.22); display: grid; place-items: center;
  font-size: calc(var(--cell) * 0.8); font-weight: 600; line-height: 1; color: var(--text);
}
.cl::after { content: ''; position: absolute; left: 11%; right: 11%; bottom: 0; height: 3px; border-radius: 3px; background: #4b5365; transition: background 0.12s ease-out; }
.cl > span { opacity: 0; transition: opacity 0.12s ease-out; }
.cl.on > span, .cl.fx > span, .cl.given > span { opacity: 1; }
.cl.on::after { background: #6b7487; }
.cl.pop > span { animation: tw-pop 0.2s ease-out; }
@keyframes tw-pop { 0% { transform: scale(0.6); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
.cl.hint > span { opacity: 0.22; }
.cl.now::after { background: var(--accent); }
.field:focus-within .cl.now::after { animation: bn-blink 1.05s steps(1) infinite; }
@keyframes bn-blink { 50% { opacity: 0.25; } }
.cl.fx { width: calc(var(--cell) * 0.42); }
.cl.fx::after, .cl.given::after { display: none; }
.cl.given { color: var(--muted); }
.cl.sp { width: calc(var(--cell) * 0.5); }
.cl.sp::after { display: none; }
.cl.sp.now::after { display: block; left: 18%; right: 18%; height: max(5px, calc(var(--cell) * 0.16)); background: var(--accent); }
.cl.warn { color: var(--warn); }
.cl.warn::after { background: var(--warn); }
.cl.bad > span { opacity: 1; color: var(--bad); animation: bad-letter 0.55s ease-out forwards; }
.cl.bad::after { background: var(--bad) !important; animation: none !important; }
@keyframes bad-letter { 0% { opacity: 1; transform: translateY(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
.field.solved .cl, .field.solved .cl.given { color: var(--good); }
.field.solved .cl::after { background: rgba(73, 200, 139, 0.6); }
.field.solved .cl.warn { color: var(--warn); }
.field.revealed .cl.shown { color: var(--bad); }
.field.revealed .cl::after { background: rgba(246, 154, 172, 0.45); }

.tools { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.eye { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 99px; font-size: 14px; font-weight: 650; color: var(--accent); border: 1.5px solid var(--accent); background: transparent; transition: background 0.15s ease-out; }
.eye:hover, .eye.on { background: rgba(168, 138, 244, 0.12); }
.sq-btn { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; color: var(--accent); background: rgba(168, 138, 244, 0.12); transition: transform 0.08s ease-out; }
.sq-btn:active { transform: scale(0.96); }
.star-btn { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--muted); border: 2px solid var(--line); transition: color 0.14s, border-color 0.14s, background 0.14s; }
.star-btn:hover { color: #fff; }
.star-btn.on { color: var(--warn); border-color: var(--warn); background: rgba(237, 172, 84, 0.14); }
.star-btn.on svg { fill: currentColor; }
.star-mini { color: var(--warn); display: inline-grid; }
.star-mini svg { fill: currentColor; }
.prac .keys { margin-top: 16px; }
#info:empty, #answerArea:empty { display: none; }
#info { width: 100%; }
.prac .explain { margin-top: 18px; }

/* footer: Continue, green when right, red when given up */
.ev-foot { flex: none; border-top: 2px solid var(--line-soft); background: var(--bg); padding: 16px 24px calc(16px + env(safe-area-inset-bottom)); transition: background-color 0.2s ease-out, border-color 0.2s ease-out; }
.ev-foot.good { background: rgba(73, 200, 139, 0.1); border-top-color: transparent; }
.ev-foot.bad { background: rgba(246, 154, 172, 0.09); border-top-color: transparent; }
.foot-in { max-width: 880px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.foot-msg { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fm-ico { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.good .fm-ico { background: rgba(73, 200, 139, 0.18); color: var(--good); animation: reward-level-up 0.5s var(--ease-out); }
.bad .fm-ico { background: rgba(246, 154, 172, 0.16); color: var(--bad); }
.fm-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fm-t b { font-size: 18px; font-weight: 750; }
.good .fm-t b { color: var(--good); }
.bad .fm-t b { color: var(--bad); }
.fm-t small { font-size: 14px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; }
.fm-keys { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.fm-keys span { color: var(--dim); }
.foot-acts { display: flex; align-items: center; gap: 12px; flex: none; }
.btn-skip { font-size: 14px; font-weight: 650; color: var(--muted); padding: 12px 10px; border-radius: 12px; }
.btn-skip:hover { color: #fff; }
.btn-go {
  min-width: 170px; padding: 15px 28px; border-radius: 14px; font-size: 16px; font-weight: 700;
  background: var(--primary); color: var(--primary-ink); transition: transform 0.08s ease-out, background-color 0.15s ease-out, opacity 0.2s;
}
.btn-go:active:not(:disabled) { transform: scale(0.98); }
.btn-go:disabled { opacity: 0.35; cursor: not-allowed; }
.good .btn-go { background: var(--good); color: #0d2a1c; }
.btn-go:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* round summary */
.prac .sum-stage { justify-content: center; }
.summary { margin: auto 0; width: 100%; }
.sum-badge { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: rgba(73, 200, 139, 0.16); color: var(--good); animation: reward-level-up 0.6s var(--ease-out); }
.sum-line { font-size: 17px; color: var(--soft); margin: 4px 0 6px; }
.sum-line b { color: var(--text); font-size: 20px; }
.sum-sub { font-size: 13px; }
.sum-h { margin: 28px 0 12px; font-size: 12px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.new-words { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; text-align: left; }
.new-words li { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 12px 14px; cursor: pointer; transition: background 0.15s ease-out; }
.new-words li:hover { background: var(--card-2); }
.new-words b { font-size: 16px; }
.new-words span { flex: 1; font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.new-words svg { color: var(--accent); }
.sum-acts { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 30px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
.pc-m { display: none; }
@media (hover: none) { .kb-help { visibility: hidden; } .practice-actions .kbds { display: none; } }

@media (max-width: 1100px) {
  .main { padding: 28px 28px 60px; }
  .home-grid { grid-template-columns: 1fr 250px; }
  .continue { grid-template-columns: 260px 1fr; gap: 22px; }
  .course-head { grid-template-columns: 300px 1fr; }
}

@media (max-width: 900px) {
  /* app shell: top bar + bottom tab bar */
  .shell { grid-template-columns: 1fr; }
  .side {
    position: sticky; top: 0; z-index: 15; height: auto; overflow: visible;
    flex-direction: row; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid #262833;
    padding-top: max(12px, env(safe-area-inset-top));
  }
  .brand { padding: 0; font-size: 20px; }
  .side-foot { margin: 0; padding: 0; display: flex; align-items: center; gap: 14px; }
  .who { padding: 0; }
  .who-name { display: none; }
  .lang-select select { padding: 7px 30px 7px 12px; font-size: 12px; }
  .lang-pick { margin: 0 0 0 auto; padding-right: 12px; }
  .lang-pick .nav-label { display: none; }
  .lang-pick .lang-select select { padding-left: 32px; }
  .lang-pick .lang-select svg:first-child { left: 11px; }
  .ai-state { display: none; }
  .side-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
    background: rgba(27, 29, 37, 0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #2a2d38; padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  }
  .side-nav .nav-label { display: none; }
  .side-nav .nav { flex-direction: column; justify-content: center; gap: 3px; height: 54px; padding: 4px; font-size: 11px; font-weight: 600; position: relative; border-radius: 12px; }
  .side-nav .nav .count { position: absolute; top: 4px; left: calc(50% + 8px); margin: 0; font-size: 10px; padding: 1px 6px; background: var(--pill-bg); color: var(--pill-ink); }
  .main { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }

  .hello h1 { font-size: 26px; }
  .hello p { font-size: 14px; }
  .date { display: none; }
  .hello > .btn-primary { flex: none; }
  .home-grid, .continue, .course-head { grid-template-columns: 1fr; }
  .home-grid { gap: 16px; margin-top: 20px; }
  .card { padding: 20px; border-radius: 20px; }
  .continue { gap: 18px; margin-top: 16px; }
  .cover { aspect-ratio: 16 / 7.5; }
  .continue h2 { font-size: 22px; }
  .mini-prog { margin-top: 18px; }
  .review { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; margin-top: 16px; }
  .review .ico { width: 44px; height: 44px; }
  .review h3 { font-size: 17px; }
  .review p { font-size: 13px; }
  .review .go { grid-column: 1 / -1; margin: 0; }
  .review .go .btn-line { width: 100%; justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 22px; margin-top: 24px; padding-bottom: 24px; }
  .stat { padding: 0 14px; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat .n { font-size: 20px; margin-top: 10px; }
  .sec-h { margin: 26px 0 14px; }
  .topics { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

  .course-head h1 { font-size: 23px; }
  .chapter { grid-template-columns: 34px 1fr auto; gap: 12px; padding: 14px 16px; }
  .chapter .no { font-size: 16px; }
  .chapter .nm { font-size: 14px; }
  .chapter .pc { display: none; }
  .pc-m { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--pill-ink); background: var(--pill-bg); border-radius: 6px; padding: 1px 6px; vertical-align: 1px; }
  .chapter .act .btn-line, .chapter .act .btn-primary { padding: 9px 14px; font-size: 12px; }
  .chapter.locked .act { font-size: 12px; }
  .li { flex-wrap: wrap; gap: 8px 12px; padding: 14px 16px; }

  /* practice */
  .prac { height: 100vh; height: 100dvh; }
  .topbar { height: 56px; padding: 8px 12px; grid-template-columns: auto 1fr auto; gap: 8px; }
  .p-back span { display: none; }
  .p-title { justify-content: center; font-size: 12px; min-width: 0; }
  .p-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lang-pill { display: none; }
  .icon-btn { width: 40px; height: 40px; }
  .progress { margin: 0 14px; height: 14px; }
  .progress-well { height: 10px; }
  .p-meta { padding: 10px 14px 0; }
  .toolbar button { width: 32px; height: 30px; }
  .session { gap: 14px; }
  .session .lbl { display: none; }
  .session b { font-size: 15px; }
  .q-inst { font-size: 12px; }
  .hints { margin-top: 14px; }
  .hint { font-size: 12px; padding: 4px 9px; }
  .explain { font-size: 13px; padding: 12px 14px; }
  .explain .ans { font-size: 17px; }
  .keys { gap: 5px; margin-top: 14px; }
  .keys button { min-width: 32px; height: 34px; font-size: 14px; }
  .answer-vocabulary { gap: 14px; margin-top: 20px; padding: 14px 0 8px; }
  .syntax-group { padding: 20px 10px 10px; border-radius: 20px; }
  .syntax-words { gap: 12px; }
  .pw strong { font-size: 24px; padding-bottom: 7px; }
  .pw small { font-size: 11px; }
  .vocab-actions button { font-size: 13px; }

  /* dialog */
  .chat { padding: 16px 14px; gap: 12px; }
  .msg { font-size: 17px; padding: 12px 16px; max-width: 86%; border-radius: 18px; }
  .msg .row { gap: 12px; flex-wrap: wrap; }
  .chat-input { padding: 6px 14px 0; gap: 10px; }
  .chat-input input { font-size: 19px; min-width: 0; }
  .chat-input .btn-primary { padding: 12px 16px; }
  .prac-hint { display: none; }

  /* summary + modal */
  .summary { padding: 0 4px; }
  .summary h2 { font-size: 25px; }
  .sum-grid { gap: 10px; }
  .sum-grid .card { padding: 14px 10px; }
  .sum-grid .n { font-size: 22px; }
  .modal { border-radius: 22px; }
  .modal-h { padding: 20px 20px 4px; }
  .modal-b { padding: 12px 20px 18px; font-size: 15px; }
  .modal-f { padding: 16px 20px; flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .topics { grid-template-columns: 1fr; }
  .cover .ct { font-size: 19px; }
  .cover .big { font-size: 48px; }
  .lang-select select { padding: 7px 28px 7px 10px; }
  .chapter .ds { display: none; }
}

/* practice on small screens */
@media (max-width: 700px) {
  .ev-top { padding: 10px 12px 0; gap: 10px; }
  .round-btn { width: 40px; height: 40px; }
  .ev-top .progress { height: 14px; }
  .ev-top .progress-well { height: 10px; }
  .prac .p-meta { padding: 10px 14px 0; }
  .p-topic .lang-pill, .p-topic .p-name { display: none; }
  .prac .session { gap: 14px; }
  .prac .session .lbl { display: none; }
  .prac .session b { font-size: 15px; }
  .prac .stage { padding: 0 14px 18px; }
  .q-wrap { padding-top: 10px; }
  .field { margin-top: 20px; padding: 12px 10px; min-height: 70px; border-radius: 16px; }
  .field.big { min-height: 84px; }
  .tools { margin-top: 16px; gap: 8px; }
  .eye { height: 44px; padding: 0 14px; font-size: 13px; }
  .sq-btn { width: 46px; height: 46px; }
  .star-btn { width: 44px; height: 44px; }
  .ev-foot { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .foot-in { gap: 10px; }
  .foot-msg:has(.fm-keys) { display: none; }
  .foot-msg:has(.fm-keys) + .foot-acts { flex: 1; justify-content: space-between; }
  .fm-ico { width: 38px; height: 38px; }
  .fm-t b { font-size: 16px; }
  .fm-t small { font-size: 13px; white-space: nowrap; }
  .btn-go { min-width: 0; padding: 14px 22px; }
  .foot-msg:has(.fm-keys) + .foot-acts .btn-go { flex: 1; max-width: 240px; }
  .new-words { grid-template-columns: 1fr; }
}
@media (max-height: 560px) and (max-width: 1000px) {
  .q-wrap { padding-top: 6px; }
  .question .q-text { font-size: 22px; }
  .field { margin-top: 12px; }
}

/* simple progress bar (Easy Vocabulary style) */
.ev-bar { flex: 1; height: 14px; border-radius: 999px; overflow: hidden; background: var(--card); border: 1px solid var(--line-soft); }
.ev-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--primary); transition: width 0.45s cubic-bezier(0.3, 1.4, 0.5, 1); }
.prac .q-wrap { padding-top: 24px; }
.question .q-text { line-height: 1.3; }

/* no box around the letters: only the dashes */
.field, .field.big, .field:focus-within, .field.solved, .field.revealed { background: transparent; border: 0; border-radius: 0; padding-left: 0; padding-right: 0; min-height: 0; }

/* real-life situation above a generated sentence */
.scene-tag { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px; padding: 6px 12px; border-radius: 99px; background: var(--pill-bg); color: var(--pill-ink); font-size: 13px; font-weight: 600; }
.scene-tag span { color: var(--muted); font-weight: 500; }
.who-tag { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: none; }
.sum-badge.wait { background: rgba(168, 138, 244, 0.16); color: var(--accent); }
.prev-line { margin-top: 10px; font-size: 15px; color: var(--muted); }
.prev-line b { color: var(--accent); font-weight: 700; }
/* dialog question inside the typing practice */
.q-ask { cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.q-say { color: var(--accent); display: inline-grid; }
.q-az { margin-top: 8px; font-size: 16px; color: var(--muted); }
.q-ans { margin-top: 10px; font-size: 14px; color: var(--soft); }
.q-ans b { color: var(--pill-ink); font-weight: 600; }
.q-gloss { margin-top: 6px; font-size: 13px; color: var(--muted); max-width: 640px; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* ---------- core vocabulary (chunks) ---------- */
.s-strong { background: var(--good); }
.s-known { background: var(--accent); }
.s-learning { background: var(--warn); }
.s-new { background: #3a3d48; }
.ckbar { display: flex; height: 10px; border-radius: 99px; background: #3a3d48; overflow: hidden; margin-top: 14px; }
.ckbar i { display: block; height: 100%; transition: width 0.5s var(--ease-out); }
.cklegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.cklegend span { display: inline-flex; align-items: center; gap: 6px; }
.cklegend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.ck-big { font-size: 15px; color: var(--soft); }
.ck-big b { font-size: 22px; color: var(--text); font-weight: 700; }
.ck-home { margin-top: 26px; }
.ck-home-b { margin-top: 14px; }
.ck-home-act { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; font-size: 13px; }
.ck-home-act b { color: var(--warn); }
.ck-top { margin-top: 26px; }
.ck-add { display: flex; gap: 10px; margin-top: 18px; }
.ck-add input { flex: 1; min-width: 0; background: var(--card); border: 0.8px solid var(--line-soft); border-radius: 14px; padding: 12px 16px; font-size: 14px; outline: none; }
.ck-add input:focus { border-color: var(--accent); }
.ck-add input:disabled { opacity: 0.5; }
.ck-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.ck-filter button { padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--soft); background: var(--card); }
.ck-filter button.on { background: var(--pill-bg); color: var(--pill-ink); }
.ck-bandaz { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.ck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ck-tile { text-align: left; display: flex; flex-direction: column; gap: 4px; background: var(--card); border-radius: 14px; padding: 13px 15px; border-left: 3px solid #3a3d48; transition: background 0.15s ease-out; }
.ck-tile:hover { background: var(--card-2); }
.ck-tile b { font-size: 15px; font-weight: 700; }
.ck-tile span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.ck-tile em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--dim); margin-top: 2px; }
.ck-tile.st-learning { border-left-color: var(--warn); }
.ck-tile.st-known { border-left-color: var(--accent); }
.ck-tile.st-strong { border-left-color: var(--good); }
.st { font-style: normal; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; white-space: nowrap; background: #3a3d48; color: var(--soft); }
.st.st-learning { background: rgba(237, 172, 84, 0.16); color: var(--warn); }
.st.st-known { background: var(--pill-bg); color: var(--pill-ink); }
.st.st-strong { background: rgba(73, 200, 139, 0.16); color: var(--good); }
.ck-modal { max-height: 62vh; overflow-y: auto; padding-right: 4px; }
.ck-head { display: flex; align-items: center; gap: 14px; }
.ck-head > div { flex: 1; min-width: 0; }
.ck-c { font-size: 24px; font-weight: 700; }
.ck-meta { font-size: 12.5px; margin-top: 10px; }
.ck-note { font-size: 14px; color: var(--soft); line-height: 1.5; margin: 14px 0 0; }
.ck-modal h4 { margin: 20px 0 10px; font-size: 12px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ck-forms { display: flex; flex-wrap: wrap; gap: 8px; }
.ck-forms button { display: inline-flex; align-items: baseline; gap: 8px; background: var(--card-2); border-radius: 10px; padding: 8px 12px; font-size: 14px; text-align: left; }
.ck-forms b { color: var(--pill-ink); }
.ck-forms span { color: var(--soft); font-size: 13px; }
.ck-forms i { font-style: normal; font-size: 11px; color: var(--dim); }
.ck-exs { display: flex; flex-direction: column; gap: 8px; }
.ck-exs button { display: grid; grid-template-columns: 120px 1fr; gap: 2px 12px; text-align: left; background: var(--card-2); border-radius: 12px; padding: 10px 14px; }
.ck-exs .ck-sit { grid-row: span 2; font-size: 12px; color: var(--warn); font-weight: 600; }
.ck-exs b { font-size: 15px; }
.ck-exs .muted { font-size: 13px; }
.ck-panel { max-width: 640px; margin: 18px auto 0; text-align: center; }
.ck-panel p { color: var(--soft); font-size: 14px; line-height: 1.5; margin: 0 0 12px; }
.ck-panel .ck-forms { justify-content: center; }
.ck-sum { text-align: left; background: var(--card); border-radius: 16px; padding: 18px 20px; }
.ck-next { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.ck-moved li { flex-wrap: wrap; }
.ck-moved em { flex-basis: 100%; }
.ck-tile.soon { opacity: 0.55; }

/* ---------- learning loop: weak, mixed prompts, cloze, street timer, story ---------- */
.s-weak { background: var(--bad); }
.ck-tile.st-weak { border-left-color: var(--bad); }
.st.st-weak { background: rgba(246, 154, 172, 0.14); color: var(--bad); }
.weak-n { color: var(--bad) !important; }
.skw { color: var(--pill-ink); background: var(--pill-bg); border-radius: 8px; padding: 0 6px; font-weight: 700; }
.az-btn { margin-top: 10px; font-size: 13px; font-weight: 650; color: var(--muted); border: 0.8px solid var(--line); border-radius: 99px; padding: 6px 14px; }
.az-btn:hover { color: #fff; border-color: var(--accent); }
.q-intent { margin-top: 14px; font-size: 15px; color: var(--soft); }
.q-intent b { color: var(--text); font-weight: 650; }
.cloze-hint { font-size: clamp(22px, 3.6vw, 30px); font-weight: 700; color: var(--pill-ink); }
.field.cloze .cl.given { color: var(--soft); }
.timer { width: 260px; max-width: 70%; height: 6px; margin: 14px auto 0; border-radius: 99px; background: #3a3d48; overflow: hidden; }
.timer i { display: block; height: 100%; width: 100%; background: var(--warn); transform-origin: left; animation-name: timer-run; animation-timing-function: linear; animation-fill-mode: forwards; }
.timer.over i { background: var(--bad); }
@keyframes timer-run { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.eye .cost { font-style: normal; font-size: 11px; color: var(--dim); margin-left: 4px; }
.ev-foot.good.meh { background: rgba(237, 172, 84, 0.1); }
.ev-foot.good.meh .fm-ico { color: var(--warn); }
.story-next { display: flex; gap: 22px; align-items: center; margin-top: 24px; }
.story-next .ico { width: 48px; height: 48px; border-radius: 12px; background: var(--pill-bg); color: var(--pill-ink); display: grid; place-items: center; flex: none; }
.story-next .k { font-size: 12px; color: var(--muted); }
.story-next h3 { margin: 6px 0 4px; font-size: 19px; font-weight: 700; }
.story-next h3 span, .episode .nm span { color: var(--muted); font-weight: 500; }
.story-next p { margin: 0; color: var(--soft); font-size: 14px; line-height: 1.5; }
.story-next .go { margin-left: auto; flex: none; }
.episodes { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.episode { display: grid; grid-template-columns: 48px 1fr auto; gap: 18px; align-items: center; background: var(--card); border-radius: 16px; padding: 18px 22px; }
.episode .no { font-size: 20px; font-weight: 700; color: var(--accent); }
.episode.locked .no { color: var(--dim); }
.episode .nm { font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.episode .ds { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.episode .chips { margin-top: 8px; }
.chip[data-ck] { cursor: pointer; }
@media (max-width: 700px) { .story-next { flex-wrap: wrap; } .story-next .go { margin-left: 0; } .episode { grid-template-columns: 36px 1fr; } .episode .act { grid-column: 2; } }

/* unknown words as hints; blurred when the sentence comes back */
button.hint { cursor: default; }
.hint.blur { filter: blur(5px); cursor: pointer; user-select: none; transition: filter 0.2s ease-out; }
.hint.blur:hover { filter: blur(4px); }
.hint-note { font-size: 12px; color: var(--dim); margin-top: 8px; }

/* ---------- side chat (Claude) ---------- */
body.chat-open #app { margin-right: 380px; }
#chat {
  position: fixed; top: 0; right: 0; bottom: 0; width: 380px; z-index: 18;
  background: var(--side); border-left: 1px solid var(--line-soft);
  display: none; flex-direction: column;
}
body.chat-open #chat { display: flex; }
body.chat-open #chatFab { display: none; }
#chatFab {
  position: fixed; right: 22px; bottom: 22px; z-index: 17;
  display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px;
  background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 14px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}
#chatFab:hover { filter: brightness(1.06); }
.chat-top { display: flex; align-items: center; gap: 6px; padding: 16px 14px 14px 18px; border-bottom: 1px solid var(--line-soft); }
.chat-title { flex: 1; display: flex; align-items: center; gap: 9px; font-weight: 700; }
.chat-title small { color: var(--dim); font-weight: 500; font-size: 12px; }
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.chat-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }
.chat-ico:hover { background: var(--nav-on); color: var(--text); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { color: var(--muted); font-size: 14px; line-height: 1.55; padding: 6px 2px; }
.msg { font-size: 14.5px; line-height: 1.55; padding: 10px 13px; border-radius: 14px; max-width: 92%; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--pill-bg); color: var(--pill-ink); border-bottom-right-radius: 5px; }
.msg.assistant { align-self: flex-start; background: var(--card); color: var(--text-2); border-bottom-left-radius: 5px; }
.msg code { background: var(--card-2); padding: 1px 5px; border-radius: 5px; font-size: 13.5px; }
.msg b { color: var(--text); }
.msg .li { display: block; padding-left: 14px; position: relative; }
.msg .li::before { content: ''; position: absolute; left: 3px; top: 0.7em; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.chat-chips button { font-size: 12.5px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--soft); }
.chat-chips button:hover { border-color: var(--accent); color: var(--text); }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px 16px; border-top: 1px solid var(--line-soft); }
.chat-form textarea {
  flex: 1; resize: none; font: inherit; font-size: 14.5px; color: var(--text); background: var(--card);
  border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; max-height: 140px; outline: none;
}
.chat-form textarea:focus { border-color: var(--accent); }
.chat-send { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); flex: none; }
@media (max-width: 900px) {
  body.chat-open #app { margin-right: 0; }
  #chat { width: 100%; }
  #chatFab span { display: none; }
  #chatFab { bottom: 78px; padding: 12px; }
}

/* ---------- Claude account ---------- */
.set-sec { margin-top: 18px; padding-top: 16px; border-top: 0.8px solid #363a45; font-weight: 700; font-size: 14px; }
.set-sec small { color: var(--dim); font-weight: 500; margin-left: 6px; }
.acc { font-size: 14px; line-height: 1.5; padding-top: 10px; }
.acc-row { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.acc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); margin-top: 6px; flex: none; }
.acc-dot.on { background: var(--good); }
.acc-plan { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--pill-bg); color: var(--pill-ink); text-transform: capitalize; }
.acc-btns { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.acc .btn-primary, .acc .btn-ghost { font-size: 14px; padding: 9px 16px; }
.acc-msg { color: var(--muted); }
.acc-msg.bad { color: var(--bad); margin-bottom: 8px; }
.acc-steps { margin: 0 0 10px; padding-left: 20px; color: var(--text-2); }
.acc-steps a { color: var(--accent); text-decoration: underline; }
.acc-code { display: flex; gap: 8px; }
.acc-code input { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line-soft); border-radius: 10px; padding: 9px 12px; color: var(--text); outline: none; }
.acc-code input:focus { border-color: var(--accent); }
.acc-link { margin-top: 8px; color: var(--muted); font-size: 13px; text-decoration: underline; }
.chat-acc { padding: 4px 16px 14px; border-bottom: 1px solid var(--line-soft); }
.chat-dot.off { background: var(--dim); }

/* ---------- real-life situation ---------- */
.sit { max-width: 1240px; margin: 0 auto; padding: 22px 28px 28px; min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; }
.sit .ev-top { padding: 0 0 18px; max-width: none; }
.sit-count { font-size: 13px; color: var(--muted); min-width: 52px; text-align: right; }
.sit-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 26px; align-items: start; }
.sit-left { background: var(--card); border-radius: 22px; padding: 22px 22px 10px; max-height: calc(100vh - 110px); overflow-y: auto; position: sticky; top: 16px; box-sizing: border-box; }
.sit-title h2 { margin: 0 0 4px; font-size: 20px; }
.sit-title p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.sit-lines { list-style: none; margin: 0; padding: 0; counter-reset: ln; }
.sit-lines li { counter-increment: ln; position: relative; padding: 10px 10px 10px 36px; border-radius: 12px; display: flex; flex-direction: column; gap: 3px; line-height: 1.45; }
.sit-lines li::before { content: counter(ln); position: absolute; left: 10px; top: 11px; font-size: 12px; color: var(--dim); width: 18px; text-align: right; }
.sit-lines li.next .az { color: var(--dim); }
.sit-lines li.past .az { color: var(--muted); font-size: 14px; }
.sit-lines li.cur { background: var(--pill-bg); }
.sit-lines li.cur .az { color: var(--text); font-weight: 700; }
.sit-lines .who { font-size: 11.5px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.sit-lines .sk { font-size: 14.5px; font-weight: 700; }
.v-good .sk, .sit-lines .sk.v-good { color: var(--good); }
.sit-lines .sk.v-close { color: var(--warn); }
.sit-lines .sk.v-wrong { color: var(--bad); }
.sit-right { background: var(--card); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.sit-right .k { font-size: 12.5px; color: var(--muted); }
.sit-az { font-size: 26px; font-weight: 700; line-height: 1.35; color: var(--text); }
.sit-hints { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sit-hints .hint { font-size: 13.5px; padding: 5px 11px; border-radius: 999px; background: var(--card-2); color: var(--soft); }
.sit-hints .hint b { color: var(--text); }
.sit-hints small { color: var(--dim); font-size: 12px; }
#sitIn { width: 100%; box-sizing: border-box; resize: vertical; min-height: 92px; font: inherit; font-size: 20px; line-height: 1.45; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; outline: none; }
#sitIn:focus { border-color: var(--accent); }
#sitIn:disabled { opacity: 0.75; }
.sit-acts, .fb-acts { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
.sit-tip { font-size: 12.5px; text-align: right; }
.bad-t { color: var(--bad); font-size: 14px; }
.sit-fb { border-radius: 16px; padding: 16px 18px; background: var(--card-2); border-left: 4px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.sit-fb.v-good { border-left-color: var(--good); }
.sit-fb.v-close { border-left-color: var(--warn); }
.sit-fb.v-wrong { border-left-color: var(--bad); }
.fb-h { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.v-good .fb-h { color: var(--good); } .v-close .fb-h { color: var(--warn); } .v-wrong .fb-h { color: var(--bad); }
.fb-row { display: grid; grid-template-columns: 56px 1fr; gap: 10px; font-size: 16px; line-height: 1.45; }
.fb-row span { color: var(--dim); font-size: 12.5px; padding-top: 3px; }
.ok-t { color: var(--good); font-weight: 700; }
.fb-mis { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.fb-mis span { background: var(--bg); padding: 4px 10px; border-radius: 8px; }
.fb-mis s { color: var(--bad); }
.fb-mis b { color: var(--good); }
.fb-ex { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.sit-wait { grid-column: 1 / -1; text-align: center; max-width: 520px; margin: 12vh auto 0; color: var(--muted); line-height: 1.55; }
.sit-wait h3 { color: var(--text); margin: 18px 0 8px; font-size: 20px; }
.spin { width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sit-sum { max-width: 760px; }
.sit-review { text-align: left; list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 8px; }
.sit-review li { background: var(--card); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; border-left: 3px solid var(--line); font-size: 14.5px; line-height: 1.45; }
.sit-review li.v-good { border-left-color: var(--good); } .sit-review li.v-close { border-left-color: var(--warn); } .sit-review li.v-wrong { border-left-color: var(--bad); }
.sit-review .az { color: var(--muted); }
.sit-review .sk { font-weight: 700; color: var(--text); }
.sit-review .you s { color: var(--bad); }
.sit-review .ex { color: var(--soft); font-size: 13.5px; }
@media (max-width: 900px) {
  .sit { padding: 14px; }
  .sit-body { grid-template-columns: 1fr; }
  .sit-left { position: static; max-height: 260px; order: 2; }
  .sit-az { font-size: 21px; }
}

/* situation v2: Azerbaijani text on the left, ruled paper on the right */
.sit-body { align-items: stretch; }
.sit-left, .sit-right { padding: 28px 30px; }
.sit-doc .dl { margin: 0 0 12px; font-size: 17.5px; line-height: 1.75; color: var(--dim); transition: color 0.2s; }
.sit-doc .dl .who { color: var(--accent); font-weight: 700; font-size: 14px; }
.sit-doc .dl.past { color: var(--muted); }
.sit-doc .dl.past .w { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--line); }
.sit-doc .dl.past.v-good .w { text-decoration-color: rgba(73, 200, 139, 0.55); }
.sit-doc .dl.past.v-close .w { text-decoration-color: rgba(237, 172, 84, 0.55); }
.sit-doc .dl.past.v-wrong .w { text-decoration-color: rgba(246, 154, 172, 0.55); }
.sit-doc .dl.cur { color: var(--text); font-weight: 600; font-size: 19px; }
.sit-doc .w { border-radius: 6px; padding: 1px 2px; margin: 0 -2px; transition: background 0.18s, color 0.18s; }
.sit-doc .dl.cur .w.on { background: var(--pill-bg); color: var(--pill-ink); }
.sit-doc .dl.cur .w.now { background: var(--primary); color: var(--primary-ink); }
.sit-right .sit-title h2 { color: var(--muted); font-weight: 600; }
.paper { --rule: 44px; display: flex; flex-direction: column; }
.paper .pl { min-height: var(--rule); line-height: var(--rule); border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 600; padding: 0 4px; overflow-wrap: anywhere; }
.paper .pl.v-good { color: var(--good); }
.paper .pl.v-close { color: var(--warn); }
.paper .pl.v-wrong { color: var(--bad); }
.paper .pl .who { color: var(--dim); font-size: 13px; font-weight: 600; }
.paper .pl.blank { opacity: 0.5; }
.pl-cur { position: relative; }
.pl-cur .who { display: block; font-size: 12px; color: var(--accent); font-weight: 700; padding: 10px 4px 0; }
.paper #sitIn {
  display: block; width: 100%; min-height: var(--rule); resize: none; overflow: hidden; box-sizing: border-box;
  border: 0; border-radius: 0; padding: 0 4px; margin: 0; outline: none;
  font: inherit; font-size: 20px; font-weight: 600; line-height: var(--rule); color: var(--text);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--rule) - 2px), var(--accent) calc(var(--rule) - 2px), var(--accent) var(--rule));
}
.paper #sitIn::placeholder { color: var(--dim); font-weight: 500; font-size: 16px; }
.paper #sitIn:disabled { opacity: 1; color: var(--soft); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--rule) - 1px), var(--line-soft) calc(var(--rule) - 1px), var(--line-soft) var(--rule)); }
.paper .sit-hints { padding: 12px 0 2px; }
.paper .sit-acts { padding: 14px 0 6px; }
.paper .sit-tip { margin-right: auto; text-align: left; }
.paper .sit-fb { margin: 14px 0 6px; }

/* ---------- starred words ---------- */
.star-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; justify-content: center; }
.sit-fb .star-row { justify-content: flex-start; margin-top: 4px; }
.star-lbl { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--dim); margin-right: 4px; }
.star-w { font-size: 14px; padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line); color: var(--soft); }
.star-w:hover { border-color: var(--warn); color: var(--text); }
.star-w.on { border-style: solid; border-color: var(--warn); background: rgba(237, 172, 84, 0.14); color: var(--warn); font-weight: 700; }
.star-w.on::before { content: '\2605  '; }
.star-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.star-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 18px; }
.star-item { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 14px 14px 14px 12px; }
.star-say, .star-x { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); flex: none; }
.star-say:hover, .star-x:hover { background: var(--nav-on); color: var(--text); }
.star-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.star-t b { font-size: 17px; color: var(--warn); }
.star-t span { font-size: 13.5px; color: var(--muted); }
.star-dots { display: flex; gap: 4px; }
.star-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.star-dots i.on { background: var(--good); }
.star-empty { display: flex; gap: 14px; align-items: flex-start; color: var(--muted); line-height: 1.55; margin-top: 8px; }
.star-empty svg { color: var(--warn); }

/* the situation offer on the Done screen */
.sit-offer { display: flex; align-items: center; gap: 14px; text-align: left; margin: 26px auto 0; max-width: 640px; padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-soft); }
.sit-offer > div:not(.spin) { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sit-offer b { font-size: 15.5px; color: var(--text); }
.sit-offer span { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.sit-offer > svg { color: var(--accent); flex: none; }
.sit-offer.ready { border-color: var(--accent); background: var(--pill-bg); }
.sit-offer.ready span { color: var(--pill-ink); opacity: 0.85; }
.sit-offer.locked { opacity: 0.75; }
.sit-offer button { flex: none; }
.spin.sm { width: 22px; height: 22px; border-width: 2.5px; margin: 0; flex: none; }

/* chat: the message list scrolls inside the panel, with a slim scrollbar */
#chat { overflow: hidden; }
.chat-log { min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding-bottom: 20px; }
.chat-log::-webkit-scrollbar { width: 8px; }
.chat-log::-webkit-scrollbar-track { background: transparent; }
.chat-log::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid var(--side); }
.chat-log::-webkit-scrollbar-thumb:hover { background: var(--dim); }
.chat-acc { flex: none; max-height: 45vh; overflow-y: auto; }
.chat-top, .chat-form { flex: none; }
.chat-chips { display: none; }

/* situation in the typing engine: Azerbaijani text left, letter-by-letter typing right */
.sit-prac .ev-top { max-width: none; padding: 16px 28px 0; }
.sit-prac .sit-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 22px; padding: 16px 28px 22px; align-items: stretch; }
.sit-prac .sit-left { position: static; max-height: none; height: 100%; overflow-y: auto; }
.sit-prac .sit-right { padding: 0; gap: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.sit-prac .sit-right .stage { flex: 1; min-height: 0; overflow-y: auto; justify-content: center; padding: 24px 22px; }
.sit-prac .sit-right .q-text { display: none; }
.sit-prac .sit-right .q-text.q-ask { display: flex; justify-content: center; align-items: center; gap: 10px; cursor: pointer; }
.sit-prac .sit-right .ev-foot { border-radius: 0 0 22px 22px; }
.sit-prac .scene-tag { margin-bottom: 6px; }
@media (max-width: 900px) {
  .sit-prac .sit-body { grid-template-columns: 1fr; grid-template-rows: 34vh 1fr; padding: 10px 12px 12px; }
}

/* step 3, Slovak only: lines you still have to hear stay hidden */
.sit-doc .dl .w.hidden-line { color: var(--muted); letter-spacing: 2px; text-decoration: none; }
.story-next.sit-card.locked { opacity: 0.6; }
/* step 3: the others' lines come as the question, you only answer */
.sk-asked { display: flex; flex-direction: column; gap: 8px; align-items: stretch; margin: 6px 0 4px; }
.sk-line { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--pill-bg, #2a2c36); color: var(--text); border: 0; border-radius: 14px; padding: 12px 14px; font: inherit; cursor: pointer; }
.sk-line .who { color: var(--accent); font-weight: 700; font-size: 13px; }
.sk-line b { flex: 1; font-size: 19px; font-weight: 600; }
.sk-line .q-say { color: var(--muted); display: flex; }
.sit-doc .dl-say { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 2px; vertical-align: middle; }
.sit-doc .dl-say:hover { color: var(--accent); }
