/* Distinct visual languages. Default lives in family.css :root. */

/* -------------------------------------------------------------------------- */
/* Clean — quiet paper, hairlines, no glow                                    */
/* -------------------------------------------------------------------------- */
[data-theme="clean"] {
  --bg: #f7f7f5;
  --bg-2: #ecece8;
  --ink: #111111;
  --muted: #6b6b66;
  --card: #ffffff;
  --edge: #e2e2dc;
  --green: #111111;
  --green-2: #333333;
  --green-soft: #f0f0ec;
  --terracotta: #111111;
  --gold: #111111;
  --danger: #8a1f1a;
  --btn: #111111;
  --btn-ink: #ffffff;
  --btn-2: #ecece8;
  --btn-2-ink: #111111;
  --btn-edge: #111111;
  --shadow: none;
  --radius: 0.2rem;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
[data-theme="clean"] body {
  background: var(--bg);
  letter-spacing: 0;
}
[data-theme="clean"] .tile,
[data-theme="clean"] .card,
[data-theme="clean"] .who-chip,
[data-theme="clean"] .flash {
  box-shadow: none;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
}
[data-theme="clean"] .tile-scan {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--edge);
}
[data-theme="clean"] .tile-scan .kicker,
[data-theme="clean"] .tile-scan .count { color: var(--muted); }
[data-theme="clean"] .tile-scan .label { color: var(--ink); }
[data-theme="clean"] .tile-scan .ico {
  background: #111;
  color: #fff;
  border-radius: 0.2rem;
}
[data-theme="clean"] .tile .ico { border-radius: 0.2rem; background: #f0f0ec; color: #111; }
[data-theme="clean"] .btn {
  border-radius: 0.2rem;
  background: #111;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
[data-theme="clean"] .btn.secondary { background: #ecece8; color: #111; border-color: #111; }
[data-theme="clean"] .btn.terracotta,
[data-theme="clean"] .btn.warn { background: #111; color: #fff; }
[data-theme="clean"] .btn.warn:hover { color: #fff; }
[data-theme="clean"] .badge { border-radius: 0.15rem; letter-spacing: 0.08em; background: #f0f0ec; color: #111; }
[data-theme="clean"] .badge.low { background: #111; color: #fff; }
[data-theme="clean"] .badge.out { background: #8a1f1a; color: #fff; }
[data-theme="clean"] .badge.want { background: #ecece8; color: #111; }
[data-theme="clean"] .nav {
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: 1px solid var(--edge);
}
[data-theme="clean"] .nav .scan-fab {
  border-radius: 0.25rem;
  background: #111;
  box-shadow: none;
  margin-top: -0.55rem;
}
[data-theme="clean"] .side-nav {
  border-right: 1px solid var(--edge);
  background: #fff;
}
[data-theme="clean"] .side-links a.active { background: #111; color: #fff; border-radius: 0.2rem; }
[data-theme="clean"] .side-brand img { border-radius: 0.25rem; box-shadow: none; }
[data-theme="clean"] .rec-table, [data-theme="clean"] .rec-row { border-radius: 0.2rem; }
[data-theme="clean"] input,
[data-theme="clean"] select,
[data-theme="clean"] textarea {
  border-radius: 0.2rem;
  background: #fff;
}
[data-theme="clean"] .tabs a { border-radius: 0.2rem; }
[data-theme="clean"] .tabs a.active { background: #111; border-color: #111; }
[data-theme="clean"] #reader,
[data-theme="clean"] #reader video,
[data-theme="clean"] #reader canvas { border-radius: 0.2rem !important; }
[data-theme="clean"] .scan-result,
[data-theme="clean"] .attention { border-radius: 0.2rem; box-shadow: none; border: 1px solid var(--edge); }
[data-theme="clean"] .brand img { border-radius: 0.25rem; box-shadow: none; }
[data-theme="clean"] .seg { border-radius: 0.2rem; background: #ecece8; }
[data-theme="clean"] .seg a.on { border-radius: 0.15rem; box-shadow: none; }
[data-theme="clean"] .page-head h1 { font-weight: 500; letter-spacing: -0.03em; }

/* -------------------------------------------------------------------------- */
/* Dark — night kitchen                                                       */
/* -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --bg: #0b0c0d;
  --bg-2: #15171a;
  --ink: #ecece8;
  --muted: #8b908a;
  --card: #16181b;
  --edge: rgba(255, 255, 255, 0.08);
  --green: #7ddea8;
  --green-2: #9aebbc;
  --green-soft: #1a2a22;
  --terracotta: #f0a080;
  --gold: #e6c56a;
  --danger: #ff8a80;
  --btn: #25915a;
  --btn-ink: #06140c;
  --btn-2: #2a2e33;
  --btn-2-ink: #f2f2ee;
  --btn-edge: #9aa19a;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --radius: 1.1rem;
  --font: "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}
[data-theme="dark"] body {
  background:
    radial-gradient(900px 420px at 80% -10%, #1a2420 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
}
[data-theme="dark"] a { color: var(--green); }
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #0f1113;
  color: var(--ink);
  border-color: var(--edge);
}
[data-theme="dark"] .tile-scan {
  background: linear-gradient(160deg, #1c2a24 0%, #101412 100%);
  color: #e8f6ee;
  border: 1px solid rgba(125, 222, 168, 0.18);
}
[data-theme="dark"] .nav {
  background: rgba(12, 13, 14, 0.92);
  border-top-color: var(--edge);
}
[data-theme="dark"] .side-nav {
  background: #121416;
  border-right-color: var(--edge);
}
[data-theme="dark"] .btn {
  background: #25915a;
  color: #06140c;
  border: 1px solid #7ddea8;
}
[data-theme="dark"] .btn:hover {
  color: #06140c;
  filter: brightness(1.08);
}
[data-theme="dark"] .btn.secondary,
[data-theme="dark"] .home-cal-btn {
  background: #1c1e21;
  color: #f2f2ee;
  border: 1.5px solid #9aa19a;
}
[data-theme="dark"] .btn.secondary:hover,
[data-theme="dark"] .home-cal-btn:hover {
  color: #fff;
  background: #25282c;
}
[data-theme="dark"] .btn.ghost { color: #7ddea8; }
[data-theme="dark"] .btn.danger {
  background: #a33a32;
  color: #fff;
  border-color: #ff8a80;
}
[data-theme="dark"] .btn.warn { color: #1a1710; }
[data-theme="dark"] .cal-chip {
  background: #1c1e21;
  color: #f2f2ee;
  border-color: #9aa19a;
}
[data-theme="dark"] .cal-chip:has(input:checked) {
  background: #1a2a22;
  border-color: #7ddea8;
  color: #9aebbc;
}
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  background: #0f1113;
  color: var(--ink);
  outline-color: rgba(125, 222, 168, 0.45);
}
[data-theme="dark"] .sheet-close {
  background: #1c1e21;
  color: #f2f2ee;
}
[data-theme="dark"] .home-fold > summary::after { color: #9aa19a; }
[data-theme="dark"] .plat-nav a {
  background: #1c1e21;
  color: #ecece8;
  border-color: #3a3f44;
}
[data-theme="dark"] .plat-nav a.on {
  background: #25915a;
  color: #06140c;
  border-color: #7ddea8;
}
[data-theme="dark"] .tile { border: 1px solid var(--edge); }
[data-theme="dark"] .need-card { color: #141816; }
[data-theme="dark"] .who-chip { background: var(--card); color: var(--ink); }
[data-theme="dark"] .who-menu .sheet { background: #1c1e21; }
[data-theme="dark"] .who-menu .sheet a:hover,
[data-theme="dark"] .who-menu .sheet button:hover { background: #1a2a22; }
[data-theme="dark"] .badge { background: #1a2a22; color: #7ddea8; }
[data-theme="dark"] .badge.low { background: #2a2018; color: #f0a080; }
[data-theme="dark"] .badge.out { background: #2a1614; color: #ff8a80; }
[data-theme="dark"] .badge.want { background: #151a24; color: #9bb7e8; }
[data-theme="dark"] .scan-result.ok { background: #1a2a22; }
[data-theme="dark"] .scan-result.low { background: #2a2018; }
[data-theme="dark"] .scan-result.out { background: #2a1614; }
[data-theme="dark"] .scan-result.want { background: #151a24; }
[data-theme="dark"] .attention { background: #2a2018; }
[data-theme="dark"] .attention.is-out { background: #2a1614; }
[data-theme="dark"] .flash { background: var(--card); }
[data-theme="dark"] .flash.success { background: #1a2a22; color: #7ddea8; }
[data-theme="dark"] .seg { background: #101214; }
[data-theme="dark"] .seg a.on { background: #1c1e21; color: var(--ink); }
[data-theme="dark"] .tabs a { background: var(--card); color: var(--ink); }
[data-theme="dark"] #reader { background: #050606; }

/* -------------------------------------------------------------------------- */
/* When99 — Win98-like desktop, not a tint                                    */
/* -------------------------------------------------------------------------- */
[data-theme="when99"] {
  --bg: #008080;
  --bg-2: #007070;
  --ink: #000000;
  --muted: #000080;
  --card: #c0c0c0;
  --edge: #808080;
  --green: #000080;
  --green-2: #000080;
  --green-soft: #c0c0c0;
  --terracotta: #000000;
  --gold: #000000;
  --danger: #800000;
  --shadow: none;
  --radius: 0;
  --font: Tahoma, "MS Sans Serif", "Segoe UI", sans-serif;
  --nav-h: 2.4rem;
  --win-face: #c0c0c0;
  --win-hi: #ffffff;
  --win-sh: #808080;
  --win-dk: #000000;
  --btn: #c0c0c0;
  --btn-ink: #000000;
  --btn-2: #c0c0c0;
  --btn-2-ink: #000000;
  --btn-edge: #000000;
}
[data-theme="when99"] body {
  background-color: #008080;
  background-image:
    linear-gradient(rgba(0,0,0,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 8px 8px;
  letter-spacing: 0;
  font-size: 12px;
}
[data-theme="when99"] a { color: #000080; text-decoration: underline; }
[data-theme="when99"] a:hover { color: #0000ff; }
[data-theme="when99"] .wrap { width: min(720px, calc(100% - 12px)); }
[data-theme="when99"] .topbar {
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  color: #fff;
  padding: 3px 6px;
  margin: 0 -6px 10px;
  align-items: center;
}
[data-theme="when99"] .brand { color: #fff; gap: 6px; }
[data-theme="when99"] .brand img {
  width: 16px; height: 16px; border-radius: 0;
  box-shadow: none; border: 1px solid #000;
}
[data-theme="when99"] .brand-meta strong {
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 700;
}
[data-theme="when99"] .brand-meta strong::after {
  content: "  ·  When99";
  font-weight: 400;
}
[data-theme="when99"] .brand-meta small {
  color: #c5d8ff;
  letter-spacing: 0;
  text-transform: none;
  font-size: 10px;
}
[data-theme="when99"] .who-chip {
  background: #c0c0c0;
  color: #000;
  border-radius: 0;
  box-shadow: none;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  padding: 1px 4px;
}
[data-theme="when99"] .who-chip .avatar {
  width: 16px; height: 16px; border-radius: 0;
  background: #000080; color: #fff; font-size: 9px;
}
[data-theme="when99"] .who-menu .sheet {
  background: #c0c0c0;
  border-radius: 0;
  box-shadow: 2px 2px 0 #000;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  padding: 2px;
}
[data-theme="when99"] .who-menu .sheet a,
[data-theme="when99"] .who-menu .sheet button {
  border-radius: 0;
  font-weight: 400;
  font-size: 12px;
  padding: 4px 8px;
}
[data-theme="when99"] .who-menu .sheet a:hover,
[data-theme="when99"] .who-menu .sheet button:hover {
  background: #000080;
  color: #fff;
}
[data-theme="when99"] .page-head {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  padding: 0 0 8px;
  display: block;
  margin: 0 0 10px;
}
[data-theme="when99"] .page-head > div:first-child {
  background: transparent;
  padding: 0;
  margin: 0;
}
[data-theme="when99"] .page-head h1 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 8px;
  color: #fff;
  background: linear-gradient(90deg, #000080, #1084d0);
  padding: 3px 8px;
}
[data-theme="when99"] .page-head p {
  color: #000;
  font-size: 12px;
  padding: 0 8px;
  margin: 0;
}
[data-theme="when99"] .page-head .btn,
[data-theme="when99"] .page-head a.btn {
  margin: 8px;
}
[data-theme="when99"] h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  background: transparent;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}
[data-theme="when99"] .card,
[data-theme="when99"] .tile,
[data-theme="when99"] .flash,
[data-theme="when99"] .scan-result,
[data-theme="when99"] .attention {
  background: #c0c0c0;
  color: #000;
  border-radius: 0;
  box-shadow: none;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
}
[data-theme="when99"] .tile {
  min-height: 5.5rem;
}
[data-theme="when99"] .tile .ico {
  border-radius: 0;
  background: #c0c0c0;
  color: #000;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  width: 28px; height: 28px;
}
[data-theme="when99"] .tile .kicker {
  text-transform: none;
  letter-spacing: 0;
  font-size: 10px;
  color: #000080;
}
[data-theme="when99"] .tile .label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}
[data-theme="when99"] .tile-scan {
  background: #c0c0c0;
  color: #000;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
}
[data-theme="when99"] .tile-scan .kicker,
[data-theme="when99"] .tile-scan .count { color: #000080; }
[data-theme="when99"] .tile-scan .label { color: #000; font-size: 16px; }
[data-theme="when99"] .tile-scan .ico {
  background: #c0c0c0;
  color: #000;
  border-radius: 0;
}
[data-theme="when99"] .badge {
  border-radius: 0;
  background: #c0c0c0;
  color: #000;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  font-weight: 700;
  letter-spacing: 0;
  font-size: 10px;
  text-transform: none;
}
[data-theme="when99"] .badge.low,
[data-theme="when99"] .badge.out,
[data-theme="when99"] .badge.want {
  background: #c0c0c0;
  color: #000;
}
[data-theme="when99"] .btn {
  background: #c0c0c0;
  color: #000 !important;
  border-radius: 0;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  font-weight: 400;
  font-size: 12px;
  min-height: 26px;
  padding: 2px 12px;
  filter: none;
  box-shadow: none;
}
[data-theme="when99"] .btn:hover { filter: none; color: #000 !important; }
[data-theme="when99"] .btn:active {
  border-color: #000 #fff #fff #000;
}
[data-theme="when99"] .btn.secondary,
[data-theme="when99"] .btn.terracotta,
[data-theme="when99"] .btn.warn,
[data-theme="when99"] .btn.ghost {
  background: #c0c0c0;
  color: #000 !important;
}
[data-theme="when99"] input,
[data-theme="when99"] select,
[data-theme="when99"] textarea {
  background: #fff;
  color: #000;
  border-radius: 0;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  padding: 3px 4px;
}
[data-theme="when99"] input:focus,
[data-theme="when99"] select:focus,
[data-theme="when99"] textarea:focus {
  outline: 1px dotted #000;
  background: #fff;
  border-color: #808080 #fff #fff #808080;
}
[data-theme="when99"] .nav {
  background: #c0c0c0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: 2px solid #fff;
  box-shadow: inset 0 1px 0 #fff;
  border-radius: 0 !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  width: 100% !important;
  height: calc(36px + var(--safe-b));
}
[data-theme="when99"] .nav a {
  color: #000;
  font-size: 11px;
  font-weight: 400;
  flex-direction: row;
  gap: 4px;
  border: 2px solid transparent;
  margin: 3px 2px;
}
[data-theme="when99"] .nav a svg { width: 14px; height: 14px; }
[data-theme="when99"] .nav a.active {
  color: #000;
  border-color: #808080 #fff #fff #808080;
  background: #c0c0c0;
}
[data-theme="when99"] .nav .scan-fab {
  width: auto;
  height: auto;
  min-height: 26px;
  border-radius: 0;
  margin-top: 0;
  background: #c0c0c0;
  color: #000 !important;
  font-size: 11px;
  font-weight: 700;
  box-shadow: none;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  padding: 2px 10px;
  gap: 4px;
}
[data-theme="when99"] .nav .scan-fab svg { stroke: #000; width: 12px; height: 12px; }
[data-theme="when99"] .nav .scan-fab::after { content: "Scan"; }
[data-theme="when99"] .side-nav {
  background: #c0c0c0;
  border-right: 2px solid #fff;
  box-shadow: inset -1px 0 0 #808080;
}
[data-theme="when99"] .side-links a {
  border-radius: 0;
  font-weight: 400;
  font-size: 12px;
}
[data-theme="when99"] .side-links a.active {
  background: #000080;
  color: #fff;
}
[data-theme="when99"] .side-brand img { border-radius: 0; box-shadow: none; }
[data-theme="when99"] .tabs a {
  border-radius: 0;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  font-size: 11px;
  font-weight: 400;
}
[data-theme="when99"] .tabs a.active {
  background: #c0c0c0;
  color: #000;
  border-color: #000 #fff #fff #000;
}
[data-theme="when99"] #reader {
  border-radius: 0;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  box-shadow: none;
}
[data-theme="when99"] #reader video,
[data-theme="when99"] #reader canvas { border-radius: 0 !important; }
[data-theme="when99"] .scan-result.ok,
[data-theme="when99"] .scan-result.low,
[data-theme="when99"] .scan-result.out,
[data-theme="when99"] .scan-result.want {
  background: #c0c0c0;
}
[data-theme="when99"] .attention,
[data-theme="when99"] .attention.is-out { background: #c0c0c0; }
[data-theme="when99"] .flash.success { background: #c0c0c0; color: #000; }
[data-theme="when99"] .flash.danger { background: #c0c0c0; color: #800000; }
[data-theme="when99"] .seg {
  background: #c0c0c0;
  border-radius: 0;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  padding: 2px;
}
[data-theme="when99"] .seg a { border-radius: 0; color: #000; }
[data-theme="when99"] .seg a.on {
  background: #c0c0c0;
  box-shadow: none;
  border: 2px solid;
  border-color: #000 #fff #fff #000;
}
[data-theme="when99"] .auth-hero img { border-radius: 0; box-shadow: none; border: 2px outset #fff; }
[data-theme="when99"] .photo-grid img { border-radius: 0; }
[data-theme="when99"] .qty { font-weight: 700; letter-spacing: 0; }
[data-theme="when99"] label {
  text-transform: none;
  letter-spacing: 0;
  color: #000;
  font-size: 11px;
}

/* -------------------------------------------------------------------------- */
/* Mimix — Motif / CDE workstation, not a tint                                */
/* -------------------------------------------------------------------------- */
[data-theme="mimix"] {
  --bg: #5c6b7a;
  --bg-2: #4a5663;
  --ink: #101418;
  --muted: #24303c;
  --card: #c6c6c6;
  --edge: #8e8e8e;
  --green: #000080;
  --green-2: #191970;
  --green-soft: #b9c6dc;
  --terracotta: #6b2a18;
  --gold: #8a7018;
  --danger: #8b0000;
  --btn: #c6c6c6;
  --btn-ink: #000000;
  --btn-2: #c6c6c6;
  --btn-2-ink: #000000;
  --btn-edge: #444444;
  --shadow: 3px 3px 0 #2a323c;
  --radius: 0;
  --font: "Lucida Grande", Geneva, Helvetica, "Nimbus Sans L", sans-serif;
}
[data-theme="mimix"] body {
  background:
    repeating-linear-gradient(0deg, transparent, transparent 7px, rgba(0,0,0,.04) 7px, rgba(0,0,0,.04) 8px),
    var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}
[data-theme="mimix"] a { color: #000080; text-decoration: underline; }
[data-theme="mimix"] a:hover { color: #0000aa; }
[data-theme="mimix"] .topbar {
  background: #000080;
  color: #fff;
  border-bottom: 2px solid #000;
  padding: .45rem .7rem;
}
[data-theme="mimix"] .brand { color: #fff; }
[data-theme="mimix"] .brand-meta small { color: #c8d4ee; }
[data-theme="mimix"] .who-chip {
  background: #c6c6c6;
  color: #000;
  border: 2px solid;
  border-color: #eee #555 #555 #eee;
  border-radius: 0;
}
[data-theme="mimix"] .who-menu .sheet {
  background: #c6c6c6;
  border: 2px solid;
  border-color: #eee #444 #444 #eee;
  border-radius: 0;
}
[data-theme="mimix"] .card,
[data-theme="mimix"] .tile,
[data-theme="mimix"] .flash,
[data-theme="mimix"] .scan-result,
[data-theme="mimix"] .attention {
  background: #c6c6c6;
  color: #101418;
  border-radius: 0;
  box-shadow: var(--shadow);
  border: 2px solid;
  border-color: #eee #555 #555 #eee;
}
[data-theme="mimix"] .tile .ico {
  border-radius: 0;
  background: #a8a8a8;
  color: #000;
  border: 2px solid;
  border-color: #eee #555 #555 #eee;
}
[data-theme="mimix"] .tile .kicker { color: #000080; letter-spacing: .06em; }
[data-theme="mimix"] .tile-scan {
  background: #000080;
  color: #fff;
  border-color: #eee #222 #222 #eee;
}
[data-theme="mimix"] .tile-scan .kicker,
[data-theme="mimix"] .tile-scan .count { color: #c8d4ee; }
[data-theme="mimix"] .tile-scan .label { color: #fff; }
[data-theme="mimix"] .tile-scan .ico {
  background: #191970;
  color: #fff;
  border-color: #668 #000 #000 #668;
}
[data-theme="mimix"] .btn {
  background: #c6c6c6;
  color: #000;
  border-radius: 0;
  border: 2px solid;
  border-color: #eee #444 #444 #eee;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
}
[data-theme="mimix"] .btn:hover {
  color: #000;
  filter: none;
  background: #d4d4d4;
}
[data-theme="mimix"] .btn:active {
  border-color: #444 #eee #eee #444;
}
[data-theme="mimix"] .btn.secondary,
[data-theme="mimix"] .home-cal-btn,
[data-theme="mimix"] .btn.ghost,
[data-theme="mimix"] .btn.terracotta,
[data-theme="mimix"] .btn.warn {
  background: #c6c6c6;
  color: #000;
  border: 2px solid;
  border-color: #eee #444 #444 #eee;
}
[data-theme="mimix"] .btn.secondary:hover,
[data-theme="mimix"] .home-cal-btn:hover { color: #000; background: #d4d4d4; }
[data-theme="mimix"] .btn.danger {
  background: #8b0000;
  color: #fff;
  border-color: #c44 #400 #400 #c44;
}
[data-theme="mimix"] input,
[data-theme="mimix"] select,
[data-theme="mimix"] textarea {
  background: #fff;
  color: #000;
  border-radius: 0;
  border: 2px solid;
  border-color: #555 #eee #eee #555;
}
[data-theme="mimix"] input:focus,
[data-theme="mimix"] select:focus,
[data-theme="mimix"] textarea:focus {
  background: #fff;
  color: #000;
  outline: 1px solid #000080;
}
[data-theme="mimix"] .cal-chip {
  background: #c6c6c6;
  color: #000;
  border-radius: 0;
  border: 2px solid;
  border-color: #eee #444 #444 #eee;
}
[data-theme="mimix"] .cal-chip:has(input:checked) {
  background: #000080;
  color: #fff;
  border-color: #224 #000 #000 #224;
}
[data-theme="mimix"] .nav {
  background: #c6c6c6;
  border-top: 2px solid #000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
[data-theme="mimix"] .nav a { color: #000; border-radius: 0; }
[data-theme="mimix"] .nav a.active { background: #000080; color: #fff; }
[data-theme="mimix"] .nav .scan-fab {
  border-radius: 0;
  background: #c6c6c6;
  color: #000;
  border: 2px solid;
  border-color: #eee #222 #222 #eee;
  box-shadow: none;
  margin-top: -0.4rem;
}
[data-theme="mimix"] .nav .scan-fab svg { stroke: #000; }
[data-theme="mimix"] .side-nav {
  background: #c6c6c6;
  border-right: 2px solid #000;
}
[data-theme="mimix"] .side-links a.active { background: #000080; color: #fff; border-radius: 0; }
[data-theme="mimix"] .badge {
  border-radius: 0;
  background: #000080;
  color: #fff;
}
[data-theme="mimix"] .badge.low { background: #8a7018; color: #fff; }
[data-theme="mimix"] .badge.out { background: #8b0000; color: #fff; }
[data-theme="mimix"] .badge.want { background: #2a4060; color: #fff; }
[data-theme="mimix"] .seg {
  background: #a8a8a8;
  border-radius: 0;
  border: 2px solid;
  border-color: #555 #eee #eee #555;
}
[data-theme="mimix"] .seg a { color: #000; border-radius: 0; }
[data-theme="mimix"] .seg a.on { background: #000080; color: #fff; }
[data-theme="mimix"] .tabs a {
  background: #c6c6c6;
  color: #000;
  border-radius: 0;
  border: 2px solid;
  border-color: #eee #555 #555 #eee;
}
[data-theme="mimix"] .tabs a.active { background: #000080; color: #fff; }
[data-theme="mimix"] .plat-nav a {
  background: #c6c6c6;
  color: #000;
  border-radius: 0;
  border: 2px solid;
  border-color: #eee #555 #555 #eee;
}
[data-theme="mimix"] .plat-nav a.on { background: #000080; color: #fff; border-color: #224 #000 #000 #224; }
[data-theme="mimix"] .need-card { border-radius: 0; color: #101418; }
[data-theme="mimix"] .sheet-panel { border-radius: 0; background: #c6c6c6; }
[data-theme="mimix"] .sheet-close {
  background: #c6c6c6;
  color: #000;
  border-radius: 0;
  border: 2px solid;
  border-color: #eee #444 #444 #eee;
}
[data-theme="mimix"] label { color: #000; text-transform: none; letter-spacing: 0; }
[data-theme="mimix"] .muted { color: #24303c; }
[data-theme="mimix"] #reader { background: #2a323c; border-radius: 0; }
[data-theme="mimix"] .brand img { border-radius: 0; box-shadow: none; }

/* Theme picker — each phone keeps ITS look even after you click another. */
.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.theme-card {
  appearance: none;
  border: 1.5px solid var(--btn-edge);
  background: var(--btn-2);
  color: var(--btn-2-ink);
  border-radius: var(--radius);
  padding: 0.7rem;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  width: 100%;
}
.theme-card.on {
  outline: 3px solid var(--btn);
  outline-offset: 2px;
}
.theme-card strong { display: block; margin-top: 0.45rem; font-size: 0.95rem; color: var(--btn-2-ink); }
.theme-card .blurb { color: var(--muted); font-size: 0.78rem; margin-top: 0.15rem; }
.theme-phone {
  pointer-events: none;
  height: 7.6rem;
  border-radius: 0.7rem;
  padding: 0.45rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  border: 1px solid var(--edge);
}
.theme-phone .ph-bar {
  height: 0.7rem;
  border-radius: 0.2rem;
  background: var(--btn);
  opacity: 0.9;
}
.theme-phone .ph-card {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 0.4rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
}
.theme-phone .ph-btns {
  margin-top: auto;
  display: flex;
  gap: 0.3rem;
}
.theme-phone .ph-btn {
  flex: 1;
  height: 1.15rem;
  border-radius: calc(var(--radius) * 0.6);
  background: var(--btn);
  border: 1.5px solid var(--btn);
}
.theme-phone .ph-btn.secondary {
  background: var(--btn-2);
  border-color: var(--btn-edge);
}
.theme-phone[data-theme="default"] {
  background: #f3f1ec;
  color: #141816;
}
.theme-phone[data-theme="default"] .ph-card { background: #fff; color: #141816; }
.theme-phone[data-theme="default"] .ph-btn { background: #1f6a45; border-color: #1f6a45; }
.theme-phone[data-theme="default"] .ph-btn.secondary { background: #d7e4db; border-color: #1a3d2c; }
.theme-phone[data-theme="clean"] {
  background: #f7f7f5;
  color: #111;
  border-radius: 0.2rem;
}
.theme-phone[data-theme="clean"] .ph-bar { background: #111; border-radius: 0.15rem; }
.theme-phone[data-theme="clean"] .ph-card { background: #fff; border-radius: 0.2rem; color: #111; }
.theme-phone[data-theme="clean"] .ph-btn { background: #111; border-color: #111; border-radius: 0.15rem; }
.theme-phone[data-theme="clean"] .ph-btn.secondary { background: #ecece8; border-color: #111; }
.theme-phone[data-theme="dark"] {
  background: #0b0c0d;
  color: #ecece8;
}
.theme-phone[data-theme="dark"] .ph-card { background: #16181b; color: #ecece8; border-color: rgba(255,255,255,.08); }
.theme-phone[data-theme="dark"] .ph-btn { background: #25915a; border-color: #7ddea8; }
.theme-phone[data-theme="dark"] .ph-btn.secondary { background: #2a2e33; border-color: #9aa19a; }
.theme-phone[data-theme="when99"] {
  background: #008080;
  color: #000;
  border-radius: 0;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
}
.theme-phone[data-theme="when99"] .ph-bar {
  border-radius: 0;
  background: linear-gradient(90deg, #000080, #1084d0);
}
.theme-phone[data-theme="when99"] .ph-card {
  border-radius: 0;
  background: #c0c0c0;
  color: #000;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
}
.theme-phone[data-theme="when99"] .ph-btn {
  border-radius: 0;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
}
.theme-phone[data-theme="mimix"] {
  border-radius: 0;
  background: #5c6b7a;
  color: #101418;
  border: 2px solid;
  border-color: #eee #333 #333 #eee;
}
.theme-phone[data-theme="mimix"] .ph-bar {
  border-radius: 0;
  background: #000080;
}
.theme-phone[data-theme="mimix"] .ph-card {
  border-radius: 0;
  background: #c6c6c6;
  color: #000;
  border: 2px solid;
  border-color: #eee #555 #555 #eee;
}
.theme-phone[data-theme="mimix"] .ph-btn {
  border-radius: 0;
  background: #c6c6c6;
  border: 2px solid;
  border-color: #eee #444 #444 #eee;
}
