/* Shared interaction rules, applied after themes and feature styles. */
:root{--orange:#ab4930;--orange-dark:#93412e;--muted:#536171}
[hidden]{display:none!important}
:focus-visible{outline:3px solid #246eac!important;outline-offset:3px}
button,summary{min-height:44px;min-width:44px;touch-action:manipulation}
.flashcard:focus-visible{outline:3px solid #246eac;outline-offset:3px}
.card-prompt,.answer-text,.match-item,.choice-option,.recovery-warning,.conflict-list{overflow-wrap:anywhere}
.card-meta{position:static;width:100%;flex-wrap:wrap;margin-bottom:12px}
.card-prompt{margin-top:0}
.flashcard{padding-top:24px;touch-action:pan-y}
.study-heading{flex-wrap:wrap}
.sync-status{font-size:.8rem;color:var(--muted);margin:0 0 16px}
.error{color:#a02c20!important}
.recovery-warning{padding:16px;border:2px solid #a02c20;border-radius:10px;margin-bottom:16px;background:var(--panel)}
.recovery-warning button{color:var(--ink);background:var(--panel);border:1px solid var(--ink);border-radius:8px}
#importPreview{max-height:42vh;overflow:auto;margin:12px 0;white-space:pre-wrap}
#importPreview li{margin-bottom:12px}
#importPreview p{margin:6px 0}
.conflict-list fieldset{min-width:0;margin:12px 0;border:1px solid var(--line)}
.conflict-list label{display:flex;align-items:center;gap:8px}
.conflict-list input{width:24px;height:24px;flex-shrink:0}
dialog{max-height:calc(100dvh - 24px);overflow:auto}
.manage-content{max-height:calc(100dvh - 24px)}
body[data-theme="night"]{--ink:#edf0ff;--muted:#bdc8df;--paper:#171c31;--panel:#242b47;--line:#647399;--orange:#ffb59c;--orange-dark:#ffb59c;--blue:#adcaff}
body[data-theme="night"] .answer-panel,body[data-theme="night"] .next-up,body[data-theme="night"] .deck-settings,body[data-theme="night"] .choice-option,body[data-theme="night"] .match-item,body[data-theme="night"] .rating-buttons button{background:#242b47;color:var(--ink);border-color:var(--line)}
body[data-theme="night"] .primary-button,body[data-theme="night"] .reveal-button{background:#ffb59c;color:#171c31;border-color:#ffb59c}
body[data-theme="night"] .settings-section p,body[data-theme="night"] .form-help,body[data-theme="night"] .card-hint,body[data-theme="night"] .section-kicker,body[data-theme="night"] .switch-row{color:var(--muted)}
body[data-theme="night"] .error{color:#ffb8b0!important}
body[data-theme="night"] .choice-option.correct,body[data-theme="night"] .match-item.solved{background:#193c33;color:#defff2;border-color:#8ecdb8}
body[data-theme="night"] .choice-option.incorrect,body[data-theme="night"] .match-item.incorrect{background:#612e36;color:#fff1ef}
body[data-theme="night"] .choice-feedback.correct{color:#a9e6c7}
body[data-theme="night"] .choice-feedback.incorrect{color:#ffb8b0}
@media(max-width:500px){.manage-content,dialog form{padding:18px}.bulk-toolbar{flex-wrap:wrap}.bulk-toolbar select{max-width:100%}.flashcard{padding:22px 18px}.header-menu summary{min-height:44px}.match-round-grid{gap:8px}.match-item{padding:10px 8px;font-size:.85rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* Keep the study column readable before the sidebar/mobile breakpoint. */
@media(min-width:801px) and (max-width:1150px){.workspace{grid-template-columns:minmax(0,1fr);gap:28px}.content{padding:30px 28px}.progress-panel{max-width:460px;width:100%}.study-heading{align-items:flex-start}.match-round-trigger{white-space:normal}}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
body[data-theme="night"] .secondary-button{background:#242b47;color:var(--ink)}
