* { box-sizing: border-box; } html, body, #root { height: 100%; } body { margin: 0; background: var(--shell); color: var(--ink); font-family: var(--font-ui); font-size: var(--t-3); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; } ::selection { background: var(--selection); } button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; } .app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; } .titlebar { flex: none; height: 46px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 14px 0 84px; background: var(--shell); border-bottom: 1px solid var(--line); } .titlebar .doc-title { grid-column: 2; font-size: var(--t-2); letter-spacing: 0.02em; color: var(--ink-soft); } .titlebar .actions { grid-column: 3; justify-self: end; display: flex; gap: 4px; } .icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--ink-soft); transition: background 120ms var(--ease), color 120ms var(--ease); } .icon-btn:hover { background: var(--accent-wash); color: var(--ink); } .icon-btn[data-on="true"] { color: var(--accent); } .dirty-dot { display: inline-block; width: 5px; height: 5px; margin-left: 8px; border-radius: 50%; background: var(--accent); vertical-align: middle; } .body { flex: 1; display: flex; min-height: 0; } .sidebar { width: var(--pane-sidebar); flex: none; background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 6px 0 10px; } .brand { display: flex; align-items: center; gap: 6px; padding: 12px 18px 16px; color: var(--ink-faint); cursor: pointer; transition: color 120ms var(--ease); } .brand .mark { font-family: var(--font-book); font-size: 19px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); transition: color 120ms var(--ease); } .brand:hover, .brand:hover .mark { color: var(--accent); } .nav-label { padding: 4px 22px; font-size: var(--t-1); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); } .chapters { list-style: none; margin: 6px 0 0; padding: 0 10px; overflow-y: auto; flex: 1; } .chapter { position: relative; display: flex; align-items: baseline; gap: 11px; padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink-soft); cursor: pointer; transition: background 120ms var(--ease), color 120ms var(--ease); } .chapter:hover { background: rgba(35, 32, 27, 0.04); color: var(--ink); } .chapter[data-active="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(35, 32, 27, 0.05); } .chapter[data-active="true"]::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; background: var(--accent); border-radius: 0 2px 2px 0; } .chapter .num { font-size: var(--t-1); color: var(--ink-faint); width: 13px; font-variant-numeric: tabular-nums; } .chapter[data-active="true"] .num { color: var(--accent); } .add-chapter { margin: 8px 18px 4px; padding: 9px 12px; display: flex; align-items: center; gap: 8px; border-radius: var(--r-sm); color: var(--ink-faint); border: 1px dashed var(--line-strong); transition: color 120ms var(--ease), border-color 120ms var(--ease); } .add-chapter:hover { color: var(--accent); border-color: var(--accent); } .editor-pane { flex: 1; min-width: 0; background: var(--paper); overflow-y: auto; display: flex; flex-direction: column; align-items: center; } .sheet { width: 100%; max-width: var(--measure); padding: 104px 24px 200px; } .prose { font-family: var(--font-book); color: var(--ink); font-optical-sizing: auto; } .chapter-opener { text-align: center; margin: 0 0 3.4rem; } .chapter-num { font-family: var(--font-ui); font-size: var(--t-1); font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-faint); } .chapter-title { font-weight: 500; font-size: 31px; line-height: 1.16; letter-spacing: -0.01em; margin: 15px 0 0; } .prose p { font-size: 19px; line-height: 1.68; margin: 0; text-align: justify; hyphens: auto; -webkit-hyphens: auto; text-indent: 1.3em; } .prose p:first-of-type, .prose .first { text-indent: 0; } .prose .first::first-letter { float: left; font-size: 3.1em; line-height: 0.82; padding: 0.05em 0.09em 0 0; font-weight: 500; } .prose blockquote { margin: 1.7rem 0; padding-left: 1.2rem; border-left: 2px solid var(--line-strong); font-style: italic; color: var(--ink-soft); } .prose blockquote p { text-indent: 0; font-size: 18px; } .scene-break { text-align: center; margin: 2.1rem 0; color: var(--ink-faint); font-size: 17px; letter-spacing: 0.5em; } .dock { width: var(--pane-dock); flex: none; background: var(--shell); border-left: 1px solid var(--line); overflow-y: auto; padding: 26px 28px 80px; } .dock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; } .dock-head .label { font-size: var(--t-1); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); } .dock-head .meta { font-size: var(--t-1); color: var(--ink-faint); font-variant-numeric: tabular-nums; } .page { background: #fffefb; border: 1px solid var(--line); border-radius: 2px; box-shadow: var(--shadow-page); aspect-ratio: 6 / 9; padding: 11% 12%; overflow: hidden; } .page .p-opener { text-align: center; margin-bottom: 15px; } .page .p-num { font-family: var(--font-ui); font-size: 6px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); } .page .p-title { font-family: var(--font-book); font-size: 12px; margin-top: 5px; } .page p { font-family: var(--font-book); font-size: 6.6px; line-height: 1.5; text-align: justify; hyphens: auto; text-indent: 1.2em; margin: 0; color: #2b2720; } .page .folio { text-align: center; font-family: var(--font-book); font-size: 6px; color: var(--ink-faint); margin-top: 16px; } ::-webkit-scrollbar { width: 11px; height: 11px; } ::-webkit-scrollbar-thumb { background: rgba(35, 32, 27, 0.16); border-radius: 6px; border: 3px solid transparent; background-clip: content-box; } ::-webkit-scrollbar-thumb:hover { background: rgba(35, 32, 27, 0.28); background-clip: content-box; } ::-webkit-scrollbar-track { background: transparent; } .chapter-title-input { width: 100%; margin: 15px 0 0; padding: 0; border: 0; background: transparent; text-align: center; font-family: var(--font-book); font-weight: 500; font-size: 31px; line-height: 1.16; letter-spacing: -0.01em; color: var(--ink); } .chapter-title-input:focus { outline: none; } .chapter-title-input::placeholder { color: var(--ink-faint); } .editor-host, .ProseMirror { outline: none; } .ProseMirror { min-height: 62vh; } .ProseMirror > p:first-child { text-indent: 0; } .ProseMirror hr { border: none; border-top: 1px solid var(--line-strong); width: 56px; margin: 2rem auto; } .ProseMirror p.is-editor-empty:first-child::before { content: attr(data-placeholder); color: var(--ink-faint); float: left; height: 0; pointer-events: none; } .page-body hr { border: none; border-top: 1px solid var(--line-strong); width: 22px; margin: 9px auto; } .editor-toolbar { position: sticky; bottom: 22px; z-index: 5; display: flex; align-items: center; gap: 1px; padding: 5px; background: rgba(252, 251, 247, 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-pop); } .tool { min-width: 32px; height: 32px; padding: 0 9px; display: grid; place-items: center; border-radius: 999px; color: var(--ink-soft); font-family: var(--font-book); font-size: 15px; transition: background 120ms var(--ease), color 120ms var(--ease); } .tool:hover { background: var(--accent-wash); color: var(--ink); } .tool[data-on="true"] { background: var(--accent); color: #fff; } .tool-sep { width: 1px; height: 18px; background: var(--line); margin: 0 5px; } .figure { margin: 1.8rem 0; } .figure img { display: block; width: 100%; border-radius: 2px; } .figure[data-placement="float-top"] { float: right; width: 46%; margin: 0.2rem 0 1rem 1.4rem; } .figure[data-placement="inline"] { width: 62%; margin-inline: auto; } .figure-frame { background: var(--sidebar); border-radius: 3px; overflow: hidden; } .figure-empty { aspect-ratio: 3 / 2; display: grid; place-items: center; font-family: var(--font-ui); font-size: var(--t-2); color: var(--ink-faint); } .figure-caption { display: block; width: 100%; margin-top: 9px; border: 0; background: transparent; text-align: center; font-family: var(--font-ui); font-size: var(--t-2); color: var(--ink-soft); } .figure-caption:focus { outline: none; } .figure-caption::placeholder { color: var(--ink-faint); } .figure[data-selected="true"] .figure-frame { box-shadow: 0 0 0 2px var(--accent); } .figure-controls { display: flex; gap: 4px; justify-content: center; margin-top: 9px; } .figure-controls button { font-family: var(--font-ui); font-size: var(--t-1); padding: 5px 10px; border-radius: 999px; color: var(--ink-soft); background: var(--sidebar); transition: background 120ms var(--ease), color 120ms var(--ease); } .figure-controls button[data-on="true"] { background: var(--accent); color: #fff; } .pdf-pages { display: flex; flex-direction: column; gap: 14px; } .pdf-page { display: block; border-radius: 2px; box-shadow: var(--shadow-page); } .dock-error { white-space: pre-wrap; font-family: var(--font-ui); font-size: var(--t-2); line-height: 1.5; color: var(--accent-ink); background: var(--accent-wash); padding: 12px 14px; border-radius: var(--r-sm); margin: 0; } .dock-empty { font-family: var(--font-ui); font-size: var(--t-2); color: var(--ink-faint); text-align: center; padding: 44px 0; } .overlay { position: fixed; inset: 0; z-index: 20; background: rgba(35, 32, 27, 0.28); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 40px; } .panel { width: 480px; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); overflow: hidden; } .panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 16px 22px; border-bottom: 1px solid var(--line); } .panel-head h2 { margin: 0; font-family: var(--font-book); font-weight: 500; font-size: 18px; } .panel-body { display: flex; flex-direction: column; gap: 15px; padding: 20px 22px 24px; overflow-y: auto; } .field { display: flex; flex-direction: column; gap: 6px; } .field-label { font-family: var(--font-ui); font-size: var(--t-1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); } .field input, .field select { font-family: var(--font-ui); font-size: var(--t-4); color: var(--ink); background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 9px 11px; } .field input:focus, .field select:focus { outline: none; border-color: var(--accent); } .field-row { display: flex; gap: 14px; } .field-row .field { flex: 1; } .check { display: flex; align-items: center; gap: 9px; font-family: var(--font-ui); font-size: var(--t-3); color: var(--ink-soft); } .check input { width: 15px; height: 15px; accent-color: var(--accent); } .doc-title { cursor: pointer; } .doc-title:hover { color: var(--ink); } .menu-wrap { position: relative; } .menu-backdrop { position: fixed; inset: 0; z-index: 25; } .menu { position: absolute; top: 36px; right: 0; z-index: 30; min-width: 156px; display: flex; flex-direction: column; padding: 5px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop); } .menu button { text-align: left; padding: 8px 11px; border-radius: var(--r-sm); font-family: var(--font-ui); font-size: var(--t-3); color: var(--ink-soft); } .menu button:hover { background: var(--accent-wash); color: var(--ink); } .toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 40; max-width: 460px; padding: 11px 16px; border-radius: var(--r-md); background: var(--ink); color: var(--paper); font-family: var(--font-ui); font-size: var(--t-3); box-shadow: var(--shadow-pop); cursor: pointer; } .library { height: 100vh; overflow-y: auto; background: var(--shell); } .library-head { display: flex; align-items: center; gap: 7px; padding: 30px 44px 8px; } .library-head .mark { font-family: var(--font-book); font-size: 23px; font-weight: 500; letter-spacing: -0.01em; } .library-head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); } .shelf { max-width: 1040px; margin: 0 auto; padding: 26px 44px 80px; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 28px; } .card { position: relative; aspect-ratio: 5 / 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 22px 18px; text-align: center; border-radius: 4px; cursor: pointer; transition: transform 140ms var(--ease), box-shadow 140ms var(--ease); } .card:hover { transform: translateY(-3px); } .card-book, .card-example { background: #fffefb; border: 1px solid var(--line); box-shadow: var(--shadow-page); } .card-book:hover, .card-example:hover { box-shadow: 0 4px 10px rgba(35, 32, 27, 0.1), 0 20px 38px rgba(35, 32, 27, 0.13); } .card-title { font-family: var(--font-book); font-size: 20px; font-weight: 500; line-height: 1.18; color: var(--ink); } .card-author { font-family: var(--font-ui); font-size: var(--t-2); color: var(--ink-soft); } .card-badge { font-family: var(--font-ui); font-size: var(--t-1); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); } .card-action { background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-faint); font-family: var(--font-ui); font-size: var(--t-3); } .card-action:hover { border-color: var(--accent); color: var(--accent); } .card-delete { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-faint); opacity: 0; transition: opacity 120ms var(--ease), background 120ms var(--ease), color 120ms var(--ease); } .card-book:hover .card-delete { opacity: 1; } .card-delete:hover { background: var(--accent-wash); color: var(--accent); } .panel-foot { display: flex; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); } .btn-primary { font-family: var(--font-ui); font-size: var(--t-3); font-weight: 500; padding: 9px 20px; border-radius: var(--r-sm); background: var(--accent); color: #fff; transition: background 120ms var(--ease); } .btn-primary:hover { background: var(--accent-ink); }