/* Five study formats share one account plan; no provider settings or fake progress. */
.study-format-tabs { display:flex; align-items:stretch; gap:7px; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; padding:4px 1px 9px; margin-bottom:7px; flex:none; }
.study-format-tab { display:flex; align-items:center; justify-content:center; min-height:48px; flex:0 0 auto; padding:10px 14px; border:1px solid #e6def4; border-radius:12px; background:#fff; color:#756380; font-size:13px; font-weight:600; white-space:nowrap; }
.study-format-tab.is-selected { color:#fff; background:#6d3df5; border-color:#6d3df5; }
.study-format-tab:focus-visible { outline:3px solid #c2a9ff; outline-offset:2px; }
.study-format-progress { flex:none; display:flex; justify-content:space-between; align-items:center; gap:13px; padding:6px 1px 12px; font-size:12px; color:#8b7b99; }
.study-format-progress>div { display:flex; align-items:baseline; gap:7px; }
.study-format-progress strong { color:#5d329e; font-size:15px; }
.study-format-progress p { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:3px 11px; }
.study-format-progress b { color:#6b5281; font-weight:650; }
.study-challenge-header { min-height:58px; }
.study-challenge-header>div>span { font-size:12px; color:#9383a0; }
.purple-study-challenge { max-width:620px; height:auto; min-height:calc(100dvh - 60px); }
.study-challenge-body { flex:1; min-height:0; overflow:visible; padding:1px 2px 15px; }
.study-challenge-state { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:29px; margin-bottom:12px; }
.study-challenge-state>span:last-child:not(.study-state-badge) { color:#9a87a8; font-size:11px; }
.study-state-badge { display:inline-flex; border-radius:7px; background:#f2ecfc; color:#8b67b2; font-size:11px; line-height:1.3; font-weight:600; padding:6px 9px; }
.study-state-badge.is-learning { color:#9d722d; background:#fff2db; }
.study-state-badge.is-review { color:#397e5b; background:#eaf7ef; }
.study-card-state { color:#896ca5; font-weight:600; }
.study-card-state.is-learning { color:#a17a3b; }
.study-card-next-due { margin-top:9px; color:#9c8ba8; font-size:10px; line-height:1.5; }
.study-cards-error { flex:none; font-size:12px; padding:10px 12px; margin-bottom:8px; }
.study-challenge-picture { width:100%; height:clamp(110px,21dvh,220px); border-radius:14px; overflow:hidden; background:#f5f2fa; margin-bottom:18px; }
.study-challenge-picture>img { display:block; width:100%; height:100%; object-fit:contain; }
.study-prompt-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; }
.study-prompt-heading>div { min-width:0; }
.study-prompt-heading>div>span { color:#94829f; font-size:12px; }
.study-prompt-heading .study-challenge-prompt { font:750 27px/1.25 var(--sans); color:#30213c; margin:6px 0 0; overflow-wrap:anywhere; }
.study-sound-button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-width:64px; min-height:60px; border:0; padding:9px; background:#f3edff; color:#6d3df5; border-radius:13px; font-size:10px; flex:none; }
.study-sound-button svg { width:22px; height:22px; }
.study-quiz-options { display:grid; gap:10px; }
.study-quiz-option { display:flex; align-items:center; gap:12px; text-align:left; width:100%; min-height:54px; border:1px solid #e7ddf1; border-radius:13px; background:#fff; color:#4d385e; padding:12px 15px; font-size:16px; line-height:1.4; }
.study-quiz-option:hover:not(:disabled) { background:#faf6ff; border-color:#bea4f3; }
.study-option-number { display:grid; place-items:center; width:24px; height:24px; flex:0 0 24px; border-radius:7px; background:#f4effb; color:#a28bb1; font-size:11px; }
.study-answer-slots { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:7px; min-height:62px; padding:15px 10px; margin-bottom:7px; background:#faf7ff; border:1px solid #eee4fa; border-radius:14px; }
.study-letter-slot { display:grid; place-items:center; width:30px; min-height:40px; border-bottom:2px solid #cab4ed; color:#bda9d1; font-size:25px; font-weight:650; }
.study-letter-slot.is-filled { border-color:#8b63de; color:#593991; }
.study-fixed-slot { white-space:pre; color:#8c75a5; font-size:22px; line-height:1.4; }
.study-fixed-slot.is-space { width:12px; }
.study-word-slot { display:inline-flex; align-items:center; justify-content:center; padding:6px 9px; min-height:38px; min-width:43px; border-bottom:2px solid #dac9ee; color:#baa6cd; font-size:17px; border-radius:4px; }
.study-word-slot.is-filled { color:#5b398e; background:#f0e7fd; border-color:#a480dd; }
.study-answer-slots.is-sentence { justify-content:flex-start; }
.study-assembly-tools { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:15px; }
.study-assembly-tools .button { min-height:48px; padding:8px 5px; font-size:12px; }
.study-tile-bank { display:grid; grid-template-columns:repeat(5,minmax(48px,1fr)); gap:8px; padding:0 1px; margin-bottom:18px; }
.study-letter-tile { display:flex; align-items:center; justify-content:center; min-height:49px; min-width:48px; padding:10px 8px; border:1px solid #d8c8ee; border-bottom-width:3px; border-radius:12px; background:#fff; color:#65418f; font-size:23px; line-height:1.2; font-weight:650; }
.study-letter-tile:disabled { color:#b8a6c9; background:#f8f5fc; border-color:#eae1f3; opacity:.48; }
.study-tile-bank.is-sentence { display:flex; flex-wrap:wrap; gap:9px; }
.study-tile-bank.is-sentence .study-letter-tile { flex:0 0 auto; font-size:16px; padding:11px 14px; }
.study-assembly-note { color:#9c8ba8; font-size:12px; line-height:1.5; margin-top:12px; }
.study-hint-row { display:flex; align-items:center; gap:13px; margin-top:18px; }
.study-hint-row .button { flex:none; font-size:12px; min-height:48px; padding:10px 12px; }
.study-hint-row p { font-size:11px; color:#9a89a8; line-height:1.45; }
.study-pronunciation { display:grid; justify-items:center; gap:16px; text-align:center; }
.study-pronunciation>p:first-child { font-size:15px; color:#8e7d9c; }
.study-record-button { min-height:64px; display:flex; align-items:center; justify-content:center; gap:10px; padding:15px 22px; font-size:16px; border-radius:18px; }
.study-record-button.is-recording { color:#b13454; background:#fff0f3; border-color:#f4c7d2; }
.study-record-button svg { width:25px; height:25px; }
.study-record-status { color:#8b78a0; font-size:12px; }
.study-pronunciation-note { color:#a08daa; font-size:12px; line-height:1.6; max-width:370px; }
.study-answer-feedback { border:1px solid #edcdd7; border-radius:14px; background:#fff7f9; padding:17px 18px; margin-top:20px; }
.study-answer-feedback.is-correct { border-color:#d3eadb; background:#f3fbf6; }
.study-answer-feedback.is-assisted { border-color:#ead9b8; background:#fffbf1; }
.study-answer-feedback h2 { display:flex; align-items:center; gap:8px; font-size:18px; line-height:1.3; color:#a14f6a; margin:0 0 10px; }
.study-answer-feedback.is-correct h2 { color:#3a8158; }
.study-answer-feedback.is-assisted h2 { color:#a07839; }
.study-answer-feedback p { color:#866a78; font-size:13px; line-height:1.55; margin-top:8px; }
.study-answer-feedback .study-revealed-answer { font-size:21px; font-weight:700; color:#51336b; }
.study-answer-feedback .study-next-due { color:#8c7f97; font-size:11px; }
.study-answer-feedback .study-recognized { color:#745c84; }
.study-submission-status { margin-top:16px; color:#8c6eb2; font-size:13px; }
.study-challenge-footer { flex:none; border-top:1px solid #eee5f6; padding:12px 2px 2px; margin-top:8px; }
.study-challenge-footer .button { min-height:50px; font-size:15px; }
.study-feedback-actions { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:9px; }
.study-feedback-actions .button { padding:10px 9px; font-size:13px; }
.study-format-empty { flex:1; min-height:0; overflow-y:auto; padding:30px 20px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:15px; }
.study-format-empty h2 { font-size:23px; color:#59406e; }
.study-format-empty>p { max-width:390px; color:#8b779a; font-size:14px; line-height:1.65; }
.study-format-empty .button { max-width:360px; min-height:49px; }
.study-empty-icon { display:grid; place-items:center; width:66px; height:66px; border-radius:19px; color:#9977cd; background:#f5efff; }
.study-empty-icon svg { width:29px; height:29px; }
.purple-app.large-text .study-challenge-prompt { font-size:30px; }
.purple-app.large-text .study-quiz-option { font-size:20px; }
.purple-app.large-text .study-word-slot,.purple-app.large-text .study-tile-bank.is-sentence .study-letter-tile { font-size:20px; }
.purple-app.large-text .study-answer-feedback p { font-size:17px; }
@media(max-width:899px) {
  /* One screen scrolls as a whole when an exercise is long; its text/tiles do not. */
  .purple-study-challenge { display:block; height:100dvh; min-height:0; overflow-y:auto; overscroll-behavior-y:contain; padding:8px 16px max(12px,env(safe-area-inset-bottom)); }
  .purple-study-challenge .study-challenge-footer { position:sticky; bottom:calc(-1 * max(12px,env(safe-area-inset-bottom))); z-index:2; margin-top:8px; padding:10px 0 max(12px,env(safe-area-inset-bottom)); background:#fff; box-shadow:0 -8px 16px #ffffffeb; }
  .study-format-tabs { margin-bottom:4px; padding-bottom:8px; }
  .study-format-tab { font-size:12px; min-height:44px; padding:9px 12px; }
  .study-format-progress { padding:3px 1px 6px; font-size:10px; gap:9px; }
  .study-format-progress>div { display:flex; gap:0; }
  .study-format-progress>div>span { display:none; }
  .study-format-progress strong { font-size:14px; }
  .study-format-progress p { gap:2px 9px; font-size:10px; }
  .study-challenge-header { min-height:48px; padding-bottom:6px; }
  .study-challenge-header>div>span { font-size:10px; }
  .study-challenge-picture { height:clamp(64px,12dvh,108px); margin-bottom:10px; }
  .study-challenge-state { min-height:23px; margin-bottom:7px; }
  .study-challenge-state>span:last-child:not(.study-state-badge) { font-size:10px; }
  .study-state-badge { font-size:10px; }
  .study-prompt-heading { margin-bottom:10px; gap:10px; }
  .study-prompt-heading .study-challenge-prompt { font-size:23px; }
  .study-prompt-heading>div>span { font-size:11px; }
  .study-sound-button { min-width:58px; min-height:58px; font-size:9px; padding:7px; }
  .study-quiz-options { gap:7px; }
  .study-quiz-option { min-height:48px; font-size:15px; line-height:1.3; padding:9px 12px; }
  .study-answer-slots { padding:13px 8px; gap:6px; }
  .study-letter-slot { width:27px; min-height:38px; font-size:24px; }
  .study-tile-bank { gap:7px; }
  .study-letter-tile { min-height:49px; font-size:22px; }
  .study-hint-row { flex-wrap:wrap; gap:8px; }
  .study-hint-row p { flex:1; min-width:140px; }
  .study-format-empty { padding:22px 12px; }
}
@media(prefers-reduced-motion:reduce) { .study-challenge-body,.study-format-tabs { scroll-behavior:auto; } }
