Spaces:
Running
Running
Download styles.css from finnbusse/handschrift: direct link, hf CLI and curl.
- Browser
- Download file 51.1 kB
-
https://huggingface.co/spaces/finnbusse/handschrift/resolve/main/styles.css
- Command line
-
hf download hf://spaces/finnbusse/handschrift/styles.css
-
curl -L -o styles.css https://huggingface.co/spaces/finnbusse/handschrift/resolve/main/styles.css
51.1 kB
| /* Handschrift – quiet paper and ink. One accent: Königsblau, the colour of | |
| school fountain-pen ink; the writer's own strokes appear in it. */ | |
| @font-face { | |
| font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; | |
| src: url("fonts/instrument-sans-latin-wght.woff2") format("woff2"); | |
| } | |
| :root { | |
| --desk: #F3F5F7; /* page around the sheet: cool, slightly grey paper */ | |
| --sheet: #FFFFFF; /* the writing band */ | |
| --ink: #1C2330; /* text */ | |
| --muted: #5E6775; | |
| --line: #DDE2E8; /* hairlines, borders */ | |
| --accent: #2847C4; /* Königsblau */ | |
| --accent-ink: #FFFFFF; | |
| --accent-soft: #E7ECFA; | |
| /* The writing sheet has its own two schemes ("Farben"), independent of the app theme. | |
| ink.js reads these for the canvas. */ | |
| --paper-light-bg: #FFFFFF; | |
| --paper-light-ink: #2141B8; /* the writer's ink: Königsblau */ | |
| --paper-light-graphite: #2B2E34; /* Bleistift */ | |
| --paper-light-rule: #9DB0CB; /* the faint blue baseline */ | |
| --paper-light-faint: #DFE5EE; /* ruled / squared lines, fainter still */ | |
| --paper-light-muted: #5E6775; | |
| --paper-dark-bg: #1B1F26; | |
| --paper-dark-ink: #C9D4FF; | |
| --paper-dark-graphite: #E9ECF1; | |
| --paper-dark-rule: #52637F; | |
| --paper-dark-faint: #2F3746; | |
| --paper-dark-muted: #9AA3B1; | |
| --shadow: 0 1px 2px rgba(28, 35, 48, .06), 0 8px 28px rgba(28, 35, 48, .06); | |
| --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif; | |
| --tap: 52px; | |
| --gutter: max(16px, min(5vw, 80px)); | |
| color-scheme: light; | |
| } | |
| @media (prefers-color-scheme: dark) { | |
| :root { | |
| --desk: #14171C; | |
| --sheet: #1D2128; | |
| --ink: #E6E9EE; | |
| --muted: #9AA3B1; | |
| --line: #2D333D; | |
| --accent: #8EA4FF; | |
| --accent-ink: #0F1424; | |
| --accent-soft: #232B44; | |
| --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25); | |
| color-scheme: dark; | |
| } | |
| } | |
| *, *::before, *::after { box-sizing: border-box; } | |
| html, body { height: 100%; } | |
| html { overscroll-behavior: none; -webkit-text-size-adjust: 100%; } | |
| body { | |
| margin: 0; background: var(--desk); color: var(--ink); | |
| font: 400 17px/1.5 var(--font); | |
| overscroll-behavior: none; | |
| -webkit-tap-highlight-color: transparent; | |
| display: flex; flex-direction: column; min-height: 100dvh; | |
| } | |
| body[data-route="erfassen"] { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overflow: hidden; height: 100dvh; } | |
| [hidden] { display: none ; } | |
| h1, h2 { font-weight: 600; letter-spacing: -0.01em; margin: 0; } | |
| p { margin: 0; } | |
| a { color: var(--accent); } | |
| .muted { color: var(--muted); } | |
| .ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } | |
| .ic.big { width: 44px; height: 44px; stroke-width: 1.4; color: var(--accent); } | |
| /* ---------- buttons ---------- */ | |
| .btn { | |
| appearance: none; font: inherit; font-weight: 500; color: var(--ink); | |
| min-height: var(--tap); min-width: var(--tap); padding: 0 20px; | |
| display: inline-flex; align-items: center; justify-content: center; gap: 10px; | |
| background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; | |
| cursor: pointer; text-decoration: none; touch-action: manipulation; | |
| transition: background-color .12s, border-color .12s, transform .08s; | |
| } | |
| .btn:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); } | |
| .btn:active { transform: scale(.98); } | |
| .btn:disabled { opacity: .4; cursor: default; transform: none; } | |
| .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; padding: 0 28px; } | |
| .btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); } | |
| .btn.quiet { background: transparent; border-color: transparent; color: var(--accent); } | |
| .btn.tool { background: transparent; border-color: transparent; color: var(--muted); padding: 0 14px; } | |
| .btn.tool:not(:disabled):hover { color: var(--ink); background: color-mix(in srgb, var(--sheet) 60%, transparent); } | |
| :focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; } | |
| /* ---------- top bar ---------- */ | |
| .bar { | |
| display: flex; align-items: center; gap: 12px; | |
| padding: max(8px, env(safe-area-inset-top)) var(--gutter) 8px; | |
| min-height: 64px; | |
| } | |
| body[data-route="start"] .bar { display: none; } | |
| .tabs { display: flex; gap: 4px; } | |
| .tabs a { | |
| display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 12px; | |
| color: var(--muted); text-decoration: none; font-weight: 500; | |
| } | |
| .tabs a[aria-current="page"] { color: var(--ink); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line); } | |
| /* While a line is being written the tabs step back, so a stray tap cannot leave the line. */ | |
| body[data-inline] .tabs { opacity: .35; pointer-events: none; } | |
| .bar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; } | |
| .iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; color: var(--muted); } | |
| .iconbtn[aria-current="page"] { color: var(--ink); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line); } | |
| .waiting { | |
| display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: 12px; | |
| color: var(--muted); text-decoration: none; font-size: 15px; | |
| } | |
| .waiting .ic { width: 20px; height: 20px; } | |
| .waiting { white-space: nowrap; } | |
| .waiting.empty { visibility: hidden; } /* keeps its place: the bar never shifts */ | |
| .waiting.problem { color: var(--accent); font-weight: 500; } | |
| .w-short { display: none; } | |
| @media (max-width: 700px) { | |
| .w-long { display: none; } .w-short { display: inline; } .tabs a { padding: 0 12px; } | |
| .waiting { width: 8.2em; justify-content: flex-end; padding: 0 8px; } | |
| } | |
| @media (max-width: 440px) { .bar { gap: 4px; } } /* the bar must not be wider than a 412 px phone */ | |
| .framed-note { margin: 0 var(--gutter) 12px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 15px; } | |
| main { flex: 1; display: flex; flex-direction: column; min-height: 0; } | |
| .view { flex: 1; display: flex; flex-direction: column; min-height: 0; } | |
| /* ---------- first run ---------- */ | |
| .view-start { justify-content: center; padding: 48px var(--gutter); } | |
| .start-inner { max-width: 760px; margin: 0 auto; width: 100%; } | |
| .start-title { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.12; font-weight: 600; max-width: 18ch; } | |
| .lead { margin-top: 16px; font-size: 19px; color: var(--muted); max-width: 46ch; } | |
| .steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 28px; } | |
| .steps li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: start; } | |
| .steps strong { display: block; font-weight: 600; font-size: 19px; } | |
| .steps span:not(.step-n) { color: var(--muted); } | |
| .step-n { | |
| width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; | |
| border: 1.5px solid var(--accent); color: var(--accent); font-weight: 600; font-size: 19px; | |
| } | |
| .start-actions { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; } | |
| .start-actions .btn.primary { min-width: 200px; } | |
| .who { margin-top: 36px; max-width: 420px; } | |
| .who .field span { font-size: 19px; font-weight: 600; color: var(--ink); } | |
| .who .err { margin-top: 10px ; } | |
| .fine { margin-top: 14px; font-size: 15px; color: var(--muted); max-width: 52ch; } | |
| /* ---------- capture ---------- */ | |
| .view-capture { padding: 0 var(--gutter) max(16px, env(safe-area-inset-bottom)); } | |
| .cap { flex: 1; display: flex; flex-direction: column; min-height: 0; } | |
| .cap > * { display: none; } | |
| .cap[data-state="write"] > .cap-write, | |
| .cap[data-state="confirm"] > .cap-confirm, | |
| .cap[data-state="pause"] > .cap-pause, | |
| .cap[data-state="block"] > .cap-block, | |
| .cap[data-state="resting"] > .cap-resting, | |
| .cap[data-state="all"] > .cap-all, | |
| .cap[data-state="loading"] > .cap-loading, | |
| .cap[data-state="nocaps"] > .cap-nocaps { display: flex; } | |
| .cap-write { flex: 1; flex-direction: column; min-height: 0; } | |
| .cap-head { padding: 4px 0 0; } | |
| .progress { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; } | |
| .progress .who-now { font-weight: 600; } | |
| .progress .who-now:not(:empty)::after { content: "·"; margin-left: 8px; font-weight: 400; } | |
| .progress .total { opacity: .8; margin-left: 10px; } | |
| .pbar { height: 3px; margin-top: 6px; border-radius: 2px; background: var(--line); overflow: hidden; max-width: 320px; } | |
| .pbar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .3s; } | |
| .prompt { | |
| margin-top: 10px; font-size: clamp(24px, 3.1vw, 34px); line-height: 1.25; font-weight: 450; | |
| letter-spacing: -0.005em; color: var(--ink); overflow-wrap: anywhere; | |
| } | |
| .cap-tools { display: flex; align-items: center; gap: 4px; margin: 14px 0 12px; } | |
| .cap-tools .spacer { flex: 1; } | |
| .cap-tools .sep { width: 1px; height: 28px; background: var(--line); margin: 0 14px; flex: none; } | |
| .cap-tools .btn.primary { min-width: 156px; } | |
| /* Undo / redo / eraser (SPEC 2.3). The eraser bar takes the same row at the same height. */ | |
| :root { --paper-light-erase: #C8102E; --paper-dark-erase: #FF7A7A; --danger: #B4232F; --danger-ink: #FFFFFF; } | |
| @media (prefers-color-scheme: dark) { :root { --danger: #FF8A8A; --danger-ink: #2A0B0E; } } | |
| .cap-tools { height: var(--tap); } /* fixed: a taller row would move the sheet and pause the line */ | |
| .cap-tools > .btn { height: var(--tap); white-space: nowrap; flex: none; } | |
| /* The row must fit in one line (view.js fitTools measures it and adds fit1..fit7 step by step): | |
| tighter spacing first, then labels go where they are least needed, then three buttons move | |
| behind "Mehr", then Fertig gets compact. */ | |
| .cap.fit1 .cap-tools .btn.tool:not(.erase-only) { padding: 0 10px; gap: 6px; } | |
| .cap.fit1 .cap-tools .sep { margin: 0 8px; } | |
| .cap.fit2 .cap-tools #cap-look span, .cap.fit2 .cap-tools #cap-fs span, | |
| .cap.fit3 .cap-tools #cap-skip span, .cap.fit3 .cap-tools #cap-clear span, | |
| .cap.fit4 .cap-tools .btn.tool:not(.erase-only) span { display: none; } | |
| .cap.fit2 .cap-tools #cap-look, .cap.fit2 .cap-tools #cap-fs, | |
| .cap.fit3 .cap-tools #cap-skip, .cap.fit3 .cap-tools #cap-clear, | |
| .cap.fit4 .cap-tools .btn.tool:not(.erase-only) { min-width: 48px; padding: 0 13px; } /* 48 wide, 52 high */ | |
| .cap.fit4 .cap-tools { gap: 0; } | |
| .cap.fit4 .cap-tools .sep { margin: 0 6px; } | |
| .cap.fit6 .cap-tools .sep { display: none; } | |
| .cap.fit6 .cap-tools .btn.primary { min-width: 0; padding: 0 18px; } | |
| .cap.fit7 .cap-tools #cap-done span { display: none; } | |
| .cap.fit7 .cap-tools #cap-done { padding: 0; min-width: var(--tap); } | |
| .cap-write { position: relative; } | |
| .cap-menu { position: absolute; right: 0; z-index: 5; display: grid; gap: 2px; padding: 6px; min-width: 240px; | |
| background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); } | |
| .cap-menu[hidden] { display: none; } | |
| .cap-menu .btn { justify-content: flex-start; width: 100%; height: var(--tap); white-space: nowrap; } | |
| .cap-menu .btn.tool { color: var(--ink); } | |
| .cap-tools #cap-more[aria-expanded="true"] { color: var(--ink); background: var(--sheet); } | |
| .erase-status.nudge { animation: nudge .32s ease-in-out; } | |
| @keyframes nudge { 20% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 80% { transform: translateX(-2px); } } | |
| @media (prefers-reduced-motion: reduce) { .erase-status.nudge { animation: none; } } | |
| @media (orientation: portrait) and (max-width: 700px) { | |
| .cap[data-mode="erase"] .cap-tools #erase-cancel span { display: none; } | |
| .cap-tools .erase-status { font-size: 13px; padding: 0 6px; } | |
| } | |
| .cap-tools .btn.tool.icon { padding: 0; min-width: var(--tap); } | |
| .cap-tools > .erase-only { display: none; } | |
| .cap[data-mode="erase"] .cap-tools > :not(.erase-only) { display: none; } | |
| .cap[data-mode="erase"] .cap-tools > .erase-only { display: inline-flex; } | |
| .cap[data-mode="erase"] .cap-tools .erase-only span { display: inline; } | |
| .erase-status { flex: 1; min-width: 0; align-items: center; justify-content: center; text-align: center; padding: 0 12px; | |
| font-size: 15px; line-height: 1.3; color: var(--ink); max-height: var(--tap); overflow: hidden; } | |
| .btn.danger { background: var(--danger); color: var(--danger-ink); } | |
| .btn.danger:hover { background: color-mix(in srgb, var(--danger) 88%, var(--ink)); } | |
| .cap[data-mode="erase"] .sheet canvas { cursor: pointer; } | |
| .cap[data-quiet] .cap-tools .btn:active, .cap[data-quiet] .cap-menu .btn:active { transform: none; } | |
| .sheet { | |
| position: relative; flex: 1; min-height: 200px; max-height: 420px; | |
| background: var(--paper-light-bg); border-radius: 18px; box-shadow: var(--shadow); | |
| overflow: hidden; touch-action: none; | |
| --sheet-muted: var(--paper-light-muted); | |
| } | |
| .sheet[data-scheme="light_on_dark"], .look-preview[data-scheme="light_on_dark"] { background: var(--paper-dark-bg); --sheet-muted: var(--paper-dark-muted); } | |
| .sheet canvas { position: absolute; inset: 0; display: block; touch-action: none; cursor: crosshair; } | |
| .sheet-hint { | |
| position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; pointer-events: none; | |
| color: var(--sheet-muted); font-size: 15px; | |
| } | |
| .turn-hint { display: none; margin-top: 12px; font-size: 15px; color: var(--muted); text-align: center; } | |
| @media (orientation: portrait) and (max-width: 700px) { | |
| .turn-hint { display: block; } | |
| .sheet { max-height: 300px; } | |
| } | |
| /* ---------- Stift & Papier ---------- */ | |
| .dlg.look-dlg { width: min(1040px, calc(100vw - 32px)); max-height: calc(100dvh - 24px); padding: 20px 24px 24px; overflow-y: auto; } | |
| .look-dlg::backdrop { background: rgba(20, 23, 28, .18); } | |
| .look-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; } | |
| .look-head h2 { margin: 0; } | |
| .look-dlg .look-note { margin: 4px 0 14px; font-size: 15px; } | |
| .look-preview { border-radius: 12px; background: var(--paper-light-bg); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; } | |
| .look-preview canvas { display: block; } | |
| .look-groups { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 28px; margin-top: 16px; } | |
| .look-label { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 6px; } | |
| .segs { display: flex; gap: 6px; } | |
| .seg { | |
| appearance: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); | |
| min-height: 52px; min-width: 52px; padding: 0 12px; flex: 1 1 auto; | |
| display: inline-flex; align-items: center; justify-content: center; gap: 8px; | |
| background: var(--sheet); border: 1.5px solid var(--line); border-radius: 12px; | |
| cursor: pointer; touch-action: manipulation; white-space: nowrap; | |
| } | |
| .seg[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; } | |
| .look-width .seg { flex-direction: column; gap: 6px; padding: 8px 6px; font-size: 13px; min-height: 60px; } | |
| .wline { display: block; width: 34px; min-height: 0.5px; border-radius: 2px; background: var(--ink); } | |
| .swatch { width: 26px; height: 20px; flex: none; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line); background: var(--paper-light-bg); } | |
| .sw-linie { background: linear-gradient(to bottom, transparent 13px, var(--paper-light-rule) 13px, var(--paper-light-rule) 14px, transparent 14px), var(--paper-light-bg); } | |
| .sw-liniert { background: repeating-linear-gradient(to bottom, transparent 0 5px, var(--paper-light-rule) 5px 6px), var(--paper-light-bg); } | |
| .sw-kariert { background: repeating-linear-gradient(to bottom, transparent 0 5px, var(--paper-light-rule) 5px 6px), repeating-linear-gradient(to right, transparent 0 5px, var(--paper-light-rule) 5px 6px), var(--paper-light-bg); } | |
| .sw-dark_on_light { background: linear-gradient(135deg, var(--paper-light-bg) 50%, var(--paper-light-ink) 50%); } | |
| .sw-light_on_dark { background: linear-gradient(135deg, var(--paper-dark-bg) 50%, var(--paper-dark-ink) 50%); } | |
| #g-look-box .look { margin-top: 14px; } | |
| #look-for { font-size: 15px; color: var(--muted); } | |
| @media (max-width: 700px) { | |
| .look-groups { grid-template-columns: 1fr; } | |
| .dlg.look-dlg { padding: 16px; } | |
| .segs { flex-wrap: wrap; } | |
| } | |
| .cap-panel { flex: 1; flex-direction: column; justify-content: center; max-width: 1100px; width: 100%; margin: 0 auto; padding: 16px 0 24px; gap: 16px; } | |
| .cap-panel h2 { font-size: clamp(24px, 3vw, 32px); } | |
| .cap-panel > p { color: var(--muted); font-size: 18px; max-width: 52ch; } | |
| .cap-panel .actions { margin-top: 12px; } | |
| .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; } | |
| .cap-panel .actions { justify-content: flex-start; } | |
| .cap-confirm { justify-content: center; } | |
| .compare { display: grid; grid-template-columns: 112px 1fr; gap: 14px 20px; align-items: start; margin-top: 8px; } | |
| .compare-label { color: var(--muted); font-size: 15px; padding-top: 6px; } | |
| .compare-text { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.3; } | |
| .compare-ink { min-width: 0; } | |
| .compare-ink canvas { display: block; border-radius: 12px; box-shadow: var(--shadow); max-width: 100%; } | |
| .qa { list-style: none; margin: 4px 0 0; padding: 12px 16px; display: grid; gap: 8px; border-radius: 12px; | |
| background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); } | |
| .qa li { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; color: var(--ink); font-weight: 500; } | |
| .qa li .ic { color: var(--accent); margin-top: 1px; } | |
| .cap-confirm .actions { margin-top: 20px; justify-content: flex-end; } | |
| .cap-confirm .actions .btn { min-width: 168px; } | |
| /* With a warning, "Nochmal" takes the spot where "Ja, weiter" usually is: a habitual tap repeats the line. */ | |
| .cap.has-flags #confirm-redo { background: var(--accent); color: var(--accent-ink); border-color: transparent; order: 2; } | |
| .cap.has-flags #confirm-ok { background: var(--sheet); color: var(--ink); border-color: var(--line); order: 1; } | |
| .dots { display: flex; gap: 10px; flex-wrap: wrap; } | |
| .dots .dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--accent); } | |
| .dots .dot.full { background: var(--accent); } | |
| .dots .dot.extra { border-style: dashed; border-color: var(--muted); } | |
| .dots .dot.extra.full { background: var(--muted); border-style: solid; } | |
| @media (max-width: 700px) { | |
| .compare { grid-template-columns: 1fr; gap: 6px; } | |
| .compare-ink { margin-bottom: 6px; } | |
| .cap-confirm .actions .btn { flex: 1 1 100%; min-width: 0; white-space: nowrap; } | |
| } | |
| /* ---------- generate placeholder ---------- */ | |
| .view-generate { justify-content: center; padding: 24px var(--gutter) 48px; } | |
| .placeholder { max-width: 560px; margin: 0 auto; display: grid; gap: 14px; justify-items: start; } | |
| .placeholder h1 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; } | |
| .placeholder p { font-size: 18px; color: var(--muted); } | |
| .placeholder p:first-of-type { color: var(--ink); } | |
| .placeholder .btn { margin-top: 12px; } | |
| /* ---------- settings ---------- */ | |
| .view-settings { padding: 8px var(--gutter) 48px; overflow-y: auto; } | |
| .settings { max-width: 760px; width: 100%; margin: 0 auto; } | |
| .settings h1 { font-size: 30px; margin: 8px 0 20px; } | |
| .group { padding: 22px 0; border-top: 1px solid var(--line); } | |
| .group h2 { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 12px; } | |
| .row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; justify-content: space-between; } | |
| .row > p { flex: 1 1 320px; } | |
| .row-actions { display: flex; flex-wrap: wrap; gap: 10px; } | |
| .kv { display: grid; grid-template-columns: minmax(150px, max-content) 1fr; gap: 6px 20px; margin: 16px 0 0; font-size: 15px; } | |
| .kv dt { color: var(--muted); } | |
| .kv dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; } | |
| .diag { margin-top: 12px; } | |
| /* "Is it safe?" in Einstellungen, and the safe state of the top-bar indicator */ | |
| .safe, .waiting { --safe-ok: #1E7A4C; } | |
| @media (prefers-color-scheme: dark) { .safe, .waiting { --safe-ok: #74D19F; } } | |
| .safe { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: var(--sheet); border: 1px solid var(--line); } | |
| .safe .safe-ic { width: 28px; height: 28px; flex: none; color: var(--muted); } | |
| .safe[data-level="ok"] .safe-ic { color: var(--safe-ok); } | |
| .safe[data-level="help"] .safe-ic { color: var(--accent); } | |
| .safe-body { display: grid; gap: 4px; min-width: 0; } | |
| .safe-main { font-size: 19px; font-weight: 600; } | |
| .safe-help { margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); } | |
| .safe-actions { margin-top: 14px; } | |
| .waiting.safe { color: var(--safe-ok); } | |
| .switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--tap); cursor: pointer; } | |
| .switch-row > span { display: grid; gap: 2px; } | |
| .switch-row strong { font-weight: 500; } | |
| .switch-row .muted { font-size: 15px; } | |
| input[role="switch"] { | |
| appearance: none; flex: none; width: 56px; height: 32px; border-radius: 16px; margin: 0; | |
| background: var(--line); position: relative; cursor: pointer; transition: background-color .15s; | |
| } | |
| input[role="switch"]::after { | |
| content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; | |
| background: var(--sheet); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; | |
| } | |
| input[role="switch"]:checked { background: var(--accent); } | |
| input[role="switch"]:checked::after { transform: translateX(24px); } | |
| @media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 8px; } } | |
| .choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; } | |
| .choice { | |
| appearance: none; font: inherit; font-size: 20px; font-weight: 500; color: var(--ink); text-align: left; | |
| min-height: 64px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; | |
| background: var(--sheet); border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; touch-action: manipulation; | |
| } | |
| .choice span { overflow-wrap: anywhere; } | |
| .choice[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; } | |
| .choice .ic { color: var(--accent); } | |
| .wr-actions { margin-top: 14px; } | |
| .wr-form { margin-top: 16px; max-width: 420px; } | |
| /* ---------- dialogs ---------- */ | |
| .dlg { | |
| border: none; border-radius: 20px; padding: 28px; width: min(560px, calc(100vw - 32px)); | |
| background: var(--sheet); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); | |
| } | |
| .dlg::backdrop { background: rgba(20, 23, 28, .35); } | |
| .dlg h2 { font-size: 24px; margin-bottom: 12px; } | |
| .dlg p { color: var(--muted); margin-bottom: 16px; } | |
| .dlg .actions { margin-top: 20px; } | |
| .field { display: grid; gap: 6px; } | |
| .field span { font-size: 15px; color: var(--muted); } | |
| .field input { | |
| font: inherit; min-height: var(--tap); padding: 0 14px; border-radius: 12px; | |
| border: 1px solid var(--line); background: var(--desk); color: var(--ink); | |
| } | |
| .err { color: var(--ink) ; margin: 12px 0 0 ; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); } | |
| /* ---------- toast ---------- */ | |
| .toast { | |
| position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); | |
| width: max-content; text-align: center; | |
| background: var(--ink); color: var(--desk); padding: 12px 20px; border-radius: 14px; font-size: 16px; | |
| max-width: calc(100vw - 32px); box-shadow: 0 8px 30px rgba(0,0,0,.2); z-index: 10; pointer-events: none; | |
| } | |
| @media (prefers-reduced-motion: reduce) { * { transition: none ; } } | |
| .up-where, #up-rejected { margin-top: 14px; font-size: 15px; } | |
| /* ---------- Schreiben ---------- | |
| Two things on the screen: the sheet, and below it the line where the text is | |
| typed. The sheet is paper (sharp corners, the colours of the capture sheet, | |
| whatever the app theme); everything that is a tool is rounded and stays quiet. */ | |
| :root { --gen-paper-edge: rgba(28, 35, 48, .09); --gen-column: 880px; } | |
| @media (prefers-color-scheme: dark) { :root { --gen-paper-edge: transparent; } } | |
| .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } | |
| body[data-route="schreiben"] { height: 100dvh; overflow: hidden; } | |
| .view-write { padding: 0 var(--gutter) max(14px, env(safe-area-inset-bottom)); overflow: hidden; } | |
| .gen { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; max-width: var(--gen-column); margin: 0 auto; } | |
| .gen-stage { | |
| flex: 1; min-height: 0; display: flex; flex-direction: column; | |
| overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; | |
| margin: 0 -12px; padding: 4px 12px 18px; /* room for the sheet's shadow */ | |
| } | |
| .gen-paper { | |
| /* what sits on the sheet follows the sheet's scheme ("Farben"), not the app theme */ | |
| --gen-paper: var(--paper-light-bg); --gen-hint: #8B93A0; | |
| --ink: #1C2330; --muted: #5E6775; --line: #DDE2E8; --sheet: #FFFFFF; | |
| --accent: #2847C4; --accent-ink: #FFFFFF; --accent-soft: #E7ECFA; | |
| color-scheme: light; color: var(--ink); | |
| position: relative; flex: 1 0 auto; min-height: 180px; | |
| background: var(--gen-paper); border-radius: 3px; | |
| box-shadow: 0 0 0 1px var(--gen-paper-edge), 0 1px 2px rgba(20, 26, 38, .06), 0 14px 30px -14px rgba(20, 26, 38, .22); | |
| } | |
| .gen-paper[data-scheme="light_on_dark"] { | |
| --gen-paper: var(--paper-dark-bg); --gen-hint: var(--paper-dark-muted); | |
| --ink: #E6E9EE; --muted: var(--paper-dark-muted); --line: #343B47; --sheet: #232832; | |
| --accent: #8EA4FF; --accent-ink: #0F1424; --accent-soft: #2A3352; | |
| color-scheme: dark; | |
| box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 1px 2px rgba(20, 26, 38, .08), 0 14px 30px -14px rgba(20, 26, 38, .3); | |
| } | |
| /* The paper's bitmap can be taller than the sheet (it grows in steps, view.js: GROW): shown | |
| at the sheet's width from its top, the rest cut off. */ | |
| .gen-paper canvas { display: block; width: 100%; object-fit: cover; object-position: top; } | |
| /* the ink, over the paper's lines: strips stacked from the top, the last one cut off */ | |
| .gen-paper #gen-canvas { position: relative; overflow: hidden; } | |
| .gen-paper #gen-canvas canvas { position: absolute; left: 0; } | |
| .gen-paper .gen-lines { position: absolute; left: 0; top: 0; border-radius: inherit; } | |
| .gen-empty { | |
| position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; | |
| color: var(--gen-hint); pointer-events: none; | |
| } | |
| .gen-state { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; background: var(--gen-paper); border-radius: inherit; } | |
| .gen-state-in { display: grid; justify-items: center; gap: 16px; max-width: 420px; text-align: center; } | |
| .gen-state-in .pbar { width: 200px; max-width: 100%; margin: 0; } | |
| .gen-state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; } | |
| .gen-state-actions:not(:has(> :not([hidden]))) { display: none; } | |
| .gen-dock { flex: none; display: grid; gap: 4px; } | |
| .gen-row { display: flex; align-items: center; flex-wrap: wrap; column-gap: 12px; min-height: 48px; } | |
| .gen-status { flex: 1 1 180px; min-width: 0; padding-left: 4px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; } | |
| .gen-busy, .gen-info { display: flex; align-items: center; gap: 10px; min-width: 0; } | |
| .gen-info .pbar { flex: none; width: 72px; margin: 0; } | |
| .gen-busy { color: var(--ink); } | |
| .pen-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pen-pulse 1.2s ease-in-out infinite; } | |
| @keyframes pen-pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } } | |
| @media (prefers-reduced-motion: reduce) { .pen-dot { animation: none; } } | |
| /* tools: words with a small icon; the touch area is 48 px, what shows is lighter */ | |
| .gen-tools { display: flex; margin: 0 -10px 0 auto; } | |
| .gen-tool { | |
| appearance: none; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--muted); | |
| position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 7px; | |
| min-width: 48px; height: 48px; padding: 0 12px; cursor: pointer; touch-action: manipulation; white-space: nowrap; | |
| } | |
| .gen-tool .ic { width: 18px; height: 18px; stroke-width: 1.7; } | |
| .gen-tool::before { content: ""; position: absolute; inset: 6px 0; border-radius: 10px; z-index: -1; } | |
| .gen-tool:not(:disabled):hover, .gen-tool[aria-expanded="true"] { color: var(--ink); } | |
| .gen-tool:not(:disabled):hover::before { background: color-mix(in srgb, var(--ink) 6%, transparent); } | |
| .gen-tool[aria-expanded="true"]::before { background: color-mix(in srgb, var(--ink) 9%, transparent); } | |
| .gen-tool:disabled { opacity: .38; cursor: default; } | |
| .gen-tool:focus-visible { outline: 0; } | |
| .gen-tool:focus-visible::before { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); } | |
| .gen-menu-wrap { position: relative; } | |
| .gen-menu { | |
| position: absolute; right: 10px; bottom: calc(100% - 2px); z-index: 5; min-width: 190px; display: grid; padding: 6px; | |
| background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(20, 26, 38, .18); | |
| } | |
| .gen-menu button { | |
| appearance: none; border: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); text-align: left; | |
| height: 48px; padding: 0 14px; border-radius: 9px; cursor: pointer; touch-action: manipulation; | |
| } | |
| .gen-menu button:not(:disabled):hover, .gen-menu button:focus-visible { background: var(--accent-soft); outline: 0; } | |
| .gen-menu button:disabled { opacity: .4; cursor: default; } | |
| /* Stil: opens in place, above the text line, so the sheet stays in view while it changes. | |
| Labels on the left, plain words to choose from; the choice in use is marked as quietly | |
| as an open tool. Two columns where there is room: the pen on the left, the sheet on the right. */ | |
| .gen-style { | |
| --gen-label: 104px; | |
| max-height: min(46dvh, 420px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; | |
| padding: 2px 4px 6px; | |
| } | |
| .gen-style-main, .gen-style-more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; } | |
| .gen-style-main { grid-template-rows: repeat(3, auto); grid-auto-flow: column; } | |
| .gen-style-more { margin-top: 6px; } | |
| .gen-opt { display: grid; grid-template-columns: var(--gen-label) minmax(0, 1fr); align-items: center; min-height: 48px; min-width: 0; } | |
| .gen-opt[hidden] { display: none; } | |
| .gen-opt-l { font-size: 14px; color: var(--muted); } | |
| .gen-choices { display: flex; flex-wrap: wrap; margin-left: -10px; } | |
| .gen-choice { | |
| appearance: none; border: 0; background: none; font: inherit; font-size: 15px; color: var(--muted); | |
| position: relative; isolation: isolate; display: inline-grid; place-items: center; | |
| min-width: 48px; height: 48px; padding: 0 10px; cursor: pointer; touch-action: manipulation; white-space: nowrap; | |
| } | |
| .gen-choice::before { content: ""; position: absolute; inset: 8px 0; border-radius: 9px; z-index: -1; } | |
| .gen-choice[aria-checked="true"] { color: var(--ink); } | |
| @media (hover: hover) { .gen-choice:hover { color: var(--ink); } .gen-choice:hover:not([aria-checked="true"])::before { background: color-mix(in srgb, var(--ink) 5%, transparent); } } | |
| .gen-choice[aria-checked="true"]::before { background: color-mix(in srgb, var(--ink) 9%, transparent); } | |
| .gen-choice:focus-visible { outline: 0; } | |
| .gen-choice:focus-visible::before { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); } | |
| .gen-w { padding: 0; } | |
| .gen-w i { display: block; width: 22px; border-radius: 2px; background: currentColor; } | |
| .gen-more-btn { | |
| appearance: none; border: 0; background: none; font: inherit; font-size: 14px; color: var(--muted); | |
| grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 8px; | |
| height: 48px; padding: 0 10px; margin-left: -10px; cursor: pointer; touch-action: manipulation; border-radius: 9px; | |
| } | |
| .gen-more-btn i { width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s; } | |
| .gen-more-btn[aria-expanded="true"] i { transform: translateY(1px) rotate(-135deg); } | |
| .gen-more-btn:hover, .gen-more-btn[aria-expanded="true"] { color: var(--ink); } | |
| .gen-more-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: -6px; } | |
| .gen-opt input[type="range"] { appearance: none; width: 100%; min-width: 48px; height: 48px; margin: 0; background: transparent; cursor: pointer; } | |
| .gen-opt input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: var(--line); } | |
| .gen-opt input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: var(--line); } | |
| .gen-opt input[type="range"]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; margin-top: -7.5px; border-radius: 50%; background: var(--ink); border: 0; } | |
| .gen-opt input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 0; } | |
| .gen-opt input[type="range"]:disabled { opacity: .4; cursor: default; } | |
| .gen-opt input[type="range"]:focus-visible { outline: 0; } | |
| .gen-opt input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); } | |
| .gen-inks { display: flex; margin-left: -14px; } | |
| .gen-ink { appearance: none; border: 0; background: none; padding: 0; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; touch-action: manipulation; border-radius: 12px; } | |
| .gen-ink i { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); } | |
| .gen-ink[aria-checked="true"] i { box-shadow: 0 0 0 2.5px var(--desk), 0 0 0 4.5px var(--ink); } | |
| .gen-ink:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: -4px; } | |
| /* "Modell": which trained version writes (a native list, quiet like the rest of the bar) */ | |
| .gen-opt-model { grid-column: 1 / -1; } | |
| .gen-select { | |
| appearance: none; font: inherit; font-size: 15px; color: var(--ink); background-color: transparent; | |
| justify-self: start; width: auto; min-width: 48px; max-width: calc(100% + 12px); height: 48px; padding: 0 34px 0 12px; margin-left: -12px; border: 0; border-radius: 9px; | |
| text-overflow: ellipsis; white-space: nowrap; overflow: hidden; cursor: pointer; touch-action: manipulation; | |
| background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a93a0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); | |
| background-repeat: no-repeat; background-position: right 12px center; | |
| } | |
| .gen-select:hover { background-color: color-mix(in srgb, var(--ink) 5%, transparent); } | |
| .gen-select:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: -4px; } | |
| .gen-select option { color: var(--ink); background: var(--sheet); } | |
| @media (max-width: 760px) { | |
| .gen-style { --gen-label: 100px; max-height: min(38dvh, 340px); } | |
| .gen-style-main, .gen-style-more { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; } | |
| } | |
| /* the text line */ | |
| .gen-composer { | |
| display: flex; align-items: flex-end; gap: 8px; padding: 7px 7px 7px 20px; | |
| background: var(--sheet); border: 1px solid var(--line); border-radius: 19px; | |
| transition: border-color .15s, box-shadow .15s; | |
| } | |
| .gen-composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } | |
| #gen-text { | |
| flex: 1; min-width: 0; font: inherit; font-size: 18px; line-height: 26px; color: var(--ink); | |
| background: none; border: 0; outline: 0; resize: none; padding: 11px 0; margin: 0; | |
| max-height: min(34vh, 240px); overflow-y: auto; scrollbar-width: thin; | |
| } | |
| #gen-text::placeholder { color: var(--muted); } | |
| .gen-go { | |
| appearance: none; border: 0; flex: none; font: inherit; font-size: 16px; font-weight: 600; | |
| display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 22px; border-radius: 12px; | |
| background: var(--accent); color: var(--accent-ink); cursor: pointer; touch-action: manipulation; | |
| } | |
| .gen-go:disabled { opacity: .45; cursor: default; } | |
| .gen-go.stop { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); padding: 0 18px; } | |
| .gen-go.stop i { width: 10px; height: 10px; border-radius: 2px; background: currentColor; } | |
| .gen-note { font-size: 14px; color: var(--muted); padding: 4px 4px 0; } | |
| #gen-note { color: var(--ink); } | |
| /* ---------- Schreiben: Zettel / Seite ---------- | |
| One switch above the sheet. Seite shows A4 pages fitted to the column, one under | |
| the other, each the paper of its own scheme; the dock below is the same as Zettel's. */ | |
| .gen[data-mode="seite"] [data-only="zettel"], .gen[data-mode="zettel"] [data-only="seite"] { display: none ; } | |
| .gen-modes { flex: none; display: flex; margin: 0 0 2px -10px; } | |
| .gen-modes .gen-choice { font-weight: 500; } | |
| .pg-stage { | |
| flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; | |
| margin: 0 -12px; padding: 4px 12px 18px; | |
| } | |
| .pg-pages { position: relative; display: grid; gap: 20px; --pg-hint: #8B93A0; } | |
| .pg-pages[data-scheme="light_on_dark"] { --pg-hint: var(--paper-dark-muted); } | |
| .pg-page { | |
| position: relative; aspect-ratio: 210 / 297; background: var(--paper-light-bg); border-radius: 3px; | |
| box-shadow: 0 0 0 1px var(--gen-paper-edge), 0 1px 2px rgba(20, 26, 38, .06), 0 14px 30px -14px rgba(20, 26, 38, .22); | |
| touch-action: pan-y; cursor: pointer; | |
| } | |
| .pg-pages[data-scheme="light_on_dark"] .pg-page { background: var(--paper-dark-bg); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 14px 30px -14px rgba(20, 26, 38, .3); } | |
| .pg-page canvas { display: block; width: 100%; height: 100%; border-radius: inherit; } | |
| /* The piece picked for rewriting, laid over the page: blended so that the ink stays on top. */ | |
| .pg-mark { position: absolute; pointer-events: none; background: #DCE3F7; mix-blend-mode: darken; } | |
| .pg-pages[data-scheme="light_on_dark"] .pg-mark { background: #34406A; mix-blend-mode: lighten; } | |
| .pg-empty { position: absolute; left: 0; right: 0; top: 2.6%; z-index: 1; text-align: center; padding: 0 24px; color: var(--pg-hint); pointer-events: none; } | |
| .pg-pick { | |
| position: absolute; left: 0; top: 0; z-index: 3; padding: 4px; | |
| background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 28px rgba(20, 26, 38, .18); | |
| } | |
| .pg-redo { | |
| appearance: none; border: 0; background: none; font: inherit; font-size: 16px; font-weight: 600; color: var(--accent); | |
| display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border-radius: 10px; | |
| cursor: pointer; touch-action: manipulation; white-space: nowrap; | |
| } | |
| .pg-redo .ic { width: 18px; height: 18px; stroke-width: 1.9; } | |
| .pg-redo:not(:disabled):hover { background: var(--accent-soft); } | |
| .pg-redo:disabled { color: var(--muted); cursor: default; } | |
| .pg-redo:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: -3px; } | |
| .gen-busy .pbar { flex: none; width: 72px; margin: 0; } | |
| .gen-dock { grid-template-columns: minmax(0, 1fr); } /* a long status line never widens the column */ | |
| #pg-busy-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } | |
| #pg-text { | |
| flex: 1; min-width: 0; font: inherit; font-size: 17px; line-height: 25px; color: var(--ink); | |
| background: none; border: 0; outline: 0; resize: none; padding: 11px 0; margin: 0; | |
| max-height: min(30vh, 220px); overflow-y: auto; scrollbar-width: thin; | |
| } | |
| #pg-text::placeholder { color: var(--muted); } | |
| /* Away from the keyboard the text steps back to two lines: the pages are the thing to look at. */ | |
| /* (25 px lines: 11 + 2 x 25 shows exactly two; the bottom padding moves out of the box so no third line peeks in) */ | |
| .pg-composer:not(:focus-within) #pg-text { max-height: 61px; padding-bottom: 0; margin-bottom: 11px; } | |
| /* Formatierung: a quiet tool under the text line; its panel opens there, in the style of | |
| Stil, and scrolls inside itself. What to type is set in the system's monospace, so | |
| that marks like ** and == read exactly as they must be typed. */ | |
| .pg-fmt-row { display: flex; align-items: center; gap: 12px; margin: -4px 0 -6px -8px; } | |
| .pg-fmt-row .gen-tool { font-size: 14px; padding: 0 10px; } | |
| .pg-fmt-row .gen-tool::before { inset: 8px 0; } | |
| .pg-detected { margin-left: auto; padding-right: 4px; font-size: 14px; color: var(--muted); } | |
| .pg-fmt { | |
| --gen-label: 104px; | |
| max-height: min(46dvh, 420px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; | |
| padding: 2px 12px 10px; margin: 0 -8px; /* room for the choices' marks, which reach 10 px left of their text */ | |
| } | |
| .pg-fmt-top { display: flex; flex-wrap: wrap; align-items: center; column-gap: 24px; } | |
| .pg-fmt-top .gen-opt { flex: 1 1 420px; } | |
| .pg-fmt-example { display: flex; flex-wrap: wrap; margin-left: -12px; } | |
| .pg-fmt-example .gen-tool .ic { width: 16px; height: 16px; } | |
| .pg-fmt-example .pg-ask { color: var(--accent); } | |
| .pg-ref { | |
| display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 24px; row-gap: 9px; | |
| margin: 8px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; | |
| } | |
| .pg-ref dt { font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace; font-size: 13.5px; color: var(--ink); white-space: pre; } | |
| .pg-ref dd { margin: 0; color: var(--muted); } | |
| @media (max-width: 760px) { | |
| .pg-fmt { --gen-label: 100px; max-height: min(38dvh, 340px); } | |
| } | |
| @media (max-width: 560px) { | |
| /* the four formats need the whole width; the radiogroup keeps its name for screen readers */ | |
| .pg-fmt-top .gen-opt { grid-template-columns: minmax(0, 1fr); } | |
| .pg-fmt-top .gen-opt-l { display: none; } | |
| .pg-fmt-top .gen-choice { padding: 0 6px; } /* all four on one row at 360 px */ | |
| .pg-ref { grid-template-columns: minmax(0, 1fr); row-gap: 2px; } | |
| .pg-ref dt { white-space: pre-wrap; margin-top: 8px; } | |
| .pg-ref dt:first-child { margin-top: 0; } | |
| .gen:has(> .gen-dock #pg-format-panel:not([hidden])) .gen-modes { display: none; } | |
| } | |
| .pg-switch { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; font-size: 15px; color: var(--ink); cursor: pointer; justify-self: start; } | |
| .pg-short { display: none; } | |
| @media (max-width: 560px) { | |
| .pg-long { display: none; } .pg-short { display: inline; } .pg-pages { gap: 14px; } #pg-bar { display: none; } | |
| /* On a phone the open Stil bar needs the height; nobody switches modes while choosing a pen. */ | |
| .gen:has(> .gen-dock #gen-style:not([hidden])) .gen-modes { display: none; } | |
| /* the short progress fits beside the tools; the longer hint when done may take two lines */ | |
| .gen-status:has(> #pg-busy:not([hidden])) { flex-basis: 110px; } | |
| } | |
| /* ---------- Seite: the editor ---------- | |
| Wide (900 px and up): the text on the left over the full height, the pages on the | |
| right, one bar under both: under the text what belongs to it, under the pages what | |
| belongs to them. Stil and Formatierung open over their own half without moving | |
| anything. Narrow: pages above, the text below, as before; the mark tools take the | |
| status row's place while the text has the focus, so they cost the text no line. | |
| --pg-kb (the on-screen keyboard's height) and --pg-vh (what is visible above it) come | |
| from editor-tools.js. */ | |
| .gen[data-mode="seite"] { margin-bottom: var(--pg-kb, 0px); } | |
| .pg-marks { display: flex; min-height: 48px; margin: 0 -8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity; } | |
| .pg-marks::-webkit-scrollbar { display: none; } | |
| .pg-marks .gen-tool { flex: none; font-size: 14px; padding: 0 10px; scroll-snap-align: start; } | |
| /* the end that runs on out of sight fades out (editor-tools.js sets data-fade) */ | |
| .pg-marks[data-fade="r"] { mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); } | |
| .pg-marks[data-fade="l"] { mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent); } | |
| .pg-marks[data-fade="lr"] { mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); } | |
| .pg-marks .gen-tool::before { inset: 8px 0; } | |
| .pg-marks [data-tool="bold"] { font-weight: 700; } | |
| .pg-marks [data-tool="underline"] { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; } | |
| .pg-fmt-row .pg-editor-btn, .pg-fmt-row .pg-size-btn { display: none; padding: 0; justify-content: center; } | |
| .pg-fmt-row .pg-size-btn { margin-left: -6px; } | |
| /* a switch for the layout, not a panel: no "open" shade */ | |
| .pg-fmt-row .pg-editor-btn[aria-expanded]:not(:hover)::before { background: none; } | |
| @media (max-width: 899.98px) { | |
| .pg-marks { display: none; } | |
| .gen-dock:has(#pg-text:focus, #pg-marks:focus-within) > .pg-marks:not([hidden]) { display: flex; } | |
| .gen-dock:has(#pg-text:focus, #pg-marks:focus-within):has(> .pg-marks:not([hidden])) > .gen-row { display: none; } | |
| .pg-fmt-row .pg-size-btn { display: inline-flex; } | |
| /* small: two lines away from the keyboard, more while typing; large: half of what is | |
| visible, over the whole width, Schreiben under it. An open Stil or Formatierung | |
| panel takes the room back, so that Schreiben stays on the screen. */ | |
| .pg-composer #pg-text { max-height: min(calc(var(--pg-vh, 100dvh) * .3), 220px); } | |
| .gen[data-field="big"]:not(:has(#gen-style:not([hidden]), #pg-format-panel:not([hidden]))) .pg-composer { flex-wrap: wrap; row-gap: 0; } | |
| .gen[data-field="big"]:not(:has(#gen-style:not([hidden]), #pg-format-panel:not([hidden]))) .pg-composer #pg-text { flex-basis: 100%; height: calc(var(--pg-vh, 100dvh) * .5) ; max-height: none; padding-bottom: 11px; margin-bottom: 0; } | |
| .gen[data-field="big"] .pg-composer > .gen-go { margin-left: auto; } | |
| } | |
| @media (max-width: 560px) { | |
| /* a phone with the keyboard open needs every row for the text */ | |
| .gen[data-mode="seite"][data-kb] > .gen-modes { display: none; } | |
| } | |
| @media (min-width: 900px) { | |
| .gen[data-mode="seite"] { | |
| --pg-ed: clamp(320px, 40%, 560px); | |
| display: grid; max-width: none; column-gap: 28px; | |
| grid-template-columns: [ed] var(--pg-ed) [doc] minmax(0, 1fr); | |
| grid-template-rows: auto minmax(0, 1fr) auto auto auto auto; /* switch, text, marks, note, characters, bar */ | |
| } | |
| .gen[data-mode="seite"] > .gen-modes { grid-column: 1 / -1; grid-row: 1; } | |
| /* with the keyboard open the text needs the height more than the switch */ | |
| .gen[data-mode="seite"][data-kb] > .gen-modes { display: none; } | |
| .gen[data-mode="seite"] > .gen-stage, .gen[data-mode="seite"] > .pg-stage { grid-column: doc; grid-row: 2 / 6; } | |
| .gen[data-mode="seite"]:has(> .gen-dock[hidden]) > .gen-stage { grid-column: 1 / -1; } | |
| .gen[data-mode="seite"] .pg-pages { max-width: var(--gen-column); margin: 0 auto; } | |
| .gen[data-mode="seite"] > .gen-dock:not([hidden]), .gen[data-mode="seite"] > .gen-dock > .pg-composer { display: contents; } | |
| .gen[data-mode="seite"] .gen-dock #pg-text { | |
| grid-column: ed; grid-row: 2; height: auto ; max-height: none; min-height: 0; | |
| margin: 4px 0 0; padding: 14px 18px; overflow-y: auto; overscroll-behavior: contain; | |
| background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, box-shadow .15s; | |
| } | |
| .gen[data-mode="seite"] .gen-dock #pg-text:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } | |
| .gen[data-mode="seite"] .pg-marks { grid-column: ed; grid-row: 3; margin: 2px 0 0 -8px; } /* ends with its column: nothing peeks past a panel */ | |
| .gen[data-mode="seite"] #pg-note { grid-column: ed; grid-row: 4; } | |
| .gen[data-mode="seite"] #pg-chars { grid-column: ed; grid-row: 5; } | |
| /* the bar: Schreiben at the right end of the text's half, the rest of the half before it | |
| ("Abbrechen", the wider of the two, measures 132 px) */ | |
| .gen[data-mode="seite"] .gen-row, .gen[data-mode="seite"] .pg-fmt-row, .gen[data-mode="seite"] .pg-composer > .gen-go { grid-row: 6; margin-top: 6px; } | |
| .gen[data-mode="seite"] .gen-row { grid-column: doc; } | |
| .gen[data-mode="seite"] .pg-fmt-row { grid-column: ed; margin: 6px 144px 0 -8px; min-width: 0; flex-wrap: wrap; height: 48px; overflow: hidden; } | |
| .gen[data-mode="seite"] .pg-composer > .gen-go { grid-column: ed; justify-self: end; align-self: center; } | |
| .gen[data-mode="seite"] .pg-fmt-row .pg-editor-btn { display: inline-flex; } | |
| /* the detected format sits after the button; where the half is too narrow it wraps out of sight */ | |
| .gen[data-mode="seite"] .pg-detected { margin-left: 0; padding: 0 4px; line-height: 48px; } | |
| /* Stil and Formatierung: over their own half, above the bar, scrolling inside themselves */ | |
| .gen[data-mode="seite"] #gen-style, .gen[data-mode="seite"] #pg-format-panel { | |
| grid-row: 2 / 6; align-self: end; position: relative; z-index: 4; | |
| max-height: min(calc(100% - 10px), 420px); margin: 0 0 6px; padding: 6px 18px 12px; overflow-y: auto; overscroll-behavior: contain; | |
| background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(20, 26, 38, .18); | |
| } | |
| .gen[data-mode="seite"] #gen-style { grid-column: doc; container-type: inline-size; } | |
| .gen[data-mode="seite"] #pg-format-panel { grid-column: ed; } | |
| /* the text's half is as narrow as a phone: the reference in one column */ | |
| .gen[data-mode="seite"] .pg-fmt-top .gen-opt { grid-template-columns: minmax(0, 1fr); flex-basis: 100%; } | |
| .gen[data-mode="seite"] .pg-fmt-top .gen-opt-l { display: none; } | |
| .gen[data-mode="seite"] .pg-ref { grid-template-columns: minmax(0, 1fr); row-gap: 2px; } | |
| .gen[data-mode="seite"] .pg-ref dt { white-space: pre-wrap; margin-top: 8px; } | |
| .gen[data-mode="seite"] .pg-ref dt:first-child { margin-top: 0; } | |
| /* the text put away: the pages over the full width, centred in the window; the bar keeps | |
| its halves, Schreiben stays in it */ | |
| .gen[data-mode="seite"][data-editor="hidden"] { grid-template-columns: [ed] auto [doc] minmax(0, 1fr); } | |
| .gen[data-mode="seite"][data-editor="hidden"] :is(#pg-text, .pg-marks, #pg-note, #pg-chars, #pg-format, #pg-detected, #pg-format-panel) { display: none; } | |
| .gen[data-mode="seite"][data-editor="hidden"] > .pg-stage { grid-column: 1 / -1; } | |
| .gen[data-mode="seite"][data-editor="hidden"] #gen-style { grid-column: 1 / -1; width: min(100%, var(--gen-column)); margin-inline: auto; } | |
| } | |
| /* Stil in the pages' half: one option under the other where the half is narrow, as on a | |
| narrow screen (the two columns need about 760 px) */ | |
| @container (max-width: 760px) { | |
| .gen-style-main, .gen-style-more { --gen-label: 100px; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; } | |
| } | |