#study-dialog { width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid #e2e8f0; border-radius: 22px; color: #1e293b; background: #fff; box-shadow: 0 24px 80px #0f172a50; overflow: hidden; }
#study-dialog[open] { display: flex; flex-direction: column; }
#study-dialog::backdrop { background: #0f172a99; backdrop-filter: blur(4px); }
.study-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid #e2e8f0; }
.study-header h2 { font-size: 19px; font-weight: 800; margin: 0; }
#study-close { font-size: 24px; min-width: 44px; height: 44px; border-radius: 12px; background: #f1f5f9; color: inherit; }
#study-content { padding: 22px; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.study-note { font-size: 13px; line-height: 1.7; color: #64748b; margin: 14px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#study-storage-note { padding: 12px 22px; font-size: 11px; line-height: 1.5; background: #f8fafc; color: #64748b; border-top: 1px solid #e2e8f0; flex-shrink: 0; }
#study-storage-note.study-warning { color: #92400e; background: #fef3c7; }
.study-progress { font-size: 12px; font-weight: 700; color: #6366f1; margin-bottom: 10px; }
#study-content progress { width: 100%; height: 8px; accent-color: #6366f1; }
.study-question { font-size: 19px; line-height: 1.6; font-weight: 700; margin: 22px 0 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.study-image { display: block; max-width: 100%; max-height: 240px; object-fit: contain; margin: 12px auto; }
.study-options { display: grid; gap: 10px; margin: 20px 0; }
.study-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.study-button { min-height: 46px; padding: 11px 18px; border: 1px solid #4f46e5; border-radius: 12px; background: #4f46e5; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; overflow-wrap: anywhere; }
.study-button:hover { filter: brightness(.96); }
.study-button:focus-visible, #study-close:focus-visible { outline: 3px solid #818cf8; outline-offset: 3px; }
.study-button:disabled { opacity: .4; cursor: default; }
.study-secondary { background: #f8fafc; color: #334155; border-color: #e2e8f0; }
.study-option { width: 100%; text-align: left; white-space: pre-wrap; }
.study-option[aria-pressed="true"] { border-color: #6366f1; background: #eef2ff; color: #4338ca; box-shadow: 0 0 0 1px #6366f1; }
.study-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.study-stat { display: flex; flex-direction: column; align-items: center; padding: 18px 6px; border-radius: 14px; background: #f1f5f9; }
.study-stat strong { font-size: 30px; }.study-stat span { font-size: 13px; }
.study-stat.correct { background: #ecfdf5; color: #047857; }.study-stat.wrong { background: #fff1f2; color: #be123c; }
.study-review { padding: 13px 0; border-top: 1px solid #e2e8f0; font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.study-review summary { cursor: pointer; font-weight: 700; }
.dark #study-dialog { color: #e2e8f0; background: #0f172a; border-color: #334155; }
.dark .study-header, .dark .study-review { border-color: #334155; }
.dark .study-secondary, .dark #study-close, .dark #study-storage-note { color: #cbd5e1; background: #1e293b; border-color: #334155; }
.dark .study-note { color: #94a3b8; }.dark .study-option[aria-pressed="true"] { color: #c7d2fe; background: #312e81; }
@media (max-width: 480px) { #study-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; } #study-content { padding: 16px; } .study-header { padding: 12px 16px; } .study-question { font-size: 17px; } .study-actions > .study-button { flex: 1 1 130px; } }
