/* Lesson pacing on the slide (src/app/ideas.js, src/app/stage.js, src/app/settings.js). */
/* «كمّل ←»: while an idea waits it takes the dock's primary place («ابدأ/إنهاء المذاكرة»
   come back after it), so it never covers the slide or the sentence being read */
.dock>#ideaNext{display:flex;flex:none}
.dock>#ideaNext[hidden]{display:none}
.dock:has(>#ideaNext:not([hidden]))>#study{display:none}
.dock #ideaContinue{flex:none;height:48px;min-height:48px;padding:0 22px;gap:10px;border:0;border-radius:16px;font-size:15px;font-weight:600;white-space:nowrap;
  color:var(--on-accent);background:var(--accent);box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 30%,transparent)}
.dock #ideaContinue span{font-size:18px;line-height:1;transform:translateY(-1px)}
@media(prefers-reduced-motion:no-preference){.dock>#ideaNext:not([hidden]){animation:ideaIn .35s cubic-bezier(.16,1,.3,1)}.dock #ideaContinue{animation:ideaPulse 2.6s cubic-bezier(.16,1,.3,1) .6s infinite}}
@keyframes ideaIn{from{opacity:0;transform:scale(.94)}}
@keyframes ideaPulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 30%,transparent)}70%,100%{box-shadow:0 0 0 11px color-mix(in srgb,var(--accent) 0%,transparent)}}
@media(max-width:640px){.dock #ideaContinue{height:46px;min-height:46px;padding:0 16px;font-size:14px}}
@media(max-height:520px) and (orientation:landscape){.dock #ideaContinue{height:42px;min-height:42px}}
/* «تخطّى الباقي» (skip the rest of this idea while it is explained): quiet, not a second «كمّل»;
   gone while an idea waits */
footer>#gotIt{border:1px dashed color-mix(in srgb,var(--sub) 45%,transparent);background:color-mix(in srgb,var(--surface) 85%,transparent);color:var(--sub);font-weight:500}
footer>#gotIt .icon{width:15px;height:15px;stroke-width:2}
footer>#gotIt:hover{color:var(--ink,#30333a);background:var(--surface)}
footer:has(#ideaNext:not([hidden]))>#gotIt{display:none}
footer:has(#ideaNext:not([hidden])):not(:has(>#selection:not([hidden]))):not(:has(>#nextSteps:not([hidden])))>#caption{transform:none}
/* «↻ أعد» on each finished card's title strip, at its inline end; the number badges (ideas.js) */
#ideaReplays,#ideaBadges{position:absolute;inset:0;z-index:4;pointer-events:none}
.ideaReplay{position:absolute;pointer-events:auto;min-height:0;height:22px;min-width:0;padding:0 7px 0 6px;gap:3px;border-radius:999px;font-size:11px;font-weight:600;line-height:1;color:var(--accent);background:color-mix(in srgb,var(--surface) 95%,transparent);border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));box-shadow:0 1px 3px #26202a1a}
.ideaReplay .icon{width:12px;height:12px;stroke-width:2;flex:none}
.ideaReplay.tight{padding:0;aspect-ratio:1;justify-content:center}
.ideaReplay.tight span{display:none}
.ideaReplay::before{content:"";position:absolute;inset:-10px -6px 0}
.ideaBadge{position:absolute;display:inline-grid;place-items:center;height:22px;aspect-ratio:1;border-radius:50%;background:var(--c,#2F6FDB);color:#fff;
  font:600 12px/1 var(--font-ui,system-ui);box-shadow:0 0 0 2px #ffffffd9,0 1px 3px #26202a26;direction:ltr}
.ideaBadge.tight{font-size:10.5px;box-shadow:0 0 0 1.5px #ffffffd9}
.ideaReplay.tight .icon{width:70%;height:70%}
/* above a card whose strip is too short (a phone): the same size floor, the hit area off the card */
.ideaReplay.out::before{inset:-10px -8px 0}
@media(prefers-reduced-motion:no-preference){.ideaBadge{animation:badgeIn .36s cubic-bezier(.16,1,.3,1)}}
@keyframes badgeIn{from{opacity:0;transform:scale(.7)}}
/* the older cards of the slide step back once a newer one starts (only on the live board) */
#ink .cardEase{transition:opacity .5s cubic-bezier(.16,1,.3,1),scale .5s cubic-bezier(.16,1,.3,1)}
#ink .olderCard{opacity:.6!important;scale:.94;transform-box:view-box;transform-origin:var(--card-o,50% 50%)}
#ink .cardEase:not(.olderCard){transform-box:view-box;transform-origin:var(--card-o,50% 50%)}
@media(prefers-reduced-motion:reduce){#ink .cardEase{transition:none}}
/* the speed control on the status line, at its end: 0.75× / 1× / 1.25× */
.sessionLine{position:relative}
#speedDock{position:absolute;inset-inline-end:0;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;gap:2px;padding:2px;border-radius:10px;background:color-mix(in srgb,var(--line) 45%,var(--paper));direction:ltr}
#speedDock button{min-height:22px;min-width:40px;padding:0 6px;border:0;border-radius:8px;background:transparent;color:var(--sub);font-size:12px;font-weight:500;font-variant-numeric:tabular-nums}
#speedDock button[aria-pressed=true]{background:var(--paper);color:var(--accent);font-weight:650;box-shadow:0 1px 3px #3a2a2a24}
@media(max-width:640px){.sessionLine{justify-content:space-between;gap:6px}#speedDock{position:static;transform:none;flex:none}#speedDock button{min-height:26px;min-width:36px;padding:0 4px}.sessionLine #status{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}}
/* silent mode reads, then watches: the reading bar, then the sentence steps back */
#caption.reading{cursor:pointer}
#caption.reading::after,#caption.dim::after{content:"";display:block;height:2px;margin:6px 0 1px;border-radius:2px;background:currentColor;opacity:.55;transform-origin:100% 50%}
#caption.reading::after{animation:readBar var(--read-ms,2s) linear var(--read-delay,0ms) both}
#caption.dim::after{opacity:.2}
#caption.held::after{animation-play-state:paused}
#caption.dim{opacity:.55;transition:opacity .3s ease-out}
@keyframes readBar{from{transform:scaleX(0)}to{transform:scaleX(1)}}
