Files
margin/src/styles/app.css
T
2026-06-22 12:40:29 -04:00

2186 lines
38 KiB
CSS

* {
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);
background: var(--accent-wash);
box-shadow: inset 0 0 0 1px var(--line-strong);
}
.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;
}
.pane-resizer {
flex: none;
width: 0;
position: relative;
z-index: 5;
cursor: col-resize;
}
.pane-resizer::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: -4px;
width: 8px;
}
.pane-resizer::after {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: -1px;
width: 2px;
background: var(--accent);
opacity: 0;
transition: opacity 120ms var(--ease);
}
.pane-resizer:hover::after,
body.resizing .pane-resizer::after {
opacity: 0.55;
}
body.resizing {
cursor: col-resize;
user-select: none;
-webkit-user-select: none;
}
.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;
user-select: none;
-webkit-user-select: none;
}
.brand {
display: flex;
align-items: center;
gap: 6px;
padding: 12px 18px 16px;
color: var(--ink-faint);
cursor: pointer;
transition: color 120ms var(--ease);
}
.brand .back-label {
font-family: var(--font-ui);
font-size: var(--t-3);
font-weight: 600;
color: var(--ink-soft);
transition: color 120ms var(--ease);
}
.brand:hover,
.brand:hover .back-label {
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: var(--accent-wash);
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);
}
.chapter .text {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.chapter .title {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.chapter .meta {
font-family: var(--font-ui);
font-size: var(--t-1);
letter-spacing: 0.01em;
color: var(--ink-faint);
}
.chapter .grip {
display: grid;
place-items: center;
align-self: center;
margin: 0 -5px 0 -6px;
color: var(--ink-faint);
opacity: 0;
cursor: grab;
transition: opacity 120ms var(--ease);
}
.chapter:hover .grip,
.chapter[data-active="true"] .grip {
opacity: 0.55;
}
.chapter .grip:active {
cursor: grabbing;
}
.chapter[data-dragging="true"] {
opacity: 0.4;
}
.chapter[data-drop-before="true"]::after,
.chapter[data-drop-after="true"]::after {
content: "";
position: absolute;
left: 10px;
right: 10px;
height: 2px;
background: var(--accent);
border-radius: 2px;
}
.chapter[data-drop-before="true"]::after {
top: -1px;
}
.chapter[data-drop-after="true"]::after {
bottom: -1px;
}
.row-menu-btn {
display: grid;
place-items: center;
width: 22px;
height: 22px;
border-radius: var(--r-sm);
color: var(--ink-faint);
transition: opacity 120ms var(--ease), background 120ms var(--ease), color 120ms var(--ease);
}
.row-menu-btn:hover {
background: var(--accent-wash);
color: var(--ink);
}
.chapter .row-menu-btn {
align-self: center;
margin-right: -4px;
opacity: 0;
}
.chapter:hover .row-menu-btn,
.chapter .row-menu-btn[data-open="true"] {
opacity: 0.7;
}
.chapter:hover .row-menu-btn:hover,
.chapter .row-menu-btn[data-open="true"] {
opacity: 1;
}
.row-menu-pop {
position: fixed;
z-index: 50;
min-width: 148px;
padding: 5px;
background: var(--paper);
border: 1px solid var(--line);
border-radius: var(--r-md);
box-shadow: var(--shadow-pop);
}
.row-menu-item {
display: flex;
align-items: center;
gap: 9px;
width: 100%;
padding: 8px 10px;
border-radius: var(--r-sm);
font-family: var(--font-ui);
font-size: var(--t-3);
color: var(--ink-soft);
transition: background 120ms var(--ease), color 120ms var(--ease);
}
.row-menu-item:hover {
background: var(--accent-wash);
color: var(--ink);
}
.row-menu-item.danger {
color: var(--danger);
}
.row-menu-item.danger:hover {
background: var(--danger-wash);
color: var(--danger);
}
.add-chapter {
margin: 8px 10px 4px;
width: calc(100% - 20px);
padding: 9px 12px;
display: flex;
align-items: center;
justify-content: 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;
}
.prose p[data-indent="true"] {
text-indent: 1.3em;
}
.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 a {
color: var(--accent);
text-decoration: underline;
text-decoration-color: var(--line-strong);
text-underline-offset: 2px;
cursor: pointer;
}
.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;
}
.dock-tools {
display: flex;
align-items: center;
gap: 10px;
}
.trim-select {
font-family: var(--font-ui);
font-size: var(--t-2);
color: var(--ink-soft);
background: var(--raised);
border: 1px solid var(--line);
border-radius: var(--r-sm);
padding: 4px 8px;
cursor: pointer;
}
.trim-select:hover {
border-color: var(--line-strong);
}
.trim-select:focus {
outline: none;
border-color: var(--accent);
}
.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;
margin: 0;
color: #2b2720;
}
.page p[data-indent="true"] {
text-indent: 1.2em;
}
.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: var(--line-strong);
border-radius: 6px;
border: 3px solid transparent;
background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
background: var(--ink-faint);
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);
}
.chapter-title-input:disabled {
color: var(--ink-faint);
-webkit-text-fill-color: var(--ink-faint);
}
.no-title-check {
display: inline-flex;
align-items: center;
gap: 7px;
margin-top: 14px;
font-family: var(--font-ui);
font-size: var(--t-2);
color: var(--ink-faint);
cursor: pointer;
user-select: none;
}
.no-title-check input {
width: 14px;
height: 14px;
cursor: pointer;
accent-color: var(--ink-soft);
}
.editor-host,
.ProseMirror {
outline: none;
}
.ProseMirror {
min-height: 62vh;
}
.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: var(--glass);
-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: var(--accent-contrast);
}
.tool-sep {
width: 1px;
height: 18px;
background: var(--line);
margin: 0 5px;
}
.tool-wrap {
position: relative;
display: inline-flex;
}
.link-pop-backdrop {
position: fixed;
inset: 0;
z-index: 6;
}
.link-pop {
position: absolute;
bottom: calc(100% + 10px);
left: 50%;
transform: translateX(-50%);
z-index: 7;
display: flex;
align-items: center;
gap: 4px;
padding: 5px;
background: var(--glass);
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
border: 1px solid var(--line);
border-radius: 999px;
box-shadow: var(--shadow-pop);
}
.link-input {
width: 220px;
height: 28px;
padding: 0 12px;
border: none;
background: transparent;
color: var(--ink);
font-family: var(--font-ui);
font-size: var(--t-2);
}
.link-input::placeholder {
color: var(--ink-faint);
}
.link-btn {
height: 28px;
padding: 0 12px;
display: grid;
place-items: center;
border-radius: 999px;
background: var(--accent);
color: var(--accent-contrast);
font-family: var(--font-ui);
font-size: var(--t-2);
font-weight: 600;
transition: opacity 120ms var(--ease);
}
.link-btn:hover {
opacity: 0.85;
}
.link-btn.ghost {
padding: 0 8px;
background: transparent;
color: var(--ink-soft);
}
.link-btn.ghost:hover {
background: var(--accent-wash);
color: var(--ink);
opacity: 1;
}
.figure {
margin: 1.8rem auto;
}
.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 {
position: relative;
background: var(--sidebar);
border-radius: 3px;
overflow: hidden;
}
.figure-handle {
position: absolute;
right: 6px;
bottom: 6px;
width: 14px;
height: 14px;
border-radius: 3px;
background: var(--accent);
border: 2px solid var(--accent-contrast);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
cursor: nwse-resize;
}
.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;
flex-wrap: nowrap;
gap: 4px;
justify-content: center;
margin-top: 9px;
}
.figure-controls button {
flex-shrink: 0;
white-space: nowrap;
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: var(--accent-contrast);
}
.figure-width {
align-self: center;
margin-left: 2px;
font-family: var(--font-ui);
font-size: var(--t-1);
color: var(--ink-faint);
font-variant-numeric: tabular-nums;
}
.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);
}
.menu button[data-on="true"] {
color: var(--accent);
}
.export-overlay {
position: fixed;
inset: 0;
z-index: 50;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 18px;
background: rgba(35, 32, 27, 0.32);
-webkit-backdrop-filter: blur(3px);
backdrop-filter: blur(3px);
}
.export-overlay p {
margin: 0;
font-family: var(--font-ui);
font-size: var(--t-3);
color: #fcfbf7;
}
.spinner {
width: 34px;
height: 34px;
border: 3px solid rgba(255, 255, 255, 0.28);
border-top-color: #fcfbf7;
border-radius: 50%;
animation: spin 0.7s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.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 {
height: 44px;
}
.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: var(--paper);
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-menu {
position: absolute;
top: 8px;
right: 8px;
opacity: 0;
}
.card-book:hover .card-menu,
.card-menu[data-open="true"] {
opacity: 1;
}
.panel-foot {
display: flex;
justify-content: flex-end;
gap: 10px;
padding: 14px 22px;
border-top: 1px solid var(--line);
}
.panel-confirm {
width: 420px;
}
.confirm-text {
margin: 0;
font-size: var(--t-4);
line-height: 1.5;
color: var(--ink-soft);
}
.confirm-text strong {
font-weight: 600;
color: var(--ink);
}
.btn-primary,
.btn-ghost,
.btn-danger {
font-family: var(--font-ui);
font-size: var(--t-3);
font-weight: 500;
padding: 9px 20px;
border-radius: var(--r-sm);
transition: background 120ms var(--ease), color 120ms var(--ease);
}
.btn-primary {
background: var(--accent);
color: var(--accent-contrast);
}
.btn-primary:hover {
background: var(--accent-ink);
}
.btn-ghost {
color: var(--ink-soft);
}
.btn-ghost:hover {
background: var(--accent-wash);
color: var(--ink);
}
.btn-danger {
background: var(--danger);
color: var(--danger-contrast);
}
.btn-danger:hover {
background: var(--danger-ink);
}
/* Cover */
.cover-item {
position: relative;
display: flex;
align-items: center;
gap: 11px;
margin: 2px 10px 4px;
padding: 8px 12px;
border-radius: var(--r-sm);
color: var(--ink-soft);
font-family: var(--font-ui);
font-size: var(--t-3);
cursor: pointer;
transition: background 120ms var(--ease), color 120ms var(--ease);
}
.cover-item .title {
font-weight: 500;
}
.cover-item svg {
color: var(--ink-faint);
}
.cover-item:hover {
background: var(--accent-wash);
color: var(--ink);
}
.cover-item[data-active="true"] {
background: var(--paper);
color: var(--ink);
box-shadow: 0 1px 2px rgba(35, 32, 27, 0.05);
}
.cover-item[data-active="true"] svg {
color: var(--accent);
}
.cover-item[data-active="true"]::before {
content: "";
position: absolute;
left: -10px;
top: 8px;
bottom: 8px;
width: 3px;
background: var(--accent);
border-radius: 0 2px 2px 0;
}
.cover-pane {
width: 100%;
max-width: var(--measure);
padding: 64px 24px 120px;
display: flex;
flex-direction: column;
align-items: center;
gap: 32px;
}
.cover-stage {
width: 100%;
display: flex;
justify-content: center;
}
.cover-art {
width: min(360px, 80%);
container-type: size;
position: relative;
overflow: hidden;
border-radius: var(--r-md);
border: 1px solid var(--line);
box-shadow: var(--shadow-page);
}
.cover-face {
width: 100%;
height: 100%;
}
.cover-face-image {
object-fit: cover;
display: block;
}
.cover-face-default {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 12cqw 10cqw;
}
.cover-stack {
display: flex;
flex-direction: column;
align-items: center;
}
.cover-title {
font-family: var(--font-book);
font-weight: 500;
font-size: 9.5cqw;
line-height: 1.08;
letter-spacing: -0.01em;
margin: 0;
}
.cover-rule {
display: block;
width: 15cqw;
height: 1px;
margin: 5.5cqw 0;
opacity: 0.7;
}
.cover-subtitle {
font-family: var(--font-book);
font-style: italic;
font-size: 4.6cqw;
line-height: 1.3;
margin: 0;
opacity: 0.84;
}
.cover-author {
position: absolute;
left: 0;
right: 0;
bottom: 9cqw;
margin: 0;
padding: 0 8cqw;
font-family: var(--font-ui);
font-weight: 600;
font-size: 3.4cqw;
letter-spacing: 0.24em;
text-transform: uppercase;
opacity: 0.92;
}
.cover-controls {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.cover-palettes {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
gap: 8px;
}
.cover-swatch {
width: 34px;
height: 34px;
border-radius: var(--r-sm);
border: 1px solid var(--line-strong);
font-family: var(--font-book);
font-size: 13px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
}
.cover-swatch:hover {
transform: translateY(-1px);
}
.cover-swatch[data-on="true"] {
box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent);
}
.cover-color {
width: 34px;
height: 34px;
border-radius: var(--r-sm);
border: 1px solid var(--line-strong);
overflow: hidden;
position: relative;
cursor: pointer;
}
.cover-color input {
position: absolute;
inset: -4px;
width: calc(100% + 8px);
height: calc(100% + 8px);
padding: 0;
border: 0;
background: none;
cursor: pointer;
}
.cover-actions {
display: flex;
gap: 10px;
}
.cover-btn {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 9px 14px;
border-radius: var(--r-sm);
border: 1px solid var(--line-strong);
background: var(--raised);
color: var(--ink);
font-family: var(--font-ui);
font-size: var(--t-3);
font-weight: 500;
cursor: pointer;
transition: border-color 120ms var(--ease), color 120ms var(--ease);
}
.cover-btn:hover {
border-color: var(--accent);
color: var(--accent);
}
.cover-hint {
margin: 0;
font-family: var(--font-ui);
font-size: var(--t-2);
color: var(--ink-faint);
text-align: center;
}
/* Add-page menu + front/back matter sections */
.add-page {
margin: 2px 12px 2px;
padding: 8px 10px;
display: flex;
align-items: center;
gap: 8px;
border-radius: var(--r-sm);
font-family: var(--font-ui);
font-size: var(--t-3);
color: var(--ink-faint);
transition: background 120ms var(--ease), color 120ms var(--ease);
}
.add-page:hover,
.add-page[data-open="true"] {
background: var(--accent-wash);
color: var(--ink);
}
.add-page-pop {
position: fixed;
z-index: 50;
min-width: 178px;
max-height: 72vh;
overflow-y: auto;
padding: 6px;
background: var(--paper);
border: 1px solid var(--line);
border-radius: var(--r-md);
box-shadow: var(--shadow-pop);
}
.add-page-group + .add-page-group {
margin-top: 4px;
border-top: 1px solid var(--line);
padding-top: 4px;
}
.add-page-label {
padding: 6px 10px 3px;
font-family: var(--font-ui);
font-size: var(--t-1);
font-weight: 600;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--ink-faint);
}
.add-page-item {
display: block;
width: 100%;
text-align: left;
padding: 7px 10px;
border-radius: var(--r-sm);
font-family: var(--font-ui);
font-size: var(--t-3);
color: var(--ink-soft);
transition: background 120ms var(--ease), color 120ms var(--ease);
}
.add-page-item:hover {
background: var(--accent-wash);
color: var(--ink);
}
.nav-scroll {
flex: 1;
min-height: 0;
overflow-y: auto;
display: flex;
flex-direction: column;
}
.nav-scroll .chapters {
flex: none;
overflow: visible;
}
.nav-section + .nav-section {
margin-top: 6px;
}
.chapter-drop {
margin: 2px 0;
padding: 9px 12px;
border-radius: var(--r-sm);
border: 1px dashed var(--line-strong);
color: var(--ink-faint);
font-size: var(--t-2);
text-align: center;
transition: border-color 120ms var(--ease), color 120ms var(--ease), background 120ms var(--ease);
}
.chapter-drop[data-on="true"] {
border-color: var(--accent);
color: var(--accent);
background: var(--accent-wash);
}
.find-bar {
position: fixed;
top: 54px;
right: 18px;
z-index: 30;
display: flex;
align-items: flex-start;
gap: 4px;
padding: 7px;
background: var(--glass);
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
border: 1px solid var(--line);
border-radius: var(--r-md);
box-shadow: var(--shadow-pop);
animation: find-drop 140ms var(--ease);
}
@keyframes find-drop {
from {
opacity: 0;
transform: translateY(-6px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.find-expand {
flex: none;
width: 20px;
align-self: stretch;
display: grid;
place-items: center;
border-radius: var(--r-sm);
color: var(--ink-faint);
transition: background 120ms var(--ease), color 120ms var(--ease);
}
.find-expand:hover {
background: var(--accent-wash);
color: var(--ink);
}
.find-stack {
display: flex;
flex-direction: column;
gap: 6px;
}
.find-row {
display: flex;
align-items: center;
gap: 4px;
}
.find-input {
width: 196px;
height: 28px;
padding: 0 10px;
border: 1px solid var(--line-strong);
border-radius: var(--r-sm);
background: var(--raised);
color: var(--ink);
font-family: var(--font-ui);
font-size: var(--t-2);
}
.find-input::placeholder {
color: var(--ink-faint);
}
.find-input:focus {
outline: none;
border-color: var(--accent);
}
.find-count {
min-width: 66px;
padding: 0 4px;
font-size: var(--t-1);
color: var(--ink-faint);
white-space: nowrap;
text-align: right;
}
.find-btn {
width: 26px;
height: 26px;
flex: none;
display: grid;
place-items: center;
border-radius: var(--r-sm);
color: var(--ink-soft);
transition: background 120ms var(--ease), color 120ms var(--ease);
}
.find-btn:hover:not(:disabled) {
background: var(--accent-wash);
color: var(--ink);
}
.find-btn:disabled {
opacity: 0.4;
cursor: default;
}
.find-toggle {
height: 26px;
min-width: 28px;
padding: 0 6px;
display: grid;
place-items: center;
border-radius: var(--r-sm);
color: var(--ink-soft);
font-family: var(--font-ui);
font-size: var(--t-2);
font-weight: 600;
transition: background 120ms var(--ease), color 120ms var(--ease);
}
.find-toggle:hover {
background: var(--accent-wash);
color: var(--ink);
}
.find-toggle[data-on="true"] {
background: var(--accent);
color: var(--accent-contrast);
}
.find-ww {
text-decoration: underline;
text-underline-offset: 2px;
}
.find-action {
height: 28px;
padding: 0 12px;
border-radius: var(--r-sm);
background: var(--accent-wash);
color: var(--ink-soft);
font-family: var(--font-ui);
font-size: var(--t-2);
font-weight: 600;
white-space: nowrap;
transition: background 120ms var(--ease), color 120ms var(--ease);
}
.find-action:hover:not(:disabled) {
background: var(--accent);
color: var(--accent-contrast);
}
.find-action:disabled {
opacity: 0.4;
cursor: default;
}
.find-scope {
height: 28px;
padding: 0 10px;
border-radius: var(--r-sm);
border: 1px solid var(--line-strong);
color: var(--ink-soft);
font-family: var(--font-ui);
font-size: var(--t-1);
white-space: nowrap;
transition: background 120ms var(--ease), color 120ms var(--ease);
}
.find-scope:hover {
background: var(--accent-wash);
color: var(--ink);
}
.search-match {
background: var(--accent-wash);
border-radius: 2px;
}
.search-match-current {
background: var(--selection);
border-radius: 2px;
box-shadow: 0 0 0 1.5px var(--accent);
}
.proof-mark {
cursor: pointer;
border-radius: 2px;
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 3px;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
transition: filter 120ms var(--ease);
}
.proof-mark.sev-error {
background: rgba(180, 69, 58, 0.13);
text-decoration-color: #b4453a;
}
.proof-mark.sev-warn {
background: rgba(168, 119, 24, 0.16);
text-decoration-color: #9c6e16;
}
.proof-mark.sev-suggest {
background: rgba(47, 110, 79, 0.13);
text-decoration-color: #2f6e4f;
}
.proof-mark:hover {
filter: brightness(0.96);
}
[data-theme="dark"] .proof-mark.sev-error {
background: rgba(217, 122, 111, 0.2);
text-decoration-color: #d97a6f;
}
[data-theme="dark"] .proof-mark.sev-warn {
background: rgba(217, 164, 65, 0.2);
text-decoration-color: #d9a441;
}
[data-theme="dark"] .proof-mark.sev-suggest {
background: rgba(111, 174, 132, 0.2);
text-decoration-color: #6fae84;
}
[data-theme="dark"] .proof-mark:hover {
filter: brightness(1.18);
}
.proof-pop {
position: fixed;
z-index: 50;
padding: 8px;
background: var(--paper);
border: 1px solid var(--line);
border-radius: var(--r-md);
box-shadow: var(--shadow-pop);
}
.proof-pop-kind {
display: inline-block;
margin: 0 0 6px 2px;
padding: 2px 8px;
border-radius: 999px;
font-family: var(--font-ui);
font-size: var(--t-1);
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.proof-pop-kind.sev-error {
background: rgba(180, 69, 58, 0.14);
color: var(--danger-ink);
}
.proof-pop-kind.sev-warn {
background: rgba(168, 119, 24, 0.16);
color: #8a6012;
}
.proof-pop-kind.sev-suggest {
background: rgba(47, 110, 79, 0.14);
color: #2c6048;
}
[data-theme="dark"] .proof-pop-kind.sev-error {
color: #e58e84;
}
[data-theme="dark"] .proof-pop-kind.sev-warn {
color: #e0bb6b;
}
[data-theme="dark"] .proof-pop-kind.sev-suggest {
color: #8fc6a3;
}
.proof-pop-msg {
padding: 2px 4px 8px;
font-family: var(--font-ui);
font-size: var(--t-2);
color: var(--ink-soft);
line-height: 1.4;
}
.proof-pop-suggestions {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.proof-suggestion {
padding: 5px 10px;
border-radius: var(--r-sm);
background: var(--accent-wash);
color: var(--ink);
font-family: var(--font-ui);
font-size: var(--t-2);
font-weight: 600;
transition: background 120ms var(--ease), color 120ms var(--ease);
}
.proof-suggestion:hover {
background: var(--accent);
color: var(--accent-contrast);
}
.proof-pop-actions {
display: flex;
gap: 4px;
margin-top: 8px;
padding-top: 8px;
border-top: 1px solid var(--line);
}
.proof-action {
flex: 1;
padding: 6px 8px;
border-radius: var(--r-sm);
font-family: var(--font-ui);
font-size: var(--t-1);
color: var(--ink-soft);
transition: background 120ms var(--ease), color 120ms var(--ease);
}
.proof-action:hover {
background: var(--accent-wash);
color: var(--ink);
}
.device-stage {
max-width: 420px;
margin: 0 auto;
padding-block: 6px;
container-type: inline-size;
}
.device-frame {
--dv-scale: calc(100cqi / 380);
width: 100%;
padding: calc(var(--dv-bezel-w) * var(--dv-scale));
background: var(--dv-bezel);
border-radius: calc(var(--dv-radius) * var(--dv-scale));
box-shadow: var(--shadow-page);
}
.device-screen {
aspect-ratio: var(--dv-aspect);
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--dv-bg);
color: var(--dv-ink);
border-radius: calc(max(0px, (var(--dv-radius) - var(--dv-bezel-w)) * var(--dv-scale)));
}
.device-statusbar {
flex: none;
height: calc(30 * var(--dv-scale));
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 calc(18 * var(--dv-scale));
font-family: var(--font-ui);
font-size: calc(11 * var(--dv-scale));
font-weight: 600;
color: var(--dv-ink);
}
.device-clock {
letter-spacing: 0.01em;
}
.device-batt {
position: relative;
flex: none;
width: calc(22 * var(--dv-scale));
height: calc(11 * var(--dv-scale));
border: calc(1.4 * var(--dv-scale)) solid var(--dv-ink);
border-radius: calc(3 * var(--dv-scale));
opacity: 0.7;
}
.device-batt::before {
content: "";
position: absolute;
top: calc(1.5 * var(--dv-scale));
bottom: calc(1.5 * var(--dv-scale));
left: calc(1.5 * var(--dv-scale));
width: 55%;
background: var(--dv-ink);
border-radius: 1px;
}
.device-batt::after {
content: "";
position: absolute;
right: calc(-3 * var(--dv-scale));
top: 30%;
height: 40%;
width: calc(2 * var(--dv-scale));
border-radius: 1px;
background: var(--dv-ink);
}
.device-content {
flex: 1;
min-height: 0;
overflow-y: auto;
padding: calc(var(--dv-my) * var(--dv-scale)) calc(var(--dv-mx) * var(--dv-scale));
font-family: var(--font-book);
font-size: calc(var(--dv-fs) * var(--dv-scale));
line-height: var(--dv-lh);
}
.device-frame[data-kind="eink"] .device-content::-webkit-scrollbar {
display: none;
}
.device-opener {
text-align: center;
margin-bottom: calc(20 * var(--dv-scale));
}
.device-eyebrow {
font-family: var(--font-ui);
font-size: calc(10 * var(--dv-scale));
font-weight: 600;
letter-spacing: 0.22em;
text-transform: uppercase;
opacity: 0.5;
margin-bottom: calc(8 * var(--dv-scale));
}
.device-title {
font-family: var(--font-book);
font-weight: 500;
font-size: calc(24 * var(--dv-scale));
line-height: 1.2;
letter-spacing: -0.01em;
}
.device-body p {
font-family: var(--font-book);
hyphens: auto;
margin: 0 0 0.8em;
color: var(--dv-ink);
}
.device-body p[data-indent="true"] {
text-indent: 1.2em;
}
.device-frame[data-kind="eink"] .device-body p {
text-align: justify;
}
.device-frame[data-kind="phone"] .device-body p,
.device-frame[data-kind="tablet"] .device-body p {
text-align: left;
}
.device-body h1,
.device-body h2,
.device-body h3 {
font-family: var(--font-book);
font-weight: 600;
line-height: 1.25;
margin: 1.2em 0 0.5em;
}
.device-body blockquote {
margin: 0 0 0.8em;
padding-left: 1em;
border-left: 2px solid currentColor;
font-style: italic;
opacity: 0.85;
}
.device-body hr {
border: none;
border-top: 1px solid currentColor;
width: calc(40 * var(--dv-scale));
margin: calc(16 * var(--dv-scale)) auto;
opacity: 0.3;
}
.device-body img {
display: block;
max-width: 100%;
height: auto;
margin: 0.8em auto;
}
.device-footer {
flex: none;
display: flex;
align-items: center;
justify-content: space-between;
gap: calc(10 * var(--dv-scale));
padding: calc(8 * var(--dv-scale)) calc(var(--dv-mx) * var(--dv-scale));
font-family: var(--font-ui);
font-size: calc(11 * var(--dv-scale));
color: var(--dv-ink);
opacity: 0.55;
}
.device-foot-title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.device-content .cover-art {
width: 100%;
margin: auto;
box-shadow: none;
border: none;
border-radius: 0;
}