*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } :root { /* Border for interactive controls whose outline is their only affordance (form fields, toggle tracks). On dark it equals --border; the light block deepens it to clear 3:1 on paper. */ --border-strong: var(--border); --accent: #f5f5f7; /* text3 is reserved for large-text (≥18px or ≥14px bold) only — it's WCAG-AA compliant against --bg at large sizes (3:1) but not at normal body text. Use --text2 for everything else. */ --text3: #6e6e7a; --text-dim: #6e6e7a; --hover: rgba(245, 158, 11, 0.08); --error: #ef4444; /* Translucent bar/menu surface (topbar frosted glass). Tokenised so the light theme can flip it without every backdrop rule carrying a literal. */ --topbar-bg: #0a0a0b; /* Raised popover/menu fill (context menus, drawers). One token so the three call sites can't drift, and the light theme flips it in one place. */ --card-bg: #1a1a1a; /* Positive/"sharing active" semantics (seed + peer badges). --success is the text/icon green; the faint translucent fills stay inline (they read on both themes). Light theme darkens the ink for contrast on paper. */ --success: #6ec56e; --success-strong: #84d684; --radius: 10px; --shadow-popup: 0 8px 32px rgba(0,0,0,0.5); /* Height of the connection banner (0 when connected). Measured by _syncConnBannerHeight() because the banner wraps on narrow screens. Every surface anchored under the 56px topbar offsets by it, so the banner PUSHES content instead of covering it — an offline notice must never sit on top of the article someone is reading. */ --conn-h: 0px; /* The notch / status bar: viewport-fit=cover lets the page run under it, so the header grows by it. */ --sat: env(safe-area-inset-top, 0px); --under-topbar: calc(56px + var(--sat) + var(--conn-h)); /* Where the header goes when it steps aside: its own height and a pixel more, so a part pixel of rounding never leaves its bottom border showing as a line along the top of the page. */ --topbar-away: calc(-100% - 1px); color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif; } /* ── Light theme ── Warm-paper, soft-contrast counterpart to the default dark palette — NOT stark white. The amber accent deepens to a burnt amber (#b45309) so it keeps AA contrast as text/link on paper AND still reads as a warm fill with black label text; every `var(--amber*)` reference adapts at once (no per-selector churn). Applied by [data-theme] on , stamped synchronously in the head bootstrap so there's no dark flash. Auto mode resolves to dark or light and sets the same attribute, so the CSS has exactly one code path. Deliberate seam: the almanac overlay + the home "Today"/space cards keep their dark cosmic identity in both themes (a night sky is a night sky). */ :root[data-theme="light"] { /* Amber deepened one more step (#b45309 → #9d4a08) so it clears WCAG-AA as text/link on paper (5.35:1 on --bg) AND as small amber ink on the faint amber-glow badge fills (updated / installed / multilingual: 4.70:1). The fills flip their ink to white via --on-amber, so a deeper amber only helps them too. */ --accent: #1a1917; /* text3 deepened (#7c786e → #6f6b60) so the muted 10–12px labels that use it (download sizes, field notes, dropdown sublabels) clear AA at 4.63:1 — the dark-theme "large text only" caveat doesn't survive on paper. */ --text3: #6f6b60; --text-dim: #6f6b60; --hover: rgba(180, 83, 9, 0.10); --error: #dc2626; /* Interactive-control borders that carry meaning (form fields, toggle tracks). The decorative --border (#e4dfd4) is only ~1.2:1 on paper — fine for card separators that also have a fill change, too weak for a control whose outline is its only affordance. This deeper grey hits 3:1 on --bg (3.30) and on --surface (3.63). */ --border-strong: #8c826f; /* Card definition on paper: a firmer edge than the decorative --border plus a soft warm shadow, so tiles/detail cards read as cards, not loose blocks. */ --card-border: #ddd6c8; --card-shadow: 0 1px 2px rgba(66, 54, 30, 0.06), 0 3px 8px rgba(66, 54, 30, 0.05); --topbar-bg: #faf9f6; --card-bg: #ffffff; --success: #2f7d32; --success-strong: #256428; --shadow-popup: 0 8px 32px rgba(60, 50, 30, 0.16); color-scheme: light; } /* Two single-use status inks that are legible on dark but wash out on paper: the "reused download" teal and the "stale" ochre. Darkened here rather than tokenised — one call site each, so a token would be ceremony. */ :root[data-theme="light"] .dl-source-reuse { color: #0f766e; } :root[data-theme="light"] .ci-hier-freshness { color: #a16207; } /* Almanac seam (intentional): the almanac is a canvas-driven night-sky app — its orrery/sky/star-field paint hardcoded cosmic colors that only read on dark. Rather than ship a half-lit almanac, we keep its whole subtree dark under the light app. Custom properties inherit, so redefining the token set on the overlay container re-establishes the dark palette for every child (cards, text, pills) without touching almanac.css. The result is a light app chrome over a deliberately dark cosmic panel — a seam by design, not a bug. */ /* The whole chrome joins the seam while the almanac is open (body.almanac-mode): a light header floating over the night-sky panel was the one jarring strip left in the light theme. The tokens scope to the BODY, not just .topbar, for two reasons found the hard way: (1) .topbar declares no `color`, so its glyphs (logo, breadcrumb calendar icon) inherit body's computed light-theme ink — retinting tokens on .topbar alone left dark ink on a dark bar; and (2) --topbar-bg is translucent, so the bar composites over the body background — over paper it rendered a lighter, warmer strip than the true dark topbar. On body, `background: var(--bg)` and `color: var(--text)` re-resolve with the dark set, making the chrome pixel-identical to the dark theme. html.almanac-boot covers the reload-into-almanac window before almanac.js has added body.almanac-mode, so even the first paint is dark. The classes come off with the almanac, so everything reverts on leave. */ /* The page under the dark Almanac is dark too: iOS tints its status bar from the root, which stayed paper (Eric: "the tap area color isn't filled"). */ :root[data-theme="light"]:has(> body.almanac-mode), :root[data-theme="light"].almanac-boot { background: #0a0a0b; } /* One pixel of page to scroll, so iOS's status-bar tap reaches the Almanac (_armTapRelay). */ html.tap-relay body { min-height: calc(100% + 2px); } :root[data-theme="light"] .almanac-view, :root[data-theme="light"] body.almanac-mode, :root[data-theme="light"].almanac-boot body { --bg: #0a0a0b; --surface: #141416; --surface2: #1c1c20; --border: #27272b; --text: #e8e8ed; --text2: #8a8a94; --accent: #f5f5f7; --amber: #f59e0b; --amber2: #d97706; --amber-glow: rgba(245, 158, 11, 0.08); --amber-border: rgba(245, 158, 11, 0.25); --text3: #6e6e7a; --text-dim: #6e6e7a; --hover: rgba(245, 158, 11, 0.08); --error: #ef4444; --card-bg: #1a1a1a; --success: #6ec56e; --success-strong: #84d684; /* Dark-only tokens the light root overrides above: the topbar (and its menu) read these, so they must flip back with the rest of the set. */ --on-amber: #000; --border-strong: var(--border); --topbar-bg: #0a0a0b; --shadow-popup: 0 8px 32px rgba(0, 0, 0, 0.5); /* Light-only card tokens return to their dark-theme fallbacks (usage is var(--card-border, var(--border)) / var(--card-shadow, none)). */ --card-border: var(--border); --card-shadow: none; color-scheme: dark; } /* Reload-into-almanac boot gate. The head bootstrap stamps html.almanac-boot synchronously when the URL hash is #almanac (removed by _openAlmanacInner, or by the load-failure paths), so the home/library view never paints first and the almanac's dark shell shows immediately — before almanac.js loads. */ html.almanac-boot #main-view { display: none !important; } html.almanac-boot #almanac-view { display: flex; } html.alm-3d-boot #almanac-view { visibility: hidden; } html.alm-3d-boot, html.alm-3d-boot body { background: #000; } /* Its content gets no box until the Almanac opens: almanac.css arrives with the scripts, and a box styled before it would change under it, which with reduced motion (every transition 0.01ms) still starts a transition, so the first measure would read the old padding. */ html.almanac-boot:not(.alm-first) #almanac-content { display: none; } /* Reload-into-Create boot gate, same contract as the almanac one above: stamped by the head bootstrap for #create, dropped by _openCreateInner (or by the load-failure paths), so a shared Create URL opens ON Create instead of flashing the library first. */ html.create-boot #main-view { display: none !important; } html.create-boot #create-view { display: flex; } /* Reload-into-Manage boot gate. Manage renders INTO #main-view (no view of its own), so unlike the two above the gate can't swap containers — it hides main-view's content (visibility, not display, so renderManage can still measure layout) until enterManage has drawn manage in place and dropped the class. If the client may not manage, enterManage drops the class and shows the library instead. */ html.manage-boot #main-view { visibility: hidden; } /* Pulled past an edge, the page shows its own background, not the browser's white, and never scrolls sideways. On a touch screen it does not spring either. Not with a mouse or trackpad: Safari on macOS stops wheel scrolling altogether when the root's vertical overscroll-behavior is anything but auto (Eric, 2026-10-24: "scroll isn't working in my safari on macos"). */ html { height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior-x: none; background: var(--bg); } @media (hover: none) and (pointer: coarse) { html { overscroll-behavior: none; } } /* A pinch zooms; nothing zooms on its own. A double tap is a tap, not a zoom; the text keeps its size when the phone turns; and a field or menu gets 16px type on a touch screen, because iOS zooms the page into any it focuses that is smaller. The !important outranks the inline sizes a few controls are drawn with. */ html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } @media (pointer: coarse) { input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea { font-size: 16px !important; } } body { background: var(--bg); color: var(--text); min-height: 100%; padding-top: var(--under-topbar); overflow: visible; overflow-x: clip; } /* Anti-flash guard. The head bootstrap stamps .theme-boot on while it (re)applies the theme, then removes it on the next committed paint. While it is present, every element's transitions are killed so a bfcache restore / tab re-activation can't animate a dark->light token flip on pills, cards, and toggles (the residual Safari flash). Animations are left alone — only the colour transitions cause the flash. */ html.theme-boot *, html.theme-boot *::before, html.theme-boot *::after { transition: none !important; } /* ── Accessibility ── */ /* Visually-hide content but keep it readable for screen readers. */ .sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } /* Skip link — visually hidden until keyboard focus brings it onto screen. First tab-stop on the page so keyboard users can jump past the topbar. */ .skip-link { position: absolute; top: -100px; left: 12px; background: var(--amber); color: var(--on-amber); padding: 8px 16px; border-radius: var(--r-chip); font-weight: var(--fw-strong); font-size: 14px; z-index: 10000; text-decoration: none; transition: top var(--dur-press) var(--ease-press); } .skip-link:focus, .skip-link:focus-visible { top: 12px; outline: 2px solid var(--amber); outline-offset: 2px; } /* Visible focus ring across the SPA. The default browser focus ring is invisible-on-dark for many elements; this guarantees a high- contrast outline that works on both light and dark themes. */ :focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; } /* Buttons / inputs that already style their own focus state opt out. */ button:focus:not(:focus-visible), input:focus:not(:focus-visible), textarea:focus:not(:focus-visible), select:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; } /* ── Topbar ── */ .topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: calc(56px + var(--sat)); display: flex; align-items: center; gap: 10px; /* Opaque: the page scrolling under a translucent bar showed through ("APPS" and the view toggle ghosting behind the logo). */ padding: var(--sat) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); background: var(--topbar-bg); border-bottom: 1px solid var(--border); } /* A game's sheet is open: the bar takes the game's veil but stays tappable (Menu closes the sheet). */ body.game-sheet .topbar::after { content: ''; position: absolute; inset: 0; background: var(--game-scrim, rgba(0, 0, 0, 0.5)); pointer-events: none; } .topbar .logo { font-size: 18px; white-space: nowrap; flex-shrink: 0; cursor: pointer; } /* The wordmark's colour, weight and tracking are zimifooter.css's (.zimi-brand). */ /* ── Connection banner ── Shown whenever the app cannot vouch for what it is displaying: the server is unreachable, or answered but the library did not load. Calm by design — a thin bar in the app's own surface colours with an amber status dot, not a red alarm. Being offline is normal for an offline-first app; it should feel handled. Never a modal: cached articles, bookmarks and the almanac stay usable behind it. */ .conn-retry { flex-shrink: 0; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--amber); background: var(--amber-glow); border: 1px solid var(--amber-border); border-radius: var(--r-chip); padding: 4px 12px; } .conn-retry:hover:not(:disabled) { background: var(--amber); color: var(--on-amber); border-color: var(--amber); } .conn-retry:disabled { opacity: 0.5; cursor: default; } /* Keep on this phone: one block in a ZIM's About panel. */ .zi-keep { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); } .keep-head { font-size: var(--fs-small); font-weight: var(--fw-strong); color: var(--text); margin-bottom: 6px; } .keep-line { display: flex; justify-content: space-between; gap: var(--sp-3); align-items: baseline; font-size: var(--fs-small); color: var(--text); } .keep-line span { color: var(--text2); font-variant-numeric: tabular-nums; } .keep-note { font-size: 12.5px; line-height: 1.5; color: var(--text2); margin-top: 6px; } .keep-note.keep-err { color: var(--amber2); } .keep-bar { height: 6px; border-radius: 3px; background: var(--border); margin-top: 8px; overflow: hidden; } .keep-bar i { display: block; height: 100%; background: var(--amber); transition: width var(--dur-settle) linear; } .keep-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: 10px; } .keep-btn { margin: 0; min-height: var(--target); padding: 8px 18px; font-size: 13.5px; } .keep-btn.keep-quiet { background: none; color: var(--text2); border-color: var(--border); } /* Offline, what is not on this phone cannot open: say so by its weight. */ html.conn-away .stat-card:not(.kept):not(.keep-tile-app) { opacity: 0.4; } /* Offline is a mode: one small neutral pill by the logo, no alarm, no Retry. */ .conn-pill { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; margin-inline-start: 6px; padding: 3px 9px; font: inherit; font-size: 11.5px; font-weight: 500; line-height: 1.4; color: var(--text2); background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-full); cursor: pointer; white-space: nowrap; } .conn-pill[hidden] { display: none; } /* A phone's top bar has no room for the words: the glyph alone, round, and the words stay in its label and title. Text where there is room. */ @media (max-width: 600px) { .conn-pill { padding: 0; width: 28px; height: 28px; justify-content: center; margin-inline-start: 4px; } .conn-pill .conn-pill-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .conn-pill svg { width: 15px; height: 15px; } } .conn-pill:hover, .conn-pill:focus-visible { color: var(--text); border-color: var(--text2); outline: none; } /* .ctx-item (later in the file) sets nowrap at the same weight: the doubled class is what lets the hint wrap. */ .ctx-item.ctx-info { pointer-events: none; color: var(--text2); max-width: 230px; white-space: normal; line-height: 1.4; } /* Keeping offline: one glyph language on the tile, in the menu, About and the view. */ /* A card's foot: its marks (a favorite, on this phone) and its one control, ⋯, on one line. Marks are quiet and the same size; the accent is kept for a download that is moving. */ .card-foot { display: flex; align-items: center; gap: 2px; flex-shrink: 0; align-self: flex-end; } .card-marks { display: flex; align-items: center; gap: 6px; color: var(--text2); } .card-marks:empty { display: none; } /* A wide row: whatever sits on the card (a favorite, on this phone, anything added later) stacks up its right edge, marks on top and the one control, ⋯, at the bottom. Tiles keep their own foot. */ .stats-grid:not(.tiles) > .stat-card > .card-foot { flex-direction: column; justify-content: flex-end; align-self: stretch; gap: 6px; } .stats-grid:not(.tiles) > .stat-card > .card-foot > .card-marks { flex-direction: column; gap: var(--sp-2); margin-block-end: auto; } .card-marks > .keep-ico, .card-marks > .fav-mark { display: flex; pointer-events: none; color: var(--text2); } .card-marks svg { width: 15px; height: 15px; flex: none; } .keep-ico.kept { color: var(--text2); } /* In the foot the check is drawn in line, the weight of the star beside it. */ .card-marks .keep-ico.kept circle { fill: none; stroke: currentColor; stroke-width: 1.8; } .card-marks .keep-ico.kept path { stroke: currentColor; } .keep-ico.pull, .keep-ico.failed { color: var(--amber); } .keep-ico.failed { color: var(--error); } .keep-ico.stalled { color: var(--text2); } .keep-ico .kr-track { fill: none; stroke: var(--border); stroke-width: 2; } .keep-ico .kr-arc { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; transition: stroke-dasharray var(--dur-settle) linear; } .keep-ico.paused { color: var(--text2); opacity: 0.8; } /* The arrow in a running ring breathes: a download of tens of GB moves the arc a pixel a minute, the breath says it is alive. */ .keep-ico.pull:not(.stalled) .kr-glyph { animation: keep-breathe 1.6s ease-in-out infinite; } @keyframes keep-breathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } } @media (prefers-reduced-motion: reduce) { .keep-ico.pull .kr-glyph { animation: none; } } .ctx-keep { display: flex; align-items: center; justify-content: space-between; gap: 14px; } .ctx-keep .keep-glyph { flex-shrink: 0; opacity: 0.8; } .keep-btn .keep-glyph { vertical-align: -3px; margin-inline-end: 6px; } .keep-row { align-items: center; } .keep-size { font-size: var(--fs-small); color: var(--text2); font-variant-numeric: tabular-nums; } .keep-mark svg { width: 14px; height: 14px; color: var(--amber); vertical-align: -2px; margin-inline-end: 6px; } .keep-head-glyph { display: inline-flex; vertical-align: -3px; margin-inline-end: 6px; color: var(--amber); } .keep-head-glyph svg { width: 15px; height: 15px; } /* The On this phone view: a storage bar as a phone draws one, and Manage. */ .keep-view-head { display: flex; gap: 14px; align-items: flex-end; margin: 0 0 16px; } .keep-storage { flex: 1; min-width: 0; } .keep-sbar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; } .keep-sbar i { display: block; height: 100%; background: var(--amber); border-radius: 4px; transition: width var(--dur-travel) var(--ease-travel); } .keep-slabels { display: flex; justify-content: space-between; gap: var(--sp-2); font-size: 11.5px; color: var(--text2); margin-top: 5px; font-variant-numeric: tabular-nums; } .keep-manage-btn { flex-shrink: 0; font: inherit; font-size: var(--fs-small); font-weight: 500; min-height: 36px; padding: 0 14px; cursor: pointer; color: var(--text2); background: none; border: 1px solid var(--border); border-radius: 18px; } .keep-manage-btn:hover { color: var(--amber); border-color: var(--amber-border); } .keep-view-actions { display: flex; gap: 10px; justify-content: flex-end; margin: -6px 0 16px; flex-wrap: wrap; } .keep-add { display: inline-flex; align-items: center; gap: 6px; position: relative; } .keep-add .keep-glyph { opacity: 0.8; } .keep-file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; } .keep-import-box { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); } .keep-rm { position: absolute; top: 6px; left: 6px; z-index: 3; width: 28px; height: 28px; border-radius: 50%; border: none; background: #c64a3a; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; } .offline-home .cat-heading { margin-top: 4px; } /* Keep feedback, under the top bar: seen on a phone where a bottom toast is not. */ .keep-notice { position: fixed; z-index: 10002; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 64px); max-width: calc(100vw - 32px); box-sizing: border-box; padding: 10px 16px; font-size: 13.5px; line-height: 1.4; color: var(--text); text-align: center; background: var(--surface); border: 1px solid var(--amber-border); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,0.35); } .keep-notice[hidden] { display: none; } .keep-sheet { width: 340px; } .keep-sheet h3 { margin: 0 0 12px; font-size: 16px; line-height: 1.3; } .keep-sheet-rows { display: flex; flex-direction: column; gap: var(--sp-1); font-size: 14px; color: var(--text2); font-variant-numeric: tabular-nums; } .keep-sheet-rows b { color: var(--text); font-weight: var(--fw-strong); } .keep-sheet-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text2); } .keep-sheet-alt { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text2); } .keep-sheet-pick { font: inherit; font-size: 13.5px; text-align: start; padding: 10px 12px; min-height: var(--target); color: var(--text); background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; } .keep-sheet-pick i { font-style: normal; color: var(--text2); margin-inline-start: 6px; } .offline-none { color: var(--text2); font-size: var(--fs-small); line-height: 1.5; margin: 12px 0; max-width: 34em; } .keep-search-note { font-size: 12.5px; color: var(--text2); margin: 0 0 10px; } .conn-retry-inline { margin-top: 16px; padding: 6px 16px; font-size: var(--fs-small); } .conn-empty .hint { opacity: 0.75; max-width: 34em; margin: 0 auto; } /* What still works with no server: each a link with its own line under it, a finger tall. */ .offline-works { list-style: none; margin: 18px auto 0; padding: 0; max-width: 24em; text-align: start; } .offline-works:empty { display: none; } .offline-works a { display: block; min-height: var(--target); padding: 10px 14px; margin-bottom: 8px; color: var(--text); text-decoration: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); } .offline-works a:hover, .offline-works a:focus-visible { color: var(--amber); border-color: var(--amber-border); background: var(--amber-glow); } .offline-works b { display: block; font-weight: var(--fw-strong); } .offline-works span { display: block; font-size: 12.5px; opacity: 0.7; margin-top: 2px; } .back-btn { display: none; align-items: center; justify-content: center; background: none; border: 1px solid transparent; border-radius: var(--radius); color: var(--text2); font-size: 16px; padding: 4px 6px; cursor: pointer; flex-shrink: 0; transition: all var(--dur-press) var(--ease-press); line-height: 1; } .back-btn:hover, .random-btn:hover, .manage-btn:hover, .newtab-btn:hover, .library-btn:hover, .create-btn:hover, .reader-btn:hover, .catalog-lang-search-btn:hover, .lang-selector-btn:hover, .library-btn.panel-open, .reader-btn.panel-open, #readerview-btn[aria-pressed="true"], #tts-btn.speaking { color: var(--amber); border-color: var(--amber-border); background: var(--amber-glow); } /* Reader View ON: the book button becomes the settings affordance — a small amber dot hints that a second tap opens the palette (not exits the mode). */ #readerview-btn.rv-on { position: relative; } #readerview-btn.rv-on::after { content: ''; position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px var(--surface); } /* One-shot coachmark floated beside the book button on first Reader View. */ .reader-coach { position: fixed; z-index: 9999; max-width: 220px; background: var(--amber); color: var(--on-amber); font-size: 12.5px; font-weight: var(--fw-strong); line-height: 1.3; padding: 8px 11px; border-radius: 10px; box-shadow: var(--shadow-popup); cursor: pointer; opacity: 0; transform: translateY(-4px); transition: opacity var(--dur-settle) var(--ease-settle), transform var(--dur-settle) var(--ease-settle); } .reader-coach.visible { opacity: 1; transform: none; } .reader-coach::before { content: ''; position: absolute; top: -5px; right: 14px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid var(--amber); } /* One-shot tip floated bottom-centre on first article open when a wiktionary is installed — teaches the select-a-word Define gesture. Dismissible. */ @media (prefers-reduced-motion: reduce) { } /* ── History trail dropdown ── */ #history-trail { position: fixed; z-index: 9999; min-width: 220px; max-width: 360px; max-height: 400px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-popup); padding: 4px 0; display: none; } #history-trail.visible { display: block; } .history-item { display: flex; align-items: center; gap: var(--sp-2); padding: 8px 14px; cursor: pointer; font-size: var(--fs-small); color: var(--text); transition: background var(--dur-press) var(--ease-press); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .history-item:hover, .history-item.hover, .lang-dropdown-item:hover, .ctx-item:hover { background: var(--amber-glow); color: var(--amber); } #history-trail, .back-btn { user-select: none; -webkit-user-select: none; } .history-item .hi-source { flex-shrink: 0; font-size: 10px; font-weight: var(--fw-strong); color: var(--text2); background: var(--surface2); border-radius: 3px; padding: 1px 5px; text-transform: uppercase; } .history-item .hi-title { overflow: hidden; text-overflow: ellipsis; } .topbar-breadcrumb { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; min-width: 0; } .bc-sep { color: var(--text2); font-size: 18px; opacity: 0.5; font-weight: 300; } .bc-icon { display: none; flex-shrink: 0; line-height: 0; cursor: pointer; } .bc-icon img { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; background: #fff; padding: 1px; } .bc-icon .bc-letter { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px; background: var(--surface2); color: var(--accent); font-size: 12px; font-weight: 700; } .topbar-search { flex: 1; position: relative; margin-left: 4px; } /* A ZimiGames page: the game's name where the box is, its Undo or Pause and Menu beside it (_syncGameHead). Plain text, not a box: nothing here can be typed into. */ .game-head { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; margin-inline-start: 4px; } .game-head[hidden] { display: none; } /* The undo arrow is not mirrored in a right-to-left language: turned round it is the redo arrow. */ .game-title { flex: 1; min-width: 0; padding-inline: 6px; font-size: var(--fs-body); font-weight: var(--fw-strong); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .game-head .reader-btn { width: 44px; height: 44px; } /* touch targets: the bar is 56px, so they sit side by side without touching */ .game-head .reader-btn[hidden] { display: none; } /* A name that does not fit even at the smallest size gets the room the buttons and padding can spare (_fitGameTitle): 40px targets, 2px of padding. */ .game-head.tight .reader-btn { width: 40px; } .game-head.tight .game-title { padding-inline: 2px; } .game-head .reader-btn:disabled { opacity: 0.35; cursor: default; } body.game-page:not(.game-shelf) .topbar-search { display: none; } /* The shelf is the one page of the games that keeps the box: it searches the games (app.js _isGameShelf). */ body.game-shelf #game-head { display: none; } /* The shelf is not a game: nothing to keep as a favorite. */ body.game-shelf #library-btn { display: none !important; } .topbar-search input { width: 100%; padding-block: 9px; padding-inline: 36px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 16px; outline: none; transition: border-color var(--dur-settle) var(--ease-settle), box-shadow var(--dur-settle) var(--ease-settle); } .topbar-search input:focus { border-color: var(--amber-border); box-shadow: 0 0 0 3px var(--amber-glow), 0 0 20px var(--amber-glow); } .topbar-search input::placeholder { color: var(--text2); } /* What is typed reads in its own direction: "-ted" typed under a Hebrew interface showed as "ted-", an operator that is not the one typed. */ .topbar-search input { unicode-bidi: plaintext; } /* The box is written in logical sides: in a right-to-left UI the glass sits at the right, where the text starts, and ×, ? and / at the left. */ .topbar-search .search-icon { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--text2); pointer-events: none; } .topbar-search .kbd { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); font-size: var(--fs-caption); color: var(--text2); background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-family: inherit; pointer-events: none; opacity: 0.7; transition: opacity var(--dur-press) var(--ease-press); } .topbar-search input:focus ~ .kbd { opacity: 0; } /* Clear (×): shown only when the field has a value (placeholder hidden). The kbd hint gives way to it so they never overlap. Pure CSS — the value drives :placeholder-shown, including programmatic changes. */ .topbar-search .search-clear { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); display: none; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: none; border-radius: 5px; background: transparent; color: var(--text2); cursor: pointer; transition: color var(--dur-press) var(--ease-press), background var(--dur-press) var(--ease-press); } .topbar-search .search-clear:hover { color: var(--amber); background: var(--amber-glow); } .topbar-search input:not(:placeholder-shown) ~ .search-clear { display: flex; } /* What is typed stops short of the ×: in the reader's narrow box the words ran under it. */ .topbar-search input:not(:placeholder-shown) { padding-inline-end: 36px; } .topbar-search input:not(:placeholder-shown) ~ .kbd { opacity: 0; } /* ── Suggest dropdown ── */ .suggest-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); display: none; z-index: 300; max-height: 300px; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.4); } .suggest-item { padding: 8px 14px; cursor: pointer; font-size: var(--fs-small); transition: background var(--dur-press) var(--ease-press); } .suggest-item:hover, .suggest-item.active { background: var(--amber-glow); } .suggest-item .sg-title { color: var(--text); } .suggest-item .sg-source { font-size: var(--fs-caption); color: var(--text2); margin-top: 1px; } .random-btn, .manage-btn, .newtab-btn, .library-btn, .lang-selector-btn, .reader-btn, .create-btn { display: flex; align-items: center; justify-content: center; color: var(--text2); flex-shrink: 0; width: 36px; height: 28px; border-radius: var(--radius); transition: color var(--dur-settle) var(--ease-settle), background var(--dur-settle) var(--ease-settle), border-color var(--dur-settle) var(--ease-settle); border: 1px solid transparent; background: none; cursor: pointer; } .random-btn, .manage-btn, .newtab-btn, .library-btn { text-decoration: none; font-size: 16px; } .lang-selector-btn { line-height: 1; } .newtab-btn { display: none; } /* Reader-only controls (font size + read-aloud) — appear when an article is open */ .reader-btn { line-height: 1; } /* The "A" glyph scales with the active font level as a live preview of the setting */ .reader-btn .font-glyph { font-weight: 700; font-size: var(--fs-body); transition: font-size var(--dur-press) var(--ease-press); } /* Read-aloud button swaps between speaker and stop icons via the .speaking class */ #tts-btn .tts-icon-stop { display: none; } #tts-btn.speaking .tts-icon-speak { display: none; } #tts-btn.speaking .tts-icon-stop { display: inline; } /* While it reads: a pill at the reader's foot. A ring turns until the first sound, then three bars move; the voice opens its menu upward. */ /* A media control: Back, Pause, On read left to right in every language, as on any player. */ .tts-bar { direction: ltr; position: absolute; left: 50%; width: max-content; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: var(--sp-1); padding-block: 4px; padding-inline: 14px 4px; max-width: calc(100% - 32px); box-sizing: border-box; background: var(--surface); border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow-popup); color: var(--text); font-size: 14px; } .tts-bar[hidden] { display: none; } .tts-bar-state { display: inline-flex; align-items: center; justify-content: center; gap: 2px; width: 18px; height: 18px; flex: none; color: var(--amber); } .tts-bar-state i { display: none; width: 3px; height: 12px; border-radius: 2px; background: currentColor; transform-origin: bottom; animation: tts-bars 0.9s ease-in-out infinite; } .tts-bar-state i:nth-child(2) { animation-delay: -0.3s; } .tts-bar-state i:nth-child(3) { animation-delay: -0.6s; } .tts-bar-state.playing i, .tts-bar-state.paused i, .tts-bar-state.hold i { display: block; } .tts-bar-state.paused i, .tts-bar-state.hold i { animation: none; transform: scaleY(0.35); } /* Paused with nothing pending: no mark. Paused while the voice still gets ahead: the same ring, a slow arc turning (a pulse under reduced motion). */ .tts-bar-state.paused { opacity: 0.55; } @keyframes tts-pulse { 50% { opacity: 0.35; } } .tts-bar-state:not(.playing):not(.paused):not(.hold):not(.ahead) { border: 2px solid var(--border); border-top-color: currentColor; border-radius: 50%; width: 14px; height: 14px; margin: 2px; animation: spin 0.8s linear infinite; } /* Getting ahead: the same turning arc, with no seconds (the voice's pace is a guess). */ .tts-bar-state.ahead { width: 14px; height: 14px; margin: 2px; box-sizing: border-box; border: 2px solid var(--border); border-top-color: currentColor; border-radius: 50%; animation: spin 0.8s linear infinite; } .tts-bar-state.ahead.working { animation-duration: 1.8s; } @keyframes tts-bars { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } } /* One width in every state: the name, "Back to text" or the wait never move the controls. */ .tts-bar-voice { width: var(--tts-voice-w, 8.4em); box-sizing: border-box; unicode-bidi: plaintext; display: inline-flex; align-items: center; gap: 6px; min-height: var(--target); padding: 0 10px; border: 0; background: none; color: inherit; font: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tts-bar-voice > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; } button.tts-bar-voice { cursor: pointer; border-radius: 22px; } button.tts-bar-voice svg { color: var(--text2); flex: none; } .tts-bar-btn, .tts-bar-speed { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: none; color: var(--text); cursor: pointer; } .tts-bar-speed { width: 5.2em; padding: 0; white-space: nowrap; /* as wide as 2.95x: dragging the speed never moves the bar */ border-radius: 22px; font: inherit; font-size: var(--fs-small); font-weight: var(--fw-strong); font-variant-numeric: tabular-nums; color: var(--text2); } /* Play/Pause is the one filled control, as on any player; Back and Stop are quiet beside it, the progress mark apart at the left. */ .tts-bar-btn.tts-bar-main { background: var(--amber); color: var(--on-amber); } .tts-bar-btn.tts-bar-main:hover { color: var(--on-amber); filter: brightness(1.08); } button.tts-bar-voice:hover, .tts-bar-btn:hover, .tts-bar-speed:hover { color: var(--amber); } .tts-bar button:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; } .tts-bar-anchor { position: relative; display: inline-flex; min-width: 0; } .tts-bar-menu { position: absolute; bottom: calc(100% + 8px); inset-inline-start: 0; min-width: 180px; padding: 6px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-popup); } .tts-bar-menu button { min-height: var(--target); padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: start; cursor: pointer; } /* The speed sheet: a slider and its marks (a tap each). The track and its filled part are the input's own background, so no pseudo-element needs the fill; the thumb's centre runs from --tts-thumb/2 to 100% minus that, and the marks sit under it at the same places. */ .tts-speed { --tts-thumb: 16px; --tts-track: 3px; width: min(240px, calc(100vw - 48px)); padding: 6px 14px 4px; gap: 0; inset-inline-start: auto; left: 50%; transform: translateX(-50%); font-variant-numeric: tabular-nums; } .tts-speed-range { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; margin: 0; cursor: pointer; touch-action: none; background: linear-gradient(var(--amber), var(--amber)) no-repeat left center / calc(var(--tts-thumb) / 2 + var(--fill) * (100% - var(--tts-thumb))) var(--tts-track), linear-gradient(var(--border), var(--border)) no-repeat center / 100% var(--tts-track); border-radius: 2px; } .tts-speed-range::-webkit-slider-runnable-track { background: none; } .tts-speed-range::-moz-range-track { background: none; } .tts-speed-range::-webkit-slider-thumb { -webkit-appearance: none; width: var(--tts-thumb); height: var(--tts-thumb); border-radius: 50%; border: 0; background: var(--amber); } .tts-speed-range::-moz-range-thumb { width: var(--tts-thumb); height: var(--tts-thumb); border-radius: 50%; border: 0; background: var(--amber); } .tts-speed-range:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; } .tts-speed-marks { position: relative; height: 28px; margin-top: -4px; } .tts-bar-menu .tts-speed-marks button { position: absolute; top: 0; min-height: 28px; min-width: 40px; padding: 0 4px; transform: translateX(-50%); left: calc(var(--tts-thumb) / 2 + var(--at) * (100% - var(--tts-thumb))); text-align: center; font-size: 12px; color: var(--text2); } .tts-bar-menu .tts-speed-marks button[aria-current] { color: var(--amber); font-weight: var(--fw-strong); } .tts-bar-menu button[aria-checked="true"] { color: var(--amber); font-weight: var(--fw-strong); } .tts-bar-menu button:hover { background: var(--surface2); } /* Patience: an on/off under the voices, set apart: its name, then a switch at the far end. */ .tts-bar-menu .tts-menu-check { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; } .tts-bar-menu .tts-menu-check[aria-checked="true"] { color: var(--text); font-weight: inherit; } .tts-menu-check::after { content: ''; flex: none; width: 32px; height: 18px; border-radius: 9px; transition: background var(--dur-press) var(--ease-press); background: radial-gradient(circle at 9px 50%, var(--surface) 6px, transparent 6.5px) var(--text2); } .tts-menu-check[aria-checked="true"]::after { background: radial-gradient(circle at 23px 50%, var(--surface) 6px, transparent 6.5px) var(--amber); } @media (prefers-reduced-motion: reduce) { .tts-bar-state.ahead, .tts-bar-state:not(.playing):not(.paused):not(.hold):not(.ahead) { animation: tts-pulse 1.6s ease-in-out infinite; border-top-color: currentColor; } .tts-bar-state i { animation: none; } .tts-bar-state.playing i { transform: scaleY(0.7); } } .manage-btn { position: relative; } .dice svg { display: block; } .random-btn .dice { display: inline-block; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); } .random-btn:hover .dice { transform: rotate(20deg) scale(1.15); } .random-btn.rolling .dice { animation: diceRoll 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); } @keyframes diceRoll { 0% { transform: rotate(0deg) scale(1); } 30% { transform: rotate(180deg) scale(1.3); } 60% { transform: rotate(360deg) scale(0.9); } 100% { transform: rotate(360deg) scale(1); } } /* ── Layout ── */ .container { max-width: 820px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); } /* ── Stats bar ── */ .stats-bar { text-align: center; padding: 12px 0; font-size: 14px; color: var(--text2); } .stats-bar .num { color: var(--amber); font-weight: var(--fw-strong); } /* An app tile's dot (_freshDotHtml): solid amber, only when something inside is new or updated. */ .rc-dot { display: inline-flex; align-items: center; gap: 5px; } .rc-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-sizing: border-box; } .rc-dot.mark { padding: 0 4px; pointer-events: none; } /* A dot that explains itself (_dotWhy): it takes the pointer, with a target a finger can hit. */ .rc-dot.mark.why { pointer-events: auto; cursor: help; min-width: 24px; min-height: 24px; justify-content: center; } .app-banner .card-foot { display: none; } /* ── Pills (categories + search source filters) ── */ .pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin-bottom: 20px; } .pills-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 2px; width: 100%; } /* ── Catalog lang row (single-row scroll with search icon) ── */ .catalog-lang-row { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; overflow: hidden; } .catalog-lang-scroll { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; flex: 1; min-width: 0; -webkit-overflow-scrolling: touch; padding: 2px 0; } .catalog-lang-search-btn { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); color: var(--text2); cursor: pointer; transition: color var(--dur-settle) var(--ease-settle), border-color var(--dur-settle) var(--ease-settle), background var(--dur-settle) var(--ease-settle), width var(--dur-settle) var(--ease-settle); } .catalog-lang-search-btn.expanded { width: 140px; border-color: var(--amber-border); background: var(--surface); justify-content: flex-start; gap: 6px; padding: 0 10px; } .catalog-lang-search-btn.expanded input { border: none; background: transparent; color: var(--text); font-size: var(--fs-caption); outline: none; width: 100%; font-weight: 500; } /* One base geometry for every filter/category/source/language/recency pill. Variants (.cat-pill, .dl-filter-pill, .lang-pill…) ride on top of .pill and may override colour/accent ONLY — never height, padding, or font-size, so rows never render at mismatched heights. */ .pill, .lang-pill { display: inline-flex; align-items: center; gap: 5px; box-sizing: border-box; min-height: var(--pill-h, 28px); padding: 6px 14px; font-family: inherit; font-size: 12px; line-height: 1; font-weight: 500; white-space: nowrap; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; color: var(--text2); cursor: pointer; transition: color 0.2s, background 0.2s, border-color 0.2s; } .pill:hover, .lang-pill:hover, .ci-variant-btn:hover, .flavor-pill:hover { border-color: var(--amber-border); color: var(--text); background: var(--amber-glow); } .pill.active, .lang-pill.active { background: linear-gradient(135deg, var(--amber), var(--amber2)); color: var(--on-amber); border-color: transparent; font-weight: 600; } /* Count chip: a subtle padded pill so the number reads as a distinct count and never crowds the label or the pill's edge. The parent gap (5px) separates it from the label; the padding gives the digits breathing room inside the chip. */ /* From the openZIM community: a solid glyph at the card's bottom left, in the actions row, never over the logo. */ .community-corner { display: inline-flex; margin-inline-end: auto; color: var(--text2, var(--text3)); } .pill .pill-count { opacity: 0.7; font-size: 10px; font-weight: 600; margin-left: 1px; padding: 1px 6px; background: rgba(255, 255, 255, 0.07); border-radius: 8px; } /* Dark chip on the amber active pill — amber-on-amber is unreadable */ .pill.active .pill-count { opacity: 1; background: rgba(0, 0, 0, 0.22); color: var(--on-amber); padding: 1px 6px; border-radius: 8px; } .pill.dimmed, .lang-pill.dimmed { opacity: 0.35; pointer-events: none; } /* A language the filter leaves out: faded, and still a tap away. */ .pill.other-lang { opacity: 0.5; } .pill.other-lang:hover, .pill.other-lang:focus-visible { opacity: 1; } .pills-divider { width: 60px; height: 1px; background: var(--border); margin: 0 auto 4px; opacity: 0.5; } /* Collection pills carry the layers glyph so they read as groupings, not categories, in the filter row. */ .col-pill-glyph { flex-shrink: 0; opacity: 0.8; } /* ── Language pills (above source pills in search results) ── */ .lang-pills { display: flex; align-items: center; gap: 6px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 2px; width: 100%; } /* ── Filter pills inside the search dropdown ── the recency + language pills ride at the top of the suggestions panel, above RECENT, separated by a rule. Each row keeps its own horizontal scroll (.pills-row / .lang-pills). */ .suggest-filters { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--border); } /* ── Language banner (view-in-lang / download) ── */ .lang-banner { display: flex; align-items: center; gap: 6px; padding: 5px 12px; background: var(--amber-glow); border-bottom: 1px solid var(--amber-border); font-size: 12px; color: var(--text); flex-wrap: wrap; flex-shrink: 0; } .lang-banner-btn { padding: 3px 10px; border-radius: 4px; border: 1px solid var(--amber-border); background: var(--surface2); color: var(--text); font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: all var(--dur-press) var(--ease-press); } .lang-banner-btn:hover { background: var(--amber); color: var(--on-amber); border-color: transparent; } .lang-banner-dismiss { margin-inline-start: auto; background: none; border: none; color: var(--text2); cursor: pointer; font-size: 14px; padding: 2px 6px; } .lang-banner-dismiss:hover { color: var(--text); } /* ── Language switch panel (ephemeral, bottom of reader) ── */ /* Mobile overflow menu */ .topbar-more { display: none; background: none; border: none; color: var(--text2); font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: var(--r-chip); letter-spacing: 2px; } .topbar-more:hover { color: var(--text); background: var(--surface2); } .topbar-menu { display: none; position: absolute; inset-inline-end: 8px; top: 48px; z-index: 200; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,0.3); min-width: 180px; padding: 4px 0; /* With Reader View's settings inline the menu can get tall; cap it to the viewport and scroll cleanly rather than overflow off-screen. */ max-height: calc(100vh - 56px); overflow-y: auto; -webkit-overflow-scrolling: touch; } .topbar-menu.visible { display: block; } /* Inline Reader View settings inside the ⋯ menu — the rv-* rows own their own compact layout; this wrapper just insets them from the menu edge and widens the menu enough for the theme swatches / font pills to breathe. */ .topbar-menu .tbm-reader-settings { padding: 2px 6px 4px; min-width: 232px; } .topbar-menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--text); font-size: var(--fs-small); cursor: pointer; border: none; background: none; width: 100%; text-align: start; } .topbar-menu-item:hover { background: var(--surface2); } /* Every leading glyph occupies the same 16px box so the labels line up in a single column — SVG icons are 16px, but the 🎲 emoji has a wider advance and taller line box, which pushed the Random label out of alignment. */ .topbar-menu-item svg, .topbar-menu-item .dice { flex-shrink: 0; width: 16px; } .topbar-menu-item .dice { line-height: 1; text-align: center; display: inline-block; } /* Thin rule separating the reader-control group from the app-navigation group. */ .topbar-menu-divider { height: 1px; margin: 4px 0; background: var(--border); } .topbar-menu-label { padding: 6px 12px 2px; font-size: var(--fs-caption); color: var(--text2); text-transform: uppercase; letter-spacing: 0.04em; } /* ── Reader header layout ── While an article is open the inline Reader View / font / read-aloud / pop-out controls fold into the ⋯ menu (on every viewport — mobile already did this via the max-width rule; this brings desktop to parity). Flex `order` pins the close X (the .manage-btn slot) to the far right, with ⋯ immediately before it, so the header reads: title … ✕. */ body.reading #font-btn, body.reading #tts-btn, body.reading #readerview-btn, body.reading #newtab-btn { display: none !important; } body.reading .topbar-more { display: flex; } /* The gear is the last thing on the bar, on every page: the + (the one-item ⋯) sits before it (Eric: "Gear should be top-right on main page not the +"). */ .topbar-more { order: 990; } .manage-btn { order: 1000; } @keyframes gear-turn { to { transform: rotate(360deg); } } .manage-btn.busy svg { animation: gear-turn 1s linear infinite; } /* ── Users management (multi-user v1) ── */ .ms-btn { padding: 6px 12px; font-size: 12px; font-family: inherit; color: var(--text2); background: none; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all var(--dur-press) var(--ease-press); } .ms-btn:hover { color: var(--amber); border-color: var(--amber-border); background: var(--amber-glow); } .ms-btn-primary { color: var(--amber); border-color: var(--amber-border); background: var(--amber-glow); } .ms-btn-primary:hover { color: #fff; background: var(--amber); border-color: var(--amber); } .ms-btn-danger:hover { color: #ef4444; border-color: #ef444455; background: #ef444411; } /* Users list — rows carry no controls at rest; every mutation lives behind a single ⋯ menu (.ms-user-menu-btn, styled by .ci-gear). 4px grid throughout. */ .ms-users-intro { color: var(--text2); font-size: var(--fs-small); margin-bottom: 16px; } .ms-users-list { margin-bottom: 4px; } .ms-user-row { display: flex; align-items: center; gap: var(--sp-2); padding: 8px 0; border-bottom: 1px solid var(--border); } .ms-user-main { flex: 1; min-width: 0; } .ms-user-meta { color: var(--text2); font-size: 12px; } .ms-user-menu-btn { flex-shrink: 0; } .ms-user-addbar { margin-top: 16px; } .ms-user-add { margin-top: 12px; display: flex; flex-direction: column; gap: var(--sp-2); max-width: 420px; } .ms-user-add[hidden] { display: none; } /* [hidden] must beat the display:flex above */ .ms-user-add input:not([role="switch"]), .create-field, .setup-field input { padding: 8px 10px; font-size: var(--fs-small); font-family: inherit; color: var(--text); background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); box-sizing: border-box; width: 100%; } /* A checkbox (the allowlist's) is not a text field: the width:100% above stretched it across the row. Keep it its own size. */ .ms-user-add input[type="checkbox"]:not([role="switch"]) { width: auto; padding: 0; accent-color: var(--amber); } .ms-user-add input:not([role="switch"]):focus, .create-field:focus, .setup-field input:focus { outline: none; border-color: var(--amber-border); box-shadow: 0 0 0 3px var(--amber-glow); } .ms-form-label { font-size: 12px; color: var(--text2); } .ms-user-account { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; } /* "Your Account" now leads the pane: no top border, and a divider below it separates it from the other-users section. */ .ms-user-account-self { margin-top: 0; border-top: none; padding-top: 0; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; } .ms-user-account-self .ms-user-row { border-bottom: none; } /* Accounts, then the password switch that guards them, then the API token: one rule between sections. Password off: the switch stands alone. */ #ms-users-body:not(:empty) + .ms-access-who { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 20px; } .ms-access-who[hidden] { display: none; } .ms-access-token { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 15px; } .ms-access-token:empty { display: none; } /* Your-account actions: visible Change password / Log out buttons, not a ⋯. */ .ms-user-self-actions { flex-shrink: 0; display: flex; gap: var(--sp-2); } /* Role badges in the users list. Muted by default; admin gets amber. */ .ms-role-badge { display: inline-block; font-size: 10px; font-weight: var(--fw-strong); text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 10px; color: var(--text2); background: var(--surface2); border: 1px solid var(--border); vertical-align: middle; } .ms-role-badge.ms-role-admin { color: var(--on-amber); background: linear-gradient(135deg, var(--amber), var(--amber2)); border-color: transparent; } /* Role picker reuses .pill; keep it wrapping rather than scrolling in the narrow users pane. */ #new-user-role, #edit-user-role { flex-wrap: wrap; overflow: visible; margin-bottom: 4px; } /* Limited scope on a user row → clickable shortcut into the allowlist editor. */ .ms-user-scope-link { color: var(--amber); cursor: pointer; text-decoration: none; border-bottom: 1px dotted var(--amber-border); } .ms-user-scope-link:hover { border-bottom-color: var(--amber); } /* ── Allowlist picker (per-user Limited + public-access Limited) ── Searchable, legible checklist: real titles, language badge, article count, select-all/none, live count summary. Comfortable rows, mobile-friendly. */ .ms-allowlist-picker { border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); overflow: hidden; max-width: 480px; } .ms-allow-tools { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--border); flex-wrap: wrap; } .ms-allow-search { flex: 1; min-width: 120px; padding: 7px 10px; font-size: var(--fs-small); font-family: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-sizing: border-box; } .ms-allow-search:focus { outline: none; border-color: var(--amber-border); box-shadow: 0 0 0 3px var(--amber-glow); } .ms-allow-link { padding: 5px 9px; font-size: 12px; font-family: inherit; color: var(--text2); background: none; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all var(--dur-press) var(--ease-press); white-space: nowrap; } .ms-allow-link:hover { color: var(--amber); border-color: var(--amber-border); background: var(--amber-glow); } .ms-allow-summary { padding: 6px 10px; font-size: 12px; color: var(--text2); border-bottom: 1px solid var(--border); } .ms-allow-list { max-height: 260px; overflow-y: auto; padding: 4px; } .ms-allow-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px; font-size: var(--fs-small); cursor: pointer; border-radius: var(--r-chip); } .ms-allow-row:hover { background: var(--amber-glow); } .ms-allow-row input { accent-color: var(--amber); flex-shrink: 0; width: 15px; height: 15px; } .ms-allow-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; } .ms-allow-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ms-allow-lang { flex-shrink: 0; font-size: 9.5px; font-weight: var(--fw-strong); text-transform: uppercase; letter-spacing: 0.03em; padding: 1px 5px; border-radius: 8px; color: var(--text2); background: var(--surface); border: 1px solid var(--border); } .ms-allow-count { flex-shrink: 0; font-size: var(--fs-caption); color: var(--text2); font-variant-numeric: tabular-nums; } .ms-allow-empty { color: var(--text2); font-size: 12px; padding: 4px 0; } /* ── Public access card ── governs the anonymous view; sits atop the pane. */ .ms-pa-card { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); } .ms-pa-sub { color: var(--text2); font-size: var(--fs-small); margin: 2px 0 12px; } .ms-pa-env { font-size: 12px; color: var(--text2); background: var(--amber-glow); border: 1px solid var(--amber-border); border-radius: var(--radius); padding: 6px 10px; margin-bottom: 12px; } .ms-pa-env code { font-size: var(--fs-caption); color: var(--amber); } .ms-pa-choices { display: flex; flex-direction: column; gap: var(--sp-2); max-width: 480px; } /* The choice tile is the app's one "pick one of these" surface. */ .ms-pa-choice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: all var(--dur-press) var(--ease-press); } .ms-pa-choice:hover { border-color: var(--amber-border); background: var(--amber-glow); } .ms-pa-choice.active { border-color: var(--amber-border); background: var(--amber-glow); } .ms-pa-choice.disabled { opacity: 0.55; cursor: not-allowed; } .ms-pa-choice input { accent-color: var(--amber); margin-top: 2px; flex-shrink: 0; width: 15px; height: 15px; } .ms-pa-choice-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .ms-pa-choice-title { font-size: var(--fs-small); font-weight: var(--fw-strong); color: var(--text); } .ms-pa-choice-desc { font-size: 12px; color: var(--text2); } .ms-pa-allowlist { margin-top: 12px; max-width: 480px; } .ms-pa-allowlist[hidden] { display: none; } .ms-pa-save { margin-top: 12px; } /* ── Create a ZIM ── A full-page surface over the library, same geometry as the Almanac overlay but built from the manage-settings vocabulary above: .create-field inputs (which share the .ms-user-add input recipe), .ms-btn / .ms-btn-primary actions and .ms-form-label headings. Round 3's shape: a row of mode CHIPS, then ONE panel carrying whichever mode is lit. Round 2 gave every mode its own expanding form, each with its own copy of Title and Advanced, and the page read as six near-identical sections — worse, an open form's Create button sat one row above the tile that opened the next mode, so reaching for Create and hitting "Video" instead was a matter of a few pixels. Hence .create-go: the primary action is full-width, rule-separated, at the bottom of the panel, with nothing beside it to land on by accident. */ .create-view { position: fixed; top: var(--under-topbar); left: 0; right: 0; bottom: 0; display: none; flex-direction: column; z-index: 100; background: var(--bg); } .create-view.open { display: flex; animation: fadeIn 0.15s ease; } /* The Almanac's view, closed, is part of the shell; the rest of its styles (almanac.css) arrive with its scripts, off the home page's first paint. */ .almanac-view { position: fixed; top: var(--under-topbar); left: 0; right: 0; bottom: 0; display: none; flex-direction: column; z-index: 100; background: var(--bg); } .almanac-view.open { display: flex; animation: fadeIn 0.15s ease; } .create-content { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 24px 16px 40px; overscroll-behavior: contain; } .create-inner { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; } .create-head { display: flex; flex-direction: column; gap: var(--sp-1); } .create-beta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-top: -4px; font-size: var(--fs-small); color: var(--text2); } .create-beta-note a { color: var(--amber2); } .create-title { font-size: var(--fs-sheet); font-weight: var(--fw-strong); color: var(--text); } /* Mode chips. A chip is a name and a glyph; the sentence explaining the mode belongs to the panel of the one you picked, not to five you did not. */ /* A display rule beats the `hidden` attribute. Every flex container on this page that JS hides needs saying twice, or `el.hidden = true` is a no-op: the picker would stay on screen underneath the job it just started, and an old server with no events would show an inert phase strip and an empty tree box — the two things the degraded path exists to avoid. */ .create-picker[hidden], .create-phases[hidden], .create-tree-wrap[hidden] { display: none; } /* An option that belongs to one engine, hidden when another is chosen (see _createSyncEngine). [hidden] must beat the display:flex below, exactly as it must for .ms-user-add. */ .create-flag[hidden] { display: none; } .create-picker { display: flex; flex-direction: column; gap: var(--sp-3); } .create-modes { display: flex; flex-wrap: wrap; gap: var(--sp-2); } .create-address { display: flex; flex-direction: column; gap: 6px; } .create-address[hidden] { display: none; } .create-address textarea.create-field { resize: vertical; min-height: 40px; } /* Folder mode's picker: the create root as a tree, one level per request. Rows are 40px for a finger; the indent is logical (inline-start), so RTL indents from the right. Not .create-tree: that is the run view's. */ .create-ftree { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface2); } .create-ftree[hidden] { display: none; } .create-ftree-row { display: flex; align-items: center; gap: var(--sp-2); min-height: 40px; padding-inline: calc(6px + var(--depth, 0) * 18px) 12px; font-size: 14px; color: var(--text); cursor: pointer; } .create-ftree-row:hover { background: var(--amber-glow); } .create-ftree-row:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; } .create-ftree-row.is-off { color: var(--text3); cursor: default; } .create-ftree-row.is-off:hover { background: none; } .create-ftree-row.is-note { color: var(--text3); font-size: var(--fs-small); cursor: default; min-height: 34px; } .create-ftree-row.is-note:hover { background: none; } .create-ftree-twist { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; width: 24px; height: 24px; padding: 0; color: var(--text2); background: none; border: 0; border-radius: var(--r-chip); cursor: pointer; } .create-ftree-twist svg { transition: transform var(--dur-press) var(--ease-press); } .create-ftree-row[aria-expanded="true"] > .create-ftree-twist svg { transform: rotate(90deg); } [dir="rtl"] .create-ftree-row[aria-expanded="false"] > .create-ftree-twist svg { transform: scaleX(-1); } .create-ftree-check { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: var(--amber); } .create-ftree-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .create-ftree-what { flex: 0 1 auto; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text3); } /* A file left out says why under its name, in full: the line wraps, it is never cut, and it lines up with the names (twist 24 + gap 8 + check 18 + gap 8). */ .create-ftree-row.is-off { flex-wrap: wrap; align-content: center; row-gap: 2px; padding-block: 6px; } /* The name gives way first (its ellipsis), so the name and "left out · size" keep one line and only the reason wraps: a long name used to push the size onto a line of its own, a short one not, and the rows stopped lining up. */ .create-ftree-row.is-off > .create-ftree-name { flex-basis: 0; } .create-ftree-why { flex: 1 0 100%; padding-inline-start: 58px; font-size: 12px; line-height: 1.35; color: var(--text3); white-space: normal; } .create-where { font-size: 12px; color: var(--text2); } .create-where[hidden] { display: none; } .create-where summary { cursor: pointer; width: max-content; } .create-where .create-caption { margin-top: 4px; } .create-ftree-more { padding: 6px 0; font: inherit; font-size: var(--fs-small); color: var(--amber); background: none; border: 0; cursor: pointer; } .create-ftree-summary { padding: 8px 12px 4px; } .create-left-out { margin: 6px 0 0; padding-inline-start: 18px; font-size: var(--fs-small); color: var(--text2); } @media (prefers-reduced-motion: reduce) { .create-ftree-twist svg { transition: none; } } .create-chip { display: flex; align-items: center; gap: 7px; padding: 7px 12px; font-family: inherit; font-size: var(--fs-small); color: var(--text2); background: none; border: 1px solid var(--border); border-radius: var(--r-full); cursor: pointer; transition: all var(--dur-press) var(--ease-press); } .create-chip:hover { color: var(--text); border-color: var(--amber-border); background: var(--amber-glow); } .create-chip.active, .create-pick-chip:has(input:checked) { color: var(--amber); border-color: var(--amber-border); background: var(--amber-glow); } .create-chip.disabled { opacity: 0.45; cursor: not-allowed; } .create-chip.disabled:hover { color: var(--text2); border-color: var(--border); background: none; } .create-chip-glyph { display: flex; flex-shrink: 0; } .create-chip-name { white-space: nowrap; } .create-panel { display: flex; flex-direction: column; gap: var(--sp-3); padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); } .create-panel-desc { font-size: 12.5px; color: var(--text2); } .create-panel-blocked { font-size: var(--fs-small); color: var(--text2); padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface2); } .create-go { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); } .create-go-btn { width: 100%; padding: 10px 12px; font-size: var(--fs-small); font-weight: var(--fw-strong); } .create-flags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); } /* ── The form ── One column of names and one edge every control starts on, for the main fields and every Advanced group alike; a checkbox and a note start on that same edge. Grey inside a control means "what happens if you leave it": a placeholder, or a select still on its default (.is-default). */ .create-panel, .cr-defaults { --create-k: 136px; --create-col: 12px; } @media (max-width: 480px) { .create-panel, .cr-defaults { --create-k: 100px; } } .cr-defaults { display: flex; flex-direction: column; gap: 20px; margin: 4px 0 20px; } .cr-defaults-hint { margin-bottom: 14px; } .create-checks { display: flex; flex-wrap: wrap; gap: var(--sp-2); } /* A switch row is a name and a switch: the name takes the row, the switch its end. */ .create-form .create-flag:has(> .switch) { grid-template-columns: minmax(0, 1fr) auto; } /* A select is a field like the others beside it: their height, their type, a quiet caret. */ .create-form select.create-field { min-height: 0; padding: 8px 30px 8px 10px; -webkit-appearance: none; appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--text3) 50%), linear-gradient(135deg, var(--text3) 50%, transparent 50%); background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; } [dir="rtl"] .create-form select.create-field { padding: 8px 10px 8px 30px; background-position: 11px 52%, 16px 52%; } @media (max-width: 720px) { .create-form select.create-field { font-size: 16px; } } /* Several kinds, each picked or not: the mode tiles' chip, its box hidden. */ .create-pick-chip { position: relative; padding: 4px 12px; } .create-pick-chip input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; } .create-pick-chip:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 2px; } .create-form { display: flex; flex-direction: column; gap: 10px; } .create-adv .create-form + .create-form { margin-top: 20px; } .create-group-h { font-size: var(--fs-caption); font-weight: var(--fw-strong); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text2); } .create-form .create-flag { display: grid; grid-template-columns: var(--create-k) minmax(0, 1fr); column-gap: var(--create-col); align-items: center; } .create-form .create-flag > .create-field { width: 100%; max-width: 240px; justify-self: start; } .create-form .create-flag-wide > .create-field { max-width: none; } .create-form .create-flag:has(> input[type="checkbox"]) { display: flex; } .create-form .create-flag:has(> input[type="checkbox"]), .create-form .create-row-note, .create-form .create-flag + input[id$="-custom"] { margin-inline-start: calc(var(--create-k) + var(--create-col)); } .create-form .create-flag + input[id$="-custom"] { width: auto; max-width: 240px; } .create-form .create-row-note { margin-top: -4px; } /* hidden wins over every display above, :has() included */ .create-form [hidden] { display: none !important; } .create-form .create-engine-fold > summary { display: grid; grid-template-columns: var(--create-k) auto auto; column-gap: var(--create-col); justify-content: start; } /* Run pane: a line with nothing to say takes no room (a finished job's counters and its phase detail are empty on purpose). */ .create-metrics:empty, .create-phase-detail:empty { display: none; } .create-form select.is-default, .create-form .create-field::placeholder { color: var(--text2); opacity: 1; } .create-flag { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-small); color: var(--text2); cursor: pointer; } .create-flag input[type="checkbox"] { accent-color: var(--amber); width: 15px; height: 15px; flex-shrink: 0; } /* ── The capture engine picker ── Two answers side by side, each with the sentence that tells you which one you want, taking the whole width of the flags row: this is the one control on the panel that changes what the ZIM CONTAINS, and burying it in a dropdown beside "Max pages" would have said the opposite. The lit state is the page's own amber, the same one a chosen chip wears. An option this server cannot run is dimmed rather than removed — see _createEngineHtml. */ .create-seg-field { flex: 1 0 100%; display: flex; flex-direction: column; gap: 6px; } .create-seg-label { font-size: var(--fs-small); color: var(--text2); } .create-engine-fold > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; } .create-engine-fold > summary::-webkit-details-marker { display: none; } .create-engine-fold > summary b { font-weight: var(--fw-strong); color: var(--text); } .create-engine-change { color: var(--amber); font-size: 12px; } .create-engine-fold[open] .create-engine-change { display: none; } .create-seg { display: flex; flex-wrap: wrap; gap: var(--sp-2); } .create-seg-opt { flex: 1 1 220px; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 2px 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface2); cursor: pointer; } .create-seg-opt:hover { border-color: var(--amber-border); } .create-seg-opt input[type="radio"] { accent-color: var(--amber); width: 15px; height: 15px; margin: 2px 0 0; grid-row: 1 / span 2; } .create-seg-name { font-size: var(--fs-small); color: var(--text); } .create-seg-desc { grid-column: 2; font-size: 12px; color: var(--text2); } .create-seg-opt:has(input:checked) { border-color: var(--amber-border); background: var(--amber-glow); } .create-seg-opt:has(input:checked) .create-seg-name { color: var(--amber); } .create-seg-opt.is-off { opacity: 0.45; cursor: not-allowed; } .create-seg-opt.is-off:hover { border-color: var(--border); } .create-num { width: 96px; flex: 0 0 auto; } .create-short { width: 140px; flex: 0 0 auto; } /* 16px minimum on touch widths — iOS Safari auto-zooms (and stays zoomed) on focus of any input smaller than 16px; the create form's address box was the reported offender. Same rule .pw-box documents. */ @media (max-width: 720px) { .create-field { font-size: 16px; } } .create-pick { width: auto; flex: 0 0 auto; padding-right: 6px; } .create-field:disabled { opacity: 0.5; cursor: not-allowed; } /* anywhere: a caption can carry a command with the data folder in it, one unbroken word as wide as the path. */ .create-caption { font-size: 12px; color: var(--text2); overflow-wrap: anywhere; } /* "Advanced" is a sentence you can open, not a control: the default marker is replaced by a caret and there is deliberately no box, border or button around it — the simple form has to stay the thing you see. The run pane's log toggle is the same idea and shares the recipe: the log is the truth, but the picture is what you watch, so the truth waits behind one quiet word rather than filling the pane by default. */ .create-adv > summary, .create-logbox > summary { display: flex; align-items: center; gap: 6px; width: fit-content; list-style: none; cursor: pointer; font-size: 12px; color: var(--text2); } .create-adv > summary::-webkit-details-marker, .create-logbox > summary::-webkit-details-marker { display: none; } .create-adv > summary::before, .create-logbox > summary::before { content: "\203A"; display: inline-block; transition: transform var(--dur-press) var(--ease-press); } .create-adv[open] > summary::before, .create-logbox[open] > summary::before { transform: rotate(90deg); } /* The caret is a mirrored character, so RTL already flips it to point at the text — which means the open state has to turn the other way to end up pointing DOWN rather than back up at the topbar. */ [dir="rtl"] .create-adv[open] > summary::before, [dir="rtl"] .create-logbox[open] > summary::before { transform: rotate(-90deg); } .create-adv > summary:hover, .create-logbox > summary:hover { color: var(--amber); } .create-adv[open] > summary, .create-logbox[open] > summary { margin-bottom: 10px; } .create-credit a { color: var(--text2); text-decoration: underline; text-underline-offset: 2px; } .create-credit a:hover { color: var(--amber); } .create-actions { display: flex; align-items: center; gap: var(--sp-2); } /* ── Pre-flight preview ── What the server found at the source, shown before anything runs. Quieter than the form it sits inside: it is an answer, not another control. The not-ok variant borrows the error token for its edge so a refusal reads as a refusal without shouting in red over the whole box. */ .create-source-row { display: flex; gap: var(--sp-2); align-items: center; } .create-source-row .create-field { flex: 1 1 auto; min-width: 0; } .create-preview-box { margin-top: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); display: flex; flex-direction: column; gap: var(--sp-1); } .create-preview-box.not-ok { border-color: var(--error); } .create-pv-row { display: flex; gap: 10px; font-size: 12px; align-items: baseline; } .create-pv-k { color: var(--text2); flex: 0 0 auto; min-width: 92px; } .create-pv-v { color: var(--text); min-width: 0; overflow-wrap: anywhere; } .create-pv-warn { font-size: 12px; color: var(--error); } .create-pv-detail { color: var(--text2); margin-top: 4px; } /* ── Folder picker ── Directories only, never file names — see the design note on _create_browse in manage.py. It is a list of buttons rather than a tree: one level at a time is the whole interaction, and a tree would imply a recursion the endpoint deliberately does not do. */ .create-browse-box { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); display: flex; flex-direction: column; gap: var(--sp-2); } .create-browse-head { font-family: monospace; font-size: 11.5px; color: var(--text2); overflow-wrap: anywhere; } .create-browse-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; overscroll-behavior: contain; } .create-dir { text-align: left; font-family: inherit; font-size: var(--fs-small); color: var(--text); background: none; border: 1px solid transparent; border-radius: var(--r-chip); padding: 5px 8px; cursor: pointer; } .create-dir:hover { color: var(--amber); border-color: var(--amber-border); background: var(--amber-glow); } .create-dir.up { color: var(--text2); } /* ── Watching the work ── Round 2 showed a spinner and a log, which says "something is happening" and nothing more; an hour-long crawl looked identical to a hung one, and the packaging phase — where the engine writes tens of thousands of entries with nothing to say about it — looked exactly like a crash. What the server now emits is structure: phases, page nodes with their assets, and counters. So this is a phase strip, a tree that grows, and numbers that move. */ .create-run { display: flex; flex-direction: column; gap: var(--sp-4); } .create-phases { display: flex; align-items: flex-start; } .create-step { flex: 1 1 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text3); text-align: center; } /* The rail between two steps belongs to the one on the right, which is what lets the step on its LEFT light it with a sibling selector. It runs BETWEEN the dots, not through them. Spanning centre-to-centre put the line under each dot and out the other side, and the dot's fill is not the page's, so what showed was a line ending halfway into a circle (Eric: "the line is half way through the first step, looks bad"). The inset is the dot's radius plus a little air. */ .create-step + .create-step::before { content: ""; position: absolute; top: 5px; height: 1px; background: var(--border); left: calc(-50% + 11px); right: calc(50% + 11px); } .create-step[data-state="done"] + .create-step::before { background: var(--amber-border); } .create-step-dot { position: relative; z-index: 1; width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface2); } .create-step[data-state="done"] { color: var(--text2); } .create-step[data-state="done"] .create-step-dot { border-color: var(--amber-border); background: var(--amber-border); } .create-step[data-state="failed"] { color: var(--error); } .create-step[data-state="failed"] .create-step-dot { border-color: var(--error); background: var(--error); } .create-step[data-state="active"] { color: var(--amber); } .create-step[data-state="active"] .create-step-dot { border-color: var(--amber); background: var(--amber); animation: createPulse 1.6s ease-in-out infinite; } /* A finished capture ends on Ready, lit and still: the strip says where it got to, not four quiet dots that read as nothing having happened. */ .create-step[data-state="complete"] { color: var(--amber); } .create-step[data-state="complete"] .create-step-dot { border-color: var(--amber); background: var(--amber); } .create-phase-detail { min-height: 16px; font-size: 12px; color: var(--text2); text-align: center; overflow-wrap: anywhere; } .create-metrics { display: flex; flex-wrap: wrap; gap: var(--sp-2); } .create-metric { display: flex; align-items: baseline; gap: 5px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface2); } .create-metric-n { font-size: 16px; font-weight: var(--fw-strong); color: var(--text); font-variant-numeric: tabular-nums; } .create-metric-of { font-size: 12px; color: var(--text3); font-variant-numeric: tabular-nums; } .create-metric-k { font-size: 11.5px; color: var(--text2); } /* The tree. Rows are nested rather than indented by a computed depth, so the guide line is the parent's own border and no arithmetic can get it wrong. Bounded height, and bounded node count in create.js — a five-thousand-page crawl keeps counting and stops drawing. */ .create-tree-wrap { display: block; } .create-tree-wrap > .create-tree-more { margin-top: 6px; } .create-tree-summary { cursor: pointer; font-size: 12px; color: var(--text2); padding: 6px 2px; } .create-tree-summary[hidden] { display: none; } .create-tree-wrap[open] > .create-tree-summary { margin-bottom: 6px; } .create-tree { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface2); } .create-node-kids { margin-left: 7px; padding-left: 10px; border-left: 1px solid var(--border); } .create-node-kids:empty { display: none; } .create-node-row { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 2px 0; font-size: 12px; } .create-node-dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--text3); } .create-node-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); } .create-node-assets { flex: 0 0 auto; margin-left: auto; font-size: var(--fs-caption); color: var(--text3); font-variant-numeric: tabular-nums; } .create-node-bar { height: 2px; margin: 0 0 3px 13px; border-radius: 1px; background: var(--border); overflow: hidden; } .create-node-bar > i { display: block; height: 100%; width: 0; background: var(--amber-border); transition: width var(--dur-travel) var(--ease-travel); } .create-node[data-state="active"] > .create-node-row .create-node-dot { background: var(--amber); animation: createPulse 1.6s ease-in-out infinite; } .create-node[data-state="active"] > .create-node-row .create-node-label { color: var(--text); } .create-node[data-state="done"] > .create-node-row .create-node-dot { background: var(--success); } .create-node[data-state="failed"] > .create-node-row .create-node-dot { background: var(--error); } .create-node[data-state="failed"] > .create-node-row .create-node-label { color: var(--error); } .create-node-new > .create-node-row { animation: createNodeIn 0.28s ease both; } .create-tree-more { font-size: 11.5px; color: var(--text3); } @keyframes createPulse { 0%, 100% { box-shadow: 0 0 0 0 var(--amber-glow); } 50% { box-shadow: 0 0 0 5px var(--amber-glow); } } @keyframes createNodeIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } } /* The running tail. Bounded height so a thousand-page crawl scrolls inside its own box instead of walking the page down forever. */ .create-log { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); font-family: monospace; font-size: 11.5px; line-height: 1.6; color: var(--text2); } .create-log-line { white-space: pre-wrap; word-break: break-word; } .create-log-line:last-child { color: var(--text); } .create-status { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-small); color: var(--text); } .create-error { font-size: var(--fs-small); color: var(--error); white-space: pre-wrap; } .create-notice { font-size: var(--fs-small); color: var(--text2); padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface2); } /* ── The done moment ── The reward is the thing you made, arriving: the icon lands, the name settles under it, the size rolls up to what it really is, and the way in appears. Under a second and a half, once. It celebrates a finished ZIM and nothing else — there is no streak here and nothing to come back for. */ .create-done { display: flex; align-items: center; gap: var(--sp-3); padding: 14px; border: 1px solid var(--amber-border); border-radius: var(--radius); background: var(--amber-glow); } .create-done-icon { flex: 0 0 auto; display: flex; color: var(--amber); } .create-done-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .create-done-name { font-size: var(--fs-body); font-weight: var(--fw-strong); color: var(--text); overflow-wrap: anywhere; } .create-done-share { align-self: flex-start; margin-top: 6px; font-size: var(--fs-small); color: var(--text2); text-decoration: underline; text-underline-offset: 2px; } .create-done-share:hover { color: var(--amber); } .create-done-facts { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11.5px; color: var(--text2); } .create-done-fact { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } .create-done-warn { color: var(--amber2); } .create-report { color: var(--amber2); text-decoration: underline; } .create-done-open { flex: 0 0 auto; } .create-again-row { margin-top: 8px; } /* What the finished ZIM is made of: the shared segmented bar (.cache-bar / .cache-legend) under the done card, with the on-disk total on its header row. Sits on the 4px grid and borrows the card's radius. */ /* Elapsed time beside the packaging line — quiet, tabular so it does not jitter as the seconds tick. */ .create-elapsed { color: var(--text3); font-variant-numeric: tabular-nums; } .create-inside { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); } .create-inside-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); margin-bottom: 8px; } .create-inside-title { font-size: var(--fs-caption); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text3); } .create-inside-total { font-size: var(--fs-small); font-weight: var(--fw-strong); color: var(--text); font-variant-numeric: tabular-nums; } /* ── Recent jobs and the queue ── Before round 3 a crawl that finished while the tab was closed left no trace on this page at all, and a job the server restart took left a spinner that never stopped. Both are rows here now. */ .create-recent { display: flex; flex-direction: column; gap: 6px; } .create-hist-log { margin: -2px 0 6px; padding: 10px 12px; max-height: 260px; overflow: auto; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text2); background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); } .create-hist { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); } .create-hist-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--text3); } .create-hist[data-state="ok"] .create-hist-dot { background: var(--success); } .create-hist[data-state="failed"] .create-hist-dot { background: var(--error); } .create-hist[data-state="interrupted"] .create-hist-dot { background: var(--amber); } .create-hist-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; } .create-hist-name { font-size: var(--fs-small); color: var(--text); overflow-wrap: anywhere; } .create-hist-why { font-size: 11.5px; color: var(--text2); overflow-wrap: anywhere; } .create-queued { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px dashed var(--border); border-radius: var(--radius); font-size: 12.5px; color: var(--text2); } .create-queued.mine { border-color: var(--amber-border); color: var(--text); } .create-queued-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .create-queued-pos { flex: 0 0 auto; margin-left: auto; color: var(--text2); font-variant-numeric: tabular-nums; } @media (prefers-reduced-motion: reduce) { .create-view.open { animation: none; } .create-chip { transition: none; } .create-adv > summary::before, .create-logbox > summary::before { transition: none; } /* Everything the run pane does to draw attention: the arrival animation of a tree row resolves to its finished state; the two pulses stop being pulses. The result card has no entrance animation at any setting. */ .create-node-new > .create-node-row, .create-step[data-state="active"] .create-step-dot, .create-node[data-state="active"] > .create-node-row .create-node-dot { animation: none; } .create-node-bar > i { transition: none; } } /* ── Reader View settings palette ── */ /* Popover from the book button (desktop) / ⋯ Reader View row (mobile). Anchored top-right under the topbar, same visual family as .topbar-menu. Chrome (app UI) always uses Zimi's dark palette — only the article inside the iframe changes theme, so this popover intentionally does NOT recolor with the reader theme. */ .reader-palette { display: none; position: absolute; inset-inline-end: 8px; top: 48px; z-index: 220; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-popup); width: 264px; max-width: calc(100vw - 16px); padding: 6px; } .reader-palette.visible { display: block; animation: fadeIn 0.12s ease; } .rv-pal-head { display: flex; align-items: center; gap: var(--sp-2); padding: 6px 8px 8px; color: var(--text); font-size: var(--fs-small); font-weight: var(--fw-strong); } .rv-pal-head svg { color: var(--amber); } .rv-row { padding: 7px 8px; } .rv-row-label { font-size: var(--fs-caption); color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; } /* Theme swatches */ .rv-swatches { display: flex; gap: 6px; } .rv-swatch { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px 6px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface2); color: var(--text2); font-size: var(--fs-caption); cursor: pointer; transition: border-color var(--dur-press) var(--ease-press), color var(--dur-press) var(--ease-press); } .rv-swatch:hover { border-color: var(--amber-border); color: var(--text); } .rv-swatch.active { border-color: var(--amber); color: var(--text); } /* One ring on every swatch, readable on a light sheet and a dark one; the same as the reading sheets' .zb-dot (_READING_CSS in app.js). */ .rv-sw-dot { width: 22px; height: 22px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid rgba(128,128,128,0.6); background-clip: padding-box; } /* Auto shows what it paints: the Sepia swatch by day, the Dark one by night, split corner to corner (READER_AUTO_SWATCH in app.js). */ .rv-sw-auto .rv-sw-dot { background-image: linear-gradient(135deg, #f4ecd8 calc(50% - 0.5px), #0a0a0b calc(50% + 0.5px)); } .rv-sw-dark .rv-sw-dot { background-color: #0a0a0b; } .rv-sw-light .rv-sw-dot { background-color: #fbfbf9; } .rv-sw-sepia .rv-sw-dot { background-color: #f4ecd8; } .rv-sw-red .rv-sw-dot { background-color: #a8140a; } .rv-swatch.active .rv-sw-dot { box-shadow: 0 0 0 2px var(--surface2), 0 0 0 3px var(--amber); } /* Family pills */ .rv-pills { display: flex; gap: 6px; } .rv-pill { flex: 1; padding: 8px 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text2); font-size: 14px; cursor: pointer; transition: border-color var(--dur-press) var(--ease-press), color var(--dur-press) var(--ease-press), background var(--dur-press) var(--ease-press); } .rv-pill:hover, .rv-size .tsz-btn:hover { border-color: var(--amber-border); color: var(--text); } .rv-pill.active, .rv-size .tsz-btn[aria-checked="true"] { border-color: var(--amber); color: var(--amber); background: var(--amber-glow); } /* Text size: five A's that grow, one per step, picked like a family pill. Each A's size is inline (TEXT_SIZE_GLYPH_PX). */ .rv-size { display: flex; gap: var(--sp-1); } .rv-size .tsz-btn { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; height: 36px; padding: 0; line-height: 1; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text2); font-family: Georgia, serif; cursor: pointer; transition: border-color var(--dur-press) var(--ease-press), color var(--dur-press) var(--ease-press), background var(--dur-press) var(--ease-press); } /* ── Compact reader controls (⋯ menu, Reader View on) ── */ /* Label-less: theme swatches shrink to ~24px colour chips (the text label is hidden, aria-label carries the name), and font family + size share one row. Sized to fit a 390px viewport without horizontal scroll. */ .rv-compact { display: flex; flex-direction: column; gap: var(--sp-2); padding: 2px 2px 4px; } .rv-compact .rv-swatches { gap: var(--sp-2); } .rv-compact .rv-swatch { flex-direction: row; justify-content: center; padding: 5px; gap: 0; } .rv-compact .rv-sw-label { display: none; } .rv-compact .rv-sw-dot { width: 24px; height: 24px; } .rv-compact-fontrow { display: flex; align-items: stretch; gap: var(--sp-2); flex-wrap: wrap; } .rv-compact-fontrow .rv-pills { flex: 1 1 108px; } .rv-compact-fontrow .rv-size { flex: 1 1 170px; } /* Full-palette swatch keeps its stacked label. */ .rv-swatch .rv-sw-label { line-height: 1; } /* Reader View row rendered as a switch inside the ⋯ menu. */ .topbar-menu-item.tbm-rv-toggle .rv-switch { margin-inline-start: auto; } /* AUTO toggle row */ .rv-toggle-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 9px 8px; margin-top: 2px; background: none; border: none; cursor: pointer; border-radius: 8px; } .rv-toggle-row:hover { background: var(--surface2); } .rv-toggle-text { flex: 1; display: flex; flex-direction: column; gap: 1px; } .rv-toggle-title { font-size: var(--fs-small); color: var(--text); } .rv-switch { flex-shrink: 0; width: 38px; height: 22px; border-radius: 11px; background: var(--surface2); border: 1px solid var(--border); position: relative; transition: background var(--dur-press) var(--ease-press), border-color var(--dur-press) var(--ease-press); } .rv-switch.on { background: var(--amber); border-color: var(--amber); } .rv-knob { position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start var(--dur-press) var(--ease-press); } .rv-switch.on .rv-knob { inset-inline-start: 18px; } /* Light theme: same fix as the .switch iOS toggle — the OFF track needs a warm-grey fill + AA outline, and its white knob (fine on the dark ON amber) must darken to --text2 when off so it doesn't vanish on the grey track. */ :root[data-theme="light"] .rv-switch { background: #e0dacd; border-color: var(--border-strong); } :root[data-theme="light"] .rv-switch:not(.on) .rv-knob { background: var(--text2); } .rv-pal-divider { height: 1px; margin: 6px 6px; background: var(--border); } .rv-exit-row, .rv-action-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 9px 8px; background: none; border: none; cursor: pointer; border-radius: 8px; color: var(--text); font-size: var(--fs-small); } .rv-exit-row:hover, .rv-action-row:hover { background: var(--surface2); color: var(--amber); } .rv-action-row svg { flex-shrink: 0; color: var(--text2); } .rv-action-row:hover svg { color: var(--amber); } /* Language welcome card on home */ .lang-welcome-card { display: flex; align-items: center; gap: var(--sp-3); padding: 14px 16px; margin-bottom: 16px; background: var(--amber-glow); border: 1px solid var(--amber-border); border-radius: 10px; } .lang-welcome-card p { margin: 4px 0 0; font-size: var(--fs-small); color: var(--text2); } .lang-welcome-text { flex: 1; } .lang-welcome-actions { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; } .lang-welcome-subtle { padding: 8px 12px; font-size: var(--fs-small); color: var(--text2); } /* Management LAN-only notice (passwordless + non-private client, issue #36) */ .manage-locked-card { max-width: 520px; margin: 32px auto; } .manage-locked-card strong { font-size: var(--fs-body); } /* First run: who may change settings. The rows are the language checklist's; the inputs and the button share its width. */ /* Who can change settings: the setup card, the desktop's second page and Settings > Server share one form. */ .setup-form { display: flex; flex-direction: column; gap: var(--sp-3); } .setup-form .set-rows { margin: 0; } .setup-form .share-row-desc { white-space: normal; } .setup-fields { display: flex; flex-direction: column; gap: 10px; } .setup-fields[hidden], .setup-form .btn-row[hidden] { display: none; } .setup-field { display: flex; flex-direction: column; gap: var(--sp-1); margin: 0; } .setup-field > span { font-size: 12px; font-weight: var(--fw-strong); color: var(--text2); } .setup-field input::placeholder { color: var(--text3); } .setup-hint { font-size: 12px; color: var(--text2); margin: -6px 0 0; } .setup-form .btn-row { display: flex; justify-content: flex-end; } .setup-form .btn-primary { padding: 9px 24px; font-size: 14px; font-weight: var(--fw-strong); } .setup-form .pw-error { margin: 0; color: var(--error); font-size: var(--fs-small); display: none; } .setup-open { display: flex; flex-direction: column; gap: var(--sp-2); padding: 0 14px 12px; } .setup-open[hidden] { display: none; } .setup-open-cost { margin: 0; font-size: 12px; line-height: 1.45; color: var(--text2); } #onboard-access { margin-top: 12px; } .desktop-card .subtitle:last-child { margin-bottom: 0; } .manage-locked-card.setup-card { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-3); } .ms-pane .setup-form { margin-bottom: 0; } /* A setting only seeding uses, while BitTorrent is off (and it is too). */ #ms-pane.ms-bt-off .needs-bt:not(.is-on) { display: none; } /* The first run is a sign-in screen's sibling: one card, one full-width way on. */ #setup-card .setup-form .btn-primary { flex: 1; min-height: var(--target); padding: 12px; font-size: var(--fs-body); } /* Nothing behind a fresh install's setup is usable yet: no half-seen app. */ .desktop-overlay.setup-overlay { background: var(--bg); } .setup-overlay .desktop-card { max-height: calc(100dvh - 32px); overflow-y: auto; } /* ── Tab bar ── */ /* ── Language selector (globe icon) ── */ .lang-dropdown { position: fixed; z-index: 9999; min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-popup); padding: 6px 0; display: none; max-height: 460px; overflow-y: auto; } .lang-dropdown.visible { display: block; } .lang-dropdown-item { padding: 7px 14px; cursor: pointer; font-size: var(--fs-small); color: var(--text); transition: background var(--dur-press) var(--ease-press); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); } .lang-dropdown-item.active { color: var(--amber); font-weight: var(--fw-strong); } .lang-dropdown-item .check { font-size: 14px; } /* ── Map picker (same place, another map) ── */ .map-picker { min-width: 260px; max-width: min(340px, calc(100vw - 8px)); padding: 4px 0; } .mp-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 8px 14px; font-size: var(--fs-small); color: var(--text); cursor: pointer; line-height: 1.25; } .mp-row:hover { background: var(--amber-glow); } .mp-row.active { color: var(--amber); font-weight: var(--fw-strong); } .mp-name { display: flex; align-items: baseline; gap: var(--sp-2); min-width: 0; } .mp-name > :first-child, .mp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mp-tag { font-size: var(--fs-caption); font-weight: var(--fw-regular); color: var(--text2); flex: none; } .mp-meta { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: var(--fs-caption); font-weight: var(--fw-regular); color: var(--text2); font-variant-numeric: tabular-nums; } .mp-row.active .mp-meta { color: var(--amber); } .mp-check { font-size: var(--fs-small); } .mp-offer .mp-meta { color: var(--text); } .mp-offer .mp-meta svg { color: var(--amber); } .mp-head { padding: 10px 14px 2px; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text2); cursor: default; } .mp-fold .mp-meta::after { content: '\203A'; font-size: 14px; transform: rotate(90deg); display: inline-block; } .mp-fold[aria-expanded="true"] .mp-meta::after { transform: rotate(-90deg); } .mp-link { color: var(--text2); border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; } .mp-link:hover { color: var(--amber); } .mp-wait { color: var(--text2); cursor: default; } .mp-busy { opacity: 0.6; pointer-events: none; } /* A place kept: its name, the map it is on when not this one, and its lists. */ .mp-place .mp-name > span { unicode-bidi: plaintext; } .mp-save { color: var(--amber); font-weight: var(--fw-strong); } .mp-save svg { flex: none; } .mp-lists { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-block: -6px; margin-inline: 0 -8px; border: 0; border-radius: 8px; background: none; color: var(--text2); cursor: pointer; padding: 0; } .mp-lists:hover, .mp-lists:focus-visible { color: var(--amber); background: var(--amber-glow); outline: none; } @media (pointer: coarse) { .map-picker .mp-row { min-height: var(--target); box-sizing: border-box; } .mp-lists { width: 44px; height: 44px; margin-block: -12px; } } .ld-interlang { display: flex; align-items: center; padding: 2px 6px; border-radius: 4px; cursor: pointer; opacity: 0.4; transition: all var(--dur-press) var(--ease-press); margin: -2px 0; } .ld-interlang:hover { opacity: 1; color: var(--amber); background: var(--amber-glow); } .lang-dropdown-item .ld-switch { display: flex; align-items: center; } .ld-switch-icon { opacity: 0.5; transition: opacity var(--dur-press) var(--ease-press); } .lang-dropdown-item.switchable:hover .ld-switch-icon { opacity: 1; color: var(--amber); } .lang-dropdown-item.switchable { border-inline-start: 2px solid transparent; padding: 8px 14px; } .lang-dropdown-item.switchable:hover { border-inline-start-color: var(--amber); } .ld-switch-label { display: flex; flex-direction: column; gap: 1px; min-width: 0; } .ld-switch-lang { font-weight: 500; } .ld-switch-article { font-size: var(--fs-caption); color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lang-dropdown-item.switchable:hover .ld-switch-article { color: var(--amber); opacity: 0.7; } .ld-divider { height: 1px; background: var(--border); margin: 4px 0; } .ld-download { font-size: 12px; color: var(--text3); } .ld-download:hover { color: var(--amber); } .ld-download svg { opacity: 0.5; flex-shrink: 0; } .ld-download:hover svg { opacity: 1; color: var(--amber); } /* ── RTL support ── */ [dir="rtl"] .back-btn .back-arrow { display: inline-block; transform: scaleX(-1); } /* Article/ZIM titles can be RTL (Arabic, Hebrew, Farsi) inside LTR chrome (and vice versa) — isolate so neighboring punctuation and counts don't reshuffle around them. */ .title, .sg-title, .ci-title, .dc-title, .dl-item .dl-name, .browse-drilldown-title { unicode-bidi: isolate; } [dir="rtl"] .bc-sep { transform: scaleX(-1); } /* A result's lines read in their own direction, still set from the interface's side: an English snippet under a Hebrew interface ended in "…" at its start. (Its source row needs no reversing: the result is already right to left, and reversing it again sent the row to the left, away from its title.) */ .result .snippet { unicode-bidi: plaintext; } [dir="rtl"] .result-thumb { order: 1; } [dir="rtl"] .footer-sub { direction: ltr; } /* keep kbd hints LTR */ /* ── Category headings ── */ /* Home's category headings: the label's size and case (tokens.css), set in the Zimi gradient. */ .cat-heading { margin: 32px 0 10px; padding-left: 2px; background: linear-gradient(90deg, var(--amber), var(--text2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .cat-heading:first-child { margin-top: 0; } .cat-heading.clickable { cursor: pointer; } .cat-heading.clickable:hover { opacity: 0.8; } /* The Other catch-all heading reads quieter than a named section (it's the leftover bucket) — flat muted colour instead of the amber gradient. */ .cat-heading-other { background: none; -webkit-text-fill-color: initial; color: var(--text2); opacity: 0.7; } /* The global view toggle rides on the first section header's line, pinned to its trailing edge. Absolute (not flex) so the gradient-clipped heading text is untouched; text-fill-color reset so the toggle glyphs aren't transparent. */ /* The view toggle's own glyphs sit visually heavier than plain heading text, so the shared 10px cat-heading bottom margin reads tight against the grid below it — nudge just this variant down by one 4px-grid step. */ .cat-heading.has-view-toggle { position: relative; padding-inline-end: 210px; margin-bottom: 18px; } /* Order and view sit together at the end of the first section header: both answer "how do I want to look at my library", so they share one line and one anchor rather than each taking their own. */ .cat-heading .lib-controls { position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: var(--sp-2); -webkit-text-fill-color: initial; } .cat-heading .lib-view-toggle { -webkit-text-fill-color: initial; } /* ── Source header ── */ .source-header { display: flex; gap: var(--sp-4); align-items: flex-start; padding: 4px 0 24px; } .sh-icon { width: 64px; height: 64px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: var(--surface2); display: flex; align-items: center; justify-content: center; } .sh-icon img { width: 58px; height: 58px; object-fit: cover; background: #fff; border-radius: 10px; padding: 2px; } .sh-info { flex: 1; min-width: 0; } .source-header h1 { font-size: var(--fs-sheet); font-weight: var(--fw-strong); color: var(--accent); margin: 0; } .sh-meta { font-size: var(--fs-small); color: var(--text2); margin-top: 4px; } .sh-desc { font-size: var(--fs-small); color: var(--text2); margin-top: 4px; line-height: 1.5; } .sh-actions { margin-top: 10px; display: flex; gap: var(--sp-2); flex-wrap: wrap; } .dl-pill { text-decoration: none; display: inline-block; } /* Compact download link on home cards for bookmark exports — lives inline in the .detail meta line, so it dresses like the text until hovered. */ .card-dl-pill { text-decoration: none; color: var(--text2); font-weight: var(--fw-strong); border-bottom: 1px dotted var(--border); } .card-dl-pill:hover { color: var(--amber); border-bottom-color: var(--amber-border); } /* zimgit "document collection" flag in the source header meta line */ .sh-chip { display: inline-block; font-size: var(--fs-caption); font-weight: var(--fw-strong); letter-spacing: 0.03em; color: var(--amber); background: var(--amber-glow); border: 1px solid var(--amber-border); border-radius: var(--r-full); padding: 1px 8px; vertical-align: middle; } /* ── zimgit / PDF collection document list ── */ .zg-filter { width: 100%; box-sizing: border-box; margin: 0 0 12px; padding: 9px 12px; background: var(--surface); color: var(--text); font-size: 14px; border: 1px solid var(--border); border-radius: var(--radius); outline: none; transition: border-color var(--dur-settle) var(--ease-settle), box-shadow var(--dur-settle) var(--ease-settle); } .zg-filter:focus { border-color: var(--amber-border); box-shadow: 0 0 0 1px var(--amber-glow); } .zg-doc { display: flex; gap: var(--sp-3); align-items: flex-start; } .zg-icon { flex-shrink: 0; width: 38px; height: 46px; margin-top: 2px; border-radius: 4px; background: var(--surface2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; letter-spacing: 0.05em; color: var(--amber); } .zg-meta { font-size: var(--fs-caption); color: var(--text2); margin-top: 4px; } .zg-empty { padding: 28px 8px; text-align: center; color: var(--text2); font-size: var(--fs-small); } /* ── Source cards ── */ .stats-grid { display: grid; gap: var(--sp-2); margin-top: 8px; } /* A card grid outside Home's pick grids (a search's matching sources) fills its column as it always has. Not the compact tiles either: this rule outweighs .stats-grid.tiles, which once made a compact tile 320px wide. */ .stats-grid:not(.pick-grid):not(.pick-tiles):not(.tiles) { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } .stat-card { background: var(--surface); border-radius: var(--radius); padding: 14px; border: 1px solid var(--card-border, var(--border)); /* On the light cream the 1px border is ~1.2:1 and cards read as loose icon+text. A soft shadow (--card-shadow, light-only) lifts them into defined cards; dark keeps the flat surface-contrast look. Hover overrides both border-color and box-shadow at higher specificity. */ box-shadow: var(--card-shadow, none); transition: background var(--dur-settle) var(--ease-settle), border-color var(--dur-settle) var(--ease-settle), box-shadow var(--dur-settle) var(--ease-settle), transform var(--dur-settle) var(--ease-settle); transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); display: flex; gap: 14px; align-items: stretch; text-decoration: none; color: inherit; cursor: pointer; /* Long-press opens the context menu (#37) — suppress iOS's own text-selection callout / magnifier so the press reads as a clean right-click. */ -webkit-touch-callout: none; } /* Zimi Maps' tile: a source among the sources, its icon a pin. */ .apps-grid { margin-bottom: 16px; } /* An app saves from its own page (a video's Watch later, a question's Save, beside Like and Lists), so the header offers no second bookmark for the same thing; its home has nothing to save at all. The Saved panel's opener stays, and opens on the app's own saved things (B still saves what is on screen). A map's places are the map's: saved and listed in its own picker, Places and maps (map-source-btn). */ body.app-page #library-btn, body.map-page #bm-panel-btn, body.map-page #library-btn { display: none !important; } /* Zimi's own stand-in (an article the ZIM does not hold): nothing to save. */ body.own-page #library-btn { display: none !important; } /* An app's name and what it holds read together, beside its icon: a ZIM card's detail sits at the card's foot (margin-top: auto), which left a one-line app's name alone at the top and its detail a gap below. */ .app-tile .card-info { justify-content: center; } .stat-card.app-tile .detail { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; } .app-tile .card-icon { color: var(--amber); display: flex; align-items: center; justify-content: center; } /* Quiet, like any other detail line: an empty app is not an error (Eric). */ .app-tile.app-empty .detail { color: var(--text2); } /* An app with nothing inside is drawn as a place still to fill: a dotted outline reads "not set up yet" before the words do (Eric, 2026-09-29). Hover and focus keep the dots and take the amber like any card. */ .stat-card.app-tile.app-empty { border: 1.5px dotted var(--text3); background: transparent; box-shadow: none; } .stat-card.app-tile.app-empty:hover, .stat-card.app-tile.app-empty:focus-visible { border-color: var(--amber); background: var(--surface2); } /* The Apps page: a section per app. The app is a banner, not a card shaped like a ZIM: a tinted band with its mark in a larger rounded square, its name set bigger, how many sources it reads, and a chevron, because it is a door. Its ZIMs follow set in on a rail, so they read as what the app is made of; the space between sections separates one app from the next. */ .app-section { margin-top: 30px; } .cat-heading + .app-section { margin-top: 10px; } .stat-card.app-banner { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; border-color: var(--amber-border); background: linear-gradient(to right, var(--amber-glow), transparent 80%), var(--surface); } [dir="rtl"] .stat-card.app-banner { background: linear-gradient(to left, var(--amber-glow), transparent 80%), var(--surface); } .app-banner .card-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--amber-glow); box-shadow: inset 0 0 0 1px var(--amber-border); } .app-banner .zt { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; } .stat-card.app-banner .detail { color: var(--text2); margin-top: 2px; } .app-banner::after { content: '\203A'; margin-inline-start: auto; padding-inline-start: 8px; font-size: var(--fs-brand); line-height: 1; color: var(--amber); } /* The chevron mirrors itself in right to left (U+203A is bidi-mirrored). */ .stat-card.app-banner.app-empty, [dir="rtl"] .stat-card.app-banner.app-empty { background: transparent; } .app-section > .stats-grid { margin: 10px 0 0; margin-inline-start: 23px; padding-inline-start: 13px; border-inline-start: 2px solid var(--border); gap: 6px; } /* In the list, the ZIMs are its contents, not headliners: a name, its numbers, a smaller mark. A ZIM's description is a long-press away (About this ZIM). */ .app-section > .stats-grid:not(.tiles) .stat-card { padding: 8px 12px; gap: var(--sp-3); } .app-section > .stats-grid:not(.tiles) .card-icon { width: 34px; height: 34px; border-radius: 8px; } .app-section > .stats-grid:not(.tiles) .card-icon img { width: 30px; height: 30px; } .app-section > .stats-grid:not(.tiles) .desc { display: none; } .app-section > .stats-grid:not(.tiles) .card-info { justify-content: center; } .app-section > .stats-grid:not(.tiles) .detail { margin-top: 2px; } /* Reddot's dot keeps its colour in the breadcrumb, where line marks take the text's. Only a filled dot: Zimipedia's globe is a line mark too, and filling its circle painted a dark disc on the light header. */ #bc-icon circle[fill="currentColor"] { fill: var(--amber); } .suggest-item.sg-place .sg-title::before { content: '\25CF'; color: var(--amber); font-size: 8px; margin-right: 8px; vertical-align: middle; } .stat-card:hover, .stat-card:focus-visible { background: var(--surface2); border-color: var(--amber-border); box-shadow: 0 4px 24px var(--amber-glow), 0 0 0 1px var(--amber-glow); transform: translateY(-2px); outline: none; } /* Brief amber pulse on a just-added source (e.g. a fresh bookmarks export) so the eye lands on it after the library refreshes. Self-clears in JS. */ .stat-card.zimi-just-added { animation: zimiJustAdded 2.6s ease-out both; } @keyframes zimiJustAdded { 0% { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 6px 28px var(--amber-glow); } 70% { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber-border), 0 4px 20px var(--amber-glow); } 100% { border-color: var(--border); box-shadow: none; } } .card-icon { width: 48px; height: 48px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: var(--surface2); display: flex; align-items: center; justify-content: center; align-self: center; } .card-icon img { width: 42px; height: 42px; object-fit: cover; background: #fff; border-radius: 8px; padding: 2px; } .card-icon img.iw:not(.ld) { background: transparent; } /* On paper, a source whose favicon is white/transparent (e.g. Army Publishing Directorate) rendered as an invisible white block on a white card. An inset ring on the icon block gives it a defined edge regardless of the artwork. */ :root[data-theme="light"] .card-icon { box-shadow: inset 0 0 0 1px rgba(20, 15, 5, 0.10); } :root[data-theme="light"] .card-icon img { box-shadow: inset 0 0 0 1px rgba(20, 15, 5, 0.06); } .icon-letter { font-size: var(--fs-sheet); font-weight: 700; background: linear-gradient(135deg, var(--amber), #f97316); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; } .stat-card .name { font-size: 14px; font-weight: var(--fw-strong); color: var(--accent); margin-bottom: 2px; } .stat-card .desc { font-size: 12px; color: var(--text2); line-height: 1.4; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } /* Removed opacity here — multiplying the already-secondary --text2 by 0.6 dropped contrast below WCAG AA. --text2 alone is the "secondary" cue. */ .stat-card .detail { font-size: var(--fs-caption); color: var(--text2); margin-top: auto; } /* ── Library view toggle (compact tiles vs full list) ── */ .lib-view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; vertical-align: middle; } .lib-view-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 28px; background: none; border: none; color: var(--text2); cursor: pointer; padding: 0; transition: background var(--dur-press) var(--ease-press), color var(--dur-press) var(--ease-press); } .lib-view-btn + .lib-view-btn { border-left: 1px solid var(--border); } .lib-view-btn:hover { color: var(--text); background: var(--surface2); } .lib-view-btn.active { color: var(--amber); background: var(--amber-glow); } /* Compact tiles: square-ish cells sharing .stat-card markup (same surface, radius, border, hover as the detail cards — one family, only the layout differs). A fixed vertical rhythm on a 4px grid keeps every tile reading the same regardless of title length: 28px top band (reserved for the corner chips) → icon → two-line-tall title (anchors the baseline so short titles don't float) → language chip in normal flow. The old layout floated the title and pinned the language badge bottom-left, where it collided with any title that wrapped to two lines. */ /* Compact is denser than the full card in both ways (5 per row against 4, and taller): about 76px tall against the card's 83 (a name on two lines adds one), and 104px wide, so three on a phone and nine on a wide screen. The menu and the marks sit in the tile's top corners, the language is on the card's About, not a line of its own. */ /* Three compact tiles span one full card's width at every breakpoint ("3:1 sizing for the compact/full"). The full cards are .pick-grid (as many 360px columns as fit: 1, 2, 3, 4), so the compact grid has three tracks per full column, and gains them at the same widths. Auto-fill cannot do that (it fills the leftover into a tenth column), so the widths are the viewport's where a full column appears: the page's 16px gutters, then N cards and N-1 gaps (8px; 6px and a 38px inset inside a category). */ .stats-grid.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); } @media (min-width: 760px) { .stats-grid.tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } } @media (min-width: 1128px) { .stats-grid.tiles { grid-template-columns: repeat(9, minmax(0, 1fr)); } } @media (min-width: 1496px) { .stats-grid.tiles { grid-template-columns: repeat(12, minmax(0, 1fr)); } } .app-section > .stats-grid.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } @media (min-width: 796px) { .app-section > .stats-grid.tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } } @media (min-width: 1162px) { .app-section > .stats-grid.tiles { grid-template-columns: repeat(9, minmax(0, 1fr)); } } @media (min-width: 1528px) { .app-section > .stats-grid.tiles { grid-template-columns: repeat(12, minmax(0, 1fr)); } } .stats-grid.tiles .stat-card { flex-direction: column; align-items: center; justify-content: flex-start; gap: var(--sp-1); padding: 10px 8px 8px; text-align: center; } .stats-grid.tiles .card-icon { width: 36px; height: 36px; border-radius: 8px; } .stats-grid.tiles .card-icon img { width: 32px; height: 32px; } .stats-grid.tiles .card-info { align-items: center; padding-right: 0; gap: 6px; flex: 0 0 auto; width: 100%; min-width: 0; } .stats-grid.tiles .desc, .stats-grid.tiles .detail, .stats-grid.tiles .card-cat, .stats-grid.tiles .qid-badge { display: none; } /* The name row becomes a centred column: the title (.zt) on top, the kind chip on its own line below. min-width 0 all the way down: a flex item never shrinks under its longest word otherwise, and the name ran out of the tile. */ .stats-grid.tiles .name { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; width: 100%; min-width: 0; } /* Three lines at most, then an ellipsis (the generic tail goes, the distinctive first words stay): a name wraps at spaces, a word is never hyphenated or split unless it alone is wider than the tile, and the tile grows with it; tiles in a row stay one height (the grid stretches them). The full name is the tooltip. */ .stats-grid.tiles .zt { font-size: 12px; line-height: 1.35; max-width: 100%; min-width: 0; text-align: center; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; hyphens: manual; } .stats-grid.tiles .prov-badge { max-width: 100%; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* The marks and the menu sit in the tile's top corners, out of the flow: the tile is its icon and its name. The language reads on the card's About and in a list. */ .stats-grid.tiles .card-foot { display: contents; } .stats-grid.tiles .card-marks { position: absolute; top: 4px; inset-inline-start: 5px; gap: 3px; } .stats-grid.tiles .stat-card .card-more { position: absolute; top: 0; inset-inline-end: 0; width: 28px; height: 28px; margin: 0; } .stats-grid.tiles .lang-badge { display: none; } /* ── Home at every width: the pick grids (tokens.css) ── */ /* Home takes the room the screen has, up to --pick-max, centred; search, a source and Manage keep their column. */ body.on-home .container { max-width: calc(var(--pick-max) + 2 * var(--gutter)); } /* The bar's background stays full bleed; its contents sit on the same column edges as the library's tiles (the container's width, less its 16px padding). 100% is the viewport without its scrollbar, as the tiles' column is. */ body.on-home .topbar { --home-edge: calc((100% - var(--pick-max) - 2 * var(--gutter)) / 2 + 16px); padding-left: max(16px, env(safe-area-inset-left, 0px), var(--home-edge)); padding-right: max(16px, env(safe-area-inset-right, 0px), var(--home-edge)); } /* An app as a launcher tile: the card's surface moves onto the icon square, the name sits under it in the ink, and hover lifts the square the way it lifts a card. */ .pick-tiles > .stat-card { padding: 0; background: none; border: 0; box-shadow: none; } .pick-tiles > .stat-card:hover, .pick-tiles > .stat-card:focus-visible { background: none; box-shadow: none; transform: none; } .pick-tiles .card-icon { background: var(--surface); border: 1px solid var(--card-border, var(--border)); box-shadow: var(--card-shadow, none); transition: background var(--dur-settle) var(--ease-settle), border-color var(--dur-settle) var(--ease-settle), box-shadow var(--dur-settle) var(--ease-settle), transform var(--dur-settle) var(--ease-settle); } .pick-tiles > .stat-card:hover .card-icon, .pick-tiles > .stat-card:focus-visible .card-icon { background: var(--surface2); border-color: var(--amber-border); box-shadow: 0 4px 24px var(--amber-glow), 0 0 0 1px var(--amber-glow); transform: translateY(-2px); } .pick-tiles > .stat-card:focus-visible .card-icon { outline: 2px solid var(--amber); outline-offset: 2px; } .pick-tiles .card-info { flex: none; width: 100%; align-items: center; } .pick-tiles .stat-card .name { margin: 0; color: var(--text); font-size: var(--fs-small); font-weight: var(--fw-regular); } .pick-tiles .stat-card .detail { display: none; } /* An app with nothing inside keeps its dotted outline, on the square. */ .pick-tiles > .stat-card.app-tile.app-empty { border: 0; background: none; } .pick-tiles > .stat-card.app-empty .card-icon { border: 1.5px dotted var(--text3); background: none; box-shadow: none; } /* A tile wears nothing but its square and name: the menu is a right click, a long press on touch, or Shift+F10 / the menu key (the row view keeps its ⋯). The new dot leads the name, as a phone marks a fresh app; with a mouse it still explains itself on hover, on touch a tap on it opens the app. */ .app-tile .name > .rc-dot.mark { min-height: 0; padding: 0; margin-inline-end: 6px; vertical-align: 1px; } /* The name may reach half the gap into either side, so a long one with its dot ("• ZimiExchange") still fits whole. */ .pick-tiles .pick-name { display: flex; justify-content: center; align-items: center; gap: var(--sp-1); margin-inline: calc(var(--pick-gap) / -2 - 2px); max-width: calc(100% + var(--pick-gap) + 4px); } .pick-tiles .pick-name .zt { min-width: 0; overflow: hidden; text-overflow: ellipsis; } .pick-tiles .pick-name .rc-dot.mark { flex: none; padding: 0; margin: 0; min-width: 0; min-height: 0; pointer-events: none; } .pick-tiles .pick-name .rc-dot i { width: 7px; height: 7px; } @media (hover: hover) and (pointer: fine) { .pick-tiles .pick-name .rc-dot.mark { pointer-events: auto; } } /* ── Search results ── */ .meta { display: flex; gap: var(--sp-3); align-items: center; margin-bottom: 20px; font-size: 12px; color: var(--text2); } .meta .count { color: var(--amber); font-weight: var(--fw-strong); } .meta .time { opacity: 0.6; } .results { display: flex; flex-direction: column; gap: 3px; } /* Navigation cards are real links (#49) so browser link gestures work — keep the card look, not the UA's blue underlined text. */ a.result, a.discover-card, a.history-item, a.bc-icon { color: inherit; text-decoration: none; } .result { display: flex; gap: var(--sp-3); padding: 14px 16px; background: var(--surface); border-radius: var(--radius); cursor: pointer; border: 1px solid transparent; transition: background var(--dur-settle) var(--ease-settle), border-color var(--dur-settle) var(--ease-settle); opacity: 0; animation: fadeUp 0.3s ease forwards; } .result:hover, .result:focus-visible { background: var(--surface2); border-color: var(--amber-border); box-shadow: 0 2px 12px var(--amber-glow); transform: translateX(4px); outline: none; } .result-thumb { flex-shrink: 0; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--surface2); display: none; align-self: center; order: 1; } .result-thumb.loaded { display: block; } .result-thumb img { width: 100%; height: 100%; object-fit: cover; } .result-body { flex: 1; min-width: 0; order: 0; } .result-source { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: 6px; } /* The search bar's offer to run the words in a map's own search box. */ .result.map-find .title, .result.map-place .title { display: flex; align-items: center; gap: var(--sp-2); color: var(--amber); } .result.map-find .title svg, .result.map-place .title svg { flex-shrink: 0; } .result-source img { width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0; background: #fff; } .result-source .rs-letter { width: 20px; height: 20px; border-radius: 4px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: var(--fw-strong); color: var(--text2); flex-shrink: 0; } .result-source .rs-name { font-size: 12px; color: var(--text2); font-weight: 500; } .result .title { font-size: 14px; font-weight: var(--fw-strong); color: var(--accent); margin-bottom: 4px; } .result .snippet { font-size: 12px; color: var(--text2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: opacity var(--dur-travel) var(--ease-travel); } /* The words searched for: bold, in the title and in the snippet (an amber underline under every title read as too much). Never a filled block, which read as a selection. */ .result mark.hit { background: none; color: inherit; } .result .title mark.hit { font-weight: 800; } .result .snippet mark.hit { color: var(--text); font-weight: var(--fw-strong); } /* Grouped by source: each source's best, under its name, and "More from". */ .results.grouped { gap: 20px; } .result-group { display: flex; flex-direction: column; gap: 3px; } .result-group-head { margin: 0 0 4px; padding-inline: 4px; font: inherit; } .result-group-head .result-source { margin-bottom: 0; } .result-group-head .rs-name { font-size: var(--fs-small); font-weight: var(--fw-strong); color: var(--text); } .result-more { align-self: flex-start; margin-inline-start: 8px; padding: 6px 8px; border: none; border-radius: 8px; background: transparent; color: var(--amber); font: inherit; font-size: 12px; font-weight: var(--fw-strong); cursor: pointer; } .result-more:hover, .result-more:focus-visible { background: var(--amber-glow); outline: none; } @keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } .result:nth-child(1) { animation-delay: 0s; } .result:nth-child(2) { animation-delay: 0.04s; } .result:nth-child(3) { animation-delay: 0.08s; } .result:nth-child(4) { animation-delay: 0.12s; } .result:nth-child(5) { animation-delay: 0.16s; } .result:nth-child(n+6) { animation-delay: 0.2s; } /* ── Load more ── */ .load-more { text-align: center; padding: 16px; } .load-more button { padding: 10px 24px; font-size: var(--fs-small); font-weight: 500; cursor: pointer; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); transition: all var(--dur-settle) var(--ease-settle); } .load-more button:hover, .ci-add-btn:hover { border-color: var(--amber-border); background: var(--amber-glow); } /* ── Reader ── */ .reader-view { position: fixed; top: var(--under-topbar); left: env(safe-area-inset-left, 0px); right: env(safe-area-inset-right, 0px); bottom: 0; display: none; flex-direction: column; z-index: 100; background: var(--bg); } .reader-view.open { display: flex; animation: fadeIn 0.15s ease; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } /* Play, over a wiki article that is a ZimiGames game (_gamePlayCheck). */ .game-play { position: absolute; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 2; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--target); padding: 0 16px 0 10px; border: 1px solid var(--amber-border); border-radius: var(--r-full); background: var(--surface2); color: var(--text); font: inherit; font-weight: var(--fw-strong); cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); } .game-play[hidden] { display: none; } .game-play:hover { background: var(--amber-glow); color: var(--amber); } /* Find in page (find.js): floats over the article's top corner, the width of the reader on a phone. */ .find-bar { display: none; position: absolute; top: 8px; inset-inline-end: 12px; z-index: 5; width: min(380px, calc(100% - 24px)); box-sizing: border-box; align-items: center; gap: 2px; padding-block: 4px; padding-inline: 12px 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22); } .find-bar.open { display: flex; animation: fadeIn 0.12s ease; } .find-input { flex: 1; min-width: 0; padding: 6px 2px; border: none; outline: none; background: transparent; color: var(--text); font: inherit; font-size: var(--fs-body); -webkit-appearance: none; appearance: none; } .find-input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; } .find-count { flex-shrink: 0; padding-inline: 6px; font-size: 12px; color: var(--text2); white-space: nowrap; font-variant-numeric: tabular-nums; } .find-bar.find-none .find-count { color: var(--error); } .find-bar .find-step, .find-bar .find-close { width: 32px; height: 32px; } .find-bar .find-step:disabled { opacity: 0.35; cursor: default; background: transparent; color: var(--text2); } /* A phone: a band over the article, not a card on it, so the first lines move down rather than hide under it. */ @media (max-width: 600px) { .find-bar { position: static; order: -1; width: auto; margin: 8px 8px 0; box-shadow: none; } } #reader-frame { flex: 1; border: none; width: 100%; background: #fff; } /* An app page is drawn on the app's ground, not on a ZIM page's white: whatever of the frame shows past the page (iOS's bounce at the top, a part pixel as the header slides) was a white hairline in either theme. */ body.app-page #reader-frame { background: var(--bg); } /* A game is played, not read: a pinch or a double tap inside it must never zoom Zimi's own page (the fixed bar ends up clipped and the table cut off, and the page stays that way on the shelf). Articles keep their pinch zoom. */ body.game-page #reader-frame { touch-action: pan-x pan-y; } /* The header steps aside on a phone while an app or the Almanac is read (body.chrome-away, set by _chromeScroll in app.js): it slides up and the page takes its room. Keyboard focus in it brings it back. */ @media (max-width: 900px), (max-height: 500px) { .topbar { transition: transform var(--dur-settle) var(--ease-settle); } .reader-view, body .almanac-view { transition: top var(--dur-settle) var(--ease-settle); } body.chrome-away { --under-topbar: calc(var(--sat) + var(--conn-h)); } body.chrome-away .topbar:not(:focus-within) { transform: translateY(var(--topbar-away)); } } @media (prefers-reduced-motion: reduce) { .topbar, .reader-view, body .almanac-view { transition: none; } } /* Held away (a book being read, a video on a phone turned sideways): at every size, since the book's own header takes its place. */ body.chrome-held { --under-topbar: calc(var(--sat) + var(--conn-h)); } body.chrome-held .topbar:not(:focus-within) { transform: translateY(var(--topbar-away)); } /* ── Context Menu ── */ .zimi-ctx { position: fixed; z-index: 10000; min-width: 180px; background: var(--card-bg, #1a1a1a); border: 1px solid var(--border); border-radius: 8px; padding: 4px 0; box-shadow: 0 8px 24px rgba(0,0,0,0.5); font-size: var(--fs-small); color: var(--text); display: none; } .zimi-ctx.open { display: block; } .zimi-ctx-item { padding: 8px 14px; cursor: pointer; display: flex; align-items: center; gap: var(--sp-2); } .zimi-ctx-item:hover { background: var(--hover); } .zimi-ctx-item .ctx-key { margin-inline-start: auto; font-size: var(--fs-caption); color: var(--text2); } /* ── Where a link to the web goes (#99): beside the link, over the frame ── */ .ext-sheet { position: fixed; z-index: 10002; display: none; max-width: min(320px, calc(100vw - 16px)); padding: 10px 12px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-popup); color: var(--text); font-size: var(--fs-small); line-height: 1.4; } .ext-sheet.open { display: block; } .ext-sheet-where { display: flex; align-items: flex-start; gap: var(--sp-2); } .ext-sheet-where svg { flex: none; width: 13px; height: 13px; margin-top: 3px; color: var(--text2); } [dir="rtl"] .ext-sheet-where svg { transform: scaleX(-1); } .ext-sheet-where bdi { font-weight: var(--fw-strong); overflow-wrap: anywhere; } .ext-sheet-note { color: var(--text2); margin: 4px 0 0; padding-inline-start: 21px; } .ext-sheet-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: 10px; padding-inline-start: 21px; } @media (pointer: coarse) { .ext-sheet { font-size: 14px; } } /* ── Word lookup (Define) popover ── */ .define-popover { position: fixed; z-index: 10001; display: none; background: var(--card-bg, #1a1a1a); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); color: var(--text); font-size: var(--fs-small); /* Never wider than the viewport minus the 8px edge margins the JS clamps to, so a card near the right edge still fits after _definePosition runs. */ max-width: min(320px, calc(100vw - 16px)); } .define-popover.open { display: block; } /* Stage 1: the compact "Define" trigger button */ .define-trigger { display: flex; align-items: center; gap: 6px; padding: 7px 12px; cursor: pointer; white-space: nowrap; font-weight: 500; } .define-trigger:hover { color: var(--amber); } .define-trigger svg { width: 14px; height: 14px; } /* Stage 2: the definition card */ .define-card { padding: 10px 14px 12px; max-height: 40vh; overflow-y: auto; } .define-card .define-word { font-weight: var(--fw-strong); font-size: var(--fs-body); margin-bottom: 4px; display: flex; align-items: baseline; gap: var(--sp-2); } .define-card .define-word .define-lang { font-size: var(--fs-caption); color: var(--text2); font-weight: var(--fw-regular); } .define-card .define-body { color: var(--text); line-height: 1.5; } .define-card .define-body ol { margin: 4px 0 0; padding-inline-start: 20px; } .define-card .define-body li { margin: 2px 0; } .define-card .define-status { color: var(--text2); font-style: italic; } .define-card .define-open { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--amber); cursor: pointer; text-decoration: none; } .define-card .define-open:hover { text-decoration: underline; } /* ── Highlights: the selection bar and the note card (highlights.js) ── The four colours are the page's own highlight colours at full strength. */ .hl-c-yellow { background: #ffcc00; } .hl-c-green { background: #34c759; } .hl-c-blue { background: #409cff; } .hl-c-pink { background: #ff4081; } .hl-bar { position: fixed; z-index: 10001; display: none; align-items: center; gap: 2px; padding: 4px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-popup); color: var(--text); font-size: var(--fs-small); max-width: calc(100vw - 16px); -webkit-user-select: none; user-select: none; } .hl-bar.open { display: flex; } .hl-bar button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; min-width: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; } .hl-bar button.hl-icon, .hl-bar button.hl-swatch { padding: 0; width: 38px; } .hl-bar button:hover, .hl-bar button:focus-visible { color: var(--amber); background: var(--amber-glow); outline: none; } .hl-bar svg { width: 17px; height: 17px; flex-shrink: 0; } .hl-swatches { display: flex; } .hl-swatch span { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18); } .hl-swatch[aria-pressed="true"] span { box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 4px var(--text); } .hl-sep { width: 1px; align-self: stretch; margin: 6px 3px; background: var(--border); } .hl-bar.hl-tight .hl-note-btn { padding: 0; } .hl-bar.hl-tight .hl-note-btn > span { display: none; } /* A thumb's size on a touch screen. */ @media (pointer: coarse) { .hl-bar button { min-height: var(--target); min-width: 44px; } .hl-bar button.hl-icon, .hl-bar button.hl-swatch { width: 44px; } .hl-note-actions .pill { min-height: var(--target); } } /* The note card sits near the top: on a phone the keyboard takes the bottom. */ .hl-note { position: fixed; z-index: 10002; display: none; flex-direction: column; gap: 10px; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); width: min(440px, calc(100vw - 24px)); padding: 14px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-popup); color: var(--text); } .hl-note.open { display: flex; } .hl-note-quote { padding-inline-start: 10px; border-inline-start: 3px solid var(--hl-c, #ffcc00); color: var(--text2); font-size: var(--fs-small); line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; } .hl-b-yellow { --hl-c: #ffcc00; } .hl-b-green { --hl-c: #34c759; } .hl-b-blue { --hl-c: #409cff; } .hl-b-pink { --hl-c: #ff4081; } /* 16px: iOS does not zoom the page into a field this size. */ .hl-note-text { min-height: 96px; resize: vertical; padding: 10px; font: inherit; font-size: 16px; line-height: 1.4; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; } .hl-note-text:focus { outline: 2px solid var(--amber-border); border-color: var(--amber); } .hl-note-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); } .hl-note-actions .pill { min-height: 36px; padding: 0 16px; } /* ── Library health report ── */ .library-health:empty { display: none; } .library-health { margin-top: 12px; } .health-summary { font-weight: var(--fw-strong); margin: 8px 0; color: var(--text); } .health-table { border-top: 1px solid var(--border); } .health-row { display: flex; align-items: baseline; gap: var(--sp-2); padding: 6px 2px; border-bottom: 1px solid var(--border); font-size: var(--fs-small); } .health-row .health-mark { flex: 0 0 auto; width: 16px; text-align: center; } .health-row .health-name { flex: 0 0 auto; font-weight: 500; color: var(--text); } .health-row .health-detail { flex: 1 1 auto; color: var(--text2); text-align: end; } /* Small labelled chips for the "has title index / Q-ID index" indicators. */ .health-idx-badge { display: inline-block; margin-inline-start: 5px; padding: 1px 6px; font-size: 10px; font-weight: var(--fw-strong); letter-spacing: 0.04em; border-radius: 4px; background: var(--surface2); color: var(--text2); border: 1px solid var(--border); vertical-align: middle; } .health-row.health-warn .health-detail { color: var(--amber); } .health-row.health-info .health-detail { color: var(--text2); } .health-row .health-redownload-btn { flex: 0 0 auto; font-size: var(--fs-caption); padding: 2px 8px; border-radius: 5px; cursor: pointer; background: var(--surface2); color: var(--amber); border: 1px solid var(--border); } .health-row .health-redownload-btn:hover { border-color: var(--amber); } .health-row .health-redownload-btn.confirming { background: var(--amber-glow, rgba(245,158,11,.15)); font-weight: var(--fw-strong); } /* ── Bookmarks panel: Export to ZIM ── */ .hp-actions { display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex-wrap: wrap; } .hp-action-btn { font-size: 12px; padding: 5px 12px; border-radius: var(--r-chip); cursor: pointer; background: var(--surface2); color: var(--text); border: 1px solid var(--border); } .hp-action-btn:hover:not(:disabled) { color: var(--amber); border-color: var(--amber-border, var(--amber)); } .hp-action-btn:disabled { opacity: 0.5; cursor: default; } .hp-action-status { font-size: 12px; color: var(--text2); } .reader-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: var(--sp-3); background: var(--bg); color: var(--text2); font-size: var(--fs-small); z-index: 5; transition: opacity var(--dur-travel) var(--ease-travel); } .reader-loading.hidden { opacity: 0; pointer-events: none; } .reader-loading .spinner, .loading .spinner-inline, .create-status .spinner-inline, .content-search-indicator .spinner-inline, .vg-t .spinner-inline, .addon-x-working .spinner-inline { border: 2px solid var(--border); border-top-color: var(--amber); border-radius: 50%; animation: spin 0.7s linear infinite; } .reader-loading .spinner { width: 24px; height: 24px; } @keyframes spin { to { transform: rotate(360deg); } } /* ── Footer ── */ /* ── Utility ── */ .loading { text-align: center; padding: 40px; color: var(--text2); font-size: var(--fs-small); } /* The boot's "Loading the library": not drawn for the first half second, so a quick start shows no message that blinks. */ .loading-late { opacity: 0; animation: loading-late-in var(--dur-settle) var(--ease-settle) 500ms forwards; } @keyframes loading-late-in { to { opacity: 1; } } @media (prefers-reduced-motion: reduce) { .loading-late { animation-duration: 1ms; } } .loading .spinner-inline, .create-status .spinner-inline { display: inline-block; width: 14px; height: 14px; vertical-align: middle; margin-right: 8px; } .content-search-indicator { text-align: center; padding: 12px; color: var(--text2); font-size: 12px; animation: fadeIn 0.3s ease; } .content-search-indicator .spinner-inline { display: inline-block; width: 12px; height: 12px; vertical-align: middle; margin-right: 6px; } /* Manage > Library: the Almanac's data as one row, its parts and their sizes under it. */ .ci-hd-group > summary { list-style: none; cursor: pointer; } .ci-hd-group > summary::-webkit-details-marker { display: none; } .ci-hd-parts { margin: -4px 12px 8px; padding: 6px 12px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 10px 10px; font-size: 12px; color: var(--text2); } .ci-hd-part { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 2px 0; } #ms-older .ci-info { min-width: 0; } #ms-older .ci-title, #ms-older .ci-meta, #ms-older .ci-meta > span { overflow-wrap: anywhere; white-space: normal; } .ci-hd-part > span:first-child { min-width: 0; overflow-wrap: anywhere; } .ci-hd-note { margin: 2px 12px 8px; font-size: 12px; color: var(--amber); } .empty { text-align: center; padding: 48px 20px; color: var(--text2); } .empty p { font-size: 14px; margin-bottom: 8px; } .empty .hint { font-size: 12px; color: var(--text2); } /* A download still arriving in another program's folder (Project NOMAD). */ .folder-note { font-size: var(--fs-small); color: var(--text2); margin: 0 0 14px; text-wrap: balance; } .empty .folder-note { margin: 14px 0 0; } /* The card over a question's results: a quote, then its source. The sentence that answers is marked with the colour find-in-page uses, so the mark in the article after a tap is the same one. The extras are the same quote, quieter: no mark, no context, three lines. */ .search-card-slot { margin-bottom: 16px; animation: bestIn 0.2s ease; } @keyframes bestIn { from { opacity: 0; } to { opacity: 1; } } @media (prefers-reduced-motion: reduce) { .search-card-slot { animation: none; } } /* The games the search found: a label, then small tiles in a row that scrolls sideways on a phone. */ .games-row { margin-bottom: 16px; animation: bestIn 0.2s ease; } .games-row-label { display: inline-block; margin-bottom: 6px; font-size: 12px; font-weight: var(--fw-strong); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text2); text-decoration: none; } .games-row-label:hover { color: var(--amber); } .games-row-list { display: flex; gap: var(--sp-2); overflow-x: auto; padding-bottom: 2px; } .games-row-tile { flex: 0 0 auto; display: flex; align-items: center; gap: var(--sp-2); max-width: 220px; padding: 5px 12px 5px 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: var(--fw-strong); } .games-row-tile img { width: 64px; height: 36px; flex: none; border-radius: var(--r-chip); object-fit: cover; background: var(--surface2); } .games-row-tile span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .games-row-tile:hover { color: var(--amber); border-color: var(--amber-border); background: var(--amber-glow); } @media (prefers-reduced-motion: reduce) { .games-row { animation: none; } } .best-card { display: flex; flex-direction: column; gap: 6px; } a.best-quote { display: block; color: inherit; text-decoration: none; padding: 14px 16px; background: var(--surface); border-radius: var(--radius); border-inline-start: 3px solid var(--amber); } a.best-quote:hover, a.best-quote:focus-visible { background: var(--surface2); outline: none; box-shadow: 0 2px 12px var(--amber-glow); } .best-quote blockquote { margin: 0; font-size: var(--fs-body); line-height: 1.55; color: var(--text2); overflow-wrap: anywhere; } .best-quote mark.bq-hit { background: var(--amber-border); color: var(--text); border-radius: 3px; padding: 0 1px; } .bq-src { display: block; margin-top: 8px; font-size: 12px; color: var(--text2); } a.best-quote.more { padding: 10px 16px; border-inline-start-color: var(--border); } a.best-quote.more blockquote { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } a.best-quote.more .bq-src { margin-top: 4px; } .did-you-mean { font-size: 14px; color: var(--text2); margin-bottom: 16px; } /* A near: search: what it measured from, over its places (the did-you-mean line's voice). */ .near-from { font-size: 14px; color: var(--text2); margin-bottom: 12px; } .near-which { font-size: var(--fs-small); color: var(--text3); margin-top: 4px; } .empty .did-you-mean { margin-bottom: 12px; } .did-you-mean a { color: var(--amber); font-style: italic; text-decoration: none; border-bottom: 1px solid var(--amber-border); } .did-you-mean a:hover { border-bottom-color: var(--amber); } .did-you-mean.dym-ran { font-size: var(--fs-small); margin-bottom: 12px; text-wrap: balance; } .did-you-mean.dym-ran b { color: var(--text); font-weight: var(--fw-strong); } .search-deeper { text-align: center; padding: 14px 20px; margin-top: 16px; color: var(--amber); font-size: var(--fs-small); cursor: pointer; border: 1px dashed var(--border); border-radius: var(--radius); transition: all var(--dur-settle) var(--ease-settle); } .search-deeper:hover, .search-deeper:focus-visible { border-color: var(--amber-border); background: var(--surface); outline: none; } #main-view { min-height: calc(100vh - 56px); } #main-view.hidden { display: none; } /* ── Manage page ── */ .manage-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; } .manage-card h2 { font-size: 14px; font-weight: var(--fw-strong); color: var(--accent); margin-bottom: 12px; } .manage-card .mc-row, .ms-pane .mc-row { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-small); color: var(--text2); padding: 4px 0; } .manage-card .mc-row .mc-label, .ms-pane .mc-label { color: var(--text2); } .manage-card .mc-row .mc-value, .ms-pane .mc-value { color: var(--text); font-weight: 500; } /* What a count above is made of: indented under it, smaller and quieter. */ .ms-pane .mc-row-choice { flex-wrap: wrap; gap: 6px 12px; } .app-theme-seg.mc-seg { max-width: none; flex: 0 1 auto; margin-inline-start: auto; } .mc-seg .app-theme-btn { flex: none; padding: 4px 12px; } .ms-pane .mc-row.mc-sub { font-size: 12px; padding: 1px 0; padding-inline-start: 14px; } .ms-pane .mc-row.mc-sub .mc-value { color: var(--text2); font-weight: var(--fw-regular); } .ms-pane .mc-row.mc-sub:last-child { padding-bottom: 5px; } /* App updates (Server pane): quiet when current, amber when a release is out */ /* The four atoms every settings section states a fact with: the notable value, the quiet one, an outbound link, and a command to copy. Scoped to the pane rather than to the app-update block they were written for — the Creator and auto-update sections say the same four kinds of thing, and three copies of these rules under three block classes is how a pane ends up with a differently-coloured link in each section. */ .ms-pane .app-update-badge { color: var(--amber); font-weight: var(--fw-strong); } .ms-pane .app-update-quiet { color: var(--text2); } .ms-pane .app-update-link { color: var(--amber); } .ms-pane code.app-update-cmd { display: block; margin: 6px 0 2px; padding: 6px 8px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-chip); font-size: 12px; color: var(--amber); user-select: all; overflow-x: auto; white-space: nowrap; } /* The ZIMs the auto-updater cannot reach, as a wrapped row of names. Chips rather than a list: this is a set to scan for a name you recognise, not something to read top to bottom. */ .au-skipped { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 2px; } .au-skipped .act-chip { max-width: 220px; } /* Caches: data-dir storage breakdown */ .mc-section-title { font-size: 12px; font-weight: var(--fw-strong); color: var(--text); margin: 2px 0 8px; } .cache-bar { display: flex; width: 100%; height: 14px; border-radius: var(--r-chip); overflow: hidden; background: var(--surface2); border: 1px solid var(--border); } .cache-seg { height: 100%; min-width: 2px; } .cache-seg + .cache-seg { box-shadow: inset 1px 0 0 rgba(0,0,0,0.28); } .cache-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 2px; font-size: var(--fs-caption); color: var(--text2); } .cache-legend-item { display: inline-flex; align-items: center; gap: 5px; } .cache-legend-swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; } .cache-legend-item b { color: var(--text); font-weight: var(--fw-strong); } /* The per-kind count beside a value ("· 410"), quieter than the size it qualifies. Shared with the create page's finished-capture summary. */ .cache-legend-n { color: var(--text3); font-variant-numeric: tabular-nums; } .cache-top-zims { font-size: var(--fs-caption); color: var(--text2); margin-top: 8px; line-height: 1.5; } .cache-top-label { color: var(--text); font-weight: var(--fw-strong); } .manage-btn-action, .desktop-card .btn-primary, .setup-form .btn-primary, .coll-form button { background: linear-gradient(135deg, var(--amber), var(--amber2)); color: var(--on-amber); border: none; border-radius: var(--radius); cursor: pointer; } .manage-btn-action:hover, .desktop-card .btn-primary:hover, .setup-form .btn-primary:hover { opacity: 0.85; } .manage-btn-action:disabled, .desktop-card .btn-primary:disabled { opacity: 0.4; cursor: default; } .manage-btn-action { padding: 8px 16px; font-size: 12px; font-weight: var(--fw-strong); transition: opacity var(--dur-settle) var(--ease-settle); white-space: nowrap; } /* macOS-style settings panel */ .manage-settings { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; min-height: 180px; overflow: hidden; } .ms-nav { width: 140px; flex-shrink: 0; border-right: 1px solid var(--border); padding: 8px 0; display: flex; flex-direction: column; } .ms-nav-item { padding: 8px 16px; font-size: var(--fs-small); color: var(--text2); cursor: pointer; border: none; background: none; text-align: left; transition: all var(--dur-press) var(--ease-press); font-family: inherit; } .ms-nav-item:hover { color: var(--text); background: var(--amber-glow); } .ms-nav-item.active { color: var(--amber); background: var(--amber-glow); } /* min-width:0: a flex item's automatic minimum is its widest unbreakable line. The Capture pane's install commands (nowrap, with the folder Zimi sits in in them) made the pane wider than the card, which clips: the switches and the lower sections were cut off on a Pi whose path was long enough (#150). */ .ms-pane { flex: 1; min-width: 0; padding: 16px 20px; } .ms-pane .ms-actions { margin-top: 14px; display: flex; gap: var(--sp-2); flex-wrap: wrap; } /* Settings' on/off rows: the sharing card's row shape, the whole row the label of its switch. Apps add their icon at the start. */ .set-rows { margin: 10px 0 0; } label.set-row { cursor: pointer; } .set-row .share-row-title, .set-row .share-row-desc { display: block; } .set-row .share-row-title { font-weight: 500; font-size: 14px; } .set-row-icon { display: flex; flex-shrink: 0; color: var(--amber); } .addon-row { flex-wrap: wrap; } .addon-act { margin-inline-start: auto; display: flex; align-items: center; gap: var(--sp-2); color: var(--text2); font-size: 12px; } .addon-row .dl-progress { flex-basis: 100%; } .addon-bar[aria-hidden="true"] { background: transparent; } .addon-bar:not([aria-hidden]) { background: var(--border-strong, var(--border)); } .addon-x { min-width: 28px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; } .addon-x-working .spinner-inline { display: inline-block; width: 12px; height: 12px; } [dir="rtl"] .addon-go svg { transform: scaleX(-1); } .addon-x-working:disabled { opacity: 1; color: var(--amber); border-color: var(--amber-border); } .addon-x svg, .addon-tick { width: 14px; height: 14px; } .addon-tick { color: var(--green, #30a46c); } .addon-pct { font-variant-numeric: tabular-nums; min-width: 3ch; text-align: end; } .addon-row .addon-state.addon-failed { color: var(--red, #e5484d); } .set-row-icon svg { width: 22px; height: 22px; } .set-row.share-locked { cursor: default; } /* Apps: shut, one disclosure row (title, how many are on, a chevron); open, the rows, tighter than the other switch rows. */ button.apps-sum { width: 100%; font: inherit; color: inherit; text-align: start; background: none; border: 0; cursor: pointer; align-items: center; gap: 10px; } .apps-sum .share-row-title { flex: 1 1 auto; font-weight: 500; font-size: 14px; } .apps-sum-count { font-size: var(--fs-small); color: var(--text2); white-space: nowrap; } .apps-chev { flex-shrink: 0; color: var(--text2); transition: transform var(--dur-press) var(--ease-press); } [dir=rtl] .apps-chev { transform: scaleX(-1); } .apps-card.open > .apps-sum .apps-chev { transform: rotate(90deg); } .apps-sum:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; } .apps-card:not(.open) > .app-pick, .apps-card:not(.open) > .apps-head { display: none; } .apps-head { display: flex; justify-content: flex-end; gap: 2px; padding: 2px 8px; border-top: 1px solid var(--border); } .apps-card .app-pick { padding-top: 7px; padding-bottom: 7px; min-height: 0; } .apps-card .app-pick .set-row-icon svg { width: 20px; height: 20px; } .apps-card .app-pick .share-row-desc { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .apps-card .app-pick .share-row-text { min-width: 0; } .set-head-btn { font: inherit; font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--amber); background: none; border: none; border-radius: var(--r-chip); padding: 4px 8px; cursor: pointer; } .set-head-btn:hover { background: var(--amber-glow); } .ms-pane .ms-field { margin-bottom: 10px; } /* Field labels stay mixed-case 12px — uppercase is reserved for section headers so the two hierarchy levels read as different levels. */ .ms-pane .ms-field label { display: block; font-size: 12px; font-weight: 500; color: var(--text2); margin-bottom: 4px; } .ms-pane .ms-field input { width: 100%; padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: var(--fs-small); box-sizing: border-box; } .ms-pane .ms-field input:focus { outline: none; border-color: var(--amber-border); } .ms-pane .ms-field input[readonly] { opacity: 0.6; text-overflow: ellipsis; } /* a long path ends in an ellipsis, not mid-letter */ /* A hint reads the same wherever it sits: the settings panes, and the catalog (the StreetZim note under the Maps toggle was 16px body text). */ .ms-hint { font-size: 12px; line-height: 1.5; color: var(--text2); margin-top: 8px; } /* Settings controls, one language (Eric, 2026-10-03: "upgrade all controls and buttons in settings to be beautiful with this new language"). Cards are .share-rows, choices of three or four are the segmented selector (.app-theme-seg), on/off is .switch; buttons, selects and fields are these: one height, one round quiet button, one amber primary. */ .ms-pane { --set-ctl-h: 34px; } .set-btn, .ms-pane .pill:not(.cat-pill):not(.reorder-add), .ms-pane .ms-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; min-height: var(--set-ctl-h); padding: 0 14px; border-radius: var(--r-full); font: inherit; font-size: var(--fs-small); font-weight: 500; line-height: 1; white-space: nowrap; background: var(--surface2); border: 1px solid var(--border); color: var(--text); cursor: pointer; transition: color var(--dur-press) var(--ease-press), background var(--dur-press) var(--ease-press), border-color var(--dur-press) var(--ease-press); } .set-btn:hover:not(:disabled), .ms-pane .pill:not(.cat-pill):not(.reorder-add):hover, .ms-pane .ms-btn:hover { color: var(--amber); border-color: var(--amber-border); background: var(--amber-glow); } .set-btn:focus-visible, .ms-pane .pill:focus-visible, .ms-pane .ms-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; } .set-btn:disabled { opacity: 0.45; cursor: default; } .set-btn.primary, .ms-pane .ms-btn-primary, .ms-pane .pill.active:not(.cat-pill):not(.reorder-add), .ms-pane .manage-btn-action { background: var(--amber); color: var(--on-amber); border-color: transparent; font-weight: var(--fw-strong); } .set-btn.primary:hover:not(:disabled), .ms-pane .ms-btn-primary:hover, .ms-pane .pill.active:not(.cat-pill):not(.reorder-add):hover { color: var(--on-amber); background: var(--amber); filter: brightness(1.06); } .ms-pane .manage-btn-action { min-height: var(--set-ctl-h); border-radius: var(--r-full); font-size: var(--fs-small); padding: 0 16px; } .ms-pane select { min-height: var(--set-ctl-h); box-sizing: border-box; padding: 0 30px 0 12px; border-radius: var(--radius); font: inherit; font-size: var(--fs-small); color: var(--text); background-color: var(--surface2); border: 1px solid var(--border); -webkit-appearance: none; appearance: none; cursor: pointer; /* The caret, drawn in the theme's own text colour. */ background-image: linear-gradient(45deg, transparent 50%, var(--text2) 50%), linear-gradient(135deg, var(--text2) 50%, transparent 50%); background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; } [dir="rtl"] .ms-pane select { padding: 0 12px 0 30px; background-position: 11px 52%, 16px 52%; } .ms-pane select:hover:not(:disabled) { border-color: var(--amber-border); } .ms-pane select:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; } .ms-pane select:disabled { opacity: 0.55; cursor: default; } .ms-pane .set-rows .set-row { min-height: 54px; box-sizing: border-box; } .ms-pane .ms-section-label:first-child { margin-top: 0; } @media (pointer: coarse) { .ms-pane { --set-ctl-h: 40px; } } .browse-drilldown-header + .maps-source-toggle + .ms-hint, .maps-source-toggle + .ms-hint { margin: 6px 0 14px; } /* Environment panel: a name, its value, and what it takes over. Monospace on the first two because they are literals an admin will retype into a unit file or a shell, where a proportional font makes that error-prone. */ .env-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; } .env-row { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 4px 10px; align-items: baseline; } .env-name { font-size: 12px; color: var(--text); word-break: break-all; } .env-value { font-size: 12px; color: var(--amber); word-break: break-all; } .env-secret { color: var(--text3); font-style: italic; } .env-what { grid-column: 1 / -1; font-size: 12px; color: var(--text2); } /* On a line of its own: run on, "…unauthenticated locks Set password" read as one sentence. */ .zi-ev-fact.zi-ev-stopped, .zi-warn.zi-incomplete { color: var(--amber2); } .env-locks { color: var(--text3); display: block; } @media (max-width: 560px) { /* Value under the name rather than beside it: a long path or a proxy list otherwise pushes the row sideways on a phone. */ .env-row { grid-template-columns: minmax(0, 1fr); } } /* What Zimi fetches from the internet: folded to its counts, which is the answer; open, a name and its state on one line, what and where under it. The state is the one word that matters, so "on its own" is amber. */ .net-details > summary { cursor: pointer; font-size: var(--fs-small); color: var(--text); padding: 4px 0; } /* Offline Readiness on the first tab: one folded line, a count and (while something is missing) an amber dot. */ .offline-fold { margin: 16px 0 0; } /* Compact: a piece is its name and its state; what it is for is on the row's tooltip, not a line of its own. */ .offline-fold .addon-row { padding-block: 6px; gap: 2px 10px; } .offline-fold .addon-row .share-row-desc:not(.addon-state) { display: none; } .offline-fold > summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; padding: 6px 0; font-size: var(--fs-small); color: var(--text); } .offline-fold > summary::-webkit-details-marker { display: none; } .offline-fold > summary .set-row-icon { color: var(--text2); } .offline-fold > summary .set-row-icon svg { width: 20px; height: 20px; } .offline-fold-title { font-weight: var(--fw-strong); } .offline-fold-sum { color: var(--text2); margin-inline-start: auto; font-variant-numeric: tabular-nums; } .offline-fold-chev { display: flex; color: var(--text3); transition: transform var(--dur-travel) var(--ease-travel); } .offline-fold-chev svg { width: 14px; height: 14px; } .offline-fold[open] .offline-fold-chev { transform: rotate(90deg); } [dir="rtl"] .offline-fold-chev svg { transform: scaleX(-1); } .offline-fold-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); display: none; } .offline-fold-missing .offline-fold-dot { display: inline-block; } .offline-fold[open] > summary { margin-bottom: 6px; } .net-rows { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; } .net-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline; } .net-name { font-size: var(--fs-small); color: var(--text); } .net-state { justify-self: end; font-size: 12px; color: var(--text2); white-space: nowrap; } .net-state-auto { color: var(--amber); } .net-state-off, .net-state-unset { color: var(--text3); } .net-what { font-size: 12px; line-height: 1.5; color: var(--text2); } /* The way to a row's switch: the state's column, under the state, on every row, so the eye finds it in one place. */ .net-act { justify-self: end; } /* Where it goes on a line of its own, whole names (a host broken mid-word reads as two). */ .net-where { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: var(--fs-caption); color: var(--text3); } .net-where code { overflow-wrap: anywhere; } .net-go { font-size: 12px; color: var(--amber); white-space: nowrap; } /* The environment folded to the names it sets. */ .env-details > summary { overflow-wrap: anywhere; } .env-names { font-family: monospace; font-size: 12px; } /* Older copies kept: a line, the count beside it, the files when opened. */ .ms-older-details { margin: 16px 0 4px; } .ms-older-details > summary { cursor: pointer; font-size: var(--fs-small); color: var(--text); } .ms-older-title { font-weight: var(--fw-strong); } .ms-older-sum { color: var(--text2); margin-inline-start: 6px; } .ms-older-details[open] > summary { margin-bottom: 8px; } .env-details[open] > summary { margin-bottom: 10px; } /* App-theme segmented control (Auto / Dark / Light). Three equal pills in a recessed track, amber-filled when active — mirrors the reader palette's control language so the two theme pickers feel like one family. */ .ms-theme-label { font-size: var(--fs-small); color: var(--text); margin: 4px 0 8px; } .app-theme-seg { display: flex; gap: var(--sp-1); padding: 4px; border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--border); max-width: 340px; } .app-theme-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 8px; border: 1px solid transparent; border-radius: 7px; background: none; color: var(--text2); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: color var(--dur-press) var(--ease-press), background var(--dur-press) var(--ease-press), border-color var(--dur-press) var(--ease-press); } .app-theme-btn svg { flex-shrink: 0; } .app-theme-btn:hover { color: var(--amber); border-color: var(--amber-border); background: var(--amber-glow); } .app-theme-btn.active { background: var(--amber); color: var(--on-amber); border-color: transparent; font-weight: var(--fw-strong); } .app-theme-btn:disabled { cursor: default; opacity: 0.5; } .app-theme-btn:disabled:hover { color: var(--text2); border-color: transparent; background: none; } .app-theme-btn.active:disabled:hover { color: var(--on-amber); background: var(--amber); } .app-theme-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; } .ms-pane .app-theme-btn { min-height: calc(var(--set-ctl-h) - 2px); } .ci-section-label, .hp-group-label { font-size: var(--fs-caption); font-weight: var(--fw-strong); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text2); } /* Every Settings section's title: the text's own colour, a size above the rows it heads, more room above than below (Eric, 2026-10-05: "the titles now are like soo small and hidden and dull"). One rule, every section. */ .ms-section-label { font-size: 16px; font-weight: var(--fw-strong); line-height: 1.3; color: var(--text); margin: 32px 0 10px; } /* Creator "made here" breakdown: amber count chips over a sortable table. Numbers are tabular so the columns line up; the table scrolls inside its own box on a phone rather than pushing the pane sideways. */ .cr-made-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: 12px; } .cr-made-chip { font-size: 12px; color: var(--text2); padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--r-full); } .cr-made-chip b { color: var(--amber); font-weight: var(--fw-strong); } .cr-made-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; } .cr-made-table { width: 100%; border-collapse: collapse; font-size: 12.5px; } .cr-made-table th, .cr-made-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; } .cr-made-th { font-weight: 500; color: var(--text2); cursor: pointer; user-select: none; } .cr-made-th:hover { color: var(--amber); } .cr-made-name { color: var(--text); max-width: 240px; overflow: hidden; text-overflow: ellipsis; } /* The name is a link, and an unstyled one gets the browser's blue and an underline — the only place in the app that happened. It reads as ordinary text and answers to the pointer the way the sortable headers beside it do. */ .cr-made-name a { color: inherit; text-decoration: none; } .cr-made-name a:hover, .cr-made-name a:focus-visible { color: var(--amber); } .cr-made-num { font-variant-numeric: tabular-nums; color: var(--text2); } /* Auto-fit grid for catalog + downloads. 320px min → 2 columns in the manage pane (~790px wide), 3 on wide screens, 1 on mobile. Cards switch to vertical stack inside grid cells so they don't get cramped. */ .catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; align-items: stretch; } /* Compact grid-card: icon top-left, title+summary right of icon, actions bottom-right. Saves vertical space vs full-vertical-stack. */ .catalog-grid .catalog-item { display: grid; grid-template-columns: 32px 1fr; grid-template-areas: "icon info" "actions actions"; gap: 2px 10px; align-items: start; max-height: none; padding: 8px 10px; position: relative; } .catalog-grid .catalog-item .ci-icon { grid-area: icon; width: 32px; height: 32px; } .catalog-grid .catalog-item .ci-icon img { width: 28px; height: 28px; } .catalog-grid .catalog-item .ci-icon .ci-letter { width: 32px; height: 32px; font-size: 14px; } /* Reserve the checkbox corner on the WHOLE text column, not just the title: the 18px visual box (centred in its 40px hit area) reaches 29px in from the card's right edge, i.e. 19px past the 10px card padding. 24px here keeps every line — title, description AND meta — clear of it with a breathing gap, at any viewport. (Padding only the title let long descriptions run under the box.) */ .catalog-grid .catalog-item .ci-info { grid-area: info; min-width: 0; padding-inline-end: 24px; } .catalog-grid .catalog-item .ci-title { font-size: var(--fs-small); margin-bottom: 1px; } .catalog-grid .catalog-item .ci-meta { font-size: var(--fs-caption); } .catalog-grid .catalog-item .ci-actions { grid-area: actions; justify-content: flex-end; margin-left: 0; } .catalog-grid .catalog-item .ci-summary { -webkit-line-clamp: 1; line-clamp: 1; font-size: 11.5px; margin-bottom: 2px; } .catalog-grid .catalog-item .ci-hier, .catalog-grid .catalog-item .ci-peer { margin-top: 2px; } /* Batch checkbox: a custom appearance:none box drawn entirely in CSS so it renders identically across engines. A native checkbox scales with its width/height/padding on iOS Safari into a huge dark rounded square — the bug this replaces. 40px transparent hit area (tap target) centring an 18px visual box (::before), pinned to the card's top-right corner. The check stroke is theme-scoped: black on the bright dark-theme amber (#f59e0b), white on the dark light-theme amber (#9d4a08) — black-on-#9d4a08 was nearly invisible. */ .catalog-grid .catalog-item .ci-select { appearance: none; -webkit-appearance: none; position: absolute; top: 0; inset-inline-end: 0; margin: 0; padding: 0; width: 40px; height: 40px; box-sizing: border-box; background: none; border: none; cursor: pointer; display: grid; place-content: center; } .catalog-grid .catalog-item .ci-select::before { content: ""; width: 18px; height: 18px; box-sizing: border-box; /* Unchecked contrast: a --border (#27272b) box on a --surface (#141416) card nearly vanished on-device. --text2 (#8a8a94) border + --surface2 (#1c1c20) fill (one step lighter than the card) reads clearly as an empty checkbox. */ border: 2px solid var(--text2); border-radius: 4px; background: var(--surface2); transition: background var(--dur-press) var(--ease-press), border-color var(--dur-press) var(--ease-press); } /* Light theme: --surface2 is pure white, so the unchecked box vanished on the near-white card. Match the fixed-toggle family — a stronger --border-strong edge over a warm tinted fill — so the empty box clears the 3:1 contrast bar. */ :root[data-theme="light"] .catalog-grid .catalog-item .ci-select::before { border-color: var(--border-strong); background: #e0dacd; } /* The light-theme unchecked rule above is more specific (extra :root[data-theme]) than a bare :checked selector, which left checked boxes rendering as empty in light mode — hence the doubled selectors so checked/focus win in BOTH themes. */ .catalog-grid .catalog-item .ci-select:checked::before, :root[data-theme="light"] .catalog-grid .catalog-item .ci-select:checked::before { border-color: var(--amber); background: var(--amber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat; } /* Light theme's --amber (#9d4a08) is a dark burnt orange — the black check above disappeared on it. Swap in a white stroke there (same geometry). Must come AFTER the doubled checked rule so equal specificity resolves by source order. */ :root[data-theme="light"] .catalog-grid .catalog-item .ci-select:checked::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); } .catalog-grid .catalog-item .ci-select:focus-visible { outline: none; } .catalog-grid .catalog-item .ci-select:focus-visible::before, :root[data-theme="light"] .catalog-grid .catalog-item .ci-select:focus-visible::before { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-glow); } .mc-row-clickable:hover, .mc-row-clickable:focus-visible { color: var(--amber); } /* Caret hints the Updates line expands; nudges right on hover. */ .mc-caret { vertical-align: -2px; margin-left: 4px; opacity: 0.7; transition: transform var(--dur-press) var(--ease-press); } .mc-row-clickable:hover .mc-caret { transform: translateX(2px); } /* The Updates count and its "Update all", side by side at the row's end. */ .mc-updates-end { display: inline-flex; align-items: center; gap: 10px; min-width: 0; } .ms-pane .mc-updates-end .manage-btn-action { min-height: 28px; padding: 0 12px; font-size: 12px; } .mc-value .spinner-inline { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-right: 6px; border: 2px solid var(--border); border-top-color: var(--amber); border-radius: 50%; animation: spin 0.7s linear infinite; } .catalog-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 6px; transition: border-color var(--dur-settle) var(--ease-settle), opacity var(--dur-travel) var(--ease-travel); max-height: 200px; overflow: hidden; -webkit-touch-callout: none; /* long-press → context menu, not iOS callout (#37) */ } /* Grid-cell catalog-items don't need a margin — the grid gap handles spacing */ .catalog-grid .catalog-item { margin-bottom: 0; } .catalog-item:hover { border-color: var(--amber-border); } .catalog-item.ci-installed-item { opacity: 0.5; } .catalog-item.ci-covered { opacity: 0.6; } .ci-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--surface2); } .ci-icon img { width: 34px; height: 34px; object-fit: cover; background: #fff; border-radius: var(--r-chip); padding: 2px; } .ci-icon .ci-letter { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 16px; font-weight: 700; color: var(--accent); } .catalog-item .ci-info { flex: 1; min-width: 0; } .catalog-item .ci-title { font-size: 14px; font-weight: var(--fw-strong); color: var(--accent); margin-bottom: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .ci-lang-tag { font-size: 10px; font-weight: var(--fw-strong); padding: 1px 5px; border-radius: 4px; background: var(--surface2); color: var(--text2); border: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.06em; flex-shrink: 0; } .catalog-item .ci-summary { font-size: 12px; color: var(--text2); line-height: 1.4; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .catalog-item .ci-meta { font-size: 12px; color: var(--text2); word-spacing: 0.1em; } .catalog-item .ci-meta > span { white-space: nowrap; } .catalog-item .ci-actions { flex-shrink: 0; display: flex; align-items: center; gap: 6px; margin-left: 8px; } .ci-installed-badge { font-size: var(--fs-caption); color: var(--amber); font-weight: var(--fw-strong); padding: 4px 10px; border: 1px solid var(--amber-border); border-radius: 20px; background: var(--amber-glow); } .ci-delete-btn, .coll-item .coll-del { background: none; border: 1px solid transparent; color: var(--text2); opacity: 0.3; font-size: 16px; cursor: pointer; padding: 2px 6px; border-radius: var(--r-chip); transition: all var(--dur-settle) var(--ease-settle); line-height: 1; } .ci-delete-btn:hover, .coll-item .coll-del:hover { opacity: 1; color: var(--error); border-color: var(--error); } .ci-delete-btn.confirming { opacity: 1; color: var(--error); border-color: var(--error); font-size: var(--fs-caption); padding: 4px 10px; } /* Whose a ZIM is, in the Installed badge's place: it is installed, and not Zimi's to delete. */ .ci-from { white-space: nowrap; } /* Other library folders (Storage). */ .ms-libfolders { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); } .lf-note { font-size: var(--fs-caption); color: var(--text2); margin-top: 2px; } .ci-bad { color: var(--error); } .catalog-item .ci-meta > span:has(> .ci-bad) { white-space: normal; display: block; } button.ci-from { font-family: inherit; cursor: pointer; } .lf-row .lf-path { font-family: var(--mono, ui-monospace, monospace); font-size: var(--fs-caption); overflow-wrap: anywhere; } .lf-row { flex-wrap: wrap; } .lf-row .share-row-text { flex: 1 1 14em; min-width: 0; } .lf-count { font-weight: var(--fw-regular); font-size: 12px; color: var(--text2); margin-inline-start: 6px; } .lf-btns { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; } .lf-add { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: 10px; } .lf-add input { flex: 1; min-width: 0; } @media (max-width: 480px) { .lf-add input { flex-basis: 100%; } } .ci-update-btn { font-size: var(--fs-caption); font-weight: var(--fw-strong); padding: 4px 12px; cursor: pointer; color: #fff; background: var(--amber2); border: none; border-radius: 20px; transition: all var(--dur-settle) var(--ease-settle); white-space: nowrap; } .ci-update-btn:hover { background: var(--amber); } .ci-has-update { border-color: var(--amber-border); } /* Collection picker: selected member card + its checkmark badge */ .catalog-item.ci-selected { border-color: var(--amber); background: var(--amber-glow); } .ci-coll-check { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; color: var(--amber); font-weight: 700; font-size: var(--fs-body); } .coll-picker { margin-top: 10px; } .ci-add-btn { padding: 6px 14px; font-size: 12px; font-weight: var(--fw-strong); cursor: pointer; background: var(--surface2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); transition: all var(--dur-settle) var(--ease-settle); /* Centers the inline SVG download arrow with the label text */ display: inline-flex; align-items: center; gap: 5px; justify-content: center; } /* Circular download progress indicator */ .ci-dl-circle { background: none !important; border: none !important; padding: 2px !important; } .ci-dl-ring { position: relative; display: inline-flex; cursor: pointer; } .ci-dl-ring svg { display: block; } .ci-dl-x { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: var(--fw-strong); color: var(--text2); opacity: 0; transition: opacity var(--dur-press) var(--ease-press); } .ci-dl-ring:hover .ci-dl-x { opacity: 1; } .ci-dl-ring:hover svg circle:last-child { opacity: 0.3; } .ci-variants { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: 4px; align-items: center; } .ci-dl-split { display: inline-flex; align-items: stretch; border-radius: var(--radius); overflow: hidden; } .ci-dl-split .ci-dl-main { border-radius: var(--radius) 0 0 var(--radius); border-right: none; } .ci-dl-split .ci-dl-chevron { display: flex; align-items: center; padding: 0 8px; cursor: pointer; background: var(--surface2); border: 1px solid var(--border); border-left: none; border-radius: 0 var(--radius) var(--radius) 0; color: var(--text2); transition: all var(--dur-settle) var(--ease-settle); } .ci-dl-split .ci-dl-chevron:hover { background: var(--amber-glow); color: var(--text); } .ci-variant-btn { padding: 3px 10px; font-size: var(--fs-caption); font-weight: 500; cursor: pointer; background: var(--surface2); color: var(--text2); border: 1px solid var(--border); border-radius: 20px; transition: all var(--dur-settle) var(--ease-settle); white-space: nowrap; } /* Flavor picker pill + popup */ .flavor-pill { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-caption); font-weight: 500; color: var(--text2); background: var(--surface2); border: 1px solid var(--border); border-radius: 20px; padding: 4px 10px; cursor: pointer; transition: all var(--dur-settle) var(--ease-settle); white-space: nowrap; position: relative; min-height: 24px; /* WCAG 2.5.5 touch target */ } .flavor-pill svg { opacity: 0.5; flex-shrink: 0; } .flavor-pill:hover svg { opacity: 0.8; } .flavor-popup { position: fixed; z-index: 1000; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-popup); padding: 12px; min-width: 220px; max-width: 300px; display: flex; flex-direction: column; } .flavor-popup-title { font-size: 12px; font-weight: var(--fw-strong); color: var(--text); margin-bottom: 8px; } .flavor-option { display: flex; align-items: center; gap: var(--sp-2); padding: 8px 10px; border-radius: var(--r-chip); cursor: pointer; transition: all var(--dur-press) var(--ease-press); border: 1px solid transparent; margin-bottom: 2px; } .flavor-option:hover { background: var(--surface2); border-color: var(--border); } .flavor-option.current { background: var(--amber-glow); border-color: var(--amber-border); cursor: default; } .flavor-option-label { flex: 1; font-size: 12px; font-weight: 500; color: var(--text); } .flavor-option-size { font-size: var(--fs-caption); color: var(--text2); white-space: nowrap; } .flavor-option-check { width: 16px; color: var(--amber); font-weight: bold; text-align: center; flex-shrink: 0; } .flavor-popup-backdrop { position: fixed; inset: 0; z-index: 999; } .ci-section-label { padding: 16px 0 8px; } /* The count after a label: quiet, as the apps' .n and the home's pill-count. */ .label-n { color: var(--text3); font-weight: var(--fw-regular); font-variant-numeric: tabular-nums; margin-inline-start: 2px; } /* min-width:0 — a grid item defaults to min-width:auto, so a wide action row used to stretch its column and push the whole page into horizontal scroll. */ .dl-item { padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; font-size: var(--fs-small); } /* Wraps, so a long status moves to its own line instead of crushing the title down to an ellipsis. Seed cards use the same rule (they used to re-declare it). */ .dl-row { display: flex; flex-wrap: wrap; column-gap: 10px; row-gap: 4px; align-items: center; } .dl-item .dl-name { flex: 1 1 150px; min-width: 0; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dl-item .dl-size { color: var(--text2); flex-shrink: 0; } .dl-item .dl-done { color: var(--amber); font-weight: var(--fw-strong); } .dl-item .dl-error { color: var(--error); font-weight: var(--fw-strong); min-width: 0; } .dl-item .dl-scheduled { color: var(--text2); flex-shrink: 0; font-weight: 500; white-space: nowrap; } /* Download-scheduling card */ .ms-dl-window { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 10px; } .ms-dl-window label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); } .ms-dl-window input[type="time"] { background: var(--surface2); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-chip); padding: 4px 6px; font-size: var(--fs-small); } .ms-dl-window input[type="time"]:disabled { opacity: 0.6; } .ms-dl-speed { margin-top: 12px; } .share-field.ms-dl-speed > label { min-width: 9.5rem; } .dl-window-chip { font-size: var(--fs-caption); font-weight: var(--fw-strong); padding: 2px 8px; border-radius: var(--r-full); white-space: nowrap; } .dl-window-chip.dl-window-in { color: var(--amber); background: var(--amber-glow); border: 1px solid var(--amber-border); } .dl-window-chip.dl-window-out { color: var(--text2); background: var(--surface2); border: 1px solid var(--border); } /* Backup & export hub */ .ms-backup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: 10px; } .ms-backup-import { margin-top: 10px; display: flex; flex-direction: column; gap: var(--sp-2); align-items: flex-start; } /* Import preview: a bordered diff summary the admin confirms before anything applies. */ .ms-backup-preview { align-self: stretch; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); display: flex; flex-direction: column; gap: var(--sp-1); } .ms-backup-pv-line { font-size: var(--fs-small); color: var(--text); } .ms-dl-trickle { margin-top: 8px; } .dl-progress { height: 4px; background: var(--surface2); border-radius: 2px; margin-top: 8px; overflow: hidden; } .dl-progress-bar { height: 100%; background: var(--amber); border-radius: 2px; transition: width 0.5s; } /* Two aligned columns: status badges/mirror on the left, buttons on the right, in every row whatever it contains. Both groups wrap internally, so a long label or a five-button cluster reflows inside the card instead of escaping it (the buttons used to overflow by up to 72px at 390px — issue #46). */ .dl-actions { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 6px; margin-top: 8px; min-width: 0; } .dl-meta, .dl-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; } .dl-meta { flex: 1 1 auto; } /* margin-left:auto (not justify-content) so the cluster hugs the right edge whether it shares the line with the chips or wraps onto one of its own — auto margins resolve per flex line, justify-content does not. */ .dl-btns { flex: 0 0 auto; margin-left: auto; } /* Same auto-fit grid pattern as catalog so the two views feel consistent */ .dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px; } .dl-filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px 0; } .dl-filter-pill { display: inline-flex; align-items: center; gap: var(--sp-1); } /* Top-level bulk controls (Pause all / Resume all / Delete all). Shares the download-row button shape; the danger variant flips to the error tone. */ .dl-bulk-bar { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px 0; } .dl-bulk-btn.dl-bulk-danger:hover { border-color: var(--error); color: var(--error); } /* background:none beats .pill.active's amber gradient (same specificity, later in source) — amber label on amber fill was unreadable. */ .dl-filter-pill.active { color: var(--amber); border-color: var(--amber); background: none; font-weight: var(--fw-strong); } .dl-filter-pill.active .pill-count { opacity: 1; background: var(--amber); color: var(--on-amber); padding: 1px 6px; border-radius: 8px; } /* Activity filter pills keep the base .pill treatment (amber fill when active) on purpose: they open DESELECTED like the Library view's category pills, so a lit pill is a filter the user chose — one or two at most. */ .act-pill { flex: none; } /* One shape for EVERY button in the downloads panel — per-row controls, the bulk bar and the clear/show-all buttons alike. They had accreted three different shapes across features; the row buttons also missed font-family:inherit, so they rendered in the UA font (Arial) next to the bulk bar's app font. Fixed height + nowrap is what keeps them equal: a long label ("Switch to direct download") used to wrap to 49px against its 24px neighbours. Variants below may override colour ONLY — never the geometry. */ .dl-pause-btn, .dl-cancel-btn, .dl-retry-btn, .dl-bulk-btn, .dl-clear-btn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; box-sizing: border-box; height: 26px; min-width: 62px; padding: 0 12px; background: none; border: 1px solid var(--border); color: var(--text2); border-radius: var(--r-full); font-family: inherit; font-size: var(--fs-caption); line-height: 1; white-space: nowrap; cursor: pointer; transition: all var(--dur-press) var(--ease-press); } .dl-pause-btn:disabled, .dl-cancel-btn:disabled, .dl-retry-btn:disabled, .dl-bulk-btn:disabled, .dl-clear-btn:disabled { opacity: 0.55; cursor: default; } .dl-pause-btn:not(:disabled):hover, .dl-bulk-btn:hover { border-color: var(--amber); color: var(--amber); } .dl-progress.dl-paused .dl-progress-bar { opacity: 0.5; } /* Total size unknown (BT metadata / finding peers) — sweeping indeterminate bar */ .dl-progress.dl-indeterminate .dl-progress-bar { width: 30%; margin-left: -30%; transition: none; animation: dl-indet 1.3s ease-in-out infinite; } @keyframes dl-indet { to { margin-left: 100%; } } @media (prefers-reduced-motion: reduce) { /* Static centered segment — a full-width bar reads as "almost done" */ .dl-progress.dl-indeterminate .dl-progress-bar { animation: none; width: 34%; margin-left: 33%; opacity: 0.6; } } .dl-cancel-btn:hover { border-color: var(--error); color: var(--error); } .dl-retry-btn:hover { border-color: var(--amber); color: var(--amber); } /* Ellipsises rather than forcing the row wide — mirror hostnames run long. */ .dl-mirror { font-size: var(--fs-caption); color: var(--text2); flex: 1 1 120px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* BT card controls: always rendered (fixed height); dimmed + non-interactive when BT is off so a toggle never adds/removes rows and nothing jumps. A strict two-column grid (label | control) so every textbox lines up in a single column, however wide the label. Each .share-field goes display:contents so its