/* Script Doctor — shared cursor + cinematic atmosphere overlay
   v2: default and hover cursors are now visually distinct (fixes the
   "cursor doesn't appear to change on links" issue — v1 used the same
   icon for both states, so the change fired but was invisible).
*/

/* ── Default cursor: pen at rest (gold nib, purple shaft) ── */
body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M6 26 L14 10 L18 14 Z' fill='%23daa520' stroke='%23daa520' stroke-width='1'/%3E%3Cpath d='M14 10 L22 4 L26 8 L18 14 Z' fill='%238a2dfb' stroke='%238a2dfb' stroke-width='1'/%3E%3C/svg%3E") 4 28, auto;
}

/* ── Hover cursor: pen tip "sparking" — small glow burst at the nib
   plus a couple of spark marks. Visually distinct silhouette so the
   state change reads clearly even at a glance. ── */
.cursor-pointer,
a,
button,
.new-script-btn,
.toggle-btn,
.run-btn,
tbody tr,
.sidebar-nav-item {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M6 26 L14 10 L18 14 Z' fill='%23daa520' stroke='%23daa520' stroke-width='1'/%3E%3Cpath d='M14 10 L22 4 L26 8 L18 14 Z' fill='%238a2dfb' stroke='%238a2dfb' stroke-width='1'/%3E%3Ccircle cx='6' cy='26' r='2.4' fill='%23daa520' opacity='0.9'/%3E%3Cpath d='M2 22 L4 24 M2 30 L4 28 M9 30 L8 27' stroke='%23daa520' stroke-width='1.2' stroke-linecap='round' opacity='0.85'/%3E%3C/svg%3E") 4 28, pointer;
}

/* ── Cinematic film grain + vignette overlay ──
   Sits above background, below content. Subtle, not distracting.
   Add <div class="grain-overlay"></div> as the first child inside
   <body>, right after the opening <body> tag, on every page. */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grain-overlay::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.35) 100%);
}
