/* ================================================================
   Daylight — the surfaces that float: the command box (⌘K), Settings,
   Graph, Canvas, and every menu, dialog, overlay and toast.

   Scoped to body.surface-daylight, colours from the theme's own variables
   (so light and dark both work), shapes from base.css's kit: tiles 20 ·
   cards 14 · controls 10 · chips round.

   The rule of this file: a thing that floats over the page is a TILE with a
   soft float shadow and no hard border, its rows are 36–44px with a 10px
   radius, the chosen row is an accent TINT (never a filled block with white
   text), and keys read as keycaps.
   ================================================================ */

body.surface-daylight {
  /* The dim behind anything floating. Warm ink in light, plain black at
     night — a translucent warm grey over a dark desk reads as fog. */
  --dl-scrim: rgba(31, 28, 24, 0.28);
  /* Text ON the accent. The night accent is a light blue: white on it fails
     at button sizes, dark ink clears 8:1. */
  --dl-on-accent: #FFFFFF;
}
body.surface-daylight:not(.theme-light) {
  --dl-scrim: rgba(0, 0, 0, 0.55);
  --dl-on-accent: #161514;
}

/* ---- Every scrim in the app, one recipe. No blur: the tile's float shadow
   already separates it, and blurring a whole page of text costs a frame. ---- */
body.surface-daylight :is(
  #modal-overlay, #prompt-overlay, #settings-overlay, #auth-overlay,
  #import-overlay, #share-overlay, #deck-modal-overlay, #stats-modal-overlay,
  #e2e-overlay, #diff-overlay, #improve-modal, #ask-modal, #cards-modal,
  .delete-choice-overlay, .vn-dialog-overlay,
  #record-source, #record-event, #record-mode
) {
  background: var(--dl-scrim);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ---- The shared shell for a floating panel: a tile, not a bordered box. ---- */
body.surface-daylight :is(
  #palette, #prompt-box, #auth-box, #import-box, #share-box,
  #deck-modal-box, #stats-modal-box, .vn-dialog
) {
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--dl-shadow-float);
}

/* Close buttons live in the corner of half these panels. */
body.surface-daylight :is(#settings-overlay, #share-box, #auth-box, #deck-modal-box, #stats-modal-box) .icon-btn {
  width: 32px; height: 32px; border-radius: 8px; color: var(--text-muted);
}
body.surface-daylight :is(#settings-overlay, #share-box, #auth-box, #deck-modal-box, #stats-modal-box) .icon-btn:hover {
  background: var(--dl-hover); color: var(--text-heading);
}

/* ================================================================
   The command box — one box for commands, notes and settings.
   ================================================================ */

body.surface-daylight #palette {
  position: relative;
  margin-top: 13vh;
  width: min(680px, 92vw);
  border-radius: 18px;
}

/* A search mark drawn in the theme's own grey: the input has no icon slot in
   the markup, so the box wears one. mask, not an <img>, so it takes a colour. */
body.surface-daylight #palette::before {
  content: '';
  position: absolute; left: 20px; top: 18px;
  width: 20px; height: 20px;
  background: var(--text-muted);
  -webkit-mask: var(--dl-search-ic) center / 20px 20px no-repeat;
  mask: var(--dl-search-ic) center / 20px 20px no-repeat;
  pointer-events: none;
}
body.surface-daylight {
  --dl-search-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
}

/* The one large input row. */
body.surface-daylight #palette-input {
  padding: 16px 20px 16px 52px;
  font-size: 17px;
  font-weight: 500;
  line-height: 24px;
  color: var(--text-heading);
  border-bottom: 1px solid var(--border);
}
body.surface-daylight #palette-input::placeholder { color: var(--text-muted); font-weight: 500; }

body.surface-daylight #palette-results { padding: 8px; max-height: 52vh; }

/* 44px rows. A row with a search snippet grows rather than squashing. */
body.surface-daylight .palette-item {
  min-height: 44px;
  padding: 6px 12px;
  justify-content: center;
  gap: 2px;
  border-radius: 10px;
  color: var(--text-normal);
}
body.surface-daylight .palette-item .pi-row { gap: 12px; }
body.surface-daylight .palette-item .pi-label {
  font-size: 15px; line-height: 1.3; font-weight: 500; color: var(--text-heading);
}
body.surface-daylight .palette-item .pi-hint { font-size: 13px; color: var(--text-muted); }
body.surface-daylight .palette-item .pi-sub { font-size: 13px; color: var(--text-muted); }
body.surface-daylight .palette-item .pi-sub mark {
  background: var(--highlight-bg); color: var(--highlight-text); font-weight: 500;
}

/* The highlighted row is a TINT of the accent with ink on top — the filled
   block with white text was the one place the palette stopped looking like
   the rest of the app. */
body.surface-daylight .palette-item.selected { background: var(--dl-select); color: var(--text-heading); }
body.surface-daylight .palette-item.selected .pi-label { color: var(--text-heading); font-weight: 500; }
body.surface-daylight .palette-item.selected .pi-hint,
body.surface-daylight .palette-item.selected .pi-sub { color: var(--text-muted); }

/* Shortcut hints as keycaps (palette.js tags those rows .pi-keys). A path hint
   still truncates from the front, which needs direction:rtl — keys must not
   inherit it or ⌘ and N come out backwards. */
body.surface-daylight .palette-item .pi-hint.pi-keys {
  direction: ltr;
  display: inline-flex; align-items: center; gap: 4px;
  flex: 0 0 auto; max-width: none;
}
body.surface-daylight .palette-item .pi-hint.pi-keys kbd {
  background: var(--card-bg);
  color: var(--text-muted);
  box-shadow: inset 0 0 0 1px var(--border);
  min-width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
body.surface-daylight .palette-item.selected .pi-hint.pi-keys kbd { background: var(--card-bg); }

/* The AI row keeps its divider, in the kit's hairline. */
body.surface-daylight .palette-item.palette-ai:not(:first-child) {
  border-top-color: var(--border); margin-top: 6px; padding-top: 12px;
}

body.surface-daylight .palette-empty {
  padding: 24px 16px; font-size: 14px; color: var(--text-muted);
}

/* A quiet footer. */
body.surface-daylight #palette-foot {
  padding: 0 16px; height: 40px;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  font-size: 12px; font-weight: 500; color: var(--text-muted);
}
body.surface-daylight #palette-foot kbd {
  font-family: var(--font-ui); font-size: 12px; font-weight: 500;
  background: var(--card-bg); color: var(--text-muted);
  box-shadow: inset 0 0 0 1px var(--border); border-radius: 6px; padding: 3px 6px;
}
body.surface-daylight #palette-foot span { margin: 0 2px; color: var(--text-faint); }
/* display:flex above outweighs style.css's [hidden] rule, and the picker and
   the command list both hide this footer. Put the attribute back on top. */
body.surface-daylight #palette-foot[hidden] { display: none; }

/* ================================================================
   Settings — two tiles side by side inside one window.
   ================================================================ */

body.surface-daylight #settings-box {
  width: min(1080px, 94vw);
  height: min(740px, 90vh);
  gap: 10px;
  padding: 10px;
  background: var(--app-bg);
  border: 0;
  border-radius: 22px;
  box-shadow: var(--dl-shadow-float);
}
body.surface-daylight #settings-side,
body.surface-daylight #settings-main {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
}
body.surface-daylight #settings-side {
  width: 248px;
  border-right: 0;
  padding: 14px 12px;
  gap: 12px;
}
body.surface-daylight #settings-search {
  font-size: 13px; padding: 8px 11px; border-radius: 10px;
  background: var(--bg-secondary); border-color: var(--border);
}

body.surface-daylight .settings-nav { gap: 2px; }
body.surface-daylight .settings-nav-group {
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  margin: 14px 8px 4px;
}
body.surface-daylight .settings-nav-item {
  height: 36px; padding: 0 10px; gap: 10px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--text-normal);
}
body.surface-daylight .settings-nav-item:hover { background: var(--dl-hover); color: var(--text-heading); }
body.surface-daylight .settings-nav-item.active {
  background: var(--dl-select); color: var(--text-heading); font-weight: 500;
}

body.surface-daylight #settings-head { padding: 16px 22px 10px; }
body.surface-daylight .settings-title,
body.surface-daylight #settings-page-title {
  font-size: 21px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-heading);
}
body.surface-daylight .settings-scroll { padding: 2px 22px 24px; }

/* A group heading, then rows separated by a hairline — no boxes. */
body.surface-daylight :is(.settings-section, .settings-sub, .settings-page-badge) {
  font-size: 15px; font-weight: 600; color: var(--text-heading);
  margin: 22px 0 2px; padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
  border-top: 0; padding-top: 0;
}
body.surface-daylight .settings-scroll .settings-section:first-child { margin-top: 4px; }

body.surface-daylight .settings-row {
  min-height: 44px;
  margin-bottom: 0;
  padding: 11px 0;
  font-size: 14px;
  box-shadow: inset 0 1px 0 var(--border);
}
/* A heading already drew its own line; a second one under it is a seam. */
body.surface-daylight :is(.settings-section, .settings-sub, .settings-page-badge) + .settings-row,
body.surface-daylight .settings-page > .settings-row:first-child { box-shadow: none; }
body.surface-daylight .settings-row label {
  font-size: 14px; font-weight: 500; color: var(--text-normal);
}
body.surface-daylight .settings-value { font-size: 13px; color: var(--text-muted); }
body.surface-daylight .settings-value.dim { color: var(--text-faint); }
body.surface-daylight .settings-hint {
  font-size: 13px; line-height: 1.5; color: var(--text-muted); margin: 6px 0 12px;
}
body.surface-daylight .settings-hint.warn { color: var(--danger); }
body.surface-daylight .settings-hint code,
body.surface-daylight .nb-empty-body code { background: var(--bg-secondary); border-radius: 5px; }

/* Controls: the kit's 10px radius, a hairline ring instead of a border. */
body.surface-daylight #settings-box :is(select, .settings-input, input[type="text"], input[type="password"], input[type="number"], input[type="email"]) {
  font-size: 13.5px; padding: 8px 11px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-normal);
}
body.surface-daylight #settings-box select { cursor: pointer; padding-right: 8px; }
body.surface-daylight .settings-row input[type="color"] {
  width: 44px; height: 30px; border-radius: 10px; border-color: var(--border);
}

/* Buttons. Quiet by default, accent when it is the thing to do. */
body.surface-daylight :is(.settings-mini, .meeting-toast-btn, .prompt-btns button, .gs-groups-actions button) {
  height: 32px; padding: 0 13px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  background: var(--card-bg);
  color: var(--text-heading);
  box-shadow: inset 0 0 0 1px var(--border);
  border: 0;
}
body.surface-daylight :is(.settings-mini, .meeting-toast-btn, .prompt-btns button):hover {
  background: var(--dl-hover); color: var(--text-heading); filter: none;
}
body.surface-daylight :is(.settings-mini.accent, .prompt-btns button.accent, .meeting-toast-btn.accent,
  #auth-submit, #share-create, .web-gate-btn, #improve-modal .improve-apply) {
  background: var(--accent); color: var(--dl-on-accent);
  box-shadow: none; font-weight: 500;
}
body.surface-daylight :is(.settings-mini.accent, .prompt-btns button.accent, .meeting-toast-btn.accent,
  #auth-submit, #share-create, .web-gate-btn):hover {
  background: var(--accent-strong); color: var(--dl-on-accent); transform: none;
}
body.surface-daylight .settings-mini.danger {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger); box-shadow: none;
}

/* Sliders — a 4px rail with a white knob, the kit's one slider. */
body.surface-daylight :is(#settings-box, #graph-settings) input[type="range"] {
  appearance: none; -webkit-appearance: none;
  height: 20px; background: transparent; cursor: pointer;
}
body.surface-daylight :is(#settings-box, #graph-settings) input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px; background: var(--border);
}
body.surface-daylight :is(#settings-box, #graph-settings) input[type="range"]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; margin-top: -8px;
  border-radius: 50%; background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(31, 28, 24, 0.25), inset 0 0 0 1px rgba(31, 28, 24, 0.12);
}
body.surface-daylight:not(.theme-light) :is(#settings-box, #graph-settings) input[type="range"]::-webkit-slider-thumb {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
body.surface-daylight .settings-range { gap: 12px; }

/* A yes/no in a settings row is a switch, not a tick-box. Scoped to the
   settings sheet: the graph's filters and a note's checklists stay boxes. */
body.surface-daylight #settings-box .settings-row input[type="checkbox"] {
  width: 40px; height: 24px;
  border: 0; border-radius: 999px;
  background: var(--bg-tertiary);
  box-shadow: inset 0 0 0 1px var(--border);
  transition: background 0.14s ease;
}
body.surface-daylight #settings-box .settings-row input[type="checkbox"]::after {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: #FFFFFF; transform: none;
  box-shadow: 0 1px 2px rgba(31, 28, 24, 0.22);
  transition: left 0.14s ease;
}
body.surface-daylight #settings-box .settings-row input[type="checkbox"]:checked {
  background: var(--accent); box-shadow: none;
}
body.surface-daylight #settings-box .settings-row input[type="checkbox"]:checked::after {
  left: 18px; border: 0; transform: none; background: #FFFFFF;
}

/* Appearance — the theme gallery. */
body.surface-daylight .tc-group {
  font-size: 13px; font-weight: 500; color: var(--text-muted); margin: 18px 0 8px;
}
body.surface-daylight .theme-grid {
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 12px;
}
body.surface-daylight .theme-card {
  padding: 8px; gap: 8px;
  border: 0; border-radius: 14px;
  background: var(--card-bg);
  box-shadow: inset 0 0 0 1px var(--border);
}
body.surface-daylight .theme-card:hover { transform: none; box-shadow: inset 0 0 0 1px var(--text-faint); }
body.surface-daylight .theme-card.cur { box-shadow: 0 0 0 2px var(--accent); }
body.surface-daylight .tc-swatch { height: 70px; border-radius: 10px; border: 0; }
body.surface-daylight .tc-name { font-size: 13px; font-weight: 500; color: var(--text-heading); }
body.surface-daylight :is(.tc-del, .tc-share) { border-color: var(--border); border-radius: 50%; }

/* ================================================================
   Graph — the library as a sky, on the page tile.
   ================================================================ */

/* The dot grid. The canvas paints an opaque ground of its own, so the grid
   goes OVER it at a whisper — enough to read as paper, not enough to sit in
   front of a node. */
body.surface-daylight #graph-container::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--text-heading) 7%, transparent) 1px, transparent 1.2px);
  background-size: 24px 24px;
}

body.surface-daylight #graph-settings {
  top: 14px; right: 14px; width: 268px;
  padding: 16px;
  gap: 10px;
  background: var(--card-bg);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--dl-shadow-raised);
  font-size: 13px;
  color: var(--text-normal);
  z-index: 5;
}
body.surface-daylight #graph-settings.collapsed { width: auto; padding: 10px; }
body.surface-daylight .gs-title { font-size: 15px; font-weight: 600; color: var(--text-heading); }
body.surface-daylight .gs-collapse-btn { width: 26px; height: 26px; border-radius: 8px; color: var(--text-muted); }
body.surface-daylight .gs-collapse-btn:hover { background: var(--dl-hover); color: var(--text-heading); }
body.surface-daylight #graph-filter {
  font-size: 13px; padding: 8px 11px; border-radius: 10px;
  background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-normal);
}
/* Filters · Groups · Display · Forces — the names stay, the shouting goes. */
body.surface-daylight .gs-section { border-top-color: var(--border); padding-top: 10px; }
body.surface-daylight .gs-section > summary {
  font-size: 13px; font-weight: 500; color: var(--text-muted);
}
body.surface-daylight .gs-section > summary::before { color: var(--text-faint); font-size: 14px; }
body.surface-daylight .gs-section-body { gap: 10px; }
body.surface-daylight :is(.gs-row, .gs-select, .gs-slider) { font-size: 13.5px; color: var(--text-normal); }
body.surface-daylight .gs-row { gap: 9px; }
body.surface-daylight .gs-select select {
  font-size: 13px; padding: 6px 9px; border-radius: 10px;
  background: var(--card-bg); border: 1px solid var(--border); color: var(--text-normal);
}
body.surface-daylight .gs-local-opts { border-left-color: var(--border); padding-left: 12px; }
body.surface-daylight .gs-q-input {
  font-family: var(--font-ui); font-size: 13px; padding: 6px 9px;
  border-radius: 10px; background: var(--card-bg); border-color: var(--border);
}
body.surface-daylight .gs-swatch { border-radius: 6px; border-color: var(--border); box-shadow: none; }
body.surface-daylight .gs-groups-empty { font-size: 12.5px; color: var(--text-muted); }
body.surface-daylight .gs-groups-empty code {
  font-family: var(--font-ui); font-size: 12px;
  background: var(--tag-bg); color: var(--tag-text);
}
body.surface-daylight :is(.gs-eye, .gs-remove) { border-radius: 8px; color: var(--text-muted); }
body.surface-daylight .gs-eye:hover { background: var(--dl-hover); color: var(--text-heading); }
body.surface-daylight .gs-palette {
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--dl-shadow-float);
}
body.surface-daylight .gs-palette button { width: 20px; height: 20px; border-radius: 6px; border-color: var(--border); }

/* The legend reads as one quiet row of chips; the count as a chip beside it. */
body.surface-daylight #graph-legend { left: 14px; bottom: 60px; gap: 6px; }
body.surface-daylight .graph-legend-chip {
  padding: 5px 12px 5px 10px;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  background: var(--card-bg);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 1px solid var(--border);
  border-radius: 999px;
}
body.surface-daylight .graph-legend-chip:hover { color: var(--text-heading); }
body.surface-daylight .graph-legend-chip .lc-dot { width: 8px; height: 8px; box-shadow: none; }
body.surface-daylight .graph-legend-chip .lc-label { font-size: 12px; }
body.surface-daylight #graph-info {
  left: 14px; bottom: 14px;
  padding: 7px 14px;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ================================================================
   Canvas — a board on the page tile: dot grid, cards as tiles,
   groups as soft areas, one floating tool bar.
   ================================================================ */

body.surface-daylight #canvas-view .cv-viewport {
  background-image: radial-gradient(color-mix(in srgb, var(--text-heading) 11%, transparent) 1px, transparent 1.2px);
  background-size: 24px 24px;
}

/* The board name, top left — the way between boards. */
body.surface-daylight #cv-pick {
  top: 14px; left: 14px;
  gap: 12px; padding: 8px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--dl-shadow-raised);
}
body.surface-daylight #cv-pick-name { font-size: 15px; font-weight: 600; color: var(--text-heading); }
body.surface-daylight #cv-pick-name .cv-caret { color: var(--text-faint); margin-left: 4px; }
body.surface-daylight #cv-pick-new { font-size: 13px; font-weight: 500; color: var(--accent); }

body.surface-daylight #cv-zoom {
  right: 14px; bottom: 14px;
  padding: 4px 8px;
  font-size: 13px; font-weight: 500; color: var(--text-heading);
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--dl-shadow-raised);
}
body.surface-daylight #cv-zoom button { color: var(--text-muted); font-size: 16px; padding: 0 5px; }
body.surface-daylight #cv-zoom button:hover { color: var(--text-heading); }

/* Cards are tiles: radius 14, a hairline and a soft lift, no 1.5px border. */
body.surface-daylight #canvas-view .cv-card {
  border: 0;
  border-radius: 14px;
  background: var(--card-bg);
  box-shadow: var(--dl-shadow), 0 6px 16px rgba(31, 28, 24, 0.05);
}
body.surface-daylight:not(.theme-light) #canvas-view .cv-card {
  box-shadow: var(--dl-shadow), 0 6px 16px rgba(0, 0, 0, 0.35);
}
body.surface-daylight #canvas-view .cv-card.selected {
  box-shadow: 0 0 0 2px var(--accent), 0 6px 16px rgba(31, 28, 24, 0.10);
}
body.surface-daylight #canvas-view .cv-card-title {
  padding: 14px 16px 2px;
  border-bottom: 0;
  font-size: 15px; font-weight: 600; color: var(--text-heading);
}
body.surface-daylight #canvas-view .cv-card-title svg { width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; }
body.surface-daylight #canvas-view .cv-card-body {
  padding: 4px 16px 14px;
  font-size: 13px; line-height: 1.45; color: var(--text-muted);
}
body.surface-daylight #canvas-view .cv-card-body.markdown-body :is(h1, h2, h3) { color: var(--text-heading); }
body.surface-daylight #canvas-view .cv-resize { border-color: var(--text-faint); }
body.surface-daylight #canvas-view .cv-dot { border-color: var(--card-bg); }
body.surface-daylight #canvas-view .cv-missing { color: var(--text-faint); }

/* A group is an AREA — a soft fill and a hairline ring, with its name on a
   chip inside it. The dashed rectangle read as a selection, not a place. */
body.surface-daylight #canvas-view .cv-group {
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
body.surface-daylight #canvas-view .cv-group.selected { border-color: var(--accent); }
body.surface-daylight #canvas-view .cv-group .cv-group-label {
  top: 14px; left: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--card-bg);
  box-shadow: var(--dl-shadow);
  font-size: 13px; font-weight: 600; color: var(--text-heading);
}

/* Connectors: a hairline that follows the ink, and a label on the paper. */
body.surface-daylight #canvas-view .cv-edge { stroke: color-mix(in srgb, var(--text-muted) 55%, transparent); stroke-width: 1.5; }
body.surface-daylight #canvas-view .cv-edge.selected,
body.surface-daylight #canvas-view .cv-edge-temp { stroke: var(--accent); }
body.surface-daylight #canvas-view .cv-edge-label {
  fill: var(--text-muted); font-family: var(--font-ui); font-size: 12px; stroke-width: 5px;
}

/* The tool bar floats at the bottom, where a hand rests. */
body.surface-daylight #canvas-view .cv-toolbar {
  top: auto; bottom: 16px;
  gap: 4px; padding: 6px;
  background: var(--card-bg);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--dl-shadow-float);
}
body.surface-daylight #canvas-view .cv-toolbar button {
  height: 36px; padding: 0 12px; gap: 7px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--text-muted);
}
body.surface-daylight #canvas-view .cv-toolbar button:hover { background: var(--dl-hover); color: var(--text-heading); }
body.surface-daylight #canvas-view .cv-toolbar button svg { width: 16px; height: 16px; }
body.surface-daylight #canvas-view .cv-colors {
  gap: 5px; margin: 0 6px; padding: 0 10px;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}
/* The swatches are buttons inside the tool bar, so the 36px button height
   above reaches them too and turns a circle into a lozenge. */
body.surface-daylight #canvas-view .cv-toolbar .cv-swatch {
  width: 18px; height: 18px; min-height: 0; padding: 0 !important;
  border: 1px solid var(--border);
}
/* The hint moves off the bottom edge the tool bar now owns. */
body.surface-daylight #canvas-view .cv-hint {
  top: 20px; bottom: auto;
  font-size: 12px; color: var(--text-faint);
}

/* ================================================================
   Menus
   ================================================================ */

body.surface-daylight :is(#context-menu, .cm-submenu) {
  padding: 6px;
  min-width: 208px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--dl-shadow-float);
}
body.surface-daylight .cm-item {
  min-height: 34px; padding: 7px 10px;
  border-radius: 8px;
  font-size: 14px; color: var(--text-normal);
}
body.surface-daylight .cm-item:hover,
body.surface-daylight .cm-item.has-sub:hover { background: var(--dl-hover); color: var(--text-heading); }
body.surface-daylight .cm-item.danger { color: var(--danger); }
body.surface-daylight .cm-item.danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
body.surface-daylight .cm-arrow { color: var(--text-faint); font-size: 12px; }
body.surface-daylight .cm-sep { background: var(--border); margin: 5px 8px; }

/* ================================================================
   Dialogs — confirm, alert, prompt, and the due-date sheet.
   ================================================================ */

body.surface-daylight :is(#prompt-box, .vn-dialog) { border-radius: 20px; padding: 24px; }
body.surface-daylight :is(#prompt-title, .vn-dialog-title) {
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-heading);
  margin-bottom: 12px;
}
body.surface-daylight .vn-dialog-msg { font-size: 14px; line-height: 1.6; color: var(--text-normal); }
body.surface-daylight .prompt-btns { gap: 8px; margin-top: 20px; }
body.surface-daylight #prompt-box input[type="text"] { padding: 10px 12px; }

body.surface-daylight .vn-due-name {
  font-size: 19px; font-weight: 600; color: var(--text-heading);
  border-bottom-color: var(--border); padding-bottom: 10px;
}
body.surface-daylight .vn-due-sum { font-size: 13px; font-weight: 500; color: var(--accent); }
body.surface-daylight .vn-due-row { font-size: 13.5px; }
body.surface-daylight .vn-due-row > span:first-child { color: var(--text-muted); font-size: 13px; }
body.surface-daylight :is(.vn-due-row input, .vn-due-row select) {
  font-size: 13.5px; padding: 8px 10px; border-radius: 10px;
  background: var(--card-bg); border: 1px solid var(--border); color: var(--text-normal);
}
body.surface-daylight :is(.vn-due-quick button, .vn-due-lens button, .vn-due-daypreset) {
  font-size: 12.5px; font-weight: 500; padding: 5px 13px;
  border-radius: 999px;
  background: var(--card-bg); border: 1px solid var(--border); color: var(--text-muted);
}
body.surface-daylight :is(.vn-due-quick button, .vn-due-lens button, .vn-due-daypreset):hover {
  color: var(--accent); border-color: var(--accent);
}
body.surface-daylight .vn-due-day {
  width: 32px; height: 32px; font-size: 12.5px; font-weight: 600;
  background: var(--card-bg); border: 1px solid var(--border); color: var(--text-muted);
}
body.surface-daylight .vn-due-day.on { background: var(--accent); border-color: var(--accent); color: var(--dl-on-accent); }
body.surface-daylight :is(.vn-due-hint, .vn-due-note) { font-size: 12.5px; color: var(--text-muted); }
body.surface-daylight .vn-due-note.bad { color: var(--danger); }

/* The record chooser sheets wear the dialog shell. */
body.surface-daylight :is(#record-source, #record-event, #record-mode) .rs-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--dl-shadow-float);
}
body.surface-daylight :is(#record-source, #record-event, #record-mode) .rs-title {
  font-size: 17px; font-weight: 600; color: var(--text-heading);
}
body.surface-daylight :is(#record-source button[data-src], #record-event button[data-ev],
  #record-mode button[data-mode], #record-source .rs-listen) {
  padding: 12px 14px; border: 0; border-radius: 14px;
  background: var(--bg-secondary);
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: 14px; color: var(--text-heading);
}
body.surface-daylight :is(#record-source button[data-src], #record-event button[data-ev],
  #record-mode button[data-mode], #record-source .rs-listen):hover {
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
body.surface-daylight :is(#record-source, #record-event, #record-mode) .rs-cancel {
  border-radius: 10px; border-color: var(--border); color: var(--text-muted);
}

/* ================================================================
   Sign in, the web app's front door, share, import
   ================================================================ */

body.surface-daylight #auth-box { border-radius: 20px; padding: 32px 30px 28px; }
body.surface-daylight #auth-brand { font-size: 15px; font-weight: 600; color: var(--text-heading); }
body.surface-daylight #auth-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
body.surface-daylight #auth-sub { font-size: 14px; color: var(--text-muted); }
body.surface-daylight #auth-form label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
body.surface-daylight #auth-form input {
  padding: 10px 12px; border-radius: 10px;
  background: var(--card-bg); border: 1px solid var(--border);
}
body.surface-daylight #auth-form input:focus { border-color: var(--accent); box-shadow: none; }
body.surface-daylight #auth-submit { height: 42px; padding: 0; border-radius: 10px; font-size: 14px; }
body.surface-daylight :is(#auth-error, #auth-info, #share-error, #share-warn) {
  font-size: 13px; line-height: 1.55; border-radius: 12px; padding: 11px 13px;
}
body.surface-daylight :is(#auth-error, #share-error) {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 26%, transparent);
}
body.surface-daylight #auth-info {
  color: var(--text-normal);
  background: var(--dl-select);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
body.surface-daylight #share-warn {
  color: var(--text-normal);
  background: var(--highlight-bg);
  border: 1px solid color-mix(in srgb, var(--text-heading) 10%, transparent);
}
body.surface-daylight #auth-toggle { font-size: 13px; color: var(--text-muted); }
body.surface-daylight #auth-toggle button { color: var(--accent); font-weight: 500; }

body.surface-daylight .web-gate { background: var(--app-bg); }
body.surface-daylight .web-gate-card h1 { font-size: 22px; font-weight: 600; color: var(--text-heading); }
body.surface-daylight .web-gate-card p { font-size: 14.5px; color: var(--text-muted); }
body.surface-daylight .web-gate-btn { height: 40px; padding: 0 20px; border-radius: 10px; font-weight: 500; }
body.surface-daylight .web-gate-alt { font-size: 13px; color: var(--text-muted); }

body.surface-daylight #share-box { border-radius: 20px; padding: 28px 26px 24px; }
body.surface-daylight #share-title { font-size: 21px; font-weight: 600; }
body.surface-daylight #share-sub { font-size: 13.5px; color: var(--text-muted); }
body.surface-daylight #share-perm-row { font-size: 14px; color: var(--text-normal); }
body.surface-daylight #share-perm,
body.surface-daylight .share-link-style select,
body.surface-daylight .share-person select {
  font-size: 13.5px; padding: 8px 10px; border-radius: 10px;
  background: var(--card-bg); border: 1px solid var(--border); color: var(--text-normal);
}
body.surface-daylight #share-create { height: 42px; padding: 0; border-radius: 10px; }
body.surface-daylight .share-link {
  border: 0; border-radius: 14px; padding: 14px;
  background: var(--bg-secondary);
}
body.surface-daylight .share-link-url input {
  font-family: var(--font-ui); font-size: 13px; padding: 9px 11px;
  border-radius: 10px; background: var(--card-bg); border: 1px solid var(--border);
}
body.surface-daylight .share-link-meta { font-size: 12.5px; color: var(--text-muted); }

body.surface-daylight #import-box { border-radius: 20px; padding: 24px; }
body.surface-daylight .import-options { gap: 10px; margin-top: 10px; }
body.surface-daylight .import-option {
  padding: 14px 16px; gap: 14px;
  border: 0; border-radius: 14px;
  background: var(--bg-secondary);
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: 14px; color: var(--text-heading);
}
body.surface-daylight .import-option:hover {
  transform: none; box-shadow: inset 0 0 0 1.5px var(--accent);
}
body.surface-daylight #import-status { font-size: 13px; color: var(--text-muted); }

/* ================================================================
   Notifications panel, and the modals that borrow a dialog's shell.
   ================================================================ */

body.surface-daylight > .sidebar-pane[id^="rpane-"].active {
  background: var(--card-bg);
  border: 0; border-radius: 20px;
  box-shadow: var(--dl-shadow-float);
}
body.surface-daylight #rpane-notifs .rpanel-head { padding: 14px 12px 6px 18px; }
body.surface-daylight #rpane-notifs .rpanel-head .vault-name {
  font-size: 16px; font-weight: 600; color: var(--text-heading);
}
body.surface-daylight .nb-body { padding: 4px 10px 12px; }
body.surface-daylight .nb-group {
  font-size: 12px; font-weight: 500; color: var(--text-muted); margin: 12px 8px 4px;
}
body.surface-daylight .nb-row { padding: 9px 10px; border-radius: 10px; }
body.surface-daylight .nb-row:hover { background: var(--dl-hover); }
body.surface-daylight .nb-row-text { font-size: 14px; line-height: 1.4; color: var(--text-normal); }
body.surface-daylight .nb-row-where { font-size: 12.5px; color: var(--text-muted); }
body.surface-daylight .nb-row-when { font-size: 12.5px; color: var(--text-muted); }
body.surface-daylight .nb-row.late .nb-row-when { color: var(--danger); font-weight: 500; }
body.surface-daylight .nb-empty-title { font-size: 15px; font-weight: 600; }
body.surface-daylight .nb-empty-body { font-size: 13px; color: var(--text-muted); }
body.surface-daylight .nb-foot { border-top-color: var(--border); padding: 12px 16px; }
body.surface-daylight #nb-all { font-size: 13px; font-weight: 500; color: var(--accent); }
body.surface-daylight #nb-note { font-size: 12px; color: var(--text-muted); }

body.surface-daylight :is(#deck-modal-box, #stats-modal-box, #improve-modal .improve-card) {
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--dl-shadow-float);
}
body.surface-daylight :is(#deck-modal-title, #stats-modal-title, #improve-modal .improve-head) {
  font-size: 21px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-heading);
}
body.surface-daylight .st-card {
  border: 0; border-radius: 14px; background: var(--bg-secondary); padding: 14px 16px;
}
body.surface-daylight .st-card .st-l { font-size: 12.5px; font-weight: 500; color: var(--text-muted); }
body.surface-daylight .st-card .st-n { font-size: 24px; font-weight: 700; }
body.surface-daylight :is(#improve-modal .improve-cancel, #improve-modal .improve-apply,
  #improve-modal .improve-title-pick) { border-radius: 10px; }
body.surface-daylight #improve-modal .improve-pane-label {
  font-size: 12.5px; font-weight: 500; color: var(--text-muted);
}

/* ================================================================
   Toasts and the recording pill — quiet things at the edge.
   ================================================================ */

body.surface-daylight :is(.update-toast, .capture-toast) {
  background: var(--card-bg);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--dl-shadow-float);
  color: var(--text-normal);
}
body.surface-daylight .update-toast:hover { border-color: var(--accent); }
body.surface-daylight #meeting-toast:hover { border-color: var(--border); }
body.surface-daylight .update-toast-icon {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--bg-secondary); color: var(--accent);
}
body.surface-daylight .update-toast-text strong { font-size: 14.5px; font-weight: 600; color: var(--text-heading); }
body.surface-daylight .update-toast-text small { font-size: 12.5px; color: var(--text-muted); }
body.surface-daylight .capture-toast { border-radius: 14px; font-size: 13px; }
body.surface-daylight .capture-toast b { font-size: 12px; font-weight: 500; color: var(--accent); }

body.surface-daylight #record-pill {
  padding: 9px 10px 9px 15px;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--dl-shadow-float);
}
body.surface-daylight #record-pill .rp-dot { background: var(--danger); }
body.surface-daylight #record-pill .rp-clock { font-size: 14px; font-weight: 600; color: var(--text-heading); }
body.surface-daylight #record-pill :is(.rp-sys, .rp-ear) { font-size: 12px; color: var(--text-muted); }
body.surface-daylight #record-pill .rp-stop {
  height: 30px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  background: var(--danger); border-color: var(--danger); color: #FFFFFF;
}
body.surface-daylight:not(.theme-light) #record-pill .rp-stop { color: #161514; }
body.surface-daylight #record-pill .rp-pause {
  height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500;
  border-color: var(--border); color: var(--text-muted);
}
body.surface-daylight #record-pill .rp-cancel { font-size: 13px; color: var(--text-muted); }
body.surface-daylight #record-pill.rp-degraded { border-color: var(--danger); }
body.surface-daylight #record-pill.rp-degraded .rp-clock { color: var(--danger); }

/* The post-paste offer and the delete-choice sheet round out the family. */
body.surface-daylight .paste-offer {
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--dl-shadow-float);
  font-size: 13px; color: var(--text-muted);
}
