.flashcards {min-width:0}
.fc-header .eyebrow{margin:0 0 12px}.fc-message:empty {display:none}.fc-message {padding:1rem;border-radius:12px;background:var(--light);overflow-wrap:anywhere}.fc-message.fc-error{background:var(--orange-light)}
.fc-toolbar,.fc-deck-heading {display:flex;justify-content:space-between;gap:1rem;align-items:center;margin:1.5rem 0}.fc-toolbar p{margin:0}.fc-actions{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center}.fc-actions .btn{min-height:44px}.fc-deck-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));gap:1.25rem}.fc-deck{display:flex;flex-direction:column;gap:1rem}.fc-deck h2{font-size:1.75rem;overflow-wrap:anywhere}.fc-deck p{margin-bottom:0}.fc-deck-count{margin-top:auto;font-weight:600}.fc-deck-count span{color:var(--muted);font-weight:400}.fc-empty{grid-column:1/-1}.fc-editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem;align-items:start}.fc-editor{max-width:700px}.fc-editor h2,.fc-warning h2{font-size:2rem}.flashcards label{display:grid;gap:.45rem;margin:1rem 0;font-weight:600}.flashcards input,.flashcards textarea,.flashcards select{max-width:100%;min-width:0;width:100%;font-size:16px;line-height:1.5;padding:.75rem;border:1px solid var(--line);border-radius:9px;background:var(--white);color:var(--ink)}.flashcards textarea{resize:vertical}.fc-note-list{max-height:650px;overflow:auto;margin-top:1rem}.fc-note{padding:1rem 0;border-top:1px solid var(--line);overflow-wrap:anywhere}.fc-note p{white-space:pre-wrap}.fc-note-front{font-weight:600}.fc-note .btn{padding:.5rem 1rem}.fc-warning{border:1px solid var(--gold);margin-bottom:1.5rem}.fc-warning .fc-check{display:flex;align-items:flex-start;gap:.75rem;font-weight:400}.fc-check input{width:22px;min-width:22px;height:22px;margin-top:3px}.fc-study{margin:1.5rem auto;max-width:760px;text-align:center;padding:clamp(1.25rem,4vw,3rem)}.fc-question,.fc-answer{white-space:pre-wrap;overflow-wrap:anywhere;font-size:clamp(1.4rem,3vw,2.25rem);margin:2rem 0}.fc-answer{font-size:clamp(1.2rem,2.5vw,1.8rem)}.fc-study hr{border:0;border-top:1px solid var(--line);margin:2rem 0}.fc-grades{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.fc-grades button{min-height:56px}.fc-grades [data-fc="remembered"]{background:var(--green);color:var(--white)}.fc-grades [data-fc="forgotten"]{background:var(--orange-light)}
@media(max-width:800px){.fc-editor-grid{grid-template-columns:1fr}.fc-toolbar,.fc-deck-heading{align-items:flex-start;flex-direction:column}.fc-note-list{max-height:none}.flashcards .panel{padding:1.25rem}.fc-deck-heading h2{font-size:2rem}.fc-actions .btn{white-space:normal;text-align:center}.fc-toolbar .fc-actions{width:100%}.fc-toolbar .fc-actions .btn{flex:1 1 135px}}
@media(max-width:380px){.fc-grades{gap:.5rem}.fc-grades .btn{padding:.7rem .5rem}.flashcards .panel{padding:1rem}}
.fc-question table,.fc-answer table{max-width:100%;font-size:1rem;border-collapse:collapse}.fc-question td,.fc-answer td,.fc-question th,.fc-answer th{padding:.35rem;border:1px solid var(--line)}.fc-pagination{margin-top:1rem}
.fc-export{position:relative}.fc-export summary{list-style:none;cursor:pointer;min-height:44px}.fc-export summary::-webkit-details-marker{display:none}.fc-export>div{position:absolute;z-index:5;right:0;top:calc(100% + 6px);min-width:250px;max-width:min(310px,calc(100vw - 48px));padding:.5rem;background:var(--white);border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 30px #243e3420}.fc-export a{display:block;padding:.65rem;border-radius:8px}.fc-export a:hover,.fc-export a:focus{background:var(--light)}.fc-export small{display:block;color:var(--muted);font-size:.8rem}.fc-limits{margin:0 0 1.5rem;color:var(--muted);font-size:.9rem}.fc-limits summary{cursor:pointer}.fc-limits p{margin:.6rem 0;max-width:800px}
@media(max-width:600px){.fc-export>div{right:auto;left:0}}
/* Keep controls balanced against the available content width, including the sidebar. */
.flashcards{container-type:inline-size}
.flashcards .btn{max-width:100%;white-space:normal;text-align:center;overflow-wrap:anywhere;min-height:44px}
.flashcards h2,.flashcards p{overflow-wrap:anywhere}
.fc-deck-heading{display:block}
.fc-deck-heading>div:first-child{max-width:780px}
.fc-deck-heading .fc-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));max-width:760px;margin-top:1.25rem;align-items:start}
.fc-deck-heading .fc-actions>.btn,.fc-deck-heading .fc-export summary{width:100%;height:100%;min-height:48px;padding:.75rem 1rem}
.fc-deck-heading .fc-actions>.btn:first-child{background:var(--green);color:var(--white)}
.flashcards [data-fc="delete-deck"],.flashcards [data-fc="delete-note"]{color:#92432d}
.fc-editor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.fc-editor-grid>*{min-width:0}
.fc-editor-grid h2{font-size:2rem}
[data-fc-view]>button+.panel{margin-top:1.5rem}
.fc-toolbar{align-items:flex-start;flex-direction:column}
.fc-toolbar>.fc-actions{display:flex;gap:.75rem;width:100%}
.fc-toolbar .fc-actions>.btn{flex:0 0 auto}
.fc-toolbar .text-link{padding:.7rem .25rem;min-height:44px}
.fc-export>div{min-width:0;width:280px;max-width:calc(100vw - 48px);overflow-wrap:anywhere}
.fc-question,.fc-answer{min-width:0;overflow-x:auto}
.fc-question pre,.fc-answer pre{white-space:pre-wrap;overflow-wrap:anywhere}
.fc-question table,.fc-answer table{display:block;overflow-x:auto}
.fc-pagination{justify-content:space-between}
@container(max-width:700px){
 .fc-editor-grid{grid-template-columns:1fr}
 .fc-note-list{max-height:none}
 .fc-deck-heading .fc-actions{grid-template-columns:repeat(2,minmax(0,1fr));max-width:480px}
 .fc-deck-heading .fc-actions>.fc-export{grid-column:1;grid-row:2}
 .fc-deck-heading .fc-actions>[data-fc="delete-deck"]{grid-column:2;grid-row:2}
 .fc-deck-heading .fc-export summary{width:100%}
 .fc-export>div{position:static;margin-top:.5rem;width:100%;max-width:100%}
 .flashcards .panel{padding:1.25rem}
}
@container(max-width:440px){
 .fc-toolbar>.fc-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
 .fc-toolbar .fc-actions>.fc-export{grid-column:1;grid-row:2}
 .fc-toolbar .fc-export summary{width:100%}
 .fc-toolbar .text-link{grid-column:2;grid-row:2;text-align:center}
 .fc-toolbar .btn{width:100%;padding:.75rem .5rem}
 .flashcards .panel{padding:1rem}
 .fc-deck-heading h2{font-size:2rem}
}
.fc-deck-heading .fc-actions>[data-fc="delete-deck"]{align-self:start;height:auto}
/* A personal collection, using the same sage, paper and ink as the learning pages. */
.fc-collection-summary{display:flex;align-items:center;gap:1.25rem;padding:1.5rem 1.75rem;background:var(--light);border:1px solid var(--line);border-radius:20px}
.fc-collection-summary>div:first-of-type{flex:1;min-width:0}
.fc-collection-summary h2{font-size:clamp(1.55rem,3cqi,2rem);margin:0 0 .4rem}
.fc-collection-summary p{font-size:.95rem;margin:0;max-width:580px;color:var(--muted)}
.fc-stack-mark{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:54px;height:54px;color:var(--green)}
.fc-stack-mark svg{width:42px;height:42px}
.fc-summary-count{display:flex;flex-direction:column;align-items:center;flex-shrink:0;border-left:1px solid var(--line);padding-left:1.5rem}
.fc-summary-count strong{font-family:var(--serif,Georgia,serif);font-size:2.5rem;font-weight:400;line-height:1.1}
.fc-summary-count span{font-size:.8rem;color:var(--muted);margin-top:.35rem}
.fc-deck-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr))}
.fc-deck{border-top:3px solid var(--green);box-shadow:0 5px 16px #243e3406}
.fc-deck-top{display:flex;align-items:center;justify-content:space-between;gap:.75rem}
.fc-deck-top .fc-stack-mark{width:38px;height:38px}
.fc-deck-top svg{width:32px;height:32px}
.fc-deck-top .badge{font-size:.65rem;letter-spacing:.06em;white-space:normal;text-align:right}
.fc-deck .fc-actions{padding-top:1rem;border-top:1px solid var(--line)}
.fc-deck [data-ready="true"]{background:var(--green);color:var(--white)}
.fc-deck-count{font-size:1.15rem}.fc-deck-count span{font-size:.85rem}
.fc-empty{background:var(--light)}.fc-empty .fc-stack-mark{margin-bottom:1rem}
.fc-face-label{font-size:.7rem;text-transform:uppercase;letter-spacing:.15em;color:var(--muted);margin:1.5rem 0 .75rem}
.fc-face-label+.fc-question,.fc-face-label+.fc-answer{margin-top:.75rem}
.fc-study{border-top:3px solid var(--green)}
.fc-import-notice{padding:1rem 1.1rem;background:var(--light);border-radius:12px;font-weight:600}
.fc-import-notice span{font-weight:400;color:var(--muted)}
.fc-import-details{margin:1rem 0}.fc-import-details summary{cursor:pointer;color:var(--green);font-size:.9rem}.fc-import-details p{margin-top:.75rem}
@container(max-width:600px){.fc-collection-summary{padding:1.25rem;gap:1rem}.fc-collection-summary>.fc-stack-mark{display:none}.fc-summary-count{padding-left:1rem}.fc-summary-count strong{font-size:2rem}}
@container(max-width:380px){.fc-collection-summary{flex-wrap:wrap}.fc-summary-count{flex-direction:row;gap:.75rem;border-left:0;border-top:1px solid var(--line);padding:1rem 0 0;width:100%;align-items:center}.fc-summary-count span{margin:0}}
/* Programmatically focused reading targets are not interactive controls. */
.flashcards h2[tabindex="-1"]:focus,.fc-question:focus,.fc-answer:focus{outline:none}
@container(max-width:600px){.fc-collection-summary h2{font-size:1.4rem;margin:0}.fc-collection-summary p{display:none}}
.fc-storage{margin:0 0 1.25rem;padding:1rem;border:1px solid var(--line);border-radius:12px;min-width:0}.fc-storage label{display:block;font-size:14px}.fc-storage meter{display:block;width:100%;height:1rem;margin:.5rem 0}.fc-storage p{margin:0;overflow-wrap:anywhere}
/* Focused recall shares the course session frame; collection pages stay in the app shell. */
html:has(.fc-focused),body:has(.fc-focused){height:100%;overflow:hidden}
.app-shell:has(.fc-focused){display:block;height:100dvh;min-height:0;overflow:hidden}
.app-shell:has(.fc-focused)>.sidebar,.app-shell:has(.fc-focused) .app-topbar,.app-shell:has(.fc-focused) #app-mobile-nav,.fc-focused>.fc-header{display:none}
.app-shell:has(.fc-focused) .app-main{height:100%;min-height:0}
.app-shell:has(.fc-focused) .app-content{height:100%;min-height:0;max-width:none;padding:0 max(16px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-bottom));overflow:hidden}
.fc-focused{height:100%;display:flex;flex-direction:column;max-width:1140px;margin:auto;min-height:0}
.fc-focused .fc-message:empty{display:none}.fc-focused .fc-message{margin:.5rem 0;flex-shrink:0}
.fc-focused [data-fc-view]{flex:1;min-height:0}.fc-study-workspace{height:100%;display:flex;flex-direction:column;gap:12px;min-height:0}
.fc-study-workspace .brand{font-size:21px}.fc-study-workspace .brand img{width:30px;height:30px}.fc-study-workspace .lesson-workspace-bar>button{min-height:44px}
.fc-session-meta{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-shrink:0;width:100%;max-width:860px;margin:0 auto}.fc-session-meta h1{font-size:20px;margin:0;overflow-wrap:anywhere}.fc-session-meta>span{font-size:13px;color:var(--muted);flex-shrink:0}
.fc-focused .fc-study{width:100%;max-width:860px;flex:1;min-height:0;max-height:640px;display:flex;flex-direction:column;margin:0 auto auto;padding:0;overflow:hidden;border-radius:18px}
.fc-study-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:clamp(16px,4vh,36px);align-content:center;scrollbar-gutter:stable}
.fc-focused .fc-question,.fc-focused .fc-answer{margin:1rem 0;line-height:1.6}.fc-focused .fc-question>div>p,.fc-focused .fc-answer>div>p{margin:0}
.fc-focused .fc-study hr{margin:1.5rem 0}.fc-study-controls{flex-shrink:0;padding:16px;border-top:1px solid var(--line);background:var(--light)}.fc-study-controls p{margin:0 0 .75rem}.fc-study-controls .fc-grades{max-width:540px;margin:auto}.fc-study-controls .btn{min-height:48px}
.fc-study-scroll table{display:block;max-width:100%;overflow:auto}.fc-study-scroll pre{overflow:auto;white-space:pre-wrap;max-width:100%}
@media(max-width:600px){.fc-study-workspace{gap:8px}.fc-study-workspace .lesson-workspace-bar{gap:8px}.fc-study-workspace .lesson-workspace-bar>span:last-child{display:none}.fc-session-meta{align-items:flex-start}.fc-session-meta h1{font-size:17px}.fc-session-meta>span{font-size:12px}.fc-focused .fc-study{max-height:none}.fc-focused .fc-study-controls{padding:12px}.fc-grades{gap:.75rem}}
@media(max-height:500px){.fc-study-workspace .lesson-workspace-bar{min-height:44px;padding:0}.fc-session-meta{display:none}.fc-study-controls{padding:8px}.fc-study-controls p{display:none}.fc-study-scroll{padding:12px}}
.fc-session-meta h1{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.fc-study-scroll{align-content:safe center}
.fc-focused .fc-study{max-height:520px}@media(max-width:600px){.fc-focused .fc-study{max-height:none}}

.flashcards:not(.fc-focused) .fc-editor h2,.flashcards:not(.fc-focused) .fc-editor-grid h2,.flashcards:not(.fc-focused) .fc-warning h2{font-size:25px}.fc-deck-heading h2{font-size:var(--member-title-size);line-height:1.15}
