/* The app copy the scenes play in. Sizes are the app's own (cited per block);
   colour is theme.css tokens only, so a theme click recolours a scene mid-play. */

/* ── Stage: a scene laid out at its own size, scaled to the host as one picture ── */

.stage { position: relative; overflow: hidden; border: var(--hair, 1px) solid var(--border-default); background: var(--surface-app); }
/* The player scales it (and, narrow, moves it under the crop) with an inline zoom or transform. Words keep their
   proportions at any scale, as the scene measured them. */
.stage-in { position: absolute; top: 0; left: 0; transform-origin: 0 0; text-rendering: geometricPrecision; }
/* The dry run measures the end of every beat, so nothing may be mid-transition. */
.stage.dry *, .stage.dry *::before, .stage.dry *::after { transition: none !important; animation: none !important; }

.hb-win {
  /* Its own stack: the active tab's z-index stays under a dialog's backdrop, which sits over the window. */
  isolation: isolate;
  display: flex; width: 100%; height: 100%;
  background: var(--surface-app); color: var(--text-primary);
  /* The app's own ground (CalendarView, NoteView: bg-surface-canvas). */
  --pane: var(--surface-canvas);
  /* The window's edge: clipped away by the stage on desktop, it shows when a phone's camera pulls back. */
  box-shadow: 0 0 0 var(--hair, 1px) var(--border-default);
}

/* Each view shows its own panes and lights its own tab. */
.hb-win:not([data-view="calendar"]) [data-view="calendar"],
.hb-win:not([data-view="note"]) [data-view="note"],
.hb-win:not([data-view="board"]) [data-view="board"],
.hb-win:not([data-view="note"]) .vt-note { display: none; }

/* WorkspaceRail: 48px, the logo in a 42px cell, a 32px tile per workspace 44px apart,
   the active one barred, a --border-faint rule on its right. */
.w-rail { position: relative; flex: none; display: flex; flex-direction: column; width: 48px; background: var(--surface-app);
  box-shadow: inset calc(-1 * var(--hair, 1px)) 0 0 var(--border-faint); }
.w-logo { display: flex; justify-content: center; align-items: flex-start; height: 42px; padding-top: 17px; color: var(--text-tertiary); }
.w-ws { position: relative; display: flex; align-items: center; justify-content: center; height: 44px; }
.w-ws > span { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--accent-primary-bg); color: var(--text-primary);
  font-size: var(--text-label-sm); line-height: var(--text-label-sm--line-height); font-weight: 500; }
.w-ws.on::before { content: ''; position: absolute; left: 0; top: 6px; width: 2px; height: 32px; background: var(--text-primary); }
.w-ra { display: flex; align-items: center; justify-content: center; height: 44px; color: var(--text-tertiary); }
.w-rail-foot { margin-top: auto; padding-bottom: 4px; }
.w-rail-foot .w-ra { height: 40px; }

.w-head { position: relative; flex: none; height: 40px; color: var(--text-tertiary); }
/* MacTrafficLights: 14px dots, 8px apart, 14px in from the left. */
.w-head .lights { position: absolute; left: 14px; top: 13px; gap: 8px; }
.w-head .lights i { width: 14px; height: 14px; }
.w-dd { position: absolute; right: 48px; top: 8px; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
.w-tgl { position: absolute; right: 8px; top: 0; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; }

/* The main pane: the tab strip over it only, then the view. */
.w-main { position: relative; flex: 1; min-width: 0; display: flex; }
.w-pane { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* SplitView: two panes, a hairline between (ResizeDivider); the left one only once the window is split. */
.w-left, .w-split { display: none; }
.hb-win[data-split] .w-left { display: flex; }
.hb-win[data-split] .w-split { display: block; flex: none; width: var(--hair, 1px); background: var(--border-default); }
.hb-win[data-split] .w-pane:not(.w-left) .vt-board { display: none; }
.w-tabs { position: relative; flex: none; display: flex; align-items: stretch; height: 40px; background: var(--surface-app);
  box-shadow: inset 0 calc(-1 * var(--hair, 1px)) 0 var(--border-default); }
/* TabItem: 0 10px 0 14px, 8px gap, 16px icon, a Geist Mono label; inactive at 45%. */
.w-tab { display: flex; align-items: center; gap: 8px; max-width: 200px; padding: 0 10px 0 14px; white-space: nowrap;
  color: color-mix(in oklab, var(--text-primary) 45%, transparent); }
.w-tab.pin { width: 38px; padding: 0; justify-content: center; }
.w-tab-x { flex: none; width: 16px; height: 16px; }
.w-tab.plus { padding: 0 10px; }
.w-tab-l { overflow: hidden; text-overflow: ellipsis; font-family: 'Geist Mono', ui-monospace, monospace; font-size: var(--text-paragraph-sm); line-height: 1; }
.hb-win[data-view="calendar"] .vt-cal,
.hb-win[data-view="note"] .vt-note,
.hb-win[data-view="board"] .vt-board,
.w-left .w-tab.on {
  position: relative; z-index: 1; color: var(--text-primary); background: var(--pane);
  box-shadow: inset 0 var(--hair, 1px) 0 0 var(--border-default), inset var(--hair, 1px) 0 0 0 var(--border-default), inset calc(-1 * var(--hair, 1px)) 0 0 0 var(--border-default);
}
.w-chrome { margin-left: auto; display: flex; align-items: stretch; }
.w-ic { display: flex; align-items: center; justify-content: center; width: 40px; color: var(--text-tertiary); }
/* PeersIndicator: the avatar stack, full height, 10px in. */
.w-peers { display: flex; align-items: center; padding: 0 10px; }
.w-av { position: relative; display: block; width: 15px; height: 15px; flex-shrink: 0; }
.w-av + .w-av { margin-left: -4px; }
.w-more { z-index: 3; display: grid; place-items: center; background: var(--surface-raised); outline: 1px solid var(--surface-app);
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 9px; font-weight: 600; line-height: 1; color: var(--text-muted); }
.w-view { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--pane); }

/* ── Sidebar panels (CalendarSidebar.tsx, NoteSidebar.tsx; ui/Sidebar, SectionLabel) ── */

.pane-side { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0 12px; }
/* The panel header: a 32px icon box, then the name over its edit time. */
/* PanelHeader: 8 above the title row (the tile's 32, or its two lines), 8 to the folder line, 20 under it all. */
.sh { flex: none; display: flex; align-items: center; gap: 8px; min-height: 32px; margin: 8px 0 20px; }
.sh + :is(.addf, .fchip) { margin: -12px 0 20px; }
.sh-i { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  background: var(--surface-control-dim); border: var(--hair, 1px) solid var(--border-default); color: var(--text-tertiary); }
.sh-t { display: flex; flex-direction: column; min-width: 0; }
.sh-t b { font-weight: 400; font-size: var(--text-paragraph-sm); line-height: 20px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-t small { font-size: var(--text-paragraph-xs); line-height: 16px; color: var(--text-tertiary); }
.pane-side .slabel { flex: none; height: 32px; }
.srow { flex: none; display: flex; align-items: center; height: 32px; padding: 0 8px; font-size: var(--text-paragraph-sm); line-height: 20px; color: var(--text-secondary); white-space: nowrap; }
.srow.sub { padding-left: 24px; }
.srow .fn { overflow: hidden; text-overflow: ellipsis; }
.srow > .i { color: var(--text-tertiary); }
.srow > .i + .fn, .srow > .cbox + .i { margin-left: 8px; }
.srow .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.srow .when { margin-left: 8px; color: var(--text-subtle); }
.srow .lk { display: inline-flex; color: var(--text-subtle); }
/* ui/Checkbox, checked: an accent square, its check in --text-on-accent. */
.cbox { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
  background: var(--accent-primary); border: var(--hair, 1px) solid transparent; color: var(--text-on-accent); }
.cbox .i { color: inherit; }
@keyframes row-in { from { opacity: 0; transform: translateY(-4px); } }

/* TagPlaceholderPill: no folder yet, a ghost pill in the subtle hairline. */
.addf { flex: none; display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; height: 28px; padding: 0 8px 2px; box-sizing: border-box;
  box-shadow: inset 0 0 0 var(--hair, 1px) var(--border-subtle); font-size: var(--text-paragraph-sm); line-height: 1; color: var(--text-tertiary); white-space: nowrap; }
.addf > svg { margin-bottom: -2px; }
/* TagPill: the folder's wash and hairline at the sidebar's mixes (AppSidebar), its label ink, the × cell ruled off flush right. */
.fchip { --tc: var(--accent-primary); --tb: color-mix(in srgb, var(--tc) var(--tag-border-mix-chrome), transparent);
  flex: none; display: inline-flex; align-self: flex-start; align-items: center; height: 28px; padding: 0 8px 2px; box-sizing: border-box;
  background: color-mix(in srgb, var(--tc) var(--tag-bg-mix-chrome), transparent); border: var(--hair, 1px) solid var(--tb);
  color: oklch(from var(--tc) clamp(var(--tag-label-l-lo), l, var(--tag-label-l-hi)) calc(c * var(--tag-label-c)) h);
  font-size: var(--text-paragraph-sm); line-height: 1; white-space: nowrap; }
.fchip .fx { align-self: stretch; display: flex; align-items: center; justify-content: center; width: 24px; margin: 0 -8px -2px 6px; border-left: var(--hair, 1px) solid var(--tb); opacity: 0.7; }
.empty { display: flex; align-items: center; justify-content: center; flex: 1; min-height: 120px; padding: 0 32px; font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: var(--text-subheading-2xs); line-height: 16px; text-transform: uppercase; color: var(--text-ghost); }
.ns-write, .ns-ink { display: flex; flex-direction: column; flex: 1; }
.ns-ink, .pane-side.pen .ns-write { display: none; }
.pane-side.pen .ns-ink { display: flex; }
.isearch { flex: none; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; margin-bottom: 4px; border: var(--hair, 1px) solid var(--border-subtle);
  font-size: var(--text-paragraph-sm); color: var(--text-tertiary); }
.srow.stroke { display: none; }
.srow.stroke.on { display: flex; animation: row-in 200ms var(--ease-out); }

/* ── Buttons (ui/Button: 32px, 400 weight, rest stroke) ── */

.hb-win .btn { border-width: var(--hair, 1px); }
.hb-win .sl-rule { height: var(--hair, 1px); }

.grp { display: inline-flex; }
.grp .btn { border-right-width: 0; }
.grp .btn:last-child { border-right-width: 1px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.primary { border-color: var(--accent-primary); background: var(--accent-primary); color: var(--text-on-accent); }

/* ── Calendar (plugins/calendar ui.rs title_row; ui/zoom.rs's painter) ── */

.cal { position: absolute; inset: 0; background: var(--surface-canvas); }
/* The title row floats 16 down, 36 tall: ‹ what's shown › in a raised round pill in the middle of the view, Today
   and zoom in one at its end, 16 in. A pill: 2 in, round 30px buttons 2 apart, the overlay surface, a
   --border-faint edge, the floating shadow. */
.cal-bar { position: absolute; left: 0; right: 0; top: 16px; height: 36px; display: flex; justify-content: center; pointer-events: none; }
.cal-pill { display: flex; align-items: center; gap: 2px; height: 36px; padding: 2px; border-radius: 18px; background: var(--surface-overlay);
  border: var(--hair, 1px) solid var(--border-faint); box-shadow: 0 4px 12px var(--shadow-color); }
.cal-end { position: absolute; right: 16px; top: 0; gap: 0; }
.cb { display: flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 15px; color: var(--text-secondary); }
.cal-title { min-width: 168px; padding: 0 12px; font-size: var(--text-label-md); line-height: 24px; letter-spacing: var(--text-label-md--letter-spacing);
  font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.cal-today { padding: 0 12px; font-size: var(--text-label-sm); line-height: 20px; font-weight: 500; color: var(--text-primary); }
.cal-rule { width: var(--hair, 1px); height: 16px; margin: 0 4px; background: var(--border-faint); }
.cal-pane:not([data-month]) ~ * .zin, .cal:has(.cal-pane:not([data-month])) .zin { color: var(--text-subtle); }

.cal-pane { position: relative; overflow: hidden; --mA: 1; --wA: 0; --rA: 1; }
.cal-pane i, .cal-pane span { position: absolute; }
.cal-pane i { display: block; }
/* The rows and the clicked row's parts are moved as one picture in the row's zoom (transform-origin 0 0). */
.cr, .cw, .cw-in, .cx-in { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.cr { width: 100%; opacity: var(--rA); }
/* The frame round the month's grid, becoming the week's: a --border-faint edge, rounded 8-12. */
.cfr { top: 0; left: 0; border: var(--hair, 1px) solid var(--border-faint); pointer-events: none; }
/* The weekdays: 12 medium in the muted ink, centred over their columns. */
.wdl { top: 0; left: 0; width: 60px; height: 16px; margin: -8px 0 0 -30px; text-align: center; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-muted); }
.wdl.rv { opacity: 0; }

/* Hairlines in --border-faint. */
.hl { height: var(--hair, 1px); background: var(--border-faint); }
.vl { width: var(--hair, 1px); background: var(--border-faint); }
.cr .hl, .cr .vl { top: 0; }

/* A day's number (zoom.rs draw_row): 12 medium in a 22-tall pill 3 from its day's right and foot, today's in the
   brand's solid; another month's at a third. */
.numbox { width: 0; height: 0; }
.num { right: 0; bottom: 0; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 16px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
/* Only the clicked row's own numbers fade; the rows it pushes away keep theirs. */
.cx .num { opacity: var(--mA); }
.num.out { opacity: 0.34; }
.cx .num.out { opacity: calc(0.34 * var(--mA)); }
.num.today { background: var(--accent-primary); color: var(--text-on-accent); }

/* A calendar's colour: a preset's hue on the theme. Its wash fills a date; its ink is 40% of the way from the
   primary ink to it (ui.rs fill). On none, the field's fill and the secondary ink. */
.c-p { --lc: oklch(0.62 0.14 245); }
.c-f { --lc: oklch(0.62 0.17 22); }
.c-w { --lc: oklch(0.72 0.14 70); }
.c-g { --lc: oklch(0.66 0.14 150); }
.c-n { --lc: var(--text-muted); }
.pillbox { height: 20px; }
.ev {
  inset: 0; overflow: hidden; border-radius: 6px;
  background: color-mix(in srgb, var(--lc, var(--accent-primary)) 20%, transparent);
  color: color-mix(in oklab, var(--text-primary) 60%, var(--lc, var(--accent-primary)));
  font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap;
}
.ev.c-n { background: var(--surface-field); color: var(--text-secondary); }
/* The month's line: its time faint (60%), 6 before its words; the week's block: its words 12 down, the time 28. */
.ev .pt { position: absolute; left: 6px; top: 2px; right: 6px; overflow: hidden; text-overflow: ellipsis; opacity: calc(1 - var(--two, 0)); }
.ev .pt i, .ev .pw i { position: static; display: inline; font-style: normal; font-weight: 400; opacity: 0.6; }
.ev .pt i { margin-right: 6px; }
.ev .pw { position: absolute; left: 6px; top: 4px; right: 6px; display: flex; flex-direction: column; opacity: var(--two, 0); }
.ev .pw b { position: static; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.ev .pw i { position: static; }
.pillbox.made { opacity: 0; transition: opacity 200ms var(--ease-out); }
.pillbox.made .ev { --two: 1; }
.hb-win.made .pillbox.made { opacity: 1; }

/* The week: its dates' heads, the hours under them, all week-only. */
.cw { width: 100%; height: 100%; opacity: var(--wA); pointer-events: none; }
/* A day's date at the top of its column: 16 medium, centred in the 42 head. */
.wh { top: 0; left: 0; height: 42px; opacity: var(--wA); }
.whn { left: 0; right: 0; top: 10px; text-align: center; font-size: 16px; line-height: 24px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.cal-pane .rv { opacity: 0; }
.cw-hours { left: 0; width: 100%; overflow: hidden; }
.cw-in { width: 100%; }
/* An hour's line across the frame; its label 12 regular in the muted ink, in the gutter 12 clear of the frame. */
.hr { left: 72px; right: 16px; height: var(--hair, 1px); background: var(--border-faint); }
.hlab { right: calc(100% - 60px); translate: 0 -50%; font-size: 12px; line-height: 16px; color: var(--text-muted); white-space: nowrap; }

/* The clicked row, and everything that lives in the days. */
.cx { position: absolute; top: 0; left: 0; overflow: hidden; }
.cx .hl, .cx .vl, .cx .numbox, .cx .pillbox { top: 0; left: 0; }
.cx .hl { opacity: var(--mA); }
/* The first day's left rule is the frame's at the week; the hours' top rule is the week's. */
.cx .vl[data-c="0"] { opacity: var(--mA); }
.cx .vl.off { opacity: var(--wA); }
.cx .hr.wtop { top: 0; left: 0; right: auto; opacity: var(--wA); }

/* Drag-to-create, a step past the app (its week leaves each day's right strip free for it): on hover the ghost
   quarter, dashed in the rest edge; pressed, the draft in the brand. Its times sit 7 in: the start centred, or
   12 down with the end 12 up once it passes half an hour. */
.cal-ghost, .cal-draft { top: 0; left: 0; display: none; border-radius: 6px; border: var(--hair, 1px) dashed var(--border-strong); background: var(--surface-field);
  font-size: 12px; line-height: 16px; color: var(--text-tertiary); }
.cal-ghost { height: 13px; padding-left: 7px; line-height: 11px; font-size: 11px; }
.cal-pane.ghosting .cal-ghost { display: block; }
.cal-draft { border-color: var(--accent-primary); background: color-mix(in srgb, var(--accent-primary) 18%, transparent); color: var(--text-primary);
  transition: height 120ms var(--ease-out); }
.cal-draft.on { display: block; }
.cal-draft .ds, .cal-draft .de { position: absolute; left: 7px; translate: 0 -50%; white-space: nowrap; }
.cal-draft .ds { top: 50%; }
.cal-draft .de { display: none; bottom: 11px; translate: 0 50%; }
.cal-draft.two .ds { top: 11px; }
.cal-draft.two .de { display: block; }
/* The new date counts in its calendar once made. */
.cnt .n1, .hb-win.made .cnt .n0 { display: none; }
.hb-win.made .cnt .n1 { display: inline; }
.cnt b { font-weight: inherit; }

/* ── The new event's dialog (calendar ui/event.rs, ui dialog.rs): 448 wide, rounded LG on the menu's surface, a
   --border-default edge and a soft shadow, over the window dimmed black at a half; 16 in ── */

.dlg-back { position: absolute; inset: 0; background: rgb(0 0 0 / 0.5); opacity: 0; pointer-events: none; transition: opacity 150ms ease; }
.dlg {
  position: absolute; left: 50%; top: 50%; width: 448px; translate: -50% -50%; border-radius: var(--radius-lg);
  background: var(--surface-overlay); border: var(--hair, 1px) solid var(--border-default); box-shadow: 0 8px 24px var(--shadow-color), 0 2px 6px var(--shadow-color);
  opacity: 0; transform: scale(0.95); transition: opacity 150ms ease, transform 150ms ease; pointer-events: none;
}
.dlg-open .dlg-back { opacity: 1; transition: opacity 200ms ease; }
.dlg-open .dlg { opacity: 1; transform: none; transition: opacity 200ms ease, transform 200ms ease; }
/* Its head: the leaf (44 x 48, rounded MD on the field's fill: the month in its calendar's solid, the day under it),
   12 to the name (title-h6, a field) over when it is (paragraph-sm, tertiary), the × (a 32 ghost button) at its end;
   a hairline under it, edge to edge. */
.ed-head { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: var(--hair, 1px) solid var(--border-faint); }
.ed-leaf { flex: none; display: flex; flex-direction: column; width: 44px; height: 48px; overflow: hidden; border-radius: var(--radius-md); background: var(--surface-field); }
.ed-leaf b { display: grid; place-items: center; height: 16px; background: var(--lc); color: #fff; font-size: 10px; line-height: 1; font-weight: 600; letter-spacing: 0.04em; }
.ed-leaf i { flex: 1; display: grid; place-items: center; font-style: normal; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.ed-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ed-name .nbox { display: block; height: 28px; font-size: var(--text-title-h6); line-height: 28px; font-weight: 500; color: var(--text-primary); white-space: nowrap; }
.ed-name .dlg-typed:empty::before { content: 'Add title'; color: var(--text-muted); }
.ed-name small { font-size: var(--text-paragraph-sm); line-height: 20px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.ed-x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-right: -4px; border-radius: var(--radius-md); color: var(--text-primary); }
/* A part's row: its 16 icon in a 20 column (tertiary), 12 to its value; rows 12 apart, 16 in. */
.ed-body { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.ed-row { display: flex; gap: 12px; }
.ed-ic { flex: none; display: grid; place-items: center; width: 20px; height: 32px; color: var(--text-tertiary); }
.ed-v { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; min-height: 32px; font-size: var(--text-paragraph-sm); line-height: 20px; color: var(--text-primary); }
.ed-ph { color: var(--text-tertiary); }
.ed-when { display: flex; align-items: center; gap: 4px; }
/* A value's button (button.rs small, standing): 32 tall, 10 in, rounded MD on the field's fill, label-sm. */
.ed-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: var(--radius-md); background: var(--surface-field);
  font-size: var(--text-label-sm); font-weight: 500; color: var(--text-primary); white-space: nowrap; }
.ed-dash { padding: 0 2px; color: var(--text-muted); }
.ed-all { display: flex; align-items: center; gap: 8px; height: 32px; }
.ed-rep { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 32px; margin-left: -10px; padding: 0 10px; border-radius: var(--radius-md);
  font-size: var(--text-label-sm); font-weight: 500; }
.ed-rep .i { color: var(--text-tertiary); }
/* Its calendars: badges (tag.rs: 24 tall, round, the brand's faint fill and edge), then a dashed round +. */
.ed-cals { display: flex; align-items: center; gap: 4px; }
.ed-badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 4px 0 6px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent-primary-fg) 8%, transparent); border: var(--hair, 1px) solid color-mix(in srgb, var(--accent-primary-fg) 16%, transparent);
  color: color-mix(in oklab, var(--text-secondary) 80%, var(--accent-primary-fg)); font-size: var(--text-label-sm); line-height: 20px; font-weight: 500; }
.ed-bx { display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; opacity: 0.7; }
.ed-plus { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: var(--hair, 1px) dashed var(--border-default); color: var(--text-tertiary); }
/* Who's on it: a frame (frame.rs: a quiet wash 3 round a card, its title 8 over and under, 16 in; Add people at
   its end), its card saying No one yet. */
.ed-frame { padding: 0 3px 3px; border-radius: var(--radius-lg); background: var(--surface-field); }
.ed-fh { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 8px 0 13px; }
.ed-fh b { font-size: var(--text-label-sm); line-height: 20px; font-weight: 500; color: var(--text-primary); }
.ed-addp { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 7px; border-radius: var(--radius-md); background: var(--surface-field);
  font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-primary); }
.ed-card { display: flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 7px; background: var(--surface-overlay); border: var(--hair, 1px) solid var(--border-faint);
  font-size: var(--text-paragraph-sm); color: var(--text-muted); }
/* The foot: Cancel (a standing button) and Create (the brand's), 8 apart at the right, 16 in. */
.dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 0 16px 16px; }
.dlg-f .btn { height: 32px; padding: 0 10px; border: 0; border-radius: var(--radius-md); background: var(--surface-field); font-size: var(--text-label-sm); font-weight: 500; color: var(--text-primary); }
.dlg-f .btn.primary { background: var(--accent-primary); color: var(--text-on-accent); }
.sw { position: relative; flex: none; width: 32px; height: 18px; border-radius: 9px; background: var(--surface-control-hover); }
.sw i { position: absolute; left: 1px; top: 1px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }

/* A date's chip in a note (dates chip.rs): its calendar icon and words in the brand, on its wash, rounded. */
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 6px; vertical-align: top; margin-block: -1px; white-space: nowrap; border-radius: 6px;
  background: var(--accent-primary-bg); color: var(--chip-ink);
}
.chip .i { width: 14px; height: 14px; color: var(--accent-primary-fg); }

/* A typing field's caret, in the typist's colour. */
[data-caret]::after { content: ''; display: inline-block; width: 1px; height: 1.1em; margin-left: 1px; vertical-align: text-bottom; background: var(--caret, currentColor); }

/* ── Note view (plugins/notes: ui/layout.rs, ui/chrome.rs) ── */

/* The reading column: at most 740 wide, centred; its words 32 in (a block's 24 gutter, then 8), the first line 71
   down, clear of the formatting bar. */
.nv { position: absolute; inset: 0; --col: 740px; }
/* The width slider pulled in: a column a phone can show whole. */
.nv-narrow { --col: 620px; }
/* The bar over the note's top, 63 tall on the canvas: the formatting bar 13 down, across the column and 13 past its
   words either side (its first icon over the words' first letter), kept 8 clear of the sidebars' shut squares. */
.nv-top { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; justify-content: center; height: 63px; padding-top: 13px;
  background: var(--surface-canvas); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.nv-bar { display: flex; align-items: center; width: min(var(--col) - 38px, 100% - 120px); height: 42px; padding: 4px; border-radius: 14px;
  background: var(--surface-overlay); border: var(--hair, 1px) solid var(--border-default); overflow: hidden; }
.fb { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-md); color: var(--text-primary); }
.fb-style { width: 104px; justify-content: space-between; padding: 0 8px 0 10px; font-size: var(--text-label-sm); line-height: 20px; font-weight: 500; }
.fb-rule { flex: none; width: var(--hair, 1px); height: 16px; margin: 0 10px; background: var(--border-faint); }
.nv.pen .nv-sketch { background: var(--surface-control-hover); }
.nv-scroll { position: absolute; inset: 0; overflow: hidden; }
.nv-col { position: relative; max-width: var(--col); margin: 0 auto; padding: 71px 24px 0; }
.nrow { padding: 0 8px; font-size: var(--text-paragraph-sm); line-height: 20px; letter-spacing: var(--text-paragraph-sm--letter-spacing); color: var(--text-primary); }

/* A link's card (plugins/links ui.rs): at most 400 wide (files' CARD_MAX), rounded LG with a --border-faint edge and
   no fill of its own; its picture across its top, then 12 in and 10 down: its title (label-sm), what it says, and a
   24 foot, 2 under them: its 16 icon, 6, the site in the subtle ink, paragraph-xs. */
.card { display: none; position: relative; max-width: 400px; margin: 8px 8px 0; padding: 0; border-radius: var(--radius-lg); border: var(--hair, 1px) solid var(--border-faint); }
.nv[data-cards="1"] .c1, .nv[data-cards="2"] .c1, .nv[data-cards="2"] .c2 { display: block; }
.cfw { position: relative; }
.cf { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 9px 9px 0 0; background: var(--surface-inset); }
.c1 .cf { aspect-ratio: 398 / 209; }
/* Read: the strip fades, and the picture fades in after it; the words came first, over 150ms. */
.cf-art { position: absolute; inset: 0; transition: opacity 240ms var(--ease-out) 260ms; }
.cbody { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; transition: opacity 150ms var(--ease-out); }
/* The pill (hubris_ui embed::pill): 32 tall, rounded MD on the overlay, the floating shadow, paragraph-xs. */
.cread { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--radius-md); white-space: nowrap;
  background: var(--surface-overlay); border: var(--hair, 1px) solid var(--border-default); box-shadow: 0 4px 16px -4px var(--shadow-color);
  font-size: 12px; line-height: 16px; letter-spacing: 0; color: var(--text-subtitle); opacity: 0; transition: opacity 180ms var(--ease-out) 90ms; }
.cled { display: flex; gap: 4px; }
.cled i { width: 2px; height: 12px; background: var(--accent-primary); opacity: 0.25; animation: led 1.1s ease-in-out calc(var(--i) * 70ms) infinite; }
@keyframes led { 30% { opacity: 1; } 60% { opacity: 0.25; } }
.nv.loading[data-cards="1"] .c1 .cf-art, .nv.loading[data-cards="2"] .c2 .cf-art,
.nv.loading[data-cards="1"] .c1 .cbody, .nv.loading[data-cards="2"] .c2 .cbody { opacity: 0; transition: none; }
.nv.loading[data-cards="1"] .c1 .cread, .nv.loading[data-cards="2"] .c2 .cread { opacity: 1; transition: none; }
.ct { font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdesc { font-size: 12px; line-height: 16px; letter-spacing: 0; color: var(--text-tertiary); }
.cfoot { display: flex; align-items: center; gap: 6px; height: 24px; margin-top: 2px; font-size: 12px; line-height: 16px; letter-spacing: 0; color: var(--text-subtle); }
.cfoot .host { flex: 1; }
.fav { width: 16px; height: 16px; border-radius: 4px; }
.fav-l { position: relative; background: #fff; }
.fav-l::after { content: ''; position: absolute; inset: 3px; background: #111; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.fav-p { display: inline-flex; color: #e5484d; }
.fav-p .i { width: 16px; height: 16px; }

/* The event's preview art: a warm poster, fixed colours like any picture. */
.party { display: block; width: 100%; height: 100%; object-fit: cover; }

/* The map, in the theme: blocks on the inset, a park, a river, a red pin. */
.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-ground { fill: color-mix(in oklab, var(--surface-inset) 70%, var(--text-primary) 4%); }
.m-park { fill: color-mix(in oklab, var(--status-success) 26%, var(--surface-inset)); }
.m-water { fill: color-mix(in oklab, var(--accent-primary) 30%, var(--surface-inset)); }
.m-minor path { stroke: var(--border-default); stroke-width: 3; fill: none; }
.m-major path { stroke: var(--border-strong); stroke-width: 7; fill: none; stroke-linecap: round; }
.m-dot circle { fill: var(--text-subtle); }
.m-pin path { fill: #e5484d; }
.m-pin-hole { fill: #7a1418; }

/* Ink: the theme's text colour, 2px, drawn in by its dash; measured from the map's pin (note.js PIN). */
/* As big as the scene, not a token 1px: the browser snaps an svg's box to whole pixels and scales what's in it to match. */
.ink { position: absolute; top: 0; left: 0; width: 1128px; height: 752px; overflow: visible; pointer-events: none; }
.cfw > .ink { left: calc(50% - 307px); top: calc(50% - 236.6px); }
.ink path { fill: none; stroke: var(--text-primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; shape-rendering: geometricPrecision; }

/* The status line at the foot, 48 tall, 8 in: the counts (the note's body size in the subtle ink, 8 in) on the left,
   the width (its icon, then a slider) 112 wide on the right; sketching, the tray in the middle and nothing else. */
.nv-status { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 48px; display: flex; align-items: center; padding: 8px;
  background: var(--surface-canvas); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.nv-status .words { margin-right: auto; padding: 0 8px; font-size: var(--text-paragraph-sm); color: var(--text-subtle); }
.nv-width { display: flex; align-items: center; gap: 8px; width: 112px; height: 32px; padding: 0 8px; color: var(--text-subtle); }
/* slider.rs: a 4px rounded track in the control fill, its round 16 thumb in the primary ink at the left. */
.nv-width i { position: relative; flex: 1; height: 16px;
  background: linear-gradient(var(--surface-control-hover), var(--surface-control-hover)) center / 100% 4px no-repeat; border-radius: 2px; }
.nv-width i::after { content: ''; position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--text-primary);
  box-shadow: 0 1px 3px var(--shadow-color); }
.nv.pen .words, .nv.pen .nv-width { visibility: hidden; }
/* The sketch tray, while sketching: over the status line, in the middle; it rises in and drops out. */
.nv .bd-tray.tools { z-index: 3; bottom: 56px; opacity: 0; transform: translateY(6px) scale(0.97); transform-origin: bottom; transition: opacity 150ms, transform 150ms; }
.nv.pen .bd-tray.tools { opacity: 1; transform: none; transition: opacity 200ms var(--ease-out) 40ms, transform 200ms var(--ease-out) 40ms; }
.tl { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-md); color: var(--text-primary); }
.tl.on { background: var(--surface-control-hover); color: var(--text-primary); }


/* ── Scripted cursors (CursorChat.tsx, RemoteCursors.tsx) ── */

.actors { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
/* Panning: the hand stands in for the arrow, centred on the pointer; a fist while it grips. */
.hb-cursor-hand { position: absolute; left: -10px; top: -10px; display: none; }
.hb-cursor-hand svg { margin: 0; transform: none !important; transition: none; }
.actors hb-cursor[data-tool="grab"] > svg { display: none; }
.actors hb-cursor[data-tool="grab"] .hb-cursor-hand { display: block; }
.hb-cursor-hand .shut, hb-cursor[data-down] .hb-cursor-hand .open { display: none; }
hb-cursor[data-down] .hb-cursor-hand .shut { display: block; }
.actors hb-cursor[self] .hb-cursor-name { display: none; }
/* Painted with the stage, not as a layer of its own: a layer keeps the scale it was first drawn at, and the stage is
   scaled to its host (and pushed in on a phone), which left the tags and chats soft or blocky. */
.actors hb-cursor { will-change: auto; }
/* Cursor chat: a bubble in the peer's colour 4 under their tag, rounded 12 but for its corner by the pointer, label-sm
   (14 medium on 20) in the tag's ink, 10 in, a soft shadow; it grows a row at a time. Yours opens right off the arrow. */
.actors .hb-cursor-chat { left: 10px; top: 42px; display: block; padding: 0 10px; border-radius: 4px 12px 12px 12px; background: var(--c);
  color: #fff; color: oklch(from var(--c) clamp(0.16, (0.72 - l) * 1000, 1) 0 0); box-shadow: 0 4px 12px var(--shadow-color);
  font-family: var(--font-sans); font-size: var(--text-label-sm); line-height: 20px; font-weight: 500; letter-spacing: var(--text-label-sm--letter-spacing);
  white-space: pre; transition: height 200ms ease-out; --caret: currentColor; }
.hb-cursor-rows { display: block; overflow: clip; }
.hb-cursor-rows > div { width: max-content; height: 20px; }
.hb-cursor-rows .ph { opacity: 0.7; }
.actors hb-cursor[self] .hb-cursor-chat { top: 20px; }
/* The pen's crosshair (input/ink.ts): 4px arms around a 2px gap, a dot the pen's width. */
.actors hb-cursor[data-tool="pen"] svg, .actors hb-cursor[data-tool="pen"] .hb-cursor-chat { display: none; }
.actors hb-cursor[data-tool="pen"]::before, .actors hb-cursor[data-tool="pen"]::after { content: ''; position: absolute; background: var(--text-primary); }
.actors hb-cursor[data-tool="pen"]::before { left: -6px; top: 0; width: 13px; height: 1px;
  background: linear-gradient(to right, var(--text-primary) 4px, transparent 4px 9px, var(--text-primary) 9px); }
.actors hb-cursor[data-tool="pen"]::after { left: 0; top: -6px; width: 1px; height: 13px;
  background: linear-gradient(to bottom, var(--text-primary) 4px, transparent 4px 9px, var(--text-primary) 9px); }

/* ── Board (CanvasView): the world under a camera, the grid on the view, what is on the canvas, the toolbar ── */

.bd { position: absolute; inset: 0; overflow: hidden; background-color: var(--surface-canvas); }
/* The dot grid (view.rs dots), drawn at the screen's own pixels as the app snaps them (board.js). */
.bd-dots { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.bd-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
/* A pasted image; ink already drawn, as its picture's alpha in the pen's colour. */
.bd-img { position: absolute; display: block; }
.bd-drawn { position: absolute; background: var(--text-primary); -webkit-mask: var(--src) center / 100% 100% no-repeat; mask: var(--src) center / 100% 100% no-repeat; }
/* Pen ink: the pencil tool's default stroke (toolbarStore: INK = --text-primary, width 2). */
.bd-ink { position: absolute; left: 0; top: 0; width: 1128px; height: 752px; display: block; overflow: visible; }
.bd-ink path { fill: none; stroke: var(--text-primary); stroke-linecap: round; stroke-linejoin: round; }
/* The canvas toolbar (tools.rs, float_bar.rs): centred 16 off the pane's foot; a float bar is 4 in, 2 between,
   rounded 14 on the overlay surface, a --border-default edge and the floating shadow; its tools are 36px ghost
   buttons, their icons 20, the armed one held down; a 16-wide caret opens a tool's menu; a 1 x 24 rule 6 either
   side between groups. "+", the create menu, in a bar of its own 8 to its right. */
.bd-tools { position: absolute; left: 50%; bottom: 16px; translate: -50% 0; display: flex; gap: 8px; }
.bd-make { position: absolute; left: calc(100% + 8px); }
.bd-bar, .bd-tray { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface-overlay);
  border: var(--hair, 1px) solid var(--border-default); box-shadow: 0 4px 12px var(--shadow-color); }
.bd-bar .tl, .bd-tray .tl { width: 36px; height: 36px; border-radius: var(--radius-md); color: var(--text-primary); }
.bd-bar .tl.on, .bd-tray .tl.on { background: var(--surface-control-hover); }
.tl-caret { display: flex; align-items: center; justify-content: center; width: 16px; height: 36px; color: var(--text-primary); }
.tl-rule { flex: none; width: var(--hair, 1px); height: 24px; margin: 0 6px; background: var(--border-faint); }
/* The sketch tray (sketch tray.rs), 8 over the toolbar: a float bar 72 tall, its parts stretched. The pens (12 in, 10
   apart, 64 tall): a body (dark: the subtitle ink, its side the tertiary at 70%; light: the card's surface and the
   default edge), the tip and band in the ink; the picked one stands 2 down, the rest 16. The width: a 112 slider
   (slider.rs: a 6 track, the primary ink up to its 14 white thumb) and the stroke's dot in a 28 box. The colours:
   22 dots, 8 apart in threes, a --border-faint edge; the chosen ringed 2 wide, 4 out, in the primary ink. */
.bd-tray { position: absolute; left: 50%; bottom: 70px; translate: -50% 0; align-items: stretch; height: 74px; }
.tr-pens { display: flex; align-items: flex-end; gap: 10px; height: 64px; padding: 0 12px; overflow: hidden;
  --pb: var(--text-subtitle); --ps: var(--text-tertiary); --pi: var(--text-primary); }
[data-scheme="light"] .tr-pens { --pb: var(--surface-card); --ps: var(--border-default); }
.tr-pens > span { position: relative; width: 30px; height: 64px; }
.tr-pen { position: absolute; left: 0; top: 16px; width: 30px; height: 92.3px; }
.tr-pens > .up .tr-pen { top: 2px; }
.tr-pen .b { fill: var(--pb); }
.tr-pen .s { fill: var(--ps); opacity: 0.7; }
.tr-pen .d { fill: var(--ps); }
.tr-pen .i { fill: var(--pi); }
.tr-pen .h { fill: var(--pi); opacity: 0.55; }
.tr-pen .w { fill: hsl(29 45% 72%); }
.tr-pen .e { fill: hsl(0 70% 80%); }
.bd-tray > .tl-rule { align-self: center; }
.tr-w { display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.tr-slide { position: relative; width: 112px; height: 6px; border-radius: 3px; background: var(--surface-control-hover); }
.tr-slide i { position: absolute; left: 0; top: 0; width: calc(var(--v) * 100%); height: 6px; border-radius: 3px; background: var(--text-primary); }
.tr-slide i::after { content: ''; position: absolute; right: -7px; top: -4px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px var(--shadow-color); }
.tr-dot { display: grid; place-items: center; width: 28px; height: 28px; }
.tr-dot i { width: var(--d); height: var(--d); border-radius: 50%; background: var(--text-primary); }
.tr-c { display: grid; grid-template-columns: repeat(3, 22px); gap: 8px; align-content: center; padding: 0 10px; }
.tr-c i { position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px var(--border-faint); }
.tr-c i.on::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--text-primary); }
.tr-c .wheel { background: conic-gradient(from 90deg, hsl(0 100% 62%), hsl(60 100% 62%), hsl(120 100% 62%), hsl(180 100% 62%), hsl(240 100% 62%), hsl(300 100% 62%), hsl(360 100% 62%)); }

/* ── A tab dragged onto a pane's edge (DropZoneOverlay, DropRegionMap, DropPreview, DragGhost) ── */

/* A tab over a pane (panes/mod.rs indicator): the part of the pane it'd take, inside the card's edge, its corners on
   the card's inner curve, washed in the accent and edged 2 in its ink. The tab carried rides under the pointer as the
   open tab, lifted. */
.w-drop { position: absolute; inset: 0; z-index: 40; display: none; pointer-events: none; }
.hb-win[data-drag] .w-drop { display: block; }
.w-claim { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; display: none; border-radius: calc(var(--radius-lg) - 1px);
  background: var(--accent-primary-bg); border: 2px solid var(--accent-primary-fg); }
.hb-win[data-drag="left"] .w-claim { display: block; }
.w-ghost { position: absolute; left: 0; top: 0; z-index: 50; display: none; pointer-events: none; }
.w-ghost .w-tab { color: var(--text-primary); background: var(--surface-canvas); border-color: var(--border-faint); box-shadow: 0 4px 12px var(--shadow-color); }
.hb-win[data-drag] .w-ghost { display: flex; }

/* ── A note several people write at once (doc.js): its rows, wherever it is open ── */

/* The note's type (notes theme.rs): its words in paragraph-sm, no room between lines; a heading 1 or 2 0.3em over
   and 0.25em under. */
.dr { position: relative; padding: 0 8px; overflow-wrap: break-word; }
.dr:is(.h1, .h2) { margin: 0.3em 0 0.25em; }
.dr:first-child { margin-top: 0; }
.dr.pending { display: none; }
.dr.h1 { font-size: var(--text-title-h5); line-height: var(--text-title-h5--line-height); letter-spacing: var(--text-title-h5--letter-spacing); font-weight: var(--text-title-h5--font-weight); color: var(--text-primary); }
.dr.h2 { font-size: var(--text-title-h6); line-height: var(--text-title-h6--line-height); letter-spacing: var(--text-title-h6--letter-spacing); font-weight: var(--text-title-h6--font-weight); color: var(--text-primary); }
.dr.p { font-size: var(--text-paragraph-sm); line-height: var(--text-paragraph-sm--line-height); letter-spacing: var(--text-paragraph-sm--letter-spacing); color: var(--text-primary); }
/* TextCarets: a 2px line in the writer's colour, the nameplate above it (editor.css .pm-remote-cursor). */
.dc { position: relative; display: inline-block; width: 2px; height: 1.15em; margin: 0 -1px; vertical-align: -0.2em; background: var(--c); }
.dc b { position: absolute; left: -1px; bottom: 100%; padding: 2px 6px; border-radius: 4px 4px 4px 0; white-space: nowrap; background: var(--c); color: var(--text-on-accent);
  font-size: var(--text-label-xs); line-height: var(--text-label-xs--line-height); letter-spacing: var(--text-label-xs--letter-spacing); font-weight: var(--text-label-xs--font-weight); }
.dc.self { width: 1px; margin: 0; background: var(--text-primary); animation: dc-blink 1.06s steps(1) infinite; }
@keyframes dc-blink { 50% { opacity: 0; } }
/* A note on the canvas (notes card.rs): rounded 12, the embed's ground (the field's wash on the canvas; light, half
   way to the app's surface), a --border-faint edge (light: --border-subtle), its words 16 in. No head band. */
.bd-card, .rt-n { position: absolute; border-radius: 12px; background-color: var(--surface-canvas);
  background-image: linear-gradient(var(--surface-field), var(--surface-field)); border: var(--hair, 1px) solid var(--border-faint); }
[data-scheme="light"] :is(.bd-card, .rt-n) { background: color-mix(in srgb, var(--surface-canvas), var(--surface-app)); border-color: var(--border-subtle); }
.bd-card .ch, .rt-n .ch { display: none; }
.bd-card :is(.doc, .nb) { padding: 16px 8px; }
/* Links between things (world.rs lines): the primary ink, 2 world px, a filled head. */
.bd-wire { position: absolute; left: 0; top: 0; width: 1128px; height: 752px; overflow: visible; }
.bd-wire path { fill: none; stroke: var(--text-primary); stroke-width: 2; stroke-linejoin: round; }
.bd-wire .hd { fill: var(--text-primary); stroke: none; }
/* Typing hides the pointer until the mouse moves (macOS always, Windows by default). */
.actors hb-cursor[data-tool="type"] > svg { visibility: hidden; }

/* Design: Yard's Project Home as a design on the canvas (design.js). Its pieces are painted at their own spots;
   --in (0..1) is the strip going in: the page (--w0 without it) grows by the strip's 54px and what sits right of
   it moves along. */
.yd { position: absolute; left: 0; top: 0; width: calc(var(--w0) + var(--in) * 54px); --in: 0; }
.yd-clip { position: absolute; inset: 0; overflow: hidden; }
.yd-b, .yd-h { position: absolute; inset: 0; }
.yd-b, .yd-r { transform: translateX(calc((var(--in) - 1) * 54px)); }
.yd-c { transform: translateX(calc((var(--in) - 1) * 27px)); }
.yd :is(i, b, p, svg, img), .dz :is(i, b, p, svg, img) { position: absolute; display: block; margin: 0; box-sizing: border-box; font-style: normal; }
/* Runs keep their spaces: one may start mid-line, after another. */
.yd b, .dz b { white-space: pre; }
.yd p { white-space: pre-wrap; }
.dz { position: absolute; left: 0; top: 0; }
/* Canvas chrome in the world, sized in screen px through --px (1 / zoom): the frame's title, the drag box, rings. */
.dz-title { position: absolute; left: 0; bottom: 100%; margin-bottom: calc(4 * var(--px)); font-size: calc(11 * var(--px)); line-height: 1; color: var(--text-tertiary); white-space: nowrap; }
.dz-chrome { position: absolute; left: 0; top: 0; }
.dz-mq, .dz-ring, .dz-sel { position: absolute; display: none; box-sizing: border-box; }
.dz-mq { border: var(--px) solid var(--accent-primary); background: var(--accent-primary); opacity: 0.1; }
.dz-ring, .dz-sel { outline: calc(2 * var(--px)) solid var(--accent-primary); outline-offset: calc(-1 * var(--px)); }
.dz-sel i { position: absolute; width: calc(8 * var(--px)); height: calc(8 * var(--px)); background: var(--accent-primary); translate: -50% -50%; }
.dz-sel .nw { left: 0; top: 0; } .dz-sel .ne { left: 100%; top: 0; } .dz-sel .sw { left: 0; top: 100%; } .dz-sel .se { left: 100%; top: 100%; }
/* The library and the new frame: frames in the world, their titles above them. */
.dz-lib, .dz-frame { position: absolute; }
.dz-frame { display: none; }
.dz-frame.in .dz-title { display: none; }
.dz-t { position: absolute; }
/* The inspector (SketchControls, measured in the app): PanelSection = label + 32px rows 4 apart, 8 under; a field
   is a --surface-field box: label cell 32, value, caret cell 24; a tool button is 32 square, pressed = hover fill. */
/* The inspector runs taller than a sidebar's 320, as if dragged taller to show it all. */
.w-r:has(.dz-rp) { max-height: 636px; }
.dz-rp .sh-t b b, .dz-rp .sh-t small b { font-weight: inherit; }
.dz-none { display: flex; flex-direction: column; }
.srow.prop { color: var(--text-tertiary); }
.srow.prop > .i { color: inherit; }
.srow.prop .fn { flex: 0 0 88px; }
.srow.prop .pv { flex: 1; min-width: 0; display: flex; }
.pchip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--surface-control-hover); color: var(--text-primary); font-size: var(--text-paragraph-sm); }
.srow.add { color: var(--text-tertiary); }
.srow.prop .pv { color: var(--text-tertiary); }
/* Mentions' end: out and in, each a count by its arrow, the shown one in a round edge. */
.slabel .mt { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 12px; font-size: 12px; font-weight: 400; color: var(--text-tertiary); }
.slabel .mt:first-of-type { margin-left: auto; }
.slabel .mt.on { box-shadow: inset 0 0 0 1px var(--border-default); color: var(--text-primary); }
.w-side .slabel ~ .slabel { margin-top: 20px; }
.dz-ip { display: none; flex-direction: column; }
.ips { padding-bottom: 12px; }
.ipf, .ipb, .ipad { border-radius: var(--radius-md); }
.ink-sw { width: 14px; height: 14px; border-radius: 4px; background: var(--text-primary); box-shadow: inset 0 0 0 1px var(--border-faint); }
.ipv.ipp { padding-left: 10px; font-family: var(--font-sans); }
.w-side .ipf { font-family: var(--font-sans); }
.ipb.ip-y { border-radius: var(--radius-md); }
.dz-side:not([data-sel="none"]) .dz-ip { display: flex; }
.dz-side:not([data-sel="none"]) .dz-none { display: none; }
.ips { flex: none; display: flex; flex-direction: column; padding-bottom: 8px; }
.ips > .slabel { height: 28px; }
.ipg { display: flex; flex-direction: column; gap: 4px; }
.ipr { position: relative; flex: none; display: flex; align-items: stretch; gap: 4px; height: 32px; }
.ipr.split { display: grid; grid-template-columns: 1fr 1fr; }
.ipf { display: flex; align-items: stretch; flex: 1; min-width: 0; background: var(--surface-field);
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: var(--text-paragraph-sm); line-height: 1; }
.ipl { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; color: var(--text-secondary); }
.ipl.t3 { color: var(--text-tertiary); }
.ipv { flex: 1 1 30px; display: flex; align-items: center; min-width: 0; color: var(--text-primary); }
.ipv b { font-weight: inherit; }
.ipc { flex: none; display: flex; align-items: center; justify-content: center; width: 24px; color: var(--text-ghost); }
.ipb { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; color: var(--text-tertiary);
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: var(--text-paragraph-sm); line-height: 1; }
.ip-wrap { margin-left: auto; }
.ip-stack { gap: 4px; }
.ipad { flex: none; display: grid; grid-template-columns: repeat(3, 32px); grid-template-rows: repeat(3, 32px); gap: 2px; background: var(--surface-control-dim); }
.ipad > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.ipad > span i { width: 2px; height: 2px; background: var(--text-subtle); }
.ipad > .on i { width: 16px; background: var(--text-primary); }
.ip-stack .ipr { flex: 1; min-width: 0; }
.ip-pads { margin-top: 4px; }
.ip-clip { align-items: center; padding-right: 6px; font-size: var(--text-paragraph-sm); color: var(--text-primary); }
.ipx { position: relative; width: 10px; height: 10px; margin: 0 11px; border: 1px solid currentColor; }
.ipx::after { content: ''; position: absolute; inset: 2px; background: currentColor; }
/* What shows for what is selected: the icons (images: size and corners), a frame (+ layout), stacked, hugging. */
.ip-lay, .ip-s, .v-f, .v-h, .ly-f { display: none; }
.v-i { display: inline; }
.dz-side:is([data-sel="frame"], [data-sel="stack"], [data-sel="hug"]) :is(.ip-lay, .ly-f) { display: flex; }
.dz-side:is([data-sel="frame"], [data-sel="stack"], [data-sel="hug"]) .ly-i,
.dz-side:not([data-sel="many"]) .ly-i { display: none; }
.dz-side:is([data-sel="frame"], [data-sel="stack"]) .v-i, .dz-side[data-sel="hug"] .v-i { display: none; }
.dz-side:is([data-sel="frame"], [data-sel="stack"]) .v-f, .dz-side[data-sel="hug"] .v-h { display: inline; }
.dz-side:is([data-sel="stack"], [data-sel="hug"]) .ip-s { display: flex; }
.dz-side:is([data-sel="stack"], [data-sel="hug"]) .ip-y { background: var(--surface-control-hover); color: var(--text-primary); }
/* The size menu (SizeControl): Fixed / Hug under the field. */
.dz-menu { display: none; position: absolute; z-index: 2; left: calc(50% + 2px); right: 0; top: calc(100% + 4px); flex-direction: column;
  background: var(--surface-overlay); border: 1px solid var(--border-default); box-shadow: 0 4px 12px var(--shadow-color); }
.dz-side[data-menu] .dz-menu { display: flex; }
.dz-menu span { display: flex; align-items: center; height: 32px; padding: 0 8px; font-size: var(--text-paragraph-sm); color: var(--text-secondary); }
.dz-side[data-menu="hug"] .dz-menu .hug { background: var(--accent-primary-bg); color: var(--text-primary); }

/* Brainstorm: a flow on the canvas (brainstorm.js): notes as steps and stickies, a note to be written held hidden
   at its spot until it is made; the link tool's dashed preview; what gets pasted, landing with a pop. */
.rt-n.new:not(.made) { visibility: hidden; }
.rt-n.made, .bs-gif.on, .bs-sticker.on { animation: rt-in 160ms var(--ease-out); }
@keyframes rt-in { from { opacity: 0; transform: scale(0.96); } }
/* A flow's notes are sized 60 tall, taller than their one line. */
.rt-n { height: 60px; }
.rt-t { padding: 16px; min-height: 20px; font-size: var(--text-paragraph-sm); line-height: 20px; color: var(--text-primary); white-space: nowrap; }
.bs-wires .pv { stroke-dasharray: 6 4; }
.bs-gif, .bs-sticker { position: absolute; display: none; object-fit: cover; }
.bs-gif.on, .bs-sticker.on { display: block; }
.bs-sticker { rotate: -9deg; }
.bs-sticker svg { display: block; width: 100%; height: 100%; }
.bs-h { position: absolute; white-space: nowrap; color: var(--text-primary); font-size: var(--text-title-h2); line-height: var(--text-title-h2--line-height);
  letter-spacing: var(--text-title-h2--letter-spacing); font-weight: var(--text-title-h2--font-weight); }

/* ── Hubris 3's chrome (crates/desktop: title_bar.rs, rail.rs, panes/mod.rs, components/pane_tab.rs), over the rules
   above ── The title bar 40 across the top; the rail 48 under it; a pane's tab strip 36 over its card. The card
   (radius LG, a --border-faint edge, the canvas's surface) holds the view's docked sidebar (224, its inner edge ruled)
   and the view, 8 in from the window's right and foot, so the view stands where the scenes measure it:
   x 272, y 76, 848 x 668. */

.hb-win { flex-direction: column; }
.stage-in .i { flex: none; }
.stage { border: 0; }

.w-title { position: relative; flex: none; display: flex; align-items: center; height: 40px; padding: 0 10px 0 14px;
  background: var(--surface-app); color: var(--text-primary); }
.w-title .lights { gap: 8px; margin-right: 12px; }
.w-title .lights i { width: 12px; height: 12px; }
/* A small ghost button (button.rs): 32 square, rounded MD, its 16px icon in the primary ink. */
.w-ic { width: 32px; height: 32px; border-radius: var(--radius-md); color: var(--text-primary); }
.w-ic.off { opacity: 0.5; }
/* Search, 4, then undo and redo touching, as title_bar.rs; a size down from its 32, the mock being scaled small. */
.w-title .w-ic { width: 28px; height: 28px; }
.w-title .lights + .w-ic { margin-right: 4px; }
.w-title-r { margin-left: auto; display: flex; align-items: center; }
.w-title-r .w-peers { padding: 0 2px; }
.w-av { position: relative; display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--surface-app); color: var(--text-primary);
  background: color-mix(in srgb, color-mix(in srgb, var(--text-primary) 70%, var(--accent-primary)) 14%, var(--surface-app));
  font-size: 12px; line-height: 1; font-weight: 500; }
/* The letter sits in the part of the face that shows, clear of the ring of the one over it. */
.w-av + .w-av { margin-left: -8px; padding-left: 8px; }
.w-more { z-index: 0; font-family: var(--font-sans); font-size: 11px; color: var(--text-muted); background: var(--surface-raised); }

.w-body { flex: 1; min-height: 0; display: flex; }

/* The rail: a 44px row per workspace, its 36px avatar rounded LG on the brand's tint, the chosen one's bar in the
   brand at the window's edge, its avatar's height. */
.w-rail { box-shadow: none; }
.w-ws { height: 44px; }
.w-ws > span { width: 36px; height: 36px; border-radius: var(--radius-lg); color: var(--text-primary);
  background: color-mix(in srgb, color-mix(in srgb, var(--text-primary) 70%, var(--accent-primary)) 14%, transparent);
  font-size: 18px; line-height: 1; font-weight: 500; }
.w-ws.far > span { opacity: 0.5; }
.w-ws.on::before { top: 4px; width: 3px; height: 36px; border-radius: 0 2px 2px 0; background: var(--accent-primary); }
.w-ra { height: 44px; color: var(--text-primary); }
.w-rail-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0; }
.w-rail-foot .w-ra { width: 32px; height: 32px; }

.w-main { margin-right: 8px; }

/* TabStrip: 36 tall, tabs 28 tall 2 apart. A tab (pane_tab.rs): 12 in, 8 to its words, 6 after its close; its icon
   and words in the tertiary ink, the open one's in the primary, lifted onto the card's surface (an edge only in
   light: in dark one read as a bigger tab). */
.w-tabs { align-items: center; gap: 2px; height: 36px; padding: 0; box-shadow: none; background: none; }
.w-tab { height: 28px; max-width: 200px; padding: 0 6px 0 12px; gap: 8px; border-radius: var(--radius-md);
  border: var(--hair, 1px) solid transparent; color: var(--text-tertiary); }
.w-tab.pin { width: 28px; padding: 0; }
.w-tab.plus { width: 28px; padding: 0; justify-content: center; }
.w-tab-l { font-family: var(--font-sans); font-size: var(--text-paragraph-sm); line-height: 20px; letter-spacing: var(--text-paragraph-sm--letter-spacing); }
.w-tab-x { display: grid; place-items: center; color: var(--text-tertiary); }
.hb-win[data-view="calendar"] .vt-cal,
.hb-win[data-view="note"] .vt-note,
.hb-win[data-view="board"] .vt-board,
.w-left .w-tab.on {
  color: var(--text-primary); background: var(--surface-canvas); box-shadow: none;
}
[data-scheme="light"] :is(.hb-win[data-view="calendar"] .vt-cal, .hb-win[data-view="note"] .vt-note, .hb-win[data-view="board"] .vt-board, .w-left .w-tab.on) {
  border-color: var(--border-faint);
}
.w-chrome { align-items: center; padding-right: 2px; }
.w-chrome .w-ic { width: 28px; height: 28px; color: var(--text-tertiary); }

/* A pane's card (panes/mod.rs): rounded LG, a --border-faint edge, on the canvas's surface, 8 off the window's foot;
   it holds the view and the view's sidebars. Split, two cards 6 apart. */
.w-card { position: relative; flex: 1; min-height: 0; display: flex; margin-bottom: 8px; overflow: hidden;
  background: var(--surface-canvas); border: var(--hair, 1px) solid var(--border-faint); border-radius: var(--radius-lg); }
.w-view { flex: 1; min-width: 0; background: var(--surface-canvas); }
.hb-win[data-split] .w-split { width: 6px; background: transparent; }
/* The closed pages' icons wait at the front of the top-left strip only. */
.hb-win[data-split] .w-pane:not(.w-left) .w-tab.pin { display: none; }

/* A pane's sidebars (plugins/sidebar, float_panel.rs), as its view has them. Floating (a canvas's, in a pane with room
   for both): a card 16 in from the view's top and side, 256 wide, as tall as what's in it up to 320, rounded 14 on the
   overlay surface, a --border-default edge and a menu's shadow; everything in it 12 in. Docked (the calendar's left):
   it runs the card's height, the view making room, its inner edge ruled in --border-faint; everything 16 in. Shut (a
   note's, with no room to float clear of its column; a canvas's in a narrow pane): a 36 square in its corner,
   rounded 10, its panel icon showing. */
.w-side { position: absolute; z-index: 4; left: 16px; top: 16px; width: 256px; max-height: 320px; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface-overlay); border: var(--hair, 1px) solid var(--border-default); border-radius: 14px; box-shadow: 0 8px 24px var(--shadow-color), 0 2px 6px var(--shadow-color); }
.w-side.w-r { left: auto; right: 16px; }
.w-side:empty, .w-side.w-r:not(:has(> :not(.w-shut))) { display: none; }
.w-side .pane-side { flex: none; padding: 0 12px 4px; }
.w-side .sh { margin: 12px 0 20px; }
.w-shut { display: none; }
:is(.hb-win[data-view="note"] .w-pane:not(.w-left), .w-left) .w-side { display: flex; width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 2px 6px var(--shadow-color); }
:is(.hb-win[data-view="note"] .w-pane:not(.w-left), .w-left) .w-side > :not(.w-shut) { display: none; }
:is(.hb-win[data-view="note"] .w-pane:not(.w-left), .w-left) .w-shut { display: grid; place-items: center; width: 34px; height: 34px; color: var(--text-primary); }
.hb-win[data-view="calendar"] .w-pane:not(.w-left) .w-side { position: relative; z-index: auto; left: auto; top: auto; flex: none; width: 223px; max-height: none;
  background: var(--surface-canvas); border: 0; border-right: var(--hair, 1px) solid var(--border-faint); border-radius: 0; box-shadow: none; }
.hb-win[data-view="calendar"] .w-pane:not(.w-left) .w-side.w-r { display: none; }
.hb-win[data-view="calendar"] .w-pane:not(.w-left) .w-side .pane-side { flex: 1; padding: 0 16px; }
.hb-win[data-view="calendar"] .w-pane:not(.w-left) .w-side .sh { margin: 16px 0 20px; }

.hb-win .btn { border-radius: var(--radius-md); }
.grp .btn { border-radius: 0; }
.grp .btn:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.grp .btn:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* ── The docked sidebar (plugins/sidebar): everything one inset (16 docked) from the card's edges. Its head: the
   view's 36px picture or icon (Avatar, rounded LG on the brand's tint) beside its title (label-sm) over when it was
   edited (paragraph-xs), the ⋮ and the panel button last; 20 under it to the first section. A section: its label
   (label-sm in the primary ink, sentence case, 24 tall), 4 to its rows; sections 20 apart. A row lights 8 outside
   the inset, its words 8 inside the row: 32 tall (tree.rs), a tree's 16 for its caret before its icon. ── */

.pane-side { padding: 0 16px; }
.sh { flex: none; display: flex; align-items: center; gap: 10px; min-height: 36px; margin: 16px 0 20px; }
.sh + :is(.addf, .fchip) { display: none; }
.sh-i { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--radius-lg); color: var(--text-primary);
  background: color-mix(in srgb, color-mix(in srgb, var(--text-primary) 70%, var(--accent-primary)) 14%, transparent); }
.sh-i .i { width: 18px; height: 18px; }
.sh-t { flex: 1; min-width: 0; }
.sh-t b { font-weight: 500; font-size: var(--text-label-sm); line-height: 20px; letter-spacing: var(--text-label-sm--letter-spacing); color: var(--text-primary); }
.sh-t small { font-size: var(--text-paragraph-xs); line-height: 16px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-b { flex: none; display: flex; gap: 2px; margin-right: -4px; }
.sh-b > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-md); color: var(--text-primary); }

.hb-win .slabel { flex: none; height: 24px; padding: 0; margin-bottom: 4px; gap: 6px; color: var(--text-primary); }
.hb-win .sl-t { font-size: var(--text-label-sm); line-height: 20px; letter-spacing: var(--text-label-sm--letter-spacing); font-weight: 500; text-transform: none; }
.hb-win .sl-rule { display: none; }
.pane-side .slabel { height: 24px; }
.srow { height: 32px; margin: 0 -8px; padding: 0 8px; border-radius: var(--radius-md); color: var(--text-primary); }
.srow.sub { padding-left: 24px; }
.srow > .i { color: var(--text-primary); }
.srow > .i + .fn, .srow > .cbox + .fn { margin-left: 8px; }
.srow .when { color: var(--text-tertiary); font-size: var(--text-paragraph-xs); }
/* A tree's row (tree.rs): 8 in, its caret's 12 and 8, then its icon; 16 more a level; the secondary ink, the picked
   ones' the primary on the selected fill. */
.srow.lyr { position: relative; padding-left: 28px; color: var(--text-secondary); }
.srow.lyr > .i { color: inherit; }
.srow.sub.lyr { padding-left: 44px; }
.srow .tc { position: absolute; left: 8px; top: 10px; display: grid; place-items: center; width: 12px; height: 12px; color: var(--text-secondary); }
.w-left .bd-make { display: none; }
.srow.sel { background: var(--surface-control-hover); color: var(--text-primary); }
/* A layer's box (checkbox.rs): 14 square, rounded 4, filled in its calendar's colour, its tick in white. */
.cbox { width: 14px; height: 14px; border: 0; border-radius: 4px; background: var(--lc, var(--accent-primary)); color: #fff; }
.cbox .i { width: 10px; height: 10px; }
.srow .cnt { margin-left: auto; font-size: var(--text-paragraph-xs); line-height: 16px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.isearch { display: none; }
.pane-side .empty { flex: none; min-height: 0; height: 32px; justify-content: flex-start; padding: 0; font-family: var(--font-sans); text-transform: none;
  font-size: var(--text-paragraph-sm); line-height: 20px; color: var(--text-muted); }
