@font-face{font-family:"M PLUS 1p";src:url("/fonts/MPLUS1p-Regular.ttf") format("truetype");font-weight:400 500;font-style:normal;font-display:swap}@font-face{font-family:"M PLUS 1p";src:url("/fonts/MPLUS1p-Bold.ttf") format("truetype");font-weight:600 900;font-style:normal;font-display:swap}
:root{font-family:"M PLUS 1p",sans-serif;color:#26343d;background:#eef2f4;font-size:16px;--ink:#233544;--muted:#667982;--line:#dfe5e8;--accent:#a24a27}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;color:inherit}button:disabled{opacity:.55;cursor:wait}button:focus-visible,input:focus-visible,textarea:focus-visible,[contenteditable]:focus-visible,select:focus-visible{outline:2px solid #ae603a;outline-offset:3px}a{color:#965029;text-underline-offset:3px;overflow-wrap:anywhere}button{border:1px solid var(--line);background:white;border-radius:7px;padding:9px 14px;font-size:.875rem;min-height:40px}button.primary{background:var(--ink);color:white;border-color:var(--ink)}button.ghost{border-color:transparent;background:transparent}button.warn{color:#a4352b}h1,h2,h3,p{margin-top:0}h1{font-family:"M PLUS 1p",sans-serif;font-size:1.75rem;line-height:1.55;font-weight:600}h2{font-size:1.15rem;line-height:1.65}h3{font-size:1rem;line-height:1.6}.shell{display:grid;grid-template-columns:250px minmax(0,1fr);height:100dvh}.sidebar{background:var(--ink);color:#eef3f5;padding:30px 20px 16px;display:flex;flex-direction:column;overflow:auto}.brand{display:flex;gap:10px;align-items:center;font-size:1.25rem;font-weight:600;letter-spacing:.09em;margin:0 5px 30px}.brand img{width:34px;height:34px}.sidebar small{color:#a8bac5;font-size:.8125rem;line-height:1.8}.nav-label{font-size:.75rem;letter-spacing:.12em;color:#a7b9c5;margin:30px 10px 12px}.navitem{width:100%;text-align:left;background:transparent;border:0;color:#dce5ea;display:flex;align-items:center;gap:10px;padding:11px 12px;margin:2px 0;border-radius:7px;line-height:1.5}.navitem.active{background:#3d515f;color:white}.navitem:hover{background:#344958}.navitem.indented{font-size:.875rem;padding:8px 12px 8px 24px;color:#c2d0d8}.sidebar details summary{cursor:pointer;font-size:.875rem;padding:10px 9px;list-style:none}.sidebar details summary::before{content:'›';display:inline-block;width:18px}.sidebar details[open] summary::before{transform:rotate(90deg)}.sidebar .search{background:#1c2c38;border:1px solid #42535e;color:white;width:100%;padding:11px 12px;border-radius:7px;font-size:.875rem}.sidebar .search::placeholder{color:#a7b9c5}.side-bottom{margin-top:auto;padding-top:25px;border-top:1px solid #40515c}.badge{background:#d5aa76;color:#273641;border-radius:30px;min-width:22px;padding:2px 7px;margin-left:auto;font-size:.75rem;text-align:center}.workspace{min-width:0;display:flex;flex-direction:column;overflow:hidden}.topbar{height:76px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 32px;border-bottom:1px solid #d9e1e5;gap:12px}.breadcrumb{font-size:.875rem;color:var(--muted)}.top-actions{display:flex;align-items:center;gap:14px}.save-state{font-size:.8125rem;color:#597064}.save-state.error{color:#ae442c}.book{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0;margin:26px 30px 30px;flex:1;min-height:0;border:1px solid #dbe1e5;box-shadow:0 10px 30px #2335440a;border-radius:5px;overflow:hidden;background:white}.page{min-width:0;overflow:auto;padding:30px 34px 60px;background:#fff;position:relative}.page+ .page{border-left:1px solid #d8e1e5;box-shadow:inset 8px 0 13px -14px #233544}.eyebrow{font-size:.6875rem;letter-spacing:.18em;color:#8b684f;font-weight:700;margin-bottom:14px}.page-title{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:24px}.page-title h1{margin:0}.page-title button{font-size:.8125rem}.hint{color:var(--muted);font-size:.875rem;line-height:1.9}.editor{min-height:55vh;line-height:2.05;outline:none;font-size:1rem;overflow-wrap:anywhere;caret-color:var(--accent)}.editor p{margin:0 0 16px;min-height:2em}.editor:empty::before{content:attr(data-placeholder);color:#98a3aa;pointer-events:none}.editor figure{margin:22px 0;border:1px solid var(--line);padding:9px;border-radius:5px;position:relative}.editor figure img{display:block;width:100%;max-height:400px;object-fit:contain;background:#f5f7f8}.editor figcaption{padding:8px;min-height:36px;font-size:.875rem;color:var(--muted)}.editor figure button{position:absolute;right:14px;top:14px;background:#fffffff0}.output-body ul{padding-left:1.3em;line-height:1.95;margin:0 0 28px}.output-body li{margin-bottom:12px;white-space:pre-wrap;overflow-wrap:anywhere}.output-body h2{margin-top:28px;border-bottom:1px solid var(--line);padding-bottom:9px}.output-body figure{margin:12px 0 24px}.output-body img{max-width:100%;border-radius:4px}.output-body figcaption{font-size:.875rem;line-height:1.8;color:var(--muted)}.empty{padding:65px 6px;text-align:center}.empty .symbol{font-family:"M PLUS 1p",sans-serif;font-size:3rem;color:#bcc9d0;margin-bottom:18px}.empty h2{font-size:1.125rem}.output-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.output-toolbar button{font-size:.8125rem}.note-tag{display:inline-block;font-size:.75rem;background:#eef2f4;color:#5c7380;padding:4px 9px;border-radius:4px;margin-bottom:14px}.full-page{overflow:auto;flex:1;padding:36px;max-width:1040px;width:100%;margin:auto}.card{background:white;border:1px solid var(--line);border-radius:9px;padding:28px;margin-bottom:20px}.card-title{display:flex;justify-content:space-between;align-items:center;gap:12px}.card p{line-height:1.9}.field{display:flex;flex-direction:column;gap:9px;margin-bottom:20px}.field textarea,.field input,.field select{width:100%;border:1px solid #cbd6dc;border-radius:6px;padding:12px;line-height:1.7;background:white}.field textarea{min-height:140px;resize:vertical}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.question-count{font-family:"M PLUS 1p",sans-serif;font-size:3.5rem;margin:0;color:var(--ink)}.quiz-options{display:grid;gap:12px;margin:25px 0}.quiz-option{text-align:left;padding:16px 20px;font-size:1rem}.quiz-option.selected{border-color:var(--ink);background:#edf2f5}.quiz-option span{font-family:"M PLUS 1p",sans-serif;margin-right:15px;color:var(--muted)}.result{background:#eff5f1;border-left:3px solid #688771;padding:20px;margin-top:20px;line-height:1.9}.result.incorrect{background:#faf1eb;border-color:#ba7854}.alert{border:1px solid #dfbb92;background:#fff7ec;padding:14px 18px;margin:0 30px;border-radius:6px;font-size:.875rem;line-height:1.8}.alert button{margin-left:12px}.quote{white-space:pre-wrap;background:#f1f4f6;border-left:3px solid #bccad2;padding:15px;color:#526773;max-height:180px;overflow:auto;font-size:.875rem;line-height:1.8}.login{max-width:430px;margin:15vh auto;background:white;padding:40px;border:1px solid var(--line);border-radius:10px}.mobile-menu,.mobile-tabs{display:none}dialog{border:1px solid var(--line);border-radius:10px;max-width:650px;width:calc(100% - 32px);padding:30px;max-height:85dvh}dialog::backdrop{background:#13253266}dialog header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}dialog h2{margin:0}dialog p{line-height:1.8}.annotation{white-space:pre-wrap;line-height:1.9;border-top:1px solid var(--line);padding-top:20px;margin-top:30px}.note-list{list-style:none;padding:0}.note-list li{border-bottom:1px solid var(--line)}.note-list button{display:block;width:100%;text-align:left;border:0;padding:17px 20px;border-radius:0}.muted{color:var(--muted);font-size:.875rem}.hidden{display:none!important}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#233544;color:white;padding:13px 22px;border-radius:8px;max-width:min(90vw,640px);font-size:.875rem;box-shadow:0 5px 20px #0002;z-index:20}#toast:empty{display:none}.loading{color:var(--muted);line-height:1.9}.save-state:empty{display:none}@media(min-width:1450px){.page{padding:40px 52px}.book{margin:30px 42px}}@media(max-width:1050px){.shell{grid-template-columns:215px minmax(0,1fr)}.sidebar{padding:24px 12px}.page{padding:25px 23px}.book{margin:20px 18px}.topbar{padding:0 20px}.top-actions{gap:8px}}@media(max-width:760px){.shell{display:block}.sidebar{position:fixed;inset:0 auto 0 0;width:270px;z-index:15;transform:translateX(-100%);transition:transform .18s;box-shadow:10px 0 40px #0002}.shell.menu-open .sidebar{transform:translateX(0)}.workspace{height:100dvh}.topbar{height:64px;padding:0 14px}.breadcrumb{display:none}.mobile-menu{display:block}.top-actions{margin-left:auto}.mobile-tabs{display:flex;gap:4px;background:white;border-bottom:1px solid var(--line);padding:6px 16px}.mobile-tabs button{flex:1;border:0}.mobile-tabs .active{background:#eef2f4}.book{display:block;margin:12px;border-radius:5px;overflow:auto}.page{padding:24px;min-height:100%;overflow:visible}.page+ .page{border-left:0;box-shadow:none}.book[data-pane="input"] .output-page{display:none}.book[data-pane="output"] .input-page{display:none}.page h1{font-size:1.45rem}.full-page{padding:22px 16px}.card{padding:22px}.alert{margin:0 12px}.editor{min-height:60vh}.save-state{font-size:.75rem}.top-actions button{padding:8px 11px}.login{margin:10vh 16px}.output-toolbar button{min-height:44px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.editor p{white-space:pre-wrap}.close-menu{display:none}@media(max-width:760px){.close-menu{display:block;position:absolute;right:10px;top:6px;color:white}.sidebar{padding-top:38px}}
/* Editable paper spread */
:root{font-size:14px}.topbar{height:30px;padding:0 20px;background:transparent;border:0}.top-actions{margin-left:auto}.sidebar{padding-top:22px}.brand{margin-bottom:18px}.organize-side{width:100%;margin-bottom:18px;background:#f3f0e9!important;color:#233544!important;border:0!important}.notebook-tools{display:flex;gap:8px;padding:0 22px 6px;flex-shrink:0}.notebook-tools button{min-height:30px;padding:4px 10px}.paper-book{flex:1;min-height:0;margin:0 20px;position:relative;border:1px solid #d9d8d0;border-radius:7px;background:#fffefb;box-shadow:0 3px 14px #26343d0d;overflow:hidden;padding:24px 28px}.paper-book:after{content:'';position:absolute;top:0;bottom:0;left:50%;width:30px;transform:translateX(-50%);background:linear-gradient(90deg,transparent,#8a806013,transparent);pointer-events:none}.paper-viewport{height:100%;overflow:hidden;overscroll-behavior:none;scrollbar-width:none}.spread-editor{height:100%;min-height:0!important;width:100%;column-count:2;column-gap:48px;column-fill:auto;line-height:1.9;font-size:14px;padding:0;outline:none!important;overflow:visible;overflow-wrap:anywhere}.spread-editor p{margin:0 0 12px;white-space:pre-wrap;orphans:2;widows:2}.spread-editor [data-page-break]{break-before:column}.spread-editor figure{break-inside:avoid;margin:10px 0;max-width:100%;display:flex;flex-direction:column;align-items:flex-start}.spread-editor figure img{max-width:100%;width:auto;height:auto;max-height:min(180px,28vh);object-fit:contain}.spread-editor figcaption{font-size:12px;line-height:1.6;width:100%;min-height:20px}.spread-editor figure button{font-size:11px;min-height:22px;padding:2px 6px}.page-navigation{display:flex;align-items:center;justify-content:center;gap:28px;height:45px;flex-shrink:0}.page-navigation button{min-width:80px}.page-navigation span{font-variant-numeric:tabular-nums;color:#7b807e;min-width:70px;text-align:center}.organized-view{overflow:auto;margin:0 20px 18px;padding:28px 36px;background:#fffefb;border:1px solid #d9d8d0;border-radius:7px;flex:1;min-height:0}.organized-view img{max-width:100%;max-height:240px;object-fit:contain}.organized-view h1{font-size:1.5rem}.turn-forward{animation:page-forward .35s ease}.turn-back{animation:page-back .35s ease}@keyframes page-forward{0%{transform:perspective(1800px) rotateY(0)}40%{transform:perspective(1800px) rotateY(-5deg);box-shadow:12px 3px 20px #26343d18}100%{transform:none}}@keyframes page-back{0%{transform:perspective(1800px) rotateY(0)}40%{transform:perspective(1800px) rotateY(5deg)}100%{transform:none}}@media(max-width:760px){.topbar{height:38px}.notebook-tools{padding:0 12px 4px}.paper-book{margin:0 10px;padding:18px}.paper-book:after{display:none}.spread-editor{column-count:1;font-size:13px}.page-navigation{gap:14px;height:44px}.organized-view{margin:0 10px 10px;padding:20px}.sidebar{font-size:14px}}@media(prefers-reduced-motion:reduce){.turn-forward,.turn-back{animation:none}}
.inline-note-title{padding:5px 0;white-space:pre-wrap}.inline-note-title[contenteditable]:focus,.inline-note-body:focus{outline:0}.inline-note-title[contenteditable]{border-bottom:1px dashed #bec8ce}.inline-note-body{min-height:50vh;padding:8px 0;white-space:pre-wrap;line-height:1.9;overflow-wrap:anywhere}.inline-note-toolbar{position:sticky;top:-28px;background:#fffefb;z-index:2;padding:10px 0;border-bottom:1px solid #e5e7e5;display:flex;flex-wrap:wrap;gap:8px}.note-blocks p{white-space:pre-wrap;line-height:1.9;margin:0 0 12px}.note-bullet{position:relative;padding-left:1.3em}.note-bullet:before{content:'•';position:absolute;left:.2em}.note-blocks figure{margin:16px 0;max-width:100%;position:relative}.note-blocks figure img{display:block;max-width:100%;width:auto;max-height:280px;object-fit:contain}.note-blocks figcaption{min-height:24px;font-size:.875rem;white-space:pre-wrap;color:#60727b}.inline-note-body figure{padding:8px;border:1px solid #e1e6e8;border-radius:5px}.inline-note-body figure button{font-size:.8rem;padding:4px 8px;min-height:28px}.inline-note-body figcaption:empty:before{content:'画像の説明';color:#a0aaa9;pointer-events:none}@media(max-width:760px){.inline-note-toolbar{top:-20px}.note-blocks figure img{max-height:220px}}
.note-image-box{position:relative;display:inline-block;max-width:100%;vertical-align:top}.note-blocks .note-image-box.sized img{width:100%;height:auto;max-height:none;max-width:100%}.inline-note-body .note-image-box .image-resize-handle{position:absolute;right:-6px;bottom:-6px;width:26px;height:26px;min-height:26px;padding:0;border:1px solid #fff;border-radius:5px;background:#233544;color:white;cursor:nwse-resize;touch-action:none;z-index:1}.image-size-controls{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:10px}.image-size-controls input[type=range]{width:160px;max-width:40vw;accent-color:#233544;cursor:ew-resize}.note-image-box img{user-select:none}
.inline-note-body>p,.inline-note-body>div:not(figure){min-height:1.9em;cursor:text}.inline-note-body>p:empty:before{content:'\200b'}.inline-note-body>figure+p{margin-top:12px;min-height:2.2em}.spread-editor>figure+p{min-height:2em}
/* One full-width input page, with stable horizontal page boundaries. */
.paper-book:after{display:none}.spread-editor{column-count:1}.paper-book,.paper-viewport{min-width:0}.paper-viewport{overflow-anchor:none;scroll-behavior:auto}.paper-book{margin-bottom:0}.spread-editor{font-size:14px}.turn-forward,.turn-back{animation:none}@media(max-width:760px){.spread-editor{font-size:13px}}
