:root {
  --bg:#101927; --panel:#192635; --pane:#263549; --line:#3b4c60;
  --ice-ink:#f1fbff; --ice-soft:#d3e4ef; --ice-accent:#8ee5d4;
  --ice-surface:#152737;
  --shell:#a9e2edaa;
}
:root[data-theme="day"] {
  color-scheme:light; --bg:#e8f1f4; --panel:#f7fbfc; --pane:#e3eff3; --line:#afc6d1;
  --text:#142e40; --soft:#385264; --orchid:#21587b; --mint:#17685e;
  --ice-ink:#102d40; --ice-soft:#203f54; --ice-accent:#14587a;
  --ice-surface:#f3f9fc;
  --shell:#9bc8d7;
}
header{background:#0e1928e8}
.theme-toggle{
  margin-left:auto;display:grid;place-items:center;flex:0 0 44px;padding:0;width:44px;height:44px;
  border-radius:50%;color:#ffdf94;background:#203043;border:1px solid #536577;
}
.theme-toggle .moon,[data-theme="day"] .theme-toggle .sun{display:none}
[data-theme="day"] .theme-toggle .moon{display:block}
[data-theme="day"] .theme-toggle{color:#27597a;background:#e8f4f9;border-color:#a9c4d0}
[data-theme="day"] header{background:#f5fafbe8}
[data-theme="day"] nav a:is([aria-current],:hover){color:var(--text)}
[data-theme="day"] button[aria-pressed="true"]:not(.tabs button){color:#fff}
[data-theme="day"] :focus-visible{outline-color:#156492}
[data-theme="day"] :is(th,td,input,button){border-color:var(--line)}
[data-theme="day"] #feedback{color:#942943}
[data-theme="day"] .blockfield text{fill:#20364b}
.board{border-color:var(--shell);background:#1a2c3c}
.draw-core {
  position:relative;isolation:isolate;overflow:hidden;border-radius:12px;
  color:var(--ice-ink);background:var(--ice-surface);
  box-shadow:inset 0 0 0 1px #ecffffad,inset 2px 3px 2px #e2ffff48,inset 0 -5px 12px #72c8e756;
}
.draw-core::before,.draw-core::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:inherit}
.draw-core::before{
  background:conic-gradient(from 155deg at 97% 6%,#f6ffff8f 0 12deg,#75d8f85c 12deg 31deg,transparent 31deg 360deg),
    conic-gradient(from 226deg at 98% 86%,#cbf5ff6b 0 20deg,#f8ffff92 20deg 29deg,transparent 29deg 360deg),
    linear-gradient(115deg,#ecfcffab,#96e7ff38 16%,transparent 31%,#cef5ff7a 87%,#efffff);
  clip-path:polygon(0 0,100% 0,100% 100%,0 100%,0 0,1% 3.4%,.65% 37%,1.2% 86%,2.2% 97%,36% 98.8%,77% 98.5%,94% 95.5%,98% 87%,98.8% 53%,97.5% 12%,94% 2.7%,57% 1%,16% 1.5%,1% 3.4%);
}
.draw-core::after{inset:5px;border:1px solid #c8f7ff45;border-radius:8px;box-shadow:inset 0 0 8px #a4e7ff2b}
.draw-core :is(#opened,#live-state,.next-clock,.next-clock output,#numbers small){color:var(--ice-soft)}
.draw-core #issue,.draw-core #combo{color:var(--ice-accent)}
[data-theme="day"] .flip-separator{color:#374d60}
[data-theme="day"] .board{background:#dbe9ef}
[data-theme="day"] .forecast{background:#e6f1f5;border-color:#b4cbd5}
[data-theme="day"] .forecast .ticket{background:#f9fcfd;border-color:#a6beca}
[data-theme="day"] .ticket-result,[data-theme="day"] .ticket-actions :is(#pred-issue,.reveal-ticket){color:#354f61}
[data-theme="day"] .ticket-result strong{color:#194d64}

/* A single lens over the lookup tools; the other cases keep their own surfaces. */
.case-draw{
  position:relative;isolation:isolate;border-radius:17px;
  --case-edge:#a9edeb80; --case-ink:#d3fff5;
  background:linear-gradient(108deg,#0d3041 12%,#174458 54%,#235963);
  box-shadow:inset 0 2px 1px #e5ffffa6,inset 0 -2px 2px #adf3f578,inset 4px 0 9px #adffff20,0 4px 12px #0a1b272e;
}
.case-draw::before{
  content:"";position:absolute;pointer-events:none;z-index:-1;
  width:72%;height:155%;right:-21%;top:-79%;border-radius:50%;transform:rotate(-17deg);
  border-bottom:2px solid #c8fff387;box-shadow:0 4px 12px #aeffe847,inset 0 -8px 14px #d6fff342;
}
.lookup-art{filter:drop-shadow(0 3px 3px #0d202652)}
[data-theme="day"] .case-draw{
  --case-edge:#548a9b99;--case-ink:#215569;
  background:linear-gradient(108deg,#effbfc 12%,#d6edf2 54%,#bbdfe4);
}
[data-theme="day"] .case-draw :is(h3,a){color:#13394a}
@media(max-width:760px){.theme-toggle{order:1}}
[data-theme="day"] .case-calendar{--case-body:#f0ebe4;--case-edge:#c6b7a5;--case-ink:#765b3c}
[data-theme="day"] .case-share{--case-body:#dfebf3;--case-edge:#a7bfcd;--case-ink:#3c6075}
[data-theme="day"] .case-scan{--case-body:#eae7f0;--case-edge:#c0b8cd;--case-ink:#635973}
[data-theme="day"] .tool-case :is(h3,a){color:#203749}
[data-theme="night"] .draw-core #combo{text-shadow:0 1px 3px #071726,0 0 5px #071726}
