html.light { color-scheme: light; --page-bg:#f6f7fb; --surface:#fff; --ink:#172238; --muted:#526078; --line:#dce3ed; --accent:#b71943; }
html.dark { color-scheme: dark; }
html.light body { background:var(--page-bg) !important; color:var(--ink) !important; }
html.light [class*="bg-slate-9"], html.light [class*="bg-slate-8"] { background-color:var(--surface) !important; }
html.light [class*="bg-slate-7"] { background-color:#edf1f7 !important; }
html.light [class*="border-slate-"], html.light [class*="divide-slate-"] { border-color:var(--line) !important; }
html.light [class~="text-white"], html.light [class*="text-slate-1"], html.light [class*="text-slate-2"], html.light [class*="text-slate-3"] { color:var(--ink) !important; }
html.light [class*="text-slate-4"], html.light [class*="text-slate-5"], html.light [class*="text-slate-6"] { color:var(--muted) !important; }
html.light [class*="text-rose-"], html.light [class*="text-crimson-"] { color:#b71943 !important; }
html.light [class*="text-amber-"], html.light [class*="text-yellow-"] { color:#89520a !important; }
html.light [class*="text-sky-"], html.light [class*="text-blue-"] { color:#075e9c !important; }
html.light [class*="text-emerald-"], html.light [class*="text-green-"] { color:#116747 !important; }
html.light [class*="bg-rose-95"], html.light [class*="bg-rose-9"], html.light [class*="bg-rose-5/"], html.light [class*="bg-rose-6/"] { background-color:#fff0f3 !important; }
html.light [class*="bg-amber-9"], html.light [class*="bg-amber-5/"] { background-color:#fff6e4 !important; }
html.light [class*="bg-emerald-9"], html.light [class*="bg-emerald-5/"] { background-color:#e9f7ef !important; }
html.light .glass-card, html.light .glass, html.light .panel-card, html.light .analytics-card { background:var(--surface) !important; border-color:var(--line) !important; box-shadow:0 6px 24px rgba(31,51,83,.045); }
html.light .archive-navigation { background:rgba(255,255,255,.96) !important; border-color:var(--line) !important; box-shadow:0 4px 20px rgba(31,51,83,.06); }
html.light .archive-navigation nav a, html.light .archive-navigation #mobile-menu a { color:#334155 !important; }
html.light .archive-navigation nav a:hover, html.light .archive-navigation #mobile-menu a:hover, html.light .archive-navigation a.is-active { color:#ad173d !important; background:#fff0f3 !important; border-color:#f4c7d2 !important; }
html.light footer { background:#eef2f7 !important; border-color:var(--line) !important; }
html.light input:not([type="checkbox"]):not([type="radio"]), html.light textarea, html.light select { background:#fff !important; color:var(--ink) !important; border:1px solid #cbd5e1 !important; box-shadow:0 1px 2px rgba(15,23,42,.03); }
html.light input::placeholder, html.light textarea::placeholder { color:#6b778d !important; opacity:1; }
html.light :is(input,textarea,select):focus { outline:2px solid #be3456; outline-offset:2px; }
html.light .modal-backdrop { background:rgba(23,34,56,.5) !important; }
html.light #firebase-login { background:rgba(238,242,247,.97) !important; }
html.light [class*="from-rose-950"], html.light [class*="from-slate-9"] { background-image:linear-gradient(135deg,#fff0f3,#f1f5fc) !important; }
/* Filled actions retain their white labels in both themes. */
html.light :is(button,a,[role="status"])[class~="bg-rose-600"], html.light :is(button,a,[role="status"])[class~="bg-red-600"], html.light :is(button,a,[role="status"])[class~="bg-emerald-600"], html.light .crimson-gradient-bg, html.light .toast { color:#fff !important; }
html.light .crimson-gradient-bg *, html.light .toast * { color:inherit !important; }
html.light .gold-gradient-text { background:linear-gradient(135deg,#8a5311,#a9660c); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
html.light .archive-preview-card { box-shadow:0 5px 20px rgba(31,51,83,.045); }
html.light .archive-preview-card:hover { border-color:#d697a8; box-shadow:0 10px 26px rgba(31,51,83,.09); }
html.light .archive-preview-all { background:#fff; border-color:#e5bec8; }
html.light .archive-preview-all:hover { background:#fff0f3; }
.daily-fact-card { padding:clamp(18px,2.6vw,26px); border:1px solid #713247; border-radius:18px; background:radial-gradient(ellipse at top right,rgba(190,18,60,.13),transparent 65%),#111b2e; color:#e2e8f0; box-shadow:0 10px 26px rgba(0,0,0,.08); }
.daily-fact-top, .daily-fact-bottom { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; }
.daily-fact-label { display:inline-block; font-size:11px; font-weight:750; letter-spacing:.14em; color:#fda4af; }
.daily-fact-top time { color:#94a3b8; font-size:13px; }
.daily-fact-card h3 { font-family:Cinzel,Georgia,serif; font-size:clamp(18px,2.4vw,22px); font-weight:700; margin:12px 0 6px; line-height:1.35; color:#f8fafc; }
.daily-fact-card > p { max-width:75ch; font-size:15px; line-height:1.65; color:#cbd5e1; }
.daily-fact-bottom { border-top:1px solid #344054; padding-top:22px; margin-top:28px; font-size:12px; color:#94a3b8; }
.daily-history-divider { height:1px; background:linear-gradient(90deg,transparent,#475569,transparent); margin:40px 0 !important; }
html.light #tarihte-bugun { background:#edf1f7 !important; }
html.light .daily-fact-card { background:linear-gradient(120deg,#fff,#fff5f7); color:var(--ink); border-color:#edd3dc; box-shadow:0 8px 30px rgba(90,40,65,.05); }
html.light .daily-fact-card h3 { color:var(--ink); }
html.light .daily-fact-card > p, html.light .daily-fact-bottom, html.light .daily-fact-top time { color:var(--muted); }
html.light .daily-fact-label { color:#a51b40; }
html.light .daily-fact-bottom { border-color:#eadde2; }
html.light .daily-history-divider { background:linear-gradient(90deg,transparent,#cbd5e1,transparent); }
@media(max-width:639px) {
  #tarihte-bugun { padding-top:2.5rem !important; padding-bottom:2.5rem !important; }
  .daily-fact-card { padding:16px; border-radius:16px; }
  .daily-fact-top { align-items:baseline; gap:8px; }
  .daily-fact-label { font-size:10px; letter-spacing:.1em; }
  .daily-fact-top time { font-size:11px; }
  .daily-fact-card h3 { font-size:18px; margin:10px 0 4px; }
  .daily-fact-card > p { font-size:14px; line-height:1.55; }
  .daily-history-divider { margin:28px 0 !important; }
}
.daily-admin-heading, .daily-admin-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.daily-admin-actions { justify-content:flex-end; margin-top:20px; }
.daily-admin-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:20px; }
.daily-admin-card, .daily-editor { padding:24px; border-radius:18px; }
.daily-admin-card p { line-height:1.75; white-space:pre-wrap; overflow-wrap:anywhere; }
.daily-primary, .daily-secondary, .daily-danger { padding:11px 18px; border-radius:10px; font-weight:600; font-size:14px; cursor:pointer; }
.daily-primary { background:#be123c; color:#fff; }
.daily-primary:hover { background:#9f1239; }
.daily-secondary { background:#273449; color:#e2e8f0; border:1px solid #475569; }
.daily-danger { background:transparent; color:#fda4af; border:1px solid #713247; }
.daily-editor label { display:block; font-size:14px; font-weight:600; margin-top:20px; }
.daily-editor :is(input,textarea,select) { display:block; width:100%; padding:12px; margin-top:8px; border-radius:10px; border:1px solid #475569; background:#0f172a; color:#f8fafc; font:inherit; }
.daily-editor textarea { resize:vertical; }
.daily-editor.hidden { display:none; }
.daily-admin-heading button { flex-shrink:0; }
.daily-admin-card button:disabled, .daily-editor button:disabled, #daily-new:disabled { opacity:.55; cursor:wait; }
html.light .daily-secondary { background:#fff; color:#334155; border-color:#cbd5e1; }
html.light .daily-danger { background:#fff1f2; color:#b71943; border-color:#fecdd3; }
html.light body[class] { background:#f6f7fb !important; color:#172238 !important; }
html.light footer[class] { background:#eef2f7 !important; }
html.light button[class*="bg-slate-8"], html.light button[class*="bg-slate-9"] { background:#edf1f7 !important; color:#334155 !important; border:1px solid #dce3ed; }
html.light button[class*="bg-slate-8"]:hover, html.light button[class*="bg-slate-9"]:hover { background:#e3e9f2 !important; border-color:#bbc8d9; }
