Files
read-it-later/newtab.css
T

316 lines
6.4 KiB
CSS

:root {
--paper: #EDEAE1;
--surface: #F8F6F0;
--ink: #211E19;
--muted: #756E60;
--hairline: #DBD6C7;
--clay: #C47A4A;
--clay-deep: #A8623A;
--moss: #55684B;
--shadow: 0 1px 2px rgba(33, 30, 25, 0.06), 0 6px 16px rgba(33, 30, 25, 0.05);
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
background: var(--paper);
color: var(--ink);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
}
.sr-only {
position: absolute;
width: 1px; height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
}
.page {
max-width: 1100px;
margin: 0 auto;
padding: 56px 32px 80px;
}
/* --- Masthead --- */
.masthead {
margin-bottom: 36px;
}
.masthead-title {
display: flex;
align-items: baseline;
gap: 12px;
}
.masthead-title .mark {
font-size: 26px;
transform: translateY(2px);
}
.masthead h1 {
font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
font-size: 40px;
font-weight: 600;
letter-spacing: -0.01em;
margin: 0;
color: var(--ink);
}
.tally {
margin: 6px 0 0;
color: var(--muted);
font-size: 14px;
font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}
#archivedNote { margin-left: 6px; }
/* --- Toolbar --- */
.toolbar {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 28px;
flex-wrap: wrap;
}
#search {
flex: 1 1 240px;
min-width: 180px;
padding: 10px 14px;
border-radius: 8px;
border: 1px solid var(--hairline);
background: var(--surface);
font-size: 14px;
color: var(--ink);
}
#search:focus-visible {
outline: 2px solid var(--clay);
outline-offset: 1px;
}
select#sortSelect {
padding: 9px 12px;
border-radius: 8px;
border: 1px solid var(--hairline);
background: var(--surface);
font-size: 13px;
color: var(--ink);
font-family: inherit;
}
.control-group { display: flex; gap: 6px; }
.toggle-btn, .ghost-btn {
border: 1px solid var(--hairline);
background: var(--surface);
color: var(--muted);
border-radius: 8px;
padding: 9px 12px;
font-size: 14px;
cursor: pointer;
line-height: 1;
}
.toggle-btn[aria-pressed="true"] {
color: var(--clay-deep);
border-color: var(--clay);
background: #FBEFE6;
}
.toggle-btn:focus-visible, .ghost-btn:focus-visible, select:focus-visible {
outline: 2px solid var(--clay);
outline-offset: 1px;
}
.ghost-btn { white-space: nowrap; font-family: inherit; }
.ghost-btn.active {
color: var(--clay-deep);
border-color: var(--clay);
background: #FBEFE6;
}
/* --- Shelf: grid view (library index cards) --- */
.shelf[data-view="grid"] {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 18px;
}
.card {
background: var(--surface);
border: 1px solid var(--hairline);
border-radius: 10px;
overflow: hidden;
box-shadow: var(--shadow);
display: flex;
flex-direction: column;
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
transform: translateY(-2px);
box-shadow: 0 2px 4px rgba(33,30,25,0.08), 0 10px 22px rgba(33,30,25,0.08);
}
.card-thumb {
height: 120px;
background: linear-gradient(135deg, #E4DFD0, #D8D2BF);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb .favicon-fallback {
width: 34px; height: 34px;
border-radius: 6px;
background: var(--paper);
display: flex; align-items: center; justify-content: center;
font-family: Georgia, serif;
font-size: 16px;
color: var(--clay-deep);
border: 1px solid var(--hairline);
}
.card-perf {
border-top: 1px dashed var(--hairline);
}
.card-body {
padding: 12px 14px 14px;
display: flex;
flex-direction: column;
gap: 6px;
flex: 1;
}
.card-title {
font-size: 14.5px;
font-weight: 600;
line-height: 1.35;
color: var(--ink);
text-decoration: none;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.card-title:hover { color: var(--clay-deep); }
.card-meta {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 11.5px;
color: var(--muted);
font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
margin-top: auto;
}
.card-actions {
display: flex;
gap: 6px;
margin-top: 8px;
}
.icon-btn {
border: 1px solid var(--hairline);
background: transparent;
border-radius: 6px;
font-size: 12px;
padding: 5px 9px;
color: var(--muted);
cursor: pointer;
font-family: inherit;
}
.icon-btn:hover { color: var(--ink); border-color: #C9C2AE; }
.icon-btn.danger:hover { color: #A8412D; border-color: #E3B7A9; }
/* --- Shelf: list view (bookshelf spines) --- */
.shelf[data-view="list"] {
display: flex;
flex-direction: column;
gap: 8px;
}
.shelf[data-view="list"] .card {
flex-direction: row;
align-items: stretch;
height: 64px;
}
.shelf[data-view="list"] .spine {
width: 6px;
flex-shrink: 0;
}
.shelf[data-view="list"] .card-thumb {
width: 64px;
height: 64px;
flex-shrink: 0;
}
.shelf[data-view="list"] .card-perf {
border-top: none;
border-left: 1px dashed var(--hairline);
}
.shelf[data-view="list"] .card-body {
flex-direction: row;
align-items: center;
gap: 14px;
padding: 0 14px;
flex: 1;
min-width: 0;
}
.shelf[data-view="list"] .card-title {
-webkit-line-clamp: 1;
flex: 1;
min-width: 0;
}
.shelf[data-view="list"] .card-meta {
flex-direction: column;
align-items: flex-end;
gap: 2px;
margin-top: 0;
white-space: nowrap;
}
.shelf[data-view="list"] .card-actions {
margin-top: 0;
}
.archived-badge {
font-size: 10px;
padding: 2px 6px;
border-radius: 999px;
background: #E6E2D3;
color: var(--muted);
font-family: ui-monospace, monospace;
text-transform: uppercase;
letter-spacing: 0.04em;
}
/* --- Empty state --- */
.empty-state {
text-align: center;
padding: 80px 20px;
color: var(--muted);
}
.empty-title {
font-family: Georgia, serif;
font-size: 20px;
color: var(--ink);
margin-bottom: 6px;
}
.empty-sub { font-size: 14px; max-width: 380px; margin: 0 auto; }
/* --- Toast --- */
.toast {
position: fixed;
bottom: 24px;
left: 50%;
transform: translateX(-50%);
background: var(--ink);
color: var(--paper);
padding: 10px 16px;
border-radius: 8px;
font-size: 13px;
box-shadow: var(--shadow);
}
@media (prefers-reduced-motion: reduce) {
.card { transition: none; }
}
@media (max-width: 560px) {
.page { padding: 32px 16px 60px; }
.masthead h1 { font-size: 30px; }
}