/* Real-life dialogues (js/dialogues.js) */
.dl-lib, .dl-read { display: grid; gap: 22px; }
.dl-read { max-width: 760px; margin-inline: auto; width: 100%; }
/* a long label row (the three mode tabs in Russian) must shrink the column, never push the card past the screen edge */
.dl-read { grid-template-columns: minmax(0, 1fr); }
.dl-read > * { min-width: 0; }
@media (max-width: 430px) { .dl-modes button { padding: .7em .4em; gap: 4px; font-size: .85rem; } .dl-modes svg { width: 16px; height: 16px; } }
.dl-read .btn svg { width: 20px; height: 20px; vertical-align: -5px; margin-inline-end: 6px; }
.dl-read .btn.big { font-size: 1.05rem; padding: .95em 1.7em; }

/* ---------- library ---------- */
.dl-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 26px 28px; border-radius: 26px;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
              radial-gradient(120% 140% at 100% 100%, color-mix(in srgb, var(--ok) 14%, transparent), transparent 60%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); box-shadow: var(--shadow); }
.dl-hero-text { min-width: 0; }
.dl-hero h1 { margin: 0 0 6px; font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.3rem); }
.dl-hero .lead { margin: 0; max-width: 46ch; }
.dl-hero-art { flex: none; width: 150px; height: 150px; object-fit: cover; object-position: 50% 30%; border-radius: 30px; transform: rotate(3deg);
  box-shadow: 0 18px 36px -20px var(--accent); border: 3px solid var(--surface); }
.dl-meter { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); flex-wrap: wrap; }
.dl-meter-bar { flex: 0 1 170px; min-width: 90px; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.dl-meter-bar span { display: block; height: 100%; border-radius: inherit; background: var(--ok); transition: width .4s ease; }
.dl-filter { justify-content: flex-start; }
.dl-group { display: grid; gap: 12px; }
.dl-group-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 0; font-size: 1.2rem; }
.dl-group-h .pill { font-family: var(--font-target); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.dl-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border-radius: 22px; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); box-shadow: var(--shadow); overflow: hidden; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease; }
.dl-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--lv, var(--accent)); opacity: .85; }
.dl-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--lv, var(--accent)) 40%, transparent); }
.dl-card h3 { margin: 6px 0 0; font: 700 1.2rem/1.25 var(--font-target); text-align: start; }
.dl-card p { margin: 0; }
.dl-card-tr { font-weight: 500; }
.dl-card-scene { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.dl-card-top { display: flex; align-items: center; justify-content: space-between; }
.dl-ico { width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.5rem; border-radius: 15px; background: color-mix(in srgb, var(--lv, var(--accent)) 16%, var(--surface-2)); }
.dl-ico.big { width: 64px; height: 64px; font-size: 2.1rem; border-radius: 20px; }
.dl-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dl-card.is-done .dl-ico { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ok) 55%, transparent); }

/* ---------- one dialogue ---------- */
.dl-bar { display: flex; align-items: center; justify-content: space-between; }
.dl-head { text-align: center; display: grid; gap: 8px; justify-items: center; }
.dl-head h1 { margin: 4px 0 0; font: 800 clamp(1.7rem, 5vw, 2.4rem)/1.15 var(--font-display); }
.dl-head p { margin: 0; }
.dl-tr { color: var(--muted); font-size: 1.05rem; }
.dl-scene { max-width: 52ch; padding: 10px 16px; border-radius: 16px; background: var(--surface-2); line-height: 1.5; }
.dl-cast { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.dl-who { display: inline-flex; align-items: center; gap: 8px; padding: 4px; padding-inline-end: 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--rule) 70%, transparent); font-size: .9rem; }
.dl-who bdi { font: 600 .95rem var(--font-target); }
.dl-who .dl-av { width: 28px; height: 28px; font-size: .85rem; }
.dl-who .dl-av svg { width: 17px; height: 17px; }
.dl-modes { justify-self: center; display: flex; width: min(100%, 440px); }
.dl-modes button { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: .95rem; padding: .75em 1em; }
.dl-modes svg { width: 18px; height: 18px; flex: none; }
.dl-body { display: grid; gap: 16px; min-width: 0; }
.dl-tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.dl-hint { text-align: center; margin: -6px 0 0; }

/* chat */
.dl-chat { display: grid; gap: 14px; padding: 22px clamp(12px, 3.5vw, 26px); border-radius: 24px; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); box-shadow: var(--shadow); min-width: 0; }
.dl-msg { display: flex; align-items: flex-end; gap: 10px; max-width: min(90%, 580px); min-width: 0; }
.dl-msg.is-a { justify-self: start; }
.dl-msg.is-b { justify-self: end; flex-direction: row-reverse; }
.dl-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 .95rem/1 var(--font-target); }
.dl-av svg { width: 20px; height: 20px; }
.is-a .dl-av { background: color-mix(in srgb, var(--lv, var(--accent)) 24%, var(--surface-2)); color: var(--ink); }
.is-b .dl-av, .dl-turn-k .dl-av { background: var(--accent); color: var(--accent-ink); }
.dl-col { display: grid; gap: 4px; min-width: 0; justify-items: start; }
.is-b .dl-col { justify-items: end; }
.dl-name { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--muted); padding-inline: 8px; }
.dl-bubble { appearance: none; border: 1.5px solid transparent; cursor: pointer; display: grid; gap: 6px; padding: 11px 15px; border-radius: 20px;
  font: inherit; color: var(--ink); max-width: 100%; min-width: 0; text-align: start; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.is-a .dl-bubble { background: var(--surface-2); border-end-start-radius: 6px; }
.is-b .dl-bubble { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-end-end-radius: 6px; }
.dl-bubble:hover { border-color: color-mix(in srgb, var(--lv, var(--accent)) 45%, transparent); }
.dl-bubble:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dl-msg.now .dl-bubble { border-color: var(--lv, var(--accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lv, var(--accent)) 20%, transparent); }
.dl-en { font: 500 clamp(1.02rem, 2.6vw, 1.12rem)/1.5 var(--font-target); text-align: left; overflow-wrap: anywhere; }
.dl-tl { font-size: .92rem; line-height: 1.45; color: var(--muted); text-align: start; padding-top: 6px; overflow-wrap: anywhere;
  border-top: 1px solid color-mix(in srgb, var(--rule) 75%, transparent); }
.dl-msg.enter { animation: dl-in .35s ease both; }
@keyframes dl-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dl-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: .7rem; font-weight: 700; line-height: 1; }
.dl-mark.ok { background: var(--ok-soft); color: var(--ok); }
.dl-mark.miss { background: var(--bad-soft); color: var(--bad); }
.dl-dots3 { display: inline-flex; align-items: center; gap: 5px; padding: 15px 16px; cursor: default; }
.dl-dots3 i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .45; animation: dl-blink 1.1s ease-in-out infinite; }
.dl-dots3 i:nth-child(2) { animation-delay: .15s; }
.dl-dots3 i:nth-child(3) { animation-delay: .3s; }
@keyframes dl-blink { 30% { opacity: 1; transform: translateY(-3px); } }

/* role-play */
.dl-intro { display: flex; align-items: center; gap: 20px; padding: 22px; border-radius: 24px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--lv, var(--accent)) 14%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--lv, var(--accent)) 30%, transparent); box-shadow: var(--shadow); }
.dl-intro img { flex: none; width: 128px; height: 128px; object-fit: cover; object-position: 50% 30%; border-radius: 28px; transform: rotate(-3deg); border: 3px solid var(--surface); }
.dl-intro-text { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.dl-intro h2 { margin: 0; font-size: 1.35rem; }
.dl-intro ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: dl; }
.dl-intro li { position: relative; padding-inline-start: 34px; line-height: 1.45; counter-increment: dl; }
.dl-intro li::before { content: counter(dl); position: absolute; inset-inline-start: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lv, var(--accent)); color: var(--surface); font: 700 .8rem/1 var(--font-target); }
.dl-intro p { margin: 0; }
.dl-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dl-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.dl-steps li { width: 30px; height: 8px; border-radius: 999px; background: var(--surface-2); transition: background-color .3s ease; }
.dl-steps li.now { background: var(--accent); }
.dl-steps li.ok { background: var(--ok); }
.dl-steps li.miss { background: color-mix(in srgb, var(--bad) 70%, var(--surface-2)); }
.dl-turn { display: grid; gap: 12px; padding: 18px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow);
  border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, var(--rule)); animation: dl-in .3s ease both; }
.dl-turn.is-ok { border-style: solid; border-color: color-mix(in srgb, var(--ok) 60%, var(--rule)); }
.dl-turn.is-miss { border-style: solid; border-color: color-mix(in srgb, var(--bad) 45%, var(--rule)); }
.dl-turn-k { margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.dl-turn-k .dl-av { width: 30px; height: 30px; }
.dl-turn-k .dl-av svg { width: 18px; height: 18px; }
.dl-opts { display: grid; gap: 10px; }
.dl-opt { min-height: 54px; padding: 12px 16px; border-radius: 16px; font: 500 1.02rem/1.4 var(--font-target); text-align: left; overflow-wrap: anywhere; }
.dl-opt:hover:not(:disabled) { border-color: var(--accent); }
.dl-opt.dim { opacity: .5; }
.dl-opt.right { animation: dl-pop .35s ease; }
@keyframes dl-pop { 50% { transform: scale(1.02); } }
.dl-fb { display: grid; gap: 12px; justify-items: start; }
.dl-fb:empty { display: none; }
.dl-fb p { margin: 0; }
.dl-fb-ok { color: var(--ok); font-weight: 700; font-size: 1.05rem; }
.dl-fb-box { display: grid; gap: 4px; width: 100%; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--bad-soft) 70%, var(--surface));
  border-inline-start: 4px solid color-mix(in srgb, var(--bad) 60%, transparent); }
.dl-fb-k { font-weight: 600; }
.dl-fb-en { font: 600 1.06rem/1.45 var(--font-target); text-align: left; }
.dl-fb-tr { color: var(--muted); font-size: .92rem; }
.dl-result { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 22px; background: color-mix(in srgb, var(--ok) 10%, var(--surface-2)); }
.dl-result img { width: 110px; height: 110px; object-fit: cover; border-radius: 22px; flex: none; }
.dl-result-text { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.dl-result p { margin: 0; }
.dl-score { font-size: 1.25rem; font-weight: 700; }
.dl-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dl-gems { display: inline-block; font-weight: 700; padding: .3em .9em; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.dl-res-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* phrases */
.dl-phrases h2 { margin: 0 0 4px; font-size: 1.2rem; }
.dl-phrases ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 8px; }
.dl-phrases li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.dl-ph { flex: 1; min-width: 0; display: grid; gap: 1px; }
.dl-ph b { font: 600 1.02rem var(--font-target); justify-self: start; overflow-wrap: anywhere; }
.dl-ph span { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }

/* games page card */
.g-dialogues .dl-game-art { width: 100%; height: 120px; object-fit: cover; object-position: 50% 26%; border-radius: 16px; }

@media (max-width: 640px) {
  .dl-hero { padding: 20px; }
  .dl-hero-art { width: 92px; height: 92px; border-radius: 22px; }
  .dl-intro { flex-direction: column; text-align: start; align-items: stretch; padding: 18px; }
  .dl-intro img { width: 84px; height: 84px; border-radius: 22px; align-self: center; }
  .dl-intro .btn.big { justify-self: stretch; }
  .dl-result { flex-direction: column; text-align: center; }
  .dl-result-text { justify-items: center; }
  .dl-res-acts { justify-content: center; }
  .dl-msg { max-width: 94%; gap: 8px; }
  .dl-av { width: 30px; height: 30px; font-size: .85rem; }
  .dl-av svg { width: 17px; height: 17px; }
  .dl-turn { padding: 14px; }
  .dl-steps li { width: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .dl-card, .dl-bubble, .dl-meter-bar span, .dl-steps li { transition: none; }
  .dl-card:hover { transform: none; }
  .dl-msg.enter, .dl-turn, .dl-opt.right, .dl-dots3 i { animation: none; }
}
.pref-calm .dl-card:hover { transform: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.dl-hero-art, .dl-game-art, .dl-intro img, .dl-result img) { filter: brightness(.86); } }
:root[data-theme="dark"] :is(.dl-hero-art, .dl-game-art, .dl-intro img, .dl-result img) { filter: brightness(.86); }

/* speaking ladder (mode "say"): four calm rungs per line, microphone optional, always skippable */
.dl-nerv { display: grid; gap: 6px; max-width: 360px; }
.dl-nerv-row { display: flex; gap: 8px; }
.dl-nerv-b { flex: 1; min-height: 44px; border-radius: 14px; border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink); font: 700 1rem/1 var(--font-target); cursor: pointer; }
.dl-nerv-b:hover { border-color: var(--accent); }
.dl-nerv-b[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dl-nerv-b[aria-pressed="true"]::after { content: " ✓"; }
.dl-sl-who { margin: 8px 0 2px; }
.dl-nerv-ends { display: flex; justify-content: space-between; margin: 0; }
.dl-nerv-q { margin: 0; font-weight: 600; }
.dl-sl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); justify-items: center; text-align: center; overflow-wrap: anywhere; }
.dl-sl > * { min-width: 0; max-width: 100%; }
.dl-sl-n { margin: 0; color: var(--muted); font-size: .9rem; }
.dl-rungs { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; width: 100%; justify-content: center; flex-wrap: wrap; }
.dl-rungs li { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .85rem; }
.dl-rung-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font: 700 .75rem/1 var(--font-target); }
.dl-rungs li.done { color: var(--ink); }
.dl-rungs li.done .dl-rung-dot { background: var(--ok); color: var(--surface); }
.dl-rungs li.now { color: var(--ink); background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); font-weight: 600; }
.dl-rungs li.now .dl-rung-dot { background: var(--accent); color: var(--surface); }
.dl-sl-en { margin: 0; font: 600 1.25rem/1.45 var(--font-target); }
.dl-sl-tr { margin: 0; color: var(--muted); }
.dl-sl-hint { margin: 0; max-width: 46ch; }
.dl-sl-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.dl-sl-acts .btn svg { width: 18px; height: 18px; }
.dl-sl-note { margin: 0; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: .92rem; }
.dl-sl-heard { margin: 0; font-weight: 600; }
.dl-sl-ok { color: var(--ok); }
.dl-sl-close { color: var(--ink); }
.dl-sl-marks { margin: 0; font: 600 1.1rem/1.5 var(--font-target); }
.dl-w { border-radius: 8px; padding: 0 .12em; }
.dl-w.hit { color: var(--ok); }
.dl-w.miss { background: var(--bad-soft); text-decoration: underline wavy color-mix(in srgb, var(--bad) 60%, transparent); text-underline-offset: .18em; }
.dl-mic { width: 76px; height: 76px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--accent); color: var(--surface); box-shadow: var(--shadow); }
.dl-mic svg { width: 34px; height: 34px; }
.dl-mic.on { animation: dl-pulse 1.4s ease-in-out infinite; }
@keyframes dl-pulse { 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 22%, transparent); } }
@media (prefers-reduced-motion: reduce) { .dl-mic.on { animation: none; } }
.dl-sl-label { margin: 0; flex-basis: 100%; color: var(--muted); font-size: .92rem; }
.dl-sl-privacy { margin: 0; max-width: 52ch; line-height: 1.5; }
.dl-sl-foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
/* phrase packs: chunk list + library section */
.dl-bank { display: grid; gap: 12px; margin-top: 28px; }
.dl-bank-h { margin: 0; font: 700 1.4rem/1.2 var(--font-display, inherit); }
.dl-bank > p { margin: 0; }
.dl-chunks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dl-chunk { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line, transparent);
  background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-align: start; cursor: pointer; font: inherit; }
.dl-chunk:hover { border-color: color-mix(in srgb, var(--lv, var(--accent)) 40%, transparent); }
.dl-chunk-ico { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.dl-chunk-ico svg { width: 18px; height: 18px; }
.dl-chunk-body { display: grid; gap: 2px; min-width: 0; }
.dl-chunk-body b { font: 600 1.05rem/1.4 var(--font-target); }
.dl-chunk-tr { color: var(--ink); }
.dl-chunk-when { display: block; }
.dl-when { margin: 0; font: 600 1.1rem/1.5 var(--font); text-align: center; }
.dl-packview, .dl-packview > * { min-width: 0; }
/* discussion cards */
.dl-task { display: grid; gap: 12px; justify-items: center; text-align: center; }
.dl-task h2, .dl-task h3 { margin: 0; }
.dl-clock { margin: 0; font: 700 3rem/1 var(--font-target); letter-spacing: .02em; }
.dl-rubric { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; text-align: start; }
.dl-rubric label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); cursor: pointer; }
.dl-rubric input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.dl-useful h2 { margin: 0 0 10px; }
.dl-models { display: grid; gap: 10px; }
.dl-models h2 { margin: 0; }
.dl-models > p { margin: 0; }
.dl-models > .btn { justify-self: start; }
.dl-model-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 14px; }
.dl-model-list li { display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); }
.dl-model-list p { margin: 0; }
.dl-model-a { font-family: var(--font-target); line-height: 1.5; }

/* Free answer: type or record a reply, then compare with the model */
.dl-fa-list { display: grid; gap: 16px; padding-inline-start: 20px; }
.dl-fa-ans { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border-radius: 10px; }
.dl-free audio { max-width: 100%; height: 36px; }

/* Four-part self-feedback after a talk: the chosen sentence reveals its next step (no script, nothing saved) */
.dl-fb-c { border: 0; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.dl-fb-c legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.dl-fb-c input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dl-fb-c label { display: block; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); cursor: pointer; border: 2px solid transparent; }
.dl-fb-c input:checked + label { border-color: var(--accent); }
.dl-fb-c input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.dl-fb-tip { display: none; margin: 0; padding: 10px 12px; border-radius: 14px; background: var(--surface); border-inline-start: 4px solid var(--accent); }
.dl-fb-c input:nth-of-type(1):checked ~ .dl-fb-tip-1,
.dl-fb-c input:nth-of-type(2):checked ~ .dl-fb-tip-2,
.dl-fb-c input:nth-of-type(3):checked ~ .dl-fb-tip-3 { display: block; }

/* Sound guides by native language */
.dl-sym { font-size: 1.6rem; margin: 0 0 8px; letter-spacing: .02em; }
.dl-pairs { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.dl-pairs li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dl-pair-say { min-height: 44px; }
.dl-pair-w { padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.dl-drill { margin-top: 8px; }
.dl-drill summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.dl-drill ol { margin: 6px 0 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.dl-chunk-reg { justify-self: start; font-size: 12px; }
.dl-chunk-d { display: block; margin-top: 2px; }
.dl-tasks { margin-top: 16px; }
.dl-tasks ol { display: grid; gap: 12px; padding-inline-start: 20px; }

/* Talk with Mila (js/voice-bot.js): a chat list, example chips, one typing line. */
.dl-vb-entry { display: grid; gap: 4px; text-align: start; width: 100%; margin: 0 0 var(--sp-4, 16px); padding: var(--sp-3, 12px) var(--sp-4, 16px); min-height: 56px; }
.vb { display: grid; gap: var(--sp-3, 12px); max-width: 640px; margin-inline: auto; }
.vb h2 { margin: 0; }
.vb-chat { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vb-msg { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; max-width: 92%; }
.vb-cat { background: var(--surface-2); justify-self: start; }
.vb-me { background: color-mix(in srgb, var(--accent-2) 16%, var(--surface)); justify-self: end; }
.vb-who { font-size: .75rem; font-weight: 700; opacity: .7; }
.vb-text { overflow-wrap: anywhere; }
.vb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vb-talk[aria-pressed="true"] { background: var(--accent-2); }
.vb-hints { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vb-hints .btn { text-align: start; height: auto; white-space: normal; }
.vb-type { display: flex; gap: 8px; }
.vb-in { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm, 10px); border: 1px solid var(--hairline-strong, #bbb); background: var(--surface); color: var(--ink); font: inherit; }
@media (max-width: 430px) { .vb-msg { max-width: 100%; } }
/* after the talk: one calm card with the goodbye, what Mila understood last, and exactly one tip (no score);
   the tip text already opens with "Tip:" in every language, so its box needs no label */
.vb-end { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--r-md, 14px); background: var(--surface-2); }
.vb-end > * { margin: 0; }
.vb-end-line b { font-weight: 700; }
.vb-tip { padding: 10px 12px; border-inline-start: 3px solid var(--accent-2); border-radius: var(--r-sm, 10px); background: var(--surface); line-height: 1.5; }
.vb-end h3 { margin: 4px 0 0; font-size: 1rem; }
.vb-rubric, .vb-fixes { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.vb-rubric label { display: flex; align-items: flex-start; gap: 8px; min-height: 44px; padding-block: 10px; cursor: pointer; }
.vb-rubric input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; }
.vb-fixes > li { padding: 10px 12px; border-radius: var(--r-sm, 10px); background: var(--surface); overflow-wrap: anywhere; }
.vb-fixes p { margin: 4px 0 0; }
.dl-after-list { display: grid; gap: 14px; padding-inline-start: 20px; }
.dl-after-a { text-decoration: line-through; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); margin: 0; }
.dl-after-b { margin: 2px 0; }
.dl-after-mine { padding-inline-start: 20px; }
.dl-tk-model { padding-inline-start: 20px; }
.dl-tk-model li { margin: 6px 0; }

/* Arabic course text (js/dialogues.js marks course text dir="ltr" lang="<course>"): it reads right to left, with the transliteration under it */
[lang="ar"][dir="ltr"] { direction: rtl; unicode-bidi: isolate; text-align: start; }
.dl-en[lang="ar"] { text-align: start; font-size: 1.25rem; line-height: 1.8; }
.dl-py { display: block; font-size: .85rem; line-height: 1.4; color: var(--muted); text-align: start; padding-top: 2px; }
