/* The pixel skin: every part of the UI redrawn in pixels while <html> has data-skin="pixel" (skin.js decides: by default with a
   Pixel Theme, or on any Theme by the owner's choice in Settings). Hard edges, 2px and 4px steps, no blur, no round corner,
   pixel type, bevelled frames. Loaded after style.css. No colour literals here: colours are the Theme's tokens (themes.css),
   and the frame colours --px-* are mixed from them below unless the Theme tunes its own (the Pixel Themes do).

   Two weights of rule:
   - `:where(html[data-skin="pixel"]) button` weighs the same as style.css's own `button`, so a flat button (tab, star, icon)
     that says `border: 0` or `background: none` there still wins and stays flat.
   - `html[data-skin="pixel"] .name` is used where a part is named. */
@import url("https://fonts.googleapis.com/css2?family=Jersey+10&family=Pixelify+Sans:wght@400;600&display=swap");
/* Digits only (text= makes Google send just those glyphs, under unicode-range U+30-39): Pixelify Sans draws 5 like S, so in
   body text the ten digits come from Jersey 20, which also has true tabular figures. Letters stay Pixelify Sans. */
@import url("https://fonts.googleapis.com/css2?family=Jersey+20&text=0123456789&display=swap");
@import url("pixel-type.css"); /* the larger type: made from style.css by sync/scripts/pixel_type.mjs */

/* ---------- frame colours for any Theme, light or dark, from its own tokens. Weightless, so a Theme's own values win.
   Mixed again inside Zen, from the tokens Zen maps there (style.css `.zen`: light ink on dark glass, on every Theme): a
   variable's value is worked out where it is set, so the ones set on <html> would still carry the Theme's own colours
   (a cream button face under Zen's pale ink on a light Theme). ---------- */
:where(html[data-skin="pixel"]) .zen, :where(html[data-skin="pixel"]) {
  --px-line: light-dark(color-mix(in srgb, var(--ink) 42%, var(--solid)), color-mix(in srgb, var(--ink) 30%, var(--solid)));
  --px-deep: light-dark(color-mix(in srgb, var(--ink) 86%, var(--px-black)), color-mix(in srgb, var(--solid) 30%, var(--px-black)));
  --px-light: light-dark(color-mix(in srgb, var(--solid) 30%, var(--px-white)), color-mix(in srgb, var(--ink) 52%, var(--solid)));
  --px-shade: light-dark(color-mix(in srgb, var(--ink) 24%, var(--solid)), color-mix(in srgb, var(--solid) 55%, var(--px-black)));
  --px-lip: color-mix(in srgb, var(--accent) 66%, var(--px-black));
  --px-hi: color-mix(in srgb, var(--accent) 18%, var(--solid));
  --px-void: light-dark(color-mix(in srgb, var(--solid) 91%, var(--px-black)), color-mix(in srgb, var(--solid) 60%, var(--px-black)));
  --px-face: light-dark(color-mix(in srgb, var(--solid) 60%, var(--px-white)), color-mix(in srgb, var(--ink) 11%, var(--solid)));
}

html[data-skin="pixel"] {
  --font-display: "Jersey 10", "Pixelify Sans", ui-monospace, Menlo, monospace;
  --font-body: "Jersey 20", "Pixelify Sans", ui-monospace, Menlo, Consolas, monospace; /* Jersey 20: the digits only (see the import) */
  --r-card: 0px; --r-ctl: 0px; --r-btn: 0px; --r-pop: 0px; --r-badge: 0px; --zen-r: 0px; --zen-pill-r: 0px;
  --glass-blur: 0px; --zen-blur: 0px; --zen-feather: 0px; --zen-bleed: 0px;
  /* larger type needs a little more room: the side menu, the timer's ring and its clock, the break tip */
  --side-w: 264px; --timer-size: 54px; --timer-clock: 14px; --break-tip-size: 16px; --break-tip-source-size: 14px;
  /* Bold is the font's own 600 or nothing: a smeared copy of a pixel letter (or of a Jersey digit) is not pixel art. */
  font-synthesis-weight: none;
}
html[data-skin="pixel"], html[data-skin="pixel"] .zen {
  --ctl-line: var(--px-line);
  /* The panel frame, as one shadow, so it changes no size. From the inside out: a shaded inner edge, a 4px band whose
     corners carry a lit stud, a 2px rim that is lit on the top and left and shaded on the bottom and right (the bevel),
     a 2px dark outline whose corners step in, and a hard 4px drop underneath. */
  --shadow:
    inset 2px 2px 0 0 var(--px-shade), inset -2px -2px 0 0 var(--px-shade),
    0 -4px 0 0 var(--px-line), 0 4px 0 0 var(--px-line), -4px 0 0 0 var(--px-line), 4px 0 0 0 var(--px-line),
    -2px -2px 0 0 var(--px-light), 2px -2px 0 0 var(--px-light), -2px 2px 0 0 var(--px-light), 2px 2px 0 0 var(--px-light),
    0 0 0 4px var(--px-line),
    0 -6px 0 0 var(--px-light), -6px 0 0 0 var(--px-light), 0 6px 0 0 var(--px-shade), 6px 0 0 0 var(--px-shade),
    0 0 0 6px var(--px-deep),
    0 -8px 0 0 var(--px-deep), 0 8px 0 0 var(--px-deep), -8px 0 0 0 var(--px-deep), 8px 0 0 0 var(--px-deep),
    0 10px 0 2px var(--px-deep);
  scrollbar-color: var(--px-line) var(--px-void);
}
/* No round corner anywhere in the UI. The Theme picker's swatches keep theirs (they show what other Themes look like), and so
   does the Theme's own scenery behind the card (a landscape's sun). */
html[data-skin="pixel"] :not(.swatch, .swatch *, .land-host *),
html[data-skin="pixel"] :not(.swatch, .land-host *)::before,
html[data-skin="pixel"] :not(.swatch, .land-host *)::after { border-radius: 0 !important; }
html[data-skin="pixel"] *, html[data-skin="pixel"] ::before, html[data-skin="pixel"] ::after {
  transition-timing-function: steps(4, end) !important; /* motion moves in steps, as the sky does */
  /* Pixelify Sans joins "fi" into one glyph that reads as a capital A ("NotiAcations"). Important and on every element,
     because any `font:` shorthand in style.css sets ligatures back to normal. */
  font-variant-ligatures: none !important;
}
/* Pixel type is drawn with hard edges: smoothing greys every letter's edge and the type reads as blurry. Chrome and Safari
   on a Mac honour this; elsewhere the edges stay smooth. */
html[data-skin="pixel"], html[data-skin="pixel"] body { -webkit-font-smoothing: none; } /* body: style.css sets antialiased there */
html[data-skin="pixel"] body { letter-spacing: 0.01em; }
html[data-skin="pixel"] ::-webkit-scrollbar { width: 14px; height: 14px; background: var(--px-void); }
html[data-skin="pixel"] ::-webkit-scrollbar-thumb {
  background: var(--px-line); border: 2px solid var(--px-void);
  box-shadow: inset 2px 2px 0 0 var(--px-light), inset -2px -2px 0 0 var(--px-shade);
}
html[data-skin="pixel"] ::-webkit-scrollbar-corner { background: var(--px-void); }

/* ---------- type: Jersey 10 runs small for its size, so headings are scaled up to match the old ones ---------- */
html[data-skin="pixel"] :is(h1, h2, .onair-title, .recipe-number-value, .notes-title) {
  font-weight: 400; font-size-adjust: 0.54; letter-spacing: 0.03em;
}
html[data-skin="pixel"] :is(h1, .notes-title) { text-shadow: 3px 3px 0 var(--px-shade); }
html[data-skin="pixel"] b, html[data-skin="pixel"] strong { font-weight: 600; }

/* ---------- the control frame, painted as backgrounds so it changes no size. In the 2px border: four slabs that leave the
   corners out (--bd). Inside it: a 2px edge along the top and left (--tl) and along the bottom and right (--br), then the
   fill. Lit --tl over shaded --br reads as raised (buttons); the other way round reads as pressed in (fields).
   --lip-h makes the bottom edge taller. Weightless and set on the element itself, so each part sets its own colours
   and none leaks into a child. */
:where(html[data-skin="pixel"]) :where(button, input, textarea, .ctl-field, .set-search, .lb-col, .lb-card, .menu-set li, .timer-bar, .load-notice) {
  --bd: var(--px-line); --fill: var(--px-void); --tl: var(--px-deep); --br: var(--px-face); --lip-h: 2px;
  --px-frame:
    linear-gradient(var(--bd), var(--bd)) 2px 0 / calc(100% - 4px) 2px no-repeat border-box,
    linear-gradient(var(--bd), var(--bd)) 2px 100% / calc(100% - 4px) 2px no-repeat border-box,
    linear-gradient(var(--bd), var(--bd)) 0 2px / 2px calc(100% - 4px) no-repeat border-box,
    linear-gradient(var(--bd), var(--bd)) 100% 2px / 2px calc(100% - 4px) no-repeat border-box,
    linear-gradient(var(--tl), var(--tl)) 0 0 / 100% 2px no-repeat padding-box,
    linear-gradient(var(--tl), var(--tl)) 0 0 / 2px 100% no-repeat padding-box,
    linear-gradient(var(--br), var(--br)) 0 100% / 100% var(--lip-h) no-repeat padding-box,
    linear-gradient(var(--br), var(--br)) 100% 0 / 2px 100% no-repeat padding-box,
    linear-gradient(var(--fill), var(--fill)) padding-box;
}

/* ---------- buttons. One rule for which are raised and which are in upper case:
   - a command (primary, plain, danger, tiny, Back) is raised, a bevelled frame, and in upper case;
   - a button that shows a value (a select, a field picker), a choice that stays pressed, or one sign (- + x) is raised
     and keeps its case;
   - tabs and chips are flat labels in upper case;
   - the rest is flat and keeps its case: icon buttons, the list's toolbar tools, segment switches, rows of menus and
     lists, the side menu, links drawn as buttons. style.css makes those flat (border: 0, background: none), and the
     weightless frame below gives way to it. ---------- */
:where(html[data-skin="pixel"]) button {
  --fill: var(--px-face); --tl: var(--px-light); --br: var(--px-shade);
  border: 2px solid transparent; background: var(--px-frame); font-weight: 400;
}
:where(html[data-skin="pixel"]) button:where(:hover) { --bd: var(--accent); --fill: var(--px-hi); }
:where(html[data-skin="pixel"]) button:where(:active) { --tl: var(--px-shade); --br: var(--px-light); transform: translateY(2px); }
html[data-skin="pixel"] button.primary {
  --bd: var(--px-deep); --fill: var(--accent); --tl: var(--px-glint); --br: var(--px-lip); --lip-h: 4px;
  border: 2px solid transparent; background: var(--px-frame); color: var(--on-accent);
  text-transform: uppercase; letter-spacing: 0.05em; padding-bottom: 8px;
  box-shadow: 0 2px 0 0 var(--px-deep);
}
html[data-skin="pixel"] button.primary:hover { --fill: color-mix(in srgb, var(--accent) 80%, var(--ink)); background: var(--px-frame); }
html[data-skin="pixel"] button.primary:active { --tl: var(--px-lip); --br: var(--px-glint); --lip-h: 2px; box-shadow: none; }
html[data-skin="pixel"] button.danger { --bd: var(--warn); }
html[data-skin="pixel"] button.tiny { text-transform: uppercase; letter-spacing: 0.06em; }
html[data-skin="pixel"] button.tiny.live { --bd: var(--accent); --fill: var(--px-hi); background: var(--px-frame); border-color: transparent; }
html[data-skin="pixel"] button:is(.danger, .obj-back, [class=""], :not([class], [role])) { text-transform: uppercase; letter-spacing: 0.05em; }
html[data-skin="pixel"] :is(.side, .row-menu, .lp-menu-list, .lf-pick-list, .obj-cat-list, .ai-list, .display-seg, .review-seg, .ult-display, .lf-join, .lf-mode, .report-choices) button:not(.primary, .tiny) {
  text-transform: none; letter-spacing: 0;
}
/* the Add task window opens inside the side menu, whose flat rows would take its Close button with them */
html[data-skin="pixel"] .side .lp-ask-row > button:not([class]) { border: 2px solid transparent; background: var(--px-frame); color: var(--ink); text-transform: uppercase; letter-spacing: 0.05em; }
/* A Report's title shares a row with Edit / Duplicate / Delete and takes what they leave (style.css: flex 1 1 0): with the
   wider upper-case labels that is one letter per line on a phone, so here the title goes to its own row before that. */
html[data-skin="pixel"] .report-edit-head h1 { flex-basis: 10em; }
/* Today's "Show Completed" stands on the sky, so style.css gives it a plain fill: here it keeps the frame, which is opaque */
html[data-skin="pixel"] .mc-main > .td-done-toggle, html[data-skin="pixel"] .mc-main > .td-done-toggle:hover { background: var(--px-frame); }
/* Disabled: flat, a dashed line, no bevel and no lip, and a dimmer label with no fade over it, so it still reads:
   --ink-dim on --solid is 4.5:1 or better in every Theme and in Zen (tests/themes.test.mjs). Weightless for the frame, so
   a flat button stays flat. */
:where(html[data-skin="pixel"]) button:where(:disabled) { border: 2px dashed var(--px-line); background: var(--solid); }
html[data-skin="pixel"] button:disabled:not(.chip) { --fill: var(--solid); --tl: var(--solid); --br: var(--solid); color: var(--ink-dim); opacity: 1; }
html[data-skin="pixel"] button:is(.primary, .tiny.live):disabled { border: 2px dashed var(--px-line); background: var(--solid); box-shadow: none; }
/* Keyboard focus: one square outline in one colour. Weighted like style.css's own `input:focus, button:focus-visible`,
   so a part that shows its focus another way there (a search box's label, a menu row's fill) still does; links get it too. */
:where(html[data-skin="pixel"]) :is(input, textarea, button, a):focus-visible { outline: 2px solid var(--check); outline-offset: 2px; }
/* a menu's rows show focus as a faint fill there: here they keep an outline as well, drawn inside the row so the menu's edge cannot cut it */
html[data-skin="pixel"] :is(.row-menu, .lp-menu-list, .lf-pick-list, .tb-menu) button:focus-visible { outline: 2px solid var(--check); outline-offset: -2px; }
html[data-skin="pixel"] .tm-focus { --timer-size: 48px; --timer-clock: 13px; } /* a Task row menu's timer: the pixel digits need more room than the 36px ring there */
html[data-skin="pixel"] :focus-visible { outline-color: var(--check) !important; } /* over every `outline: 2px solid var(--pine)` in style.css */
html[data-skin="pixel"] .zen :focus-visible { outline-color: var(--zen-ink) !important; }
html[data-skin="pixel"] .zen-focus::before { mask-image: none; border: 1px solid var(--zen-line); box-shadow: var(--shadow); } /* Zen's donut glass: a hard frame as every other, no soft fade */
html[data-skin="pixel"] .zen-side .music-start { gap: 4px; }
html[data-skin="pixel"] .zen-side .music-start .ctl-icon { width: 26px; min-width: 26px; } /* the wider pixel letters: minutes and seconds still on one line of Zen's side column */
html[data-skin="pixel"] [aria-invalid="true"]:focus-visible { outline-color: var(--warn-ink) !important; }

/* ---------- fields: pressed in. Focus is the outline above and nothing else (no second ring from the frame's line). ---------- */
:where(html[data-skin="pixel"]) input, :where(html[data-skin="pixel"]) textarea, :where(html[data-skin="pixel"]) .ctl-field, :where(html[data-skin="pixel"]) .set-search {
  border: 2px solid transparent; background: var(--px-frame);
}
/* Settings' search: the label is the field and the box inside it is bare, so the label takes the focus outline */
html[data-skin="pixel"] .set-search:focus-within { border-color: transparent; outline: 2px solid var(--check); outline-offset: 2px; }

/* ---------- checkboxes: a pressed-in square inside a dark outline, filled with a smaller square when on ---------- */
html[data-skin="pixel"] input[type="checkbox"], html[data-skin="pixel"] input.ul-row-done {
  border: 2px solid var(--px-line); background: var(--px-void);
  box-shadow: inset 2px 2px 0 0 var(--px-deep), 0 0 0 2px var(--px-deep);
}
html[data-skin="pixel"] input[type="checkbox"]:hover, html[data-skin="pixel"] input.ul-row-done:hover { border-color: var(--check); background: var(--px-void); }
html[data-skin="pixel"] input[type="checkbox"]:checked, html[data-skin="pixel"] input.ul-row-done:checked {
  border-color: var(--check); background: var(--check); box-shadow: inset 0 0 0 3px var(--px-void), 0 0 0 2px var(--px-deep);
}
html[data-skin="pixel"] input[type="checkbox"]:checked::after { display: none; }

/* ---------- switches: a bevelled square knob in a framed, outlined slot ---------- */
html[data-skin="pixel"] .lp-switch-track { background: var(--px-void); box-shadow: 0 0 0 2px var(--px-line), 0 0 0 4px var(--px-deep); }
html[data-skin="pixel"] .lp-switch-track > span { background: var(--ink-dim); box-shadow: inset 2px 2px 0 0 var(--px-glint), inset -2px -2px 0 0 var(--px-dim); }
html[data-skin="pixel"] .lp-switch[aria-checked="true"] .lp-switch-track { background: color-mix(in srgb, var(--check) 30%, var(--px-void)); box-shadow: 0 0 0 2px var(--check), 0 0 0 4px var(--px-deep); }
html[data-skin="pixel"] .lp-switch[aria-checked="true"] .lp-switch-track > span { background: var(--check); }

/* ---------- sliders ---------- */
html[data-skin="pixel"] input[type="range"] { background: none; border: 0; }
html[data-skin="pixel"] input[type="range"]::-webkit-slider-runnable-track { border-radius: 0; height: 8px; background: var(--px-void); box-shadow: 0 0 0 2px var(--px-line), 0 0 0 4px var(--px-deep); }
html[data-skin="pixel"] input[type="range"]::-moz-range-track { border-radius: 0; height: 8px; background: var(--px-void); box-shadow: 0 0 0 2px var(--px-line), 0 0 0 4px var(--px-deep); }
html[data-skin="pixel"] input[type="range"]::-webkit-slider-thumb { border-radius: 0; border: 2px solid var(--px-deep); box-shadow: inset 2px 2px 0 0 var(--px-glint), inset -2px -4px 0 0 var(--px-lip); }
html[data-skin="pixel"] input[type="range"]::-moz-range-thumb { border-radius: 0; border: 2px solid var(--px-deep); box-shadow: inset 2px 2px 0 0 var(--px-glint), inset -2px -4px 0 0 var(--px-lip); }

/* ---------- chips and badges: upper-case labels with a lit top and a shaded foot ---------- */
html[data-skin="pixel"] :is(.chip, .ult-badge, .lt-tag) { text-transform: uppercase; letter-spacing: 0.06em; font-size: 14px; font-weight: 400; }
html[data-skin="pixel"] .chip { box-shadow: inset 0 2px 0 0 var(--px-glint), inset 0 -2px 0 0 var(--px-dim); }
html[data-skin="pixel"] .ult .chip[class*=" g-"] { box-shadow: none; }
html[data-skin="pixel"] button.chip.pick.on { box-shadow: inset 0 2px 0 0 var(--px-glint), inset 0 -2px 0 0 var(--px-dim), 0 0 0 2px var(--accent), 0 0 0 4px var(--px-deep); }

/* ---------- progress: counted out in blocks, in a pressed-in slot ---------- */
html[data-skin="pixel"] .project-bar { height: 8px; background: var(--px-void); box-shadow: 0 0 0 2px var(--px-line), 0 0 0 4px var(--px-deep); }
html[data-skin="pixel"] .project-bar > span {
  background: repeating-linear-gradient(90deg, var(--check) 0 6px, transparent 6px 8px);
}

/* ---------- panels: the frame is --shadow (above). The side menu and the tabs get harder lines. ---------- */
html[data-skin="pixel"] .side { border-right: 4px solid var(--px-line); box-shadow: inset -2px 0 0 0 var(--px-light), 2px 0 0 0 var(--px-deep); }
html[data-skin="pixel"] :is(.thread-tab, .report-tab) { border-bottom-width: 4px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 400; }
html[data-skin="pixel"] hr { border: 0; border-top: 2px dashed var(--px-line); }
html[data-skin="pixel"] ::selection { color: var(--ink); }

/* ---------- Theme picker: a Pixel Theme's swatch is drawn hard-edged, in whatever Theme or skin the picker is seen ---------- */
.swatch[data-theme^="px-"] { border-radius: 0; border: 2px solid var(--rule); background: linear-gradient(180deg, var(--land-sky-top) 0 50%, var(--land-sky-bot) 50% 100%); background-size: 100% 200%; background-position: 0 30%; }
.swatch[data-theme^="px-"]::before { border-radius: 0; left: 58%; top: 16%; width: 12px; height: 12px; box-shadow: 4px 4px 0 0 var(--land-glow), -18px 14px 0 -5px var(--land-far), -34px -2px 0 -5px var(--land-sun), 6px 26px 0 -5px var(--land-sun); }
.swatch[data-theme^="px-"]::after { border-radius: 0; left: 0; right: 0; bottom: 0; height: 22%; background: var(--land-near); box-shadow: 16px -4px 0 0 var(--land-mid), 44px -8px 0 0 var(--land-far); }
.swatch[data-theme^="px-"] i { height: 8%; }

/* ---------- icons: each has its own pixel art, drawn by hand on a grid (pixel-icons.js). Every smooth icon (svg[data-px])
   has a twin after it, svg.px-art, same classes and box, one CSS px a cell, crisp edges, in currentColor: the skin shows
   the twin and hides the smooth one; off the skin the twin stays hidden. Rings (the timer, the avatar) are cut into 2px
   blocks by the filter backdrop.js puts in the page. ---------- */
html:not([data-skin="pixel"]) .px-art { display: none !important; }
html[data-skin="pixel"] svg[data-px] { display: none !important; }
html[data-skin="pixel"] svg { shape-rendering: crispEdges; }
html[data-skin="pixel"] svg:has(> :is(.ring-track, .tb-ring, .hb-ring-track, .mc-ring-track)) { filter: url(#px-pixelate); }
/* The pixelate filter drops a faint see-through stroke, so the donut's track is opaque here. */
html[data-skin="pixel"] .mc-ring-track { stroke: color-mix(in srgb, var(--ink) 24%, var(--solid)); }
html[data-skin="pixel"] .mc-ring-done { stroke-linecap: butt; }
/* Habits: square days, dots and bars; a done date is a filled square (no tick: it would be a blur at this size) */
html[data-skin="pixel"] :is(.hb-day, .hb-dot, .hb-wait, .hb-badge, .hb-bar-due, .hb-bar-done, .hb-seg, .hb-key-mark, .hb-swatch span) { border-radius: 0; }
html[data-skin="pixel"] .hb-dot.done::after { content: none; }
html[data-skin="pixel"] .hb-ring-arc { stroke-linecap: butt; }
/* Add task: the disc in its colour, the + on it in its own */
html[data-skin="pixel"] .px-art[data-px-art="disc"] .px-base { fill: var(--pine); }
html[data-skin="pixel"] .px-art[data-px-art="disc"] .px-mark { fill: var(--on-accent); }
/* Add task: its date chips and the two icon buttons are raised and square, each a choice that stays pressed (in) once on */
html[data-skin="pixel"] .tb-add :is(.at-chip, .at-icon):is(*, :hover, :focus-visible, .is-on) { border: 2px solid transparent; border-radius: 0; background: var(--px-frame); color: var(--ink); font-size: 14px; }
html[data-skin="pixel"] .tb-add :is(.at-chip, .at-icon):is(:hover, :focus-visible, [aria-expanded="true"]) { --bd: var(--accent); --fill: var(--px-hi); }
html[data-skin="pixel"] .tb-add .at-chip:is([aria-pressed="true"], .is-on) { --bd: var(--accent); --fill: var(--px-hi); --tl: var(--px-shade); --br: var(--px-light); color: var(--accent-ink); }
html[data-skin="pixel"] .tb-add .at-deadline.is-on { --bd: var(--warn); --tl: var(--px-shade); --br: var(--px-light); color: var(--warn-ink); }
html[data-skin="pixel"] .tb-add .at-fire.is-on { --bd: var(--fire); --tl: var(--px-shade); --br: var(--px-light); color: var(--fire); }
/* the fire lit (Add task): the flame in its colour, its core in its own */
html[data-skin="pixel"] .px-art[data-px-art="fireOn"] .px-mark { fill: var(--fire-core); }
.px-defs { position: absolute; }

/* ---------- boxes that only had a thin line: board columns (pressed in), cards and the rest (raised) ---------- */
html[data-skin="pixel"] :is(.lb-col, .lb-card, .menu-set li, .timer-bar, .load-notice) { border: 2px solid transparent; background: var(--px-frame); }
html[data-skin="pixel"] :is(.lb-card, .menu-set li, .timer-bar, .load-notice) { --fill: var(--solid); --tl: var(--px-light); --br: var(--px-shade); }
html[data-skin="pixel"] .lb-col { --fill: var(--px-void); --tl: var(--px-deep); --br: var(--px-face); box-shadow: 0 0 0 2px var(--px-deep); }
html[data-skin="pixel"] .lb-card { --lip-h: 4px; box-shadow: 0 4px 0 0 var(--px-deep); }
html[data-skin="pixel"] .lb-card:hover { --bd: var(--accent); }
/* floating boxes (menus, option lists, dialogs, toasts): the frame of --shadow, so their own thin line goes */
html[data-skin="pixel"] :is(dialog, .lpop, .ctl-pop, .toast, .lp-menu-list, .tb-menu, .ai-pop, .music-dock, .ult-desc-pop, .lp-ask, .set-modal) { border-color: transparent; }
html[data-skin="pixel"] .toast {
  box-shadow:
    inset 2px 2px 0 0 var(--px-shade), inset -2px -2px 0 0 var(--px-shade),
    0 -4px 0 0 var(--check), 0 4px 0 0 var(--check), -4px 0 0 0 var(--check), 4px 0 0 0 var(--check),
    -2px -2px 0 0 var(--px-light), 2px -2px 0 0 var(--px-light), -2px 2px 0 0 var(--px-light), 2px 2px 0 0 var(--px-light),
    0 0 0 4px var(--check),
    0 -6px 0 0 var(--px-light), -6px 0 0 0 var(--px-light), 0 6px 0 0 var(--px-shade), 6px 0 0 0 var(--px-shade),
    0 0 0 6px var(--px-deep),
    0 -8px 0 0 var(--px-deep), 0 8px 0 0 var(--px-deep), -8px 0 0 0 var(--px-deep), 8px 0 0 0 var(--px-deep),
    0 10px 0 2px var(--px-deep);
}

/* ---------- the table: a window, pressed in. A lit title bar of column names with a lip under it, tiles for cells ---------- */
html[data-skin="pixel"] .ult-wrap {
  --ult-edge: var(--px-line); --ult-rule: var(--px-line); --ult-col: var(--px-void);
  border: 0; margin: 8px;
  box-shadow:
    0 -4px 0 0 var(--px-line), 0 4px 0 0 var(--px-line), -4px 0 0 0 var(--px-line), 4px 0 0 0 var(--px-line),
    -2px -2px 0 0 var(--px-light), 2px -2px 0 0 var(--px-light), -2px 2px 0 0 var(--px-light), 2px 2px 0 0 var(--px-light),
    0 0 0 4px var(--px-line),
    0 -6px 0 0 var(--px-light), -6px 0 0 0 var(--px-light), 0 6px 0 0 var(--px-shade), 6px 0 0 0 var(--px-shade),
    0 0 0 6px var(--px-deep),
    0 -8px 0 0 var(--px-deep), 0 8px 0 0 var(--px-deep), -8px 0 0 0 var(--px-deep), 8px 0 0 0 var(--px-deep),
    0 10px 0 2px var(--px-deep);
  background: var(--px-void);
}
/* the done boxes beside the rows are placed from the frame's top (list-ui-table.js), which knows nothing of the margin above */
html[data-skin="pixel"] .ult-gutter { margin-block: 8px; }
html[data-skin="pixel"] .ult { --cx: 10px; --cy: 7px; font-size: 15px; } /* larger type: a little less air, so as many columns fit */
/* Row height. The timer's ring is 54px here, so no row with one is under 60px, whatever its padding: Medium and Tall
   are padded past that (a one-line row: Short 51, Standard 60, Medium 65, Tall 77px), where style.css's 14px and 20px,
   made for its 46px ring, would all end at 60. */
html[data-skin="pixel"] .ult.rh-short { --cy: 3px; }
html[data-skin="pixel"] .ult.rh-medium { --cy: 20px; }
html[data-skin="pixel"] .ult.rh-tall { --cy: 26px; }
html[data-skin="pixel"] .ult th, html[data-skin="pixel"] .ult td { border-bottom-width: 2px; border-right-width: 2px; }
html[data-skin="pixel"] .ult thead th {
  background: var(--accent); color: var(--on-accent); border-bottom: 4px solid var(--px-lip); border-right-color: var(--px-lip);
  box-shadow: inset 0 2px 0 0 var(--px-glint), inset 2px 0 0 0 var(--px-glint);
}
html[data-skin="pixel"] .ult-sort { color: var(--on-accent); font-weight: 600; }
html[data-skin="pixel"] .ult-sort:hover { color: var(--on-accent); background: var(--px-glint); }
html[data-skin="pixel"] .ult-sort :is(.ult-th-type, .ult-arrow) { color: var(--on-accent); }
/* rows: stripes; a Row color (style.css `.tone`) tints over the stripe; the row pointed at (or its done box) lights up */
html[data-skin="pixel"] .ult-row { --row: var(--solid); --row-hot: var(--px-hi); }
html[data-skin="pixel"] .ult-row:nth-child(even) { --row: color-mix(in srgb, var(--px-face) 45%, var(--solid)); }
html[data-skin="pixel"] .ult-row.tone { --row-tone: color-mix(in srgb, var(--tone) 18%, var(--row)); --row-hot: color-mix(in srgb, var(--tone) 30%, var(--solid)); }
html[data-skin="pixel"] .ult-row td { background: var(--row-tone, var(--row)); transition: none; }
html[data-skin="pixel"] .ult-row:is(:hover, [data-hot]) td { background: var(--row-hot); }
html[data-skin="pixel"] .ult-group > * {
  background: var(--px-face); border-bottom-color: var(--px-line); text-transform: uppercase; letter-spacing: 0.05em;
  box-shadow: inset 0 2px 0 0 var(--px-light), inset 0 -2px 0 0 var(--px-shade);
}
html[data-skin="pixel"] .ult td.ult-editable:hover { box-shadow: inset 0 0 0 2px var(--accent); }
html[data-skin="pixel"] .ult td[data-cell]:focus { outline: 2px solid var(--check); }
html[data-skin="pixel"] .ult .chip[class*=" g-"]::before { width: 8px; height: 8px; box-shadow: 2px 2px 0 0 var(--px-deep); }
html[data-skin="pixel"] .ult-link { text-decoration: none; }
html[data-skin="pixel"] .ult-link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- Report and Dashboard tables (.recipe-table): the same window, a size down. A 2px line and a dark outline for
   the frame, the accent title bar with its lip, hard rules, stripes. The cells get side padding, as they now have a fill. ---------- */
html[data-skin="pixel"] .recipe-table-wrap {
  margin: 4px 4px 10px; background: var(--px-void);
  box-shadow: 0 0 0 2px var(--px-line), 0 0 0 4px var(--px-deep), 0 6px 0 2px var(--px-deep);
}
html[data-skin="pixel"] .recipe-table th, html[data-skin="pixel"] .recipe-table td { padding: 6px 10px; border-bottom: 2px solid var(--px-line); }
html[data-skin="pixel"] .recipe-table th {
  background: var(--accent); color: var(--on-accent); border-bottom: 4px solid var(--px-lip);
  box-shadow: inset 0 2px 0 0 var(--px-glint); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
}
html[data-skin="pixel"] .recipe-table td { background: var(--solid); }
html[data-skin="pixel"] .recipe-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--px-face) 45%, var(--solid)); }
html[data-skin="pixel"] .recipe-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- the list's toolbar and the timeline ---------- */
html[data-skin="pixel"] .ult-tool.on { background: var(--px-hi); color: var(--accent-chip-ink); box-shadow: inset 0 -4px 0 0 var(--accent), inset 0 2px 0 0 var(--px-light); }
html[data-skin="pixel"] .ult-badge { background: var(--accent); color: var(--on-accent); height: 20px; box-shadow: inset 0 -2px 0 0 var(--px-lip); }
html[data-skin="pixel"] .lt-bar { box-shadow: inset 0 2px 0 0 var(--px-glint), inset 0 -4px 0 0 var(--px-lip), 0 0 0 2px var(--px-deep); color: var(--on-accent); }
html[data-skin="pixel"] .lt-head { border-bottom: 2px solid var(--px-line); box-shadow: 0 2px 0 0 var(--px-deep); }
html[data-skin="pixel"] .lt-today { border-left-width: 4px; border-left-style: dotted; }
/* The day and the time lit in Add task's name: square, as all else here. */
html[data-skin="pixel"] .at-tok { border-radius: 0; }

/* ---------- Appearance: the Pixel UI choice and the Card opacity slider (pages/theme-picker.js) ---------- */
.skin-picker h3 { font-size: 15px; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.skin-picker .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.skin-picker .acc-dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; background: var(--acc); box-shadow: 0 0 0 2px var(--px-deep, var(--line)); }
.scene-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; max-width: 720px; }
.scene-tile { display: flex; flex-direction: column; gap: 6px; padding: 6px; text-align: left; }
.scene-sky { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--px-deep, var(--ink)); }
.scene-sky canvas { position: absolute; inset: 0; image-rendering: pixelated; }
.scene-name { font-size: 14px; color: var(--ink-dim); }
.scene-tile.on { outline: 2px solid var(--accent); outline-offset: 0; }
.scene-tile.on .scene-name { color: var(--ink); }
.skin-card { display: flex; align-items: center; gap: 12px; max-width: 360px; }
.skin-card input { flex: 1 1 auto; min-width: 0; height: 32px; margin-block: -5px; } /* 32px to press, in the 22px of room it had */
.skin-card output { flex: none; min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-dim); }

/* Report cards keep the pixel window frame when expanded over the gallery. */
html[data-skin="pixel"] .report-grid { gap: 20px; }
html[data-skin="pixel"] .report-card {
  border: 2px solid var(--px-line); border-radius: 0;
  background: var(--solid);
  box-shadow: inset 2px 2px var(--px-light), inset -2px -2px var(--px-deep), 4px 4px var(--px-line);
}
html[data-skin="pixel"] .report-card.is-expanded { box-shadow: inset 2px 2px var(--px-light), inset -2px -2px var(--px-deep), 6px 6px var(--px-line); animation: none; }
html[data-skin="pixel"] .report-chip { border: 2px solid var(--px-line); border-radius: 0; background: var(--px-face); color: var(--ink); }
html[data-skin="pixel"] .report-card-preview { border-top: 2px solid var(--px-line); }
