.study-shell { width: min(100%, 730px); margin-inline: auto; }
.study-modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.study-modes .button[aria-current] { border-color: #929662; color: #edf0c5; background: #363927; }
.study-shortcut.button { grid-column: 1 / -1; justify-self: end; color: #ead39c; }
.study-shortcut .icon, .study-modes [data-action="open-crash-course"] .icon { color: #e3c07b; }
.crash-sections { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.crash-section { padding: clamp(13px, 3vw, 20px); border-color: #61533d; background: #2b2821; }
.crash-section h2 { margin-bottom: 6px; color: #eed6a0; font-size: 1.16rem; overflow-wrap: anywhere; }
.crash-section p { color: #eee4d0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.crash-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 13px; }
.crash-actions > p { flex: 1 1 230px; }
.study-shell > .empty .crash-actions { justify-content: center; margin-top: 0; }
.study-card-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.study-card-tools p { color: var(--muted); font-weight: 690; }
.study-card { display: block; width: 100%; min-height: clamp(228px, 40vh, 370px); padding: 0; color: var(--text); text-align: left; background: #292c24; border-color: #616449; }
.study-card:hover { border-color: #a3aa70; }
.study-card-face { display: grid; min-height: inherit; align-content: space-between; gap: 30px; padding: clamp(16px, 4vw, 30px); }
.study-side { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px; font-size: .85rem; font-weight: 700; color: #e7d298; }
.study-side > span { display: inline-block; padding: 2px 6px; border: 1px solid #71664a; border-radius: 5px; color: #e8dcc3; }
.study-card-word { font-size: clamp(1.5rem, 4vw, 2.3rem); line-height: 1.28; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 700; }
.study-card-command { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .88rem; }
.study-card-command > .icon { color: var(--accent); }
.study-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 13px; }
.study-direction-picker { display: grid; gap: 9px; padding: 15px; }
.study-direction-picker h2 { margin-bottom: 5px; }
.study-direction-picker .button { justify-content: flex-start; text-align: left; }
.study-direction-picker .button > span { flex: 1; }
.study-shell > .progress { margin: 0 0 10px; }
.drill-card { display: grid; gap: 11px; margin-top: 9px; padding: clamp(15px, 4vw, 26px); border-color: #616449; background: #282b23; }
.drill-form, .drill-result { display: grid; gap: 11px; margin-top: 8px; }
.drill-form > .button, .drill-result > .button { justify-self: start; }
.drill-result > strong { display: flex; align-items: center; gap: 7px; color: #e6c889; }
.drill-result.is-correct > strong { color: var(--accent); }
.drill-result > p { display: grid; gap: 3px; color: #f6ecd4; overflow-wrap: anywhere; white-space: pre-wrap; }
.drill-result > p > span { color: var(--muted); font-size: .81rem; }
.quiz-vocabulary { display: grid; gap: 9px; min-width: 0; padding: 0; border: 0; }
.quiz-vocabulary legend { margin-bottom: 8px; font-size: .91rem; color: var(--muted); }
.vocabulary-prompt { margin: 0; padding: 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.vocabulary-prompt .field span { display: grid; gap: 3px; overflow-wrap: anywhere; }
.vocabulary-prompt small { color: #cfc39e; }
.vocabulary-results { display: grid; gap: 5px; margin: 10px 0 0; padding: 0; list-style: none; }
.vocabulary-results li { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; padding: 6px 7px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.vocabulary-results li span { color: #e3c68c; font-size: .83rem; }
.vocabulary-results li.is-correct span { color: var(--accent); }
.cloze-template { padding: 13px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; line-height: 2; }
.cloze-template input { display: inline-block; width: clamp(86px, 23vw, 170px); max-width: 100%; min-height: 44px; margin: 2px 3px; padding: 5px 7px; border: 1px solid #9a8150; border-radius: 6px; color: var(--text); background: #343326; vertical-align: middle; }
.cloze-template input::placeholder { color: #d6c496; opacity: 1; }
.cloze-template + .feedback { margin-top: 11px; }
.cloze-gap-text { color: #dbca92; }

@media (max-width: 500px) {
  .study-actions > .button { flex: 1; min-width: 0; }
  .study-card-face { gap: 22px; }
}
