/* =====================================================================
   Theme pack. Each theme sets the palette tokens used by style.css,
   plus a few signature details (bevels, title bars, fonts, effects).
   --r scales every corner radius (0 = square retro, 1 = default).
   ===================================================================== */

/* shared "window" treatment for desktop-style themes: #view becomes a window on the desktop */
[data-theme="win98"] #view, [data-theme="win31"] #view, [data-theme="winxp"] #view, [data-theme="win7"] #view,
[data-theme="macos9"] #view, [data-theme="beos"] #view, [data-theme="nextstep"] #view, [data-theme="amiga"] #view {
  width: auto; margin: 14px; background: var(--view-bg); position: relative; padding-top: 44px;
}
[data-theme="win98"] #view::before, [data-theme="win31"] #view::before, [data-theme="winxp"] #view::before, [data-theme="win7"] #view::before,
[data-theme="macos9"] #view::before, [data-theme="beos"] #view::before, [data-theme="nextstep"] #view::before, [data-theme="amiga"] #view::before {
  content: "Bay IC Repair — Diagnostic Toolkit"; position: absolute; left: 0; right: 0; top: 0; height: 28px;
  display: flex; align-items: center; padding: 0 10px; font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden;
}

/* ---------------- Windows 11 ---------------- */
[data-theme="win11"] {
  --bg: #eef1f6; --panel: #ffffff; --panel2: #f7f8fa; --panel3: #eceff3; --line: #e3e6ea; --line2: #d3d7dd;
  --text: #1b1b1f; --muted: #5c6370; --dim: #8a909a; --accent: #0067c0; --accent-2: #005aa8; --accent-bg: rgba(0, 103, 192, .09); --on-accent: #fff;
  --amber: #9d5d00; --amber-bg: rgba(157, 93, 0, .1); --red: #c42b1c; --red-bg: rgba(196, 43, 28, .09); --green: #0f7b0f; --green-bg: rgba(15, 123, 15, .09); --violet: #7a4fd0;
  --shadow: 0 8px 28px rgba(0, 0, 0, .09); --r: .7; --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; color-scheme: light;
}
[data-theme="win11"] body { background: linear-gradient(135deg, #eaf0fa, #f3eef6); }
[data-theme="win11"] .sidebar { background: rgba(243, 243, 243, .85); backdrop-filter: blur(30px); }
[data-theme="win11"] .nav a.active { background: rgba(0, 0, 0, .05); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
[data-theme="win11"] .btn { border-bottom-color: #c3c7cd; }

/* ---------------- Windows 7 Aero ---------------- */
[data-theme="win7"] {
  --bg: #cfe3f5; --panel: #ffffff; --panel2: #f5f8fb; --panel3: #e8eef5; --line: #c9d6e3; --line2: #a9bdd1;
  --text: #1e1e1e; --muted: #4a5a6b; --dim: #7c8a99; --accent: #1e6fc8; --accent-2: #0d58a8; --accent-bg: rgba(51, 153, 255, .14); --on-accent: #fff;
  --amber: #a15c00; --amber-bg: rgba(161, 92, 0, .1); --red: #c2261c; --red-bg: rgba(194, 38, 28, .08); --green: #1d7d27; --green-bg: rgba(29, 125, 39, .1); --violet: #6a3fb5;
  --shadow: 0 6px 20px rgba(0, 40, 90, .2); --r: .35; --sans: "Segoe UI", Tahoma, sans-serif; --view-bg: #f0f0f0; color-scheme: light;
}
[data-theme="win7"] body { background: radial-gradient(1200px 700px at 70% 10%, #4ea7e8, #1a5a9a 55%, #0b3360); background-attachment: fixed; }
[data-theme="win7"] .sidebar { background: linear-gradient(180deg, rgba(190, 215, 240, .72), rgba(140, 180, 220, .62)); backdrop-filter: blur(14px); border-right: 1px solid rgba(255, 255, 255, .5); }
[data-theme="win7"] .nav a { color: #10243a; }
[data-theme="win7"] .nav a.active { background: linear-gradient(#e6f3fd, #c7e3f9); color: #0b3a6a; border: 1px solid #7db2e0; }
[data-theme="win7"] .nav-sec, [data-theme="win7"] .side-foot { color: #1c3c5c; }
[data-theme="win7"] .topbar { background: linear-gradient(rgba(220, 235, 250, .78), rgba(170, 200, 235, .7)); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .6); }
[data-theme="win7"] #view { border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 12px 40px rgba(0, 0, 0, .4); border-radius: 8px; }
[data-theme="win7"] #view::before { background: linear-gradient(rgba(200, 225, 250, .95), rgba(150, 190, 230, .95)); color: #0d2a4a; border-radius: 8px 8px 0 0; text-shadow: 0 0 8px #fff; }
[data-theme="win7"] .btn, [data-theme="win7"] .icon-btn { background: linear-gradient(#f2f2f2 0%, #ebebeb 50%, #dddddd 51%, #cfcfcf 100%); border-color: #707070; color: #000; }
[data-theme="win7"] .btn:hover, [data-theme="win7"] .icon-btn:hover { background: linear-gradient(#eaf6fd 0%, #d9f0fc 50%, #bee6fd 51%, #a7d9f5 100%); border-color: #3c7fb1; }
[data-theme="win7"] .btn.primary { background: linear-gradient(#5aa9f0 0%, #2b84d8 50%, #1a6fc4 51%, #2a86da 100%); border-color: #164f8a; color: #fff; }

/* ---------------- Windows XP Luna ---------------- */
[data-theme="winxp"] {
  --bg: #3a6ea5; --panel: #ffffff; --panel2: #f6f5ee; --panel3: #ece9d8; --line: #d6d2c2; --line2: #7f9db9;
  --text: #000000; --muted: #3b3b3b; --dim: #6d6d6d; --accent: #0a4fc0; --accent-2: #083f9a; --accent-bg: rgba(49, 106, 197, .14); --on-accent: #fff;
  --amber: #a35a00; --amber-bg: rgba(163, 90, 0, .12); --red: #c1272d; --red-bg: rgba(193, 39, 45, .1); --green: #2c7a2c; --green-bg: rgba(44, 122, 44, .12); --violet: #6a3fb5;
  --shadow: 2px 2px 6px rgba(0, 0, 0, .35); --r: .4; --sans: Tahoma, "Segoe UI", Verdana, sans-serif; --view-bg: #ece9d8; color-scheme: light;
}
[data-theme="winxp"] body { background: linear-gradient(180deg, #5b9be6 0%, #8ec4f3 45%, #7cb84a 70%, #4e8a2b 100%); background-attachment: fixed; }
[data-theme="winxp"] .sidebar { background: linear-gradient(180deg, #7ba2e7, #6375d6); border-right: 1px solid #3a56b8; }
[data-theme="winxp"] .brand { background: #fff; margin: 10px; border-radius: 6px; border: 1px solid #3a56b8; }
[data-theme="winxp"] .nav a, [data-theme="winxp"] .nav-sec, [data-theme="winxp"] .side-foot { color: #fff; }
[data-theme="winxp"] .nav a:hover { background: rgba(255, 255, 255, .18); color: #fff; }
[data-theme="winxp"] .nav a.active { background: #fff; color: #0a4fc0; font-weight: 700; }
[data-theme="winxp"] .topbar { background: linear-gradient(#0a5fd8 0%, #3c8ef3 8%, #0058e6 40%, #0046c8 92%, #0039a6 100%); border-bottom: 1px solid #002f8a; }
[data-theme="winxp"] #view { border: 3px solid #0054e3; border-top: 0; border-radius: 8px 8px 0 0; box-shadow: var(--shadow); }
[data-theme="winxp"] #view::before { background: linear-gradient(#0a5fd8 0%, #3c8ef3 10%, #0058e6 45%, #0046c8 92%); color: #fff; height: 30px; margin: 0 -3px; left: 0; right: 0; border-radius: 8px 8px 0 0; text-shadow: 1px 1px #0f1089; font-size: 14px; }
[data-theme="winxp"] .btn, [data-theme="winxp"] .icon-btn { background: linear-gradient(#ffffff, #ecebe6 86%, #d6d0c5); border: 1px solid #003c74; color: #000; border-radius: 3px; }
[data-theme="winxp"] .btn:hover { box-shadow: inset 0 0 0 2px #f8b636; }
[data-theme="winxp"] .btn.primary { background: linear-gradient(#5fbd5f, #3c9e3c 45%, #2d822d); border-color: #1d5c1d; color: #fff; font-style: italic; text-shadow: 1px 1px #1a4a1a; }
[data-theme="winxp"] .card, [data-theme="winxp"] .tile, [data-theme="winxp"] .dev-card { border-color: #7f9db9; }

/* ---------------- Windows 98 ---------------- */
[data-theme="win98"] {
  --bg: #008080; --panel: #c0c0c0; --panel2: #ffffff; --panel3: #dfdfdf; --line: #808080; --line2: #808080;
  --text: #000000; --muted: #202020; --dim: #505050; --accent: #000080; --accent-2: #1084d0; --accent-bg: rgba(0, 0, 128, .1); --on-accent: #fff;
  --amber: #7a5a00; --amber-bg: #ffffe1; --red: #a00000; --red-bg: #ffe4e4; --green: #006400; --green-bg: #e2f5e2; --violet: #600080;
  --shadow: none; --r: 0; --sans: "MS Sans Serif", "Microsoft Sans Serif", Tahoma, Arial, sans-serif; --mono: "Fixedsys", "Courier New", monospace; --view-bg: #c0c0c0; color-scheme: light;
  --bevel-out: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  --bevel-in: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
[data-theme="win98"] .sidebar { background: #c0c0c0; box-shadow: var(--bevel-out); border: 0; }
[data-theme="win98"] .nav a { color: #000; }
[data-theme="win98"] .nav a.active, [data-theme="win98"] .nav a:hover { background: #000080; color: #fff; }
[data-theme="win98"] .topbar { background: #c0c0c0; box-shadow: var(--bevel-out); border: 0; }
[data-theme="win98"] #view { box-shadow: var(--bevel-out); padding: 44px 20px 20px; }
[data-theme="win98"] #view::before { background: linear-gradient(90deg, #000080, #1084d0); color: #fff; margin: 3px; left: 0; right: 0; height: 22px; }
[data-theme="win98"] .card, [data-theme="win98"] .tile, [data-theme="win98"] .dev-card, [data-theme="win98"] .cat-tile, [data-theme="win98"] .stat, [data-theme="win98"] .hero,
[data-theme="win98"] .bd-thumb, [data-theme="win98"] .res-link, [data-theme="win98"] .fault, [data-theme="win98"] .verdict, [data-theme="win98"] .modal-card, [data-theme="win98"] .search-results {
  background: #c0c0c0; border: 0; box-shadow: var(--bevel-out);
}
[data-theme="win98"] .btn, [data-theme="win98"] .icon-btn, [data-theme="win98"] .opt, [data-theme="win98"] .filter-chip { background: #c0c0c0; border: 0; box-shadow: var(--bevel-out); color: #000; }
[data-theme="win98"] .btn:active, [data-theme="win98"] .opt:active, [data-theme="win98"] .filter-chip.on { box-shadow: var(--bevel-in); background: #c0c0c0; color: #000; }
[data-theme="win98"] .btn.primary { outline: 1px solid #000; outline-offset: -1px; font-weight: 700; }
[data-theme="win98"] input, [data-theme="win98"] select, [data-theme="win98"] textarea, [data-theme="win98"] .bd-wrap { background: #fff; border: 0; box-shadow: var(--bevel-in); }
[data-theme="win98"] .tab.on { background: #c0c0c0; box-shadow: var(--bevel-out); color: #000; border-bottom-color: transparent; }

/* ---------------- Windows 3.1 ---------------- */
[data-theme="win31"] {
  --bg: #c0c0c0; --panel: #ffffff; --panel2: #ffffff; --panel3: #e0e0e0; --line: #000000; --line2: #000000;
  --text: #000000; --muted: #202020; --dim: #404040; --accent: #000080; --accent-2: #000060; --accent-bg: rgba(0, 0, 128, .08); --on-accent: #fff;
  --amber: #806000; --amber-bg: #ffffc0; --red: #a00000; --red-bg: #ffd8d8; --green: #006000; --green-bg: #d8f0d8; --violet: #600080;
  --shadow: none; --r: .12; --sans: "MS Sans Serif", Arial, sans-serif; --mono: "Courier New", monospace; --view-bg: #ffffff; color-scheme: light;
}
[data-theme="win31"] body { font-weight: 600; }
[data-theme="win31"] .sidebar { background: #fff; border-right: 2px solid #000; }
[data-theme="win31"] .nav a { color: #000; }
[data-theme="win31"] .nav a.active, [data-theme="win31"] .nav a:hover { background: #000080; color: #fff; }
[data-theme="win31"] .topbar { background: #000080; border-bottom: 2px solid #000; }
[data-theme="win31"] #view { border: 2px solid #000; outline: 3px solid #c0c0c0; outline-offset: -5px; padding: 46px 22px 22px; }
[data-theme="win31"] #view::before { background: #000080; color: #fff; justify-content: center; border-bottom: 2px solid #000; height: 26px; }
[data-theme="win31"] .card, [data-theme="win31"] .tile, [data-theme="win31"] .dev-card, [data-theme="win31"] .cat-tile, [data-theme="win31"] .stat, [data-theme="win31"] .hero { border: 1px solid #000; box-shadow: none; }
[data-theme="win31"] .btn, [data-theme="win31"] .icon-btn, [data-theme="win31"] .opt { background: #c0c0c0; color: #000; border: 1px solid #000; box-shadow: inset -2px -2px #808080, inset 2px 2px #ffffff; }
[data-theme="win31"] .btn.primary { border-width: 2px; }

/* ---------------- MS-DOS ---------------- */
[data-theme="dos"] {
  --bg: #0000aa; --panel: #0000aa; --panel2: #000088; --panel3: #000066; --line: #aaaaaa; --line2: #aaaaaa;
  --text: #d0d0d0; --muted: #aaaaaa; --dim: #7f7fd0; --accent: #55ffff; --accent-2: #00aaaa; --accent-bg: rgba(85, 255, 255, .12); --on-accent: #000;
  --amber: #ffff55; --amber-bg: rgba(255, 255, 85, .12); --red: #ff5555; --red-bg: rgba(255, 85, 85, .15); --green: #55ff55; --green-bg: rgba(85, 255, 85, .12); --violet: #ff55ff;
  --shadow: 6px 6px 0 #000; --r: 0; --sans: "VT323", "Perfect DOS VGA 437", "Lucida Console", monospace; --mono: "VT323", "Lucida Console", monospace; color-scheme: dark;
}
[data-theme="dos"] body { font-size: 19px; }
[data-theme="dos"] h1, [data-theme="dos"] h2, [data-theme="dos"] h3 { color: #ffff55; font-weight: 400; text-transform: uppercase; }
[data-theme="dos"] h1::after { content: "_"; animation: dos-blink 1s steps(1) infinite; }
@keyframes dos-blink { 50% { opacity: 0; } }
[data-theme="dos"] .card, [data-theme="dos"] .tile, [data-theme="dos"] .dev-card, [data-theme="dos"] .cat-tile, [data-theme="dos"] .stat, [data-theme="dos"] .hero, [data-theme="dos"] .modal-card { border: 4px double #aaaaaa; }
[data-theme="dos"] .sidebar { background: #000088; border-right: 4px double #aaa; }
[data-theme="dos"] .nav a.active, [data-theme="dos"] .nav a:hover { background: #aaaaaa; color: #0000aa; }
[data-theme="dos"] .btn, [data-theme="dos"] .icon-btn { background: #aaaaaa; color: #000; border: 0; box-shadow: 4px 4px 0 #000; }
[data-theme="dos"] .btn.primary { background: #00aaaa; color: #000; }
[data-theme="dos"] input, [data-theme="dos"] select, [data-theme="dos"] textarea { background: #000; color: #aaaaaa; border: 1px solid #aaaaaa; }
[data-theme="dos"] .topbar { background: #aaaaaa; border-bottom: 0; }

/* ---------------- macOS 15 Sequoia ---------------- */
[data-theme="macos15"] {
  --bg: #f5f5f7; --panel: #ffffff; --panel2: #f5f5f7; --panel3: #ececf0; --line: #e3e3e8; --line2: #d2d2d7;
  --text: #1d1d1f; --muted: #6e6e73; --dim: #86868b; --accent: #007aff; --accent-2: #0062cc; --accent-bg: rgba(0, 122, 255, .1); --on-accent: #fff;
  --amber: #b25000; --amber-bg: rgba(255, 149, 0, .14); --red: #d70015; --red-bg: rgba(255, 59, 48, .1); --green: #248a3d; --green-bg: rgba(52, 199, 89, .12); --violet: #8944ab;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08); --r: 1.05; --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", sans-serif; --mono: "SF Mono", Menlo, monospace; color-scheme: light;
}
[data-theme="macos15"] .sidebar { background: rgba(232, 232, 237, .78); backdrop-filter: saturate(180%) blur(30px); }
[data-theme="macos15"] .nav a.active { background: rgba(0, 0, 0, .07); color: var(--text); }
[data-theme="macos15"] .topbar { background: rgba(246, 246, 248, .8); backdrop-filter: saturate(180%) blur(20px); }
[data-theme="macos15"] .topbar::before { content: ""; flex: 0 0 56px; height: 13px; background: radial-gradient(circle at 6.5px 6.5px, #ff5f57 6px, transparent 6.5px), radial-gradient(circle at 27.5px 6.5px, #febc2e 6px, transparent 6.5px), radial-gradient(circle at 48.5px 6.5px, #28c840 6px, transparent 6.5px); }
[data-theme="macos15"] .card, [data-theme="macos15"] .tile, [data-theme="macos15"] .dev-card { box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04); }

/* ---------------- Mac OS 9 Platinum ---------------- */
[data-theme="macos9"] {
  --bg: #9999cc; --panel: #dddddd; --panel2: #eeeeee; --panel3: #cccccc; --line: #999999; --line2: #555555;
  --text: #000000; --muted: #333333; --dim: #666666; --accent: #3333aa; --accent-2: #222288; --accent-bg: #ccccff; --on-accent: #fff;
  --amber: #885500; --amber-bg: #ffeebb; --red: #aa0000; --red-bg: #ffdddd; --green: #006600; --green-bg: #ddffdd; --violet: #663399;
  --shadow: 2px 2px 0 rgba(0, 0, 0, .35); --r: .45; --sans: "Charcoal", "ChicagoFLF", "Chicago", Geneva, "Lucida Grande", sans-serif; --mono: Monaco, "Courier New", monospace; --view-bg: #dddddd; color-scheme: light;
}
[data-theme="macos9"] body { background: #9999cc repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 4px); }
[data-theme="macos9"] .sidebar { background: #dddddd; border-right: 1px solid #555; }
[data-theme="macos9"] .nav a.active, [data-theme="macos9"] .nav a:hover { background: #3333aa; color: #fff; }
[data-theme="macos9"] .topbar { background: #dddddd; border-bottom: 1px solid #555; }
[data-theme="macos9"] #view { border: 1px solid #000; box-shadow: inset 1px 1px #fff, inset -1px -1px #999, 2px 2px 0 rgba(0, 0, 0, .4); }
[data-theme="macos9"] #view::before { background: repeating-linear-gradient(#eeeeee 0 1px, #aaaaaa 1px 2px); color: #000; justify-content: center; text-shadow: 0 0 3px #ddd, 0 0 3px #ddd; border-bottom: 1px solid #555; height: 22px; }
[data-theme="macos9"] .card, [data-theme="macos9"] .tile, [data-theme="macos9"] .dev-card, [data-theme="macos9"] .stat, [data-theme="macos9"] .cat-tile { border-color: #888; box-shadow: inset 1px 1px #fff, inset -1px -1px #aaa; }
[data-theme="macos9"] .btn, [data-theme="macos9"] .icon-btn { background: linear-gradient(#f8f8f8, #cccccc); border: 1px solid #000; color: #000; }
[data-theme="macos9"] .btn.primary { box-shadow: 0 0 0 2px #dddddd, 0 0 0 3px #000; }

/* ---------------- Ubuntu ---------------- */
[data-theme="ubuntu"] {
  --bg: #2c001e; --panel: #3a0f2d; --panel2: #47173a; --panel3: #5e2750; --line: #5a2649; --line2: #77396a;
  --text: #f7f3f5; --muted: #d3b6c9; --dim: #a5859a; --accent: #e95420; --accent-2: #c7461b; --accent-bg: rgba(233, 84, 32, .16); --on-accent: #fff;
  --amber: #f99b11; --amber-bg: rgba(249, 155, 17, .14); --red: #f05050; --red-bg: rgba(240, 80, 80, .14); --green: #3cd070; --green-bg: rgba(60, 208, 112, .12); --violet: #c4a1ff;
  --r: .8; --sans: "Ubuntu", "Segoe UI", sans-serif; --mono: "Ubuntu Mono", monospace; color-scheme: dark;
}
[data-theme="ubuntu"] .sidebar { background: #1d0a17; }
[data-theme="ubuntu"] .nav a.active { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 3px 0 0 #e95420; }

/* ---------------- NeXTSTEP ---------------- */
[data-theme="nextstep"] {
  --bg: #555555; --panel: #aaaaaa; --panel2: #bbbbbb; --panel3: #999999; --line: #777777; --line2: #222222;
  --text: #000000; --muted: #222222; --dim: #444444; --accent: #000000; --accent-2: #333333; --accent-bg: rgba(255, 255, 255, .35); --on-accent: #fff;
  --amber: #5a3a00; --amber-bg: #cccc99; --red: #6a0000; --red-bg: #cc9999; --green: #004400; --green-bg: #99bb99; --violet: #330055;
  --shadow: none; --r: 0; --sans: "Helvetica Neue", Helvetica, Arial, sans-serif; --view-bg: #aaaaaa; color-scheme: light;
}
[data-theme="nextstep"] .sidebar { background: #aaaaaa; border-right: 1px solid #000; }
[data-theme="nextstep"] .nav a.active, [data-theme="nextstep"] .nav a:hover { background: #fff; color: #000; }
[data-theme="nextstep"] .topbar { background: #000; border-bottom: 1px solid #000; }
[data-theme="nextstep"] #view { border: 1px solid #000; box-shadow: inset 1px 1px #ddd, inset -1px -1px #555; }
[data-theme="nextstep"] #view::before { background: #000; color: #fff; justify-content: center; }
[data-theme="nextstep"] .btn, [data-theme="nextstep"] .icon-btn { background: #aaaaaa; color: #000; border: 1px solid #000; box-shadow: inset 1px 1px #fff, inset -1px -1px #555; }
[data-theme="nextstep"] .card, [data-theme="nextstep"] .tile, [data-theme="nextstep"] .dev-card, [data-theme="nextstep"] .stat { box-shadow: inset 1px 1px #ddd, inset -1px -1px #666; border-color: #333; }

/* ---------------- Commodore 64 ---------------- */
[data-theme="c64"] {
  --bg: #7869c4; --panel: #40318d; --panel2: #352879; --panel3: #50459b; --line: #7869c4; --line2: #a59ff0;
  --text: #a5a0ff; --muted: #8c84e6; --dim: #7a72d4; --accent: #ffffff; --accent-2: #d0ccff; --accent-bg: rgba(255, 255, 255, .1); --on-accent: #40318d;
  --amber: #edf171; --amber-bg: rgba(237, 241, 113, .12); --red: #ff7777; --red-bg: rgba(255, 119, 119, .14); --green: #a9ff9f; --green-bg: rgba(169, 255, 159, .12); --violet: #ffa0ff;
  --shadow: none; --r: 0; --sans: "VT323", "C64 Pro Mono", monospace; --mono: "VT323", monospace; color-scheme: dark;
}
[data-theme="c64"] body { font-size: 19px; }
[data-theme="c64"] #view { background: #40318d; width: auto; margin: 18px; }
[data-theme="c64"] h1, [data-theme="c64"] h2 { font-family: "Press Start 2P", "VT323", monospace; font-size: 16px; text-transform: uppercase; line-height: 1.6; }
[data-theme="c64"] h1::before { content: "READY.\A"; white-space: pre; font-size: 12px; }
[data-theme="c64"] .btn, [data-theme="c64"] .icon-btn { background: #7869c4; color: #fff; border: 0; }

/* ---------------- Amiga Workbench 1.3 ---------------- */
[data-theme="amiga"] {
  --bg: #0055aa; --panel: #0055aa; --panel2: #0a4a95; --panel3: #003f88; --line: #ffffff; --line2: #ffffff;
  --text: #ffffff; --muted: #d6e6ff; --dim: #a8c4ea; --accent: #ff8800; --accent-2: #e07000; --accent-bg: rgba(255, 136, 0, .18); --on-accent: #000020;
  --amber: #ffcc33; --amber-bg: rgba(255, 204, 51, .15); --red: #ff6655; --red-bg: rgba(255, 102, 85, .18); --green: #88ff88; --green-bg: rgba(136, 255, 136, .15); --violet: #ddaaff;
  --shadow: none; --r: 0; --sans: "VT323", "Topaz", monospace; --mono: "VT323", monospace; --view-bg: #0055aa; color-scheme: dark;
}
[data-theme="amiga"] body { font-size: 19px; }
[data-theme="amiga"] .sidebar, [data-theme="amiga"] .topbar { background: #0055aa; border-color: #fff; }
[data-theme="amiga"] #view { border: 2px solid #fff; }
[data-theme="amiga"] #view::before { background: repeating-linear-gradient(90deg, #fff 0 2px, #0055aa 2px 4px); color: #0055aa; font-family: "VT323", monospace; font-size: 18px; text-shadow: 0 0 0 #fff; }
[data-theme="amiga"] .btn, [data-theme="amiga"] .icon-btn { background: #0055aa; color: #fff; border: 2px solid #fff; }
[data-theme="amiga"] .btn.primary { background: #ff8800; color: #000020; }

/* ---------------- BeOS ---------------- */
[data-theme="beos"] {
  --bg: #336699; --panel: #e8e8e8; --panel2: #f4f4f4; --panel3: #d8d8d8; --line: #b8b8b8; --line2: #8a8a8a;
  --text: #000000; --muted: #333333; --dim: #666666; --accent: #1f5fa8; --accent-2: #174b86; --accent-bg: rgba(31, 95, 168, .12); --on-accent: #fff;
  --amber: #8a6200; --amber-bg: #fff3c0; --red: #b00000; --red-bg: #ffdcdc; --green: #006a00; --green-bg: #dcf5dc; --violet: #5a2a8a;
  --shadow: 2px 2px 0 rgba(0, 0, 0, .3); --r: .2; --sans: "Swis721 BT", Verdana, "DejaVu Sans", sans-serif; --view-bg: #e8e8e8; color-scheme: light;
}
[data-theme="beos"] #view { border: 1px solid #555; box-shadow: var(--shadow); margin-top: 40px; }
[data-theme="beos"] #view::before { background: #ffcb00; color: #000; right: auto; top: -26px; height: 26px; border: 1px solid #8a6a00; border-bottom: 0; padding: 0 16px; }
[data-theme="beos"] .sidebar { background: #d8d8d8; }
[data-theme="beos"] .topbar { background: #d8d8d8; }
[data-theme="beos"] .nav a.active { background: #ffcb00; color: #000; }

/* ---------------- Green phosphor / Amber terminal ---------------- */
[data-theme="green"], [data-theme="amber"] { --r: 0; --sans: "VT323", "Lucida Console", monospace; --mono: "VT323", monospace; --shadow: none; color-scheme: dark; }
[data-theme="green"] {
  --bg: #000700; --panel: #020d03; --panel2: #031505; --panel3: #062a0b; --line: #0f4d1f; --line2: #1d7a35;
  --text: #33ff66; --muted: #22c450; --dim: #178a38; --accent: #7dff9b; --accent-2: #33ff66; --accent-bg: rgba(51, 255, 102, .1); --on-accent: #000;
  --amber: #c6ff33; --amber-bg: rgba(198, 255, 51, .1); --red: #ff5a5a; --red-bg: rgba(255, 90, 90, .12); --green: #33ff66; --green-bg: rgba(51, 255, 102, .1); --violet: #66ffcc;
}
[data-theme="amber"] {
  --bg: #0a0600; --panel: #110a00; --panel2: #1a1000; --panel3: #2a1a00; --line: #5a3a00; --line2: #8a5a00;
  --text: #ffb000; --muted: #d99400; --dim: #a06c00; --accent: #ffcc55; --accent-2: #ffb000; --accent-bg: rgba(255, 176, 0, .12); --on-accent: #000;
  --amber: #ffd27a; --amber-bg: rgba(255, 210, 122, .1); --red: #ff6a3a; --red-bg: rgba(255, 106, 58, .12); --green: #ffcc55; --green-bg: rgba(255, 204, 85, .1); --violet: #ffaa66;
}
[data-theme="green"] body, [data-theme="amber"] body { font-size: 19px; text-shadow: 0 0 5px currentColor; }
[data-theme="green"] body::after, [data-theme="amber"] body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 300;
  background: repeating-linear-gradient(rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px); mix-blend-mode: multiply;
}

/* ---------------- PCB soldermask ---------------- */
[data-theme="pcb"] {
  --bg: #0b3a1f; --panel: #0f4727; --panel2: #13522e; --panel3: #186138; --line: #237a48; --line2: #2f925a;
  --text: #f4f4e8; --muted: #c2dccb; --dim: #8fb79e; --accent: #e0b25a; --accent-2: #c8973f; --accent-bg: rgba(224, 178, 90, .15); --on-accent: #1a1205;
  --amber: #ffcf6e; --amber-bg: rgba(255, 207, 110, .12); --red: #ff7b6b; --red-bg: rgba(255, 123, 107, .14); --green: #9df5b8; --green-bg: rgba(157, 245, 184, .12); --violet: #d7c2ff;
  --r: .35; color-scheme: dark;
}
[data-theme="pcb"] body { background: #0b3a1f radial-gradient(circle at 20px 20px, rgba(224, 178, 90, .18) 2.5px, transparent 3px) 0 0 / 40px 40px; }
[data-theme="pcb"] .card, [data-theme="pcb"] .tile, [data-theme="pcb"] .dev-card { border-color: #2f925a; }

/* ---------------- Oscilloscope ---------------- */
[data-theme="scope"] {
  --bg: #04090a; --panel: #071214; --panel2: #0a191c; --panel3: #0f2428; --line: #12363b; --line2: #1d4f55;
  --text: #c8fff0; --muted: #7fcab6; --dim: #4f8f80; --accent: #00ffaa; --accent-2: #00d18c; --accent-bg: rgba(0, 255, 170, .1); --on-accent: #001a10;
  --amber: #ffd23f; --amber-bg: rgba(255, 210, 63, .12); --red: #ff5f7a; --red-bg: rgba(255, 95, 122, .12); --green: #00ffaa; --green-bg: rgba(0, 255, 170, .1); --violet: #5ad1ff;
  --r: .4; color-scheme: dark;
}
[data-theme="scope"] body { background-color: #04090a; background-image: linear-gradient(rgba(0, 255, 170, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 255, 170, .06) 1px, transparent 1px); background-size: 48px 48px; }

/* ---------------- Schematic blueprint ---------------- */
[data-theme="blueprint"] {
  --bg: #0d3a85; --panel: rgba(255, 255, 255, .06); --panel2: rgba(255, 255, 255, .08); --panel3: rgba(255, 255, 255, .12); --line: rgba(255, 255, 255, .35); --line2: rgba(255, 255, 255, .55);
  --text: #ffffff; --muted: #c9dcff; --dim: #93b3ea; --accent: #9fe0ff; --accent-2: #6cc8f5; --accent-bg: rgba(159, 224, 255, .14); --on-accent: #0d3a85;
  --amber: #ffe08a; --amber-bg: rgba(255, 224, 138, .14); --red: #ffb0b0; --red-bg: rgba(255, 176, 176, .14); --green: #b5ffcf; --green-bg: rgba(181, 255, 207, .12); --violet: #e0c8ff;
  --r: 0; --sans: "Consolas", "Courier New", monospace; color-scheme: dark;
}
[data-theme="blueprint"] body { background-color: #0d3a85; background-image: linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; }
[data-theme="blueprint"] .sidebar, [data-theme="blueprint"] .topbar, [data-theme="blueprint"] .modal-card, [data-theme="blueprint"] .search-results { background: #0b3274; }
[data-theme="blueprint"] .card, [data-theme="blueprint"] .tile, [data-theme="blueprint"] .dev-card { border-style: dashed; }

/* ---------------- Datasheet paper ---------------- */
[data-theme="datasheet"] {
  --bg: #f2f1ec; --panel: #ffffff; --panel2: #fafaf7; --panel3: #efeee8; --line: #d4d2c8; --line2: #111111;
  --text: #111111; --muted: #444444; --dim: #777777; --accent: #c8102e; --accent-2: #a00c24; --accent-bg: rgba(200, 16, 46, .08); --on-accent: #fff;
  --amber: #9a5a00; --amber-bg: #fff4dc; --red: #c8102e; --red-bg: #fde8eb; --green: #1f6b2c; --green-bg: #e3f3e6; --violet: #5a2a8a;
  --shadow: none; --r: 0; --sans: Arial, Helvetica, sans-serif; color-scheme: light;
}
[data-theme="datasheet"] table.t th { color: #fff; background: #111; }
[data-theme="datasheet"] h1, [data-theme="datasheet"] h2 { border-bottom: 3px solid #c8102e; padding-bottom: 4px; }

/* ---------------- Synthwave / Solarized / Dracula / Nord ---------------- */
[data-theme="synthwave"] {
  --bg: #1a1033; --panel: #241446; --panel2: #2c1955; --panel3: #3a2168; --line: #4a2a80; --line2: #6a3aa8;
  --text: #f6eaff; --muted: #c9a9f0; --dim: #9b7ac8; --accent: #ff4fd8; --accent-2: #e030b8; --accent-bg: rgba(255, 79, 216, .14); --on-accent: #1a0029;
  --amber: #fede5d; --amber-bg: rgba(254, 222, 93, .12); --red: #fe4450; --red-bg: rgba(254, 68, 80, .14); --green: #72f1b8; --green-bg: rgba(114, 241, 184, .12); --violet: #36f9f6;
  --r: .8; color-scheme: dark;
}
[data-theme="synthwave"] body { background: linear-gradient(180deg, #1a1033, #2b0f45 60%, #3d0f4e); background-attachment: fixed; }
[data-theme="synthwave"] h1 { text-shadow: 0 0 10px #ff4fd8, 0 0 22px rgba(255, 79, 216, .5); }
[data-theme="solarized"] {
  --bg: #002b36; --panel: #073642; --panel2: #0b3e4b; --panel3: #124b59; --line: #1d5563; --line2: #2a6a7a;
  --text: #eee8d5; --muted: #93a1a1; --dim: #839496; --accent: #268bd2; --accent-2: #1f73ad; --accent-bg: rgba(38, 139, 210, .15); --on-accent: #fff;
  --amber: #b58900; --amber-bg: rgba(181, 137, 0, .15); --red: #dc322f; --red-bg: rgba(220, 50, 47, .14); --green: #859900; --green-bg: rgba(133, 153, 0, .15); --violet: #6c71c4; color-scheme: dark;
}
[data-theme="dracula"] {
  --bg: #1e1f29; --panel: #282a36; --panel2: #2f3242; --panel3: #383a4c; --line: #44475a; --line2: #565a74;
  --text: #f8f8f2; --muted: #b9bccc; --dim: #8b8fa7; --accent: #bd93f9; --accent-2: #a77bf3; --accent-bg: rgba(189, 147, 249, .14); --on-accent: #1e1f29;
  --amber: #f1fa8c; --amber-bg: rgba(241, 250, 140, .1); --red: #ff5555; --red-bg: rgba(255, 85, 85, .13); --green: #50fa7b; --green-bg: rgba(80, 250, 123, .1); --violet: #ff79c6; color-scheme: dark;
}
[data-theme="nord"] {
  --bg: #242933; --panel: #2e3440; --panel2: #343b49; --panel3: #3b4252; --line: #434c5e; --line2: #4c566a;
  --text: #eceff4; --muted: #c0c8d6; --dim: #8f9bb0; --accent: #88c0d0; --accent-2: #6fb0c3; --accent-bg: rgba(136, 192, 208, .14); --on-accent: #1d2129;
  --amber: #ebcb8b; --amber-bg: rgba(235, 203, 139, .12); --red: #bf616a; --red-bg: rgba(191, 97, 106, .15); --green: #a3be8c; --green-bg: rgba(163, 190, 140, .14); --violet: #b48ead; color-scheme: dark;
}

/* ---------------- High contrast ---------------- */
[data-theme="contrast"] {
  --bg: #000000; --panel: #000000; --panel2: #000000; --panel3: #1a1a1a; --line: #ffffff; --line2: #ffffff;
  --text: #ffffff; --muted: #ffffff; --dim: #e0e0e0; --accent: #ffff00; --accent-2: #ffd800; --accent-bg: rgba(255, 255, 0, .2); --on-accent: #000;
  --amber: #ffd800; --amber-bg: #332b00; --red: #ff6b6b; --red-bg: #330000; --green: #4dff4d; --green-bg: #003300; --violet: #ff9dff;
  --shadow: none; --r: .4; color-scheme: dark;
}
[data-theme="contrast"] body { font-size: 15px; }
[data-theme="contrast"] .card, [data-theme="contrast"] .tile, [data-theme="contrast"] .dev-card, [data-theme="contrast"] .btn, [data-theme="contrast"] input, [data-theme="contrast"] select, [data-theme="contrast"] textarea { border-width: 2px; }
[data-theme="contrast"] a { text-decoration: underline; }
[data-theme="contrast"] :focus-visible { outline: 3px solid #ffff00; outline-offset: 2px; }
