/* ============================================================
   Ospaces — media block styles (image / file / bookmark / math)
   Loaded after css/style.css; reuses its custom properties so
   both light and dark themes work automatically.
   ============================================================ */

/* shared wrapper: media blocks are flex children of .block, like .toc-wrap */
.media-wrap { flex: 1; min-width: 0; padding: 2px 0; }
.b-image, .b-file, .b-bookmark, .b-math { margin: 4px 0; }

/* ---- upload placeholder (image / file empty state) ---- */
.up-holder { width: 100%; }
.up-zone {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; text-align: left;
  background: var(--bg-code); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-light); font-size: 14px;
  transition: background 0.12s, border-color 0.12s;
}
.up-zone:hover { background: var(--bg-hover); color: var(--text); }
.up-zone.drag-over { border-color: var(--accent); background: var(--bg-hover); box-shadow: 0 0 0 2px rgba(91, 91, 214, 0.25); }
.up-icon { font-size: 20px; line-height: 1; flex-shrink: 0; }
.up-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.up-label { font-weight: 500; color: var(--text); }
.up-hint { font-size: 12px; color: var(--text-faint); }

/* uploading progress */
.up-uploading { padding: 14px 16px; background: var(--bg-code); border: 1px solid var(--border); border-radius: 6px; }
.up-uploading .up-label { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.up-bar { height: 6px; border-radius: 3px; background: var(--bg-active); overflow: hidden; }
.up-bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width 0.15s ease; }

/* inline error under a media block */
.media-error {
  margin-top: 8px; padding: 8px 12px; border-radius: 6px; font-size: 13px;
  background: rgba(235, 87, 87, 0.1); color: var(--danger);
}

/* small action button used across media blocks */
.media-btn {
  font-size: 12px; color: var(--text-light); padding: 3px 9px; border-radius: 4px;
  background: var(--bg); border: 1px solid var(--border-strong);
}
.media-btn:hover { background: var(--bg-hover); color: var(--text); }

/* ---- image ---- */
.img-figure { position: relative; max-width: 100%; margin: 0; border-radius: 6px; }
.img-figure img {
  display: block; max-width: 100%; height: auto; border-radius: 6px;
  background: var(--bg-code);
}
.img-toolbar {
  position: absolute; top: 8px; right: 8px; display: none; gap: 4px;
  background: var(--bg); padding: 4px; border-radius: 6px; box-shadow: var(--shadow-card);
}
.img-figure:hover .img-toolbar { display: flex; }
.img-caption {
  outline: none; margin-top: 6px; font-size: 13px; line-height: 1.5;
  color: var(--text-light); word-break: break-word; white-space: pre-wrap;
  caret-color: var(--text); min-height: 1.4em; border-radius: 3px;
}
.img-caption:empty::before { content: attr(data-placeholder); color: var(--text-placeholder); pointer-events: none; }
/* positioned box holding the image + toolbar + resize handles (caption sits below) */
.img-hold { position: relative; display: block; line-height: 0; border-radius: 6px; }

/* ---- drag-to-resize handles (image width, embed width/height) ---- */
.media-rz {
  position: absolute; z-index: 6; opacity: 0; transition: opacity 0.12s;
  display: flex; align-items: center; justify-content: center; touch-action: none;
}
.img-figure:hover .media-rz,
.embed-frame:hover .media-rz,
.media-rz.dragging { opacity: 1; }
.media-rz-e, .media-rz-w { top: 0; bottom: 0; width: 16px; cursor: ew-resize; }
.media-rz-e { right: 0; } .media-rz-w { left: 0; }
.media-rz-e::before, .media-rz-w::before {
  content: ""; width: 6px; height: 46px; max-height: 56%; border-radius: 5px;
  background: rgba(15, 15, 15, 0.55); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85);
}
.media-rz-e.dragging::before, .media-rz-w.dragging::before { background: var(--accent); }
.media-rz-se {
  right: 0; bottom: 0; width: 20px; height: 20px; cursor: nwse-resize;
}
.media-rz-se::before {
  content: ""; position: absolute; right: 4px; bottom: 4px; width: 11px; height: 11px;
  border-right: 3px solid rgba(255, 255, 255, 0.9); border-bottom: 3px solid rgba(255, 255, 255, 0.9);
  border-bottom-right-radius: 3px; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5));
}
.media-rz-se.dragging::before { border-color: var(--accent); }
.media-rz-badge {
  position: absolute; top: 8px; left: 8px; z-index: 7; pointer-events: none;
  font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: 0.2px;
  color: #fff; background: rgba(15, 15, 15, 0.78); padding: 2px 7px; border-radius: 5px;
}
/* while dragging: lock the cursor, stop text selection and stop iframes eating the drag */
body.media-resizing { cursor: nwse-resize !important; user-select: none; }
body.media-resizing iframe { pointer-events: none !important; }

/* ---- file chip ---- */
.file-row { display: flex; align-items: center; gap: 8px; }
.file-chip {
  display: inline-flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-code); text-decoration: none; color: var(--text);
  transition: background 0.12s, border-color 0.12s;
}
.file-chip:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.file-ic { font-size: 18px; line-height: 1; flex-shrink: 0; }
.file-meta { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.file-name { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 12px; color: var(--text-faint); }
/* "Upload a file" sits before the paste-a-link field, and only appears when
   object storage (R2 behind the Worker) is actually available. */
.file-upload-btn { background: var(--bg-hover); color: var(--text); border: 1px solid var(--border-strong); }
.file-upload-btn:hover { background: var(--bg-active, var(--bg-hover)); border-color: var(--accent); }
.file-or { font-size: 12.5px; color: var(--text-faint); flex-shrink: 0; }

/* ---- bookmark ---- */
.bm-empty { display: flex; align-items: center; gap: 8px; }
.bm-input {
  flex: 1; min-width: 0; padding: 9px 12px; font-size: 14px; font-family: var(--font);
  border: 1px solid var(--border-strong); border-radius: 6px;
  background: var(--bg-input); color: var(--text); outline: none;
}
.bm-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91, 91, 214, 0.2); }
.bm-add {
  padding: 9px 14px; font-size: 13.5px; font-weight: 500; white-space: nowrap;
  color: #fff; background: var(--accent); border-radius: 6px;
}
.bm-add:hover { background: var(--accent-hover); }

.bookmark-card {
  display: flex; align-items: stretch; text-decoration: none;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: var(--bg); transition: background 0.12s, border-color 0.12s;
}
.bookmark-card:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.bm-body { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; padding: 12px 14px; }
.bm-title {
  font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.bm-desc {
  font-size: 12.5px; color: var(--text-light); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.bm-url-line { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 2px; }
.bm-fav { width: 16px; height: 16px; flex-shrink: 0; border-radius: 3px; }
.bm-url { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- math (KaTeX) ---- */
.math-render {
  padding: 10px 8px; text-align: center; overflow-x: auto; overflow-y: hidden;
  border-radius: 6px; cursor: pointer; color: var(--text);
}
.math-render:hover { background: var(--bg-hover); }
.math-empty {
  padding: 12px 14px; border-radius: 6px; border: 1px dashed var(--border-strong);
  color: var(--text-faint); font-size: 14px; cursor: pointer; text-align: center;
}
.math-empty:hover { background: var(--bg-hover); color: var(--text-light); }
.math-edit {
  width: 100%; min-height: 44px; resize: vertical; padding: 10px 12px;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.5;
  border: 1px solid var(--border-strong); border-radius: 6px;
  background: var(--bg-code); color: var(--text); outline: none;
}
.math-edit:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91, 91, 214, 0.2); }

@media (max-width: 800px) {
  .bm-empty { flex-direction: column; align-items: stretch; }
}

/* ---- linked database (dbview) block ---- */
.b-dbview { margin: 6px 0; }
.dbview-wrap { flex: 1; min-width: 0; padding: 2px 0; }
.dbview-picker {
  display: flex; flex-direction: column; gap: 4px; width: 100%;
  padding: 12px 14px; background: var(--bg-code);
  border: 1px solid var(--border); border-radius: 6px;
}
.dbview-picker-label { font-size: 12px; font-weight: 600; color: var(--text-faint); margin-bottom: 2px; }
.dbview-pick {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 6px 8px; text-align: left; border-radius: 4px;
  font-size: 14px; color: var(--text);
  transition: background 0.12s;
}
.dbview-pick:hover { background: var(--bg-hover); }
.dbview-missing {
  padding: 12px 14px; font-size: 13px; color: var(--text-faint);
  background: var(--bg-code); border: 1px dashed var(--border); border-radius: 6px;
}
.block.b-dbview.sel-block .dbview-wrap { border-radius: 6px; box-shadow: 0 0 0 2px var(--accent); }

/* ============================================================
   Button block (runs actions on click) + its settings modal
   ============================================================ */
.button-wrap { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.pb-btn {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  padding: 7px 14px; font-size: 14px; font-weight: 500; font-family: var(--font);
  color: #fff; background: var(--accent); border: 0; border-radius: 7px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12); transition: background .12s, transform .06s, box-shadow .12s;
}
.pb-btn:hover { background: var(--accent-hover); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.pb-btn:active { transform: translateY(1px); }
.pb-btn-ic { font-size: 13px; line-height: 1; }
.pb-btn-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-gear {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 6px; font-size: 14px; line-height: 1;
  color: var(--text-light); background: transparent; border: 1px solid transparent; cursor: pointer;
  opacity: 0; transition: opacity .12s, background .12s;
}
.b-button:hover .pb-gear, .pb-gear:focus-visible { opacity: 1; }
.pb-gear:hover { background: var(--bg-hover); border-color: var(--border); color: var(--text); }
.block.b-button.sel-block .button-wrap { border-radius: 8px; box-shadow: 0 0 0 2px var(--accent); }

/* ---------- whiteboard / canvas block ---------- */
.canvas-wrap { flex: 1; min-width: 0; padding: 2px 0; }
.cv-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cv-add {
  font-size: 12.5px; font-weight: 500; color: var(--text); background: var(--bg-hover);
  border: 1px solid var(--border); border-radius: 7px; padding: 3px 10px; cursor: pointer;
}
.cv-add:hover { border-color: var(--border-strong); background: var(--bg-active, var(--bg-hover)); }
.cv-hint { font-size: 12px; color: var(--text-faint); }
.cv-board {
  position: relative; width: 100%; overflow: hidden; border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-subtle, var(--bg-hover));
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 22px 22px;
}
.cv-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 13px; pointer-events: none;
}
.cv-card {
  position: absolute; min-height: 60px; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .06);
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .06);
}
.cv-card.cv-dragging { box-shadow: 0 6px 20px rgba(0, 0, 0, .28); z-index: 5; opacity: .96; }
.cv-card-head {
  display: flex; align-items: center; gap: 4px; height: 22px; padding: 0 4px;
  background: rgba(0, 0, 0, .05); user-select: none;
}
.cv-grip { cursor: grab; color: rgba(0, 0, 0, .4); font-size: 12px; line-height: 1; padding: 0 2px; }
.cv-card.cv-dragging .cv-grip { cursor: grabbing; }
.cv-color, .cv-del {
  margin-left: auto; width: 16px; height: 16px; border-radius: 4px; border: none; cursor: pointer;
  font-size: 13px; line-height: 1; color: rgba(0, 0, 0, .45); background: transparent; padding: 0;
}
.cv-del { margin-left: 0; }
.cv-color { margin-left: auto; background: rgba(0, 0, 0, .28); }
.cv-color:hover { transform: scale(1.15); }
.cv-del:hover { background: rgba(0, 0, 0, .12); color: rgba(0, 0, 0, .7); }
.cv-card-text {
  flex: 1; padding: 6px 8px; font-size: 13px; line-height: 1.4; color: #2a2a20;
  white-space: pre-wrap; word-break: break-word; outline: none; overflow: auto;
}
.cv-card-text:empty::before { content: attr(data-placeholder); color: rgba(0, 0, 0, .35); }
/* sticky palette (light, readable text on all) */
.cv-yellow { background: #fef3c7; }
.cv-blue   { background: #dbeafe; }
.cv-green  { background: #dcfce7; }
.cv-pink   { background: #fce7f3; }
.cv-purple { background: #ede9fe; }
.cv-gray   { background: #e9ecef; }
.block.b-canvas.sel-block .cv-board { box-shadow: 0 0 0 2px var(--accent); }
html[data-theme="dark"] .cv-card-text { color: #23241d; }
/* connect button + connector arrows */
.cv-link { margin-left: 0; width: 16px; height: 16px; border-radius: 4px; border: none; padding: 0;
  background: transparent; color: rgba(0, 0, 0, .45); font-size: 12px; line-height: 1; cursor: pointer; }
.cv-link:hover { background: rgba(0, 0, 0, .12); color: rgba(0, 0, 0, .75); }
.cv-card.cv-link-src { outline: 2px dashed var(--accent); outline-offset: 1px; }
.cv-board.cv-linking { cursor: crosshair; }
.cv-board.cv-linking .cv-card { cursor: crosshair; }
.cv-edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  pointer-events: none; color: var(--text-light); z-index: 0; }
.cv-edge { stroke: currentColor; stroke-width: 1.7; fill: none; pointer-events: stroke; cursor: pointer; opacity: .75; }
.cv-edge:hover { stroke: var(--accent); opacity: 1; stroke-width: 2.4; }
.cv-card { z-index: 1; }
.cv-resize { height: 12px; margin-top: 2px; cursor: ns-resize; border-radius: 0 0 8px 8px;
  background: linear-gradient(var(--bg-hover), transparent); position: relative; }
.cv-resize::after { content: ""; position: absolute; left: 50%; top: 4px; width: 26px; height: 3px;
  transform: translateX(-50%); border-radius: 2px; background: var(--border-strong); }
.cv-resize:hover::after { background: var(--accent); }

/* settings modal (mirrors .link-modal) */
.pb-modal-back {
  position: fixed; inset: 0; z-index: 250; pointer-events: auto;
  background: rgba(10, 11, 26, 0.55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh;
}
.pb-modal {
  background: var(--bg-modal); border-radius: 16px; box-shadow: var(--shadow-popover);
  width: 480px; max-width: calc(100vw - 40px); max-height: 76vh; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  animation: modal-in 0.16s cubic-bezier(0.2, 0.85, 0.3, 1);
}
.pb-modal-title { font-size: 15px; font-weight: 600; color: var(--text); }
.pb-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-light); }
.pb-label-input, .pb-action-type, .pb-action-md, .pb-action-text, .pb-action-due, .pb-action-page {
  font-family: var(--font); font-size: 14px; color: var(--text);
  background: var(--bg-input); border: 1px solid var(--border-strong); border-radius: 7px;
  padding: 8px 10px; outline: none; width: 100%;
}
.pb-label-input:focus, .pb-action-md:focus, .pb-action-text:focus, .pb-action-type:focus,
.pb-action-due:focus, .pb-action-page:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91, 91, 214, 0.2); }
.pb-actions-head { font-size: 12.5px; font-weight: 600; color: var(--text); margin-top: 2px; }
.pb-actions-hint { font-weight: 400; color: var(--text-faint); margin-left: 6px; }
.pb-actions-list { display: flex; flex-direction: column; gap: 10px; }
.pb-actions-empty { font-size: 13px; color: var(--text-faint); padding: 6px 0; }
.pb-action-row {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px; background: var(--bg-code);
  display: flex; flex-direction: column; gap: 8px;
}
.pb-action-head { display: flex; align-items: center; gap: 8px; }
.pb-action-type { flex: 1; }
.pb-action-del {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 6px; font-size: 16px; line-height: 1;
  color: var(--text-light); background: var(--bg); border: 1px solid var(--border); cursor: pointer;
}
.pb-action-del:hover { color: var(--danger); border-color: var(--danger); }
.pb-action-md { resize: vertical; min-height: 56px; line-height: 1.45; }
.pb-action-params { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-action-params .pb-action-text { flex: 1 1 60%; min-width: 140px; }
.pb-action-params .pb-action-due { flex: 0 0 auto; width: auto; }
.pb-add-action {
  align-self: flex-start; font-size: 13px; font-weight: 500; color: var(--accent);
  background: transparent; border: 1px dashed var(--border-strong); border-radius: 7px; padding: 7px 12px; cursor: pointer;
}
.pb-add-action:hover { background: var(--bg-hover); border-color: var(--accent); }
.pb-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.pb-cancel, .pb-save { font-size: 13.5px; font-weight: 500; padding: 8px 16px; border-radius: 7px; cursor: pointer; }
.pb-cancel { color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); }
.pb-cancel:hover { background: var(--bg-hover); }
.pb-save { color: #fff; background: var(--accent); border: 0; }
.pb-save:hover { background: var(--accent-hover); }

/* ============================================================
   Internal page-link hover preview card (onPeekPage)
   Positioned in viewport coords by editor.js; themed via tokens.
   ============================================================ */
.link-peek {
  position: fixed; z-index: 150; display: none;
  width: 280px; max-width: 90vw; padding: 10px 12px;
  background: var(--bg-modal); color: var(--text);
  border-radius: 10px; box-shadow: var(--shadow-popover);
  font-size: 13px; line-height: 1.4; cursor: default;
  animation: link-peek-in 0.12s ease;
}
@keyframes link-peek-in { from { opacity: 0; transform: translateY(-3px); } }
.link-peek-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 6px;
}
.link-peek-icon { flex: none; font-size: 15px; line-height: 1; }
.link-peek-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-peek-body { display: flex; flex-direction: column; gap: 2px; }
.link-peek-row {
  color: var(--text-light);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.link-peek-empty { color: var(--text-faint); font-style: italic; }

/* Transient highlight when jumping to a block via "Copy link to block". */
.block-flash { animation: block-flash-kf 1.2s ease; border-radius: 4px; }
@keyframes block-flash-kf {
  0%, 45% {
    background: rgba(91, 91, 214, 0.20);
    box-shadow: 0 0 0 3px rgba(91, 91, 214, 0.20);
  }
  100% { background: transparent; box-shadow: 0 0 0 3px transparent; }
}
html[data-theme="dark"] .block-flash { animation: block-flash-kf-dark 1.2s ease; }
@keyframes block-flash-kf-dark {
  0%, 45% {
    background: rgba(129, 140, 248, 0.26);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.26);
  }
  100% { background: transparent; box-shadow: 0 0 0 3px transparent; }
}

/* ---------- AI block (persistent, re-runnable prompt + answer) ---------- */
.aiblock-wrap {
  flex: 1; min-width: 0; margin: 2px 0;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-hover);
  padding: 12px 14px;
}
.block.b-aiblock.sel-block .aiblock-wrap { box-shadow: 0 0 0 2px var(--accent); }
.aiblock-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  color: var(--text-light); margin-bottom: 8px;
}
.aiblock-ic { color: var(--accent); font-size: 13px; line-height: 1; }
.aiblock-prompt {
  display: block; width: 100%; box-sizing: border-box; resize: vertical;
  min-height: 42px; padding: 8px 10px;
  font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 7px;
}
.aiblock-prompt:focus { outline: none; border-color: var(--accent); }
.aiblock-prompt:disabled { opacity: .7; cursor: default; }
.aiblock-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.aiblock-run {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; font-size: 13.5px; font-weight: 600; font-family: var(--font);
  color: #fff; background: var(--accent); border: 0; border-radius: 7px; cursor: pointer;
  transition: background .12s, transform .06s;
}
.aiblock-run:hover:not(:disabled) { background: var(--accent-hover); }
.aiblock-run:active:not(:disabled) { transform: translateY(1px); }
.aiblock-run:disabled { opacity: .55; cursor: default; }
.aiblock-insert {
  padding: 6px 12px; font-size: 13px; font-weight: 500; font-family: var(--font);
  color: var(--text-light); background: transparent; border: 1px solid var(--border);
  border-radius: 7px; cursor: pointer; transition: background .12s, color .12s;
}
.aiblock-insert:hover { background: var(--bg-active); color: var(--text); }
.aiblock-status { font-size: 12.5px; color: var(--text-light); }
.aiblock-result {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 14.5px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.aiblock-result.empty { color: var(--text-faint); font-style: italic; white-space: normal; }
