Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
/* ————— bento/slides chrome ————— */
/* THEME TOKENS — chrome only.
*
* A theme is a VIEWER preference (kernel/src/theme.ts), never document data:
* two people opening one file are two readers in two rooms, and a theme in the
* document would make a file's bytes depend on who last looked at it.
*
* THE DOCUMENT DOES NOT INVERT. Dark dims the chrome around the deck. A slide's
* background is data the author chose — somebody proofing a deck at midnight
* still needs to see what will be projected. So the slide surface, the starter
* deck's brand art and anything rendering document content stay OUT of these
* blocks; `--slide-shadow` describes the chrome's presentation of the page, not
* the page.
*
* LIGHT — the suite's shared palette, character for character with
* type/src/styles.css and spaces/src/styles.css. Do not let these drift.
*/
:root, :root[data-theme="light"] {
--ink: #1e2a3a;
--ink-2: #31445c;
--chrome: #f5f7fa;
--chrome-2: #eceff4;
--line: #e3e8ef;
--muted: #5b6472;
--accent: #f7a600;
--accent-ink: #7a5200; /* accent-coloured TEXT on the chrome's own surfaces */
--accent-on: #3a2a00; /* text sitting ON the solid --accent fill */
--blue: #5b8def;
--field: #ffffff; /* form-control surface — CHROME, not the slide */
--surface: #ffffff; /* panels, dialogs, menus */
--grid-dot: #d5dbe4; /* the canvas dot grid behind the stage */
--chip: rgb(255 255 255 / 0.85); /* translucent label over a thumbnail */
--slide-shadow: 0 10px 40px rgb(20 30 45 / 0.18), 0 2px 8px rgb(20 30 45 / 0.10);
}
/* DARK — the same roles, not the same values. `--ink` is the chrome's
FOREGROUND, so it inverts; `--accent` does not, because it is brand. */
:root[data-theme="dark"] {
--ink: #e7eaf0;
--ink-2: #b3bcca;
--chrome: #1b1f26;
--chrome-2: #262b34;
--line: #333a45;
--muted: #8b95a4;
--accent: #f7a600;
/* accent-coloured TEXT on dark chrome: lifted, as spaces does. It used to
be #3a2a00 (meant for text ON the orange) and every text use sat on the
dark surfaces instead — 1.09:1, invisible (spaces' chrome audit, 2026-09).
Text on the orange fill has its own token, and it does not flip. */
--accent-ink: #f0b74e;
--accent-on: #3a2a00;
--blue: #7aa5f5; /* lifted: #5b8def is unreadable on dark chrome */
--field: #12151a;
--surface: #21262e;
--grid-dot: #2b313b;
--chip: rgb(24 28 34 / 0.85);
/* deeper: a light slide on a dark canvas needs more separation than the
same slide on a light one */
--slide-shadow: 0 14px 48px rgb(0 0 0 / 0.55), 0 2px 10px rgb(0 0 0 / 0.4);
}
:root {
--radius: 10px;
/* Chrome text drawn OVER THE SLIDE (the comment labels) sits on the deck's
background, not the chrome's, so neither theme's ink is safe on its own:
a dark slide hid the light theme's brown, a light slide would hide the
dark theme's gold. A halo in the chrome's surface colour gives the text
its own ground on any slide. */
--over-slide-halo: 0 0 2px var(--surface), 0 0 2px var(--surface), 0 0 4px var(--surface);
}
* { box-sizing: border-box; }
html, body {
margin: 0;
height: 100%;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
color: var(--ink);
background: var(--chrome);
overscroll-behavior: none;
}
#app { height: 100%; }
.ed-root {
height: 100%;
display: flex;
flex-direction: column;
user-select: none;
/* Nothing in this column may leak sideways. Without this, a topbar wider than
the viewport turned into DOCUMENT scroll — on a phone the bar needed 681px
of a 402px screen, so swiping the toolbar dragged the whole canvas off. */
overflow: hidden;
}
/* iOS Safari (WebKit) renders a <select>'s chosen value as BLANK text when any
ancestor sets user-select:none — restore it on form fields app-wide. Inputs
and textareas need it too or the iOS text-selection caret misbehaves. */
select, option, input, textarea, [contenteditable='true'] {
-webkit-user-select: auto;
user-select: auto;
}
/* The editor chrome is light-only. Without this, dark-mode phones render
NATIVE form controls dark (and Chrome-on-Android may force-darken the whole
page) while our ink stays dark — dark-on-dark, i.e. "blank" dropdowns.
Pair with the color-scheme meta in index.html; the explicit background/color
below keeps contrast even under a force-dark engine that ignores both. */
:root { color-scheme: only light; }
option { background: var(--field); color: var(--ink); }
/* ————— THE FIELD — one look for every text field, select and textarea ———————
The suite's reference: dash, spaces and type copy this block as it stands.
Every chrome field gets it with no class to remember, so a new field cannot
come out in the browser's own dress — the grey inset 2px border, square
corners, and in dark theme a #3b3b3b fill nobody chose (five of slides'
fields had exactly that, each with its own rule that forgot one property).
:where() keeps the specificity at ZERO, so a context rule that only sizes a
field (width, flex, font-weight) layers on top without restating the look,
and a field that is deliberately not a box (the ghost title, the password
gate's own card) overrides it with an ordinary class. The ring sits ON the
border (offset -1px), so no scroll container can clip it. Checkboxes,
radios, ranges and file pickers keep their native controls. Guarded by
scripts/test-slides-fields-browser.mjs. */
:where(input:not([type='checkbox'], [type='radio'], [type='range'], [type='file'], [type='color'], [type='button'], [type='submit'], [type='reset'], [type='image'], [type='hidden']), select, textarea) {
box-sizing: border-box;
height: 26px;
padding: 0 6px;
font: inherit;
font-size: 12.5px;
color: var(--ink);
background: var(--field);
border: 1px solid var(--line);
border-radius: 6px;
}
:where(textarea) { height: auto; padding: 6px 8px; line-height: 1.5; resize: vertical; }
:where(input[type='color']) {
box-sizing: border-box;
height: 26px;
padding: 1px 2px;
background: var(--field);
border: 1px solid var(--line);
border-radius: 6px;
}
:where(input, select, textarea):focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -1px; }
/* ————— THE DOCUMENT NEVER MIRRORS —————————————————————————————————————————
An Arabic/Hebrew viewer gets an RTL *chrome* (i18n.ts applyDirection sets
dir on <html>). The DOCUMENT must be immune to that: slide elements carry
absolute x/y model coordinates, so a mirrored surface would move every
element of every existing deck, and the same file would look different
depending on who opened it — a format-level bug, far worse than an
unmirrored panel.
So every surface that draws slide content is pinned back to LTR:
- .bento-slide is the SHARED root of the canvas stage, sidebar thumbnails,
present sections, print pages and the speaker view's frames (render.ts
renderSlide), so this one rule covers all four surfaces at once. The
containers are pinned too, belt and braces, because they also carry
positioned chrome of their own.
- .ed-scroll additionally protects the canvas COORDINATE MATH: direction
changes what scrollLeft means (0 at the right edge, negative leftwards),
and canvas.ts reads/writes scrollLeft to centre and to pin the stage
during Moveable gestures. Pinned, none of that math can shift.
- .moveable-control-box is mounted with rootContainer: document.body, i.e.
outside the canvas subtree — it needs its own pin.
Text INSIDE elements still resolves its own direction per element, from the
content the author typed (render.ts sets dir="auto"). That is the content
half of RTL and is unaffected by any of this. */
.bento-slide,
.bento-thumb-surface,
.ed-scroll,
.bento-present-overlay,
.moveable-control-box,
#bento-print {
direction: ltr;
}
/* ————— topbar ————— */
.ed-topbar {
display: flex;
align-items: center;
gap: 10px;
/* viewport-fit=cover puts the page under the rounded corners, the Dynamic
Island and the home indicator, so fixed chrome has to inset ITSELF or its
end buttons sit under the curve. env(safe-area-inset-*) is the only handle
the platform gives — there is no corner-radius API — and it already encodes
corners, island and indicator together.
Each max() also lists var(--tray-safe-*). Inside a WKWebView host,
env(safe-area-inset-*) reads 0px even when the device genuinely has insets
(measured: native 62/0/34/0, CSS 0px), so bento/tray publishes the real
numbers under those names. In a browser the variables are undefined, resolve
to 0px, and env() does the work as normal.
max() keeps the normal padding on every device that reports 0. The
BACKGROUND still bleeds to the edge; only the content is inset, which is
the point: colour to the edge, controls out of the curve. */
padding: max(8px, env(safe-area-inset-top), var(--tray-safe-top, 0px)) max(14px, env(safe-area-inset-right), var(--tray-safe-right, 0px))
8px max(14px, env(safe-area-inset-left), var(--tray-safe-left, 0px));
background: var(--surface);
border-bottom: 1px solid var(--line);
/* Above the phone-mode panel drawers (z 40), and this number is doing more
work than it looks. The bar is a FLEX ITEM of .ed-root, and a flex item
honours z-index even at position:static — so this value does not merely
order the bar, it opens a STACKING CONTEXT that caps everything inside it.
At 20 the ⋯ menu's own z-index: 50 was capped at 20 and the drawers at 40
painted straight over it: on a narrow window with the properties panel
open, the menu rendered in full and every click landed on the panel behind
it. Raising its own z-index could never have fixed that — only the ceiling
moves. Keep this above the drawers and below the dialogs/toasts (59+). */
z-index: 50;
}
/* A <button> (it opens About), dressed as the wordmark: none of a button's
own fill, border or padding, and the bar's ink rather than the UA's. */
.ed-logo {
display: flex; align-items: center; gap: 7px; font: inherit; font-size: 15px; white-space: nowrap;
color: var(--ink); background: none; border: 0; padding: 0; border-radius: 6px; cursor: pointer;
}
.ed-logo-mark { display: block; border-radius: 5px; }
/* The deck title is a GHOST field: no box at rest, the shared field's border
on hover, its fill and amber ring once focused. Its height is the bar's. */
.ed-title {
height: auto;
font-size: 14px;
border-color: transparent;
padding: 5px 8px;
width: 220px;
background: transparent;
}
.ed-title:hover { border-color: var(--line); }
.ed-title:focus { border-color: var(--line); background: var(--field); }
/* The file this deck is open AS — quieter than the deck title beside it.
Shows the BASE name only: every Bento file ends in ".bento.html", so the
extension is the one part that identifies nothing (a first attempt truncated
from the right and rendered "…tml", which is worse than showing nothing).
Never shrinks — it competed with the title input and squeezed it to "Bento S"
— and it leaves the bar entirely at the same width the button labels do. */
.ed-filechip {
font-size: 12px;
color: var(--muted);
padding: 4px 8px;
border-radius: 6px;
background: var(--sunk, rgba(127, 127, 127, .08));
max-width: 160px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
flex-shrink: 0;
cursor: default;
}
.ed-filechip[hidden] { display: none; }
/* Known file, but its name would only repeat the title: keep the SLOT and
hide the text. Toggling display here reflowed the bar whenever an undo or a
rename made the title match the file name (#546). */
.ed-filechip.ed-filechip-quiet { visibility: hidden; }
.ed-topbar.ed-bar-compact .ed-filechip { display: none; }
/* unsaved-changes dot — badges the SAVE button's corner (amber when dirty) */
.ed-dirty {
position: absolute;
top: 3px; inset-inline-end: 3px;
width: 7px; height: 7px; border-radius: 50%;
background: transparent; pointer-events: none;
}
/* Save is ink-filled (D1), and in dark theme --ink is near-white: the amber dot
alone measured 1.7:1 on it. A ring in the brand navy (the logo mark's tile)
is dark in BOTH themes — on light it merges into the ink fill, on dark it
parts the dot from it. A --surface ring failed the other way: white beside
amber is 2.0:1 in light. Dot:ring and ring:fill both clear 3:1
(scripts/test-slides-topbar-browser.mjs). */
.ed-dirty.on { background: var(--accent); box-shadow: 0 0 0 1.5px #16273e; }
.ed-split > .ed-btn:first-child { position: relative; }
.ed-group { display: flex; align-items: center; gap: 6px; }
.ed-group-right { margin-inline-start: auto; }
.ed-btn {
display: inline-flex;
align-items: center;
gap: 6px;
font: inherit;
font-size: 13px;
color: var(--ink-2);
background: transparent;
border: 1px solid transparent;
border-radius: 8px;
padding: 6px 9px;
cursor: pointer;
white-space: nowrap;
}
a.ed-btn { text-decoration: none; } /* the update block's "What's new" link is styled as a button */
.ed-btn:hover { background: var(--chrome-2); }
.ed-btn:active { background: var(--line); }
.ed-btn svg { display: block; }
.ed-btn-primary {
/* The button is always the INVERSE of the surface it sits on, which is the
only pairing that survives a theme flip. `color: #fff` did not: the
background follows --ink, so in dark mode it turned light while the text
stayed white — measured at 1.21:1, the same ratio that made the panel
inputs unreadable before the theme tokens existed. It looked right in the
About dialog only because that has its own peach override, so the six
other primary buttons in the app were the ones nobody saw.
After: 14.51:1 light, 12.61:1 dark. */
background: var(--ink);
color: var(--surface);
padding: 6px 14px;
}
.ed-btn-primary:hover { background: var(--ink-2); }
.ed-dropdown { position: relative; }
.ed-menu {
display: none;
position: absolute;
top: calc(100% + 4px);
inset-inline-start: 0;
flex-direction: column;
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: 0 8px 24px rgb(20 30 45 / 0.14);
padding: 4px;
z-index: 50;
min-width: 150px;
}
/* The light shadow is navy at 14%, which on the dark chrome is a navy smudge
on navy and lifts nothing off the page. Dark gets black, deeper — the same
move --slide-shadow makes for the canvas. */
:root[data-theme="dark"] .ed-menu { box-shadow: 0 8px 24px rgb(0 0 0 / 0.5); }
/* DIRECT child, not any descendant. Phone chrome demotes whole dropdown
widgets (Share, Language) into the ⋯ menu, so a descendant selector opened
their menus too — ⋯ came up with the entire language list already unrolled
inside it. Every .ed-menu is appended straight onto its own .ed-dropdown, so
scoping to `>` is exact. */
.ed-dropdown.open > .ed-menu { display: flex; }
.ed-menu .ed-btn { justify-content: flex-start; width: 100%; }
/* ————— main layout ————— */
.ed-main { flex: 1; display: flex; min-height: 0; }
.ed-sidebar {
width: var(--panew, 188px);
flex: none;
overflow-y: auto;
overflow-x: hidden;
scrollbar-gutter: stable;
padding: 12px;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
background: var(--surface);
border-inline-end: 1px solid var(--line);
}
.ed-thumb {
position: relative;
max-width: 100%;
border: 2px solid var(--line);
border-radius: 8px;
overflow: hidden;
cursor: pointer;
flex: none;
background: var(--surface);
}
.ed-thumb:hover { border-color: #c9d2de; }
.ed-thumb.active { border-color: var(--accent); }
/* in the multi-selection: a tint and the accent ring; the active one keeps its ring */
.ed-thumb.selected { border-color: var(--accent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.ed-thumb.selected::after { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--accent) 12%, transparent); pointer-events: none; }
.ed-thumb.dragging { opacity: .5; }
.ed-thumb.drop { border-color: var(--blue); }
.ed-thumb-num {
position: absolute;
top: 4px; inset-inline-start: 4px;
z-index: 2;
font-size: 10px;
font-weight: 600;
color: var(--ink-2);
background: var(--chip);
border-radius: 4px;
padding: 1px 5px;
}
.ed-thumb-tools {
position: absolute;
inset-inline-end: 4px; top: 4px;
z-index: 2;
display: none;
gap: 2px;
}
.ed-thumb:hover .ed-thumb-tools { display: flex; }
.ed-thumb-tools .ed-btn { padding: 3px; background: var(--chip); }
.bento-thumb-surface { overflow: hidden; pointer-events: none; }
.ed-add-slide { border: 1.5px dashed var(--line); justify-content: center; color: var(--muted); align-self: stretch; }
/* interactive-state thumbs: slightly smaller, centred under their parent.
No explicit width — the box sizes to its rendered surface (like normal
thumbs), so the whole slide stays visible inside the border. */
.ed-thumb-state {
margin-top: -2px;
opacity: 0.72;
border-style: dashed;
}
.ed-thumb-state:hover, .ed-thumb-state.active { opacity: 1; }
.ed-thumb-state .ed-thumb-num {
font-size: 9px;
max-width: 96px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ed-btn-block {
width: 100%;
justify-content: center;
border: 1px solid var(--line);
margin-top: 2px;
}
.ed-row input[type='text'] { width: 110px; }
/* ————— canvas ————— */
.ed-canvas-wrap {
flex: 1;
min-width: 0;
background:
radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 0) 0 0 / 22px 22px,
var(--chrome);
overflow: hidden;
position: relative;
}
/* scrollable viewport: auto-margins centre the stage when it fits and
allow proper scrolling in every direction when zoomed past the window */
.ed-scroll {
position: absolute;
inset: 0;
overflow: auto;
display: flex;
/* classic (non-overlay) scrollbars: reserve the gutter so a bar appearing
mid-drag can't shrink the client box and shove the centred stage around */
scrollbar-gutter: stable both-edges;
}
.ed-stage {
position: relative;
flex: none;
margin: auto;
box-shadow: var(--slide-shadow);
border-radius: 2px;
}
/* zoom controls, bottom-end corner of the canvas */
.ed-zoombar {
position: absolute;
inset-inline-end: 14px;
bottom: 14px;
display: flex;
align-items: center;
gap: 2px;
background: var(--surface);
border: 1px solid var(--line);
border-radius: 999px;
padding: 3px 6px;
box-shadow: 0 4px 14px rgb(20 30 45 / 0.10);
z-index: 10;
}
.ed-zoombtn {
font: inherit;
font-size: 14px;
line-height: 1;
color: var(--ink-2);
background: transparent;
border: none;
border-radius: 999px;
padding: 5px 9px;
cursor: pointer;
}
.ed-zoombtn:hover { background: var(--chrome-2); }
.ed-zoomlabel { font-size: 11.5px; min-width: 44px; text-align: center; color: var(--muted); }
.ed-stage-scale { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
/* hover-set switcher chips, floating above the canvas */
.ed-setbar {
position: absolute;
top: 12px;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 6px;
background: var(--surface);
border: 1px solid var(--line);
border-radius: 999px;
padding: 5px 10px;
box-shadow: 0 4px 14px rgb(20 30 45 / 0.10);
z-index: 10;
max-width: calc(100% - 48px);
overflow-x: auto;
}
.ed-setbar-label {
font-size: 11px;
font-weight: 700;
color: var(--muted);
white-space: nowrap;
}
.ed-setchip {
font: inherit;
font-size: 12px;
color: var(--ink-2);
background: var(--chrome);
border: 1px solid transparent;
border-radius: 999px;
padding: 3px 11px;
cursor: pointer;
white-space: nowrap;
}
.ed-setchip:hover { background: var(--chrome-2); }
.ed-setchip.active {
background: var(--ink);
color: var(--surface);
}
/* ————— slide surface (shared by canvas, thumbs, present) ————— */
.bento-slide { position: relative; overflow: hidden; }
.bento-el { position: absolute; contain: layout style; }
/* A web link inside text: underlined in the author's colour, a pointer only
in the show (the editor treats it as text — canvas.ts swallows the click). */
.bento-el a[href] { color: inherit; text-decoration: underline; text-underline-offset: 0.12em; }
.bento-present-overlay .bento-el a[href] { cursor: pointer; }
/* Formulas are left on the browser's own `math` family ON PURPOSE — naming a
maths font here fixes nothing and has been reverted three times. The
radical's hook falling short of its overbar is Chromium drawing the overbar
as its own rule and missing the arm the font's glyph paints, by a fraction
of a pixel. It is not the font: generic `math` picks STIX on macOS and
Cambria Math on Windows and BOTH break, and forcing Times New Roman only
makes the break smaller. It is not our markup, our tagging, the stage
transform, the font size, or the height of the radicand (measured: the
deck's `b²−4ac` and a flat `b−4ac` get a byte-identical 113.8px radical).
There IS a mitigation — `msqrt { font-family: serif }` with the contents put
back to `math` — and it is deliberately NOT shipped: it is clean on macOS
and still broken on Windows. Read docs/DECISIONS.md, 2026-08-25, before
touching this; the rig is slides/probe/radical-join.html. */
/* A formula that did not render, on the editor canvas only (render.ts
mathHint, #540): the author's text stays exactly as typed, a faint dotted
underline says it was meant as maths, and the title says why. */
.bento-math-miss {
text-decoration: underline dotted;
text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
text-underline-offset: 0.18em;
cursor: help;
}
.bento-el-text,
.bento-el-code
.bento-text-inner {
overflow-wrap: break-word;
outline: none;
cursor: default;
}
/* Code tokens the morph may MOVE. A CSS transform does nothing to a
non-replaced inline element — accepted, readable back on style.transform,
and zero pixels of movement — so a token has to be an atomic inline-level
box before it can travel. LOAD-BEARING: delete this and code morphs stop
animating silently, with no error anywhere.
Scoped to [data-tok] rather than every span on purpose: the renderer sets
the attribute only on tokens with ink. Whitespace and newline tokens must
stay inline — a newline inside an atomic box no longer breaks the line
under `white-space: pre`, and the block collapses to one rendered line
(identically under inline-block and inline-flex; the display value was
never the variable that mattered). */
.bento-el-code [data-tok] {
display: inline-block;
}
/* The typewriter's cursor (present.ts runTypeWriter). It exists only while a
run does, so no other surface ever renders one. Absolute, so standing on a
token moves nothing the morph measured. */
.bento-code-cursor {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
animation: bento-code-cursor-blink 1s step-end infinite;
}
@keyframes bento-code-cursor-blink {
50% { opacity: 0; }
}
/* A hidden slide is still an ordinary, editable slide — it is just out of the
show. Dimmed rather than greyed out, and the number struck through, so the
sidebar reads as "this one will be skipped" without looking broken. */
.ed-thumb-hidden .bento-thumb-surface { opacity: 0.42; }
.ed-thumb-hidden .ed-thumb-num {
text-decoration: line-through;
opacity: 0.75;
}
/* An unnumbered slide is in the show but continues the previous page number:
the sidebar shows that number, dimmed, with a trailing dot as the marker. */
.ed-thumb-num.ed-num-unnumbered { opacity: 0.6; font-style: italic; }
.ed-stage .bento-el { cursor: grab; }
.ed-stage .bento-el:active { cursor: grabbing; }
/* Ghost Cut (⇧⌘X): faded where it stands until ⌘V moves it. !important
because applyElementFrame writes shadows and blur as an inline `filter`,
which would otherwise win and leave a shadowed element unfaded. */
.ed-stage .bento-el-ghost-cut { filter: opacity(.35) !important; pointer-events: none; }
.ed-stage .bento-editing { cursor: text; }
/* The caret at the start of a line sits on the text box's left edge — text
starts flush with the element, and its geometry is the model's, so the text
cannot move. Everything drawn ON that edge hid the caret (#547): the ring
(a 1.5px shadow hugging it), the browser's focus outline, and Moveable's
left line, still drawn from the last selection though it has no target
while you edit. So the ring is an outline held 3px OUT, replacing the focus
outline, and the idle control box is hidden for the edit. */
.ed-stage .bento-editing .bento-text-inner {
cursor: text;
user-select: text;
outline: 1.5px solid var(--blue);
outline-offset: 3px;
background: rgb(91 141 239 / 0.06);
min-height: 1em;
}
/* !important: Moveable writes display/visibility inline (as .ed-reader does) */
.ed-stage-scale:has(.bento-editing) .moveable-control-box { visibility: hidden !important; }
/* ————— properties panel ————— */
.ed-props {
width: var(--panew, 236px);
flex: none;
overflow-y: auto;
background: var(--surface);
border-inline-start: 1px solid var(--line);
padding: 14px;
}
.ed-section {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.07em;
color: var(--muted);
margin: 18px 0 8px;
}
.ed-section:first-child { margin-top: 2px; }
/* layers list (editor/layers.ts): one compact row per element, top first */
.ed-layers {
display: flex; flex-direction: column; gap: 1px; outline: none; margin-bottom: 6px;
/* a busy slide (the showcase title has 39 elements) must not push the Slide
controls a screen down: the list scrolls inside itself past ~12 rows */
max-height: 300px; overflow-y: auto;
}
.ed-layers:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: 6px; }
.ed-layer {
display: flex; align-items: center; gap: 7px;
padding: 3px 6px; border-radius: 6px; font-size: 12px; line-height: 18px;
cursor: default; user-select: none; border: 1px solid transparent;
}
.ed-layer:hover { background: rgb(94 118 153 / 0.10); }
.ed-layer.sel { background: rgb(94 118 153 / 0.18); border-color: rgb(94 118 153 / 0.35); }
.ed-layer.grouped { padding-left: 20px; }
.ed-layer.dragging { opacity: 0.4; }
.ed-layer.drop-above { box-shadow: 0 -2px 0 0 var(--accent); }
.ed-layer.drop-below { box-shadow: 0 2px 0 0 var(--accent); }
.ed-layer-glyph { flex: none; width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 10px; font-weight: 700; }
.ed-layer-glyph svg { width: 14px; height: 14px; }
.ed-layer-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-bottom: 8px;
font-size: 12.5px;
color: var(--ink-2);
}
.ed-row > span { flex: none; }
.ed-row input[type='number'], .ed-row select, .ed-row input[type='color'] { width: 110px; }
.ed-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.ed-mini { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.ed-mini input { width: 100%; min-width: 0; padding: 0 5px; }
.ed-ops { display: flex; gap: 4px; margin-bottom: 10px; }
.ed-btn-icon { border: 1px solid var(--line); padding: 6px; }
.ed-notes { width: 100%; min-height: 130px; }
.ed-hint {
font-size: 11.5px;
line-height: 1.45;
color: var(--muted);
background: var(--chrome);
border-radius: 8px;
padding: 8px 10px;
}
.ed-hint code { font-size: 10.5px; word-break: break-all; }
.ed-morph-warn { color: #C0392B; background: rgba(192, 57, 43, 0.08); }
.ed-btn-update {
background: #FF9E8A !important;
color: #0D1B2E !important;
font-weight: 700;
}
.ed-shadow-cap {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--muted);
margin: 4px 0 6px;
}
.ed-about-auto {
display: flex;
align-items: center;
gap: 7px;
font-size: 12px;
color: var(--muted);
cursor: pointer;
user-select: none;
}
/* About actions: buttons must read against the white box without hover */
.ed-about .ed-btn-primary {
background: #FF9E8A;
color: #0D1B2E;
font-weight: 700;
}
.ed-about .ed-btn-primary:hover { background: #F07B54; }
.ed-about .ed-btn:not(.ed-btn-primary) {
border-color: var(--line);
background: var(--surface);
}
.ed-about .ed-btn:not(.ed-btn-primary):hover { background: var(--chrome-2); }
/* ————— about dialog ————— */
.ed-about-overlay {
position: fixed;
inset: 0;
z-index: 1500;
background: rgb(15 23 36 / 0.38);
display: flex;
align-items: center;
justify-content: center;
}
/* D4: a dialog title is 17px/650 (the kernel's .bkd-title). Before, this was
the browser's h2 — 1.5em of 13px = 19.5px at 700 — in help, Version history
and every other .ed-about card. */
.ed-about h2 { font-size: 17px; font-weight: 650; }
.ed-about {
/* 440 rather than 360: release notes ride inline in the manifest now, and a
narrower box turned every bullet into two wrapped lines. The calc() keeps
a real gutter on a 375px phone, where the editor boots panels-collapsed. */
width: min(440px, calc(100vw - 24px));
background: var(--surface);
border-radius: 14px;
box-shadow: 0 18px 50px rgb(15 23 36 / 0.3);
padding: 20px;
font-size: 13px;
display: flex;
flex-direction: column;
gap: 12px;
/* tall dialogs (long help, version history) must scroll, not overflow the viewport */
max-height: 88vh;
overflow-y: auto;
}
.ed-about-head {
display: flex;
align-items: center;
gap: 10px;
}
.ed-about-head b { font-size: 15px; display: block; }
.ed-about-head span { font-size: 11.5px; color: var(--muted); }
/* logo/wordmark links home — keep it looking like the logo, not a link */
.ed-about-logo {
display: flex;
align-items: center;
gap: 10px;
color: inherit;
text-decoration: none;
border-radius: 8px;
}
.ed-about-logo:hover { opacity: 0.82; }
/* engagement line back to the site */
.ed-about-promo {
font-size: 12.5px;
color: var(--muted);
line-height: 1.5;
margin: -2px 0 2px;
}
.ed-about-promo a { color: var(--blue); text-decoration: none; }
.ed-about-promo a:hover { text-decoration: underline; }
.ed-about-row { display: flex; gap: 8px; }
.ed-about-status {
min-height: 18px;
/* The dialog is a height-capped column flex (max-height: 88vh, scrolls). A
flex item shrinks by default, so once this block grew — an update being
available adds a heading, a notes link and two buttons — it collapsed to
exactly its min-height and its children spilled over the controls below,
overlapping the auto-check row and Document properties. Don't shrink: let
the dialog scroll, which is what its overflow-y is for. */
flex-shrink: 0;
color: var(--ink);
line-height: 1.5;
display: flex;
flex-direction: column;
gap: 8px;
align-items: flex-start;
}
.ed-about-new { font-weight: 600; }
.ed-about-notes {
align-self: stretch;
color: var(--muted);
background: var(--chrome);
border-radius: 8px;
padding: 7px 10px;
white-space: pre-wrap;
max-height: 140px;
overflow: auto;
}
/* ————— "an update is available" card —————
This is the one moment in the dialog where the user has a decision to make,
so it is grouped and given room instead of being five loose children of the
status block. Before: the notes sat in a 140px porthole inside a dialog that
was itself scrolling, and the three actions stacked vertically underneath —
so a five-bullet changelog read as one line plus two scrollbars. */
.ed-about-update {
align-self: stretch;
display: flex;
flex-direction: column;
gap: 8px;
padding: 11px 13px;
/* An even 1px rule, like every other surface in this dialog. The card used
to carry a 3px peach stripe down its leading edge — the generic
"callout" tic, and the only accent stripe anywhere in the app (the two
other thick borders are a CSS triangle and a quiet neutral rule on
.ed-lang-warn). It was redundant as well as out of place: the heading
names the version and the primary button already carries the accent. It
was also a hard-coded #FF9E8A, so it ignored the theme tokens. */
border: 1px solid var(--line);
border-radius: 10px;
}
.ed-about-release {
color: var(--ink-2);
background: var(--chrome);
border-radius: 8px;
padding: 9px 12px;
line-height: 1.5;
/* Its OWN scroll region, sized off the viewport. release.mjs caps the notes
at five bullets plus an "…and N more" line, which fits here whole at any
normal window height; anything longer scrolls HERE, not the whole dialog. */
max-height: min(300px, 42vh);
overflow-y: auto;
overflow-wrap: anywhere;
}
.ed-about-release > div + div { margin-top: 5px; }
/* hanging indent: a wrapped bullet lines up under its own text, not the marker */
.ed-about-note {
padding-inline-start: 14px;
text-indent: -14px;
}
.ed-about-note::before { content: '•\00a0'; }
.ed-about-more { color: var(--muted); font-style: italic; }
/* wrap instead of stacking: three actions fit in one or two rows */
.ed-about-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ed-about-actions .ed-btn { max-width: 100%; }
.ed-about-json { width: 100%; font: 11px/1.4 ui-monospace, Menlo, monospace; }
.ed-about-fine {
font-size: 10.5px;
line-height: 1.5;
color: var(--muted);
border-top: 1px solid var(--chrome);
padding-top: 10px;
}
/* ————— toast ————— */
.ed-toast {
position: fixed;
left: 50%;
bottom: 26px;
transform: translate(-50%, 12px);
background: var(--ink);
color: var(--surface);
font-size: 13px;
padding: 9px 16px;
border-radius: 999px;
opacity: 0;
transition: all 0.25s ease;
z-index: 2000;
pointer-events: none;
}
.ed-toast.show { opacity: 1; transform: translate(-50%, 0); }
/* ————— present overlay ————— */
.bento-present-overlay {
position: fixed;
inset: 0;
z-index: 1000;
background: #000;
}
.bento-present-overlay .reveal,
.bento-present-overlay .reveal-viewport {
background: #000;
}
.bento-present-overlay .reveal {
width: 100%;
height: 100%;
--r-background-color: #000;
--r-main-color: #fff;
--r-main-font-size: 32px;
--r-link-color: var(--accent);
--r-link-color-hover: #ffc23e;
--r-selection-background-color: var(--accent);
--r-controls-color: rgb(255 255 255 / 0.6);
--r-progress-color: var(--accent);
--r-overlay-element-bg-color: 255, 255, 255;
--r-overlay-element-fg-color: 0, 0, 0;
}
.bento-present-overlay .reveal .slides section { padding: 0; }
/* Presenter laser: viewport-level so its screen-space size stays constant at
every Reveal scale. The visual layer stays pointer-transparent so slide
links, hover effects, charts and media remain interactive while it is armed. */
.bento-laser-layer {
position: absolute;
inset: 0;
z-index: 59;
pointer-events: none;
}
.bento-present-overlay.laser-over-slide .bento-slide,
.bento-present-overlay.laser-over-slide .bento-slide * { cursor: none !important; }
/* While the laser is armed, dragging on the slide must never select text. */
.bento-present-overlay.laser-enabled .bento-slide,
.bento-present-overlay.laser-enabled .bento-slide * {
user-select: none;
-webkit-user-select: none;
}
.bento-laser-trail {
position: absolute;
inset: 0;
display: block;
overflow: hidden;
pointer-events: none;
}
.bento-laser-trail-segment {
fill: none;
stroke-linecap: butt;
vector-effect: non-scaling-stroke;
}
.bento-laser-trail-segment.halo { stroke: rgb(255 255 255 / 0.9); }
.bento-laser-trail-segment.core { stroke: #ef252f; }
.bento-laser-trail-segment.tail-tip { stroke: none; }
.bento-laser-trail-segment.tail-tip.halo { fill: rgb(255 255 255 / 0.9); }
.bento-laser-trail-segment.tail-tip.core { fill: #ef252f; }
.bento-laser-dot {
position: absolute;
width: 12px;
height: 12px;
box-sizing: border-box;
border: 2px solid rgb(255 255 255 / 0.94);
border-radius: 50%;
background: #ef252f;
box-shadow: 0 0 0 1px rgb(0 0 0 / 0.55), 0 0 10px rgb(239 37 47 / 0.9);
opacity: 0;
pointer-events: none;
transform: translate(-50%, -50%);
transition: opacity 0.08s linear;
}
.bento-laser-dot.visible { opacity: 1; }
.bento-laser-dot.bento-remote {
/* Frames arrive at ~30fps; a short linear tween (longer than one frame
interval so it always settles, short enough to add no lag) smooths the
last step — Excalidraw steps at 33ms with no tween at all, this is
strictly smoother. The LOCAL dot keeps its opacity-only transition: at
60fps a position tween would smear it behind the hand. */
transition:
left 0.045s linear,
top 0.045s linear,
opacity 0.08s linear;
}
.bento-present-overlay.reduce-motion .bento-laser-trail { display: none; }
.bento-present-overlay.reduce-motion .bento-laser-dot { transition: none; }
/* Reduced motion (M / speaker toggle / OS prefers-reduced-motion): JS fx are
skipped in present.ts; this neutralises CSS-driven motion too — Reveal's
slide transitions cut instantly and svg keyframe animations don't play. */
.bento-present-overlay.reduce-motion .reveal .slides section { transition: none !important; }
.bento-present-overlay.reduce-motion .bento-el-svg * { animation: none !important; }
/* dual-screen: one-click permission grant + transient toast */
.bento-present-grant {
position: fixed;
left: 50%;
bottom: 28px;
transform: translateX(-50%);
z-index: 100000;
border: 0;
border-radius: 999px;
padding: 11px 20px;
font: 600 14px/1 system-ui, sans-serif;
color: #0d1b2e;
background: #f2f0ea;
box-shadow: 0 6px 24px rgb(0 0 0 / 0.4);
cursor: pointer;
opacity: 0.94;
}
.bento-present-grant:hover { opacity: 1; }
.bento-present-toast {
position: fixed;
left: 50%;
bottom: 28px;
transform: translateX(-50%);
z-index: 100000;
padding: 10px 18px;
border-radius: 999px;
font: 500 13px/1.3 system-ui, sans-serif;
color: #f2f0ea;
background: rgb(18 26 40 / 0.92);
box-shadow: 0 6px 24px rgb(0 0 0 / 0.4);
max-width: 80vw;
text-align: center;
}
.bento-present-overlay .bento-el[data-link] { cursor: pointer; }
.bento-present-overlay .bento-el[data-link]:hover {
outline: 2.5px solid var(--bento-accent, var(--accent));
outline-offset: 3px;
border-radius: 999px;
}
/* chart option JSON editor */
.ed-chart-json {
width: 100%;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 11px;
line-height: 1.45;
}
.ed-chart-json.ed-invalid { border-color: #c9302c; outline: 1px solid #c9302c; }
/* --- help overlay + help button ------------------------------------------- */
.ed-btn-help .ed-help-q { font-size: 15px; font-weight: 800; line-height: 1; }
/* The glyph is narrower and shorter than a 16px icon, so without a floor the
button came out 28×29 beside 36×30 neighbours. */
.ed-btn-help { min-width: 36px; min-height: 30px; justify-content: center; }
.ed-help-box { width: 700px; max-width: 92vw; }
/* two hand-placed columns so the (now longer) list stays short vertically */
.ed-help-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; align-items: start; }
.ed-help-col { min-width: 0; }
.ed-help-sec { margin: 0 0 14px; }
/* one column when there isn't room for two (narrow / phone) */
@media (max-width: 560px) { .ed-help-cols { grid-template-columns: 1fr; } }
.ed-help-sec h3 {
font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
color: var(--muted); margin: 0 0 6px;
}
.ed-help-row { display: grid; grid-template-columns: 128px 1fr; gap: 12px; align-items: baseline; padding: 3px 0; font-size: 13px; }
/* D8: shortcuts in the interface face, not monospace, right-aligned against
what they do — the column reads as a list of keys, as a menu's does */
.ed-help-row kbd {
font: inherit; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
background: var(--chrome-2); border: 1px solid var(--line);
border-radius: 5px; padding: 2px 6px; color: var(--ink); white-space: nowrap; justify-self: end;
}
.ed-help-tips { margin: 4px 0 0; padding-inline-start: 18px; font-size: 13px; line-height: 1.5; color: var(--ink); }
.ed-help-tips li { margin: 3px 0; }
.ed-help-more { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line, rgba(30,42,58,0.12)); text-align: center; }
.ed-help-more a { color: var(--accent); font-weight: 600; font-size: 13px; text-decoration: none; }
.ed-help-more a:hover { text-decoration: underline; }
/* --- live viewer (read-only collaborator) -------------------------------- */
.ed-reader .ed-insert { display: none; } /* no add-content tools */
.ed-reader .moveable-control-box { display: none !important; } /* no resize/move handles */
.ed-reader-banner {
position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60;
background: rgba(13,27,46,0.92); color: #fff; padding: 9px 18px; border-radius: 999px;
font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 9px;
box-shadow: 0 8px 26px rgba(0,0,0,0.32); backdrop-filter: blur(6px);
}
.ed-reader-dot {
width: 8px; height: 8px; border-radius: 50%; background: #FF9E8A; flex: none;
animation: ed-reader-pulse 2s infinite;
}
@keyframes ed-reader-pulse {
0% { box-shadow: 0 0 0 0 rgba(255,158,138,0.5); }
70% { box-shadow: 0 0 0 7px rgba(255,158,138,0); }
100% { box-shadow: 0 0 0 0 rgba(255,158,138,0); }
}
/* --- auto-save: recovery banner, saved tag, version history --------------- */
.ed-recover {
position: fixed;
top: 64px;
left: 50%;
transform: translateX(-50%);
z-index: 4000;
display: flex;
align-items: center;
gap: 12px;
background: #16273e;
color: #f2f0ea;
padding: 10px 14px;
border-radius: 10px;
box-shadow: 0 8px 30px rgb(0 0 0 / 0.28);
font-size: 13px;
max-width: min(92vw, 560px);
}
.ed-recover .ed-btn { padding: 5px 12px; }
/* "Saved" / "Backed up in this browser" OVERLAYS the end of the deck title
(editor.ts flashSaved places it) instead of taking a slot in the bar. As a
flex item it pushed everything after it sideways on every auto-save, so the
Undo button moved under a pointer mid-click and the click landed on Redo
(#546). Inside the bar's own box, because at the narrowest widths the bar
is a scroll container and anything outside it would be clipped. */
.ed-topbar { position: relative; }
.ed-autosaved {
position: absolute;
font-size: 11px;
color: var(--muted);
background: var(--surface);
padding: 1px 4px;
border-radius: 4px;
opacity: 0;
transition: opacity 0.25s;
white-space: nowrap;
pointer-events: none;
}
.ed-autosaved.show { opacity: 0.85; }
.ed-version-box { max-width: 460px; }
.ed-version-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; max-height: 320px; overflow-y: auto; }
.ed-version-row {
display: grid;
grid-template-columns: 1fr auto auto;
align-items: center;
gap: 10px;
text-align: start;
padding: 9px 12px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--surface);
cursor: pointer;
font-size: 13px;
color: var(--ink);
}
.ed-version-row:hover { background: var(--chrome-2); border-color: #c9d2df; }
.ed-version-row .vh-tag { font-size: 11px; color: var(--muted); }
.ed-version-row .vh-do { font-size: 12px; font-weight: 600; color: #c25a43; }
/* --- visual chart editor -------------------------------------------------- */
.ed-chart-link {
display: flex;
align-items: center;
gap: 8px;
padding: 7px 10px;
margin-bottom: 6px;
background: rgba(94, 118, 153, 0.1);
border: 1px solid rgba(94, 118, 153, 0.25);
border-radius: 8px;
font-size: 12px;
color: var(--ink);
}
.ed-chart-link span { flex: 1; min-width: 0; }
.ed-chart-link .ed-btn { padding: 3px 9px; font-size: 12px; }
.ed-series-row {
display: flex;
align-items: center;
gap: 5px;
padding: 3px 0;
}
.ed-series-row .ed-series-name { flex: 1 1 auto; min-width: 0; }
.ed-series-row select { flex: 0 0 auto; }
.ed-series-row input[type='color'] { flex: 0 0 auto; width: 26px; padding: 0; }
.ed-series-row .ed-pie-val { width: 62px; }
.ed-series-rm { flex: 0 0 auto; color: #9aa4b2; }
.ed-series-rm:hover { color: #c9302c; }
.ed-chart-add { margin: 4px 0 2px; }
.ed-chart-add .ed-btn { width: 100%; justify-content: center; font-size: 12px; }
.ed-axis-range { display: flex; gap: 6px; }
.ed-axis-range input { width: 100%; }
.ed-chart-grid-wrap { overflow-x: auto; margin: 2px 0; }
.ed-chart-grid { border-collapse: collapse; width: 100%; }
.ed-chart-grid th {
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
color: #7a8494;
text-align: start;
padding: 2px 4px;
white-space: nowrap;
}
.ed-chart-grid td { padding: 1px 2px; }
.ed-chart-grid input { width: 100%; min-width: 52px; padding: 0 5px; }
.ed-chart-grid td:first-child input { font-weight: 600; }
.ed-chart-grid .ed-btn-icon { padding: 2px; color: #9aa4b2; }
.ed-chart-grid .ed-btn-icon:hover { color: #c9302c; }
/* inline code spans inside text elements — editor, present and print alike */
.bento-el-text code {
font-family: ui-monospace, SFMono-Regular, Berkeley Mono, Menlo, Consolas, monospace;
font-size: 0.9em;
background: rgb(127 127 127 / 0.16);
padding: 0 0.28em;
border-radius: 3px;
}
/* arrange kit: one compact row per group — tiny label left, buttons right */
/* arrange rows: caption + a shared 6-column track of near-fixed square
buttons — columns align vertically across Align/Space/Order, buttons
never stretch with the panel, spare width just rests at the row end */
.ed-arrange-row {
display: grid;
grid-template-columns: 40px repeat(6, minmax(20px, 26px));
align-items: center;
gap: 3px;
margin: 3px 0;
}
.ed-arrange-row .ed-arrange-cap { width: auto; }
/* Typography → Bullets: Outdent · Indent, two equal halves of the field */
.ed-shift-row { display: flex; gap: 4px; flex: 1; min-width: 0; }
.ed-shift-row .ed-btn { flex: 1; justify-content: center; padding: 4px 6px; font-size: 12px; border: 1px solid var(--line); }
.ed-arrange-row .ed-btn {
min-width: 0;
padding: 5px 0;
justify-content: center;
}
/* reveal verbs: caption + three text buttons sharing the row */
.ed-reveal-row { display: flex; align-items: center; gap: 4px; margin: 3px 0; }
.ed-reveal-row .ed-btn { flex: 1; min-width: 0; padding: 5px 4px; justify-content: center; font-size: 11px; }
.ed-arrange-cap {
flex: none;
width: 46px;
font-size: 9px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--muted);
opacity: 0.85;
}
.ed-arrange { display: flex; gap: 4px; margin-top: 0; }
.ed-arrange-btn {
flex: 1 0 17%;
min-width: 30px;
padding: 4px 0;
font-size: 13px;
line-height: 1.1;
}
.ed-arrange-btn:disabled { opacity: 0.35; cursor: default; }
/* armed topbar tool (comment mode) */
.ed-btn-armed { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-ink); }
.ed-btn-armed:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); }
/* collapsible panel sections */
.ed-sec-toggle { cursor: pointer; user-select: none; position: relative; padding-inline-start: 14px; }
.ed-sec-toggle::before {
content: '';
position: absolute;
inset-inline-start: 1px;
top: 50%;
width: 0; height: 0;
border-left: 5px solid currentColor;
border-top: 4px solid transparent;
border-bottom: 4px solid transparent;
transform: translateY(-50%) rotate(90deg);
transition: transform 0.12s ease;
opacity: 0.55;
}
.ed-sec-toggle.closed::before { transform: translateY(-50%); }
.ed-sec-toggle:hover { color: var(--ink); }
.ed-section-body { display: flex; flex-direction: column; }
/* review comments: canvas markers, thread popover, thumb badge */
.ed-comment-hl {
position: absolute;
pointer-events: none;
z-index: 11;
}
.ed-comment-hl.element {
border: 2px dashed var(--accent);
border-radius: 6px;
background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.ed-comment-chip {
position: absolute;
z-index: 12;
pointer-events: none;
background: var(--accent);
color: var(--accent-on);
font: 700 10.5px/1 -apple-system, 'Segoe UI', system-ui, sans-serif;
padding: 5px 9px;
border-radius: 999px;
white-space: nowrap;
box-shadow: 0 2px 8px rgb(20 30 45 / 0.25);
}
.ed-comment-hl.slide {
border: 2px dashed var(--accent);
border-radius: 8px;
background: color-mix(in srgb, var(--accent) 5%, transparent);
display: flex;
align-items: flex-start;
justify-content: flex-end;
padding: 5px 8px;
font: 700 9.5px/1 -apple-system, 'Segoe UI', system-ui, sans-serif;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--accent-ink);
text-shadow: var(--over-slide-halo);
}
.ed-comment-hl.pin {
width: 0; height: 0;
font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
color: var(--accent-ink);
text-shadow: var(--over-slide-halo);
white-space: nowrap;
padding-left: 12px;
padding-top: 2px;
}
.ed-comment-hl.pin::before {
content: '';
position: absolute;
left: -5px; top: -5px;
width: 10px; height: 10px;
border-radius: 50%;
border: 2.5px solid var(--accent);
background: rgb(255 255 255 / 0.7);
}
@keyframes ed-cmt-pop {
0% { transform: scale(0.3); }
55% { transform: scale(1.35); }
100% { transform: scale(1); }
}
.ed-comment-marker.fresh { animation: ed-cmt-pop 0.45s ease-out; }
.ed-comment-layer { position: absolute; inset: 0; pointer-events: none; z-index: 12; }
/* reveal-step badges (editor/stepbadges.ts): editor-only chrome beside the
rendered slide, never inside it */
.ed-step-layer { position: absolute; inset: 0; pointer-events: none; z-index: 12; }
.ed-step-badge {
position: absolute;
pointer-events: auto;
min-width: 19px;
height: 19px;
padding: 0 5px;
border: 2px solid var(--surface);
border-radius: 10px;
background: #1e2a3a;
color: #fff;
font: 700 10px/15px inherit;
font-family: inherit;
text-align: center;
box-sizing: border-box;
cursor: pointer;
box-shadow: 0 1px 4px rgb(15 23 36 / 0.3);
}
.ed-step-badge.sel { background: var(--accent); color: var(--accent-on); }
.ed-step-badge:hover { transform: scale(1.15); }
.ed-comment-marker {
position: absolute;
pointer-events: auto;
width: 19px;
height: 19px;
border: none;
border-radius: 50% 50% 50% 3px;
background: var(--accent);
color: var(--accent-on);
font: 700 10px/19px inherit;
font-family: inherit;
text-align: center;
padding: 0;
cursor: pointer;
box-shadow: 0 2px 6px rgb(20 30 45 / 0.25);
}
.ed-comment-marker.resolved { opacity: 0.35; }
.ed-comment-marker:hover { transform: scale(1.15); }
.ed-comment-pop {
position: fixed;
z-index: 210;
width: 300px;
background: var(--surface);
border: 1px solid var(--line);
border-radius: 12px;
box-shadow: 0 12px 32px rgb(15 23 36 / 0.18);
padding: 12px 14px;
}
.ed-comment-me {
float: right;
border: none;
background: none;
font: 600 10px/1.4 inherit;
font-family: inherit;
color: var(--muted);
cursor: pointer;
padding: 0;
}
.ed-comment-me:hover { color: var(--accent-ink); }
.ed-comment-pop-head {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 8px;
}
.ed-comment-pop-head {
font-size: 10.5px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.07em;
color: var(--muted);
margin-bottom: 8px;
}
.ed-comment-entries { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.ed-comment-entry b { font-size: 12.5px; }
.ed-comment-entry .ed-comment-time { font-size: 11px; color: var(--muted); margin-inline-start: 5px; }
.ed-comment-entry p { margin: 2px 0 0; font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.ed-comment-reply { width: 100%; margin-top: 10px; }
.ed-comment-pop-foot { display: flex; gap: 6px; margin-top: 8px; }
.ed-comment-pop-foot .ed-btn { border: 1px solid var(--line); flex: 1; justify-content: center; padding: 5px 6px; font-size: 12px; }
.ed-thumb-cmt {
position: absolute;
bottom: 5px;
inset-inline-end: 5px;
z-index: 2;
width: 9px;
height: 9px;
border-radius: 50% 50% 50% 2px;
background: var(--accent);
box-shadow: 0 0 0 2px #fff;
}
/* layout picker — popover over the New-slide button */
.ed-layoutpick {
position: fixed;
z-index: 200;
background: var(--surface);
border: 1px solid var(--line);
border-radius: 12px;
box-shadow: 0 12px 32px rgb(15 23 36 / 0.18);
padding: 12px 14px;
max-width: 420px;
max-height: calc(100vh - 16px);
overflow-y: auto;
}
.ed-layoutpick-title {
font-size: 13px;
font-weight: 700;
margin: 2px 2px 10px;
}
.ed-layoutpick-h {
font-size: 10.5px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.07em;
color: var(--muted);
margin: 4px 2px 8px;
}
.ed-layoutpick-h + .ed-layoutpick-h, .ed-layoutpick-grid + .ed-layoutpick-h { margin-top: 14px; }
.ed-layoutpick-grid {
display: grid;
grid-template-columns: repeat(3, auto);
gap: 10px;
}
.ed-layoutpick-item {
position: relative;
cursor: pointer;
border: 2px solid var(--line);
border-radius: 8px;
padding: 3px;
text-align: center;
transition: border-color 0.12s ease;
}
.ed-layoutpick-item:hover { border-color: var(--accent); }
.ed-layoutpick-name {
font-size: 11px;
color: var(--muted);
margin-top: 3px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 110px;
}
.ed-layoutpick-del {
position: absolute;
top: -7px;
inset-inline-end: -7px;
width: 18px;
height: 18px;
border: none;
border-radius: 50%;
background: #c9302c;
color: #fff;
font-size: 10px;
line-height: 1;
padding: 0;
cursor: pointer;
display: none;
}
.ed-layoutpick-item:hover .ed-layoutpick-del { display: block; }
/* slide-insertion gaps between sidebar thumbnails */
.ed-insertgap {
flex: none;
width: 100%;
height: 12px;
margin: -11px 0; /* overlap the sidebar's flex gap so spacing stays as-is */
position: relative;
z-index: 3;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
opacity: 0;
transition: opacity 0.12s ease;
}
.ed-insertgap:hover { opacity: 1; }
.ed-insertgap::before {
content: '';
position: absolute;
left: 6%;
right: 6%;
top: 50%;
height: 2px;
margin-top: -1px;
border-radius: 1px;
background: var(--blue);
}
.ed-insertgap-btn {
position: relative;
z-index: 1;
border: none;
background: var(--blue);
color: var(--surface);
border-radius: 50%;
width: 16px;
height: 16px;
font-size: 11px;
line-height: 1;
padding: 0;
cursor: pointer;
}
/* color + alpha pair, and gradient stop rows */
.ed-coloralpha { display: flex; align-items: center; gap: 6px; }
.ed-coloralpha input[type='number'] { width: 52px; }
.ed-gradstop { display: flex; align-items: center; gap: 6px; }
.ed-gradstop > input[type='number'] { width: 44px; }
.ed-gradstop .ed-btn-icon { padding: 2px 6px; }
/* resizable side panels — thin grab strips between panel and canvas */
.ed-resizer {
flex: none;
width: 5px;
cursor: col-resize;
background: transparent;
transition: background .12s ease .08s;
}
.ed-resizer:hover, body.ed-col-resizing .ed-resizer { background: rgb(91 141 239 / 0.45); }
body.ed-col-resizing { cursor: col-resize; user-select: none; }
.ed-noanim { transition: none !important; }
/* against a collapsed panel the strip only carries the reopen chevron */
.ed-sidebar.ed-collapsed + .ed-resizer,
.ed-resizer:has(+ .ed-props.ed-collapsed) { cursor: default; }
.ed-sidebar.ed-collapsed + .ed-resizer:hover,
.ed-resizer:has(+ .ed-props.ed-collapsed):hover { background: transparent; }
/* collapsible side panels */
.ed-sidebar, .ed-props { transition: width .18s ease, padding .18s ease; }
.ed-sidebar.ed-collapsed, .ed-props.ed-collapsed {
width: 0;
min-width: 0; /* flex items floor at min-content without this */
padding-left: 0;
padding-right: 0;
border-width: 0;
overflow: hidden;
}
/* interactive states read as secondary in Reveal's overview grid
(!important: Reveal positions overview sections with inline styles) */
.bento-present-overlay .reveal.overview section[data-bento-state] {
opacity: 0.35 !important;
outline: 2px dashed rgb(255 255 255 / 0.35);
outline-offset: -2px;
}
/* PDF export: each linear slide is one exact 1600×900 page */
#bento-print { display: none; }
@media print {
#app, #bento-splash, .bento-present-overlay, .ed-toast { display: none !important; }
#bento-print { display: block; }
@page { size: 1600px 900px; margin: 0; }
#bento-print .bp-page {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
width: 1600px;
height: 900px;
overflow: hidden;
page-break-after: always;
break-after: page;
}
}
/* moveable accents */
.moveable-control-box {
--moveable-color: var(--blue);
}
/* ————— speaker view popup ————— */
.bento-speaker {
margin: 0;
background: #14181d;
color: #e9edf3;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
user-select: none;
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
}
/* idle placeholder shown before/after a presentation drives the notes window */
.sv-idle {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 14px;
text-align: center;
padding: 8vw;
box-sizing: border-box;
}
.sv-idle-title { font-size: 28px; font-weight: 700; color: #e9edf3; }
.sv-idle-msg { max-width: 30ch; margin: 0; font-size: 16px; line-height: 1.6; color: #9fb0c3; }
.sv-top { display: flex; align-items: baseline; gap: 22px; padding: 14px 22px 10px; }
.sv-timer {
font: 700 30px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
font-variant-numeric: tabular-nums;
cursor: pointer;
}
.sv-timer:hover { color: var(--accent); }
.sv-clock { font-size: 15px; color: #9fb0c3; }
.sv-count { font-size: 15px; color: #9fb0c3; font-variant-numeric: tabular-nums; }
.sv-ctrls { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.sv-btn {
width: 34px;
height: 30px;
border-radius: 7px;
border: 1px solid #2b333f;
background: #1e242c;
color: #cdd6e2;
font-size: 15px;
line-height: 1;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
}
.sv-btn:hover:not([disabled]) { background: #2a323c; color: #fff; }
.sv-btn[disabled] { opacity: 0.35; cursor: default; }
.sv-btn.active { background: var(--accent); border-color: var(--accent); color: #14181d; }
.sv-main { display: flex; gap: 22px; padding: 14px 22px; align-items: flex-start; flex: 1; min-height: 0; }
.sv-frame {
position: relative;
overflow: hidden;
background: #000;
border-radius: 8px;
box-shadow: 0 8px 28px rgb(0 0 0 / 0.5);
flex: none;
}
.sv-frame.end {
display: flex;
align-items: center;
justify-content: center;
color: #5b6472;
font-size: 14px;
background: #1a2029;
}
.sv-side { flex: 1; align-self: stretch; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 16px; }
.sv-label {
font-size: 10.5px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: #9fb0c3;
margin-bottom: 6px;
}
.sv-notes-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sv-notes {
flex: 1;
overflow-y: auto;
white-space: pre-wrap;
font-size: 16px;
line-height: 1.65;
color: #e9edf3;
user-select: text;
}
/* --- presenter view: thumbnail rail + all-slides grid ----------------- */
.sv-rail {
flex: none;
display: flex;
gap: 10px;
padding: 12px 22px;
overflow-x: auto;
overflow-y: hidden;
border-top: 1px solid #232a33;
background: #10141a;
}
.sv-thumb {
position: relative;
flex: none;
padding: 0;
border: 2px solid transparent;
border-radius: 8px;
background: #000;
cursor: pointer;
line-height: 0;
overflow: hidden;
}
.sv-thumb:hover { border-color: #4a5a72; }
.sv-thumb.current { border-color: var(--accent); }
.sv-thumb .sv-frame { box-shadow: none; border-radius: 0; }
.sv-thumb-n {
position: absolute;
left: 4px;
bottom: 4px;
min-width: 16px;
padding: 1px 5px;
border-radius: 9px;
background: rgb(0 0 0 / 0.62);
color: #e9edf3;
font-size: 11px;
font-weight: 700;
line-height: 1.4;
text-align: center;
}
.sv-thumb.current .sv-thumb-n { background: var(--accent); color: #14181d; }
.sv-grid {
position: fixed;
inset: 0;
z-index: 10;
background: rgb(9 12 16 / 0.94);
overflow-y: auto;
padding: 28px;
}
.sv-grid[hidden] { display: none; }
.sv-grid-inner {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 16px;
justify-items: center;
}
/* line / curve / connector endpoint handles */
.ed-le-anchor { transition: r 0.08s ease; }
.ed-le-anchor:hover { fill: #eaf1ff; }
/* audience blackout — a plain black cover over the slides overlay */
.bento-blackout {
position: absolute;
inset: 0;
z-index: 60;
background: #000;
}
.bento-blackout[hidden] { display: none; }
/* Reveal steps (fx.step): an element whose step has not come yet. Visibility,
not display — it keeps its box (nothing reflows when it appears), keeps
morph and layout measurements honest, and its entrance tween can start
from opacity 0 the moment the class comes off. Present-mode only. */
.bento-present-overlay .bento-step-hidden { visibility: hidden !important; pointer-events: none; }
/* transient confirmation pill in present mode (e.g. Reduced motion on/off) */
.bento-present-toast {
position: absolute;
left: 50%;
bottom: 48px;
transform: translateX(-50%);
z-index: 61;
background: rgb(20 30 45 / 0.82);
color: #fff;
font-size: 14px;
padding: 8px 16px;
border-radius: 999px;
pointer-events: none;
opacity: 0;
transition: opacity 0.25s ease;
}
.bento-present-toast.show { opacity: 1; }
/* --- live broadcast, audience side ------------------------------------- */
/* Follow chip: the viewer's toggle (browse ⇄ follow); disabled under lock. */
.bento-follow-chip {
position: absolute;
top: 14px;
right: 14px;
z-index: 61;
border: 1px solid rgb(255 255 255 / 0.25);
background: rgb(20 30 45 / 0.82);
color: #fff;
font: 500 13px/1.2 system-ui, sans-serif;
padding: 7px 12px;
border-radius: 999px;
cursor: pointer;
opacity: 0.85;
}
.bento-follow-chip:hover { opacity: 1; }
.bento-follow-chip.following { border-color: var(--bento-accent, var(--accent)); }
.bento-follow-chip[disabled] { cursor: default; opacity: 0.7; }
/* Status card: waiting for the presenter / the show has ended / ticket dead. */
.bento-show-card {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 61;
background: rgb(20 30 45 / 0.9);
color: #fff;
font: 500 16px/1.4 system-ui, sans-serif;
padding: 16px 24px;
border-radius: 12px;
max-width: 70vw;
text-align: center;
pointer-events: none;
}
.bento-show-card[hidden] { display: none; }
/* --- live collaboration ----------------------------------------------- */
.ed-avatars {
display: flex;
align-items: center;
margin-inline: 2px 6px;
flex-shrink: 0;
}
.ed-avatar {
width: 24px;
height: 24px;
border-radius: 50%;
border: 2px solid rgba(255, 255, 255, 0.85);
color: #16273e;
font: 700 11px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
padding: 0;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
/* overlap into a coin-stack so N avatars stay bounded in width */
margin-inline-start: -7px;
}
.ed-avatars .ed-avatar:first-child {
margin-inline-start: 0;
}
.ed-avatar:hover {
transform: translateY(-1px);
z-index: 1;
}
/* the "+N" overflow pill — widens to fit the count, opens the Live panel */
.ed-avatar-more {
width: auto;
min-width: 24px;
padding: 0 6px;
border-radius: 11px;
background: #4a5a72;
color: #fff;
font-size: 10.5px;
}
.ed-remote-layer {
position: absolute;
inset: 0;
pointer-events: none;
z-index: 40;
}
.ed-remote-box {
position: absolute;
border: 2px solid;
border-radius: 2px;
pointer-events: none;
}
.ed-remote-box.ed-remote-editing {
border-style: dashed;
}
.ed-remote-tag {
position: absolute;
top: -22px;
left: -2px;
padding: 2px 7px;
border-radius: 4px;
color: #16273e;
font: 600 11px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
white-space: nowrap;
}
.ed-share-pop {
min-width: 250px;
max-width: 290px;
padding: 12px;
gap: 7px;
inset-inline-end: 0;
inset-inline-start: auto;
}
.ed-share-label {
font-size: 10.5px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.07em;
color: var(--muted);
margin-top: 3px;
}
.ed-share-note {
font-size: 12px;
line-height: 1.45;
color: var(--muted);
}
.ed-share-status {
font-size: 12.5px;
font-weight: 600;
color: #b8860b;
}
.ed-share-status.ok { color: #2e8b57; }
/* Share's actions are plain menu rows, the same as Save as: 12.5px, one line,
a hover fill and nothing at rest. They were boxed buttons (2026-07-20, so
they would not read as text among the panel's notes); the SHARE A COPY
heading and the icons do that now, and the boxes made the panel busier. */
.ed-share-btn { width: 100%; justify-content: flex-start; text-align: start; font-size: 12.5px; }
.ed-share-btn svg { flex: none; }
/* the panel's 7px gap spaces its sections (name, people, status); between two
action rows it would make a list of rows look like a stack of chips —
adjacent rows touch, as they do in every other menu */
.ed-share-pop > .ed-share-btn + .ed-share-btn { margin-block-start: -7px; }
/* divider usable in any dropdown menu */
.ed-menu-sep { height: 1px; background: var(--line); margin: 3px 2px; }
.ed-lang-on { font-weight: 700; }
.ed-lang-on::after { content: ' ✓'; color: var(--accent-ink); }
/* Save is a split button: [ Save |▾] one visual unit. The caret button is
NESTED inside the .ed-dropdown wrapper, so stretch through the wrapper. */
.ed-split { display: inline-flex; align-items: stretch; }
/* PRIMARY (maintainer ruling D1, both apps): saving is the act every session
ends with, so Save and its caret are one ink-filled unit — the same inverse
pairing as .ed-btn-primary (--surface on --ink: 14.5:1 light, 12.6:1 dark). */
.ed-split > .ed-btn:first-child {
border-start-start-radius: 8px;
border-end-start-radius: 8px;
border-start-end-radius: 0;
border-end-end-radius: 0;
border: 1px solid var(--ink);
border-inline-end: none;
background: var(--ink);
color: var(--surface);
}
.ed-split .ed-dropdown { display: flex; align-items: stretch; }
.ed-split-caret {
height: 100%;
display: inline-flex;
align-items: center;
border-start-start-radius: 0;
border-end-start-radius: 0;
border-start-end-radius: 8px;
border-end-end-radius: 8px;
border: 1px solid var(--ink);
/* a hairline in the text colour divides the two halves on the ink */
border-inline-start-color: color-mix(in srgb, var(--surface) 35%, var(--ink));
background: var(--ink);
color: var(--surface);
padding: 6px 7px;
}
/* The two HALVES only. A descendant `.ed-split .ed-btn:hover` also matched
the Save-as menu's rows (they are .ed-btn inside the split's dropdown), so
a hovered row became a solid ink bar with its ink text invisible on it. */
.ed-split > .ed-btn:first-child:hover, .ed-split-caret:hover { background: var(--ink-2); border-color: var(--ink-2); }
.ed-caret { font-size: 10px; line-height: 1; }
/* quiet divider between share actions and advanced session controls */
.ed-share-sep { height: 1px; background: var(--line); margin: 2px 0; }
/* bottom-end cluster: [Slideshow pill] [zoom pill] */
.ed-corner-br {
position: absolute;
/* the present/zoom cluster sits in the corner most likely to be clipped.
Kept LOGICAL (inset-inline-end, not right) so the cluster still lands in
the correct corner under RTL — ar/fa/he/ur ship as language packs. */
inset-inline-end: max(14px, env(safe-area-inset-right), var(--tray-safe-right, 0px));
bottom: max(14px, env(safe-area-inset-bottom), var(--tray-safe-bottom, 0px));
display: flex;
align-items: center;
gap: 10px;
z-index: 11;
}
.ed-corner-br .ed-zoombar { position: static; }
.ed-present-pill {
display: inline-flex;
align-items: stretch;
background: var(--surface);
border: 1px solid var(--line);
border-radius: 999px;
box-shadow: 0 4px 14px rgb(20 30 45 / 0.10);
overflow: visible;
}
/* a neon coral "runner" light chases around the pill's edge — as a first-run
nudge to show how to start a show, AND on hover as an ongoing affordance. A
conic-gradient ring (masked to just the border with the padding-box exclude
trick) rotates via @property --ed-runner-a, so a bright coral comet with a
hot tip runs the perimeter; a drop-shadow gives it the neon glow.
First run: a few laps then it fades (JS drops .ed-hint-pulse when the fade
ends, so hover takes over cleanly). Hover: loops while the pointer's over,
then fades out on leave.
The runner layer is ALWAYS present (invisible at rest) so its opacity can
transition out on mouse-leave — a disappearing ::after can't fade. Its spin
is animation-play-state: paused while idle, so there's no cost when it isn't
showing, and on leave it freezes in place (paused holds the angle) and fades
rather than snapping back to 0deg. */
@property --ed-runner-a {
syntax: '<angle>';
inherits: false;
initial-value: 0deg;
}
.ed-present-pill { position: relative; }
.ed-present-pill::after {
content: '';
position: absolute;
inset: -1px;
border-radius: inherit;
padding: 3px;
background: conic-gradient(from var(--ed-runner-a), /* peach = wordmark slash #FF9E8A */
rgb(255 158 138 / 0) 0deg,
rgb(255 158 138 / 0) 225deg,
rgb(255 158 138 / 0.55) 300deg,
rgb(255 184 168 / 1) 345deg,
rgb(255 244 238 / 1) 357deg,
rgb(255 158 138 / 0) 360deg);
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
filter: drop-shadow(0 0 2px rgb(255 170 152 / 0.95)) drop-shadow(0 0 7px rgb(255 158 138 / 0.6));
pointer-events: none;
opacity: 0;
transition: opacity 0.5s ease; /* fade OUT on mouse-leave */
animation: ed-runner 1.3s linear infinite;
animation-play-state: paused; /* idle until hover/hint runs it */
}
.ed-present-pill:hover::after {
opacity: 1;
transition: opacity 0.15s ease; /* fade IN quick */
animation-play-state: running;
}
.ed-present-pill.ed-hint-pulse::after {
animation: ed-runner 1.3s linear 5, ed-runner-fade 6.5s ease-out 1 forwards;
}
@keyframes ed-runner { to { --ed-runner-a: 360deg; } }
@keyframes ed-runner-fade { 0% { opacity: 0; } 10%, 86% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
.ed-present-pill::after { transition: none; }
.ed-present-pill.ed-hint-pulse::after,
.ed-present-pill:hover::after {
animation: none;
background: rgb(255 158 138 / 0.85);
opacity: 1;
}
}
.ed-present-pill .ed-pill-main {
border-start-start-radius: 999px;
border-end-start-radius: 999px;
border-start-end-radius: 0;
border-end-end-radius: 0;
padding-block: 6px;
padding-inline: 14px 10px;
font-weight: 600;
}
.ed-present-pill .ed-pill-caret {
border-start-start-radius: 0;
border-end-start-radius: 0;
border-start-end-radius: 999px;
border-end-end-radius: 999px;
border-inline-start: 1px solid var(--line);
padding-block: 6px;
padding-inline: 7px 10px;
}
.ed-present-pill .ed-btn:hover { background: var(--chrome); }
/* its menu drops UP (the pill sits at the bottom edge) */
.ed-present-pill .ed-menu { top: auto; bottom: calc(100% + 6px); inset-inline-start: auto; inset-inline-end: 0; }
.ed-share-peers { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; }
.ed-share-me {
display: flex;
align-items: center;
gap: 7px;
padding: 4px 6px;
border-radius: 7px;
background: var(--chrome);
font-size: 12.5px;
}
.ed-share-me .who { font-weight: 600; }
.ed-share-me .where { margin-inline-start: auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
/* Your own row: the NAME stays whole and the key gives way. The shared
.ed-share-peer rules below do the opposite (a peer's "on slide 3" is short;
their name is what can run long), which cut "Guest (you)" to "Guest (y…"
beside a 20-character key. The key is a fingerprint you compare by its
start, and its full form is in the row's tooltip. A very long name still
yields at 65%. Doubled class: the peer rules come later in the file. */
.ed-share-peer.ed-share-me .who { flex: none; max-width: 65%; }
.ed-share-peer.ed-share-me .where { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: end; }
.ed-share-peer {
display: flex;
align-items: center;
gap: 8px;
padding: 4px 6px;
border: none;
background: none;
border-radius: 6px;
font-size: 12.5px;
color: var(--ink);
cursor: pointer;
text-align: start;
width: 100%;
}
.ed-share-peer:hover { background: rgba(94, 118, 153, 0.1); }
.ed-share-peer .dot {
width: 10px;
height: 10px;
border-radius: 50%;
flex: none;
}
.ed-share-peer .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-share-peer .where { color: var(--muted); font-size: 11.5px; flex: none; }
.ed-share-peer .kick {
flex: none;
width: 18px;
height: 18px;
line-height: 18px;
text-align: center;
border-radius: 5px;
color: #a0323c;
font-size: 12px;
}
.ed-share-peer .kick:hover { background: rgba(160, 50, 60, 0.12); }
/* Live button status dot: always present — grey when dormant (not sharing),
amber+pulsing while connecting, green when live. The dot makes the on/off
state legible at a glance instead of the button looking inert. */
.ed-btn-share,
.ed-btn-live { position: relative; }
.ed-btn-share::after,
.ed-btn-live::after,
.ed-btn-connecting::after {
content: '';
position: absolute;
top: 3px;
inset-inline-end: 3px;
width: 7px;
height: 7px;
border-radius: 50%;
background: #9aa4b2; /* dormant / not sharing */
}
.ed-btn-share.ed-btn-connecting::after,
.ed-btn-connecting::after { background: #d9a13b; animation: ed-live-pulse 1.1s ease-in-out infinite; }
.ed-btn-share.ed-btn-live::after,
.ed-btn-live::after { background: #34a866; animation: none; }
@keyframes ed-live-pulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.3 } }
/* about rows wrap instead of overflowing the dialog */
.ed-about-row {
flex-wrap: wrap;
}
.ed-about-row .ed-btn {
max-width: 100%;
white-space: normal;
text-align: start;
}
.ed-about-meta-wrap { flex-direction: column; align-items: stretch; gap: 5px; }
.ed-about-h { font-weight: 700; font-size: 13px; margin: 2px 0; }
.ed-about-meta { display: flex; align-items: center; gap: 8px; }
.ed-about-meta label { flex: 0 0 80px; font-size: 12px; color: var(--ink-2); }
.ed-about-meta input { flex: 1; min-width: 0; }
/* collaborate popover: your-name field */
.ed-share-name {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: var(--muted);
}
.ed-share-name input { flex: 1; min-width: 0; }
/* --- responsive topbar: labels give way, never a scrollbar ----------------
The tiers are CLASSES, not width breakpoints. editor.ts fitTopbar()
MEASURES the bar and steps down a tier while it still overflows. Width
breakpoints were wrong here because the same buttons need a different
amount of room at the same viewport width (OS text scaling, browser zoom,
wider translations, the update chip or the avatar strip appearing), and
every one of those cases used to clip the end of the bar.
ed-bar-compact hides button labels, ed-bar-tight drops the wordmark,
ed-bar-fold moves buttons into menus (applyPhoneChrome). */
.ed-topbar { min-width: 0; }
.ed-topbar .ed-group { flex-shrink: 0; }
.ed-logo { flex-shrink: 0; }
.ed-title { flex: 0 1 220px; min-width: 48px; }
.ed-topbar.ed-bar-compact .ed-btn > span { display: none; } /* icons + tooltips take over */
.ed-topbar.ed-bar-compact .ed-btn.ed-btn-update > span { display: inline; } /* version chip is signal */
/* the Save caret's ▾ is its only content, not a label — hiding it left an
empty 16px button */
.ed-topbar.ed-bar-compact .ed-btn > span.ed-caret { display: inline; }
/* …but NEVER inside an open dropdown/menu — those items are text; hiding
their labels left icon-only mystery menus on phones. */
.ed-topbar.ed-bar-compact .ed-menu .ed-btn > span,
.ed-topbar.ed-bar-compact .ed-menu button > span { display: inline; }
/* keep the safe-area insets — a bare padding here would undo them */
.ed-topbar.ed-bar-compact {
gap: 6px;
padding: max(8px, env(safe-area-inset-top), var(--tray-safe-top, 0px)) max(8px, env(safe-area-inset-right), var(--tray-safe-right, 0px))
8px max(8px, env(safe-area-inset-left), var(--tray-safe-left, 0px));
}
/* Narrow HORIZONTALLY only: 14 -> 6 reclaims 16px of the width a cramped bar is
short of, which is what this tier is for. The vertical padding stays at 8 —
shrinking it saved 4px of canvas nobody asked for and made the toolbar
visibly change height as a window was dragged. The tighter vertical padding
lives in the phone rule below, where 44px touch targets already set the
height and small-screen space actually is scarce. */
.ed-topbar.ed-bar-tight {
gap: 4px;
padding: max(8px, env(safe-area-inset-top), var(--tray-safe-top, 0px)) max(6px, env(safe-area-inset-right), var(--tray-safe-right, 0px))
8px max(6px, env(safe-area-inset-left), var(--tray-safe-left, 0px));
}
.ed-topbar.ed-bar-tight .ed-logo > b { display: none; } /* mark only — the icon is the brand */
/* --- fold: the bar cannot fit, so most of it moves into menus -------------
Hiding labels is not enough — 17 icon buttons at 36px plus gaps is an
irreducible ~684px floor. When even the tight tier overflows (every phone,
and a desktop window under heavy zoom or huge system text) fitTopbar adds
ed-bar-fold and applyPhoneChrome() REPARENTS the low-priority controls
into "+" and "⋯" dropdowns, leaving: logo · title · ☰ · + · undo · format ·
save · ⋯ . Labels come back inside menus via the compact rule above. */
/* the phone-only controls exist in the DOM at every width; only the fold class
shows them, so applyPhoneChrome never has to create or destroy anything */
.ed-phone-only { display: none; }
.ed-phone-tools { display: contents; }
.ed-topbar.ed-bar-fold .ed-phone-only { display: inline-flex; }
/* Save stays one tap; its save-AS caret does not fit beside the fold's small
set of buttons and is the least-used half. The list it opens is not lost —
editor.ts appends it to the bottom of ⋯ while the fold is on. */
.ed-topbar.ed-bar-fold .ed-split-caret { display: none; }
.ed-topbar.ed-bar-fold .ed-split > .ed-btn:first-child {
border-start-end-radius: 8px;
border-end-end-radius: 8px;
border-inline-end: 1px solid var(--ink);
}
/* ⋯ carries the demoted buttons AND that list, so it can outgrow the
screen in BOTH directions.
Down: without a bound it runs off the bottom, and a dropdown is absolutely
positioned, so nothing else can scroll it back into reach.
Sideways: these menus open from buttons in the right half of a 402px bar,
and a start-anchored menu grows AWAY from the screen — ⋯ sits at x≈374, so
even the old six short rows were partly cut off. Anchoring to the end grows
them inward instead. */
.ed-topbar.ed-bar-fold .ed-menu {
inset-inline-start: auto;
inset-inline-end: 0;
max-width: calc(100vw - 16px);
max-height: calc(100dvh - 96px);
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
/* A demoted widget's own popover opens INLINE, inside the ⋯ list.
The rule above bounds the height of a menu that can outgrow the screen, and
`overflow-y: auto` cannot be had on its own — a browser computes
`overflow-x` to `auto` too, so that menu silently became a CLIPPING box for
anything positioned inside it. Share is the case that showed it: phone
chrome demotes the whole dropdown into ⋯, and `.ed-share-pop` is a 250px
popover anchored to its parent's end, so inside a 200px menu it hung 55px
off the left edge and 69px below the bottom. Both overhangs were cut away,
and since the properties panel sits under exactly that strip, the panel
showed THROUGH the gap — the popover looked interleaved with the panel
behind it.
A floating child cannot escape a scroll container, so it stops floating:
inside ⋯ these render as a section of the list, scrolling with it and
taking its width. Nothing can be clipped because nothing overhangs. */
.ed-topbar.ed-bar-fold .ed-menu .ed-menu {
position: static;
min-width: 0;
max-width: none;
max-height: none;
overflow: visible;
box-shadow: none;
background: transparent;
border: 0;
border-radius: 0;
border-block: 1px solid var(--line);
margin-block: 3px;
padding-inline: 6px;
}
/* --- phones proper: viewport-scoped chrome that is about TOUCH and small
screens, not about whether the bar fits, so it stays a media query */
@media (max-width: 700px) {
/* 44px targets already set the bar's height here, so the tighter vertical
padding costs nothing visible and buys back 4px where space is scarcest.
`.ed-bar-tight` is listed explicitly: a media query adds NO specificity, so
a bare `.ed-topbar` here (0,1,0) loses to the tier class (0,2,0) and the
phone bar silently keeps the desktop padding. Measured — it did. */
.ed-topbar,
.ed-topbar.ed-bar-tight {
padding: max(6px, env(safe-area-inset-top), var(--tray-safe-top, 0px)) max(6px, env(safe-area-inset-right), var(--tray-safe-right, 0px))
6px max(6px, env(safe-area-inset-left), var(--tray-safe-left, 0px));
}
/* HIG touch targets — a 36px icon is a mis-tap on glass */
.ed-topbar .ed-btn { min-width: 44px; min-height: 44px; justify-content: center; }
/* the wordmark is a button too (About), and on a phone it is the mark alone */
.ed-topbar .ed-logo { min-width: 44px; min-height: 44px; justify-content: center; }
/* menu rows are text, not targets — and read from the start edge; the
centring above is for the bar's icon buttons and used to leak in here */
.ed-topbar .ed-menu .ed-btn { min-width: 0; justify-content: flex-start; }
.ed-title { flex: 0 1 220px; }
.ed-phone-tools {
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
flex: 1 1 auto;
min-inline-size: max-content;
}
.ed-topbar .ed-group-right {
margin-inline-start: 0;
inline-size: fit-content;
flex: 0 0 auto;
}
/* Panels become OVERLAY DRAWERS. As flex siblings the 188px sidebar left a
214px canvas on a 402px screen — the thing you are editing became the
smallest thing on screen. */
.ed-sidebar, .ed-props {
position: absolute;
top: 0;
bottom: 0;
z-index: 40;
box-shadow: 0 0 40px rgb(15 23 36 / 0.18);
background: var(--chrome);
}
.ed-sidebar { left: 0; }
.ed-props { right: 0; }
.ed-sidebar.ed-collapsed, .ed-props.ed-collapsed { box-shadow: none; }
.ed-main { position: relative; }
/* the 16px resizer chevrons are replaced by real buttons in the bar */
.ed-panel-toggle { display: none; }
.ed-title { min-width: 0; }
/* Folding is not enough on the narrowest phones. Even fully folded the bar
needs ~356px — six 44px targets, the mark and the title — and an iPhone SE
(or any iPhone with Display Zoom on) is 320px wide. `.ed-root` sets
`overflow: hidden` so a wide bar can never turn into DOCUMENT scroll, and
the consequence was that the overflow was simply CUT OFF: ⋯ — which on a
phone carries Redo, Comment, PDF, Share, Language, Help and the whole
save-as list — hung 36px off the edge and could not be reached at all.
So the bar scrolls itself. The clipped button is now a partly-visible one,
which is its own affordance, and the fix keeps scaling if the bar ever
gains another control. */
.ed-topbar {
overflow-x: auto;
/* a sideways flick on the bar must not rubber-band the page behind it */
overscroll-behavior-x: contain;
scrollbar-width: none;
-webkit-overflow-scrolling: touch;
}
.ed-topbar::-webkit-scrollbar { display: none; }
/* A scroll container clips its children in BOTH axes, so the menus hanging
off + and ⋯ would now be cut off by the bar itself. `fixed` takes them out
of that clip; it costs nothing extra to anchor, because the rule above
already pins these menus to the end of the screen rather than to their
trigger. The only thing they still need from the layout is where the bar
ends, which editor.ts publishes as --ed-bar-bottom. */
.ed-topbar .ed-dropdown.open > .ed-menu {
position: fixed;
top: calc(var(--ed-bar-bottom, 56px) + 4px);
inset-inline-end: max(6px, env(safe-area-inset-right), var(--tray-safe-right, 0px));
inset-inline-start: auto;
}
}
/* panel collapse chevrons live ON the resizer strips, not in the topbar */
.ed-resizer { position: relative; }
.ed-panel-toggle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 16px;
height: 44px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--surface);
/* --muted, not a literal: the background follows --surface, so a fixed
grey-blue that read at 5.41:1 on white sat at 2.81:1 on the dark surface,
under the 4.5 floor. With the token it is 5.98:1 light, 5.02:1 dark. */
color: var(--muted);
font-size: 11px;
line-height: 1;
padding: 0;
cursor: pointer;
z-index: 15;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 1px 4px rgba(20, 30, 45, 0.12);
}
.ed-panel-toggle:hover { color: var(--ink); border-color: #b9c3d2; }
/* menus that hang off a topbar control at the END of the bar open toward the
bar's start, so they can never overflow the window edge — in either
direction (the language menu sets the same anchoring from JS). */
.ed-save-menu, .ed-lang-menu {
inset-inline-end: 0;
inset-inline-start: auto;
}
.ed-save-menu { min-width: 190px; }
.ed-save-menu .ed-btn { font-size: 12.5px; }
/* D2 (revised 2026-09-26): Save as and Share keep one-line rows and put each
description in the tooltip, with the same text in a visually-hidden node for
aria-describedby (editor.ts menuLabel). The Save list keeps spaces' width
for the same list (240–264). */
.ed-save-menu { width: min(264px, calc(100vw - 16px)); }
/* A long list on a short window (phone landscape, a split screen) must not
run off the bottom with its last commands unreachable: it scrolls within
the space under the bar. Safe to make a scroll box (hard-won #10): nothing in
it floats. --ed-bar-bottom is published by editor.ts. */
.ed-save-menu { max-height: calc(100dvh - var(--ed-bar-bottom, 56px) - 12px); overflow-y: auto; }
/* present for assistive tech, absent for the eye */
.ed-sr-only {
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* A designed keyboard ring, the kernel's (kernel/src/ui/menu.css .bkm-item):
--accent-ink, 2px. Bar and dialog buttons draw it OUTSIDE, on the surface
they sit on (inside, it would sit on Save's ink fill); rows in a menu draw
it INSIDE, where the list's own padding would clip it. :focus-visible, so
a pointer never sees it. */
.ed-btn:focus-visible, .ed-logo:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.ed-menu .ed-btn:focus-visible { outline-offset: -2px; }
/* when the adjacent panel is collapsed the chevron pins fully on-screen,
docked to the edge like a drawer pull */
.ed-sidebar.ed-collapsed + .ed-resizer .ed-panel-toggle {
inset-inline-start: 0;
transform: translateY(-50%);
border-start-start-radius: 0;
border-end-start-radius: 0;
}
.ed-resizer:has(+ .ed-props.ed-collapsed) .ed-panel-toggle {
inset-inline-start: auto;
inset-inline-end: 0;
transform: translateY(-50%);
border-start-end-radius: 0;
border-end-end-radius: 0;
}
/* floating present buttons, bottom-LEFT of the work area (zoombar owns the
right corner); side by side so neither ever covers the slide above */
/* right panel: no horizontal scrollbar, ever */
.ed-props {
overflow-x: hidden;
scrollbar-gutter: stable;
}
.ed-props .ed-row { flex-wrap: wrap; }
.ed-props input[type='number'] { min-width: 0; }
.ed-props select { max-width: 100%; min-width: 0; }
.ed-props input[type='text'] { min-width: 0; max-width: 100%; }
/* ————— password gate (encrypted files) + read-only player ————— */
.ed-pwgate, .ed-player {
position: fixed;
inset: 0;
z-index: 2000;
background: #0D1B2E;
display: flex;
align-items: center;
justify-content: center;
color: rgb(182 193 210 / 0.92);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
text-align: center;
}
.ed-pwcard, .ed-playercard {
max-width: 380px;
padding: 28px;
display: flex;
flex-direction: column;
gap: 14px;
align-items: center;
}
.ed-pwmark { font-size: 40px; }
.ed-pwcard h1, .ed-playercard h1 {
color: #fff;
font-size: 24px;
font-weight: 800;
line-height: 1.2;
}
.ed-pwcard p, .ed-playercard p { font-size: 14px; line-height: 1.5; }
/* The password gate is its own dark card on the boot splash, not the chrome:
it overrides the shared field look on purpose (and its height with it). */
.ed-pwcard input {
height: auto;
width: 100%;
padding: 12px 14px;
border-radius: 10px;
border: 1px solid rgb(255 255 255 / 0.25);
background: rgb(255 255 255 / 0.06);
color: #fff;
font-size: 15px;
text-align: center;
}
.ed-pwcard button, .ed-playercard button {
padding: 12px 26px;
border: 0;
border-radius: 999px;
font-weight: 700;
font-size: 14px;
cursor: pointer;
color: #0D1B2E;
background: linear-gradient(180deg, #FFB29B, #ED8266);
}
.ed-playercard button.ed-playcopy {
background: none;
color: #fff;
border: 1px solid rgb(255 255 255 / 0.3);
}
.ed-pwerr { color: #FF8A7A; font-size: 13px; min-height: 18px; }
/* password dialog (set/change) */
dialog.ed-pwdialog {
border: 0;
border-radius: 14px;
box-shadow: 0 18px 50px rgb(15 23 36 / 0.3);
padding: 20px;
width: 340px;
font-size: 13px;
font-family: inherit;
}
dialog.ed-pwdialog::backdrop { background: rgb(15 23 36 / 0.38); }
dialog.ed-pwdialog h2 { font-size: 15px; margin-bottom: 8px; }
dialog.ed-pwdialog p { color: #667; line-height: 1.5; margin-bottom: 10px; }
dialog.ed-pwdialog label {
display: block;
margin: 8px 0 2px;
font-weight: 600;
color: #334;
}
dialog.ed-pwdialog input { display: block; width: 100%; margin-top: 4px; }
dialog.ed-pwdialog .ed-pwerr { color: #C33; }
.ed-dialog-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 14px;
}
.ed-dialog-actions button {
padding: 8px 16px;
border-radius: 999px;
border: 1px solid #ccd;
background: var(--surface);
font-weight: 600;
cursor: pointer;
}
.ed-dialog-actions button.ed-primary {
border: 0;
color: #0D1B2E;
background: linear-gradient(180deg, #FFB29B, #ED8266);
}
/* ————— tables ————— */
.bento-el-table { overflow: visible; }
.bento-el-table .bento-cell-inner { min-height: 1em; }
/* editor-only affordances */
.ed-root .bento-el-table td { cursor: text; }
.bento-col-handle { border-radius: 3px; }
.bento-col-handle:hover { background: rgba(94, 118, 153, 0.35); }
.bento-el-table.bento-editing td { cursor: text; }
/* table properties: steppers + toggle */
.ed-stepper { display: inline-flex; align-items: center; gap: 6px; }
.ed-stepper .ed-btn-icon { width: 24px; height: 24px; line-height: 1; font-size: 15px; padding: 0; }
.ed-stepper-val { min-width: 20px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; }
input.ed-toggle { width: 16px; height: 16px; accent-color: #5E7699; cursor: pointer; }
/* --- rich text inside a box ------------------------------------------------
Every size here is in `em`, never px: the element's own `fontSize` is the
type scale, so a heading is "larger than this box" rather than a fixed size
that would fight the box it lives in — and resizing the box keeps the whole
hierarchy in proportion. Shared by the canvas, thumbnails, present and
print, because they all go through render.ts. */
.bento-text-inner ul,
.bento-text-inner ol {
margin: 0;
padding-inline-start: 1.35em;
list-style-position: outside;
}
/* Centred or right-aligned text: an `outside` marker stays pinned to the box's
start edge while its line moves away from it, so the bullet ends up floating
on its own. Keeping the marker inside the line keeps the two together — at
the cost of the hanging indent, which only reads as an indent when the text
is start-aligned anyway. */
.bento-text-inner[data-align='center'] ul,
.bento-text-inner[data-align='center'] ol,
.bento-text-inner[data-align='right'] ul,
.bento-text-inner[data-align='right'] ol {
padding-inline-start: 0;
list-style-position: inside;
}
.bento-text-inner li { margin: 0.12em 0; }
.bento-text-inner ul { list-style: disc; }
.bento-text-inner ol { list-style: decimal; }
.bento-text-inner ul ul { list-style: circle; }
.bento-text-inner h1,
.bento-text-inner h2 {
margin: 0 0 0.2em;
line-height: 1.15;
font-weight: 700;
}
.bento-text-inner h1 { font-size: 1.55em; }
.bento-text-inner h2 { font-size: 1.25em; }
/* A heading that opens the box has nothing to separate itself from. */
.bento-text-inner > :first-child { margin-top: 0; }
/* --- selection formatting bar (editor/richtext.ts) -------------------------
Positioned from JS against the VIEWPORT, so the canvas scroller, a side
panel or the topbar can never clip it. */
.ed-fmtbar {
position: fixed;
z-index: 130; /* above the context menu (120), which it can outlive */
display: flex;
align-items: center;
gap: 2px;
padding: 4px;
/* the token, not white: --surface is #ffffff in light and #21262e in dark,
and a chrome surface pinned to a literal puts light text on a light
background the moment the reader is in dark mode */
background: var(--surface);
border: 1px solid var(--line);
border-radius: 10px;
box-shadow: 0 10px 28px rgb(20 30 45 / 0.20);
user-select: none;
}
.ed-fmtbar-btn {
min-width: 30px;
height: 30px;
padding: 0 6px;
border: 0;
border-radius: 7px;
background: transparent;
color: var(--ink);
font: inherit;
font-size: 12.5px;
line-height: 1;
cursor: pointer;
}
.ed-fmtbar-btn:hover { background: var(--hover, #f2f5f9); }
/* --blue INVERTS with the theme (#5b8def light, #7aa5f5 dark), so its text has
to invert with it — main's own `.ed-insertgap-btn` pairs the same token with
var(--surface) for exactly this reason. A literal white here reads fine in
light mode and is the pale-on-pale case the gate exists to catch. */
.ed-fmtbar-btn.is-on { background: var(--blue, #5b8def); color: var(--surface); }
.ed-fmtbar-sep { width: 1px; height: 18px; margin: 0 3px; background: var(--line); }
/* the letter buttons should read as what they do */
.ed-fmtbar-btn[data-cmd='bold'] { font-weight: 700; }
.ed-fmtbar-btn[data-cmd='italic'] { font-style: italic; }
.ed-fmtbar-btn[data-cmd='underline'] { text-decoration: underline; }
.ed-fmtbar-btn[data-cmd='strikeThrough'] { text-decoration: line-through; }
.ed-fmtbar-btn[data-code] { font-family: ui-monospace, Menlo, Consolas, monospace; }
/* On a phone the bar is the only route to formatting, so it must not be
narrower than a thumb — and it may need to wrap rather than run off. */
@media (max-width: 700px) {
.ed-fmtbar {
max-width: calc(100vw - 16px);
flex-wrap: wrap;
justify-content: center;
}
.ed-fmtbar-btn { min-width: 36px; height: 36px; }
}
.ed-fmtbar-btn:disabled { opacity: 0.35; cursor: default; }
.ed-fmtbar-btn:disabled:hover { background: transparent; }
/* Languages dialog: built-in vs installed packs vs available to add. */
.ed-lang-manage { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 2px; }
.ed-lang-sec {
font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
color: var(--muted); margin: 12px 0 4px;
}
.ed-lang-row {
display: flex; align-items: center; gap: 10px; justify-content: space-between;
padding: 7px 0; border-bottom: 1px solid var(--line);
}
.ed-lang-row:last-child { border-bottom: 0; }
.ed-lang-txt { display: flex; flex-direction: column; min-width: 0; }
.ed-lang-txt b { font-size: 13px; font-weight: 600; }
.ed-lang-txt span { font-size: 11.5px; color: var(--muted); }
.ed-lang-blurb { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin: -2px 0 6px; }
.ed-lang-search { width: 100%; margin: 4px 0 6px; }
.ed-lang-scroll {
max-height: 240px; overflow-y: auto;
/* Keep the row's action button clear of the scrollbar — without this the
Add button sits flush against it. The stable gutter stops the list
shifting sideways when the bar appears or goes. */
padding-right: 12px; scrollbar-gutter: stable;
}
.ed-lang-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.ed-lang-acts .ed-btn { white-space: nowrap; }
.ed-lang-warn {
font-size: 11.5px; line-height: 1.5; color: var(--muted);
background: var(--bg); border-left: 2px solid var(--line);
padding: 5px 8px; margin: 0 0 6px; border-radius: 0 5px 5px 0;
}
/* ————— RTL chrome: the marks that don't flip themselves ————————————————————
Logical properties turn the LAYOUT around on their own. These are the few
glyphs that encode a direction in their SHAPE, so they have to be flipped by
hand. Every selector here is chrome — none of it can reach a slide, which
stays LTR-pinned (see the top of this file).
The speaker view (.sv-*) is deliberately absent: it is a separate window
sitting beside the projected show, and it never carries a dir attribute. */
/* Accordion disclosure: a CSS triangle drawn with border-left, pointing "right"
at rest. Open (rotated 90°) points down either way; closed must point the way
the panel reads. */
[dir="rtl"] .ed-sec-toggle.closed::before { transform: translateY(-50%) rotate(180deg); }
/* Undo/redo arrows curl back toward where the text came from. */
[dir="rtl"] .ed-group-history .ed-btn svg { transform: scaleX(-1); }
/* The comment thread's "you are <name>" link rides the far edge of the head. */
[dir="rtl"] .ed-comment-me { float: left; }
/* Coordinates, sizes and JSON are LTR content whatever the interface language:
a base-RTL context renders "-5" as "5-" and reorders a JSON line's brackets.
Panel prose and every text field the user writes words into are untouched. */
[dir="rtl"] .ed-row input[type='number'],
[dir="rtl"] .ed-mini input,
[dir="rtl"] .ed-axis-range input,
[dir="rtl"] .ed-about-json,
[dir="rtl"] .ed-chart-json {
direction: ltr;
}
/* --- context menu ---------------------------------------------------------
Positioned from JS against the VIEWPORT (ctxmenu.ts), so it is never clipped
by the canvas scroller, the topbar's own scroller, or a side panel. Shares
the dropdown look so a right-click and a bar menu read as the same object. */
.ed-ctxmenu {
position: fixed;
z-index: 120; /* above the drawers (40) and the bar menus (50) */
display: flex;
flex-direction: column;
min-width: 184px;
padding: 4px;
/* the token, not white: --surface is #ffffff in light and #21262e in dark,
and a chrome surface pinned to a literal puts light text on a light
background the moment the reader is in dark mode */
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: 0 12px 32px rgb(20 30 45 / 0.18);
user-select: none;
-webkit-overflow-scrolling: touch;
}
.ed-ctxmenu-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
width: 100%;
/* 40px, not the bar's 44: this list is read top-to-bottom with the finger
already on it, where run length matters more than target area. */
min-height: 40px;
padding: 0 10px;
border: 0;
border-radius: 7px;
background: transparent;
color: var(--ink);
font: inherit;
font-size: 13px;
text-align: start;
cursor: pointer;
}
.ed-ctxmenu-item:hover:not(:disabled) { background: var(--hover, #f2f5f9); }
.ed-ctxmenu-item:disabled { opacity: 0.4; cursor: default; }
.ed-ctxmenu-item kbd {
font: inherit;
font-size: 11.5px;
color: #8a95a6;
white-space: nowrap;
}
.ed-ctxmenu-danger:not(:disabled) { color: #b4232a; }
.ed-ctxmenu-danger:hover:not(:disabled) { background: #fdeced; }
.ed-ctxmenu-sep { height: 1px; margin: 4px 2px; background: var(--line); }
/* A long press on the canvas or the slide list is the context-menu gesture
(editor.ts). iOS answers the same press with its own callout bubble — "Copy /
Look Up / Share" over a chunk of slide text — which would race ours and win
the user's attention. Text being EDITED is exempt: there the system bubble is
the better menu, and it carries paste, dictation and spelling with it. */
.ed-scroll,
.ed-sidebar .ed-thumb {
-webkit-touch-callout: none;
}
.ed-scroll .bento-editing {
-webkit-touch-callout: default;
}
/* ————— saved-from-the-web notice, and the return gate ————————————————————
The web demo always starts a new deck. Someone who saved from it and came
back got a blank starter and read it as lost work (docs/DECISIONS.md
2026-08-23). Two surfaces: a persistent line after a save, and a gate on the
NEXT visit. Both use theme tokens rather than literals — the notice is
chrome, and a chrome surface pinned to white turns light text onto a light
background the moment a reader is in dark mode. */
.ed-savednote {
position: fixed;
bottom: 18px;
inset-inline-start: 18px;
z-index: 60;
max-width: 340px;
display: flex;
flex-direction: column;
gap: 3px;
padding: 10px 14px;
background: var(--surface);
color: var(--ink);
border: 1px solid var(--line);
border-radius: 10px;
box-shadow: 0 8px 26px rgb(15 23 36 / 0.18);
font-size: 12.5px;
line-height: 1.5;
}
.ed-savednote-name { font-size: 13px; word-break: break-all; }
.ed-savednote-body, .ed-savednote-offer { color: var(--muted); }
.ed-gate-overlay {
position: fixed;
inset: 0;
z-index: 1500;
background: rgb(15 23 36 / 0.38);
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.ed-gate-card {
width: min(420px, 100%);
background: var(--surface);
color: var(--ink);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: 0 18px 50px rgb(15 23 36 / 0.28);
padding: 22px;
display: flex;
flex-direction: column;
gap: 10px;
}
.ed-gate-h { margin: 0; font-size: 17px; }
.ed-gate-body { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.ed-gate-name {
font-size: 13px;
padding: 8px 10px;
border-radius: 8px;
background: var(--chrome);
border: 1px solid var(--line);
word-break: break-all;
}
.ed-gate-offer { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.ed-gate-acts { display: flex; justify-content: flex-end; margin-top: 4px; }
/* ————— brand palette swatches beside a colour control ————— */
.ed-colorref { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.ed-swatches { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
.ed-swatch {
width: 14px; height: 14px; padding: 0; border-radius: 3px; cursor: pointer;
border: 1px solid var(--line);
}
.ed-swatch:hover { transform: scale(1.15); }
.ed-swatch.is-on { outline: 2px solid var(--blue); outline-offset: 1px; }