.textbook-parent-card{min-width:0;padding:20px;margin:20px 0;border:1px solid var(--border,#c7d0dc);border-radius:16px;background:var(--card,#fff);color:var(--foreground,#172b4d)}
.textbook-parent-card header{display:flex;align-items:center;justify-content:space-between;gap:12px}.textbook-parent-card h2{font-size:20px;line-height:1.4;margin:0}.textbook-help summary{display:grid;place-items:center;width:28px;height:28px;border:1px solid currentColor;border-radius:50%;cursor:pointer;list-style:none}.textbook-help p{max-width:44ch;line-height:1.7;font-size:14px}.textbook-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:20px}.textbook-field{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:14px}.textbook-field select{display:block;width:100%;min-width:0;max-width:100%;min-height:46px;padding:9px 12px;border:1px solid var(--border,#b3bfce);border-radius:9px;background:var(--background,#fff);color:inherit;font:inherit;text-overflow:ellipsis}.textbook-field select:focus-visible,.textbook-actions button:focus-visible,.textbook-help summary:focus-visible{outline:3px solid var(--primary,#285be8);outline-offset:3px}.textbook-weak-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:18px}.textbook-weak-grid article{display:flex;flex-direction:column;gap:5px;padding:12px;border-radius:10px;background:var(--muted,#f0f4fa);overflow-wrap:anywhere}.textbook-weak-grid span,.textbook-weak-grid small{font-size:13px;color:var(--muted-foreground,#526174)}.textbook-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.textbook-actions button{min-height:44px;padding:10px 16px;border-radius:9px;border:1px solid var(--border,#b3bfce);font:inherit;cursor:pointer;background:transparent;color:inherit}.textbook-actions button:first-child{background:var(--primary,#285be8);color:var(--primary-foreground,#fff);border-color:transparent;font-weight:600}.textbook-actions button:disabled{opacity:.5;cursor:default}.textbook-error{color:var(--destructive,#b42332)}.textbook-parent-card p{font-size:14px;line-height:1.65;overflow-wrap:anywhere}
@media(max-width:600px){.textbook-parent-card{padding:16px;border-radius:12px}.textbook-fields{grid-template-columns:minmax(0,1fr)}.textbook-weak-grid{grid-template-columns:minmax(0,1fr)}.textbook-actions{display:grid;grid-template-columns:1fr 1fr}.textbook-actions button{padding:10px 8px}}
.textbook-question-point{display:block;margin:10px 0;color:var(--muted-foreground,#526174)}.textbook-question-point summary{display:grid;place-items:center;width:26px;height:26px;border:1px solid currentColor;border-radius:50%;list-style:none;font-weight:700;cursor:pointer}.textbook-question-point p{font-size:14px;line-height:1.6;margin:9px 0;overflow-wrap:anywhere}
.pilot-shell .textbook-parent-card{--card:var(--pilot-panel);--foreground:var(--access-text,#f1f0e9);--border:var(--pilot-line);--background:var(--pilot-ink);--muted:var(--pilot-ink);--muted-foreground:var(--pilot-muted);--primary:var(--pilot-gold);--primary-foreground:var(--pilot-ink);--destructive:var(--pilot-bad)}.pilot-shell .textbook-question-point{color:var(--pilot-muted)}.textbook-parent-card header{position:relative}.textbook-help[open] p{position:absolute;z-index:10;right:0;top:100%;width:min(76vw,400px);padding:14px;margin-top:8px;border:1px solid var(--border,#c7d0dc);border-radius:10px;background:var(--card,#fff);box-shadow:0 8px 26px #0002}
.textbook-reading-material{white-space:pre-line;overflow-wrap:anywhere;line-height:1.8;padding:1rem;border:1px solid currentColor;border-radius:.65rem;font-size:1rem}

.grade-settings-card{min-width:0;padding:0 0 20px;margin:0 0 20px;border-bottom:1px solid var(--border,var(--pilot-line,#c7d0dc))}.grade-settings-card h3{font-size:18px;line-height:1.5;margin:0 0 12px}.grade-settings-field{display:grid;gap:8px;min-width:0;font-size:15px}.grade-settings-field select{display:block;width:100%;min-width:0;max-width:100%;min-height:48px;padding:10px 12px;border:1px solid var(--border,var(--pilot-line,#b3bfce));border-radius:10px;background:var(--background,var(--pilot-ink,#fff));color:inherit;font:inherit}.grade-settings-card p{font-size:14px;line-height:1.6;overflow-wrap:anywhere}.grade-settings-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.grade-settings-actions button,.grade-settings-card>button{min-height:44px;padding:10px 14px;border:1px solid var(--border,var(--pilot-line,#b3bfce));border-radius:9px;background:transparent;color:inherit;font:inherit;cursor:pointer}.grade-settings-actions button:first-child{background:var(--primary,var(--pilot-gold,#285be8));color:var(--primary-foreground,var(--pilot-ink,#fff));border-color:transparent;font-weight:600}.grade-settings-actions button:disabled,.grade-settings-field select:disabled{opacity:.55;cursor:default}.grade-settings-field select:focus-visible,.grade-settings-actions button:focus-visible{outline:3px solid var(--primary,var(--pilot-gold,#285be8));outline-offset:3px}.grade-effective{font-weight:600}.grade-preserve{color:var(--muted-foreground,var(--pilot-muted,#526174))}@media(max-width:480px){.grade-settings-actions{display:grid;grid-template-columns:1fr 1fr}.grade-settings-actions button{padding:10px 8px}}

.textbook-auto-summary{margin:8px 0 18px}.textbook-auto-summary>strong{display:block;font-size:19px;line-height:1.5;font-weight:650}.textbook-auto-summary p{margin:6px 0 0;color:var(--muted-foreground,#526174)}
.textbook-progress-check{margin-top:16px;border-top:1px solid var(--border,#dce3ed)}.textbook-progress-check>summary{display:flex;align-items:center;gap:9px;min-height:48px;padding:12px 0;color:inherit;list-style:none;cursor:pointer;font-size:15px;font-weight:600}.textbook-progress-check>summary::-webkit-details-marker{display:none}.textbook-progress-check>summary>span{flex:1}.textbook-progress-check>summary>small{font-size:13px;font-weight:400;color:var(--muted-foreground,#526174)}.textbook-progress-check>summary>svg{flex:0 0 auto;color:var(--muted-foreground,#526174);transition:transform .16s ease-out}.textbook-progress-check[open]>summary>svg{transform:rotate(90deg)}.textbook-progress-check>summary:focus-visible{outline:3px solid var(--primary,#2759c6);outline-offset:3px}.textbook-progress-note{margin:0 0 16px;color:var(--muted-foreground,#526174)}.textbook-progress-check .textbook-fields{margin-top:0}@media(prefers-reduced-motion:reduce){.textbook-progress-check>summary>svg{transition:none}}
