.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; justify-self: end; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 11px; border: 1px solid #b58a8e; color: #f5f0eb; background: transparent; border-radius: 8px; font: 16px var(--serif); white-space: nowrap; }
.theme-toggle:hover { background: #ffffff12; }
.admin-danger-zone { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 10px; }
html[data-theme='dark'] { color-scheme: dark; --paper: #211b1a; --surface: #2c2422; --ink: #f0e4d7; --muted: #c5b5a9; --line: #65534a; --accent: #e0a0a5; --warm: #352b25; --cool: #292c30; --error: #ffb2a7; }
html[data-theme='dark'] .home-page { --paper: #211b1a; --ink: #f0e4d7; --accent: #e0a0a5; --line: #65534a; }
html[data-theme='dark'] body { background-image: none; }
html[data-theme='dark'] .site-header { background: #32171e; }
html[data-theme='dark'] .quote,
html[data-theme='dark'] .sidebar-panel,
html[data-theme='dark'] .share-panel,
html[data-theme='dark'] .home-book-grid .book-card { background: #2c2422; }
html[data-theme='dark'] input,
html[data-theme='dark'] textarea { background: #211b1a; border-color: var(--line); color: var(--ink); }
html[data-theme='dark'] .featured-quote { background: #352b25; }
html[data-theme='dark'] .reading-landscape { opacity: .28; }
html[data-theme='dark'] .admin-notice { background: #243226; color: #c1dfbc; }
html[data-theme='dark'] .admin-error { background: #402623; color: var(--error); }
html[data-theme='dark'] .form-status[data-state='success'] { color: #c1dfbc; }
html[data-theme='dark'] .button,
html[data-theme='dark'] .dialog-confirm { border-color: #a9737a; }
html[data-theme='dark'] .button { color: #f5f0eb; }
html[data-theme='dark'] .button:hover,
html[data-theme='dark'] .dialog-confirm:hover { background: #6b303c; }
html[data-theme='dark'] .confirm-dialog::backdrop { background: #000b; }
html[data-theme='dark'] .brand-icon,
html[data-theme='dark'] .quote-avatar { border: 1px solid var(--line); }
@media (max-width: 1150px) { .header-actions { gap: 12px; } .header-actions .header-motto { max-width: 190px; } }
@media (max-width: 900px) { .site-header .header-inner { grid-template-columns: 1fr auto auto; } }
@media (max-width: 600px) {
  .site-header .header-inner { grid-template-columns: 1fr auto; gap: 10px 16px; }
  .site-header .brand { justify-self: start; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .theme-toggle { width: 44px; height: 44px; padding: 10px; }
  .theme-toggle span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
}
