/* The study workspace is separate from the owner's room illustration. */
#editor.study-editor,#reader:has(.rich-note-reader){width:min(1120px,calc(100% - 32px));max-height:94dvh;background:#faf8f3}
#editor.study-editor>.dialog-inner{padding:26px 36px 0}
.study-editor #editor-title{font-size:23px;margin:0 0 15px}
.study-editor .eyebrow{display:none}
.study-editor .field{margin-top:14px}
.study-editor .field-label{font-size:12px;margin-bottom:5px;color:#68655e}
.study-editor input,.study-editor textarea,.study-editor select{border-color:#d7d3ca}
.study-editor input[name=title]{font-size:25px;font-weight:500;background:transparent;border:0;border-bottom:1px solid #d7d3ca;padding:8px 0}
.study-editor .form-row{max-width:460px}
.study-editor .form-actions{position:sticky;bottom:0;background:#faf8f3ed;backdrop-filter:blur(8px);padding:12px 0;margin-top:18px;z-index:4;border-top:1px solid #d7d3ca}
.study-body-field{position:relative}
.note-workspace{border:1px solid #ccc8be;background:#fff;position:relative}
.note-toolbar{display:flex;flex-wrap:wrap;gap:3px;padding:9px;background:#f5f3ed;border-bottom:1px solid #d7d3ca;position:sticky;top:0;z-index:3;align-items:center}
.note-tool,.note-select{font-family:'Noto Sans KR',sans-serif!important;font-size:12px!important;line-height:1.5!important;letter-spacing:0!important;color:#37362f;background:transparent;border:1px solid transparent;border-radius:3px;padding:6px 8px;min-height:32px;width:auto;cursor:pointer}
.note-tool:hover,.note-select:hover{background:#eae6dc;border-color:#d2cdc0}
.note-tool:focus-visible,.note-select:focus-visible{outline:2px solid #4169e1;outline-offset:1px}
.note-tool[aria-pressed=true]{background:#e4eaf9;border-color:#bcc9e7;color:#244fbd}
.note-tool:disabled{opacity:.3;cursor:default}
.note-math-tool{color:#284dae;background:#e9edf8;border-color:#c6d0ea;font-weight:600}
.note-toolbar .note-select{max-width:118px;padding-right:20px}
.note-context-tools{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:5px 10px;background:#edf1f9;border-bottom:1px solid #d7d3ca;font-size:12px}
.note-context-tools[hidden]{display:none}
.note-status{padding:8px 13px;border-top:1px solid #e7e3db;color:#767268;display:flex;justify-content:space-between;gap:12px;font-size:11px}
.note-error{padding:8px 16px;color:#a32d46;font-size:13px}
.note-draft-banner{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:12px;background:#e9eef9;font-size:13px}
.note-surface>.note-prose{min-height:440px;padding:30px 42px;outline:none}
.note-prose{font-family:'Noto Sans KR',sans-serif;font-size:16px;font-weight:400;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;color:#292823}
.note-prose>*:first-child{margin-top:0}
.note-prose p{margin:.45em 0;min-height:1em}
.note-prose h1,.note-prose h2,.note-prose h3{line-height:1.5;margin:1.25em 0 .55em;font-weight:600;letter-spacing:-.02em;font-family:inherit}
.note-prose h1{font-size:1.9em}.note-prose h2{font-size:1.5em}.note-prose h3{font-size:1.2em}
.note-prose ul,.note-prose ol{padding-left:1.8em;margin:.6em 0;list-style-position:outside}.note-prose ul{list-style-type:disc}.note-prose ol{list-style-type:decimal}.note-prose li p{margin:0}
.note-prose blockquote{border-left:3px solid #a8b6d6;padding:5px 0 5px 18px;margin:1em 0;color:#5c6070;background:#f7f8fb}
.note-prose pre{background:#f3f3f0;padding:16px;white-space:pre-wrap;border:1px solid #deded6;border-radius:3px;tab-size:2;line-height:1.6}
.note-prose code{font-family:Consolas,monospace;font-size:.9em;background:#f0efe9;padding:2px 4px}.note-prose pre code{padding:0;background:none}
.note-prose a{color:#315ab8;text-decoration:underline;text-underline-offset:3px}.note-prose strong{font-weight:700}.note-prose em{font-style:italic}
.note-prose mark{padding:1px 0;color:inherit}.note-prose hr{border:0;border-top:1px solid #c6c4bc;margin:1.5em 0}
.note-prose img{display:block;max-width:100%;height:auto;margin:1em auto;object-fit:contain}.note-prose img.ProseMirror-selectednode{outline:2px solid #4169e1}
.note-prose .tableWrapper{overflow-x:auto;margin:1em 0}.note-prose table{border-collapse:collapse;table-layout:fixed;margin:0;width:100%;overflow:hidden;min-width:220px}
.note-prose td,.note-prose th{border:1px solid #b9b7af;padding:9px 12px;min-width:60px;vertical-align:top;position:relative}.note-prose th{background:#f0eee6;font-weight:600;text-align:left}
.note-prose .selectedCell:after{background:#4169e126;content:'';position:absolute;inset:0;pointer-events:none}.note-prose .column-resize-handle{position:absolute;right:-2px;top:0;bottom:-2px;width:4px;background:#4169e1;pointer-events:none}.resize-cursor{cursor:col-resize}
.note-math{cursor:default;white-space:normal}.note-math[role=button]{cursor:pointer;border-radius:3px}.note-math[role=button]:hover,.note-math.ProseMirror-selectednode,.note-math:focus-visible{background:#edf1fc;outline:1px solid #b6c5e8}
.note-math-inline{display:inline-block;vertical-align:baseline;padding:0 3px}.note-math-block{display:block;margin:1em 0;padding:10px 4px;overflow-x:auto;break-inside:avoid}.note-math .katex{font-size:1.15em}.note-math .katex-display{margin:.4em 0}.note-math .katex-html{overflow-wrap:normal}
.rich-note-reader{white-space:normal!important}.rich-note-reader .note-prose{outline:none}.rich-note-reader .note-math-inline{max-width:100%;overflow-x:auto;vertical-align:middle}.reader-print{margin-top:22px}
.equation-dialog{width:min(740px,calc(100% - 20px));padding:22px;max-height:94dvh;overflow:auto;background:#faf9f5;--keyboard-zindex:30}
.equation-heading{display:flex;justify-content:space-between;align-items:center}.equation-heading h2{font-size:22px;font-weight:500;margin:0 0 15px}.equation-close{font-size:25px;background:none;border:0;width:32px;height:32px;cursor:pointer}
.equation-tabs{display:flex;border-bottom:1px solid #d1ccc2;margin-bottom:10px;gap:5px}.equation-tabs button{border:0;background:none;font-size:14px;padding:8px 14px}.equation-tabs button[aria-pressed=true]{border-bottom:2px solid #4169e1;color:#3157b5}
.equation-palette{display:flex;flex-wrap:wrap;gap:5px;min-height:72px;align-content:flex-start}.equation-palette button{border:1px solid #d6d2c9;background:white;font-size:14px;min-width:44px;padding:8px 12px}.equation-palette button:hover{border-color:#4169e1;background:#eef2fc}
.equation-hint{font-size:12px;color:#76716a;margin:12px 0}.equation-dialog math-field{display:block;border:1px solid #b6c5e4;border-radius:4px;min-height:100px;padding:16px;background:#fff;font-size:25px;--selection-background-color:#dbe6ff;--contains-highlight-background-color:#e9effc}
.equation-palette button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:62px;min-height:64px}.equation-palette button small{font-size:10px;color:#76716a}.equation-shape{font-size:17px}.equation-shape .katex{font-size:1em}
.equation-keyboard:has(.ML__keyboard.is-visible){height:270px;margin-top:12px}.equation-keyboard .ML__keyboard{height:100%}
.equation-keyboard{container-type:inline-size;--keyboard-background:#eceae4;--keyboard-toolbar-text:#3e3c36;--keycap-background:#fff;--keycap-background-hover:#f7f6f2;--keycap-text:#26251f;--keycap-secondary-background:#dadde6;--keycap-secondary-text:#26251f;--keyboard-accent-color:#4169e1}
.equation-dialog math-field::part(menu-toggle){display:none}.equation-dialog math-field::part(virtual-keyboard-toggle){display:none}
.equation-source{margin-top:14px;font-size:12px}.equation-source summary{cursor:pointer;color:#69655d;padding:6px 0}.equation-source textarea{font:14px/1.6 Consolas,monospace;min-height:90px}
.equation-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:18px}.equation-actions select{width:auto;font-size:13px;padding:7px}.equation-actions button:not(.primary-button){border:0;background:none;font-size:13px;padding:8px}.equation-keyboard{position:relative}
.note-insert-dialog{width:min(420px,calc(100% - 24px));padding:25px;background:#faf9f5}.note-insert-dialog h2{font-size:21px;font-weight:500;margin-bottom:18px}.note-insert-dialog label{display:block;margin:14px 0;font-size:13px}.note-insert-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:18px}
@media(max-width:800px){
 #editor.study-editor,#reader:has(.rich-note-reader){width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0}
 #editor.study-editor>.dialog-inner,#reader:has(.rich-note-reader)>.dialog-inner{padding:22px 16px 0}
 .study-editor #editor-title{padding-right:30px}.study-editor input[name=title]{font-size:21px}.note-surface>.note-prose{padding:20px 16px;min-height:50dvh;font-size:16px}
 .note-toolbar{padding:5px;gap:1px}.note-tool,.note-select{min-height:36px;padding:6px;font-size:11px!important}.note-toolbar .note-select{max-width:98px}.note-status{flex-direction:column;gap:2px}
 .equation-dialog{padding:16px;max-height:96dvh}.equation-palette button{font-size:13px;padding:8px}.equation-actions{flex-wrap:wrap}.equation-dialog math-field{font-size:22px}.note-prose td,.note-prose th{padding:7px;min-width:60px}
}
@media(max-width:600px){.equation-keyboard{--keycap-width:calc((100cqw - 12px)/6);--keycap-height:42px;--keycap-gap:4px}.equation-keyboard:has(.ML__keyboard.is-visible){height:290px}}
@media print{
 body.note-print>*:not(#reader){display:none!important}body.note-print{background:#fff!important;overflow:visible!important}
 body.note-print #reader{display:block!important;position:static!important;width:100%!important;height:auto!important;max-height:none!important;overflow:visible!important;border:0;box-shadow:none;background:white}
 body.note-print #reader .dialog-inner{padding:0!important}body.note-print #reader .close-dialog,body.note-print #reader .reader-actions,body.note-print #reader .reader-print{display:none!important}
 body.note-print .note-prose{font-size:11pt;line-height:1.7}.note-prose table{break-inside:auto}body.note-print .note-prose tr{break-inside:avoid}body.note-print #reader-related{display:none}
}
