/* ═══════════════════════ RESET & BASE ═══════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg-app);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Applied only during theme toggle to avoid slowing down normal UI interactions */
body.theme-transition,
body.theme-transition * ,
body.theme-transition *::before,
body.theme-transition *::after {
  transition:
    background-color .4s ease,
    color .4s ease,
    border-color .4s ease,
    box-shadow .4s ease,
    fill .4s ease,
    stroke .4s ease;
}

@media (prefers-reduced-motion: reduce) {
  body.theme-transition,
  body.theme-transition * ,
  body.theme-transition *::before,
  body.theme-transition *::after {
    transition: none !important;
  }
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

a { color: var(--dc-link); text-decoration: none; }
a:hover { text-decoration: underline; }

.edit-mode [contenteditable]:empty::before {
  content: attr(data-ph);
  color: var(--dc-muted);
  pointer-events: none;
  font-style: italic;
  opacity: .6;
}

.edit-mode [contenteditable] {
  outline: none;
  cursor: text;
  transition: background .1s, box-shadow .1s;
}
.edit-mode [contenteditable]:hover  { background: var(--bg-active) !important; }
.edit-mode [contenteditable]:focus  {
  background: var(--bg-active) !important;
  box-shadow: 0 0 0 1.5px var(--border-focus);
}

.cf::after { content: ''; display: table; clear: both; }
