/* Cat class (js/cat-class.js): Polly and Mila teach the lesson's explanation step with animated cards. */
html.cat-class-on .buddy { display: none !important; }

.cc {
  --cc-pink: #ff5d8f; --cc-gold: #ffb627; --cc-teal: #1fb5a8; --cc-violet: #7a5cff; --cc-blue: #3d8bff;
  --cc-lv: var(--lv, var(--cc-violet));
  position: relative; margin: 6px 0 14px; padding: 14px 14px 12px; border-radius: 26px; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--cc-pink) 22%, transparent), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--cc-teal) 20%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--cc-lv) 18%, var(--surface)), color-mix(in srgb, var(--cc-violet) 12%, var(--surface)));
  box-shadow: 0 1px 0 rgb(255 255 255 / .6) inset, 0 18px 50px -24px color-mix(in srgb, var(--cc-violet) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--cc-violet) 22%, transparent);
}
.cc::before { /* soft dotted classroom wallpaper */
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: radial-gradient(color-mix(in srgb, var(--cc-violet) 35%, transparent) 1.2px, transparent 1.4px);
  background-size: 18px 18px; mask-image: linear-gradient(180deg, #000, transparent 75%);
}
.cc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cc-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 10px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: #fff;
  background: linear-gradient(135deg, var(--cc-pink), var(--cc-violet)); box-shadow: 0 6px 16px -8px var(--cc-pink); }
.cc-badge svg { width: 16px; height: 16px; fill: #fff7c2; animation: cc-twinkle 2.4s ease-in-out infinite; }
.cc-mute { appearance: none; border: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink);
  background: color-mix(in srgb, var(--surface) 80%, transparent); box-shadow: var(--shadow-xs, 0 1px 2px rgb(0 0 0 / .1)); }
.cc-mute svg { width: 18px; height: 18px; }
.cc-mute[aria-pressed="true"] { opacity: .55; }
.cc-mute[aria-pressed="true"] svg path:last-child { display: none; }
.cc-dots { list-style: none; display: flex; gap: 5px; margin: 0 auto 0 0; padding: 0; }
[dir="rtl"] .cc-dots { margin: 0 0 0 auto; }
.cc-dots li { width: 8px; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 18%, transparent); transition: width .35s cubic-bezier(.2,.8,.2,1), background .3s; }
.cc-dots li.done { background: var(--cc-teal); }
.cc-dots li.now { width: 22px; background: linear-gradient(90deg, var(--cc-pink), var(--cc-gold)); }

/* stage: the cats on one side (physically right, so their pointing paws aim at the board), cards on the other */
.cc-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 12px; align-items: end; direction: ltr; }
.cc-board { grid-column: 1; grid-row: 1; direction: rtl; display: grid; gap: 10px; align-content: center; min-height: 300px; }
/* Hebrew and Arabic pages write the board right to left; every other interface writes it left to right */
[lang="ru"] .cc-board, html:not([dir="rtl"]) .cc-board { direction: ltr; }
.cc-cats { grid-column: 2; grid-row: 1; position: relative; height: 340px; align-self: end; }
.cc-cat { position: absolute; bottom: 0; margin: 0; width: 190px; transition: transform .5s cubic-bezier(.2,.8,.2,1), filter .4s, opacity .4s; transform-origin: 50% 100%; }
.cc-cat img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 12px rgb(20 10 40 / .28)); position: relative; z-index: 1; }
.cc-cat .cc-shadow { position: absolute; left: 14%; right: 14%; bottom: 2px; height: 14px; border-radius: 50%; background: rgb(20 10 40 / .28); filter: blur(5px); }
.cc-cat figcaption { position: absolute; z-index: 2; bottom: -4px; left: 50%; transform: translateX(-50%); padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; color: #fff; white-space: nowrap; }
.cc-polly { right: 72px; z-index: 2; } .cc-polly figcaption { background: linear-gradient(135deg, #5b6b8a, #3d4a66); }
.cc-mila { right: -10px; bottom: 6px; width: 158px; z-index: 1; } .cc-mila figcaption { background: linear-gradient(135deg, var(--cc-pink), #e0458a); }
.cc-cat:not(.on) { filter: saturate(.85) brightness(.96); transform: scale(.9); }
.cc-cat.on { transform: scale(1.04); z-index: 3; }
.cc-cat.talking img { animation: cc-talk .55s ease-in-out infinite alternate; }
.cc-say { position: absolute; bottom: 222px; left: -6px; right: -4px; z-index: 4; padding: 9px 12px; border-radius: 16px; background: var(--surface); box-shadow: 0 10px 26px -12px rgb(20 10 40 / .45);
  border: 2px solid var(--cc-violet); }
.cc-say[data-cat="mila"] { border-color: var(--cc-pink); }
.cc-say::after { content: ''; position: absolute; bottom: -9px; right: 150px; width: 16px; height: 16px; background: var(--surface); border: 2px solid var(--cc-violet); border-top: 0; border-left: 0; transform: rotate(45deg); }
.cc-say[data-cat="mila"]::after { right: 60px; border-color: var(--cc-pink); }
.cc-say.pop { animation: cc-bubble .45s cubic-bezier(.2,1.4,.4,1) both; }
.cc-say p { margin: 0; }
.cc-say-en { font-family: var(--font-target); font-weight: 700; font-size: .98rem; line-height: 1.3; color: var(--ink); }
.cc-say-tr { font-size: .8rem; color: var(--muted); margin-top: 2px !important; }

/* cards */
.cc-card { position: relative; padding: 14px 16px 14px; border-radius: 20px; background: var(--surface); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--k) 30%, transparent);
  box-shadow: 0 1px 0 rgb(255 255 255 / .7) inset, 0 14px 30px -18px color-mix(in srgb, var(--k) 80%, transparent);
  animation: cc-in .6s cubic-bezier(.2,1.25,.35,1) both; transform-origin: 70% 100%; --k: var(--cc-violet); }
.cc-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; border-radius: 20px 20px 0 0; background: linear-gradient(90deg, var(--k), color-mix(in srgb, var(--k) 40%, var(--cc-gold))); }
.cc-card.k-tip { --k: var(--cc-gold); } .cc-card.k-rule { --k: var(--cc-blue); } .cc-card.k-word { --k: var(--cc-pink); }
.cc-card.k-ex { --k: var(--cc-teal); } .cc-card.k-end { --k: var(--cc-violet); text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cc-gold) 22%, var(--surface)), color-mix(in srgb, var(--cc-pink) 16%, var(--surface))); }
.cc-card.past { display: none; }
.cc-card-h { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 800; font-size: .82rem; letter-spacing: .02em; color: color-mix(in srgb, var(--k) 70%, var(--ink)); }
.cc-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; font-size: 1rem; background: color-mix(in srgb, var(--k) 18%, transparent); }
.cc-card.now .cc-ico { animation: cc-wiggle 1s .4s ease-in-out 2; }
.cc-sheen { position: absolute; inset: -40% auto -40% -30%; width: 30%; background: linear-gradient(90deg, transparent, rgb(255 255 255 / .7), transparent); transform: skewX(-20deg); animation: cc-sheen 1.3s .3s ease-out both; pointer-events: none; }
.cc-text { margin: 0; font-size: 1.06rem; line-height: 1.6; }
.cc-endtext { font-family: var(--font-display); font-size: 1.2rem; }
.cc-line { background: none; }
.cc-en, .cc-line, .cc-big { appearance: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
.cc-en { display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .3em; margin: 0 .05em; border-radius: 7px; font-family: var(--font-target); font-weight: 700; unicode-bidi: isolate;
  background: linear-gradient(transparent 55%, color-mix(in srgb, var(--cc-gold) 55%, transparent) 55%) no-repeat 0 0 / 0% 100%; animation: cc-marker .7s .5s ease-out forwards; }
.cc-nb { white-space: nowrap; }
.cc-nb > .cc-en { white-space: normal; }
.cc-en:hover, .cc-en:focus-visible { background-color: color-mix(in srgb, var(--cc-gold) 20%, transparent); }
.cc-word { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 4px; }
.cc-big { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 8px; border-radius: 12px; font-family: var(--font-target); font-size: 1.6rem; font-weight: 800; direction: ltr;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cc-pink) 16%, transparent), color-mix(in srgb, var(--cc-violet) 14%, transparent)); color: color-mix(in srgb, var(--cc-pink) 55%, var(--ink)); }
.cc-big svg, .cc-line svg { width: 20px; height: 20px; flex: none; opacity: .8; }
.cc-tr { color: var(--muted); font-size: .92rem; }
.cc-mini { margin: 8px 0 0; display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--k) 8%, transparent); }
.cc-exs { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.cc-exs li { display: grid; gap: 1px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--cc-teal) 9%, transparent); animation: cc-in .5s calc(.25s + var(--k) * .22s) cubic-bezier(.2,1.2,.35,1) both; }
.cc-line { display: flex; align-items: center; gap: 8px; text-align: left; font-family: var(--font-target); font-size: 1.05rem; font-weight: 600; padding: 0; direction: ltr; }
.cc-line mark, .cc-mini mark { background: none; color: inherit; font-weight: 800; box-shadow: inset 0 -.42em 0 color-mix(in srgb, var(--cc-pink) 35%, transparent); border-radius: 2px; }
.cc-line.playing, .cc-big.playing { animation: cc-beat .5s ease-in-out 3; }
.cc-hint { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }

.cc-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.cc-ctrl .cc-next { margin-inline-start: auto; min-width: 130px; }
.cc-ctrl .cc-back:disabled { visibility: hidden; }
.cc-count { font-size: .82rem; color: var(--muted); }
.cc-actions:not(.cc-final) { justify-content: center; }
.cc-actions:not(.cc-final) [data-step] { font-size: .9rem; min-height: 0; padding: 8px 16px; }
.cc-actions.cc-final { display: none; } /* the last card's Next button starts the practice instead */

.cc-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.cc-confetti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 12px; border-radius: 2px; animation: cc-fall var(--d) var(--dl) cubic-bezier(.3,.6,.5,1) forwards; }

@keyframes cc-in { from { opacity: 0; transform: translateY(18px) scale(.86) rotate(-2deg); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes cc-bubble { from { opacity: 0; transform: translateY(8px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes cc-talk { from { transform: translateY(0) rotate(0); } to { transform: translateY(-3px) rotate(-1.2deg); } }
@keyframes cc-sheen { from { left: -30%; } to { left: 130%; } }
@keyframes cc-marker { to { background-size: 100% 100%; } }
@keyframes cc-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg) scale(1.1); } 75% { transform: rotate(10deg) scale(1.1); } }
@keyframes cc-twinkle { 50% { transform: scale(1.25) rotate(20deg); } }
@keyframes cc-beat { 50% { transform: scale(1.04); } }
@keyframes cc-glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--cc-pink) 25%, transparent); } }
@keyframes cc-fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(420px) rotate(var(--r)); opacity: 0; } }

/* phones: the cats stand in a row above the board, the bubble beside them */
@media (max-width: 640px) {
  .cc { padding: 12px 10px 10px; border-radius: 22px; }
  .cc-stage { grid-template-columns: 1fr; }
  .cc-board { grid-column: 1; grid-row: 2; }
  .cc-cats { grid-column: 1; grid-row: 1; height: 150px; }
  .cc-cat { width: 120px; }
  .cc-polly { right: 66px; } .cc-mila { right: -4px; width: 100px; bottom: 4px; }
  .cc-say { top: 8px; bottom: auto; left: 0; right: 176px; }
  .cc-count { display: none; }
  .cc-say::after, .cc-say[data-cat="mila"]::after { right: -9px; bottom: auto; top: 22px; transform: rotate(-45deg); }
  .cc-board { min-height: 0; }
  .cc-text { font-size: 1rem; }
  .cc-big { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cc *, .cc *::before, .cc *::after { animation: none !important; transition: none !important; }
  .cc-en { background-size: 100% 100%; }
}
html.pref-calm .cc *, html.pref-calm .cc *::before { animation: none !important; }
html.pref-calm .cc-en { background-size: 100% 100%; }

/* cat dialogues (js/dialogues.js, dialogues with cats: true): Polly and Mila's own faces as avatars */
.dl-av.dl-cat { overflow: hidden; padding: 0; background: radial-gradient(circle at 50% 30%, #fff, #e9e3ff) !important; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #7a5cff; }
.dl-av.dl-cat-mila { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #ff5d8f; }
.dl-av.dl-cat img { width: 175%; height: 175%; max-width: none; object-fit: cover; object-position: 50% 6%; margin-top: 30%; }
.dl-cats-hero { display: flex; justify-content: center; align-items: flex-end; height: 150px; margin: 0 auto 4px; }
.dl-cats-hero img { height: 100%; width: auto; filter: drop-shadow(0 8px 10px rgb(20 10 40 / .25)); animation: cc-in .7s cubic-bezier(.2,1.25,.35,1) both; }
.dl-cats-hero img + img { height: 112%; margin-inline-start: -22px; animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { .dl-cats-hero img { animation: none; } }

/* ---------- the board: Polly and Mila write and draw the explanation (js/cat-class.js) ---------- */
.cc-board.bd { --chalk: #f4f1e6; --chalk-dim: #c9d6cf; --chalk-y: #ffe17a; --chalk-p: #ff9ec2; --chalk-b: #9fd8ff;
  position: relative; display: block; min-height: 300px; padding: 18px 18px 30px; border-radius: 16px; color: var(--chalk);
  background: radial-gradient(120% 90% at 30% 10%, #2f5a4c, #1d3b32 70%), #1d3b32;
  border: 10px solid #9a6a3e; border-image: linear-gradient(135deg, #b9844f, #8a5a30 45%, #a8743f) 1;
  box-shadow: 0 1px 0 rgb(255 255 255 / .25) inset, 0 0 0 1px rgb(0 0 0 / .25), 0 18px 40px -22px rgb(20 10 0 / .7); overflow: clip; }
.cc-board.bd::before { /* chalk dust and old smudges */ content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(60% 30% at 70% 20%, rgb(255 255 255 / .06), transparent 70%), radial-gradient(40% 25% at 20% 75%, rgb(255 255 255 / .05), transparent 70%); }
.cc-board.bd::after { /* the chalk tray */ content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: linear-gradient(#7c532e, #5e3d20); box-shadow: 0 -2px 4px rgb(0 0 0 / .3); }
.bd-steps { position: relative; z-index: 1; display: grid; gap: 14px; }
.bd-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: visible; }
.bd-step { display: grid; gap: 10px; transition: opacity .5s; }
.bd-step.past { opacity: .5; }
html.a11y-contrast .bd-step.past { opacity: 1; }
html.a11y-contrast .cc-board.bd { --chalk-dim: var(--chalk); }
.bd-step.past .bd-title { font-size: 1.5rem; }
.bd-step + .bd-step { padding-top: 12px; border-top: 1px dashed rgb(244 241 230 / .25); }
.bd-item { margin: 0; text-shadow: 0 0 1px rgb(255 255 255 / .5), 0 0 6px rgb(255 255 255 / .12); }
.bd-title { font-family: 'Amatic SC', var(--font-display); font-weight: 700; font-size: 2.1rem; line-height: 1.05; color: var(--chalk-y); letter-spacing: .01em; }
.bd-text { font-size: 1.1rem; line-height: 1.75; }
.bd-small { font-size: .98rem; color: var(--chalk-dim); }
.bd-tr { color: var(--chalk-dim); font-size: .95rem; }
.bd-tgt { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.bd-word { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.bd-big { font-family: var(--font-target); font-size: 2rem; font-weight: 800; color: var(--chalk-p); unicode-bidi: isolate; }
.bd-eq { font-size: 1.6rem; color: var(--chalk-dim); }
.bd-word .bd-tr { font-size: 1.25rem; color: var(--chalk); }
.bd-ex { display: grid; gap: 2px; }
.bd-line { display: flex; align-items: center; gap: 8px; font-family: var(--font-target); font-size: 1.2rem; font-weight: 600; direction: ltr; }
.bd-spk { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .12); }
.bd-spk svg { width: 16px; height: 16px; }
.bd-line:hover .bd-spk, .bd-line:focus-visible .bd-spk { background: rgb(255 255 255 / .25); }
/* A finger gets a 44 px line to tap and a bigger speaker (QA W7-F8: the 26 px circle looked like the only target) */
@media (pointer: coarse) { .bd-line { min-height: 44px; } .bd-spk { width: 34px; height: 34px; } .bd-spk svg { width: 18px; height: 18px; } }
.bd-line.playing { animation: cc-beat .5s ease-in-out 3; }
.bd-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; }
.bd-col { display: grid; gap: 4px; }
.bd-col-h { margin: 0; font-family: 'Amatic SC', var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--chalk-b); }
.bd-vs { align-self: stretch; width: 2px; background: rgb(244 241 230 / .45); border-radius: 2px; }
.bd-end { font-family: 'Amatic SC', var(--font-display); font-weight: 700; font-size: 2rem; text-align: center; color: var(--chalk-y); }
.cc-board.bd .cc-en { font-family: var(--font-target); color: var(--chalk-y); font-weight: 700; background: none; animation: none; padding: 0 .15em; unicode-bidi: isolate; }
.cc-board.bd .cc-en:hover, .cc-board.bd .cc-en:focus-visible { background: rgb(255 225 122 / .15); }
.cc-board.bd :focus-visible { outline: 2px solid var(--chalk-y); outline-offset: 3px; border-radius: 6px; }

/* marks drawn in chalk: underline, circle, arrows */
.bd-mark { position: relative; display: inline-block; color: var(--chalk-y); font-weight: 800; }
.bd-mark svg { position: absolute; left: -8%; width: 116%; pointer-events: none; overflow: visible; }
.bd-under svg { bottom: -.12em; height: .32em; }
.bd-circle svg { top: -.35em; left: -16%; width: 132%; height: calc(100% + .7em); }
.bd-mark path, .bd-arrow { fill: none; stroke: var(--chalk-p); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: bd-draw .6s ease-out forwards; }
.bd-under path { stroke: var(--chalk-y); }
.bd-step .bd-mark path { animation-delay: calc(var(--total, 0) * 110ms + 150ms); }
.bd-arrow { stroke: var(--chalk-b); animation-duration: .7s; animation-delay: var(--dl, 0s); }
.bd-head { animation-duration: .25s; }
.bd-layer.bd-still .bd-arrow, .bd-step.bd-done .bd-mark path, .bd-step.past .bd-mark path { animation: none; stroke-dashoffset: 0; }

/* chalk writing: each word appears in turn */
.bd-w { display: inline; opacity: 0; animation: bd-chalk .32s ease-out forwards; animation-delay: calc(var(--i) * 110ms); }
.bd-step.past .bd-w, .bd-step.bd-done .bd-w { opacity: 1; animation: none; }
.bd-chalk { position: absolute; z-index: 3; inset-inline-end: 14px; top: 0; width: 34px; height: 9px; border-radius: 3px; background: linear-gradient(90deg, #fff, #e8e4d6); box-shadow: 0 2px 3px rgb(0 0 0 / .35);
  transform: translateY(calc(100% + 280px)) rotate(-8deg); opacity: 0; pointer-events: none; }
.bd-chalk.writing { animation: bd-hand var(--ms) linear forwards; }
@keyframes bd-chalk { from { opacity: 0; filter: blur(2px); transform: translateY(2px); } to { opacity: 1; filter: none; transform: none; } }
@keyframes bd-draw { to { stroke-dashoffset: 0; } }
@keyframes bd-hand { 0% { opacity: 1; top: var(--y0); transform: rotate(-20deg); } 15%, 35%, 55%, 75% { transform: rotate(-8deg) translateX(-12px); } 25%, 45%, 65%, 85% { transform: rotate(-24deg) translateX(10px); }
  95% { opacity: 1; top: var(--y1); } 100% { opacity: 0; top: var(--y1); } }

@media (max-width: 640px) {
  .cc-board.bd { padding: 14px 12px 26px; border-width: 8px; min-height: 0; }
  .bd-title { font-size: 1.8rem; }
  .bd-text { font-size: 1.02rem; }
  .bd-big { font-size: 1.7rem; }
  .bd-line { font-size: 1.08rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bd-w { opacity: 1; } .bd-mark path, .bd-arrow { stroke-dashoffset: 0; } .bd-chalk { display: none; }
}
html.pref-calm .bd-w { opacity: 1; } html.pref-calm .bd-mark path, html.pref-calm .bd-arrow { stroke-dashoffset: 0; animation: none; } html.pref-calm .bd-chalk { display: none; }
/* comprehension check on the board */
.bd-choices { display: grid; gap: 8px; }
.bd-choice { appearance: none; font: inherit; font-size: 1rem; text-align: start; padding: 10px 14px; border-radius: 12px; cursor: pointer; color: var(--chalk);
  background: rgb(255 255 255 / .06); border: 2px dashed rgb(244 241 230 / .45); }
.bd-choice:hover:not(:disabled) { background: rgb(255 255 255 / .12); }
.bd-choice.right { border-style: solid; border-color: #8ef0b0; background: rgb(142 240 176 / .14); }
.bd-choice.wrong { border-color: var(--chalk-p); animation: cc-beat .35s ease-in-out 2; }
.bd-choice:disabled:not(.right) { opacity: .55; cursor: default; }
.bd-feedback { margin: 2px 0 0; min-height: 1.4em; color: var(--chalk-y); }
.cc-ctrl .cc-next:disabled { opacity: .5; cursor: not-allowed; }
.cc-say.cc-say-own .cc-say-tr { font-size: .95rem; color: var(--ink); margin: 0 !important; }
.cc[data-at="check"] .bd-step.past .bd-tr { visibility: hidden; } /* the answers are not on the board while checking */
/* the lesson's words on the board */
.bd-words { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 14px; }
.bd-words li { display: grid; gap: 0; }
.bd-words .bd-tgt { font-family: var(--font-target); font-size: 1.3rem; font-weight: 700; color: var(--chalk-p); justify-self: start; unicode-bidi: isolate; }
.bd-words .bd-tr { font-size: .9rem; }
.bd-choices-tgt .bd-choice { font-family: var(--font-target); font-size: 1.15rem; font-weight: 700; text-align: left; }
.bd-choices { position: relative; }
.bd-star { position: absolute; inset-inline-end: 10px; top: -6px; font-size: 2rem; color: var(--chalk-y); text-shadow: 0 0 10px rgb(255 225 122 / .8); pointer-events: none;
  animation: bd-star 1.3s ease-out forwards; }
@keyframes bd-star { 0% { opacity: 0; transform: scale(.3) rotate(-30deg); } 30% { opacity: 1; transform: scale(1.3) rotate(10deg); } 100% { opacity: 0; transform: translateY(-40px) scale(1) rotate(30deg); } }
/* the bubble sits in the page flow above the cats, so a long explanation pushes the board down instead of covering it */
.cc-cats { height: auto; min-height: 340px; padding-bottom: 214px; box-sizing: border-box; }
.cc-say { position: relative; top: auto; bottom: auto; left: auto; right: auto; margin: 0 -4px 0 -6px; }
.cc-say::after { bottom: -9px; }
@media (max-width: 640px) {
  .cc-cats { min-height: 150px; padding-bottom: 0; padding-top: 8px; }
  .cc-say { top: auto; margin: 0 176px 0 0; }
}
/* phones: the bubble takes the full width above the cats (a narrow bubble beside them wrapped every two words) */
@media (max-width: 640px) {
  .cc-cats { min-height: 0; padding: 4px 0 150px; }
  .cc-say { margin: 0 0 10px; }
  .cc-say::after, .cc-say[data-cat="mila"]::after { top: auto; bottom: -9px; right: 120px; transform: rotate(45deg); }
  .cc-say[data-cat="mila"]::after { right: 40px; }
}
/* tap targets of at least 44px on the board (WCAG 2.5.5) */
.cc-mute { width: 44px; height: 44px; }
.bd-line { min-height: 44px; }
.bd-choice { min-height: 44px; }
.finish-rewards { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; font-weight: 600; }
.finish-rewards li::before { content: '✨ '; }
