:root[data-theme="light"] { color-scheme: light !important; }
:root[data-theme="dark"] { color-scheme: dark !important; }
:root::after {
  content:""; position:fixed; inset:0; z-index:999; pointer-events:none;
  background:rgba(0,0,0,var(--artifact-dim,0));
}
@media print { :root::after { display:none; } }

/* These two originals only defined a dark palette. Match their typography and accents. */
:root[data-artifact-page="01-every-frame"][data-theme="light"] {
  --ink:#faf7f0; --sheet:#fffdf8; --rule:#d8d3c8; --fg:#252c38;
  --dim:#606979; --amber:#ad4c16; --cyan:#176d95;
}
:root[data-artifact-page="01-every-frame"][data-theme="light"] .msg.err { color:#a83225; }
:root[data-artifact-page="02-pearl-river"][data-theme="light"] {
  --bg:#f8f6ef; --panel:#fffdf8; --ink:#243040; --muted:#606c79;
  --line:#d8d7cf; --gold:#95641b;
}
:root[data-artifact-page="02-pearl-river"][data-theme="light"] button { color:#fff; }

/* The gallery uses the same warm paper and restrained panels as the artifacts. */
:root[data-artifact-page="index"][data-theme="light"] body { background:#f7f5ef; color:#26313e; }
:root[data-artifact-page="index"][data-theme="light"] p { color:#626d79; }
:root[data-artifact-page="index"][data-theme="light"] .card { background:#fffdf8; border-color:#dbd8cf; }
:root[data-artifact-page="index"][data-theme="light"] .thumb { background:#eeeae1; }
:root[data-artifact-page="index"][data-theme="light"] .card span { color:#a14e2b; }
:root[data-artifact-page="index"][data-theme="light"] .card:hover { border-color:#b77856; }
