Look up again and Fix sat in the actions column and squeezed the title and reason to a character wide. They now sit on their own line under the reason, in a smaller button, and only the remove button stays at the right. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
309 lines
18 KiB
CSS
309 lines
18 KiB
CSS
/* Booksorter: one visual system. Everything below uses these tokens. */
|
|
:root {
|
|
color-scheme: light dark;
|
|
|
|
/* spacing: a 4px scale */
|
|
--space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
|
|
--space-6: 24px; --space-8: 32px; --space-10: 40px;
|
|
|
|
/* type */
|
|
--text-sm: 13px; --text-md: 15px; --text-lg: 18px; --text-xl: 24px;
|
|
--font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
--font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
|
|
--leading: 1.4;
|
|
|
|
/* shape and size */
|
|
--radius: 8px; --radius-lg: 12px; --radius-pill: 999px;
|
|
--control: 36px; --icon-btn: 32px; --row-h: 56px;
|
|
--icon: 16px; --icon-lg: 20px;
|
|
--page-max: 1200px; --gutter: 24px; --left-col: 440px; --panel-w: 440px;
|
|
--callno-col: 96px; --mark-col: 20px;
|
|
|
|
/* colour (light) */
|
|
--bg: #f6f5f2;
|
|
--surface: #ffffff;
|
|
--border: #dcd9d1;
|
|
--border-strong: #8c887e;
|
|
--text: #1c1b19;
|
|
--muted: #5c5a54;
|
|
--accent: #1a56b0;
|
|
--on-accent: #ffffff;
|
|
--success: #16703f;
|
|
--warning: #8a4b00;
|
|
--danger: #b3261e;
|
|
--on-danger: #ffffff;
|
|
--accent-soft: #e3ecf9;
|
|
--warning-soft: #fbefd9;
|
|
--hover: color-mix(in srgb, var(--text) 6%, transparent);
|
|
--scrim: rgba(0, 0, 0, .45);
|
|
--shadow: 0 8px 24px rgba(0, 0, 0, .18);
|
|
|
|
/* on top of the video */
|
|
--video-bg: #000000;
|
|
--overlay: rgba(0, 0, 0, .72);
|
|
--on-overlay: #ffffff;
|
|
--on-overlay-line: rgba(255, 255, 255, .6);
|
|
--on-overlay-hover: rgba(255, 255, 255, .18);
|
|
--overlay-ok: #86efac;
|
|
--overlay-warn: #fcd34d;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--bg: #141518;
|
|
--surface: #1e2024;
|
|
--border: #32353b;
|
|
--border-strong: #70747c;
|
|
--text: #ecebe6;
|
|
--muted: #a3a29b;
|
|
--accent: #7eb0f5;
|
|
--on-accent: #08182e;
|
|
--success: #58c98a;
|
|
--warning: #e8ab55;
|
|
--danger: #f4948c;
|
|
--on-danger: #2a0a07;
|
|
--accent-soft: #1f2d44;
|
|
--warning-soft: #33291a;
|
|
--scrim: rgba(0, 0, 0, .6);
|
|
--shadow: 0 8px 24px rgba(0, 0, 0, .5);
|
|
}
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
body { margin: 0; background: var(--bg); color: var(--text); font: var(--text-md) / var(--leading) var(--font-sans); }
|
|
h1, h2, h3, p { margin: 0; }
|
|
button, input, select { font: inherit; color: inherit; }
|
|
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
|
|
a { color: var(--accent); }
|
|
ul { list-style: none; margin: 0; padding: 0; }
|
|
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
.mono { font-family: var(--font-mono); }
|
|
.error { color: var(--danger); }
|
|
|
|
/* Buttons: one filled primary per screen; everything else is quiet (border) or text. */
|
|
.btn {
|
|
display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
|
|
min-height: var(--control); padding: 0 var(--space-4);
|
|
border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface);
|
|
color: var(--text); text-align: center; text-decoration: none; white-space: nowrap;
|
|
}
|
|
.btn-sm { min-height: 28px; padding: 0 var(--space-3); font-size: var(--text-sm); }
|
|
.btn:hover:not(:disabled) { background: var(--hover); }
|
|
.btn:disabled { opacity: .55; cursor: default; }
|
|
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
|
|
.btn-primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.1); }
|
|
.btn-primary:disabled { opacity: 1; background: var(--bg); border-color: var(--border); color: var(--muted); }
|
|
.btn-text { border-color: transparent; background: none; }
|
|
.btn-danger { color: var(--danger); }
|
|
.btn-icon {
|
|
display: inline-flex; align-items: center; justify-content: center;
|
|
min-width: var(--icon-btn); min-height: var(--icon-btn); border: 1px solid transparent; border-radius: var(--radius);
|
|
color: var(--muted); font-size: var(--text-lg); line-height: 1;
|
|
}
|
|
.btn-icon:hover { background: var(--hover); border-color: var(--border-strong); color: var(--text); }
|
|
.icon { width: var(--icon); height: var(--icon); flex: none; }
|
|
.icon-lg { width: var(--icon-lg); height: var(--icon-lg); }
|
|
|
|
/* Fields */
|
|
input, select {
|
|
width: 100%; min-height: var(--control); padding: 0 var(--space-3);
|
|
border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text);
|
|
}
|
|
input[aria-invalid="true"] { border-color: var(--danger); }
|
|
.field { display: grid; gap: var(--space-1); font-size: var(--text-sm); color: var(--muted); }
|
|
.field input, .field select { font-size: var(--text-md); }
|
|
.field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-3); }
|
|
.help { margin: 0; font-size: var(--text-sm); color: var(--muted); }
|
|
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
|
|
|
|
/* Header */
|
|
.top { background: var(--surface); border-bottom: 1px solid var(--border); }
|
|
.top-inner { display: flex; align-items: center; gap: var(--space-6); max-width: var(--page-max); margin: 0 auto; padding: var(--space-2) var(--gutter); }
|
|
.top h1 { font-size: var(--text-lg); font-weight: 700; }
|
|
.top nav { display: flex; gap: var(--space-1); }
|
|
.tab { min-height: var(--control); padding: 0 var(--space-3); border-bottom: 2px solid transparent; color: var(--muted); }
|
|
.tab:hover { color: var(--text); }
|
|
.tab.on { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
|
|
.top-gear { margin-left: auto; min-width: var(--control); min-height: var(--control); }
|
|
|
|
main { max-width: var(--page-max); margin: 0 auto; padding: var(--space-6) var(--gutter); }
|
|
|
|
/* Scan: camera, last scan and entry on the left; cards to print on the right */
|
|
.scan { display: grid; grid-template-columns: var(--left-col) minmax(0, 1fr); gap: var(--space-6); align-items: start; }
|
|
.scan-left { position: sticky; top: var(--space-4); display: grid; gap: var(--space-4); min-width: 0; }
|
|
.cards { min-width: 0; }
|
|
|
|
.video-frame {
|
|
position: relative; aspect-ratio: 16 / 10; overflow: hidden;
|
|
background: var(--video-bg); border: 3px solid var(--border); border-radius: var(--radius-lg);
|
|
transition: border-color .15s;
|
|
}
|
|
.video-frame.flash { border-color: var(--success); transition: none; }
|
|
.video-frame video { display: block; width: 100%; height: 100%; object-fit: cover; transform-origin: center; }
|
|
.target {
|
|
position: absolute; border: 2px solid var(--on-overlay); border-radius: var(--radius);
|
|
box-shadow: 0 0 0 100vmax var(--scrim); pointer-events: none;
|
|
}
|
|
.video-frame.flash .target { border-color: var(--overlay-ok); }
|
|
.video-bar {
|
|
position: absolute; left: 0; right: 0; bottom: 0;
|
|
display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3);
|
|
background: var(--overlay); color: var(--on-overlay);
|
|
}
|
|
.video-status {
|
|
flex: 1 1 auto; min-width: 0; font-size: var(--text-sm);
|
|
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
|
|
}
|
|
.tone-ok { color: var(--overlay-ok); }
|
|
.tone-warn { color: var(--overlay-warn); }
|
|
.btn-video { border-color: var(--on-overlay-line); background: transparent; color: var(--on-overlay); }
|
|
.btn-video:hover:not(:disabled) { background: var(--on-overlay-hover); }
|
|
.btn-video:focus-visible { outline-color: var(--on-overlay); }
|
|
.btn-video-icon { flex: none; padding: 0; width: var(--control); }
|
|
.video-empty {
|
|
position: absolute; top: 0; right: 0; bottom: 0; left: 0;
|
|
display: grid; place-content: center; justify-items: center; gap: var(--space-3); padding: var(--space-4);
|
|
color: var(--on-overlay); text-align: center;
|
|
}
|
|
.video-problem { max-width: 28ch; font-size: var(--text-sm); color: var(--overlay-warn); }
|
|
|
|
/* Last scan */
|
|
.last { padding: var(--space-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); min-height: 120px; }
|
|
.last-empty { display: grid; place-items: center; color: var(--muted); text-align: center; }
|
|
.last-title { font-size: var(--text-lg); font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
|
|
.last-author { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.last-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-3); min-width: 0; }
|
|
.last-mark { display: inline-flex; flex: none; }
|
|
.last-mark .icon { width: var(--text-xl); height: var(--text-xl); }
|
|
.last-ready { color: var(--success); }
|
|
.last-attention { color: var(--warning); }
|
|
.last-already { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); color: var(--muted); }
|
|
|
|
/* Entry box and its results */
|
|
.entry { display: grid; gap: var(--space-1); }
|
|
.entry-input { min-height: 44px; font-size: var(--text-lg); }
|
|
.entry-help { min-height: calc(var(--text-sm) * var(--leading)); font-size: var(--text-sm); color: var(--muted); }
|
|
.entry-help.error { color: var(--danger); }
|
|
.entry-pop { display: grid; gap: var(--space-2); }
|
|
.entry-none { font-size: var(--text-sm); color: var(--muted); }
|
|
.results { max-height: 40vh; overflow: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); }
|
|
.result { display: grid; gap: 2px; min-height: var(--control); padding: var(--space-2) var(--space-3); border-top: 1px solid var(--border); cursor: pointer; }
|
|
.result:first-child { border-top: 0; }
|
|
.result.active { background: var(--accent-soft); }
|
|
.result-title { font-weight: 600; overflow-wrap: anywhere; }
|
|
.result-sub { font-size: var(--text-sm); color: var(--muted); overflow-wrap: anywhere; }
|
|
.result-footer .result-title { color: var(--accent); }
|
|
|
|
/* Cards to print */
|
|
.cards-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
|
|
.cards-head h2, .group-head { font-size: var(--text-lg); font-weight: 600; }
|
|
.count { margin-left: var(--space-1); font-size: var(--text-md); font-weight: 400; color: var(--muted); }
|
|
.cards-print { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
|
|
.cards-reason { font-size: var(--text-sm); color: var(--muted); }
|
|
.print-anchor { position: relative; }
|
|
.print-panel {
|
|
position: absolute; top: calc(100% + var(--space-2)); right: 0; z-index: 20;
|
|
display: grid; gap: var(--space-3); width: min(20rem, calc(100vw - 2 * var(--gutter))); padding: var(--space-4);
|
|
background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow);
|
|
}
|
|
.print-panel:focus { outline: none; }
|
|
.print-question { font-weight: 600; }
|
|
.print-note { font-size: var(--text-sm); }
|
|
.slots-wrap { display: grid; gap: var(--space-2); justify-items: start; }
|
|
.slots-label { font-size: var(--text-sm); color: var(--muted); }
|
|
.sheet { display: grid; gap: var(--space-1); width: 100%; padding: var(--space-2); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
|
|
.slot { min-height: var(--control); text-align: center; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); }
|
|
.slot:hover { background: var(--hover); }
|
|
.slot.on { background: var(--accent-soft); border: 2px solid var(--accent); font-weight: 700; }
|
|
.slot.used { border-style: dashed; color: var(--muted); }
|
|
|
|
/* Rows: state mark, call number, title and author, actions. Shared by both screens. */
|
|
.rows { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
|
|
.row {
|
|
display: grid; grid-template-columns: var(--mark-col) var(--callno-col) minmax(0, 1fr) auto; align-items: center;
|
|
gap: var(--space-3); min-height: var(--row-h); padding: var(--space-2) var(--space-3);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.rows > li:last-child > .row, .rows > .row:last-child { border-bottom: 0; }
|
|
.row-library { width: 100%; grid-template-columns: var(--mark-col) var(--callno-col) minmax(0, 1fr); color: var(--text); text-align: left; }
|
|
.row-library:hover { background: var(--hover); }
|
|
.row:focus-visible { outline-offset: -2px; }
|
|
.row-attention { background: var(--warning-soft); }
|
|
.mark { display: flex; justify-content: center; }
|
|
.mark-ready { color: var(--success); }
|
|
.mark-attention { color: var(--warning); }
|
|
.row-main { display: grid; gap: 2px; min-width: 0; }
|
|
.row-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
|
|
.row-sub { font-size: var(--text-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.state-text { font-size: var(--text-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
|
|
.state-looking { color: var(--muted); display: block; overflow: visible; } /* wraps in full: the retry note must not be cut off on a narrow row */
|
|
.state-attention { color: var(--warning); font-weight: 600; }
|
|
.elapsed { font-variant-numeric: tabular-nums; }
|
|
.row-fixes { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-1); }
|
|
.last-fixes { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
|
|
.row-actions { display: flex; align-items: center; gap: var(--space-1); }
|
|
|
|
/* Call number: two monospaced lines in a fixed-width column */
|
|
.callno { display: block; width: var(--callno-col); min-width: 0; font-family: var(--font-mono); font-size: var(--text-sm); line-height: 1.3; font-variant-numeric: tabular-nums; }
|
|
.callno-line { display: block; min-height: 1.3em; overflow-wrap: anywhere; }
|
|
.callno-none { color: var(--muted); }
|
|
.callno-large { width: auto; font-size: var(--text-xl); line-height: 1.2; }
|
|
.callno-large .callno-line { min-height: 1.2em; }
|
|
.approx { color: var(--warning); cursor: help; }
|
|
|
|
/* Spinner (still, not spinning, when motion is reduced) */
|
|
.spinner { display: inline-block; flex: none; width: 14px; height: 14px; vertical-align: -2px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.spinner { animation: none; }
|
|
.video-frame, .video-frame.flash { transition: none; }
|
|
}
|
|
|
|
.empty { padding: var(--space-6) var(--space-4); text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
|
|
.empty-page { margin-top: var(--space-10); }
|
|
|
|
/* Library */
|
|
.library-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
|
|
.library-search { flex: 1 1 20rem; }
|
|
.chip { display: inline-flex; align-items: center; min-height: var(--control); padding: 0 var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--surface); }
|
|
.chip:hover { background: var(--hover); }
|
|
.chip.on { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
|
|
.group { margin-bottom: var(--space-6); }
|
|
.group-head { margin-bottom: var(--space-2); }
|
|
|
|
/* Panels: a side panel on wide windows, a full-width sheet on narrow ones */
|
|
.backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 30; display: flex; justify-content: flex-end; background: var(--scrim); }
|
|
.panel { display: flex; flex-direction: column; width: min(var(--panel-w), 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow); }
|
|
.panel:focus { outline: none; }
|
|
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-6); border-bottom: 1px solid var(--border); }
|
|
.panel-head h2 { font-size: var(--text-lg); font-weight: 600; }
|
|
.panel-body { display: grid; gap: var(--space-6); align-content: start; padding: var(--space-6); overflow: auto; }
|
|
.editor { display: grid; gap: var(--space-4); }
|
|
.fix-search { display: grid; gap: var(--space-2); padding-bottom: var(--space-4); border-bottom: 1px solid var(--border); }
|
|
.search-row { display: flex; gap: var(--space-2); }
|
|
.danger-zone { padding-top: var(--space-4); border-top: 1px solid var(--border); }
|
|
.confirm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
|
|
.confirm-text { margin-right: var(--space-2); font-weight: 600; }
|
|
.settings-block { display: grid; gap: var(--space-3); }
|
|
.settings-block h3 { font-size: var(--text-md); font-weight: 600; }
|
|
fieldset.settings-block { border: 0; padding: 0; margin: 0; min-width: 0; }
|
|
fieldset.settings-block legend { padding: 0; font-weight: 600; margin-bottom: var(--space-2); }
|
|
|
|
/* Toasts */
|
|
.toasts { position: fixed; left: 50%; bottom: var(--space-6); z-index: 50; display: grid; gap: var(--space-2); width: min(32rem, calc(100vw - 2 * var(--gutter))); transform: translateX(-50%); pointer-events: none; }
|
|
.toast { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--control); padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4); background: var(--text); color: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow); }
|
|
.toast-error { background: var(--danger); color: var(--on-danger); }
|
|
.toast-text { min-width: 0; overflow-wrap: anywhere; }
|
|
.toast-action { flex: none; min-height: var(--icon-btn); padding: 0 var(--space-2); border-radius: var(--radius); font-weight: 700; text-decoration: underline; color: inherit; }
|
|
.toast-action:focus-visible { outline-color: currentColor; }
|
|
|
|
@media (max-width: 820px) {
|
|
.scan { grid-template-columns: minmax(0, 1fr); }
|
|
.scan-left { position: static; }
|
|
.panel { width: 100%; }
|
|
}
|
|
|
|
/* Where a call number sits in the classification: one line of secondary text, the most specific level in full colour. */
|
|
.crumbs { margin: 0; font-size: var(--text-sm); color: var(--muted); line-height: var(--leading); }
|
|
.crumb-last { color: var(--text); }
|