.study-toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:0 0 18px;padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:var(--shadow)}
.study-toolbar>div:first-child{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px}.save-dot{width:9px;height:9px;border-radius:50%;background:#f59e0b}.save-dot.saved{background:#10b981}
.toolbar-actions{display:flex;flex-wrap:wrap;gap:7px}.toolbar-actions button,.import-button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:7px 11px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font-weight:700;font-size:12px;cursor:pointer}.toolbar-actions button:hover,.import-button:hover{border-color:var(--primary);color:var(--primary)}.import-button input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.notes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px;padding-top:20px;border-top:1px solid var(--border);position:relative}.note-field label{display:block;margin-bottom:7px;font-weight:800;font-size:13px}.note-field label small{display:block;color:var(--muted);font-weight:500}.note-field textarea{display:block;width:100%;min-height:108px;resize:vertical;padding:11px 12px;border:1px solid var(--border);border-radius:10px;background:#fdfbff;color:var(--text);font:14px/1.5 system-ui,sans-serif}.note-field textarea:focus{outline:3px solid var(--ring);outline-offset:2px;border-color:var(--primary)}.note-field.master textarea{background:#f7f4ff;border-color:#d9c9f3}.note-save{position:absolute;right:0;bottom:-20px;color:var(--answer);font-size:11px}
#history-dialog{width:min(820px,calc(100% - 28px));max-height:86vh;padding:0;border:1px solid var(--border);border-radius:16px;background:var(--bg);color:var(--text);box-shadow:0 30px 90px #26104b55}#history-dialog::backdrop{background:#1a1029bb;backdrop-filter:blur(4px)}.history-head{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid var(--border);background:var(--surface)}.history-head p{margin:0;color:var(--primary);font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.history-head h2{margin:2px 0 0;color:var(--text);font-size:27px}.history-head button{width:42px;height:42px;border:1px solid var(--border);border-radius:50%;background:transparent;color:var(--text);font-size:24px}
.history-item{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:12px 18px;padding:18px;box-shadow:none}.history-item h3{margin:8px 0 2px;font-size:16px}.history-item p{margin:0;color:var(--muted);font-size:13px}.history-item>div:last-child{display:flex;gap:7px}.history-item button,.history-footer button{min-height:40px;padding:7px 11px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font-weight:700}.history-item button:hover{border-color:var(--primary)}.history-item .danger{color:var(--wrong)}.history-status{padding:4px 7px;border-radius:999px;background:var(--soft);color:var(--primary);font-size:10px;font-weight:800;text-transform:uppercase}.history-status.completed{background:var(--answer-bg);color:var(--answer)}.history-footer{position:sticky;bottom:0;display:flex;gap:8px;padding:16px 24px;border-top:1px solid var(--border);background:var(--surface)}.empty-history{padding:50px;text-align:center;color:var(--muted)}
.reader-toast{position:fixed;z-index:20;left:50%;bottom:24px;transform:translate(-50%,20px);padding:11px 16px;border-radius:9px;background:#1e1330;color:#fff;opacity:0;pointer-events:none;transition:.2s}.reader-toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:700px){.study-toolbar{align-items:flex-start;flex-direction:column}.toolbar-actions{width:100%}.toolbar-actions button,.import-button{flex:1}.notes{grid-template-columns:1fr}.history-item{align-items:flex-start;flex-direction:column}.history-item>div:last-child{width:100%;flex-wrap:wrap}.history-item button{flex:1}.history-footer{flex-direction:column}}
@media(prefers-reduced-motion:reduce){.reader-toast{transition:none}}
