/* Theme Variables – Silvir Lite */
:root {
  color-scheme: dark;
  /* Dark theme (default) */
  --bg:        #0f0f0f;
  --surface:   #1a1a1a;
  --surface-2: #222222;
  --surface-3: #2a2a2a;
  --border-1:  #333333;
  --border-2:  #2a2a2a;
  --border-3:  #222222;
  --text:      #e2e2e2;
  --text-muted:#777777;
  --text-dim:  #999999;
  --rose:      #be123c;
  --rose-hover:#9f1239;
  --rose-text: #ffffff;
  --input-bg:  #1a1a1a;
  --input-text:#e2e2e2;
  --btn-bg:    #1a1a1a;
  --btn-text:  #e2e2e2;
  --btn-hover: #2a2a2a;
  --btn-active:#0f0f0f;
  --focus-ring:#be123c;
  --shadow:    rgba(0,0,0,0.4);
}

/* Light theme */
html[data-theme="light"] {
  color-scheme: light;
  --bg:        #fafafa;
  --surface:   #ffffff;
  --surface-2: #f5f5f5;
  --surface-3: #eeeeee;
  --border-1:  #cccccc;
  --border-2:  #e0e0e0;
  --border-3:  #f0f0f0;
  --text:      #1a1a1a;
  --text-muted:#666666;
  --text-dim:  #888888;
  --rose:      #be123c;
  --rose-hover:#9f1239;
  --rose-text: #ffffff;
  --input-bg:  #ffffff;
  --input-text:#1a1a1a;
  --btn-bg:    #ffffff;
  --btn-text:  #1a1a1a;
  --btn-hover: #f5f5f5;
  --btn-active:#e0e0e0;
  --focus-ring:#be123c;
  --shadow:    rgba(0,0,0,0.1);
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  font-family: Georgia, serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body {
  padding: 20px;
  box-sizing: border-box;
}

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-1); }

/* Theme toggle button */
.theme-toggle {
  font-family: Georgia, serif;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--border-1);
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.8em;
  border-radius: 3px;
  transition: background 0.15s, border-color 0.15s;
}
.theme-toggle:hover { background: var(--btn-hover); }
.theme-toggle:active { background: var(--btn-active); }
.theme-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Focus styles for contenteditable */
[contenteditable="true"]:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}
