/* Flashcards share the room's color tokens and account frame. */
.fc-layout { min-width: 0; }
.fc-main { max-width: 1350px; width: 100%; outline: none; }
.fc-setup-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.fc-materials, .fc-settings { padding: 26px; min-width: 0; }
.fc-materials .section-heading { justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fc-caption { color: var(--muted); font-size: 12px; }
.fc-tree-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 16px; }
.fc-tree-toolbar > span { color: var(--muted); font-size: 12px; }
.fc-tree-toolbar > div { display: flex; gap: 12px; }
.fc-tree-toolbar button { border: 0; background: transparent; color: var(--blue); padding: 6px 0; font-size: 12px; font-weight: 600; }
.fc-tree-toolbar button:hover { text-decoration: underline; }
.fc-tree { border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
.fc-tree-node { position: relative; min-width: 0; }
.fc-tree-node + .fc-tree-node { margin-top: 4px; }
.fc-tree-branch > summary, .fc-leaf-label { display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 10px 104px 10px 12px; border: 1px solid transparent; border-radius: 8px; }
.fc-tree-branch > summary { cursor: pointer; list-style: none; }
.fc-tree-branch > summary::-webkit-details-marker { display: none; }
.fc-tree-branch > summary::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; flex: 0 0 auto; margin-right: 3px; color: var(--muted); }
.fc-tree-branch[open] > summary::before { transform: rotate(45deg); }
.fc-tree-branch > summary:hover { background: #f5f6fa; }
.fc-tree-node.selected > .fc-tree-branch > summary, .fc-tree-leaf.selected > .fc-leaf-label { background: var(--blue-pale); border-color: var(--blue); }
.fc-tree-name { min-width: 0; font-size: 14px; font-weight: 550; line-height: 1.45; overflow-wrap: anywhere; }
.fc-tree-category > .fc-tree-branch > summary .fc-tree-name { font-weight: 650; font-size: 15px; }
.fc-group-count { flex: 0 0 auto; min-width: 25px; padding: 2px 6px; border-radius: 5px; font-size: 11px; font-weight: 600; color: var(--muted); background: #f0f2f6; text-align: center; }
.fc-tree-select { position: absolute; top: 12px; right: 9px; display: inline-flex; justify-content: center; align-items: center; gap: 4px; min-width: 70px; min-height: 30px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 650; }
.fc-tree-select:hover { color: var(--blue); border-color: var(--blue); }
.fc-tree-select.selected { color: var(--blue); border-color: transparent; background: transparent; }
.fc-tree-select .icon { width: 13px; height: 13px; }
.fc-tree-children { margin: 4px 0 8px 18px; padding-left: 12px; border-left: 1px solid var(--line); }
.fc-leaf-label::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #a8afbb; flex: 0 0 auto; margin-inline: 2px 4px; }
.fc-tree :is(button, summary):focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.fc-materials > .field-note { margin-top: 18px; font-size: 13px; }
.fc-settings { position: sticky; top: 20px; }
.fc-order { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.fc-order legend { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.fc-order-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.fc-order-option.selected { background: var(--blue-pale); border-color: var(--blue); }
.fc-order-option input { margin: 4px 0 0; width: 17px; height: 17px; accent-color: var(--blue); flex: 0 0 auto; }
.fc-order-option strong { display: block; font-size: 15px; }
.fc-order-option small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }
.fc-settings .session-brief > span { overflow-wrap: anywhere; }
.fc-session-note { margin-top: 18px; font-size: 13px; }
.fc-empty { max-width: 740px; padding: 42px; }
.fc-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 13px; color: var(--blue); background: var(--blue-pale); margin-bottom: 24px; }
.fc-empty-icon .icon { width: 30px; height: 30px; }
.fc-empty p { margin-top: 16px; color: var(--muted); max-width: 520px; }
.fc-empty p:last-child { font-size: 14px; }
.fc-study-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 28px; }
.fc-study-heading h1 { margin-top: 8px; font-size: clamp(1.9rem, 3vw, 2.7rem); }
.fc-study-heading > .button { flex-shrink: 0; }
.fc-scope { color: var(--muted); font-size: 14px; margin-top: 10px; overflow-wrap: anywhere; }
.fc-progress { max-width: 940px; }
.fc-progress-label { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.fc-progress-label strong { color: var(--ink); }
.fc-progress .progress-track { height: 5px; margin-bottom: 24px; }
.fc-study-card { max-width: 940px; border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: clamp(22px, 4vw, 40px); box-shadow: 0 7px 24px #14253d05; overflow: hidden; }
.fc-card-meta { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.fc-card-meta > :last-child { text-align: right; letter-spacing: 0; font-size: 12px; overflow-wrap: anywhere; }
.fc-side { padding: 28px 0 30px; min-height: 260px; }
.fc-side-label { color: var(--blue); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 22px; }
.fc-card-content { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.8; overflow-wrap: anywhere; outline: none; }
.fc-card-content > * + * { margin-top: 14px; }
.fc-card-content :is(h1, h2, h3, h4, h5, h6) { font: inherit; font-size: 1.15em; font-weight: 650; line-height: 1.5; margin-block: 12px; }
.fc-card-content :is(ul, ol) { padding-inline-start: 1.4em; }
.fc-card-content li + li { margin-top: 6px; }
.fc-card-content img { display: block; max-width: 100%; height: auto; max-height: 65vh; object-fit: contain; margin: 14px auto; border-radius: 5px; background: white; }
.fc-card-content audio { max-width: 100%; display: block; margin: 15px auto; }
.fc-card-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .85em; }
.fc-card-content :is(th, td) { padding: 8px 12px; border: 1px solid var(--line); }
.fc-card-content hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.fc-card-content blockquote { border-inline-start: 3px solid var(--line); margin-inline: 0; padding-inline-start: 18px; }
.fc-card-content pre { white-space: pre-wrap; font-size: .85em; }
.fc-card-content .cloze { font-weight: 650; color: var(--blue); }
.fc-card-actions { border-top: 1px solid var(--line); padding-top: 25px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.fc-card-actions > p { color: var(--muted); font-size: 14px; }
.fc-card-actions .button { min-height: 51px; }
.fc-show { min-width: 180px; }
.fc-grade-actions { display: flex; gap: 12px; }
.fc-grade-actions .button { gap: 12px; text-align: left; min-width: 164px; justify-content: flex-start; }
.fc-grade-actions small { display: block; font-size: 11px; font-weight: 400; margin-top: 3px; opacity: .85; }
.fc-bottom-note { max-width: 940px; text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
.fc-complete { max-width: 760px; margin: 24px auto; text-align: center; padding: clamp(28px, 5vw, 56px); }
.fc-complete-mark { width: 66px; height: 66px; border-radius: 50%; color: var(--green); background: #e9f5ee; display: grid; place-items: center; margin: 0 auto 24px; }
.fc-complete-mark .icon { width: 34px; height: 34px; }
.fc-complete h1 { margin-top: 12px; font-size: clamp(2rem, 3vw, 2.8rem); }
.fc-complete > p:not(.eyebrow) { margin-top: 17px; }
.fc-complete-scope { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.fc-complete-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 30px auto; padding: 25px 0; border-block: 1px solid var(--line); }
.fc-complete-stats > div + div { border-inline-start: 1px solid var(--line); }
.fc-complete-stats strong { display: block; font-size: 34px; font-weight: 600; }
.fc-complete-stats span { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.fc-complete-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.fc-complete > .field-note { font-size: 13px; }
.fc-unavailable { padding: 40px; }
.fc-unavailable p { margin-top: 16px; }
body.dark-mode :is(.fc-tree, .fc-tree-select, .fc-study-card) { background: #182536; }
body.dark-mode .fc-order-option.selected { background: var(--blue-pale); }
body.dark-mode .fc-group-count { background: #26364b; }
body.dark-mode .fc-tree-branch > summary:hover { background: #223149; }
body.dark-mode .fc-tree-select.selected { background: transparent; }
body.dark-mode .fc-complete-mark { background: #183d32; }
@media (max-width: 1250px) {
  .fc-setup-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
  .fc-materials, .fc-settings { padding: 22px; }
}
@media (max-width: 1050px) {
  .fc-setup-grid { grid-template-columns: 1fr; }
  .fc-settings { position: static; grid-row: 1; }
  .fc-order { grid-template-columns: 1fr 1fr; }
  .fc-card-actions { align-items: stretch; flex-direction: column; gap: 16px; }
  .fc-grade-actions > .button { flex: 1; justify-content: center; }
  .fc-show { align-self: flex-end; }
}
@media (max-width: 760px) {
  .fc-study-heading { gap: 14px; }
  .fc-study-heading > .button { padding: 11px 13px; font-size: 12px; }
  .fc-progress-label { flex-wrap: wrap; gap: 5px 16px; }
  .fc-empty { padding: 27px; }
  .fc-card-meta { gap: 16px; font-size: 10px; padding-bottom: 18px; }
  .fc-side { padding-block: 22px; min-height: 245px; }
  .fc-card-content { font-size: 18px; }
  .fc-complete { margin-top: 0; }
}
@media (max-width: 470px) {
  .fc-study-heading { flex-direction: column; }
  .fc-study-heading > .button { align-self: flex-end; }
  .fc-materials, .fc-settings { padding: 18px; }
  .fc-tree { padding: 4px; }
  .fc-tree-children { margin-left: 8px; padding-left: 8px; }
  .fc-tree-branch > summary, .fc-leaf-label { padding-left: 6px; padding-right: 78px; gap: 6px; }
  .fc-tree-name { font-size: 12px; }
  .fc-tree-category > .fc-tree-branch > summary .fc-tree-name { font-size: 13px; }
  .fc-group-count { min-width: 20px; font-size: 10px; padding-inline: 4px; }
  .fc-tree-select { min-width: 60px; right: 3px; padding-inline: 5px; font-size: 10px; }
  .fc-tree-select .icon { display: none; }
  .fc-order { grid-template-columns: 1fr; }
  .fc-show { width: 100%; }
  .fc-grade-actions { gap: 10px; }
  .fc-grade-actions .button { min-width: 0; padding: 12px 9px; font-size: 14px; gap: 6px; }
  .fc-grade-actions .icon { display: none; }
  .fc-grade-actions small { font-size: 10px; }
  .fc-complete-actions { display: grid; }
}
