/* Tokens do design "documento de produção" (papel, tinta, Courier, um acento laranja).
   Compartilhado pelo site (site.css) e pelo editor (app/styles.css). */
@import url(/assets/fonts/fonts.css);

:root {
  --paper: #f3f0e8;
  --ink: #1c1b18;
  --surface: #fffdf8;
  --muted: #5c574c;
  --text2: #3a3731;
  --rule: #d8d2c4;
  --accent: #c2410c;
  --hover: #ebe6da;
  --faint: #8a8476;
  --s1: #e6e0d2;
  --s2: #efeadf;
  --s3: #7a7466;
  --band: #1c1b18;
  --band-fg: #f3f0e8;
  --on-accent: #fff;
  --danger: #b91c1c;
  --ok: #22c55e;
  --font-ui: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-doc: 'Courier Prime', 'Courier New', monospace;
  color-scheme: light;
}

:root[data-theme=dark] {
  --paper: #161513;
  --ink: #ece8df;
  --surface: #1e1c1a;
  --muted: #a39d90;
  --text2: #c9c3b6;
  --rule: #34312c;
  --accent: #ea580c;
  --hover: #24221f;
  --faint: #7d776b;
  --s1: #2a2825;
  --s2: #232120;
  --s3: #7d776b;
  --band: #0d0c0b;
  --band-fg: #ece8df;
  --danger: #f87171;
  color-scheme: dark;
}

/* A folha de decupagem continua clara no modo escuro (é um documento impresso). */
:root[data-theme=dark] [data-sheet],
:root[data-theme=dark] .scene,
:root[data-theme=dark] .storyboard-scene {
  --paper: #f3f0e8;
  --ink: #1c1b18;
  --surface: #fffdf8;
  --muted: #5c574c;
  --text2: #3a3731;
  --rule: #d8d2c4;
  --accent: #c2410c;
  --hover: #ebe6da;
  --faint: #8a8476;
  --s1: #e6e0d2;
  --s2: #efeadf;
  --s3: #7a7466;
  --danger: #b91c1c;
  color-scheme: light;
}

/* interruptor de tema (todas as telas): claro = bolinha à esquerda + sol; escuro = lua + bolinha à direita */
.theme-toggle {
  position: relative;
  flex: none;
  width: 46px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #e2ddd2;
  cursor: pointer;
  transition: background-color .2s ease;
}
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .tt-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  transition: transform .2s ease;
}
.theme-toggle svg { position: absolute; top: 6px; width: 12px; height: 12px; transition: opacity .2s ease; }
.theme-toggle .tt-sol { right: 6px; color: #8a8476; opacity: 1; }
.theme-toggle .tt-lua { left: 6px; color: #c7d2f0; opacity: 0; }
:root[data-theme=dark] .theme-toggle { background: #2b2926; }
:root[data-theme=dark] .theme-toggle .tt-knob { transform: translateX(22px); }
:root[data-theme=dark] .theme-toggle .tt-sol { opacity: 0; }
:root[data-theme=dark] .theme-toggle .tt-lua { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle, .theme-toggle .tt-knob, .theme-toggle svg { transition: none; }
}

/* logo: claquete (arquivos do usuario), versao clara/escura acompanha o tema do site */
.logo-mark { width: 54px; height: 48px; display: block; flex: none; background: url(/assets/logo-light-sm.png) center / contain no-repeat; }
:root[data-theme=dark] .logo-mark { background-image: url(/assets/logo-dark-sm.png); }
.brand .logo-mark { margin: -6px 0; }   /* o logo já traz o nome: não repete o texto ao lado */
