html {
  font-size: calc(16px * var(--font-scale, 1));
}

.display-controls {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 60px rgba(30, 41, 59, 0.10);
  backdrop-filter: blur(12px);
}

.display-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.display-controls button:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.display-controls button:focus-visible {
  outline: 2px solid #5f8f77;
  outline-offset: 2px;
}

.display-controls button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.display-controls .display-controls-divider {
  width: 1px;
  height: 1.5rem;
  margin: 0 0.15rem;
  background: #e2e8f0;
}

.display-controls .icon-font-sm {
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

.display-controls .icon-font-lg {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] .display-controls {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .display-controls button {
  color: #cbd5e1;
}

html[data-theme="dark"] .display-controls button:hover {
  background: #334155;
  color: #f8fafc;
}

html[data-theme="dark"] .display-controls .display-controls-divider {
  background: #475569;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .bg-cream {
  background-color: #0f172a !important;
}

html[data-theme="dark"] .text-slate-900,
html[data-theme="dark"] .text-slate-950 {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .text-slate-600 {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .text-slate-500 {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .text-slate-700 {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .text-slate-400 {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .bg-white\/55,
html[data-theme="dark"] .bg-white\/70,
html[data-theme="dark"] .bg-white\/80,
html[data-theme="dark"] .bg-white\/85,
html[data-theme="dark"] .bg-white\/90,
html[data-theme="dark"] .bg-white {
  background-color: rgba(15, 23, 42, 0.88) !important;
}

html[data-theme="dark"] .border-white\/70,
html[data-theme="dark"] .border-white\/80 {
  border-color: rgba(51, 65, 85, 0.85) !important;
}

html[data-theme="dark"] .border-slate-100,
html[data-theme="dark"] .border-slate-200 {
  border-color: #334155 !important;
}

html[data-theme="dark"] .border-sage-200 {
  border-color: #365948 !important;
}

html[data-theme="dark"] .bg-slate-50,
html[data-theme="dark"] .bg-slate-50\/70,
html[data-theme="dark"] .bg-slate-50\/80 {
  background-color: rgba(30, 41, 59, 0.75) !important;
}

html[data-theme="dark"] .bg-slate-100 {
  background-color: #334155 !important;
}

html[data-theme="dark"] .bg-slate-950 {
  background-color: #020617 !important;
}

html[data-theme="dark"] .bg-sage-50,
html[data-theme="dark"] .bg-sage-50\/80 {
  background-color: rgba(54, 89, 72, 0.35) !important;
}

html[data-theme="dark"] .bg-sage-100 {
  background-color: rgba(54, 89, 72, 0.55) !important;
}

html[data-theme="dark"] .bg-sage-200 {
  background-color: rgba(71, 114, 93, 0.45) !important;
}

html[data-theme="dark"] .text-sage-700,
html[data-theme="dark"] .text-sage-600 {
  color: #c9dfcf !important;
}

html[data-theme="dark"] .bg-amber-50,
html[data-theme="dark"] .bg-amber-100 {
  background-color: rgba(120, 83, 9, 0.35) !important;
}

html[data-theme="dark"] .text-amber-700,
html[data-theme="dark"] .text-amber-900 {
  color: #fcd34d !important;
}

html[data-theme="dark"] .bg-rose-50,
html[data-theme="dark"] .bg-rose-100 {
  background-color: rgba(136, 19, 55, 0.35) !important;
}

html[data-theme="dark"] .text-rose-700,
html[data-theme="dark"] .text-rose-800 {
  color: #fda4af !important;
}

html[data-theme="dark"] .text-rose-950 {
  color: #ffe4e6 !important;
}

html[data-theme="dark"] .border-rose-200 {
  border-color: #9f1239 !important;
}

html[data-theme="dark"] select,
html[data-theme="dark"] input[type="search"] {
  background-color: #1e293b !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] select option {
  background-color: #1e293b;
  color: #f8fafc;
}

html[data-theme="dark"] input::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] .divide-slate-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: #334155 !important;
}

html[data-theme="dark"] .shadow-soft {
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .bg-sage-100\/70 {
  background-color: rgba(54, 89, 72, 0.45) !important;
}

html[data-theme="dark"] .ring-sage-300 {
  --tw-ring-color: #5f8f77 !important;
}

html[data-theme="dark"] .group\/src span[role="tooltip"] {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html[data-theme="dark"] .pointer-events-none.fixed.inset-0.-z-10 .bg-sage-200\/70 {
  background-color: rgba(54, 89, 72, 0.25) !important;
}

html[data-theme="dark"] .pointer-events-none.fixed.inset-0.-z-10 .bg-amber-100\/70 {
  background-color: rgba(120, 83, 9, 0.2) !important;
}

html[data-theme="dark"] .bg-sage-600 {
  background-color: #5f8f77 !important;
}

html[data-theme="dark"] .hover\:bg-sage-100:hover,
html[data-theme="dark"] .hover\:bg-sage-200:hover {
  background-color: rgba(71, 114, 93, 0.45) !important;
}

html[data-theme="dark"] .hover\:text-sage-600:hover {
  color: #c9dfcf !important;
}

html[data-theme="dark"] .prose-custom strong.text-slate-900,
html[data-theme="dark"] .prose-custom h3.text-slate-900 {
  color: #f8fafc !important;
}
