/* Excalidraw-стиль для редактора VideoScribe Clone.
   Локальные ресурсы:
     - Caveat[wght].ttf — variable handwritten font (400–700)
     - rough.min.js     — sketchy SVG (UMD, window.rough)
     - perfect-freehand.mjs — pencil smoothing (ESM, импортируется отдельно)
*/

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("caveat.ttf") format("truetype-variations");
}

/* Шрифт текстовых сцен в редакторе (preview) и тематические токены
   excalidraw. Скоупится только под body[data-view="editor"] чтобы не
   ломать другие view'ы. */
body[data-view="editor"] {
  --excali-stroke: #1e1e1e;
  --excali-fill:   transparent;
  --excali-fg:     #1e1e1e;
  --excali-bg:     #fdfdfb;
  --excali-accent: #e03131;
  --excali-font:   "Caveat", "Excalifont", "Virgil", "Cascadia Code",
                   "Comic Sans MS", cursive;
}

/* Текстовые сцены отрисовываются в шрифте Caveat. */
body[data-view="editor"] .editor-text-scene,
body[data-view="editor"] .editor-text-scene * {
  font-family: var(--excali-font);
  font-weight: 500;
  letter-spacing: 0;
}

/* Камера-сцена/рамка выглядит «карандашно» когда мы заменяем border'ы на
   roughjs-сгенерированные SVG paths (см. editor.js → renderCameraFrame). */
body[data-view="editor"] .editor-camera-frame.excali-rough,
body[data-view="editor"] .editor-camera-scene.excali-rough {
  border: 0 !important;
  background: transparent !important;
}
body[data-view="editor"] .excali-rough-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
